INTTEST-91 - Updating list and dictionary syntax
[integration/test.git] / csit / suites / netvirt / l3vpn_bgp / l3vpn_bgp_multipath_maxpath_cli.robot
index 403016c745b415d4a0100346b2d1fa7bfd507acc..d85c861bd7da9c4d1af8052771762accdab424fb 100644 (file)
@@ -18,7 +18,7 @@ Resource          ../../../variables/Variables.robot
 @{DCGW_RD_IRT_ERT}    11:1    22:2    33:3
 @{DCGW_IP_LIST}    ${TOOLS_SYSTEM_1_IP}    ${TOOLS_SYSTEM_2_IP}    ${TOOLS_SYSTEM_3_IP}
 @{LABEL}          51    52    53
-@{L3VPN_RD_IRT_ERT}    ["@{DCGW_RD_IRT_ERT}[0]"]    ["@{DCGW_RD_IRT_ERT}[1]"]    ["@{DCGW_RD_IRT_ERT}[2]"]
+${L3VPN_RD_IRT_ERT}    ["${DCGW_RD_IRT_ERT}[0]"]    ["${DCGW_RD_IRT_ERT}[1]"]    ["${DCGW_RD_IRT_ERT}[2]"]
 @{MAX_PATH_LIST}    1    2    3    8    64
 @{MAX_PATH_INVALID_LIST}    -1    0    65
 @{NETWORK_IP}     10.1.1.1    20.1.1.1    30.1.1.1
@@ -52,81 +52,81 @@ Verify ODL supports CLI for multipath configuration (enable/disable multipath)
 Verify CSC supports CLI for max path configuration
     [Documentation]    Verify CSC supports CLI for max path configuration
     FOR    ${idx}    IN RANGE    ${START_VALUE}    ${NUM_OF_DCGW}
-        VpnOperations.VPN Create L3VPN    name=@{VPN_NAME}[${idx}]    vpnid=@{VPN_ID}[${idx}]    rd=@{L3VPN_RD_IRT_ERT}[${idx}]    exportrt=@{L3VPN_RD_IRT_ERT}[${idx}]    importrt=@{L3VPN_RD_IRT_ERT}[${idx}]
+        VpnOperations.VPN Create L3VPN    name=${VPN_NAME}[${idx}]    vpnid=${VPN_ID}[${idx}]    rd=${L3VPN_RD_IRT_ERT}[${idx}]    exportrt=${L3VPN_RD_IRT_ERT}[${idx}]    importrt=${L3VPN_RD_IRT_ERT}[${idx}]
     END
     VpnOperations.Verify L3VPN On ODL    @{VPN_ID}
     FOR    ${dcgw}    IN    @{DCGW_IP_LIST}
-        BgpOperations.Create L3VPN on DCGW    ${dcgw}    ${AS_ID}    @{VPN_NAME}[0]    @{DCGW_RD_IRT_ERT}[0]
-        BgpOperations.Verify L3VPN On DCGW    ${dcgw}    @{VPN_NAME}[0]    @{DCGW_RD_IRT_ERT}[0]
+        BgpOperations.Create L3VPN on DCGW    ${dcgw}    ${AS_ID}    ${VPN_NAME}[0]    ${DCGW_RD_IRT_ERT}[0]
+        BgpOperations.Verify L3VPN On DCGW    ${dcgw}    ${VPN_NAME}[0]    ${DCGW_RD_IRT_ERT}[0]
     END
     FOR    ${idx}    IN RANGE    ${START_VALUE}    ${NUM_OF_DCGW}
-        Configure Maxpath    @{MAX_PATH_LIST}[2]    @{DCGW_RD_IRT_ERT}[${idx}]
-        BuiltIn.Wait Until Keyword Succeeds    10s    2s    Verify Maxpath    @{MAX_PATH_LIST}[2]    @{DCGW_RD_IRT_ERT}[${idx}]
+        Configure Maxpath    ${MAX_PATH_LIST}[2]    ${DCGW_RD_IRT_ERT}[${idx}]
+        BuiltIn.Wait Until Keyword Succeeds    10s    2s    Verify Maxpath    ${MAX_PATH_LIST}[2]    ${DCGW_RD_IRT_ERT}[${idx}]
     END
     BuiltIn.Wait Until Keyword Succeeds    60s    10s    BgpOperations.Check BGP VPNv4 Nbr On ODL    ${NUM_OF_DCGW}    False
 
 Verify max-path error message with invalid inputs
     [Documentation]    Verify max path error message while configuring maxpath with invalid range
-    VpnOperations.VPN Create L3VPN    name=@{VPN_NAME}[0]    vpnid=@{VPN_ID}[0]    rd=@{L3VPN_RD_IRT_ERT}[0]    exportrt=@{L3VPN_RD_IRT_ERT}[0]    importrt=@{L3VPN_RD_IRT_ERT}[0]
-    VpnOperations.Verify L3VPN On ODL    @{VPN_ID}[0]
+    VpnOperations.VPN Create L3VPN    name=${VPN_NAME}[0]    vpnid=${VPN_ID}[0]    rd=${L3VPN_RD_IRT_ERT}[0]    exportrt=${L3VPN_RD_IRT_ERT}[0]    importrt=${L3VPN_RD_IRT_ERT}[0]
+    VpnOperations.Verify L3VPN On ODL    ${VPN_ID}[0]
     FOR    ${dcgw}    IN    @{DCGW_IP_LIST}
-        BgpOperations.Create L3VPN on DCGW    ${dcgw}    ${AS_ID}    @{VPN_NAME}[0]    @{DCGW_RD_IRT_ERT}[0]
-        BgpOperations.Verify L3VPN On DCGW    ${dcgw}    @{VPN_NAME}[0]    @{DCGW_RD_IRT_ERT}[0]
+        BgpOperations.Create L3VPN on DCGW    ${dcgw}    ${AS_ID}    ${VPN_NAME}[0]    ${DCGW_RD_IRT_ERT}[0]
+        BgpOperations.Verify L3VPN On DCGW    ${dcgw}    ${VPN_NAME}[0]    ${DCGW_RD_IRT_ERT}[0]
     END
     FOR    ${invalid}    IN    @{MAX_PATH_INVALID_LIST}
-        Configure Maxpath    ${invalid}    @{DCGW_RD_IRT_ERT}[0]
-        BuiltIn.Wait Until Keyword Succeeds    10s    2s    Verify Maxpath    ${invalid}    @{DCGW_RD_IRT_ERT}[0]
+        Configure Maxpath    ${invalid}    ${DCGW_RD_IRT_ERT}[0]
+        BuiltIn.Wait Until Keyword Succeeds    10s    2s    Verify Maxpath    ${invalid}    ${DCGW_RD_IRT_ERT}[0]
     END
     BuiltIn.Wait Until Keyword Succeeds    60s    10s    BgpOperations.Check BGP VPNv4 Nbr On ODL    ${NUM_OF_DCGW}    False
 
 Verify ODL supports dynamic configuration changes for max path value
     [Documentation]    Verify ODL supports dynamic configuration changes for max path value
-    VpnOperations.VPN Create L3VPN    name=@{VPN_NAME}[0]    vpnid=@{VPN_ID}[0]    rd=@{L3VPN_RD_IRT_ERT}[0]    exportrt=@{L3VPN_RD_IRT_ERT}[0]    importrt=@{L3VPN_RD_IRT_ERT}[0]
-    VpnOperations.Verify L3VPN On ODL    @{VPN_ID}[0]
-    VpnOperations.Associate VPN to Router    routerid=@{router_id_list}[0]    vpnid=@{VPN_ID}[0]
+    VpnOperations.VPN Create L3VPN    name=${VPN_NAME}[0]    vpnid=${VPN_ID}[0]    rd=${L3VPN_RD_IRT_ERT}[0]    exportrt=${L3VPN_RD_IRT_ERT}[0]    importrt=${L3VPN_RD_IRT_ERT}[0]
+    VpnOperations.Verify L3VPN On ODL    ${VPN_ID}[0]
+    VpnOperations.Associate VPN to Router    routerid=${router_id_list}[0]    vpnid=${VPN_ID}[0]
     FOR    ${dcgw}    IN    @{DCGW_IP_LIST}
-        BgpOperations.Create L3VPN on DCGW    ${dcgw}    ${AS_ID}    @{VPN_NAME}[0]    @{DCGW_RD_IRT_ERT}[0]
-        BgpOperations.Verify L3VPN On DCGW    ${dcgw}    @{VPN_NAME}[0]    @{DCGW_RD_IRT_ERT}[0]
+        BgpOperations.Create L3VPN on DCGW    ${dcgw}    ${AS_ID}    ${VPN_NAME}[0]    ${DCGW_RD_IRT_ERT}[0]
+        BgpOperations.Verify L3VPN On DCGW    ${dcgw}    ${VPN_NAME}[0]    ${DCGW_RD_IRT_ERT}[0]
     END
-    Configure Maxpath    @{MAX_PATH_LIST}[2]    @{DCGW_RD_IRT_ERT}[0]
-    BuiltIn.Wait Until Keyword Succeeds    10s    2s    Verify Maxpath    @{MAX_PATH_LIST}[2]    @{DCGW_RD_IRT_ERT}[0]
+    Configure Maxpath    ${MAX_PATH_LIST}[2]    ${DCGW_RD_IRT_ERT}[0]
+    BuiltIn.Wait Until Keyword Succeeds    10s    2s    Verify Maxpath    ${MAX_PATH_LIST}[2]    ${DCGW_RD_IRT_ERT}[0]
     FOR    ${idx}    IN RANGE    ${START_VALUE}    ${NUM_OF_DCGW}
-        BgpOperations.Add Routes On DCGW    @{DCGW_IP_LIST}[${idx}]    @{DCGW_RD_IRT_ERT}[0]    @{NETWORK_IP}[0]    @{LABEL}[${idx}]
+        BgpOperations.Add Routes On DCGW    ${DCGW_IP_LIST}[${idx}]    ${DCGW_RD_IRT_ERT}[0]    ${NETWORK_IP}[0]    ${LABEL}[${idx}]
     END
     BuiltIn.Wait Until Keyword Succeeds    60s    10s    BgpOperations.Check BGP VPNv4 Nbr On ODL    ${NUM_OF_DCGW}
-    BuiltIn.Wait Until Keyword Succeeds    60s    10s    Verify Routing Entry On ODL    @{DCGW_RD_IRT_ERT}[0]    @{NETWORK_IP}[0]    @{NUM_OF_ROUTES}[2]
-    BuiltIn.Wait Until Keyword Succeeds    30s    5s    Verify FIB Entry On ODL    @{NETWORK_IP}[0]    @{NUM_OF_ROUTES}[2]
+    BuiltIn.Wait Until Keyword Succeeds    60s    10s    Verify Routing Entry On ODL    ${DCGW_RD_IRT_ERT}[0]    ${NETWORK_IP}[0]    ${NUM_OF_ROUTES}[2]
+    BuiltIn.Wait Until Keyword Succeeds    30s    5s    Verify FIB Entry On ODL    ${NETWORK_IP}[0]    ${NUM_OF_ROUTES}[2]
     FOR    ${index}    IN RANGE    0    3
-        Configure Maxpath    @{MAX_PATH_LIST}[${index}]    @{DCGW_RD_IRT_ERT}[0]
-        BuiltIn.Wait Until Keyword Succeeds    10s    2s    Verify Maxpath    @{MAX_PATH_LIST}[${index}]    @{DCGW_RD_IRT_ERT}[0]
-        BuiltIn.Wait Until Keyword Succeeds    60s    10s    Verify Routing Entry On ODL    @{DCGW_RD_IRT_ERT}[0]    @{NETWORK_IP}[0]
-        ...    @{NUM_OF_ROUTES}[2]
-        BuiltIn.Wait Until Keyword Succeeds    60s    10s    Verify FIB Entry On ODL    @{NETWORK_IP}[0]    @{NUM_OF_ROUTES}[${index}]
+        Configure Maxpath    ${MAX_PATH_LIST}[${index}]    ${DCGW_RD_IRT_ERT}[0]
+        BuiltIn.Wait Until Keyword Succeeds    10s    2s    Verify Maxpath    ${MAX_PATH_LIST}[${index}]    ${DCGW_RD_IRT_ERT}[0]
+        BuiltIn.Wait Until Keyword Succeeds    60s    10s    Verify Routing Entry On ODL    ${DCGW_RD_IRT_ERT}[0]    ${NETWORK_IP}[0]
+        ...    ${NUM_OF_ROUTES}[2]
+        BuiltIn.Wait Until Keyword Succeeds    60s    10s    Verify FIB Entry On ODL    ${NETWORK_IP}[0]    ${NUM_OF_ROUTES}[${index}]
     END
 
 Verify that ECMP path gets withdrawn by QBGP after disabling multipath
     [Documentation]    Verify that ECMP path gets withdrawn by QBGP after disabling multipath by setting multipath value to 1
-    VpnOperations.VPN Create L3VPN    name=@{VPN_NAME}[0]    vpnid=@{VPN_ID}[0]    rd=@{L3VPN_RD_IRT_ERT}[0]    exportrt=@{L3VPN_RD_IRT_ERT}[0]    importrt=@{L3VPN_RD_IRT_ERT}[0]
-    VpnOperations.Verify L3VPN On ODL    @{VPN_ID}[0]
-    VpnOperations.Associate VPN to Router    routerid=@{router_id_list}[0]    vpnid=@{VPN_ID}[0]
+    VpnOperations.VPN Create L3VPN    name=${VPN_NAME}[0]    vpnid=${VPN_ID}[0]    rd=${L3VPN_RD_IRT_ERT}[0]    exportrt=${L3VPN_RD_IRT_ERT}[0]    importrt=${L3VPN_RD_IRT_ERT}[0]
+    VpnOperations.Verify L3VPN On ODL    ${VPN_ID}[0]
+    VpnOperations.Associate VPN to Router    routerid=${router_id_list}[0]    vpnid=${VPN_ID}[0]
     FOR    ${dcgw}    IN    @{DCGW_IP_LIST}
-        BgpOperations.Create L3VPN on DCGW    ${dcgw}    ${AS_ID}    @{VPN_NAME}[0]    @{DCGW_RD_IRT_ERT}[0]
-        BgpOperations.Verify L3VPN On DCGW    ${dcgw}    @{VPN_NAME}[0]    @{DCGW_RD_IRT_ERT}[0]
+        BgpOperations.Create L3VPN on DCGW    ${dcgw}    ${AS_ID}    ${VPN_NAME}[0]    ${DCGW_RD_IRT_ERT}[0]
+        BgpOperations.Verify L3VPN On DCGW    ${dcgw}    ${VPN_NAME}[0]    ${DCGW_RD_IRT_ERT}[0]
     END
-    Configure Maxpath    @{MAX_PATH_LIST}[2]    @{DCGW_RD_IRT_ERT}[0]
-    BuiltIn.Wait Until Keyword Succeeds    10s    2s    Verify Maxpath    @{MAX_PATH_LIST}[2]    @{DCGW_RD_IRT_ERT}[0]
+    Configure Maxpath    ${MAX_PATH_LIST}[2]    ${DCGW_RD_IRT_ERT}[0]
+    BuiltIn.Wait Until Keyword Succeeds    10s    2s    Verify Maxpath    ${MAX_PATH_LIST}[2]    ${DCGW_RD_IRT_ERT}[0]
     FOR    ${idx}    IN RANGE    ${START_VALUE}    ${NUM_OF_DCGW}
-        BgpOperations.Add Routes On DCGW    @{DCGW_IP_LIST}[${idx}]    @{DCGW_RD_IRT_ERT}[0]    @{NETWORK_IP}[0]    @{LABEL}[${idx}]
+        BgpOperations.Add Routes On DCGW    ${DCGW_IP_LIST}[${idx}]    ${DCGW_RD_IRT_ERT}[0]    ${NETWORK_IP}[0]    ${LABEL}[${idx}]
     END
     BuiltIn.Wait Until Keyword Succeeds    60s    10s    BgpOperations.Check BGP VPNv4 Nbr On ODL    ${NUM_OF_DCGW}
-    BuiltIn.Wait Until Keyword Succeeds    60s    10s    Verify Routing Entry On ODL    @{DCGW_RD_IRT_ERT}[0]    @{NETWORK_IP}[0]    @{NUM_OF_ROUTES}[2]
-    BuiltIn.Wait Until Keyword Succeeds    30s    5s    Verify FIB Entry On ODL    @{NETWORK_IP}[0]    @{NUM_OF_ROUTES}[2]
-    Configure Maxpath    @{MAX_PATH_LIST}[0]    @{DCGW_RD_IRT_ERT}[0]
-    BuiltIn.Wait Until Keyword Succeeds    60s    10s    Verify Routing Entry On ODL    @{DCGW_RD_IRT_ERT}[0]    @{NETWORK_IP}[0]    @{NUM_OF_ROUTES}[2]
-    BuiltIn.Wait Until Keyword Succeeds    30s    5s    Verify FIB Entry On ODL    @{NETWORK_IP}[0]    @{NUM_OF_ROUTES}[0]
-    Configure Maxpath    @{MAX_PATH_LIST}[2]    @{DCGW_RD_IRT_ERT}[0]
-    BuiltIn.Wait Until Keyword Succeeds    60s    10s    Verify Routing Entry On ODL    @{DCGW_RD_IRT_ERT}[0]    @{NETWORK_IP}[0]    @{NUM_OF_ROUTES}[2]
-    BuiltIn.Wait Until Keyword Succeeds    30s    5s    Verify FIB Entry On ODL    @{NETWORK_IP}[0]    @{NUM_OF_ROUTES}[2]
+    BuiltIn.Wait Until Keyword Succeeds    60s    10s    Verify Routing Entry On ODL    ${DCGW_RD_IRT_ERT}[0]    ${NETWORK_IP}[0]    ${NUM_OF_ROUTES}[2]
+    BuiltIn.Wait Until Keyword Succeeds    30s    5s    Verify FIB Entry On ODL    ${NETWORK_IP}[0]    ${NUM_OF_ROUTES}[2]
+    Configure Maxpath    ${MAX_PATH_LIST}[0]    ${DCGW_RD_IRT_ERT}[0]
+    BuiltIn.Wait Until Keyword Succeeds    60s    10s    Verify Routing Entry On ODL    ${DCGW_RD_IRT_ERT}[0]    ${NETWORK_IP}[0]    ${NUM_OF_ROUTES}[2]
+    BuiltIn.Wait Until Keyword Succeeds    30s    5s    Verify FIB Entry On ODL    ${NETWORK_IP}[0]    ${NUM_OF_ROUTES}[0]
+    Configure Maxpath    ${MAX_PATH_LIST}[2]    ${DCGW_RD_IRT_ERT}[0]
+    BuiltIn.Wait Until Keyword Succeeds    60s    10s    Verify Routing Entry On ODL    ${DCGW_RD_IRT_ERT}[0]    ${NETWORK_IP}[0]    ${NUM_OF_ROUTES}[2]
+    BuiltIn.Wait Until Keyword Succeeds    30s    5s    Verify FIB Entry On ODL    ${NETWORK_IP}[0]    ${NUM_OF_ROUTES}[2]
 
 *** Keywords ***
 Suite Setup
@@ -142,7 +142,7 @@ Stop Suite
 Test Cleanup
     [Documentation]    Posttest case cleanup
     FOR    ${l3vpn_rd}    IN    @{DCGW_RD_IRT_ERT}
-        Configure Maxpath    @{MAX_PATH_LIST}[0]    ${l3vpn_rd}
+        Configure Maxpath    ${MAX_PATH_LIST}[0]    ${l3vpn_rd}
     END
     FOR    ${vpn}    IN    @{VPN_ID}
         BuiltIn.Run Keyword And Ignore Error    VpnOperations.VPN Delete L3VPN    vpnid=${vpn}
@@ -165,8 +165,8 @@ Create Setup
         BgpOperations.AddNeighbor To BGP Configuration On ODL    remoteas=${AS_ID}    neighborAddr=${dcgw}
         ${output} =    BgpOperations.Get BGP Configuration On ODL    session
         BuiltIn.Should Contain    ${output}    ${dcgw}
-        BgpOperations.Configure BGP And Add Neighbor On DCGW    ${dcgw}    ${AS_ID}    ${dcgw}    ${ODL_SYSTEM_IP}    @{VPN_NAME}[0]
-        ...    @{DCGW_RD_IRT_ERT}[0]    @{NETWORK_IP}[0]
+        BgpOperations.Configure BGP And Add Neighbor On DCGW    ${dcgw}    ${AS_ID}    ${dcgw}    ${ODL_SYSTEM_IP}    ${VPN_NAME}[0]
+        ...    ${DCGW_RD_IRT_ERT}[0]    ${NETWORK_IP}[0]
         BuiltIn.Wait Until Keyword Succeeds    120s    20s    BgpOperations.Verify BGP Neighbor Status On Quagga    ${dcgw}    ${ODL_SYSTEM_IP}
     END
     FOR    ${network}    IN    @{NETWORKS}
@@ -174,7 +174,7 @@ Create Setup
     END
     BuiltIn.Wait Until Keyword Succeeds    10s    2s    Utils.Check For Elements At URI    ${NETWORK_URL}    ${NETWORKS}
     FOR    ${index}    IN RANGE    0    3
-        OpenStackOperations.Create SubNet    @{NETWORKS}[${index}]    @{SUBNETS}[${index}]    @{SUBNET_CIDR}[${index}]
+        OpenStackOperations.Create SubNet    ${NETWORKS}[${index}]    ${SUBNETS}[${index}]    ${SUBNET_CIDR}[${index}]
     END
     BuiltIn.Wait Until Keyword Succeeds    10s    2s    Utils.Check For Elements At URI    ${SUBNETWORK_URL}    ${SUBNETS}
     ${router_id_list}    BuiltIn.Create List    @{EMPTY}
@@ -185,9 +185,9 @@ Create Setup
     END
     BuiltIn.Set Suite Variable    ${router_id_list}
     FOR    ${index}    IN RANGE    0    3
-        OpenStackOperations.Add Router Interface    @{ROUTERS}[${index}]    @{SUBNETS}[${index}]
-        ${output} =    OpenStackOperations.Show Router Interface    @{ROUTERS}[${index}]
-        ${subnet_id} =    OpenStackOperations.Get Subnet Id    @{SUBNETS}[${index}]
+        OpenStackOperations.Add Router Interface    ${ROUTERS}[${index}]    ${SUBNETS}[${index}]
+        ${output} =    OpenStackOperations.Show Router Interface    ${ROUTERS}[${index}]
+        ${subnet_id} =    OpenStackOperations.Get Subnet Id    ${SUBNETS}[${index}]
         BuiltIn.Should Contain    ${output}    ${subnet_id}
     END