Update Robot Framework format - step 11 41/102341/8
authorSangwook Ha <sangwook.ha@verizon.com>
Sat, 10 Sep 2022 02:27:53 +0000 (19:27 -0700)
committerSangwook Ha <sangwook.ha@verizon.com>
Fri, 7 Oct 2022 02:12:07 +0000 (19:12 -0700)
Robotidy has stricter formatting rules for line width, alignment,
section ordering & spacing, etc.

Update the format of Robot Framework files in the following directory
with Robotidy:

- csit/suites/netvirt
- csit/suites/ocpplugin
- csit/suites/odlmicro
- csit/suites/odltools

JIRA: INTTEST-132
Change-Id: Ie786027a441055fa7bd79bb3063213e725049b13
Signed-off-by: Sangwook Ha <sangwook.ha@verizon.com>
25 files changed:
csit/suites/netvirt/aclservicerecovery/aclservicerecovery.robot
csit/suites/netvirt/bgpvpn/bgpvpn.robot
csit/suites/netvirt/elan/elan.robot
csit/suites/netvirt/elan/elan_service_recovery.robot
csit/suites/netvirt/host_route/host_route_handling.robot
csit/suites/netvirt/l2l3_gatewaymac_arp.robot
csit/suites/netvirt/l3vpn_bgp/bfd_bgp.robot
csit/suites/netvirt/l3vpn_bgp/l3vpn_bgp_multipath_maxpath_cli.robot
csit/suites/netvirt/l3vpn_bgp/multi_vpn_bgp.robot
csit/suites/netvirt/ofpunt_path/openflow_punt_path_protection.robot
csit/suites/netvirt/snatdnat/snat_dnat.robot
csit/suites/netvirt/subnet_routing/subnet_routing_and_multicast.robot
csit/suites/netvirt/upgrade/upgrade.robot
csit/suites/netvirt/vnibasedIpv6forwarding/vnibasedIpv6forwarding.robot
csit/suites/netvirt/vnibasedl2switching/vnibasedl2switching.robot
csit/suites/netvirt/vnibasedl3forwarding/vnibasedl3forwarding.robot
csit/suites/netvirt/vpnservice/arp_learning.robot
csit/suites/netvirt/vpnservice/vpn_basic.robot
csit/suites/netvirt/vpnservice/vpn_basic_dualstack_one_router.robot
csit/suites/netvirt/vpnservice/vpn_basic_dualstack_subnet_routing.robot
csit/suites/netvirt/vpnservice/vpn_basic_ipv6.robot
csit/suites/ocpplugin/basic/010__ocp_get.robot
csit/suites/ocpplugin/scalability/010__ocp_scalability.robot
csit/suites/odlmicro/initial_setup.robot
csit/suites/odltools/basic.robot

index 4dfdc0ef62755ce2325d99c69711a2d3995c0b40..bf36eb9d7331f680f39424d10b66005765583427 100644 (file)
@@ -1,45 +1,54 @@
 *** Settings ***
-Documentation     Test Suite for ACL Service Recovery:
-...               The Service Recovery Manager provides
-...               common interface to recover services in ODL.
-...               This feature will register ACL service for recovery
-...               and implement the mechanism to recover ACL service.
-Suite Setup       Suite Setup
-Suite Teardown    Run Keywords    OpenStackOperations.OpenStack Suite Teardown
-...               AND    SetupUtils.Setup_Logging_For_Debug_Purposes_On_List_Or_All    INFO    ${TEST_LOG_COMPONENTS}
-Test Setup        Run Keywords    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-...               AND    OpenStackOperations.Get DumpFlows And Ovsconfig    ${OS_CMP1_CONN_ID}
-Test Teardown     OpenStackOperations.Get Test Teardown Debugs
-Library           OperatingSystem
-Library           RequestsLibrary
-Library           String
-Resource          ../../../libraries/DevstackUtils.robot
-Resource          ../../../libraries/Genius.robot
-Resource          ../../../libraries/KarafKeywords.robot
-Resource          ../../../libraries/OVSDB.robot
-Resource          ../../../libraries/OvsManager.robot
-Resource          ../../../libraries/OpenStackOperations.robot
-Resource          ../../../libraries/SetupUtils.robot
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../variables/netvirt/Variables.robot
-Resource          ../../../variables/Variables.robot
+Documentation       Test Suite for ACL Service Recovery:
+...                 The Service Recovery Manager provides
+...                 common interface to recover services in ODL.
+...                 This feature will register ACL service for recovery
+...                 and implement the mechanism to recover ACL service.
+
+Library             OperatingSystem
+Library             RequestsLibrary
+Library             String
+Resource            ../../../libraries/DevstackUtils.robot
+Resource            ../../../libraries/Genius.robot
+Resource            ../../../libraries/KarafKeywords.robot
+Resource            ../../../libraries/OVSDB.robot
+Resource            ../../../libraries/OvsManager.robot
+Resource            ../../../libraries/OpenStackOperations.robot
+Resource            ../../../libraries/SetupUtils.robot
+Resource            ../../../libraries/Utils.robot
+Resource            ../../../variables/netvirt/Variables.robot
+Resource            ../../../variables/Variables.robot
+
+Suite Setup         Suite Setup
+Suite Teardown      Run Keywords    OpenStackOperations.OpenStack Suite Teardown
+...                     AND    SetupUtils.Setup_Logging_For_Debug_Purposes_On_List_Or_All    INFO    ${TEST_LOG_COMPONENTS}
+Test Setup          Run Keywords    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+...                     AND    OpenStackOperations.Get DumpFlows And Ovsconfig    ${OS_CMP1_CONN_ID}
+Test Teardown       OpenStackOperations.Get Test Teardown Debugs
+
 
 *** Variables ***
 ${acl_sr_security_group}    acl_sr_sg
-@{acl_sr_networks}    acl_sr_net_1    acl_sr_net_2    acl_sr_net_3
-@{acl_sr_subnets}    acl_sr_sub_1    acl_sr_sub_2    acl_sr_sub_3
-@{acl_sr_subnet_cidrs}    81.1.1.0/24    82.1.1.0/24    83.1.1.0/24
-@{acl_sr_net_1_ports}    acl_sr_net_1_port_1    acl_sr_net_1_port_2
-@{acl_sr_net_1_vms}    acl_sr_net_1_vm_1    acl_sr_net_1_vm_2
-${TEST_LOG_LEVEL}    trace
-@{TEST_LOG_COMPONENTS}    org.opendaylight.netvirt.aclservice    org.opendaylight.genius.interfacemanager    org.opendaylight.genius.srm
+@{acl_sr_networks}          acl_sr_net_1    acl_sr_net_2    acl_sr_net_3
+@{acl_sr_subnets}           acl_sr_sub_1    acl_sr_sub_2    acl_sr_sub_3
+@{acl_sr_subnet_cidrs}      81.1.1.0/24    82.1.1.0/24    83.1.1.0/24
+@{acl_sr_net_1_ports}       acl_sr_net_1_port_1    acl_sr_net_1_port_2
+@{acl_sr_net_1_vms}         acl_sr_net_1_vm_1    acl_sr_net_1_vm_2
+${TEST_LOG_LEVEL}           trace
+@{TEST_LOG_COMPONENTS}
+...                         org.opendaylight.netvirt.aclservice
+...                         org.opendaylight.genius.interfacemanager
+...                         org.opendaylight.genius.srm
+
 
 *** Test Cases ***
 ACL Service Recovery CLI
     [Documentation]    This test case covers ACL service recovery.
     ${count_before} =    OvsManager.Get Dump Flows Count    ${OS_CMP1_CONN_ID}    ${INGRESS_ACL_REMOTE_ACL_TABLE}
     ${node_id} =    OVSDB.Get DPID    ${OS_CMP1_IP}
-    ${resp} =    RequestsLibrary.Delete Request    session    ${CONFIG_NODES_API}/node/openflow:${node_id}/flow-node-inventory:table/${INGRESS_ACL_REMOTE_ACL_TABLE}
+    ${resp} =    RequestsLibrary.Delete Request
+    ...    session
+    ...    ${CONFIG_NODES_API}/node/openflow:${node_id}/flow-node-inventory:table/${INGRESS_ACL_REMOTE_ACL_TABLE}
     BuiltIn.Should Be Equal As Strings    ${resp.status_code}    200
     OpenStackOperations.Ping From DHCP Should Not Succeed    ${acl_sr_networks}[0]    ${ACL_SR_NET_1_VM_IPS}[0]
     ${flow_after_delete} =    OvsManager.Get Dump Flows Count    ${OS_CMP1_CONN_ID}    ${INGRESS_ACL_REMOTE_ACL_TABLE}
@@ -47,14 +56,27 @@ ACL Service Recovery CLI
     ${output} =    Issue_Command_On_Karaf_Console    srm:recover service acl
     BuiltIn.Should Contain    ${output}    RPC call to recover was successful
     OpenStackOperations.Ping Vm From DHCP Namespace    ${acl_sr_networks}[0]    ${ACL_SR_NET_1_VM_IPS}[0]
-    BuiltIn.Wait Until Keyword Succeeds    30s    5s    Verify Flow Counts Are Same    ${count_before}    ${INGRESS_ACL_REMOTE_ACL_TABLE}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    5s
+    ...    Verify Flow Counts Are Same
+    ...    ${count_before}
+    ...    ${INGRESS_ACL_REMOTE_ACL_TABLE}
 
 ACL Instance Recovery CLI
     [Documentation]    This test case covers ACL instance recovery.
     ${count_before} =    OvsManager.Get Dump Flows Count    ${OS_CMP1_CONN_ID}    ${EGRESS_LEARN_ACL_FILTER_TABLE}
     ${node_id} =    OVSDB.Get DPID    ${OS_CMP1_IP}
-    Write Commands Until Expected Prompt    sudo ovs-ofctl del-flows br-int -OOpenflow13 "table=${EGRESS_LEARN_ACL_FILTER_TABLE},icmp"    ${DEFAULT_LINUX_PROMPT_STRICT}
-    Wait Until Keyword Succeeds    30s    5s    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${EGRESS_LEARN_ACL_FILTER_TABLE}    False
+    Write Commands Until Expected Prompt
+    ...    sudo ovs-ofctl del-flows br-int -OOpenflow13 "table=${EGRESS_LEARN_ACL_FILTER_TABLE},icmp"
+    ...    ${DEFAULT_LINUX_PROMPT_STRICT}
+    Wait Until Keyword Succeeds
+    ...    30s
+    ...    5s
+    ...    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${EGRESS_LEARN_ACL_FILTER_TABLE}
+    ...    False
     ...    |grep icmp
     OpenStackOperations.Ping From DHCP Should Not Succeed    ${acl_sr_networks}[0]    ${ACL_SR_NET_1_VM_IPS}[0]
     ${output} =    OpenStack CLI    openstack security group show ${acl_sr_security_group} | awk '/ id / {print $4}'
@@ -63,20 +85,43 @@ ACL Instance Recovery CLI
     ${output} =    Issue_Command_On_Karaf_Console    srm:recover instance acl-instance ${instance_id}
     BuiltIn.Should Contain    ${output}    RPC call to recover was successful
     OpenStackOperations.Ping Vm From DHCP Namespace    ${acl_sr_networks}[0]    ${ACL_SR_NET_1_VM_IPS}[0]
-    Wait Until Keyword Succeeds    30s    5s    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${EGRESS_LEARN_ACL_FILTER_TABLE}    True
-    ...    ${EMPTY}    icmp
-    Wait Until Keyword Succeeds    30s    5s    Verify Flow Counts Are Same    ${count_before}    ${EGRESS_LEARN_ACL_FILTER_TABLE}
+    Wait Until Keyword Succeeds
+    ...    30s
+    ...    5s
+    ...    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${EGRESS_LEARN_ACL_FILTER_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    icmp
+    Wait Until Keyword Succeeds
+    ...    30s
+    ...    5s
+    ...    Verify Flow Counts Are Same
+    ...    ${count_before}
+    ...    ${EGRESS_LEARN_ACL_FILTER_TABLE}
 
 ACL Interface Recovery CLI
     [Documentation]    This test case covers ACL interface recovery.
     ${output} =    OpenStack CLI    openstack port show ${acl_sr_net_1_ports[0]} |awk '/ mac_address / {print$4}'
     @{list} =    Split String    ${output}
-    ${port_mac}    Set Variable    ${list[0]}
-    ${count_before} =    OvsManager.Get Dump Flows Count    ${OS_CMP1_CONN_ID}    ${EGRESS_ACL_TABLE}    port_mac=${port_mac}
-    ${node_id}    OVSDB.Get DPID    ${OS_CMP1_IP}
-    Write Commands Until Expected Prompt    sudo ovs-ofctl del-flows br-int -OOpenflow13 "table=${EGRESS_ACL_TABLE},dl_dst=${port_mac}"    ${DEFAULT_LINUX_PROMPT_STRICT}
+    ${port_mac} =    Set Variable    ${list[0]}
+    ${count_before} =    OvsManager.Get Dump Flows Count
+    ...    ${OS_CMP1_CONN_ID}
+    ...    ${EGRESS_ACL_TABLE}
+    ...    port_mac=${port_mac}
+    ${node_id} =    OVSDB.Get DPID    ${OS_CMP1_IP}
+    Write Commands Until Expected Prompt
+    ...    sudo ovs-ofctl del-flows br-int -OOpenflow13 "table=${EGRESS_ACL_TABLE},dl_dst=${port_mac}"
+    ...    ${DEFAULT_LINUX_PROMPT_STRICT}
     OpenStackOperations.Ping From DHCP Should Not Succeed    ${acl_sr_networks}[0]    ${ACL_SR_NET_1_VM_IPS}[0]
-    Wait Until Keyword Succeeds    30s    5s    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${EGRESS_LEARN_ACL_FILTER_TABLE}    False
+    Wait Until Keyword Succeeds
+    ...    30s
+    ...    5s
+    ...    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${EGRESS_LEARN_ACL_FILTER_TABLE}
+    ...    False
     ...    |grep ${port_mac}
     ${output} =    OpenStack CLI    openstack port show ${acl_sr_net_1_ports[0]} |awk '/ id / {print$4}'
     ${splitted_output} =    String.Split String    ${output}    ${EMPTY}
@@ -84,14 +129,28 @@ ACL Interface Recovery CLI
     ${output} =    Issue_Command_On_Karaf_Console    srm:recover instance acl-interface ${interface_id}
     BuiltIn.Should Contain    ${output}    RPC call to recover was successful
     OpenStackOperations.Ping Vm From DHCP Namespace    ${acl_sr_networks}[0]    ${ACL_SR_NET_1_VM_IPS}[0]
-    Wait Until Keyword Succeeds    30s    5s    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${EGRESS_ACL_TABLE}    True
-    ...    ${EMPTY}    ${port_mac}
-    Wait Until Keyword Succeeds    30s    5s    Verify Flow Counts Are Same    ${count_before}    ${EGRESS_ACL_TABLE}    port_mac=${port_mac}
+    Wait Until Keyword Succeeds
+    ...    30s
+    ...    5s
+    ...    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${EGRESS_ACL_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    ${port_mac}
+    Wait Until Keyword Succeeds
+    ...    30s
+    ...    5s
+    ...    Verify Flow Counts Are Same
+    ...    ${count_before}
+    ...    ${EGRESS_ACL_TABLE}
+    ...    port_mac=${port_mac}
+
 
 *** Keywords ***
 Verify Flow Counts Are Same
-    [Arguments]    ${count_before}    ${table_id}    ${port_mac}=""
     [Documentation]    Verify flows count should be same as before and after for a table id with a given port mac.
+    [Arguments]    ${count_before}    ${table_id}    ${port_mac}=""
     ${count_after} =    OvsManager.Get Dump Flows Count    ${OS_CMP1_CONN_ID}    ${table_id}    port_mac=${port_mac}
     BuiltIn.Should Be Equal As Numbers    ${count_before}    ${count_after}
 
@@ -104,9 +163,22 @@ Suite Setup
     OpenStackOperations.Create SubNet    ${acl_sr_networks}[0]    ${acl_sr_subnets}[0]    ${acl_sr_subnet_cidrs[0]}
     OpenStackOperations.Create Port    ${acl_sr_networks}[0]    ${acl_sr_net_1_ports[0]}    sg=${acl_sr_security_group}
     OpenStackOperations.Create Port    ${acl_sr_networks}[0]    ${acl_sr_net_1_ports[1]}    sg=${acl_sr_security_group}
-    BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${PORT_URL}    ${acl_sr_net_1_ports}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${acl_sr_net_1_ports[0]}    ${acl_sr_net_1_vms[0]}    ${OS_CMP1_HOSTNAME}    sg=${acl_sr_security_group}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${acl_sr_net_1_ports[1]}    ${acl_sr_net_1_vms[1]}    ${OS_CMP2_HOSTNAME}    sg=${acl_sr_security_group}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    3s
+    ...    1s
+    ...    Utils.Check For Elements At URI
+    ...    ${PORT_URL}
+    ...    ${acl_sr_net_1_ports}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${acl_sr_net_1_ports[0]}
+    ...    ${acl_sr_net_1_vms[0]}
+    ...    ${OS_CMP1_HOSTNAME}
+    ...    sg=${acl_sr_security_group}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${acl_sr_net_1_ports[1]}
+    ...    ${acl_sr_net_1_vms[1]}
+    ...    ${OS_CMP2_HOSTNAME}
+    ...    sg=${acl_sr_security_group}
     @{ACL_SR_NET_1_VM_IPS}    ${net1_dhcp_ip} =    OpenStackOperations.Get VM IPs    @{acl_sr_net_1_vms}
     BuiltIn.Set Suite Variable    @{ACL_SR_NET_1_VM_IPS}
     BuiltIn.Should Not Contain    ${ACL_SR_NET_1_VM_IPS}    None
index 671f4aaa5ff7236cd73a02ec964358cf9bbcb42a..28caca1c9759d0a107fe6386ed89ed50d1cf49d3 100644 (file)
@@ -1,23 +1,24 @@
 *** Settings ***
-Documentation     Test suite to validate bgpvpn configuration commands in an openstack integrated environment.
-Suite Setup       OpenStackOperations.OpenStack Suite Setup
-Suite Teardown    OpenStackOperations.OpenStack Suite Teardown
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     OpenStackOperations.Get Test Teardown Debugs
-Library           OperatingSystem
-Library           RequestsLibrary
-Resource          ../../../libraries/BgpOperations.robot
-Resource          ../../../libraries/DevstackUtils.robot
-Resource          ../../../libraries/OpenStackOperations.robot
-Resource          ../../../libraries/OVSDB.robot
-Resource          ../../../libraries/SetupUtils.robot
-Resource          ../../../libraries/Tcpdump.robot
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/VpnOperations.robot
-Resource          ../../../variables/Variables.robot
-Resource          ../../../variables/netvirt/Variables.robot
+Documentation       Test suite to validate bgpvpn configuration commands in an openstack integrated environment.
+
+Library             OperatingSystem
+Library             RequestsLibrary
+Resource            ../../../libraries/BgpOperations.robot
+Resource            ../../../libraries/DevstackUtils.robot
+Resource            ../../../libraries/OpenStackOperations.robot
+Resource            ../../../libraries/OVSDB.robot
+Resource            ../../../libraries/SetupUtils.robot
+Resource            ../../../libraries/Tcpdump.robot
+Resource            ../../../libraries/Utils.robot
+Resource            ../../../libraries/VpnOperations.robot
+Resource            ../../../variables/Variables.robot
+Resource            ../../../variables/netvirt/Variables.robot
+
+Suite Setup         OpenStackOperations.OpenStack Suite Setup
+Suite Teardown      OpenStackOperations.OpenStack Suite Teardown
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       OpenStackOperations.Get Test Teardown Debugs
 
-*** Variables ***
 
 *** Test Cases ***
 Verify ODL supports VPN creation via neutron bgpvpn create command
index 1f2dedcbb47837aa4221de7a8edfe6693d620594..95f9c401cb39f787f3dfa43af8ff7050e6f977a1 100644 (file)
@@ -1,45 +1,67 @@
 *** Settings ***
-Documentation     Test suite to validate elan service functionality in ODL environment.
-...               The assumption of this suite is that the environment is already configured with the proper
-...               integration bridges and vxlan tunnels.
-Suite Setup       Suite Setup
-Suite Teardown    OpenStackOperations.OpenStack Suite Teardown
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     OpenStackOperations.Get Test Teardown Debugs
-Library           OperatingSystem
-Library           RequestsLibrary
-Library           String
-Resource          ../../../libraries/KarafKeywords.robot
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/OVSDB.robot
-Resource          ../../../libraries/OpenStackOperations.robot
-Resource          ../../../libraries/DevstackUtils.robot
-Resource          ../../../libraries/SetupUtils.robot
-Resource          ../../../variables/Variables.robot
-Resource          ../../../variables/netvirt/Variables.robot
+Documentation       Test suite to validate elan service functionality in ODL environment.
+...                 The assumption of this suite is that the environment is already configured with the proper
+...                 integration bridges and vxlan tunnels.
+
+Library             OperatingSystem
+Library             RequestsLibrary
+Library             String
+Resource            ../../../libraries/KarafKeywords.robot
+Resource            ../../../libraries/Utils.robot
+Resource            ../../../libraries/OVSDB.robot
+Resource            ../../../libraries/OpenStackOperations.robot
+Resource            ../../../libraries/DevstackUtils.robot
+Resource            ../../../libraries/SetupUtils.robot
+Resource            ../../../variables/Variables.robot
+Resource            ../../../variables/netvirt/Variables.robot
+
+Suite Setup         Suite Setup
+Suite Teardown      OpenStackOperations.OpenStack Suite Teardown
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       OpenStackOperations.Get Test Teardown Debugs
+
 
 *** Variables ***
-${SECURITY_GROUP}    elan_sg
-@{NETWORKS}       elan_net_1    elan_net_2    elan_net_3
-@{SUBNETS}        elan_sub_1    elan_sub_2    elan_sub_3
-@{SUBNET_CIDRS}    81.1.1.0/24    82.1.1.0/24    83.1.1.0/24
-@{NET_1_PORTS}    elan_net_1_port_1    elan_net_1_port_2
-@{NET_2_PORTS}    elan_net_2_port_1    elan_net_2_port_2
-@{NET_3_PORTS}    elan_net_3_port_1    elan_net_3_port_2
-@{NET_1_VMS}      elan_net_1_vm_1    elan_net_1_vm_2
-@{NET_2_VMS}      elan_net_2_vm_1    elan_net_2_vm_2
-@{NET_3_VMS}      elan_net_3_vm_1    elan_net_3_vm_2
+${SECURITY_GROUP}       elan_sg
+@{NETWORKS}             elan_net_1    elan_net_2    elan_net_3
+@{SUBNETS}              elan_sub_1    elan_sub_2    elan_sub_3
+@{SUBNET_CIDRS}         81.1.1.0/24    82.1.1.0/24    83.1.1.0/24
+@{NET_1_PORTS}          elan_net_1_port_1    elan_net_1_port_2
+@{NET_2_PORTS}          elan_net_2_port_1    elan_net_2_port_2
+@{NET_3_PORTS}          elan_net_3_port_1    elan_net_3_port_2
+@{NET_1_VMS}            elan_net_1_vm_1    elan_net_1_vm_2
+@{NET_2_VMS}            elan_net_2_vm_1    elan_net_2_vm_2
+@{NET_3_VMS}            elan_net_3_vm_1    elan_net_3_vm_2
+
 
 *** Test Cases ***
 Verify Datapath for Single ELAN with Multiple DPN
     [Documentation]    Verify Flow Table and Datapath
     ${smac_cn1} =    BuiltIn.Create List    ${NET_1_MACS}[0]
     ${smac_cn2} =    BuiltIn.Create List    ${NET_1_MACS}[1]
-    BuiltIn.Wait Until Keyword Succeeds    30s    10s    Verify Flows Are Present For ELAN Service    ${OS_CMP1_IP}    ${smac_cn1}    ${NET_1_MACS}
-    BuiltIn.Wait Until Keyword Succeeds    30s    10s    Verify Flows Are Present For ELAN Service    ${OS_CMP2_IP}    ${smac_cn2}    ${NET_1_MACS}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ping -c 3 ${NET_1_VM_IPS}[1]
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    Verify Flows Are Present For ELAN Service
+    ...    ${OS_CMP1_IP}
+    ...    ${smac_cn1}
+    ...    ${NET_1_MACS}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    Verify Flows Are Present For ELAN Service
+    ...    ${OS_CMP2_IP}
+    ...    ${smac_cn2}
+    ...    ${NET_1_MACS}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ping -c 3 ${NET_1_VM_IPS}[1]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[1]    ping -c 3 ${NET_1_VM_IPS}[0]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[1]
+    ...    ping -c 3 ${NET_1_VM_IPS}[0]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
 
 Verify Datapath After OVS Restart
@@ -52,28 +74,67 @@ Verify Datapath After OVS Restart
     END
     ${smac_cn1} =    BuiltIn.Create List    ${NET_1_MACS}[0]
     ${smac_cn2} =    BuiltIn.Create List    ${NET_1_MACS}[1]
-    BuiltIn.Wait Until Keyword Succeeds    60s    10s    Verify Flows Are Present For ELAN Service    ${OS_CMP1_IP}    ${smac_cn1}    ${NET_1_MACS}
-    BuiltIn.Wait Until Keyword Succeeds    60s    10s    Verify Flows Are Present For ELAN Service    ${OS_CMP2_IP}    ${smac_cn2}    ${NET_1_MACS}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ping -c 3 ${NET_1_VM_IPS}[1]
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    60s
+    ...    10s
+    ...    Verify Flows Are Present For ELAN Service
+    ...    ${OS_CMP1_IP}
+    ...    ${smac_cn1}
+    ...    ${NET_1_MACS}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    60s
+    ...    10s
+    ...    Verify Flows Are Present For ELAN Service
+    ...    ${OS_CMP2_IP}
+    ...    ${smac_cn2}
+    ...    ${NET_1_MACS}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ping -c 3 ${NET_1_VM_IPS}[1]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[1]    ping -c 3 ${NET_1_VM_IPS}[0]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[1]
+    ...    ping -c 3 ${NET_1_VM_IPS}[0]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
 
 Verify Datapath After Recreate VM Instance
     [Documentation]    Verify datapath after recreating Vm instance
     OpenStackOperations.Delete Vm Instance    ${NET_1_VMS[0]}
     ${smac_cn1} =    BuiltIn.Create List    ${NET_1_MACS}[0]
-    BuiltIn.Wait Until Keyword Succeeds    30s    10s    Verify Flows Are Removed For ELAN Service    ${OS_CMP1_IP}    ${smac_cn1}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    Verify Flows Are Removed For ELAN Service
+    ...    ${OS_CMP1_IP}
+    ...    ${smac_cn1}
     OpenStackOperations.Remove RSA Key From KnownHosts    ${NET_1_VM_IPS}[0]
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${NET_1_PORTS[0]}    ${NET_1_VMS[0]}    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${NET_1_PORTS[0]}
+    ...    ${NET_1_VMS[0]}
+    ...    ${OS_CMP1_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
     @{NET_1_VM_IPS}    ${NET_1_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_1_VMS}
     Builtin.Set Suite Variable    @{NET_1_VM_IPS}
     BuiltIn.Should Not Contain    ${NET_1_VM_IPS}    None
     BuiltIn.Should Not Contain    ${NET_1_DHCP_IP}    None
-    BuiltIn.Wait Until Keyword Succeeds    30s    10s    Verify Flows Are Present For ELAN Service    ${OS_CMP1_IP}    ${smac_cn1}    ${NET_1_MACS}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ping -c 3 ${NET_1_VM_IPS}[1]
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    Verify Flows Are Present For ELAN Service
+    ...    ${OS_CMP1_IP}
+    ...    ${smac_cn1}
+    ...    ${NET_1_MACS}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ping -c 3 ${NET_1_VM_IPS}[1]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[1]    ping -c 3 ${NET_1_VM_IPS}[0]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[1]
+    ...    ping -c 3 ${NET_1_VM_IPS}[0]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
 
 Delete All elan_net_1 VM And Verify Flow Table Updated
@@ -90,23 +151,57 @@ Verify Datapath for Multiple ELAN with Multiple DPN
     ${smac_cn1} =    BuiltIn.Create List    ${VM_MACAddr_elan_net_2}[0]    ${VM_MACAddr_elan_net_3}[0]
     ${smac_cn2} =    BuiltIn.Create List    ${VM_MACAddr_elan_net_2}[1]    ${VM_MACAddr_elan_net_3}[1]
     ${MAC_LIST} =    BuiltIn.Create List    @{VM_MACAddr_elan_net_2}    @{VM_MACAddr_elan_net_3}
-    BuiltIn.Wait Until Keyword Succeeds    30s    10s    Verify Flows Are Present For ELAN Service    ${OS_CMP1_IP}    ${smac_cn1}    ${MAC_LIST}
-    BuiltIn.Wait Until Keyword Succeeds    30s    10s    Verify Flows Are Present For ELAN Service    ${OS_CMP2_IP}    ${smac_cn2}    ${MAC_LIST}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${NET_2_VM_IPS}[0]    ping -c 3 ${NET_2_VM_IPS[1]}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    Verify Flows Are Present For ELAN Service
+    ...    ${OS_CMP1_IP}
+    ...    ${smac_cn1}
+    ...    ${MAC_LIST}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    Verify Flows Are Present For ELAN Service
+    ...    ${OS_CMP2_IP}
+    ...    ${smac_cn2}
+    ...    ${MAC_LIST}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${NET_2_VM_IPS}[0]
+    ...    ping -c 3 ${NET_2_VM_IPS[1]}
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[2]    ${NET_3_VM_IPS}[1]    ping -c 3 ${NET_3_VM_IPS[0]}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[2]
+    ...    ${NET_3_VM_IPS}[1]
+    ...    ping -c 3 ${NET_3_VM_IPS[0]}
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${NET_2_VM_IPS}[0]    ping -c 3 ${NET_3_VM_IPS[0]}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${NET_2_VM_IPS}[0]
+    ...    ping -c 3 ${NET_3_VM_IPS[0]}
     BuiltIn.Should Not Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[2]    ${NET_3_VM_IPS}[1]    ping -c 3 ${NET_2_VM_IPS[1]}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[2]
+    ...    ${NET_3_VM_IPS}[1]
+    ...    ping -c 3 ${NET_2_VM_IPS[1]}
     BuiltIn.Should Not Contain    ${output}    ${PING_REGEXP}
     @{NET_2_VM_IPS}    ${NET_2_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_2_VMS}
     BuiltIn.Should Not Contain    ${NET_2_VM_IPS}    None
     BuiltIn.Should Not Contain    ${NET_2_DHCP_IP}    None
-    BuiltIn.Wait Until Keyword Succeeds    30s    10s    Verify Flows Are Present For ELAN Service    ${OS_CMP1_IP}    ${smac_cn1}    ${MAC_LIST}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${NET_2_VM_IPS[1]}    ping -c 3 ${NET_2_VM_IPS}[0]
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    Verify Flows Are Present For ELAN Service
+    ...    ${OS_CMP1_IP}
+    ...    ${smac_cn1}
+    ...    ${MAC_LIST}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${NET_2_VM_IPS[1]}
+    ...    ping -c 3 ${NET_2_VM_IPS}[0]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
 
+
 *** Keywords ***
 Suite Setup
     OpenStackOperations.OpenStack Suite Setup
@@ -121,13 +216,25 @@ Create Single Elan
     OpenStackOperations.Create Port    ${NETWORKS}[0]    ${NET_1_PORTS[0]}    sg=${SECURITY_GROUP}
     OpenStackOperations.Create Port    ${NETWORKS}[0]    ${NET_1_PORTS[1]}    sg=${SECURITY_GROUP}
     BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${PORT_URL}    ${NET_1_PORTS}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${NET_1_PORTS[0]}    ${NET_1_VMS[0]}    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${NET_1_PORTS[1]}    ${NET_1_VMS[1]}    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${NET_1_PORTS[0]}
+    ...    ${NET_1_VMS[0]}
+    ...    ${OS_CMP1_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${NET_1_PORTS[1]}
+    ...    ${NET_1_VMS[1]}
+    ...    ${OS_CMP2_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
     @{NET_1_VM_IPS}    ${NET_1_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_1_VMS}
     Builtin.Set Suite Variable    @{NET_1_VM_IPS}
     BuiltIn.Should Not Contain    ${NET_1_VM_IPS}    None
     BuiltIn.Should Not Contain    ${NET_1_DHCP_IP}    None
-    @{NET_1_MACS} =    BuiltIn.Wait Until Keyword Succeeds    30s    10s    OpenStackOperations.Get Ports MacAddr    ${NET_1_PORTS}
+    @{NET_1_MACS} =    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    OpenStackOperations.Get Ports MacAddr
+    ...    ${NET_1_PORTS}
     Builtin.Set Suite Variable    @{NET_1_MACS}
 
 MultipleElan Testsuite Setup
@@ -141,10 +248,26 @@ MultipleElan Testsuite Setup
     OpenStackOperations.Create Port    ${NETWORKS}[2]    ${NET_3_PORTS[0]}    sg=${SECURITY_GROUP}
     OpenStackOperations.Create Port    ${NETWORKS}[2]    ${NET_3_PORTS[1]}    sg=${SECURITY_GROUP}
     BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${PORT_URL}    ${NET_3_PORTS}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${NET_2_PORTS[0]}    ${NET_2_VMS[0]}    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${NET_2_PORTS[1]}    ${NET_2_VMS[1]}    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${NET_3_PORTS[0]}    ${NET_3_VMS[0]}    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${NET_3_PORTS[1]}    ${NET_3_VMS[1]}    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${NET_2_PORTS[0]}
+    ...    ${NET_2_VMS[0]}
+    ...    ${OS_CMP1_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${NET_2_PORTS[1]}
+    ...    ${NET_2_VMS[1]}
+    ...    ${OS_CMP2_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${NET_3_PORTS[0]}
+    ...    ${NET_3_VMS[0]}
+    ...    ${OS_CMP1_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${NET_3_PORTS[1]}
+    ...    ${NET_3_VMS[1]}
+    ...    ${OS_CMP2_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
     @{NET_2_VM_IPS}    ${NET_2_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_2_VMS}
     @{NET_3_VM_IPS}    ${NET_3_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_3_VMS}
     Builtin.Set Suite Variable    @{NET_2_VM_IPS}
@@ -153,16 +276,26 @@ MultipleElan Testsuite Setup
     BuiltIn.Should Not Contain    ${NET_2_DHCP_IP}    None
     BuiltIn.Should Not Contain    ${NET_3_VM_IPS}    None
     BuiltIn.Should Not Contain    ${NET_3_DHCP_IP}    None
-    @{VM_MACAddr_elan_net_2}    BuiltIn.Wait Until Keyword Succeeds    30s    10s    OpenStackOperations.Get Ports MacAddr    ${NET_2_PORTS}
+    @{VM_MACAddr_elan_net_2} =    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    OpenStackOperations.Get Ports MacAddr
+    ...    ${NET_2_PORTS}
     Builtin.Set Suite Variable    @{VM_MACAddr_elan_net_2}
-    @{VM_MACAddr_elan_net_3}    BuiltIn.Wait Until Keyword Succeeds    30s    10s    OpenStackOperations.Get Ports MacAddr    ${NET_3_PORTS}
+    @{VM_MACAddr_elan_net_3} =    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    OpenStackOperations.Get Ports MacAddr
+    ...    ${NET_3_PORTS}
     Builtin.Set Suite Variable    @{VM_MACAddr_elan_net_3}
     OpenStackOperations.Show Debugs    @{NET_2_VMS}    @{NET_3_VMS}
     OpenStackOperations.Get Suite Debugs
 
 Verify Flows Are Present For ELAN Service
     [Arguments]    ${ip}    ${smacs}    ${dmacs}
-    ${flow_output} =    Utils.Run Command On Remote System And Log    ${ip}    sudo ovs-ofctl -O OpenFlow13 dump-flows ${INTEGRATION_BRIDGE}
+    ${flow_output} =    Utils.Run Command On Remote System And Log
+    ...    ${ip}
+    ...    sudo ovs-ofctl -O OpenFlow13 dump-flows ${INTEGRATION_BRIDGE}
     BuiltIn.Should Contain    ${flow_output}    table=${ELAN_SMACTABLE}
     ${smac_output} =    String.Get Lines Containing String    ${flow_output}    table=${ELAN_SMACTABLE}
     Builtin.Log    ${smac_output}
@@ -181,7 +314,9 @@ Verify Flows Are Present For ELAN Service
 
 Verify Flows Are Removed For ELAN Service
     [Arguments]    ${ip}    ${smacs}
-    ${flow_output} =    Utils.Run Command On Remote System And Log    ${ip}    sudo ovs-ofctl -O OpenFlow13 dump-flows ${INTEGRATION_BRIDGE}
+    ${flow_output} =    Utils.Run Command On Remote System And Log
+    ...    ${ip}
+    ...    sudo ovs-ofctl -O OpenFlow13 dump-flows ${INTEGRATION_BRIDGE}
     BuiltIn.Should Contain    ${flow_output}    table=${ELAN_SMACTABLE}
     ${smac_output} =    String.Get Lines Containing String    ${flow_output}    table=${ELAN_SMACTABLE}
     Builtin.Log    ${smac_output}
@@ -198,5 +333,10 @@ Verify Flows Are Removed For ELAN Service
 Verify Flows Are Removed For ELAN Service On All compute Nodes
     [Arguments]    ${smacs}
     FOR    ${ip}    IN    @{OS_CMP_IPS}
-        BuiltIn.Wait Until Keyword Succeeds    30s    10s    Verify Flows Are Removed For ELAN Service    ${ip}    ${smacs}
+        BuiltIn.Wait Until Keyword Succeeds
+        ...    30s
+        ...    10s
+        ...    Verify Flows Are Removed For ELAN Service
+        ...    ${ip}
+        ...    ${smacs}
     END
index a071d4d88f45d2c0109c3ef22287b552e185990f..41cfc07e7a1e50723ce45e8757500844c9e99b7b 100644 (file)
 *** Settings ***
-Documentation     Test Suite for elan interface and service recovery
-Suite Setup       Suite Setup
-Suite Teardown    OpenStackOperations.OpenStack Suite Teardown
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     OpenStackOperations.Get Test Teardown Debugs
-Library           Collections
-Library           String
-Resource          ../../../libraries/DevstackUtils.robot
-Resource          ../../../libraries/FlowLib.robot
-Resource          ../../../libraries/KarafKeywords.robot
-Resource          ../../../libraries/OpenStackOperations.robot
-Resource          ../../../libraries/OVSDB.robot
-Resource          ../../../libraries/SetupUtils.robot
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/VpnOperations.robot
-Resource          ../../../variables/netvirt/Variables.robot
-Resource          ../../../variables/Variables.robot
+Documentation       Test Suite for elan interface and service recovery
+
+Library             Collections
+Library             String
+Resource            ../../../libraries/DevstackUtils.robot
+Resource            ../../../libraries/FlowLib.robot
+Resource            ../../../libraries/KarafKeywords.robot
+Resource            ../../../libraries/OpenStackOperations.robot
+Resource            ../../../libraries/OVSDB.robot
+Resource            ../../../libraries/SetupUtils.robot
+Resource            ../../../libraries/Utils.robot
+Resource            ../../../libraries/VpnOperations.robot
+Resource            ../../../variables/netvirt/Variables.robot
+Resource            ../../../variables/Variables.robot
+
+Suite Setup         Suite Setup
+Suite Teardown      OpenStackOperations.OpenStack Suite Teardown
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       OpenStackOperations.Get Test Teardown Debugs
+
 
 *** Variables ***
-${REQ_NETWORK}    elansr_net_1
-${REQ_SUBNET}     elansr_sub_1
-${REQ_SUBNET_CIDR}    85.1.0.0/16
-${SECURITY_GROUP}    elansr_sg
-${SERVICE-STATUS-CLI}    srm:recover service elan
-${INTERFACE-STATUS-CLI}    srm:recover instance elan-interface
+${REQ_NETWORK}              elansr_net_1
+${REQ_SUBNET}               elansr_sub_1
+${REQ_SUBNET_CIDR}          85.1.0.0/16
+${SECURITY_GROUP}           elansr_sg
+${SERVICE-STATUS-CLI}       srm:recover service elan
+${INTERFACE-STATUS-CLI}     srm:recover instance elan-interface
 ${NUM_OF_PORTS_PER_HOST}    2
-@{NET_1_VMS}      elansr_net_1_vm_1    elansr_net_1_vm_2
-@{NET_2_VMS}      elansr_net_2_vm_3    elansr_net_2_vm_4
-@{PORT_LIST}      elansr_net_1_port_1    elansr_net_1_port_2    elansr_net_1_port_3    elansr_net_1_port_4
+@{NET_1_VMS}                elansr_net_1_vm_1    elansr_net_1_vm_2
+@{NET_2_VMS}                elansr_net_2_vm_3    elansr_net_2_vm_4
+@{PORT_LIST}                elansr_net_1_port_1    elansr_net_1_port_2    elansr_net_1_port_3    elansr_net_1_port_4
+
 
 *** Test Cases ***
 To Verify ELAN Service Recovery
     [Documentation]    To Verify Elan Service recovery by deleting and recovering multiple flows
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${ELAN_SMAC_TABLE}    True    ${EMPTY}    dl_src=${PORT_MAC_ADDR}[0]    actions=goto_table:${ELAN_DMACTABLE}
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP2_IP}    ${ELAN_SMAC_TABLE}    True    ${EMPTY}    dl_src=${PORT_MAC_ADDR}[2]    actions=goto_table:${ELAN_DMACTABLE}
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${ELAN_SMAC_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    dl_src=${PORT_MAC_ADDR}[0]
+    ...    actions=goto_table:${ELAN_DMACTABLE}
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP2_IP}
+    ...    ${ELAN_SMAC_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    dl_src=${PORT_MAC_ADDR}[2]
+    ...    actions=goto_table:${ELAN_DMACTABLE}
     ${flow_id} =    FlowLib.Get Flow Id    ${DPNID_1}    ${ELAN_SMAC_TABLE}    ${PORT_MAC_ADDR}[0]
     FlowLib.Delete Flow Via Restconf    ${DPNID_1}    ${ELAN_SMAC_TABLE}    ${flow_id}
     ${flow_id} =    FlowLib.Get Flow Id    ${DPNID_2}    ${ELAN_SMAC_TABLE}    ${PORT_MAC_ADDR}[2]
     FlowLib.Delete Flow Via Restconf    ${DPNID_2}    ${ELAN_SMAC_TABLE}    ${flow_id}
     ${mac_elements} =    BuiltIn.Create List    ${PORT_MAC_ADDR}[0]
-    Utils.Check For Elements Not At URI    ${CONFIG_NODES_API}/node/openflow:${DPNID_1}/table/${ELAN_SMAC_TABLE}    ${mac_elements}
+    Utils.Check For Elements Not At URI
+    ...    ${CONFIG_NODES_API}/node/openflow:${DPNID_1}/table/${ELAN_SMAC_TABLE}
+    ...    ${mac_elements}
     ${mac_elements} =    BuiltIn.Create List    ${PORT_MAC_ADDR}[2]
-    Utils.Check For Elements Not At URI    ${CONFIG_NODES_API}/node/openflow:${DPNID_2}/table/${ELAN_SMAC_TABLE}    ${mac_elements}
-    BuiltIn.Wait Until Keyword Succeeds    10s    5s    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${ELAN_SMAC_TABLE}    False
-    ...    ${EMPTY}    dl_src=${PORT_MAC_ADDR}[0]
-    BuiltIn.Wait Until Keyword Succeeds    10s    5s    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP2_IP}    ${ELAN_SMAC_TABLE}    False
-    ...    ${EMPTY}    dl_src=${PORT_MAC_ADDR}[2]
+    Utils.Check For Elements Not At URI
+    ...    ${CONFIG_NODES_API}/node/openflow:${DPNID_2}/table/${ELAN_SMAC_TABLE}
+    ...    ${mac_elements}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    10s
+    ...    5s
+    ...    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${ELAN_SMAC_TABLE}
+    ...    False
+    ...    ${EMPTY}
+    ...    dl_src=${PORT_MAC_ADDR}[0]
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    10s
+    ...    5s
+    ...    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP2_IP}
+    ...    ${ELAN_SMAC_TABLE}
+    ...    False
+    ...    ${EMPTY}
+    ...    dl_src=${PORT_MAC_ADDR}[2]
     KarafKeywords.Issue Command On Karaf Console    ${SERVICE-STATUS-CLI}
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${ELAN_SMAC_TABLE}    True    ${EMPTY}    dl_src=${PORT_MAC_ADDR}[0]    actions=goto_table:${ELAN_DMACTABLE}
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP2_IP}    ${ELAN_SMAC_TABLE}    True    ${EMPTY}    dl_src=${PORT_MAC_ADDR}[2]    actions=goto_table:${ELAN_DMACTABLE}
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${ELAN_SMAC_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    dl_src=${PORT_MAC_ADDR}[0]
+    ...    actions=goto_table:${ELAN_DMACTABLE}
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP2_IP}
+    ...    ${ELAN_SMAC_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    dl_src=${PORT_MAC_ADDR}[2]
+    ...    actions=goto_table:${ELAN_DMACTABLE}
     ${mac_elements} =    BuiltIn.Create List    ${PORT_MAC_ADDR}[0]
-    Utils.Check For Elements At URI    ${CONFIG_NODES_API}/node/openflow:${DPNID_1}/table/${ELAN_SMAC_TABLE}    ${mac_elements}
+    Utils.Check For Elements At URI
+    ...    ${CONFIG_NODES_API}/node/openflow:${DPNID_1}/table/${ELAN_SMAC_TABLE}
+    ...    ${mac_elements}
     ${mac_elements} =    BuiltIn.Create List    ${PORT_MAC_ADDR}[2]
-    Utils.Check For Elements At URI    ${CONFIG_NODES_API}/node/openflow:${DPNID_2}/table/${ELAN_SMAC_TABLE}    ${mac_elements}
+    Utils.Check For Elements At URI
+    ...    ${CONFIG_NODES_API}/node/openflow:${DPNID_2}/table/${ELAN_SMAC_TABLE}
+    ...    ${mac_elements}
 
 To Verify Elan Interface recovery
     [Documentation]    To Verify the Elan Interface recovery by deleting single Flow
-    BuiltIn.Wait Until Keyword Succeeds    60s    15s    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${ELAN_SMAC_TABLE}    True
-    ...    ${EMPTY}    dl_src=${PORT_MAC_ADDR}[0]    actions=goto_table:${ELAN_DMACTABLE}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    60s
+    ...    15s
+    ...    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${ELAN_SMAC_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    dl_src=${PORT_MAC_ADDR}[0]
+    ...    actions=goto_table:${ELAN_DMACTABLE}
     ${flow_id} =    FlowLib.Get Flow Id    ${DPNID_1}    ${ELAN_SMAC_TABLE}    ${PORT_MAC_ADDR}[0]
     FlowLib.Delete Flow Via Restconf    ${DPNID_1}    ${ELAN_SMAC_TABLE}    ${flow_id}
     ${mac_elements} =    BuiltIn.Create List    ${PORT_MAC_ADDR}[0]
-    Utils.Check For Elements Not At URI    ${CONFIG_NODES_API}/node/openflow:${DPNID_1}/table/${ELAN_SMAC_TABLE}    ${mac_elements}
-    BuiltIn.Wait Until Keyword Succeeds    60s    15s    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${ELAN_SMAC_TABLE}    False
-    ...    ${EMPTY}    dl_src=${PORT_MAC_ADDR}[0]
+    Utils.Check For Elements Not At URI
+    ...    ${CONFIG_NODES_API}/node/openflow:${DPNID_1}/table/${ELAN_SMAC_TABLE}
+    ...    ${mac_elements}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    60s
+    ...    15s
+    ...    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${ELAN_SMAC_TABLE}
+    ...    False
+    ...    ${EMPTY}
+    ...    dl_src=${PORT_MAC_ADDR}[0]
     ${elan_instance_id} =    Get Elan Instance ID
     ${elan_interface_id} =    Get Elan Interfaces ID    ${elan_instance_id}    ${PORT_MAC_ADDR}[0]
     Recover Elan Flows    ${elan_interface_id}
     ${mac_elements} =    BuiltIn.Create List    ${PORT_MAC_ADDR}[0]
-    BuiltIn.Wait Until Keyword Succeeds    10s    5s    Utils.Check For Elements At URI    ${CONFIG_NODES_API}/node/openflow:${DPNID_1}/table/${ELAN_SMAC_TABLE}    ${mac_elements}
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${ELAN_SMAC_TABLE}    True    ${EMPTY}    dl_src=${PORT_MAC_ADDR}[0]    actions=goto_table:${ELAN_DMACTABLE}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    10s
+    ...    5s
+    ...    Utils.Check For Elements At URI
+    ...    ${CONFIG_NODES_API}/node/openflow:${DPNID_1}/table/${ELAN_SMAC_TABLE}
+    ...    ${mac_elements}
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${ELAN_SMAC_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    dl_src=${PORT_MAC_ADDR}[0]
+    ...    actions=goto_table:${ELAN_DMACTABLE}
+
 
 *** Keywords ***
 Suite Setup
@@ -89,11 +168,19 @@ Create Neutron Ports
     BuiltIn.Set Suite Variable    @{PORT_MAC_ADDR}
 
 Create Nova VMs
-    [Arguments]    ${num_of_vms_per_dpn}
     [Documentation]    Create Vm instances on compute nodes
+    [Arguments]    ${num_of_vms_per_dpn}
     FOR    ${index}    IN RANGE    0    ${num_of_vms_per_dpn}
-        OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORT_LIST}[${index}]    ${NET_1_VMS}[${index}]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
-        OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORT_LIST}[${index + 2}]    ${NET_2_VMS}[${index}]    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
+        OpenStackOperations.Create Vm Instance With Port On Compute Node
+        ...    ${PORT_LIST}[${index}]
+        ...    ${NET_1_VMS}[${index}]
+        ...    ${OS_CMP1_HOSTNAME}
+        ...    sg=${SECURITY_GROUP}
+        OpenStackOperations.Create Vm Instance With Port On Compute Node
+        ...    ${PORT_LIST}[${index + 2}]
+        ...    ${NET_2_VMS}[${index}]
+        ...    ${OS_CMP2_HOSTNAME}
+        ...    sg=${SECURITY_GROUP}
     END
     @{NET_1_VM_IPS}    ${NET_1_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_1_VMS}
     @{NET_2_VM_IPS}    ${NET_2_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_2_VMS}
@@ -121,17 +208,17 @@ Get Elan Instance ID
     ${elan_instance} =    String.Split String    ${output}
     ${elan_instance_with_tag} =    BuiltIn.Set Variable    ${elan_instance[5]}
     ${elan_instance_id} =    String.Split String    ${elan_instance_with_tag}    /
-    [Return]    ${elan_instance_id}[0]
+    RETURN    ${elan_instance_id}[0]
 
 Get Elan Interfaces ID
-    [Arguments]    ${elan_id}    ${mac}
     [Documentation]    Getting the ELAN interface ID with corresponding mac address and returning interface ID list
+    [Arguments]    ${elan_id}    ${mac}
     ${elan_output} =    KarafKeywords.Issue Command On Karaf Console    elanmactable:show ${elan_id}
     ${interface_id} =    String.Get Regexp Matches    ${elan_output}    (${REGEX_UUID})\\s*${mac}    1
-    [Return]    ${interface_id}[0]
+    RETURN    ${interface_id}[0]
 
 Recover Elan Flows
-    [Arguments]    ${interface}
     [Documentation]    Recover ELAN flows for the given interfaces
+    [Arguments]    ${interface}
     ${recover_msg} =    KarafKeywords.Issue Command On Karaf Console    ${INTERFACE-STATUS-CLI} ${interface}
     BuiltIn.Should Contain    ${recover_msg}    RPC call to recover was successful
index 650c93744e56c6eb841c6378dab1637aedd057b9..543d93a0b4aff1210962c51a3279951fd6e17e78 100644 (file)
 *** Settings ***
-Documentation     Test suite for VM based Host Route Handling
-Suite Setup       Suite Setup
-Suite Teardown    OpenStackOperations.OpenStack Suite Teardown
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     OpenStackOperations.Get Test Teardown Debugs
-Library           Collections
-Library           RequestsLibrary
-Library           SSHLibrary
-Library           String
-Resource          ../../../libraries/DevstackUtils.robot
-Resource          ../../../libraries/OpenStackOperations.robot
-Resource          ../../../libraries/VpnOperations.robot
-Resource          ../../../variables/netvirt/Variables.robot
-Resource          ../../../variables/Variables.robot
+Documentation       Test suite for VM based Host Route Handling
+
+Library             Collections
+Library             RequestsLibrary
+Library             SSHLibrary
+Library             String
+Resource            ../../../libraries/DevstackUtils.robot
+Resource            ../../../libraries/OpenStackOperations.robot
+Resource            ../../../libraries/VpnOperations.robot
+Resource            ../../../variables/netvirt/Variables.robot
+Resource            ../../../variables/Variables.robot
+
+Suite Setup         Suite Setup
+Suite Teardown      OpenStackOperations.OpenStack Suite Teardown
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       OpenStackOperations.Get Test Teardown Debugs
+
 
 *** Variables ***
-@{NETWORKS}       host_route_network_1    host_route_network_2    host_route_network_3    host_route_network_4
-@{SUBNETS}        host_route_subnet_1    host_route_subnet_2    host_route_subnet_3    host_route_subnet_4
-@{SUBNET_CIDR}    10.10.10.0    10.20.20.0    10.30.30.0    10.40.40.0
-${PREFIX24}       /24
-${SECURITY_GROUP}    host_route_security_group
-@{PORTS}          host_route_port_1    host_route_port_2    host_route_port_3    host_route_port_4    host_route_port_5    host_route_port_6    host_route_port_7
-@{GATEWAY_PORTS}    host_route_gw_port_1    host_route_gw_port_2    host_route_gw_port_3    host_route_gw_port_4    host_route_gw_port_5    host_route_gw_port_6    host_route_gw_port_7
-${ALLOWED_ADDRESS_PAIR}    0.0.0.0/0
-${NETWORK_1_VM}    host_route_vm_1
-@{NETWORK_2_VMS}    host_route_vm_2    host_route_vm_3
-@{NETWORK_3_VMS}    host_route_vm_4    host_route_vm_5
-@{NETWORK_4_VMS}    host_route_vm_6    host_route_vm_7
-@{GATEWAY_VMS}    host_route_gw_vm_1    host_route_gw_vm_2
-${ROUTER}         host_route_router_1
-@{NON_NEUTRON_DESTINATION}    5.5.5.0    6.6.6.0
-${NON_NEUTRON_NEXTHOP}    10.10.10.250
+@{NETWORKS}
+...                             host_route_network_1
+...                             host_route_network_2
+...                             host_route_network_3
+...                             host_route_network_4
+@{SUBNETS}
+...                             host_route_subnet_1
+...                             host_route_subnet_2
+...                             host_route_subnet_3
+...                             host_route_subnet_4
+@{SUBNET_CIDR}                  10.10.10.0    10.20.20.0    10.30.30.0    10.40.40.0
+${PREFIX24}                     /24
+${SECURITY_GROUP}               host_route_security_group
+@{PORTS}
+...                             host_route_port_1
+...                             host_route_port_2
+...                             host_route_port_3
+...                             host_route_port_4
+...                             host_route_port_5
+...                             host_route_port_6
+...                             host_route_port_7
+@{GATEWAY_PORTS}
+...                             host_route_gw_port_1
+...                             host_route_gw_port_2
+...                             host_route_gw_port_3
+...                             host_route_gw_port_4
+...                             host_route_gw_port_5
+...                             host_route_gw_port_6
+...                             host_route_gw_port_7
+${ALLOWED_ADDRESS_PAIR}         0.0.0.0/0
+${NETWORK_1_VM}                 host_route_vm_1
+@{NETWORK_2_VMS}                host_route_vm_2    host_route_vm_3
+@{NETWORK_3_VMS}                host_route_vm_4    host_route_vm_5
+@{NETWORK_4_VMS}                host_route_vm_6    host_route_vm_7
+@{GATEWAY_VMS}                  host_route_gw_vm_1    host_route_gw_vm_2
+${ROUTER}                       host_route_router_1
+@{NON_NEUTRON_DESTINATION}      5.5.5.0    6.6.6.0
+${NON_NEUTRON_NEXTHOP}          10.10.10.250
+
 
 *** Test Cases ***
 Verify creation of host route via openstack subnet create option
     [Documentation]    Creating subnet host route via openstack cli and verifying in controller and openstack.
-    OpenStackOperations.Create SubNet    ${NETWORKS}[0]    ${SUBNETS}[0]    ${SUBNET_CIDR}[0]${PREFIX24}    --host-route destination=${SUBNET_CIDR}[2]${PREFIX24},gateway=${NON_NEUTRON_NEXTHOP}
-    ${SUBNET_GW_IP}    BuiltIn.Create List
+    OpenStackOperations.Create SubNet
+    ...    ${NETWORKS}[0]
+    ...    ${SUBNETS}[0]
+    ...    ${SUBNET_CIDR}[0]${PREFIX24}
+    ...    --host-route destination=${SUBNET_CIDR}[2]${PREFIX24},gateway=${NON_NEUTRON_NEXTHOP}
+    ${SUBNET_GW_IP} =    BuiltIn.Create List
     FOR    ${subnet}    IN    @{SUBNETS}
         ${ip} =    OpenStackOperations.Get Subnet Gateway Ip    ${subnet}
         Collections.Append To List    ${SUBNET_GW_IP}    ${ip}
     END
     BuiltIn.Set Suite Variable    ${SUBNET_GW_IP}
-    ${elements} =    BuiltIn.Create List    "destination":"${SUBNET_CIDR}[2]${PREFIX24}","nexthop":"${NON_NEUTRON_NEXTHOP}"
-    BuiltIn.Wait Until Keyword Succeeds    30s    5s    Utils.Check For Elements At URI    ${SUBNETWORK_URL}    ${elements}
-    Verify Hostroutes In Subnet    ${SUBNETS}[0]    destination='${SUBNET_CIDR}[2]${PREFIX24}',\\sgateway='${NON_NEUTRON_NEXTHOP}'
-    OpenStackOperations.Create Port    ${NETWORKS}[0]    ${PORTS}[0]    sg=${SECURITY_GROUP}    allowed_address_pairs=${ALLOWED_ADDRESS_PAIR}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS}[0]    ${NETWORK_1_VM}    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Port    ${NETWORKS}[0]    ${GATEWAY_PORTS}[0]    sg=${SECURITY_GROUP}    allowed_address_pairs=${ALLOWED_ADDRESS_PAIR}
-    OpenStackOperations.Create Vm Instance With Ports On Compute Node    ${GATEWAY_PORTS}[0]    ${GATEWAY_PORTS}[1]    ${GATEWAY_VMS}[0]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Ports On Compute Node    ${GATEWAY_PORTS}[4]    ${GATEWAY_PORTS}[5]    ${GATEWAY_VMS}[1]    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
+    ${elements} =    BuiltIn.Create List
+    ...    "destination":"${SUBNET_CIDR}[2]${PREFIX24}","nexthop":"${NON_NEUTRON_NEXTHOP}"
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    5s
+    ...    Utils.Check For Elements At URI
+    ...    ${SUBNETWORK_URL}
+    ...    ${elements}
+    Verify Hostroutes In Subnet
+    ...    ${SUBNETS}[0]
+    ...    destination='${SUBNET_CIDR}[2]${PREFIX24}',\\sgateway='${NON_NEUTRON_NEXTHOP}'
+    OpenStackOperations.Create Port
+    ...    ${NETWORKS}[0]
+    ...    ${PORTS}[0]
+    ...    sg=${SECURITY_GROUP}
+    ...    allowed_address_pairs=${ALLOWED_ADDRESS_PAIR}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${PORTS}[0]
+    ...    ${NETWORK_1_VM}
+    ...    ${OS_CMP1_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Port
+    ...    ${NETWORKS}[0]
+    ...    ${GATEWAY_PORTS}[0]
+    ...    sg=${SECURITY_GROUP}
+    ...    allowed_address_pairs=${ALLOWED_ADDRESS_PAIR}
+    OpenStackOperations.Create Vm Instance With Ports On Compute Node
+    ...    ${GATEWAY_PORTS}[0]
+    ...    ${GATEWAY_PORTS}[1]
+    ...    ${GATEWAY_VMS}[0]
+    ...    ${OS_CMP1_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Ports On Compute Node
+    ...    ${GATEWAY_PORTS}[4]
+    ...    ${GATEWAY_PORTS}[5]
+    ...    ${GATEWAY_VMS}[1]
+    ...    ${OS_CMP2_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
     OpenStackOperations.Poll VM Is ACTIVE    ${NETWORK_1_VM}
     BuiltIn.Wait Until Keyword Succeeds    180s    15s    OpenStackOperations.Get VM IP    true    ${NETWORK_1_VM}
-    ${NETWORK_1_VM_IPS}    ${NETWORK_1_DHCP_IP}    ${VM_COSOLE_OUTPUT} =    OpenStackOperations.Get VM IP    true    ${NETWORK_1_VM}
+    ${NETWORK_1_VM_IPS}    ${NETWORK_1_DHCP_IP}    ${VM_COSOLE_OUTPUT} =    OpenStackOperations.Get VM IP
+    ...    true
+    ...    ${NETWORK_1_VM}
     BuiltIn.Set Suite Variable    ${NETWORK_1_VM_IPS}
     @{GATEWAY_VM_IPS}    ${GATEWAY_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{GATEWAY_VMS}
     BuiltIn.Set Suite Variable    @{GATEWAY_VM_IPS}
@@ -62,40 +124,91 @@ Verify creation of host route via openstack subnet create option
 
 Verify creation of host route via openstack subnet update option
     [Documentation]    Creating host route using subnet update option and setting nexthop ip to subnet gateway ip. Verifying in controller and openstack.
-    OpenStackOperations.Update SubNet    ${SUBNETS}[0]    --host-route destination=${NON_NEUTRON_DESTINATION}[0]${PREFIX24},gateway=${SUBNET_GW_IP}[0]
-    ${elements} =    BuiltIn.Create List    "destination":"${NON_NEUTRON_DESTINATION}[0]${PREFIX24}","nexthop":"${SUBNET_GW_IP}[0]"
-    BuiltIn.Wait Until Keyword Succeeds    30s    5s    Utils.Check For Elements At URI    ${SUBNETWORK_URL}    ${elements}
-    Verify Hostroutes In Subnet    ${SUBNETS}[0]    destination='${NON_NEUTRON_DESTINATION}[0]${PREFIX24}',\\sgateway='${SUBNET_GW_IP}[0]'
+    OpenStackOperations.Update SubNet
+    ...    ${SUBNETS}[0]
+    ...    --host-route destination=${NON_NEUTRON_DESTINATION}[0]${PREFIX24},gateway=${SUBNET_GW_IP}[0]
+    ${elements} =    BuiltIn.Create List
+    ...    "destination":"${NON_NEUTRON_DESTINATION}[0]${PREFIX24}","nexthop":"${SUBNET_GW_IP}[0]"
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    5s
+    ...    Utils.Check For Elements At URI
+    ...    ${SUBNETWORK_URL}
+    ...    ${elements}
+    Verify Hostroutes In Subnet
+    ...    ${SUBNETS}[0]
+    ...    destination='${NON_NEUTRON_DESTINATION}[0]${PREFIX24}',\\sgateway='${SUBNET_GW_IP}[0]'
 
 Verify removal of host route
     [Documentation]    Removing subnet host routes via cli and verifying in controller and openstack.
-    OpenStackOperations.Unset SubNet    ${SUBNETS}[0]    --host-route destination=${NON_NEUTRON_DESTINATION}[0]${PREFIX24},gateway=${SUBNET_GW_IP}[0]
-    ${elements} =    BuiltIn.Create List    "destination":"${NON_NEUTRON_DESTINATION}[0]${PREFIX24}","nexthop":"${SUBNET_GW_IP}[0]"
-    BuiltIn.Wait Until Keyword Succeeds    30s    5s    Utils.Check For Elements Not At URI    ${SUBNETWORK_URL}    ${elements}
-    Verify No Hostroutes In Subnet    ${SUBNETS}[0]    destination='${NON_NEUTRON_DESTINATION}[0]${PREFIX24}',\\sgateway='${SUBNET_GW_IP}[0]'
+    OpenStackOperations.Unset SubNet
+    ...    ${SUBNETS}[0]
+    ...    --host-route destination=${NON_NEUTRON_DESTINATION}[0]${PREFIX24},gateway=${SUBNET_GW_IP}[0]
+    ${elements} =    BuiltIn.Create List
+    ...    "destination":"${NON_NEUTRON_DESTINATION}[0]${PREFIX24}","nexthop":"${SUBNET_GW_IP}[0]"
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    5s
+    ...    Utils.Check For Elements Not At URI
+    ...    ${SUBNETWORK_URL}
+    ...    ${elements}
+    Verify No Hostroutes In Subnet
+    ...    ${SUBNETS}[0]
+    ...    destination='${NON_NEUTRON_DESTINATION}[0]${PREFIX24}',\\sgateway='${SUBNET_GW_IP}[0]'
 
 Verify creation of host route via openstack subnet set option with VM port as next hop IP
     [Documentation]    Creating host route using subnet update option and setting nexthop to gateway vm ip and verifying in controller and openstack.
-    OpenStackOperations.Update SubNet    ${SUBNETS}[0]    --host-route destination=${SUBNET_CIDR}[2]${PREFIX24},gateway=${GATEWAY_VM_IPS}[0]
-    ${elements} =    BuiltIn.Create List    "destination":"${SUBNET_CIDR}[2]${PREFIX24}","nexthop":"${GATEWAY_VM_IPS}[0]"
-    BuiltIn.Wait Until Keyword Succeeds    30s    5s    Utils.Check For Elements At URI    ${SUBNETWORK_URL}    ${elements}
-    Verify Hostroutes In Subnet    ${SUBNETS}[0]    destination='${SUBNET_CIDR}[2]${PREFIX24}',\\sgateway='${GATEWAY_VM_IPS}[0]'
+    OpenStackOperations.Update SubNet
+    ...    ${SUBNETS}[0]
+    ...    --host-route destination=${SUBNET_CIDR}[2]${PREFIX24},gateway=${GATEWAY_VM_IPS}[0]
+    ${elements} =    BuiltIn.Create List
+    ...    "destination":"${SUBNET_CIDR}[2]${PREFIX24}","nexthop":"${GATEWAY_VM_IPS}[0]"
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    5s
+    ...    Utils.Check For Elements At URI
+    ...    ${SUBNETWORK_URL}
+    ...    ${elements}
+    Verify Hostroutes In Subnet
+    ...    ${SUBNETS}[0]
+    ...    destination='${SUBNET_CIDR}[2]${PREFIX24}',\\sgateway='${GATEWAY_VM_IPS}[0]'
 
 Verify creation of host route via openstack subnet set option with VM port as next hop IP with change in destination prefix
     [Documentation]    Creating host route using subnet update option and setting nexthop ip to gateway vm ip and changing destination prefix.
     ...    Verifying in controller and openstack.
-    OpenStackOperations.Update SubNet    ${SUBNETS}[0]    --host-route destination=${SUBNET_CIDR}[1]${PREFIX24},gateway=${GATEWAY_VM_IPS}[0]
-    ${elements} =    BuiltIn.Create List    "destination":"${SUBNET_CIDR}[1]${PREFIX24}","nexthop":"${GATEWAY_VM_IPS}[0]"
-    BuiltIn.Wait Until Keyword Succeeds    30s    5s    Utils.Check For Elements At URI    ${SUBNETWORK_URL}    ${elements}
-    Verify Hostroutes In Subnet    ${SUBNETS}[0]    destination='${SUBNET_CIDR}[1]${PREFIX24}',\\sgateway='${GATEWAY_VM_IPS}[0]'
+    OpenStackOperations.Update SubNet
+    ...    ${SUBNETS}[0]
+    ...    --host-route destination=${SUBNET_CIDR}[1]${PREFIX24},gateway=${GATEWAY_VM_IPS}[0]
+    ${elements} =    BuiltIn.Create List
+    ...    "destination":"${SUBNET_CIDR}[1]${PREFIX24}","nexthop":"${GATEWAY_VM_IPS}[0]"
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    5s
+    ...    Utils.Check For Elements At URI
+    ...    ${SUBNETWORK_URL}
+    ...    ${elements}
+    Verify Hostroutes In Subnet
+    ...    ${SUBNETS}[0]
+    ...    destination='${SUBNET_CIDR}[1]${PREFIX24}',\\sgateway='${GATEWAY_VM_IPS}[0]'
 
 Verify creation of host route via openstack subnet set option with change in next hop IP
     [Documentation]    Creating host route using subnet update option and setting nexthop ip to new gateway vm ip without changing the
     ...    destination prefix. Verifying in controller and openstack.
-    OpenStackOperations.Update SubNet    ${SUBNETS}[0]    --host-route destination=${SUBNET_CIDR}[1]${PREFIX24},gateway=${GATEWAY_VM_IPS}[1]
-    ${elements} =    BuiltIn.Create List    "destination":"${SUBNET_CIDR}[1]${PREFIX24}","nexthop":"${GATEWAY_VM_IPS}[1]"
-    BuiltIn.Wait Until Keyword Succeeds    30s    5s    Utils.Check For Elements At URI    ${SUBNETWORK_URL}    ${elements}
-    Verify Hostroutes In Subnet    ${SUBNETS}[0]    destination='${SUBNET_CIDR}[1]${PREFIX24}',\\sgateway='${GATEWAY_VM_IPS}[1]'
+    OpenStackOperations.Update SubNet
+    ...    ${SUBNETS}[0]
+    ...    --host-route destination=${SUBNET_CIDR}[1]${PREFIX24},gateway=${GATEWAY_VM_IPS}[1]
+    ${elements} =    BuiltIn.Create List
+    ...    "destination":"${SUBNET_CIDR}[1]${PREFIX24}","nexthop":"${GATEWAY_VM_IPS}[1]"
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    5s
+    ...    Utils.Check For Elements At URI
+    ...    ${SUBNETWORK_URL}
+    ...    ${elements}
+    Verify Hostroutes In Subnet
+    ...    ${SUBNETS}[0]
+    ...    destination='${SUBNET_CIDR}[1]${PREFIX24}',\\sgateway='${GATEWAY_VM_IPS}[1]'
+
 
 *** Keywords ***
 Suite Setup
@@ -107,12 +220,36 @@ Suite Setup
     END
     FOR    ${i}    IN RANGE    1    4
         OpenStackOperations.Create SubNet    ${NETWORKS}[${i}]    ${SUBNETS}[${i}]    ${SUBNET_CIDR}[${i}]${PREFIX24}
-        OpenStackOperations.Create Port    ${NETWORKS}[${i}]    ${PORTS}[${i}]    sg=${SECURITY_GROUP}    allowed_address_pairs=${ALLOWED_ADDRESS_PAIR}
-        OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS}[${i}]    ${NETWORK_${i+1}_VMS}[0]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
-        OpenStackOperations.Create Port    ${NETWORKS}[${i}]    ${PORTS}[${i+3}]    sg=${SECURITY_GROUP}    allowed_address_pairs=${ALLOWED_ADDRESS_PAIR}
-        OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS}[${i+3}]    ${NETWORK_${i+1}_VMS}[1]    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
-        OpenStackOperations.Create Port    ${NETWORKS}[${i}]    ${GATEWAY_PORTS}[${i}]    sg=${SECURITY_GROUP}    allowed_address_pairs=${ALLOWED_ADDRESS_PAIR}
-        OpenStackOperations.Create Port    ${NETWORKS}[${i}]    ${GATEWAY_PORTS}[${i+3}]    sg=${SECURITY_GROUP}    allowed_address_pairs=${ALLOWED_ADDRESS_PAIR}
+        OpenStackOperations.Create Port
+        ...    ${NETWORKS}[${i}]
+        ...    ${PORTS}[${i}]
+        ...    sg=${SECURITY_GROUP}
+        ...    allowed_address_pairs=${ALLOWED_ADDRESS_PAIR}
+        OpenStackOperations.Create Vm Instance With Port On Compute Node
+        ...    ${PORTS}[${i}]
+        ...    ${NETWORK_${i+1}_VMS}[0]
+        ...    ${OS_CMP1_HOSTNAME}
+        ...    sg=${SECURITY_GROUP}
+        OpenStackOperations.Create Port
+        ...    ${NETWORKS}[${i}]
+        ...    ${PORTS}[${i+3}]
+        ...    sg=${SECURITY_GROUP}
+        ...    allowed_address_pairs=${ALLOWED_ADDRESS_PAIR}
+        OpenStackOperations.Create Vm Instance With Port On Compute Node
+        ...    ${PORTS}[${i+3}]
+        ...    ${NETWORK_${i+1}_VMS}[1]
+        ...    ${OS_CMP2_HOSTNAME}
+        ...    sg=${SECURITY_GROUP}
+        OpenStackOperations.Create Port
+        ...    ${NETWORKS}[${i}]
+        ...    ${GATEWAY_PORTS}[${i}]
+        ...    sg=${SECURITY_GROUP}
+        ...    allowed_address_pairs=${ALLOWED_ADDRESS_PAIR}
+        OpenStackOperations.Create Port
+        ...    ${NETWORKS}[${i}]
+        ...    ${GATEWAY_PORTS}[${i+3}]
+        ...    sg=${SECURITY_GROUP}
+        ...    allowed_address_pairs=${ALLOWED_ADDRESS_PAIR}
     END
     @{NETWORK_2_VM_IPS}    ${NETWORK_2_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NETWORK_2_VMS}
     BuiltIn.Set Suite Variable    @{NETWORK_2_VM_IPS}
@@ -124,16 +261,16 @@ Suite Setup
     OpenStackOperations.Get Suite Debugs
 
 Verify Hostroutes In Subnet
-    [Arguments]    ${subnet_name}    @{elements}
     [Documentation]    Show subnet with openstack request and verifies given hostroute in subnet.
+    [Arguments]    ${subnet_name}    @{elements}
     ${output} =    OpenStackOperations.Show SubNet    ${subnet_name}
     FOR    ${element}    IN    @{elements}
         BuiltIn.Should Match Regexp    ${output}    ${element}
     END
 
 Verify No Hostroutes In Subnet
-    [Arguments]    ${subnet_name}    @{elements}
     [Documentation]    Show subnet with openstack request and verifies no given hostroute in subnet.
+    [Arguments]    ${subnet_name}    @{elements}
     ${output} =    OpenStackOperations.Show SubNet    ${subnet_name}
     FOR    ${element}    IN    @{elements}
         BuiltIn.Should Not Match Regexp    ${output}    ${element}
index 7423b61d68e6cb419ed3c5fc004e027247a73393..85f68a70f2dfbadae1374182253ca7bdd3b6d370 100644 (file)
@@ -1,60 +1,78 @@
 *** Settings ***
-Documentation     Test Suite for Gateway mac based L2L3 seggragation
-Suite Setup       Suite Setup
-Suite Teardown    OpenStackOperations.OpenStack Suite Teardown
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     OpenStackOperations.Get Test Teardown Debugs
-Library           Collections
-Library           RequestsLibrary
-Library           SSHLibrary
-Library           String
-Resource          ../../libraries/BgpOperations.robot
-Resource          ../../libraries/DevstackUtils.robot
-Resource          ../../libraries/KarafKeywords.robot
-Resource          ../../libraries/OVSDB.robot
-Resource          ../../libraries/OpenStackOperations.robot
-Resource          ../../libraries/OvsManager.robot
-Resource          ../../libraries/SetupUtils.robot
-Resource          ../../libraries/Utils.robot
-Resource          ../../libraries/VpnOperations.robot
-Resource          ../../variables/netvirt/Variables.robot
-Resource          ../../variables/Variables.robot
+Documentation       Test Suite for Gateway mac based L2L3 seggragation
+
+Library             Collections
+Library             RequestsLibrary
+Library             SSHLibrary
+Library             String
+Resource            ../../libraries/BgpOperations.robot
+Resource            ../../libraries/DevstackUtils.robot
+Resource            ../../libraries/KarafKeywords.robot
+Resource            ../../libraries/OVSDB.robot
+Resource            ../../libraries/OpenStackOperations.robot
+Resource            ../../libraries/OvsManager.robot
+Resource            ../../libraries/SetupUtils.robot
+Resource            ../../libraries/Utils.robot
+Resource            ../../libraries/VpnOperations.robot
+Resource            ../../variables/netvirt/Variables.robot
+Resource            ../../variables/Variables.robot
+
+Suite Setup         Suite Setup
+Suite Teardown      OpenStackOperations.OpenStack Suite Teardown
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       OpenStackOperations.Get Test Teardown Debugs
+
 
 *** Variables ***
-${REQ_NUM_NET}    2
-${REQ_NUM_SUBNET}    2
-${REQ_NUM_OF_PORTS}    4
-${REQ_NUM_OF_VMS_PER_DPN}    2
-${NUM_OF_PORTS_PER_HOST}    2
-${NEXTHOP}        0.0.0.0
-@{REQ_NETWORKS}    l2l3_gw_mac_arp_net1    l2l3_gw_mac_arp_net2
-@{VM_NAMES}       l2l3_gw_mac_arp_vm1    l2l3_gw_mac_arp_vm2    l2l3_gw_mac_arp_vm3    l2l3_gw_mac_arp_vm4
-@{NET_1_VMS}      l2l3_gw_mac_arp_vm1    l2l3_gw_mac_arp_vm2
-@{NET_2_VMS}      l2l3_gw_mac_arp_vm3    l2l3_gw_mac_arp_vm4
-@{PORT_LIST}      l2l3_gw_mac_arp_port1    l2l3_gw_mac_arp_port2    l2l3_gw_mac_arp_port3    l2l3_gw_mac_arp_port4
-@{REQ_SUBNETS}    l2l3_gw_mac_arp_subnet1    l2l3_gw_mac_arp_subnet2
-@{REQ_SUBNET_CIDR}    10.1.0.0/16    10.2.0.0/16
-${REQ_ROUTER}     l2l3_gw_mac_arp_rtr1
-@{DEFAULT_GATEWAY_IPS}    10.1.0.1    10.2.0.1
-${VPN_INSTANCE_ID}    4ae8cd92-48ca-49b5-94e1-b2921a261112
-${VPN_NAME}       l2l3_gw_mac_arp_vpn1
-${VPN_REST}       ${CONFIG_API}/odl-l3vpn:vpn-instance-to-vpn-id/
-${VRF_ID}         100:31
-${L3VPN_RD}       ["${VRF_ID}"]
-${SECURITY_GROUP}    l2l3_gw_mac_arp_sg
-${TABLE_NO_0}     0
-${TABLE_NO_220}    220
-${DUMP_FLOWS}     sudo ovs-ofctl -O OpenFlow13 dump-flows ${INTEGRATION_BRIDGE}
-${GROUP_FLOWS}    sudo ovs-ofctl -O OpenFlow13 dump-groups ${INTEGRATION_BRIDGE}
-${ARP_REQUEST_OPERATIONAL_CODE}    1
+${REQ_NUM_NET}                      2
+${REQ_NUM_SUBNET}                   2
+${REQ_NUM_OF_PORTS}                 4
+${REQ_NUM_OF_VMS_PER_DPN}           2
+${NUM_OF_PORTS_PER_HOST}            2
+${NEXTHOP}                          0.0.0.0
+@{REQ_NETWORKS}                     l2l3_gw_mac_arp_net1    l2l3_gw_mac_arp_net2
+@{VM_NAMES}
+...                                 l2l3_gw_mac_arp_vm1
+...                                 l2l3_gw_mac_arp_vm2
+...                                 l2l3_gw_mac_arp_vm3
+...                                 l2l3_gw_mac_arp_vm4
+@{NET_1_VMS}                        l2l3_gw_mac_arp_vm1    l2l3_gw_mac_arp_vm2
+@{NET_2_VMS}                        l2l3_gw_mac_arp_vm3    l2l3_gw_mac_arp_vm4
+@{PORT_LIST}
+...                                 l2l3_gw_mac_arp_port1
+...                                 l2l3_gw_mac_arp_port2
+...                                 l2l3_gw_mac_arp_port3
+...                                 l2l3_gw_mac_arp_port4
+@{REQ_SUBNETS}                      l2l3_gw_mac_arp_subnet1    l2l3_gw_mac_arp_subnet2
+@{REQ_SUBNET_CIDR}                  10.1.0.0/16    10.2.0.0/16
+${REQ_ROUTER}                       l2l3_gw_mac_arp_rtr1
+@{DEFAULT_GATEWAY_IPS}              10.1.0.1    10.2.0.1
+${VPN_INSTANCE_ID}                  4ae8cd92-48ca-49b5-94e1-b2921a261112
+${VPN_NAME}                         l2l3_gw_mac_arp_vpn1
+${VPN_REST}                         ${CONFIG_API}/odl-l3vpn:vpn-instance-to-vpn-id/
+${VRF_ID}                           100:31
+${L3VPN_RD}                         ["${VRF_ID}"]
+${SECURITY_GROUP}                   l2l3_gw_mac_arp_sg
+${TABLE_NO_0}                       0
+${TABLE_NO_220}                     220
+${DUMP_FLOWS}                       sudo ovs-ofctl -O OpenFlow13 dump-flows ${INTEGRATION_BRIDGE}
+${GROUP_FLOWS}                      sudo ovs-ofctl -O OpenFlow13 dump-groups ${INTEGRATION_BRIDGE}
+${ARP_REQUEST_OPERATIONAL_CODE}     1
 ${ARP_RESPONSE_OPERATIONAL_CODE}    2
-${RESUBMIT_VALUE}    actions=resubmit\(,${DISPATCHER_TABLE}\)
-${PING_COUNT_VALUE}    0
+${RESUBMIT_VALUE}                   actions=resubmit\(,${DISPATCHER_TABLE}\)
+${PING_COUNT_VALUE}                 0
+
 
 *** Test Cases ***
 Verify that table Miss entry for GWMAC table 19 points to table 17 dispatcher table
     [Documentation]    To Verify there should be an entry for table=17,in the table=19 DUMP_FLOWS
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${GWMAC_TABLE}    True    ${EMPTY}    priority=0    actions=resubmit(,17)
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${GWMAC_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    priority=0
+    ...    actions=resubmit(,17)
 
 Verify the pipeline flow from dispatcher table 17 (L3VPN) to table 19
     [Documentation]    To Verify the end to end pipeline flow from table=17 to table=19 DUMP_FLOWS
@@ -62,14 +80,37 @@ Verify the pipeline flow from dispatcher table 17 (L3VPN) to table 19
     ${subport_id_2} =    OpenStackOperations.Get Sub Port Id    ${PORT_LIST[1]}
     ${port_num_1} =    OVSDB.Get Port Number    ${subport_id_1}    ${OS_CMP1_IP}
     ${port_num_2} =    OVSDB.Get Port Number    ${subport_id_2}    ${OS_CMP1_IP}
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${TABLE_NO_0}    True    ${EMPTY}    in_port=${port_num_1}    goto_table:${DISPATCHER_TABLE}
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${TABLE_NO_0}
+    ...    True
+    ...    ${EMPTY}
+    ...    in_port=${port_num_1}
+    ...    goto_table:${DISPATCHER_TABLE}
     ${metadata} =    OVSDB.Get Port Metadata    ${OS_CMP1_IP}    ${port_num_1}
     ${vpn_id} =    VpnOperations.VPN Get L3VPN ID    ${VRF_ID}
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${DISPATCHER_TABLE}    True    |grep ${vpn_id}    ${vpn_id}    goto_table:${GWMAC_TABLE}
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${DISPATCHER_TABLE}
+    ...    True
+    ...    |grep ${vpn_id}
+    ...    ${vpn_id}
+    ...    goto_table:${GWMAC_TABLE}
     ${gw_mac_addr} =    OpenStackOperations.Get Port Mac Address From Ip    ${DEFAULT_GATEWAY_IPS[0]}
     Verify Flows Are Present For ARP    ${ARP_REQUEST_OPERATIONAL_CODE}    |grep ${metadata}
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${ARP_RESPONSE_TABLE}    True    ${EMPTY}    set_field:${gw_mac_addr}    resubmit(,220)
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${TABLE_NO_220}    True    ${EMPTY}    output:${port_num_2}
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${ARP_RESPONSE_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    set_field:${gw_mac_addr}
+    ...    resubmit(,220)
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${TABLE_NO_220}
+    ...    True
+    ...    ${EMPTY}
+    ...    output:${port_num_2}
 
 Verify that ARP requests and ARP response received on GWMAC table are punted to controller for learning ,resubmitted to table 17,sent to ARP responder
     [Documentation]    To verify the ARP Request and ARP response entry should be there after the dump_groups and dispatcher table should point to ARP responder
@@ -78,40 +119,88 @@ Verify that ARP requests and ARP response received on GWMAC table are punted to
 
 Verify that table miss entry for table 17 should not point to table 81 arp table
     [Documentation]    To Verify there should not be an entry for the arp_responder_table in table=17
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${DISPATCHER_TABLE}    False    |grep priority=0    goto_table:${ARP_RESPONSE_TABLE}
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${DISPATCHER_TABLE}
+    ...    False
+    ...    |grep priority=0
+    ...    goto_table:${ARP_RESPONSE_TABLE}
 
 Verify that Multiple GWMAC entries in GWMAC table points to FIB table 21 (L3VPN pipeline)
     [Documentation]    To Verify the one or more default gateway mac enteries on the table=19 flows that points to FIB table 21
     ${gw_mac_addr_1} =    OpenStackOperations.Get Port Mac Address From Ip    ${DEFAULT_GATEWAY_IPS[0]}
     ${gw_mac_addr_2} =    OpenStackOperations.Get Port Mac Address From Ip    ${DEFAULT_GATEWAY_IPS[1]}
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${GWMAC_TABLE}    True    ${EMPTY}    dl_dst=${gw_mac_addr_1}    actions=goto_table:${L3_TABLE}
-    ${pkt_count_before_ping} =    OvsManager.Get Packet Count From Table    ${OS_CMP1_IP}    ${INTEGRATION_BRIDGE}    table=${GWMAC_TABLE} | grep dl_dst=${gw_mac_addr_1}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${REQ_NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ping -c 8 ${NET_2_VM_IPS}[1]
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${GWMAC_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    dl_dst=${gw_mac_addr_1}
+    ...    actions=goto_table:${L3_TABLE}
+    ${pkt_count_before_ping} =    OvsManager.Get Packet Count From Table
+    ...    ${OS_CMP1_IP}
+    ...    ${INTEGRATION_BRIDGE}
+    ...    table=${GWMAC_TABLE} | grep dl_dst=${gw_mac_addr_1}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${REQ_NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ping -c 8 ${NET_2_VM_IPS}[1]
     BuiltIn.Should Contain    ${output}    64 bytes
-    ${pkt_count_after_ping} =    OvsManager.Get Packet Count From Table    ${OS_CMP1_IP}    ${INTEGRATION_BRIDGE}    table=${GWMAC_TABLE} | grep dl_dst=${gw_mac_addr_1}
+    ${pkt_count_after_ping} =    OvsManager.Get Packet Count From Table
+    ...    ${OS_CMP1_IP}
+    ...    ${INTEGRATION_BRIDGE}
+    ...    table=${GWMAC_TABLE} | grep dl_dst=${gw_mac_addr_1}
     ${pkt_diff} =    Evaluate    int(${pkt_count_after_ping})-int(${pkt_count_before_ping})
     BuiltIn.Should Be True    ${pkt_diff} > ${PING_COUNT_VALUE}
-    ${pkt_count_before_ping} =    OvsManager.Get Packet Count From Table    ${OS_CMP2_IP}    ${INTEGRATION_BRIDGE}    table=${GWMAC_TABLE} | grep dl_dst=${gw_mac_addr_1}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${REQ_NETWORKS}[0]    ${NET_2_VM_IPS}[0]    ping -c 8 ${NET_1_VM_IPS}[1]
+    ${pkt_count_before_ping} =    OvsManager.Get Packet Count From Table
+    ...    ${OS_CMP2_IP}
+    ...    ${INTEGRATION_BRIDGE}
+    ...    table=${GWMAC_TABLE} | grep dl_dst=${gw_mac_addr_1}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${REQ_NETWORKS}[0]
+    ...    ${NET_2_VM_IPS}[0]
+    ...    ping -c 8 ${NET_1_VM_IPS}[1]
     BuiltIn.Should Contain    ${output}    64 bytes
-    ${pkt_count_after_ping} =    OvsManager.Get Packet Count From Table    ${OS_CMP2_IP}    ${INTEGRATION_BRIDGE}    table=${GWMAC_TABLE} | grep dl_dst=${gw_mac_addr_1}
+    ${pkt_count_after_ping} =    OvsManager.Get Packet Count From Table
+    ...    ${OS_CMP2_IP}
+    ...    ${INTEGRATION_BRIDGE}
+    ...    table=${GWMAC_TABLE} | grep dl_dst=${gw_mac_addr_1}
     ${pkt_diff} =    Evaluate    int(${pkt_count_after_ping})-int(${pkt_count_before_ping})
     BuiltIn.Should Be True    ${pkt_diff} > ${PING_COUNT_VALUE}
 
 Verify table miss entry of ARP responder table points to drop actions
     [Documentation]    To Verify the default flow entry of table=81 drops when openflow controller connected to compute node
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${ARP_RESPONSE_TABLE}    True    |grep priority=0    actions=drop
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${ARP_RESPONSE_TABLE}
+    ...    True
+    ...    |grep priority=0
+    ...    actions=drop
 
 Verify ARP eth_type entries and actions for ARP request and ARP response are populated on GWMAC table
     [Documentation]    To Verify the entry of ARP request(arp=1) and ARP response(arp=2) in table=19
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${GWMAC_TABLE}    True    ${EMPTY}    arp_op=${ARP_REQUEST_OPERATIONAL_CODE}    ${RESUBMIT_VALUE}
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${GWMAC_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    arp_op=${ARP_REQUEST_OPERATIONAL_CODE}
+    ...    ${RESUBMIT_VALUE}
 
 Verify GWMAC entires are populated with Neutron Router MAC address per network in GWMAC table
     [Documentation]    To Verify gateway mac entires are populated with neutron router mac address for network with vpn dissociation from router
     VpnOperations.Dissociate VPN to Router    routerid=${router_id}    vpnid=${VPN_INSTANCE_ID}
     ${gw_mac_addr} =    OpenStackOperations.Get Port Mac Address From Ip    ${DEFAULT_GATEWAY_IPS[1]}
-    BuiltIn.Wait Until Keyword Succeeds    60s    15s    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${GWMAC_TABLE}    True
-    ...    ${EMPTY}    dl_dst=${gw_mac_addr}    actions=goto_table:${L3_TABLE}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    60s
+    ...    15s
+    ...    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${GWMAC_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    dl_dst=${gw_mac_addr}
+    ...    actions=goto_table:${L3_TABLE}
     ${output} =    VpnOperations.Get Fib Entries    session
     BuiltIn.Should Match Regexp    ${output}    .*${DEFAULT_GATEWAY_IPS}[1]/32.*${NEXTHOP}
 
@@ -119,12 +208,21 @@ Verify GWMAC entires are populated with port MAC address for network with vpn as
     [Documentation]    To Verify gateway mac entires are populated with port MAC address for network with vpn association to router
     VpnOperations.Associate VPN to Router    routerid=${router_id}    vpnid=${VPN_INSTANCE_ID}
     ${gw_mac_addr} =    OpenStackOperations.Get Port Mac Address From Ip    ${DEFAULT_GATEWAY_IPS[1]}
-    BuiltIn.Wait Until Keyword Succeeds    60s    15s    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${GWMAC_TABLE}    True
-    ...    ${EMPTY}    dl_dst=${gw_mac_addr}    actions=goto_table:${L3_TABLE}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    60s
+    ...    15s
+    ...    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${GWMAC_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    dl_dst=${gw_mac_addr}
+    ...    actions=goto_table:${L3_TABLE}
     ${output} =    VpnOperations.Get Fib Entries    session
     BuiltIn.Should Match Regexp    ${output}    .*${VRF_ID}.*${REQ_SUBNET_CIDR[0]}
     BuiltIn.Should Match Regexp    ${output}    .*${VRF_ID}.*${REQ_SUBNET_CIDR[1]}
 
+
 *** Keywords ***
 Suite Setup
     [Documentation]    Test Suite for Gateway mac based L2L3 seggragation
@@ -134,39 +232,63 @@ Suite Setup
     OpenStackOperations.Get Suite Debugs
 
 Create Neutron Networks
-    [Arguments]    ${NUM_OF_NETWORK}
     [Documentation]    Create required number of networks
+    [Arguments]    ${NUM_OF_NETWORK}
     FOR    ${NET}    IN    @{REQ_NETWORKS}
         OpenStackOperations.Create Network    ${NET}
     END
-    BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${NETWORK_URL}    ${REQ_NETWORKS}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    3s
+    ...    1s
+    ...    Utils.Check For Elements At URI
+    ...    ${NETWORK_URL}
+    ...    ${REQ_NETWORKS}
 
 Create Neutron Subnets
-    [Arguments]    ${NUM_OF_NETWORK}
     [Documentation]    Create required number of subnets for previously created networks
+    [Arguments]    ${NUM_OF_NETWORK}
     FOR    ${index}    IN RANGE    0    ${NUM_OF_NETWORK}
-        OpenStackOperations.Create SubNet    ${REQ_NETWORKS[${index}]}    ${REQ_SUBNETS[${index}]}    ${REQ_SUBNET_CIDR[${index}]}
+        OpenStackOperations.Create SubNet
+        ...    ${REQ_NETWORKS[${index}]}
+        ...    ${REQ_SUBNETS[${index}]}
+        ...    ${REQ_SUBNET_CIDR[${index}]}
     END
-    BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${SUBNETWORK_URL}    ${REQ_SUBNETS}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    3s
+    ...    1s
+    ...    Utils.Check For Elements At URI
+    ...    ${SUBNETWORK_URL}
+    ...    ${REQ_SUBNETS}
 
 Create Neutron Ports
     [Documentation]    Create required number of ports under previously created subnets
     FOR    ${index}    IN RANGE    0    ${NUM_OF_PORTS_PER_HOST}
         OpenStackOperations.Create Port    ${REQ_NETWORKS}[${index}]    ${PORT_LIST}[${index}]    sg=${SECURITY_GROUP}
-        OpenStackOperations.Create Port    ${REQ_NETWORKS}[${index}]    ${PORT_LIST}[${index + 2}]    sg=${SECURITY_GROUP}
+        OpenStackOperations.Create Port
+        ...    ${REQ_NETWORKS}[${index}]
+        ...    ${PORT_LIST}[${index + 2}]
+        ...    sg=${SECURITY_GROUP}
     END
     BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${PORT_URL}    ${PORT_LIST}
 
 Create Nova VMs
-    [Arguments]    ${NUM_OF_VMS_PER_DPN}
     [Documentation]    Create Vm instances on compute nodes
+    [Arguments]    ${NUM_OF_VMS_PER_DPN}
     FOR    ${index}    IN RANGE    0    ${NUM_OF_VMS_PER_DPN}
-        OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORT_LIST[${index}]}    ${VM_NAMES[${index}]}    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
+        OpenStackOperations.Create Vm Instance With Port On Compute Node
+        ...    ${PORT_LIST[${index}]}
+        ...    ${VM_NAMES[${index}]}
+        ...    ${OS_CMP1_HOSTNAME}
+        ...    sg=${SECURITY_GROUP}
     END
     ${start} =    Evaluate    ${index}+1
     ${NUM_OF_VMS_PER_DPN} =    Evaluate    ${start}+${NUM_OF_VMS_PER_DPN}
     FOR    ${index}    IN RANGE    ${start}    ${NUM_OF_VMS_PER_DPN}
-        OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORT_LIST[${index}]}    ${VM_NAMES[${index}]}    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
+        OpenStackOperations.Create Vm Instance With Port On Compute Node
+        ...    ${PORT_LIST[${index}]}
+        ...    ${VM_NAMES[${index}]}
+        ...    ${OS_CMP2_HOSTNAME}
+        ...    sg=${SECURITY_GROUP}
     END
     @{NET_1_VM_IPS}    ${NET_1_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_1_VMS}
     @{NET_2_VM_IPS}    ${NET_2_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_2_VMS}
@@ -189,7 +311,12 @@ Create Setup
     Create Nova VMs    ${REQ_NUM_OF_VMS_PER_DPN}
     ${router_id} =    OpenStackOperations.Get Router Id    ${REQ_ROUTER}
     Builtin.Set Suite Variable    ${router_id}
-    VpnOperations.VPN Create L3VPN    vpnid=${VPN_INSTANCE_ID}    name=${VPN_NAME}    rd=${L3VPN_RD}    exportrt=${L3VPN_RD}    importrt=${L3VPN_RD}
+    VpnOperations.VPN Create L3VPN
+    ...    vpnid=${VPN_INSTANCE_ID}
+    ...    name=${VPN_NAME}
+    ...    rd=${L3VPN_RD}
+    ...    exportrt=${L3VPN_RD}
+    ...    importrt=${L3VPN_RD}
     VpnOperations.Associate VPN to Router    routerid=${router_id}    vpnid=${VPN_INSTANCE_ID}
     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VPN_INSTANCE_ID}
 
@@ -205,14 +332,22 @@ Add Interfaces To Routers
     END
 
 Verify Flows Are Present For ARP
-    [Arguments]    ${arp_op_code}    ${additional_args}=${EMPTY}
     [Documentation]    Verify Flows Are Present For ARP entry
-    ${flow_output} =    Utils.Run Command On Remote System    ${OS_CMP1_IP}    ${DUMP_FLOWS} | grep table=${GWMAC_TABLE}
+    [Arguments]    ${arp_op_code}    ${additional_args}=${EMPTY}
+    ${flow_output} =    Utils.Run Command On Remote System
+    ...    ${OS_CMP1_IP}
+    ...    ${DUMP_FLOWS} | grep table=${GWMAC_TABLE}
     BuiltIn.Should Contain    ${flow_output}    arp,arp_op=${arp_op_code} ${RESUBMIT_VALUE}
-    ${flow_output} =    Utils.Run Command On Remote System    ${OS_CMP1_IP}    ${DUMP_FLOWS} | grep table=${DISPATCHER_TABLE} ${additional_args}
+    ${flow_output} =    Utils.Run Command On Remote System
+    ...    ${OS_CMP1_IP}
+    ...    ${DUMP_FLOWS} | grep table=${DISPATCHER_TABLE} ${additional_args}
     BuiltIn.Should Contain    ${flow_output}    goto_table:${ARP_CHECK_TABLE}
-    ${flow_output} =    Utils.Run Command On Remote System    ${OS_CMP1_IP}    ${DUMP_FLOWS} | grep table=${ARP_CHECK_TABLE}
+    ${flow_output} =    Utils.Run Command On Remote System
+    ...    ${OS_CMP1_IP}
+    ...    ${DUMP_FLOWS} | grep table=${ARP_CHECK_TABLE}
     @{group_id} =    String.Get Regexp Matches    ${flow_output}    group:(\\d+)    1
     BuiltIn.Should Contain    ${flow_output}    arp,arp_op=1 actions=group:${group_id[0]}
-    ${flow_output} =    Utils.Run Command On Remote System    ${OS_CMP1_IP}    ${GROUP_FLOWS} | grep group_id=${group_id[0]}
+    ${flow_output} =    Utils.Run Command On Remote System
+    ...    ${OS_CMP1_IP}
+    ...    ${GROUP_FLOWS} | grep group_id=${group_id[0]}
     BuiltIn.Should Contain    ${flow_output}    bucket=actions=resubmit(,81)
index 62650a86507f99b23538d86a096d14cd9ce10d9c..640c9ef781fb65951389de11a10f3f9ec0222a2d 100644 (file)
@@ -1,35 +1,42 @@
 *** Settings ***
-Documentation     Test Case to configure and validate default bfd configuration
-Suite Setup       Suite Setup
-Suite Teardown    OpenStackOperations.OpenStack Suite Teardown
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     OpenStackOperations.Get Test Teardown Debugs
-Resource          ../../../libraries/KarafKeywords.robot
-Resource          ../../../libraries/OpenStackOperations.robot
-Resource          ../../../libraries/SetupUtils.robot
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/VpnOperations.robot
-Resource          ../../../variables/Variables.robot
-Resource          ../../../variables/netvirt/Variables.robot
+Documentation       Test Case to configure and validate default bfd configuration
+
+Resource            ../../../libraries/KarafKeywords.robot
+Resource            ../../../libraries/OpenStackOperations.robot
+Resource            ../../../libraries/SetupUtils.robot
+Resource            ../../../libraries/Utils.robot
+Resource            ../../../libraries/VpnOperations.robot
+Resource            ../../../variables/Variables.robot
+Resource            ../../../variables/netvirt/Variables.robot
+
+Suite Setup         Suite Setup
+Suite Teardown      OpenStackOperations.OpenStack Suite Teardown
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       OpenStackOperations.Get Test Teardown Debugs
+
 
 *** Variables ***
-${BFD_CONFIG_ADD_CMD}    bfd-config add
+${BFD_CONFIG_ADD_CMD}       bfd-config add
 ${BFD_CONFIG_REMOVE_CMD}    bfd-config del
-${BFD_CACHE_CMD}    bfd-cache
-${BFD_TX}         6000
-${BFD_RX}         500
-${BFD_STATE}      yes
-${BFD_MULTIPLIER}    3
-${BFD_MULTIHOP}    yes
+${BFD_CACHE_CMD}            bfd-cache
+${BFD_TX}                   6000
+${BFD_RX}                   500
+${BFD_STATE}                yes
+${BFD_MULTIPLIER}           3
+${BFD_MULTIHOP}             yes
+
 
 *** Test Cases ***
 Verify BGP_BFD Configuration
     [Documentation]    Validate bfd configuration parameters in ODL
     KarafKeywords.Issue Command On Karaf Console    ${BFD_CONFIG_ADD_CMD}
     ${output} =    KarafKeywords.Issue Command On Karaf Console    ${BFD_CACHE_CMD}
-    BuiltIn.Should Match Regexp    ${output}    .*${BFD_STATE}\\s+.*${BFD_RX}\\s+.*${BFD_TX}\\s+.*${BFD_MULTIPLIER}\\s+.*${BFD_MULTIHOP}
+    BuiltIn.Should Match Regexp
+    ...    ${output}
+    ...    .*${BFD_STATE}\\s+.*${BFD_RX}\\s+.*${BFD_TX}\\s+.*${BFD_MULTIPLIER}\\s+.*${BFD_MULTIHOP}
     KarafKeywords.Issue Command On Karaf Console    ${BFD_CONFIG_REMOVE_CMD}
 
+
 *** Keywords ***
 Suite Setup
     [Documentation]    Setup start suite
index d85c861bd7da9c4d1af8052771762accdab424fb..8da3442ea9b8f7cdece976cd62a32d75eaef99cf 100644 (file)
@@ -1,43 +1,50 @@
 *** Settings ***
-Documentation     The objective of this testsuite is to test QBGP and ODL for multipath/ECMP support.
-...               QBGP should be capable to receive multiple ECMP paths from different DC-GWs and
-...               to export the ECMP paths to ODL instead of best path selection.
-...               ODL should be capable to receive ECMP paths and it should program the FIB with ECMP paths.
-Suite Setup       Suite Setup
-Suite Teardown    Stop Suite
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     Test Cleanup
-Resource          ../../../libraries/BgpOperations.robot
-Resource          ../../../libraries/KarafKeywords.robot
-Resource          ../../../libraries/OpenStackOperations.robot
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/VpnOperations.robot
-Resource          ../../../variables/Variables.robot
+Documentation       The objective of this testsuite is to test QBGP and ODL for multipath/ECMP support.
+...                 QBGP should be capable to receive multiple ECMP paths from different DC-GWs and
+...                 to export the ECMP paths to ODL instead of best path selection.
+...                 ODL should be capable to receive ECMP paths and it should program the FIB with ECMP paths.
+
+Resource            ../../../libraries/BgpOperations.robot
+Resource            ../../../libraries/KarafKeywords.robot
+Resource            ../../../libraries/OpenStackOperations.robot
+Resource            ../../../libraries/Utils.robot
+Resource            ../../../libraries/VpnOperations.robot
+Resource            ../../../variables/Variables.robot
+
+Suite Setup         Suite Setup
+Suite Teardown      Stop Suite
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       Test Cleanup
+
 
 *** Variables ***
-@{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]"]
-@{MAX_PATH_LIST}    1    2    3    8    64
+@{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]"]
+@{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
-@{NUM_OF_ROUTES}    1    2    3    4    5    6
-@{VPN_NAME}       multipath_vpn_1    multipath_vpn_2    multipath_vpn_3
-@{VPN_ID}         12345678-1234-1234-1234-123456789301    12345678-1234-1234-1234-123456789302    12345678-1234-1234-1234-123456789303
-@{NETWORKS}       multipath_net_1    multipath_net_2    multipath_net_3
-@{SUBNETS}        multipath_subnet_1    multipath_subnet_2    multipath_subnet_3
-@{SUBNET_CIDR}    22.1.1.0/24    33.1.1.0/24    44.1.1.0/24
-@{ROUTERS}        multipath_router_1    multipath_router_2    multipath_router_3
-${AS_ID}          100
-${BGP_CACHE}      bgp-cache
-${DIPSLAY_FIB}    fib-show
-${ENABLE}         enable
-${DISABLE}        disable
-${MAXPATH_ERROR}    error: --maxpath range[1 - 64]
-${NUM_OF_DCGW}    3
-${NUM_OF_L3VPN}    3
-${START_VALUE}    0
+@{NETWORK_IP}               10.1.1.1    20.1.1.1    30.1.1.1
+@{NUM_OF_ROUTES}            1    2    3    4    5    6
+@{VPN_NAME}                 multipath_vpn_1    multipath_vpn_2    multipath_vpn_3
+@{VPN_ID}
+...                         12345678-1234-1234-1234-123456789301
+...                         12345678-1234-1234-1234-123456789302
+...                         12345678-1234-1234-1234-123456789303
+@{NETWORKS}                 multipath_net_1    multipath_net_2    multipath_net_3
+@{SUBNETS}                  multipath_subnet_1    multipath_subnet_2    multipath_subnet_3
+@{SUBNET_CIDR}              22.1.1.0/24    33.1.1.0/24    44.1.1.0/24
+@{ROUTERS}                  multipath_router_1    multipath_router_2    multipath_router_3
+${AS_ID}                    100
+${BGP_CACHE}                bgp-cache
+${DIPSLAY_FIB}              fib-show
+${ENABLE}                   enable
+${DISABLE}                  disable
+${MAXPATH_ERROR}            error: --maxpath range[1 - 64]
+${NUM_OF_DCGW}              3
+${NUM_OF_L3VPN}             3
+${START_VALUE}              0
+
 
 *** Test Cases ***
 Verify ODL supports CLI for multipath configuration (enable/disable multipath)
@@ -52,7 +59,12 @@ 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}
@@ -61,13 +73,28 @@ Verify CSC supports CLI for max path configuration
     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}]
+        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
+    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.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]
@@ -77,11 +104,21 @@ Verify max-path error message with invalid inputs
         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
+    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.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}
@@ -91,22 +128,57 @@ Verify ODL supports dynamic configuration changes for max path value
     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]
+        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}]
+        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.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}
@@ -116,17 +188,55 @@ Verify that ECMP path gets withdrawn by QBGP after disabling multipath
     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]
     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]
+    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]
+
 
 *** Keywords ***
 Suite Setup
@@ -148,7 +258,11 @@ Test Cleanup
         BuiltIn.Run Keyword And Ignore Error    VpnOperations.VPN Delete L3VPN    vpnid=${vpn}
     END
     FOR    ${dcgw}    IN    @{DCGW_IP_LIST}
-        BuiltIn.Run Keyword And Ignore Error    BgpOperations.Delete L3VPN on DCGW    ${dcgw}    ${AS_ID}    ${VPN_NAME}
+        BuiltIn.Run Keyword And Ignore Error
+        ...    BgpOperations.Delete L3VPN on DCGW
+        ...    ${dcgw}
+        ...    ${AS_ID}
+        ...    ${VPN_NAME}
     END
 
 Create Setup
@@ -165,19 +279,40 @@ 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]
-        BuiltIn.Wait Until Keyword Succeeds    120s    20s    BgpOperations.Verify BGP Neighbor Status On Quagga    ${dcgw}    ${ODL_SYSTEM_IP}
+        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}
         OpenStackOperations.Create Network    ${network}
     END
-    BuiltIn.Wait Until Keyword Succeeds    10s    2s    Utils.Check For Elements At URI    ${NETWORK_URL}    ${NETWORKS}
+    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}]
     END
-    BuiltIn.Wait Until Keyword Succeeds    10s    2s    Utils.Check For Elements At URI    ${SUBNETWORK_URL}    ${SUBNETS}
-    ${router_id_list}    BuiltIn.Create List    @{EMPTY}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    10s
+    ...    2s
+    ...    Utils.Check For Elements At URI
+    ...    ${SUBNETWORK_URL}
+    ...    ${SUBNETS}
+    ${router_id_list} =    BuiltIn.Create List    @{EMPTY}
     FOR    ${router}    IN    @{ROUTERS}
         OpenStackOperations.Create Router    ${router}
         ${router_id} =    OpenStackOperations.Get Router Id    ${router}
@@ -192,41 +327,61 @@ Create Setup
     END
 
 Configure Multipath On ODL
-    [Arguments]    ${setting}
     [Documentation]    Enabling or disabling multipath on ODL using karaf CLI
-    BuiltIn.Run Keyword If    '${setting}' == 'enable'    KarafKeywords.Issue Command On Karaf Console    odl:multipath -f ${VPNV4_ADDR_FAMILY} ${setting}
-    ...    ELSE    KarafKeywords.Issue Command On Karaf Console    odl:multipath -f ${VPNV4_ADDR_FAMILY} ${setting}
+    [Arguments]    ${setting}
+    IF    '${setting}' == 'enable'
+        KarafKeywords.Issue Command On Karaf Console    odl:multipath -f ${VPNV4_ADDR_FAMILY} ${setting}
+    ELSE
+        KarafKeywords.Issue Command On Karaf Console    odl:multipath -f ${VPNV4_ADDR_FAMILY} ${setting}
+    END
 
 Verify Multipath
-    [Arguments]    ${setting}
     [Documentation]    verify multipath on ODL
+    [Arguments]    ${setting}
     ${output} =    KarafKeywords.Issue Command On Karaf Console    ${BGP_CACHE}
-    BuiltIn.Run Keyword If    '${setting}' == 'enable'    BuiltIn.Should Contain    ${output}    ${VPNV4_ADDR_FAMILY}
-    ...    ELSE    BuiltIn.Should Not Contain    ${output}    ${VPNV4_ADDR_FAMILY}
+    IF    '${setting}' == 'enable'
+        BuiltIn.Should Contain    ${output}    ${VPNV4_ADDR_FAMILY}
+    ELSE
+        BuiltIn.Should Not Contain    ${output}    ${VPNV4_ADDR_FAMILY}
+    END
 
 Configure Maxpath
-    [Arguments]    ${maxpath}    ${rd}
     [Documentation]    Setting maxpath on ODL using karaf CLI
+    [Arguments]    ${maxpath}    ${rd}
     ${maxpath_command} =    BuiltIn.Set Variable    multipath -r ${rd} -f ${VPNV4_ADDR_FAMILY} -n ${maxpath} setmaxpath
     ${output} =    KarafKeywords.Issue Command On Karaf Console    ${maxpath_command}
-    BuiltIn.Run Keyword If    0 < ${maxpath} < 65    BuiltIn.Should Not Contain    ${output}    ${MAXPATH_ERROR}
-    ...    ELSE    BuiltIn.Should Contain    ${output}    ${MAXPATH_ERROR}
+    IF    0 < ${maxpath} < 65
+        BuiltIn.Should Not Contain    ${output}    ${MAXPATH_ERROR}
+    ELSE
+        BuiltIn.Should Contain    ${output}    ${MAXPATH_ERROR}
+    END
 
 Verify Maxpath
-    [Arguments]    ${maxpath}    ${rd}
     [Documentation]    Verify maxpath is set properly on ODL
+    [Arguments]    ${maxpath}    ${rd}
     ${output} =    KarafKeywords.Issue Command On Karaf Console    ${BGP_CACHE}
-    BuiltIn.Run Keyword If    0 < ${maxpath} < 65    BuiltIn.Should Match Regexp    ${output}    ${rd}\\s*${maxpath}
-    ...    ELSE    BuiltIn.Should Not Match Regexp    ${output}    ${rd}\\s*${maxpath}
+    IF    0 < ${maxpath} < 65
+        BuiltIn.Should Match Regexp    ${output}    ${rd}\\s*${maxpath}
+    ELSE
+        BuiltIn.Should Not Match Regexp    ${output}    ${rd}\\s*${maxpath}
+    END
 
 Verify Routing Entry On ODL
-    [Arguments]    ${rd}    ${prefix}    ${no_of_times}
     [Documentation]    Verify routing table for specific prefix
+    [Arguments]    ${rd}    ${prefix}    ${no_of_times}
     ${output} =    KarafKeywords.Issue Command On Karaf Console    show-bgp --cmd "ip bgp vrf ${rd}"
-    BuiltIn.Should Contain X Times    ${output}    ${prefix}    ${no_of_times}    msg="Routing table does not contain ${prefix} prefix ${no_of_times} times"
+    BuiltIn.Should Contain X Times
+    ...    ${output}
+    ...    ${prefix}
+    ...    ${no_of_times}
+    ...    msg="Routing table does not contain ${prefix} prefix ${no_of_times} times"
 
 Verify FIB Entry On ODL
-    [Arguments]    ${prefix}    ${no_of_times}
     [Documentation]    Checking FIB entries with valid counts
+    [Arguments]    ${prefix}    ${no_of_times}
     ${output} =    KarafKeywords.Issue Command On Karaf Console    ${DIPSLAY_FIB}
-    BuiltIn.Should Contain X Times    ${output}    ${prefix}    ${no_of_times}    msg="FIB table does not contain ${prefix} prefix ${no_of_times} times"
+    BuiltIn.Should Contain X Times
+    ...    ${output}
+    ...    ${prefix}
+    ...    ${no_of_times}
+    ...    msg="FIB table does not contain ${prefix} prefix ${no_of_times} times"
index a8672a749d39ce3f6490a5c43fce9b6591c92063..ca7c1afa0ca6afc9799042868f6609b8a44f0475 100644 (file)
 *** Settings ***
-Documentation     Test suite to validate multiple vpnservice functionality in an openstack integrated environment.
-...               The assumption of this suite is that the environment is already configured with the proper
-...               integration bridges and vxlan tunnels.
-Suite Setup       Suite Setup
-Suite Teardown    OpenStackOperations.OpenStack Suite Teardown
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     OpenStackOperations.Get Test Teardown Debugs
-Library           OperatingSystem
-Library           RequestsLibrary
-Resource          ../../../libraries/BgpOperations.robot
-Resource          ../../../libraries/DevstackUtils.robot
-Resource          ../../../libraries/OpenStackOperations.robot
-Resource          ../../../libraries/OVSDB.robot
-Resource          ../../../libraries/SetupUtils.robot
-Resource          ../../../libraries/Tcpdump.robot
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/VpnOperations.robot
-Resource          ../../../variables/Variables.robot
-Resource          ../../../variables/netvirt/Variables.robot
+Documentation       Test suite to validate multiple vpnservice functionality in an openstack integrated environment.
+...                 The assumption of this suite is that the environment is already configured with the proper
+...                 integration bridges and vxlan tunnels.
+
+Library             OperatingSystem
+Library             RequestsLibrary
+Resource            ../../../libraries/BgpOperations.robot
+Resource            ../../../libraries/DevstackUtils.robot
+Resource            ../../../libraries/OpenStackOperations.robot
+Resource            ../../../libraries/OVSDB.robot
+Resource            ../../../libraries/SetupUtils.robot
+Resource            ../../../libraries/Tcpdump.robot
+Resource            ../../../libraries/Utils.robot
+Resource            ../../../libraries/VpnOperations.robot
+Resource            ../../../variables/Variables.robot
+Resource            ../../../variables/netvirt/Variables.robot
+
+Suite Setup         Suite Setup
+Suite Teardown      OpenStackOperations.OpenStack Suite Teardown
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       OpenStackOperations.Get Test Teardown Debugs
+
 
 *** Variables ***
 ${NUM_OF_PORTS_PER_HOST}    3
-${NUM_OF_VMS_PER_HOST}    3
-${NUM_OF_L3VPN}    3
-${AS_ID}          100
-${DCGW_SYSTEM_IP}    ${TOOLS_SYSTEM_1_IP}
-${NET}            mvpn_net_new
-${ROUTER}         mvpn_router
-${LOOPBACK_IP}    5.5.5.2/32
-${CREATE_RT}      ["2200:2","2300:2","2400:2"]
-${RT_LIST_1}      ["2200:2","2300:2"]
-${RT_LIST_2}      ["2200:2","2400:2"]
-@{SECURITY_GROUP}    mvpn_sg    mvpn_custom_sg
-@{REQ_PREFIXLENGTHS}    40.1.0.0/28    41.1.0.0/16
-@{REQ_SUBNETS_PREFIX}    mvpn_subnet10    mvpn_subnet11
-@{NETWORKS}       mvpn_net_1    mvpn_net_2    mvpn_net_3
-@{SUBNETS}        mvpn_sub_1    mvpn_sub_2    mvpn_sub_3
-@{SUBNET_CIDRS}    11.1.1.0/24    22.1.1.0/24    33.1.1.0/24
-@{PORTS_HOST1}    mvpn_net_1_port_1    mvpn_net_2_port_1    mvpn_net_3_port_1    mvpn_net_1_port1_csg    mvpn_net_2_port1_csg
-@{PORTS_HOST2}    mvpn_net_1_port_2    mvpn_net_2_port_2    mvpn_net_3_port_2    mvpn_net_2_port2_csg
-@{VMS_HOST1}      mvpn_net_1_vm_1    mvpn_net_2_vm_1    mvpn_net_3_vm_1    mvpn_net_1_vm1_csg    mvpn_net_2_vm1_csg
-@{VMS_HOST2}      mvpn_net_1_vm_2    mvpn_net_2_vm_2    mvpn_net_3_vm_2    mvpn_net_2_vm2_csg
-@{NET_1_VMS}      mvpn_net_1_vm_1    mvpn_net_1_vm_2    mvpn_net_1_vm1_csg
-@{NET_2_VMS}      mvpn_net_2_vm_1    mvpn_net_2_vm_2    mvpn_net_2_vm1_csg    mvpn_net_2_vm2_csg
-@{NET_3_VMS}      mvpn_net_3_vm_1    mvpn_net_3_vm_2
-@{VPN_INSTANCE_IDS}    4ae8cd92-48ca-49b5-94e1-b2921a261441    4ae8cd92-48ca-49b5-94e1-b2921a261442    4ae8cd92-48ca-49b5-94e1-b2921a261443
-@{VPN_NAMES}      mvpn_1    mvpn_2    mvpn_3
-@{RDS}            ["2200:2"]    ["2300:2"]    ["2400:2"]
-@{DCGW_RD}        2200:2    2300:2    2400:2
-@{LOOPBACK_IPS}    5.5.5.2    2.2.2.2    3.3.3.3
-@{LOOPBACK_NAMES}    int1    int2    int3
+${NUM_OF_VMS_PER_HOST}      3
+${NUM_OF_L3VPN}             3
+${AS_ID}                    100
+${DCGW_SYSTEM_IP}           ${TOOLS_SYSTEM_1_IP}
+${NET}                      mvpn_net_new
+${ROUTER}                   mvpn_router
+${LOOPBACK_IP}              5.5.5.2/32
+${CREATE_RT}                ["2200:2","2300:2","2400:2"]
+${RT_LIST_1}                ["2200:2","2300:2"]
+${RT_LIST_2}                ["2200:2","2400:2"]
+@{SECURITY_GROUP}           mvpn_sg    mvpn_custom_sg
+@{REQ_PREFIXLENGTHS}        40.1.0.0/28    41.1.0.0/16
+@{REQ_SUBNETS_PREFIX}       mvpn_subnet10    mvpn_subnet11
+@{NETWORKS}                 mvpn_net_1    mvpn_net_2    mvpn_net_3
+@{SUBNETS}                  mvpn_sub_1    mvpn_sub_2    mvpn_sub_3
+@{SUBNET_CIDRS}             11.1.1.0/24    22.1.1.0/24    33.1.1.0/24
+@{PORTS_HOST1}
+...                         mvpn_net_1_port_1
+...                         mvpn_net_2_port_1
+...                         mvpn_net_3_port_1
+...                         mvpn_net_1_port1_csg
+...                         mvpn_net_2_port1_csg
+@{PORTS_HOST2}              mvpn_net_1_port_2    mvpn_net_2_port_2    mvpn_net_3_port_2    mvpn_net_2_port2_csg
+@{VMS_HOST1}
+...                         mvpn_net_1_vm_1
+...                         mvpn_net_2_vm_1
+...                         mvpn_net_3_vm_1
+...                         mvpn_net_1_vm1_csg
+...                         mvpn_net_2_vm1_csg
+@{VMS_HOST2}                mvpn_net_1_vm_2    mvpn_net_2_vm_2    mvpn_net_3_vm_2    mvpn_net_2_vm2_csg
+@{NET_1_VMS}                mvpn_net_1_vm_1    mvpn_net_1_vm_2    mvpn_net_1_vm1_csg
+@{NET_2_VMS}                mvpn_net_2_vm_1    mvpn_net_2_vm_2    mvpn_net_2_vm1_csg    mvpn_net_2_vm2_csg
+@{NET_3_VMS}                mvpn_net_3_vm_1    mvpn_net_3_vm_2
+@{VPN_INSTANCE_IDS}
+...                         4ae8cd92-48ca-49b5-94e1-b2921a261441
+...                         4ae8cd92-48ca-49b5-94e1-b2921a261442
+...                         4ae8cd92-48ca-49b5-94e1-b2921a261443
+@{VPN_NAMES}                mvpn_1    mvpn_2    mvpn_3
+@{RDS}                      ["2200:2"]    ["2300:2"]    ["2400:2"]
+@{DCGW_RD}                  2200:2    2300:2    2400:2
+@{LOOPBACK_IPS}             5.5.5.2    2.2.2.2    3.3.3.3
+@{LOOPBACK_NAMES}           int1    int2    int3
+
 
 *** Test Cases ***
 Check Datapath Traffic Across Networks With L3VPN
     [Documentation]    Datapath Test Across the networks with VPN.
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ping -c 20 ${NET_1_VM_IPS}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ping -c 20 ${NET_1_VM_IPS}[1]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ping -c 20 ${NET_2_VM_IPS}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ping -c 20 ${NET_2_VM_IPS}[1]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ping -c 20 ${NET_2_VM_IPS}[0]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ping -c 20 ${NET_2_VM_IPS}[0]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[2]    ping -c 20 ${NET_2_VM_IPS}[2]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[2]
+    ...    ping -c 20 ${NET_2_VM_IPS}[2]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[2]    ping -c 20 ${NET_2_VM_IPS}[3]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[2]
+    ...    ping -c 20 ${NET_2_VM_IPS}[3]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
 
 Verify Route Update In Bgp For Routes With Default Route And Various Prefix Lengths
     [Documentation]    Create network with different prefix lengths and check the route update in bgp.
-    BuiltIn.Wait Until Keyword Succeeds    30s    10s    Utils.Check For Elements At URI    ${FIB_ENTRY_URL}    ${SUBNET_CIDRS}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    Utils.Check For Elements At URI
+    ...    ${FIB_ENTRY_URL}
+    ...    ${SUBNET_CIDRS}
     OpenStackOperations.Create Network    ${NET}
     ${length} =    BuiltIn.Get Length    ${REQ_SUBNETS_PREFIX}
     FOR    ${idx}    IN RANGE    ${length}
         OpenStackOperations.Create SubNet    ${NET}    ${REQ_SUBNETS_PREFIX}[${idx}]    ${REQ_PREFIXLENGTHS}[${idx}]
     END
-    BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${SUBNETWORK_URL}    ${REQ_SUBNETS_PREFIX}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    3s
+    ...    1s
+    ...    Utils.Check For Elements At URI
+    ...    ${SUBNETWORK_URL}
+    ...    ${REQ_SUBNETS_PREFIX}
     ${net_id} =    OpenStackOperations.Get Net Id    ${NET}
     VpnOperations.Associate L3VPN To Network    networkid=${net_id}    vpnid=${VPN_INSTANCE_IDS}[0]
     VpnOperations.Verify L3VPN On ODL    ${VPN_INSTANCE_IDS}[0]
-    BuiltIn.Wait Until Keyword Succeeds    30s    10s    Utils.Check For Elements At URI    ${FIB_ENTRY_URL}    ${REQ_PREFIXLENGTHS}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    Utils.Check For Elements At URI
+    ...    ${FIB_ENTRY_URL}
+    ...    ${REQ_PREFIXLENGTHS}
     [Teardown]    BuiltIn.Run Keywords    VpnOperations.Dissociate L3VPN From Networks    networkid=${net_id}    vpnid=${VPN_INSTANCE_IDS}[0]
     ...    AND    OpenStackOperations.Delete Network    ${NET}
     ...    AND    Post Test Cleanup    ${VPN_INSTANCE_IDS}[0]
@@ -86,62 +133,158 @@ Verification Of Route Download With Three Vpns In SE And Qbgp With One-One Expor
     [Documentation]    Check the datapath traffic with one-one export import route target with three vpns.
     Create Multiple L3VPN    ${NETWORKS}[0]    ${3}
     FOR    ${index}    IN RANGE    0    ${NUM_OF_L3VPN}
-        BgpOperations.Configure BGP And Add Neighbor On DCGW    ${DCGW_SYSTEM_IP}    ${AS_ID}    ${DCGW_SYSTEM_IP}    ${ODL_SYSTEM_IP}    ${VPN_NAMES}[${index}]
-        ...    ${DCGW_RD}[${index}]    ${LOOPBACK_IPS}[${index}]
+        BgpOperations.Configure BGP And Add Neighbor On DCGW
+        ...    ${DCGW_SYSTEM_IP}
+        ...    ${AS_ID}
+        ...    ${DCGW_SYSTEM_IP}
+        ...    ${ODL_SYSTEM_IP}
+        ...    ${VPN_NAMES}[${index}]
+        ...    ${DCGW_RD}[${index}]
+        ...    ${LOOPBACK_IPS}[${index}]
     END
     VpnOperations.Associate L3VPNs To Networks    ${VPN_INSTANCE_IDS}    ${NETWORKS}
-    ${fib_values} =    BuiltIn.Create List    @{NET_1_VM_IPS}    @{NET_2_VM_IPS}    @{NET_3_VM_IPS}    @{SUBNET_CIDRS}    @{LOOPBACK_IPS}
-    BuiltIn.Wait Until Keyword Succeeds    30s    10s    Utils.Check For Elements At URI    ${FIB_ENTRY_URL}    ${fib_values}
+    ${fib_values} =    BuiltIn.Create List
+    ...    @{NET_1_VM_IPS}
+    ...    @{NET_2_VM_IPS}
+    ...    @{NET_3_VM_IPS}
+    ...    @{SUBNET_CIDRS}
+    ...    @{LOOPBACK_IPS}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    Utils.Check For Elements At URI
+    ...    ${FIB_ENTRY_URL}
+    ...    ${fib_values}
     ${fib1_values} =    BuiltIn.Create List    ${NET_1_VM_IPS}    ${SUBNET_CIDRS}[0]    ${LOOPBACK_IPS}[0]
-    BuiltIn.Wait Until Keyword Succeeds    60s    15s    BgpOperations.Verify Routes On Quagga    ${DCGW_SYSTEM_IP}    ${DCGW_RD}[0]    ${fib1_values}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    60s
+    ...    15s
+    ...    BgpOperations.Verify Routes On Quagga
+    ...    ${DCGW_SYSTEM_IP}
+    ...    ${DCGW_RD}[0]
+    ...    ${fib1_values}
     ${fib2_values} =    BuiltIn.Create List    ${NET_2_VM_IPS}    ${SUBNET_CIDRS}[1]    ${LOOPBACK_IPS}[1]
-    BuiltIn.Wait Until Keyword Succeeds    60s    15s    BgpOperations.Verify Routes On Quagga    ${DCGW_SYSTEM_IP}    ${DCGW_RD}[1]    ${fib2_values}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    60s
+    ...    15s
+    ...    BgpOperations.Verify Routes On Quagga
+    ...    ${DCGW_SYSTEM_IP}
+    ...    ${DCGW_RD}[1]
+    ...    ${fib2_values}
     ${fib3_values} =    BuiltIn.Create List    ${NET_3_VM_IPS}    ${SUBNET_CIDRS}[2]    ${LOOPBACK_IPS}[2]
-    BuiltIn.Wait Until Keyword Succeeds    60s    15s    BgpOperations.Verify Routes On Quagga    ${DCGW_SYSTEM_IP}    ${DCGW_RD}[2]    ${fib3_values}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    60s
+    ...    15s
+    ...    BgpOperations.Verify Routes On Quagga
+    ...    ${DCGW_SYSTEM_IP}
+    ...    ${DCGW_RD}[2]
+    ...    ${fib3_values}
     VpnOperations.Verify Flows Are Present For L3VPN    ${OS_CMP1_IP}    ${NET_1_VM_IPS}
     VpnOperations.Verify Flows Are Present For L3VPN    ${OS_CMP1_IP}    ${NET_2_VM_IPS}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ping -c 3 ${NET_1_VM_IPS}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ping -c 3 ${NET_1_VM_IPS}[1]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${NET_2_VM_IPS}[0]    ping -c 3 ${NET_2_VM_IPS}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${NET_2_VM_IPS}[0]
+    ...    ping -c 3 ${NET_2_VM_IPS}[1]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ping -c 3 ${NET_2_VM_IPS}[0]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ping -c 3 ${NET_2_VM_IPS}[0]
     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ping -c 3 ${NET_2_VM_IPS}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ping -c 3 ${NET_2_VM_IPS}[1]
     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
     [Teardown]    Post Test Cleanup    @{VPN_INSTANCE_IDS}
 
 Verification Of Route Download With Three Vpns In SE And Qbgp With One-Many Export Import Route Target
     [Documentation]    Check the datapath traffic with one-many export import route target with three vpns.
-    VpnOperations.VPN Create L3VPN    vpnid=${VPN_INSTANCE_IDS}[0]    name=${VPN_NAMES}[0]    rd=${RDS}[0]    exportrt=${CREATE_RT}    importrt=${RDS}[0]
+    VpnOperations.VPN Create L3VPN
+    ...    vpnid=${VPN_INSTANCE_IDS}[0]
+    ...    name=${VPN_NAMES}[0]
+    ...    rd=${RDS}[0]
+    ...    exportrt=${CREATE_RT}
+    ...    importrt=${RDS}[0]
     FOR    ${index}    IN RANGE    1    ${NUM_OF_L3VPN}
-        VpnOperations.VPN Create L3VPN    vpnid=${VPN_INSTANCE_IDS}[${index}]    name=${VPN_NAMES}[${index}]    rd=${RDS}[${index}]    exportrt=${RDS}[${index}]    importrt=${RT_LIST_${index}}
+        VpnOperations.VPN Create L3VPN
+        ...    vpnid=${VPN_INSTANCE_IDS}[${index}]
+        ...    name=${VPN_NAMES}[${index}]
+        ...    rd=${RDS}[${index}]
+        ...    exportrt=${RDS}[${index}]
+        ...    importrt=${RT_LIST_${index}}
     END
     FOR    ${index}    IN RANGE    0    ${NUM_OF_L3VPN}
-        BgpOperations.Configure BGP And Add Neighbor On DCGW    ${DCGW_SYSTEM_IP}    ${AS_ID}    ${DCGW_SYSTEM_IP}    ${ODL_SYSTEM_IP}    ${VPN_NAMES}[${index}]
-        ...    ${DCGW_RD}[${index}]    ${LOOPBACK_IPS}[${index}]
+        BgpOperations.Configure BGP And Add Neighbor On DCGW
+        ...    ${DCGW_SYSTEM_IP}
+        ...    ${AS_ID}
+        ...    ${DCGW_SYSTEM_IP}
+        ...    ${ODL_SYSTEM_IP}
+        ...    ${VPN_NAMES}[${index}]
+        ...    ${DCGW_RD}[${index}]
+        ...    ${LOOPBACK_IPS}[${index}]
     END
     ${networks} =    BuiltIn.Create List    ${NETWORKS}[0]    ${NETWORKS}[1]
     VpnOperations.Associate L3VPNs To Networks    ${VPN_INSTANCE_IDS}    ${networks}
-    ${fib_values} =    BuiltIn.Create List    ${NET_1_VM_IPS}    ${NET_2_VM_IPS}    ${SUBNET_CIDRS}[0]    ${SUBNET_CIDRS}[1]
-    BuiltIn.Wait Until Keyword Succeeds    30s    10s    Utils.Check For Elements At URI    ${FIB_ENTRY_URL}    ${fib_values}
+    ${fib_values} =    BuiltIn.Create List
+    ...    ${NET_1_VM_IPS}
+    ...    ${NET_2_VM_IPS}
+    ...    ${SUBNET_CIDRS}[0]
+    ...    ${SUBNET_CIDRS}[1]
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    Utils.Check For Elements At URI
+    ...    ${FIB_ENTRY_URL}
+    ...    ${fib_values}
     VpnOperations.Verify Flows Are Present For L3VPN    ${OS_CMP1_IP}    ${NET_1_VM_IPS}
     VpnOperations.Verify Flows Are Present For L3VPN    ${OS_CMP1_IP}    ${NET_2_VM_IPS}
     [Teardown]    Post Test Cleanup    @{VPN_INSTANCE_IDS}
 
 Verification Of Route Download With Three Vpns In SE And Qbgp With Many-One Export Import Route Target
     [Documentation]    Check the datapath traffic with many-one export import route target with three vpns.
-    VpnOperations.VPN Create L3VPN    vpnid=${VPN_INSTANCE_IDS}[0]    name=${VPN_NAMES}[0]    rd=${RDS}[0]    exportrt=${RDS}[0]    importrt=${CREATE_RT}
+    VpnOperations.VPN Create L3VPN
+    ...    vpnid=${VPN_INSTANCE_IDS}[0]
+    ...    name=${VPN_NAMES}[0]
+    ...    rd=${RDS}[0]
+    ...    exportrt=${RDS}[0]
+    ...    importrt=${CREATE_RT}
     FOR    ${index}    IN RANGE    1    ${NUM_OF_L3VPN}
-        VpnOperations.VPN Create L3VPN    vpnid=${VPN_INSTANCE_IDS}[${index}]    name=${VPN_NAMES}[${index}]    rd=${RDS}[${index}]    exportrt=${RT_LIST_${index}}    importrt=${RDS}[${index}]
+        VpnOperations.VPN Create L3VPN
+        ...    vpnid=${VPN_INSTANCE_IDS}[${index}]
+        ...    name=${VPN_NAMES}[${index}]
+        ...    rd=${RDS}[${index}]
+        ...    exportrt=${RT_LIST_${index}}
+        ...    importrt=${RDS}[${index}]
     END
     FOR    ${index}    IN RANGE    0    ${NUM_OF_L3VPN}
-        BgpOperations.Configure BGP And Add Neighbor On DCGW    ${DCGW_SYSTEM_IP}    ${AS_ID}    ${DCGW_SYSTEM_IP}    ${ODL_SYSTEM_IP}    ${VPN_NAMES}[${index}]
-        ...    ${DCGW_RD}[${index}]    ${LOOPBACK_IPS}[${index}]
+        BgpOperations.Configure BGP And Add Neighbor On DCGW
+        ...    ${DCGW_SYSTEM_IP}
+        ...    ${AS_ID}
+        ...    ${DCGW_SYSTEM_IP}
+        ...    ${ODL_SYSTEM_IP}
+        ...    ${VPN_NAMES}[${index}]
+        ...    ${DCGW_RD}[${index}]
+        ...    ${LOOPBACK_IPS}[${index}]
     END
     ${networks} =    BuiltIn.Create List    ${NETWORKS}[0]    ${NETWORKS}[1]
     VpnOperations.Associate L3VPNs To Networks    ${VPN_INSTANCE_IDS}    ${networks}
-    ${fib_values} =    BuiltIn.Create List    ${NET_1_VM_IPS}    ${NET_2_VM_IPS}    ${SUBNET_CIDRS}[0]    ${SUBNET_CIDRS}[1]
-    BuiltIn.Wait Until Keyword Succeeds    30s    10s    Utils.Check For Elements At URI    ${FIB_ENTRY_URL}    ${fib_values}
+    ${fib_values} =    BuiltIn.Create List
+    ...    ${NET_1_VM_IPS}
+    ...    ${NET_2_VM_IPS}
+    ...    ${SUBNET_CIDRS}[0]
+    ...    ${SUBNET_CIDRS}[1]
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    Utils.Check For Elements At URI
+    ...    ${FIB_ENTRY_URL}
+    ...    ${fib_values}
     VpnOperations.Verify Flows Are Present For L3VPN    ${OS_CMP1_IP}    ${NET_1_VM_IPS}
     VpnOperations.Verify Flows Are Present For L3VPN    ${OS_CMP1_IP}    ${NET_2_VM_IPS}
     [Teardown]    Post Test Cleanup    @{VPN_INSTANCE_IDS}
@@ -149,19 +292,40 @@ Verification Of Route Download With Three Vpns In SE And Qbgp With Many-One Expo
 Verification Of Route Download With Three Vpns In SE And Qbgp With Many-Many Export Import Route Target
     [Documentation]    Check the datapath traffic with many-many export import route target with three vpns.
     FOR    ${index}    IN RANGE    0    ${NUM_OF_L3VPN}
-        VpnOperations.VPN Create L3VPN    vpnid=${VPN_INSTANCE_IDS}[${index}]    name=${VPN_NAMES}[${index}]    rd=${RDS}[${index}]    exportrt=${CREATE_RT}    importrt=${CREATE_RT}
+        VpnOperations.VPN Create L3VPN
+        ...    vpnid=${VPN_INSTANCE_IDS}[${index}]
+        ...    name=${VPN_NAMES}[${index}]
+        ...    rd=${RDS}[${index}]
+        ...    exportrt=${CREATE_RT}
+        ...    importrt=${CREATE_RT}
     END
     FOR    ${index}    IN RANGE    0    ${NUM_OF_L3VPN}
-        BgpOperations.Configure BGP And Add Neighbor On DCGW    ${DCGW_SYSTEM_IP}    ${AS_ID}    ${DCGW_SYSTEM_IP}    ${ODL_SYSTEM_IP}    ${VPN_NAMES}[${index}]
-        ...    ${DCGW_RD}[${index}]    ${LOOPBACK_IPS}[${index}]
+        BgpOperations.Configure BGP And Add Neighbor On DCGW
+        ...    ${DCGW_SYSTEM_IP}
+        ...    ${AS_ID}
+        ...    ${DCGW_SYSTEM_IP}
+        ...    ${ODL_SYSTEM_IP}
+        ...    ${VPN_NAMES}[${index}]
+        ...    ${DCGW_RD}[${index}]
+        ...    ${LOOPBACK_IPS}[${index}]
     END
     ${networks} =    BuiltIn.Create List    ${NETWORKS}[0]    ${NETWORKS}[1]
     VpnOperations.Associate L3VPNs To Networks    ${VPN_INSTANCE_IDS}    ${networks}
-    ${fib_values} =    BuiltIn.Create List    ${NET_1_VM_IPS}    ${NET_2_VM_IPS}    ${SUBNET_CIDRS}[0]    ${SUBNET_CIDRS}[1]
-    BuiltIn.Wait Until Keyword Succeeds    30s    10s    Utils.Check For Elements At URI    ${FIB_ENTRY_URL}    ${fib_values}
+    ${fib_values} =    BuiltIn.Create List
+    ...    ${NET_1_VM_IPS}
+    ...    ${NET_2_VM_IPS}
+    ...    ${SUBNET_CIDRS}[0]
+    ...    ${SUBNET_CIDRS}[1]
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    Utils.Check For Elements At URI
+    ...    ${FIB_ENTRY_URL}
+    ...    ${fib_values}
     VpnOperations.Verify Flows Are Present For L3VPN    ${OS_CMP1_IP}    ${NET_1_VM_IPS}
     VpnOperations.Verify Flows Are Present For L3VPN    ${OS_CMP1_IP}    ${NET_2_VM_IPS}
 
+
 *** Keywords ***
 Suite Setup
     [Documentation]    Basic setup.
@@ -180,7 +344,12 @@ Create Setup
     Security Group Rule with Remote SG    ${SECURITY_GROUP[1]}
     Create Neutron Ports
     Create Nova VMs
-    VpnOperations.VPN Create L3VPN    vpnid=${VPN_INSTANCE_IDS}[0]    name=${VPN_NAMES}[0]    rd=${RDS}[0]    exportrt=${RDS}[0]    importrt=${RDS}[0]
+    VpnOperations.VPN Create L3VPN
+    ...    vpnid=${VPN_INSTANCE_IDS}[0]
+    ...    name=${VPN_NAMES}[0]
+    ...    rd=${RDS}[0]
+    ...    exportrt=${RDS}[0]
+    ...    importrt=${RDS}[0]
     VpnOperations.Verify L3VPN On ODL    ${VPN_INSTANCE_IDS}[0]
     FOR    ${network}    IN    @{NETWORKS}
         ${network_id} =    OpenStackOperations.Get Net Id    ${network}
@@ -203,7 +372,12 @@ Create Neutron Subnets
     FOR    ${index}    IN RANGE    0    ${num_of_networks}
         OpenStackOperations.Create SubNet    ${NETWORKS}[${index}]    ${SUBNETS}[${index}]    ${SUBNET_CIDRS}[${index}]
     END
-    BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${SUBNETWORK_URL}    ${SUBNETS}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    3s
+    ...    1s
+    ...    Utils.Check For Elements At URI
+    ...    ${SUBNETWORK_URL}
+    ...    ${SUBNETS}
 
 Create Neutron Ports
     [Documentation]    Create required number of ports under previously created subnets
@@ -217,19 +391,44 @@ Create Neutron Ports
     OpenStackOperations.Create Port    ${NETWORKS}[1]    ${PORTS_HOST1}[4]    ${SECURITY_GROUP}[1]
     OpenStackOperations.Create Port    ${NETWORKS}[1]    ${PORTS_HOST2}[3]    ${SECURITY_GROUP}[1]
     ${PORTS} =    BuiltIn.Create List    @{PORTS_HOST1}    @{PORTS_HOST2}
-    BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${CONFIG_API}/neutron:neutron/ports/    ${PORTS}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    3s
+    ...    1s
+    ...    Utils.Check For Elements At URI
+    ...    ${CONFIG_API}/neutron:neutron/ports/
+    ...    ${PORTS}
 
 Create Nova VMs
     [Documentation]    Create Vm instances on compute nodes
     FOR    ${index}    IN RANGE    0    ${NUM_OF_VMS_PER_HOST}
-        OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS_HOST1}[${index}]    ${VMS_HOST1}[${index}]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}[0]
+        OpenStackOperations.Create Vm Instance With Port On Compute Node
+        ...    ${PORTS_HOST1}[${index}]
+        ...    ${VMS_HOST1}[${index}]
+        ...    ${OS_CMP1_HOSTNAME}
+        ...    sg=${SECURITY_GROUP}[0]
     END
     FOR    ${index}    IN RANGE    0    ${NUM_OF_VMS_PER_HOST}
-        OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS_HOST2}[${index}]    ${VMS_HOST2}[${index}]    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}[0]
+        OpenStackOperations.Create Vm Instance With Port On Compute Node
+        ...    ${PORTS_HOST2}[${index}]
+        ...    ${VMS_HOST2}[${index}]
+        ...    ${OS_CMP2_HOSTNAME}
+        ...    sg=${SECURITY_GROUP}[0]
     END
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS_HOST1}[3]    ${VMS_HOST1}[3]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}[1]
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS_HOST1}[4]    ${VMS_HOST1}[4]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}[1]
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS_HOST2}[3]    ${VMS_HOST2}[3]    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}[1]
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${PORTS_HOST1}[3]
+    ...    ${VMS_HOST1}[3]
+    ...    ${OS_CMP1_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}[1]
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${PORTS_HOST1}[4]
+    ...    ${VMS_HOST1}[4]
+    ...    ${OS_CMP1_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}[1]
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${PORTS_HOST2}[3]
+    ...    ${VMS_HOST2}[3]
+    ...    ${OS_CMP2_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}[1]
     @{NET_1_VM_IPS}    ${NET_1_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_1_VMS}
     @{NET_2_VM_IPS}    ${NET_2_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_2_VMS}
     @{NET_3_VM_IPS}    ${NET_3_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_3_VMS}
@@ -259,34 +458,84 @@ Create BGP Config On ODL
 
 Create BGP Config On DCGW
     [Documentation]    Configure BGP on DCGW
-    BgpOperations.Configure BGP And Add Neighbor On DCGW    ${DCGW_SYSTEM_IP}    ${AS_ID}    ${DCGW_SYSTEM_IP}    ${ODL_SYSTEM_IP}    ${VPN_NAMES}[0]    ${DCGW_RD}[0]
+    BgpOperations.Configure BGP And Add Neighbor On DCGW
+    ...    ${DCGW_SYSTEM_IP}
+    ...    ${AS_ID}
+    ...    ${DCGW_SYSTEM_IP}
+    ...    ${ODL_SYSTEM_IP}
+    ...    ${VPN_NAMES}[0]
+    ...    ${DCGW_RD}[0]
     ...    ${LOOPBACK_IPS}[0]
     ${output} =    BgpOperations.Execute Show Command On Quagga    ${DCGW_SYSTEM_IP}    ${RUN_CONFIG}
     BuiltIn.Should Contain    ${output}    ${ODL_SYSTEM_IP}
-    ${output} =    BuiltIn.Wait Until Keyword Succeeds    180s    10s    BgpOperations.Verify BGP Neighbor Status On Quagga    ${DCGW_SYSTEM_IP}    ${ODL_SYSTEM_IP}
+    ${output} =    BuiltIn.Wait Until Keyword Succeeds
+    ...    180s
+    ...    10s
+    ...    BgpOperations.Verify BGP Neighbor Status On Quagga
+    ...    ${DCGW_SYSTEM_IP}
+    ...    ${ODL_SYSTEM_IP}
 
 Create Multiple L3VPN
-    [Arguments]    ${network}    ${num_of_l3vpns}
     [Documentation]    Creates multiple L3VPNs and then verify the same
+    [Arguments]    ${network}    ${num_of_l3vpns}
     FOR    ${index}    IN RANGE    0    ${num_of_l3vpns}
-        BuiltIn.Wait Until Keyword Succeeds    40s    10s    VpnOperations.VPN Create L3VPN    vpnid=${VPN_INSTANCE_IDS}[${index}]    name=${VPN_NAMES}[${index}]
-        ...    rd=${RDS}[${index}]    exportrt=${RDS}[${index}]    importrt=${RDS}[${index}]
+        BuiltIn.Wait Until Keyword Succeeds
+        ...    40s
+        ...    10s
+        ...    VpnOperations.VPN Create L3VPN
+        ...    vpnid=${VPN_INSTANCE_IDS}[${index}]
+        ...    name=${VPN_NAMES}[${index}]
+        ...    rd=${RDS}[${index}]
+        ...    exportrt=${RDS}[${index}]
+        ...    importrt=${RDS}[${index}]
         VpnOperations.Verify L3VPN On ODL    ${VPN_INSTANCE_IDS}[${index}]
     END
 
 Security Group Rule with Remote SG
-    [Arguments]    ${sec_grp}
     [Documentation]    Allow all TCP/UDP/ICMP packets for this suite
+    [Arguments]    ${sec_grp}
     OpenStackOperations.Neutron Security Group Create    ${sec_grp}
-    OpenStackOperations.Neutron Security Group Rule Create    ${sec_grp}    direction=ingress    port_range_max=65535    port_range_min=1    protocol=tcp    remote-group-id=${sec_grp}
-    OpenStackOperations.Neutron Security Group Rule Create    ${sec_grp}    direction=egress    port_range_max=65535    port_range_min=1    protocol=tcp    remote-group-id=${sec_grp}
-    OpenStackOperations.Neutron Security Group Rule Create    ${sec_grp}    direction=ingress    protocol=icmp    remote-group-id=${sec_grp}
-    OpenStackOperations.Neutron Security Group Rule Create    ${sec_grp}    direction=egress    protocol=icmp    remote-group-id=${sec_grp}
-    OpenStackOperations.Neutron Security Group Rule Create    ${sec_grp}    direction=ingress    port_range_max=65535    port_range_min=1    protocol=udp    remote_group_id=${sec_grp}
-    OpenStackOperations.Neutron Security Group Rule Create    ${sec_grp}    direction=egress    port_range_max=65535    port_range_min=1    protocol=udp    remote-group-id=${sec_grp}
+    OpenStackOperations.Neutron Security Group Rule Create
+    ...    ${sec_grp}
+    ...    direction=ingress
+    ...    port_range_max=65535
+    ...    port_range_min=1
+    ...    protocol=tcp
+    ...    remote-group-id=${sec_grp}
+    OpenStackOperations.Neutron Security Group Rule Create
+    ...    ${sec_grp}
+    ...    direction=egress
+    ...    port_range_max=65535
+    ...    port_range_min=1
+    ...    protocol=tcp
+    ...    remote-group-id=${sec_grp}
+    OpenStackOperations.Neutron Security Group Rule Create
+    ...    ${sec_grp}
+    ...    direction=ingress
+    ...    protocol=icmp
+    ...    remote-group-id=${sec_grp}
+    OpenStackOperations.Neutron Security Group Rule Create
+    ...    ${sec_grp}
+    ...    direction=egress
+    ...    protocol=icmp
+    ...    remote-group-id=${sec_grp}
+    OpenStackOperations.Neutron Security Group Rule Create
+    ...    ${sec_grp}
+    ...    direction=ingress
+    ...    port_range_max=65535
+    ...    port_range_min=1
+    ...    protocol=udp
+    ...    remote_group_id=${sec_grp}
+    OpenStackOperations.Neutron Security Group Rule Create
+    ...    ${sec_grp}
+    ...    direction=egress
+    ...    port_range_max=65535
+    ...    port_range_min=1
+    ...    protocol=udp
+    ...    remote-group-id=${sec_grp}
 
 Post Test Cleanup
-    [Arguments]    @{vpn_ids}
     [Documentation]    Test Case Cleanup.
+    [Arguments]    @{vpn_ids}
     VpnOperations.Delete Multiple L3VPNs    @{vpn_ids}
     BgpOperations.Delete BGP Config On Quagga    ${DCGW_SYSTEM_IP}    ${AS_ID}
index 39619d864e7397b6f05990d7e313de83a7b68559..81c5477159c017aab562b9b9e10d76b595d53097 100644 (file)
@@ -1,59 +1,85 @@
 *** Settings ***
-Documentation     Test suite for OpenFlow punt path protection for subnet route, SNAT, ARP and GARP
-Suite Setup       Suite Setup
-Suite Teardown    OpenStackOperations.OpenStack Suite Teardown
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     OpenStackOperations.Get Test Teardown Debugs
-Resource          ../../../libraries/ClusterManagement.robot
-Resource          ../../../libraries/OpenStackOperations.robot
-Resource          ../../../libraries/OvsManager.robot
-Resource          ../../../libraries/OVSDB.robot
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/VpnOperations.robot
-Resource          ../../../variables/Variables.robot
-Resource          ../../../variables/netvirt/Variables.robot
+Documentation       Test suite for OpenFlow punt path protection for subnet route, SNAT, ARP and GARP
+
+Resource            ../../../libraries/ClusterManagement.robot
+Resource            ../../../libraries/OpenStackOperations.robot
+Resource            ../../../libraries/OvsManager.robot
+Resource            ../../../libraries/OVSDB.robot
+Resource            ../../../libraries/Utils.robot
+Resource            ../../../libraries/VpnOperations.robot
+Resource            ../../../variables/Variables.robot
+Resource            ../../../variables/netvirt/Variables.robot
+
+Suite Setup         Suite Setup
+Suite Teardown      OpenStackOperations.OpenStack Suite Teardown
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       OpenStackOperations.Get Test Teardown Debugs
+
 
 *** Variables ***
-@{NETWORKS}       of_punt_net_1    of_punt_net_2    of_punt_net_3
-${EXT_NETWORKS}    of_punt_ext_net_1
-@{PORT_LIST}      of_punt_net1_port_1    of_punt_net1_port_2    of_punt_net2_port_1    of_punt_net2_port_2    of_punt_net3_port_1    of_punt_net3_port_2
-@{EXTRA_PORTS}    of_punt_net_1_port_3    of_punt_net_2_port_3
-@{EXTRA_VMS}      of_punt_net_1_vm_3    of_punt_net_2_vm_3
-@{EXTRA_NW_IP}    11.1.1.100    22.1.1.100    12.1.1.12    13.1.1.13
-@{VM_LIST}        of_punt_net1_vm_1    of_punt_net1_vm_2    of_punt_net2_vm_1    of_punt_net2_vm_2    of_punt_net3_vm_1    of_punt_net3_vm_2
-@{SUBNETS}        of_punt_sub_1    of_punt_sub_2    of_punt_sub_3
-${EXT_SUBNETS}    of_punt_ext_sub_1
-@{SUBNETS_CIDR}    11.1.1.0/24    22.1.1.0/24    33.1.1.0/24
-${EXT_SUBNETS_CIDR}    55.1.1.0/24
-${EXT_SUBNETS_FIXED_IP}    55.1.1.100
-@{VPN_ID}         4ae8cd92-48ca-49b5-94e1-b2921a261111    4ae8cd92-48ca-49b5-94e1-b2921a262222
-@{VPN_NAME}       of_punt_vpn_1    of_punt_vpn_2
-@{ROUTERS}        of_punt_router_1    of_punt_router_2
-@{ROUTERS_ID}     @{EMPTY}
-@{DPN_IDS}        @{EMPTY}
-${SECURITY_GROUP}    of_punt_sg
-@{DCGW_RD_IRT_ERT}    11:1    22:1
-${L3VPN_RD_IRT_ERT}    ["${DCGW_RD_IRT_ERT}[0]"]    ["${DCGW_RD_IRT_ERT}[1]"]
-@{FILES_PATH}     ${KARAF_HOME}/etc/opendaylight/datastore/initial/config/netvirt-vpnmanager-config.xml    ${KARAF_HOME}/etc/opendaylight/datastore/initial/config/netvirt-natservice-config.xml    ${KARAF_HOME}/etc/opendaylight/datastore/initial/config/netvirt-elanmanager-config.xml
+@{NETWORKS}                 of_punt_net_1    of_punt_net_2    of_punt_net_3
+${EXT_NETWORKS}             of_punt_ext_net_1
+@{PORT_LIST}
+...                         of_punt_net1_port_1
+...                         of_punt_net1_port_2
+...                         of_punt_net2_port_1
+...                         of_punt_net2_port_2
+...                         of_punt_net3_port_1
+...                         of_punt_net3_port_2
+@{EXTRA_PORTS}              of_punt_net_1_port_3    of_punt_net_2_port_3
+@{EXTRA_VMS}                of_punt_net_1_vm_3    of_punt_net_2_vm_3
+@{EXTRA_NW_IP}              11.1.1.100    22.1.1.100    12.1.1.12    13.1.1.13
+@{VM_LIST}
+...                         of_punt_net1_vm_1
+...                         of_punt_net1_vm_2
+...                         of_punt_net2_vm_1
+...                         of_punt_net2_vm_2
+...                         of_punt_net3_vm_1
+...                         of_punt_net3_vm_2
+@{SUBNETS}                  of_punt_sub_1    of_punt_sub_2    of_punt_sub_3
+${EXT_SUBNETS}              of_punt_ext_sub_1
+@{SUBNETS_CIDR}             11.1.1.0/24    22.1.1.0/24    33.1.1.0/24
+${EXT_SUBNETS_CIDR}         55.1.1.0/24
+${EXT_SUBNETS_FIXED_IP}     55.1.1.100
+@{VPN_ID}                   4ae8cd92-48ca-49b5-94e1-b2921a261111    4ae8cd92-48ca-49b5-94e1-b2921a262222
+@{VPN_NAME}                 of_punt_vpn_1    of_punt_vpn_2
+@{ROUTERS}                  of_punt_router_1    of_punt_router_2
+@{ROUTERS_ID}               @{EMPTY}
+@{DPN_IDS}                  @{EMPTY}
+${SECURITY_GROUP}           of_punt_sg
+@{DCGW_RD_IRT_ERT}          11:1    22:1
+${L3VPN_RD_IRT_ERT}         ["${DCGW_RD_IRT_ERT}[0]"]    ["${DCGW_RD_IRT_ERT}[1]"]
+@{FILES_PATH}
+...                         ${KARAF_HOME}/etc/opendaylight/datastore/initial/config/netvirt-vpnmanager-config.xml
+...                         ${KARAF_HOME}/etc/opendaylight/datastore/initial/config/netvirt-natservice-config.xml
+...                         ${KARAF_HOME}/etc/opendaylight/datastore/initial/config/netvirt-elanmanager-config.xml
 ${SNAT_ORIGINAL_TIMEOUT}    5
-${L3_ORIGINAL_TIMEOUT}    10
-${ARP_ORIGINAL_TIMEOUT}    5
-@{ORIGINAL_TIMEOUTS}    ${L3_ORIGINAL_TIMEOUT}    ${SNAT_ORIGINAL_TIMEOUT}    ${ARP_ORIGINAL_TIMEOUT}
-@{OF_PUNT_TABLES}    ${L3_PUNT_TABLE}    ${SNAT_PUNT_TABLE}    ${ARP_PUNT_TABLE}    ${ARP_LEARN_TABLE}
-@{VALID_TIMEOUTS}    20    30    100    1000    10000
-${TCP_PORT}       80
-${UDP_PORT}       33435
-${TELNET_PORT}    23
-${ARP_REG}        0x1
-${GARP_REG}       0x101
+${L3_ORIGINAL_TIMEOUT}      10
+${ARP_ORIGINAL_TIMEOUT}     5
+@{ORIGINAL_TIMEOUTS}        ${L3_ORIGINAL_TIMEOUT}    ${SNAT_ORIGINAL_TIMEOUT}    ${ARP_ORIGINAL_TIMEOUT}
+@{OF_PUNT_TABLES}           ${L3_PUNT_TABLE}    ${SNAT_PUNT_TABLE}    ${ARP_PUNT_TABLE}    ${ARP_LEARN_TABLE}
+@{VALID_TIMEOUTS}           20    30    100    1000    10000
+${TCP_PORT}                 80
+${UDP_PORT}                 33435
+${TELNET_PORT}              23
+${ARP_REG}                  0x1
+${GARP_REG}                 0x101
+
 
 *** Test Cases ***
 Verify default punt timeout values and flows
     [Documentation]    Verify default time out for subnet route, SNAT and ARP in respective defualt openflow tables
     ${snat_napt_switch_ip} =    Get NAPT Switch IP From DPID    ${ROUTERS}[1]
     FOR    ${index}    IN RANGE    0    3
-        BuiltIn.Wait Until Keyword Succeeds    120s    20s    OVSDB.Verify Dump Flows For Specific Table    ${snat_napt_switch_ip}    ${OF_PUNT_TABLES}[${index}]
-        ...    True    ${EMPTY}    learn(table=${OF_PUNT_TABLES}[${index}],hard_timeout=${ORIGINAL_TIMEOUTS}[${index}]
+        BuiltIn.Wait Until Keyword Succeeds
+        ...    120s
+        ...    20s
+        ...    OVSDB.Verify Dump Flows For Specific Table
+        ...    ${snat_napt_switch_ip}
+        ...    ${OF_PUNT_TABLES}[${index}]
+        ...    True
+        ...    ${EMPTY}
+        ...    learn(table=${OF_PUNT_TABLES}[${index}],hard_timeout=${ORIGINAL_TIMEOUTS}[${index}]
     END
 
 Set punt timeout to zero and verify flows
@@ -68,7 +94,12 @@ Set punt timeout to zero and verify flows
     ${snat_napt_switch_ip} =    Get NAPT Switch IP From DPID    ${ROUTERS}[1]
     BuiltIn.Wait Until Keyword Succeeds    120s    20s    OVSDB.Check OVS OpenFlow Connections    ${OS_CMP1_IP}    2
     FOR    ${index}    IN RANGE    0    3
-        OVSDB.Verify Dump Flows For Specific Table    ${snat_napt_switch_ip}    ${OF_PUNT_TABLES}[${index}]    False    ${EMPTY}    learn(table=${OF_PUNT_TABLES}[${index}],hard_timeout=${ORIGINAL_TIMEOUTS}[${index}]
+        OVSDB.Verify Dump Flows For Specific Table
+        ...    ${snat_napt_switch_ip}
+        ...    ${OF_PUNT_TABLES}[${index}]
+        ...    False
+        ...    ${EMPTY}
+        ...    learn(table=${OF_PUNT_TABLES}[${index}],hard_timeout=${ORIGINAL_TIMEOUTS}[${index}]
     END
 
 Set punt timeout to combination of valid ranges and verfiy flows
@@ -76,27 +107,65 @@ Set punt timeout to combination of valid ranges and verfiy flows
     ...    Default subnet route, SNAT and ARP flows should get changed after changing default timeout value to different set of values
     Set Original TimeOut In Xml    ${0}
     FOR    ${index}    IN RANGE    0    3
-        Change Hard Timeout Value In XML File    ${FILES_PATH}[${index}]    ${ORIGINAL_TIMEOUTS}[${index}]    ${VALID_TIMEOUTS}[0]
+        Change Hard Timeout Value In XML File
+        ...    ${FILES_PATH}[${index}]
+        ...    ${ORIGINAL_TIMEOUTS}[${index}]
+        ...    ${VALID_TIMEOUTS}[0]
         Verify Punt Values In XML File    ${FILES_PATH}[${index}]    ${VALID_TIMEOUTS}[0]
     END
     ${count} =    BuiltIn.Get length    ${VALID_TIMEOUTS}
     FOR    ${index}    IN RANGE    1    ${count}
-        Change Hard Timeout Value In XML File    ${FILES_PATH}[0]    ${VALID_TIMEOUTS}[${index - 1}]    ${VALID_TIMEOUTS}[${index}]
+        Change Hard Timeout Value In XML File
+        ...    ${FILES_PATH}[0]
+        ...    ${VALID_TIMEOUTS}[${index - 1}]
+        ...    ${VALID_TIMEOUTS}[${index}]
         Verify Punt Values In XML File    ${FILES_PATH}[0]    ${VALID_TIMEOUTS}[${index}]
-        Change Hard Timeout Value In XML File    ${FILES_PATH}[1]    ${VALID_TIMEOUTS}[${index - 1}]    ${VALID_TIMEOUTS}[${index}]
+        Change Hard Timeout Value In XML File
+        ...    ${FILES_PATH}[1]
+        ...    ${VALID_TIMEOUTS}[${index - 1}]
+        ...    ${VALID_TIMEOUTS}[${index}]
         Verify Punt Values In XML File    ${FILES_PATH}[1]    ${VALID_TIMEOUTS}[${index}]
-        Change Hard Timeout Value In XML File    ${FILES_PATH}[2]    ${VALID_TIMEOUTS}[${index - 1}]    ${VALID_TIMEOUTS}[${index}]
+        Change Hard Timeout Value In XML File
+        ...    ${FILES_PATH}[2]
+        ...    ${VALID_TIMEOUTS}[${index - 1}]
+        ...    ${VALID_TIMEOUTS}[${index}]
         Verify Punt Values In XML File    ${FILES_PATH}[2]    ${VALID_TIMEOUTS}[${index}]
         ClusterManagement.Stop_Members_From_List_Or_All
         ClusterManagement.Start_Members_From_List_Or_All
-        BuiltIn.Wait Until Keyword Succeeds    120s    20s    OVSDB.Check OVS OpenFlow Connections    ${OS_CMP1_IP}    2
+        BuiltIn.Wait Until Keyword Succeeds
+        ...    120s
+        ...    20s
+        ...    OVSDB.Check OVS OpenFlow Connections
+        ...    ${OS_CMP1_IP}
+        ...    2
         ${snat_napt_switch_ip} =    Get NAPT Switch IP From DPID    ${ROUTERS}[1]
-        BuiltIn.Wait Until Keyword Succeeds    120s    5s    OVSDB.Verify Dump Flows For Specific Table    ${OS_COMPUTE_1_IP}    ${L3_PUNT_TABLE}
-        ...    True    ${EMPTY}    learn(table=${L3_PUNT_TABLE},hard_timeout=${VALID_TIMEOUTS}[${index}]
-        BuiltIn.Wait Until Keyword Succeeds    120s    5s    OVSDB.Verify Dump Flows For Specific Table    ${OS_COMPUTE_1_IP}    ${ARP_PUNT_TABLE}
-        ...    True    ${EMPTY}    learn(table=${ARP_PUNT_TABLE},hard_timeout=${VALID_TIMEOUTS}[${index}]
-        BuiltIn.Wait Until Keyword Succeeds    180s    5s    OVSDB.Verify Dump Flows For Specific Table    ${snat_napt_switch_ip}    ${SNAT_PUNT_TABLE}
-        ...    True    ${EMPTY}    learn(table=${SNAT_PUNT_TABLE},hard_timeout=${VALID_TIMEOUTS}[${index}]
+        BuiltIn.Wait Until Keyword Succeeds
+        ...    120s
+        ...    5s
+        ...    OVSDB.Verify Dump Flows For Specific Table
+        ...    ${OS_COMPUTE_1_IP}
+        ...    ${L3_PUNT_TABLE}
+        ...    True
+        ...    ${EMPTY}
+        ...    learn(table=${L3_PUNT_TABLE},hard_timeout=${VALID_TIMEOUTS}[${index}]
+        BuiltIn.Wait Until Keyword Succeeds
+        ...    120s
+        ...    5s
+        ...    OVSDB.Verify Dump Flows For Specific Table
+        ...    ${OS_COMPUTE_1_IP}
+        ...    ${ARP_PUNT_TABLE}
+        ...    True
+        ...    ${EMPTY}
+        ...    learn(table=${ARP_PUNT_TABLE},hard_timeout=${VALID_TIMEOUTS}[${index}]
+        BuiltIn.Wait Until Keyword Succeeds
+        ...    180s
+        ...    5s
+        ...    OVSDB.Verify Dump Flows For Specific Table
+        ...    ${snat_napt_switch_ip}
+        ...    ${SNAT_PUNT_TABLE}
+        ...    True
+        ...    ${EMPTY}
+        ...    learn(table=${SNAT_PUNT_TABLE},hard_timeout=${VALID_TIMEOUTS}[${index}]
     END
     Set Original TimeOut In Xml    ${VALID_TIMEOUTS}[4]
 
@@ -106,18 +175,41 @@ Verify learnt flow for subnet route flow table
     ...    Punt the first packet to controller and add new rule to stop pipeline processing.
     ...    Check packet count before and after traffic for both(defualt and learnt tables).
     FOR    ${index}    IN RANGE    0    3
-        Change Hard Timeout Value In XML File    ${FILES_PATH}[${index}]    ${ORIGINAL_TIMEOUTS}[${index}]    ${VALID_TIMEOUTS}[0]
+        Change Hard Timeout Value In XML File
+        ...    ${FILES_PATH}[${index}]
+        ...    ${ORIGINAL_TIMEOUTS}[${index}]
+        ...    ${VALID_TIMEOUTS}[0]
         Verify Punt Values In XML File    ${FILES_PATH}[${index}]    ${VALID_TIMEOUTS}[0]
     END
     ClusterManagement.Stop_Members_From_List_Or_All
     ClusterManagement.Start_Members_From_List_Or_All
     BuiltIn.Wait Until Keyword Succeeds    120s    20s    OVSDB.Check OVS OpenFlow Connections    ${OS_CMP1_IP}    2
-    ${count_before_traffic} =    OvsManager.Get Packet Count From Table    ${OS_CMP1_IP}    ${INTEGRATION_BRIDGE}    table=${L3_PUNT_TABLE},    |grep "ip actions=CONTROLLER:65535,learn(table=${L3_PUNT_TABLE},hard_timeout=${VALID_TIMEOUTS}[0]"
-    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${VM_IPS}[0]    sudo ping -c 5 ${EXTRA_NW_IP}[1]
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${L3_PUNT_TABLE}    True    ${EMPTY}    nw_dst=${EXTRA_NW_IP}[1] actions=drop
-    ${learnt_packet_count}    OvsManager.Get Packet Count From Table    ${OS_CMP1_IP}    ${INTEGRATION_BRIDGE}    table=${L3_PUNT_TABLE},    |grep "nw_dst=${EXTRA_NW_IP}[1] actions=drop"
+    ${count_before_traffic} =    OvsManager.Get Packet Count From Table
+    ...    ${OS_CMP1_IP}
+    ...    ${INTEGRATION_BRIDGE}
+    ...    table=${L3_PUNT_TABLE},
+    ...    |grep "ip actions=CONTROLLER:65535,learn(table=${L3_PUNT_TABLE},hard_timeout=${VALID_TIMEOUTS}[0]"
+    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${VM_IPS}[0]
+    ...    sudo ping -c 5 ${EXTRA_NW_IP}[1]
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${L3_PUNT_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    nw_dst=${EXTRA_NW_IP}[1] actions=drop
+    ${learnt_packet_count} =    OvsManager.Get Packet Count From Table
+    ...    ${OS_CMP1_IP}
+    ...    ${INTEGRATION_BRIDGE}
+    ...    table=${L3_PUNT_TABLE},
+    ...    |grep "nw_dst=${EXTRA_NW_IP}[1] actions=drop"
     BuiltIn.Should be true    ${learnt_packet_count} > 1
-    ${count_after_traffic}    OvsManager.Get Packet Count From Table    ${OS_CMP1_IP}    ${INTEGRATION_BRIDGE}    table=${L3_PUNT_TABLE},    |grep "ip actions=CONTROLLER:65535,learn(table=${L3_PUNT_TABLE},hard_timeout=${VALID_TIMEOUTS}[0]"
+    ${count_after_traffic} =    OvsManager.Get Packet Count From Table
+    ...    ${OS_CMP1_IP}
+    ...    ${INTEGRATION_BRIDGE}
+    ...    table=${L3_PUNT_TABLE},
+    ...    |grep "ip actions=CONTROLLER:65535,learn(table=${L3_PUNT_TABLE},hard_timeout=${VALID_TIMEOUTS}[0]"
     ${count_before_traffic} =    BuiltIn.Evaluate    ${count_before_traffic} + 1
     BuiltIn.Should be true    ${count_after_traffic} == ${count_before_traffic}
 
@@ -126,17 +218,42 @@ Verify learnt flow for UDP in SNAT flow table
     ...    Send UDP traffic using traceroute with packet count 4.
     ...    Punt the first packet to controller and add new rule to stop pipeline processing.
     ...    Check packet count before and after traffic for both(defualt and learnt tables).
-    ${compute_ip}    Get NAPT Switch IP From DPID    ${ROUTERS}[1]
+    ${compute_ip}    Get NAPT Switch IP From DPID    ${ROUTERS}[1]
     OVSDB.Verify Dump Flows For Specific Table    ${compute_ip}    ${SNAT_PUNT_TABLE}    ${VALID_TIMEOUTS}[0]
-    ${count_before_traffic} =    OvsManager.Get Packet Count From Table    ${compute_ip}    ${INTEGRATION_BRIDGE}    table=${SNAT_PUNT_TABLE}    |grep "table=46.*n_packets=[\0-9+].*udp.*learn(table=46"
+    ${count_before_traffic} =    OvsManager.Get Packet Count From Table
+    ...    ${compute_ip}
+    ...    ${INTEGRATION_BRIDGE}
+    ...    table=${SNAT_PUNT_TABLE}
+    ...    |grep "table=46.*n_packets=[\0-9+].*udp.*learn(table=46"
     BuiltIn.Should be true    ${count_before_traffic} == 0
-    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[2]    ${VM_IPS}[4]    traceroute ${EXTRA_NW_IP}[2] -w 1 -q 1 -m 4
-    OVSDB.Verify Dump Flows For Specific Table    ${compute_ip}    ${SNAT_PUNT_TABLE}    True    ${EMPTY}    tp_dst=${UDP_PORT} actions=drop
-    ${count_after_traffic} =    OvsManager.Get Packet Count From Table    ${compute_ip}    ${INTEGRATION_BRIDGE}    table=${SNAT_PUNT_TABLE}    |grep "table=46.*n_packets=[\0-9+].*udp.*learn(table=46"
+    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[2]
+    ...    ${VM_IPS}[4]
+    ...    traceroute ${EXTRA_NW_IP}[2] -w 1 -q 1 -m 4
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${compute_ip}
+    ...    ${SNAT_PUNT_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    tp_dst=${UDP_PORT} actions=drop
+    ${count_after_traffic} =    OvsManager.Get Packet Count From Table
+    ...    ${compute_ip}
+    ...    ${INTEGRATION_BRIDGE}
+    ...    table=${SNAT_PUNT_TABLE}
+    ...    |grep "table=46.*n_packets=[\0-9+].*udp.*learn(table=46"
     ${count_before_traffic} =    BuiltIn.Evaluate    ${count_before_traffic} + 1
     BuiltIn.Should be true    ${count_after_traffic} == ${count_before_traffic}
-    OVSDB.Verify Dump Flows For Specific Table    ${compute_ip}    ${SNAT_PUNT_TABLE}    True    ${EMPTY}    actions=set_field:${EXT_SUBNETS_FIXED_IP}->ip_src
-    ${controller_packet_count} =    OvsManager.Get Packet Count From Table    ${compute_ip}    ${INTEGRATION_BRIDGE}    table=${SNAT_PUNT_TABLE}    |grep "table=46.*n_packets=[\0-9+].*udp.*nw_src=${VM_IPS}[4].*actions=set_field:${EXT_SUBNETS_FIXED_IP}.*goto_table:47"
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${compute_ip}
+    ...    ${SNAT_PUNT_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    actions=set_field:${EXT_SUBNETS_FIXED_IP}->ip_src
+    ${controller_packet_count} =    OvsManager.Get Packet Count From Table
+    ...    ${compute_ip}
+    ...    ${INTEGRATION_BRIDGE}
+    ...    table=${SNAT_PUNT_TABLE}
+    ...    |grep "table=46.*n_packets=[\0-9+].*udp.*nw_src=${VM_IPS}[4].*actions=set_field:${EXT_SUBNETS_FIXED_IP}.*goto_table:47"
     BuiltIn.Should be true    ${controller_packet_count} > 1
 
 Verify learnt flow for TCP in SNAT flow table
@@ -144,17 +261,42 @@ Verify learnt flow for TCP in SNAT flow table
     ...    Send TCP traffic using wget.
     ...    Punt the first packet to controller and add new rule to stop pipeline processing.
     ...    Check packet count before and after traffic for both(defualt and learnt tables).
-    ${compute_ip}    Get NAPT Switch IP From DPID    ${ROUTERS}[1]
+    ${compute_ip}    Get NAPT Switch IP From DPID    ${ROUTERS}[1]
     OVSDB.Verify Dump Flows For Specific Table    ${compute_ip}    ${SNAT_PUNT_TABLE}    ${VALID_TIMEOUTS}[0]
-    ${count_before_traffic} =    OvsManager.Get Packet Count From Table    ${compute_ip}    ${INTEGRATION_BRIDGE}    table=${SNAT_PUNT_TABLE}    |grep "table=46.*n_packets=[\0-9+].*tcp.*learn(table=46"
+    ${count_before_traffic} =    OvsManager.Get Packet Count From Table
+    ...    ${compute_ip}
+    ...    ${INTEGRATION_BRIDGE}
+    ...    table=${SNAT_PUNT_TABLE}
+    ...    |grep "table=46.*n_packets=[\0-9+].*tcp.*learn(table=46"
     BuiltIn.Should be true    ${count_before_traffic} == 0
-    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[2]    ${VM_IPS}[4]    wget -qc http://${EXTRA_NW_IP}[2]/ &
-    OVSDB.Verify Dump Flows For Specific Table    ${compute_ip}    ${SNAT_PUNT_TABLE}    True    ${EMPTY}    tp_dst=${TCP_PORT} actions=drop
-    ${count_after_traffic} =    OvsManager.Get Packet Count From Table    ${compute_ip}    ${INTEGRATION_BRIDGE}    table=${SNAT_PUNT_TABLE}    |grep "table=46.*n_packets=[\0-9+].*tcp.*learn(table=46"
+    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[2]
+    ...    ${VM_IPS}[4]
+    ...    wget -qc http://${EXTRA_NW_IP}[2]/ &
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${compute_ip}
+    ...    ${SNAT_PUNT_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    tp_dst=${TCP_PORT} actions=drop
+    ${count_after_traffic} =    OvsManager.Get Packet Count From Table
+    ...    ${compute_ip}
+    ...    ${INTEGRATION_BRIDGE}
+    ...    table=${SNAT_PUNT_TABLE}
+    ...    |grep "table=46.*n_packets=[\0-9+].*tcp.*learn(table=46"
     ${count_before_traffic} =    BuiltIn.Evaluate    ${count_before_traffic} + 1
     BuiltIn.Should be true    ${count_after_traffic} == ${count_before_traffic}
-    OVSDB.Verify Dump Flows For Specific Table    ${compute_ip}    ${SNAT_PUNT_TABLE}    True    ${EMPTY}    actions=set_field:${EXT_SUBNETS_FIXED_IP}->ip_src
-    ${controller_packet_count} =    OvsManager.Get Packet Count From Table    ${compute_ip}    ${INTEGRATION_BRIDGE}    table=${SNAT_PUNT_TABLE}    |grep "table=46.*n_packets=[\0-9+].*tcp.*nw_src=${VM_IPS}[4].*actions=set_field:${EXT_SUBNETS_FIXED_IP}.*goto_table:47"
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${compute_ip}
+    ...    ${SNAT_PUNT_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    actions=set_field:${EXT_SUBNETS_FIXED_IP}->ip_src
+    ${controller_packet_count} =    OvsManager.Get Packet Count From Table
+    ...    ${compute_ip}
+    ...    ${INTEGRATION_BRIDGE}
+    ...    table=${SNAT_PUNT_TABLE}
+    ...    |grep "table=46.*n_packets=[\0-9+].*tcp.*nw_src=${VM_IPS}[4].*actions=set_field:${EXT_SUBNETS_FIXED_IP}.*goto_table:47"
     BuiltIn.Should be true    ${controller_packet_count} > 1
 
 Verify learnt flow for ARP request in ARP tables
@@ -163,16 +305,49 @@ Verify learnt flow for ARP request in ARP tables
     ...    Punt the first packet to controller and add new rule to stop pipeline processing.
     ...    Check packet count before and after traffic for both(defualt and learnt tables).
     OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP2_IP}    ${ARP_PUNT_TABLE}    ${VALID_TIMEOUTS}[0]
-    ${count_before_traffic} =    OvsManager.Get Packet Count From Table    ${OS_CMP2_IP}    ${INTEGRATION_BRIDGE}    table=${ARP_PUNT_TABLE}    |grep "arp actions=CONTROLLER:65535,learn(table=${ARP_PUNT_TABLE},hard_timeout=${VALID_TIMEOUTS}[0]"
-    ${count_before_traffic_arp} =    OvsManager.Get Packet Count From Table    ${OS_CMP2_IP}    ${INTEGRATION_BRIDGE}    table=${ELAN_BASETABLE}    |grep "n_packets=[\0-9+].*reg4=${ARP_REG}.0xffff"
-    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${VM_IPS}[3]    sudo arping -c 5 -I eth0 22.1.1.101
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP2_IP}    ${ARP_PUNT_TABLE}    True    ${EMPTY}    arp_tpa=22.1.1.101,arp_op=1
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP2_IP}    ${ARP_LEARN_TABLE}    True    ${EMPTY}    arp_spa=22.1.1.101,arp_op=1
-    ${count_after_traffic} =    OvsManager.Get Packet Count From Table    ${OS_CMP2_IP}    ${INTEGRATION_BRIDGE}    table=${ARP_PUNT_TABLE}    |grep "arp actions=CONTROLLER:65535,learn(table=${ARP_PUNT_TABLE},hard_timeout=${VALID_TIMEOUTS}[0]"
+    ${count_before_traffic} =    OvsManager.Get Packet Count From Table
+    ...    ${OS_CMP2_IP}
+    ...    ${INTEGRATION_BRIDGE}
+    ...    table=${ARP_PUNT_TABLE}
+    ...    |grep "arp actions=CONTROLLER:65535,learn(table=${ARP_PUNT_TABLE},hard_timeout=${VALID_TIMEOUTS}[0]"
+    ${count_before_traffic_arp} =    OvsManager.Get Packet Count From Table
+    ...    ${OS_CMP2_IP}
+    ...    ${INTEGRATION_BRIDGE}
+    ...    table=${ELAN_BASETABLE}
+    ...    |grep "n_packets=[\0-9+].*reg4=${ARP_REG}.0xffff"
+    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${VM_IPS}[3]
+    ...    sudo arping -c 5 -I eth0 22.1.1.101
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP2_IP}
+    ...    ${ARP_PUNT_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    arp_tpa=22.1.1.101,arp_op=1
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP2_IP}
+    ...    ${ARP_LEARN_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    arp_spa=22.1.1.101,arp_op=1
+    ${count_after_traffic} =    OvsManager.Get Packet Count From Table
+    ...    ${OS_CMP2_IP}
+    ...    ${INTEGRATION_BRIDGE}
+    ...    table=${ARP_PUNT_TABLE}
+    ...    |grep "arp actions=CONTROLLER:65535,learn(table=${ARP_PUNT_TABLE},hard_timeout=${VALID_TIMEOUTS}[0]"
     BuiltIn.Should be true    ${count_after_traffic} > ${count_before_traffic}
-    ${learnt_packet_count} =    OvsManager.Get Packet Count From Table    ${OS_CMP2_IP}    ${INTEGRATION_BRIDGE}    table=${ARP_PUNT_TABLE}    |grep "n_packets=[\0-9+].*arp_tpa=22.1.1.101,arp_op=1.*actions=load:0x1"
+    ${learnt_packet_count} =    OvsManager.Get Packet Count From Table
+    ...    ${OS_CMP2_IP}
+    ...    ${INTEGRATION_BRIDGE}
+    ...    table=${ARP_PUNT_TABLE}
+    ...    |grep "n_packets=[\0-9+].*arp_tpa=22.1.1.101,arp_op=1.*actions=load:0x1"
     BuiltIn.Should be true    ${learnt_packet_count} > 0
-    ${count_after_traffic_arp} =    OvsManager.Get Packet Count From Table    ${OS_CMP2_IP}    ${INTEGRATION_BRIDGE}    table=${ELAN_BASETABLE}    |grep "n_packets=[\0-9+].*reg4=${ARP_REG}.0xffff"
+    ${count_after_traffic_arp} =    OvsManager.Get Packet Count From Table
+    ...    ${OS_CMP2_IP}
+    ...    ${INTEGRATION_BRIDGE}
+    ...    table=${ELAN_BASETABLE}
+    ...    |grep "n_packets=[\0-9+].*reg4=${ARP_REG}.0xffff"
     BuiltIn.Should be true    ${count_after_traffic_arp} > ${count_before_traffic_arp}
 
 Verify learnt flow for ARP reply in ARP tables
@@ -181,16 +356,49 @@ Verify learnt flow for ARP reply in ARP tables
     ...    Punt the first packet to controller and add new rule to stop pipeline processing.
     ...    Check packet count before and after traffic for both(defualt and learnt tables).
     OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP2_IP}    ${ARP_PUNT_TABLE}    ${VALID_TIMEOUTS}[0]
-    ${count_before_traffic} =    OvsManager.Get Packet Count From Table    ${OS_CMP2_IP}    ${INTEGRATION_BRIDGE}    table=${ARP_PUNT_TABLE}    |grep "arp actions=CONTROLLER:65535,learn(table=${ARP_PUNT_TABLE},hard_timeout=${VALID_TIMEOUTS}[0]"
-    ${count_before_traffic_arp} =    OvsManager.Get Packet Count From Table    ${OS_CMP2_IP}    ${INTEGRATION_BRIDGE}    table=${ELAN_BASETABLE}    |grep "n_packets=[\0-9+].*reg4=${ARP_REG}.0xffff"
-    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${VM_IPS}[1]    sudo arping -A -c 5 -I eth0 -s ${VM_IPS}[1] 11.1.1.101
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP2_IP}    ${ARP_PUNT_TABLE}    True    ${EMPTY}    arp_tpa=11.1.1.101,arp_op=2
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP2_IP}    ${ARP_LEARN_TABLE}    True    ${EMPTY}    arp_spa=11.1.1.101,arp_op=2
-    ${count_after_traffic} =    OvsManager.Get Packet Count From Table    ${OS_CMP2_IP}    ${INTEGRATION_BRIDGE}    table=${ARP_PUNT_TABLE}    |grep "arp actions=CONTROLLER:65535,learn(table=${ARP_PUNT_TABLE},hard_timeout=${VALID_TIMEOUTS}[0]"
+    ${count_before_traffic} =    OvsManager.Get Packet Count From Table
+    ...    ${OS_CMP2_IP}
+    ...    ${INTEGRATION_BRIDGE}
+    ...    table=${ARP_PUNT_TABLE}
+    ...    |grep "arp actions=CONTROLLER:65535,learn(table=${ARP_PUNT_TABLE},hard_timeout=${VALID_TIMEOUTS}[0]"
+    ${count_before_traffic_arp} =    OvsManager.Get Packet Count From Table
+    ...    ${OS_CMP2_IP}
+    ...    ${INTEGRATION_BRIDGE}
+    ...    table=${ELAN_BASETABLE}
+    ...    |grep "n_packets=[\0-9+].*reg4=${ARP_REG}.0xffff"
+    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${VM_IPS}[1]
+    ...    sudo arping -A -c 5 -I eth0 -s ${VM_IPS}[1] 11.1.1.101
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP2_IP}
+    ...    ${ARP_PUNT_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    arp_tpa=11.1.1.101,arp_op=2
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP2_IP}
+    ...    ${ARP_LEARN_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    arp_spa=11.1.1.101,arp_op=2
+    ${count_after_traffic} =    OvsManager.Get Packet Count From Table
+    ...    ${OS_CMP2_IP}
+    ...    ${INTEGRATION_BRIDGE}
+    ...    table=${ARP_PUNT_TABLE}
+    ...    |grep "arp actions=CONTROLLER:65535,learn(table=${ARP_PUNT_TABLE},hard_timeout=${VALID_TIMEOUTS}[0]"
     BuiltIn.Should be true    ${count_after_traffic} > ${count_before_traffic}
-    ${learnt_packet_count} =    OvsManager.Get Packet Count From Table    ${OS_CMP2_IP}    ${INTEGRATION_BRIDGE}    table=${ARP_PUNT_TABLE}    |grep "n_packets=[\0-9+].*arp_tpa=11.1.1.101,arp_op=2.*actions=load:0x1"
+    ${learnt_packet_count} =    OvsManager.Get Packet Count From Table
+    ...    ${OS_CMP2_IP}
+    ...    ${INTEGRATION_BRIDGE}
+    ...    table=${ARP_PUNT_TABLE}
+    ...    |grep "n_packets=[\0-9+].*arp_tpa=11.1.1.101,arp_op=2.*actions=load:0x1"
     BuiltIn.Should be true    ${learnt_packet_count} > 0
-    ${count_after_traffic_arp} =    OvsManager.Get Packet Count From Table    ${OS_CMP2_IP}    ${INTEGRATION_BRIDGE}    table=${ELAN_BASETABLE}    |grep "n_packets=[\0-9+].*reg4=${ARP_REG}.0xffff"
+    ${count_after_traffic_arp} =    OvsManager.Get Packet Count From Table
+    ...    ${OS_CMP2_IP}
+    ...    ${INTEGRATION_BRIDGE}
+    ...    table=${ELAN_BASETABLE}
+    ...    |grep "n_packets=[\0-9+].*reg4=${ARP_REG}.0xffff"
     BuiltIn.Should be true    ${count_after_traffic_arp} > ${count_before_traffic_arp}
 
 Verify learnt flow for GARP (Gratuitous ARP) in ARP tables
@@ -199,16 +407,49 @@ Verify learnt flow for GARP (Gratuitous ARP) in ARP tables
     ...    Punt the first packet to controller and add new rule to stop pipeline processing.
     ...    Check packet count before and after traffic for both(defualt and learnt tables).
     OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${ARP_PUNT_TABLE}    ${VALID_TIMEOUTS}[0]
-    ${count_before_traffic} =    OvsManager.Get Packet Count From Table    ${OS_CMP1_IP}    ${INTEGRATION_BRIDGE}    table=${ARP_PUNT_TABLE}    |grep "arp actions=CONTROLLER:65535,learn(table=${ARP_PUNT_TABLE},hard_timeout=${VALID_TIMEOUTS}[0]"
-    ${count_before_traffic_arp} =    OvsManager.Get Packet Count From Table    ${OS_CMP1_IP}    ${INTEGRATION_BRIDGE}    table=${ELAN_BASETABLE}    |grep "n_packets=[\0-9+].*reg4=${GARP_REG}.0xffff"
-    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${VM_IPS}[0]    sudo arping -U -c 5 -I eth0 ${VM_IPS}[0] &
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${ARP_PUNT_TABLE}    True    ${EMPTY}    arp_tpa=${VM_IPS}[0],arp_op=1
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${ARP_LEARN_TABLE}    True    ${EMPTY}    arp_spa=${VM_IPS}[0],arp_op=1
-    ${count_after_traffic} =    OvsManager.Get Packet Count From Table    ${OS_CMP1_IP}    ${INTEGRATION_BRIDGE}    table=${ARP_PUNT_TABLE}    |grep "arp actions=CONTROLLER:65535,learn(table=${ARP_PUNT_TABLE},hard_timeout=${VALID_TIMEOUTS}[0]"
+    ${count_before_traffic} =    OvsManager.Get Packet Count From Table
+    ...    ${OS_CMP1_IP}
+    ...    ${INTEGRATION_BRIDGE}
+    ...    table=${ARP_PUNT_TABLE}
+    ...    |grep "arp actions=CONTROLLER:65535,learn(table=${ARP_PUNT_TABLE},hard_timeout=${VALID_TIMEOUTS}[0]"
+    ${count_before_traffic_arp} =    OvsManager.Get Packet Count From Table
+    ...    ${OS_CMP1_IP}
+    ...    ${INTEGRATION_BRIDGE}
+    ...    table=${ELAN_BASETABLE}
+    ...    |grep "n_packets=[\0-9+].*reg4=${GARP_REG}.0xffff"
+    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${VM_IPS}[0]
+    ...    sudo arping -U -c 5 -I eth0 ${VM_IPS}[0] &
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${ARP_PUNT_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    arp_tpa=${VM_IPS}[0],arp_op=1
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${ARP_LEARN_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    arp_spa=${VM_IPS}[0],arp_op=1
+    ${count_after_traffic} =    OvsManager.Get Packet Count From Table
+    ...    ${OS_CMP1_IP}
+    ...    ${INTEGRATION_BRIDGE}
+    ...    table=${ARP_PUNT_TABLE}
+    ...    |grep "arp actions=CONTROLLER:65535,learn(table=${ARP_PUNT_TABLE},hard_timeout=${VALID_TIMEOUTS}[0]"
     BuiltIn.Should be true    ${count_after_traffic} > ${count_before_traffic}
-    ${learnt_packet_count} =    OvsManager.Get Packet Count From Table    ${OS_CMP1_IP}    ${INTEGRATION_BRIDGE}    table=${ARP_PUNT_TABLE}    |grep "arp_tpa=${VM_IPS}[0],arp_op=1"
+    ${learnt_packet_count} =    OvsManager.Get Packet Count From Table
+    ...    ${OS_CMP1_IP}
+    ...    ${INTEGRATION_BRIDGE}
+    ...    table=${ARP_PUNT_TABLE}
+    ...    |grep "arp_tpa=${VM_IPS}[0],arp_op=1"
     BuiltIn.Should be true    ${learnt_packet_count} > 0
-    ${count_after_traffic_arp} =    OvsManager.Get Packet Count From Table    ${OS_CMP1_IP}    ${INTEGRATION_BRIDGE}    table=${ELAN_BASETABLE}    |grep "n_packets=[\0-9+].*reg4=${GARP_REG}.0xffff"
+    ${count_after_traffic_arp} =    OvsManager.Get Packet Count From Table
+    ...    ${OS_CMP1_IP}
+    ...    ${INTEGRATION_BRIDGE}
+    ...    table=${ELAN_BASETABLE}
+    ...    |grep "n_packets=[\0-9+].*reg4=${GARP_REG}.0xffff"
     BuiltIn.Should be true    ${count_after_traffic_arp} > ${count_before_traffic_arp}
 
 Verify resync subnet route, SNAT and ARP route flow tables after disconnect and reconnecting OVS control path
@@ -218,45 +459,168 @@ Verify resync subnet route, SNAT and ARP route flow tables after disconnect and
     ...    Verify subnet, SNAT and ARP default flows
     ${snat_napt_switch_ip} =    Get NAPT Switch IP From DPID    ${ROUTERS}[1]
     BuiltIn.Wait Until Keyword Succeeds    120s    20s    OVSDB.Check OVS OpenFlow Connections    ${OS_CMP1_IP}    2
-    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${VM_IPS}[0]    sudo ping -c 5 ${EXTRA_NW_IP}[1]
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${L3_PUNT_TABLE}    True    ${EMPTY}    nw_dst=11.1.1.255 actions=drop
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${L3_PUNT_TABLE}    True    ${EMPTY}    nw_dst=${EXTRA_NW_IP}[1] actions=drop
-    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[2]    ${VM_IPS}[4]    traceroute ${EXTRA_NW_IP}[2] -w 1 -q 1 -m 4
-    OVSDB.Verify Dump Flows For Specific Table    ${snat_napt_switch_ip}    ${SNAT_PUNT_TABLE}    True    ${EMPTY}    tp_dst=${UDP_PORT} actions=drop
-    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[2]    ${VM_IPS}[4]    wget -qc http://${EXTRA_NW_IP}[2]/ &
-    OVSDB.Verify Dump Flows For Specific Table    ${snat_napt_switch_ip}    ${SNAT_PUNT_TABLE}    True    ${EMPTY}    tp_dst=${TCP_PORT} actions=drop
-    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${VM_IPS}[0]    sudo arping -c 2 ${VM_IPS}[1]
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${ARP_PUNT_TABLE}    True    ${EMPTY}    arp_tpa=${VM_IPS}[1],arp_op=1
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${ARP_LEARN_TABLE}    True    ${EMPTY}    arp_spa=${VM_IPS}[1],arp_op=1
+    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${VM_IPS}[0]
+    ...    sudo ping -c 5 ${EXTRA_NW_IP}[1]
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${L3_PUNT_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    nw_dst=11.1.1.255 actions=drop
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${L3_PUNT_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    nw_dst=${EXTRA_NW_IP}[1] actions=drop
+    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[2]
+    ...    ${VM_IPS}[4]
+    ...    traceroute ${EXTRA_NW_IP}[2] -w 1 -q 1 -m 4
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${snat_napt_switch_ip}
+    ...    ${SNAT_PUNT_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    tp_dst=${UDP_PORT} actions=drop
+    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[2]
+    ...    ${VM_IPS}[4]
+    ...    wget -qc http://${EXTRA_NW_IP}[2]/ &
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${snat_napt_switch_ip}
+    ...    ${SNAT_PUNT_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    tp_dst=${TCP_PORT} actions=drop
+    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${VM_IPS}[0]
+    ...    sudo arping -c 2 ${VM_IPS}[1]
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${ARP_PUNT_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    arp_tpa=${VM_IPS}[1],arp_op=1
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${ARP_LEARN_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    arp_spa=${VM_IPS}[1],arp_op=1
     OVSDB.Delete OVS Manager    ${OS_CMP1_IP}
     OVSDB.Delete OVS Controller    ${OS_CMP1_IP}
     OVSDB.Delete OVS Manager    ${snat_napt_switch_ip}
     OVSDB.Delete OVS Controller    ${snat_napt_switch_ip}
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${L3_PUNT_TABLE}    False    ${EMPTY}    nw_dst=11.1.1.255 actions=drop
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${L3_PUNT_TABLE}    False    ${EMPTY}    nw_dst=${EXTRA_NW_IP}[1] actions=drop
-    OVSDB.Verify Dump Flows For Specific Table    ${snat_napt_switch_ip}    ${SNAT_PUNT_TABLE}    False    ${EMPTY}    nw_dst=11.1.1.255 actions=drop
-    OVSDB.Verify Dump Flows For Specific Table    ${snat_napt_switch_ip}    ${SNAT_PUNT_TABLE}    False    ${EMPTY}    tp_dst=${TCP_PORT} actions=drop
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${ARP_PUNT_TABLE}    False    ${EMPTY}    arp_tpa=${VM_IPS}[1],arp_op=1
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${ARP_LEARN_TABLE}    False    ${EMPTY}    arp_spa=${VM_IPS}[1],arp_op=1
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${L3_PUNT_TABLE}
+    ...    False
+    ...    ${EMPTY}
+    ...    nw_dst=11.1.1.255 actions=drop
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${L3_PUNT_TABLE}
+    ...    False
+    ...    ${EMPTY}
+    ...    nw_dst=${EXTRA_NW_IP}[1] actions=drop
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${snat_napt_switch_ip}
+    ...    ${SNAT_PUNT_TABLE}
+    ...    False
+    ...    ${EMPTY}
+    ...    nw_dst=11.1.1.255 actions=drop
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${snat_napt_switch_ip}
+    ...    ${SNAT_PUNT_TABLE}
+    ...    False
+    ...    ${EMPTY}
+    ...    tp_dst=${TCP_PORT} actions=drop
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${ARP_PUNT_TABLE}
+    ...    False
+    ...    ${EMPTY}
+    ...    arp_tpa=${VM_IPS}[1],arp_op=1
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${ARP_LEARN_TABLE}
+    ...    False
+    ...    ${EMPTY}
+    ...    arp_spa=${VM_IPS}[1],arp_op=1
     OVSDB.Set Controller In OVS Bridge    ${OS_CMP1_IP}    ${INTEGRATION_BRIDGE}    tcp:${ODL_SYSTEM_IP}:6653
     OVSDB.Set Controller In OVS Bridge    ${snat_napt_switch_ip}    ${INTEGRATION_BRIDGE}    tcp:${ODL_SYSTEM_IP}:6653
     OVSDB.Add Multiple Managers to OVS    ${OS_CMP1_IP}
     OVSDB.Add Multiple Managers to OVS    ${snat_napt_switch_ip}
     ${snat_napt_switch_ip} =    Get NAPT Switch IP From DPID    ${ROUTERS}[1]
     BuiltIn.Wait Until Keyword Succeeds    120s    20s    OVSDB.Check OVS OpenFlow Connections    ${OS_CMP1_IP}    2
-    BuiltIn.Wait Until Keyword Succeeds    120s    20s    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${L3_PUNT_TABLE}    True
-    ...    ${EMPTY}    nw_dst=11.1.1.255 actions=drop
-    BuiltIn.Wait Until Keyword Succeeds    120s    20s    OVSDB.Verify Dump Flows For Specific Table    ${snat_napt_switch_ip}    ${SNAT_PUNT_TABLE}    False
-    ...    ${EMPTY}    tp_dst=${UDP_PORT} actions=drop
-    BuiltIn.Wait Until Keyword Succeeds    190s    40s    OVSDB.Verify Dump Flows For Specific Table    ${snat_napt_switch_ip}    ${SNAT_PUNT_TABLE}    False
-    ...    ${EMPTY}    tp_dst=${TCP_PORT} actions=drop
-    BuiltIn.Wait Until Keyword Succeeds    120s    20s    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${ARP_PUNT_TABLE}    False
-    ...    ${EMPTY}    arp_tpa=${EXTRA_NW_IP}[1],arp_op=1
-    BuiltIn.Wait Until Keyword Succeeds    120s    20s    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${ARP_LEARN_TABLE}    False
-    ...    ${EMPTY}    arp_spa=${EXTRA_NW_IP}[1],arp_op=1
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${L3_PUNT_TABLE}    True    ${EMPTY}    learn(table=${L3_PUNT_TABLE},hard_timeout=${VALID_TIMEOUTS}[0]
-    OVSDB.Verify Dump Flows For Specific Table    ${snat_napt_switch_ip}    ${SNAT_PUNT_TABLE}    True    ${EMPTY}    learn(table=${SNAT_PUNT_TABLE},hard_timeout=${VALID_TIMEOUTS}[0]
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${ARP_PUNT_TABLE}    True    ${EMPTY}    learn(table=${ARP_PUNT_TABLE},hard_timeout=${VALID_TIMEOUTS}[0]
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    120s
+    ...    20s
+    ...    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${L3_PUNT_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    nw_dst=11.1.1.255 actions=drop
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    120s
+    ...    20s
+    ...    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${snat_napt_switch_ip}
+    ...    ${SNAT_PUNT_TABLE}
+    ...    False
+    ...    ${EMPTY}
+    ...    tp_dst=${UDP_PORT} actions=drop
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    190s
+    ...    40s
+    ...    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${snat_napt_switch_ip}
+    ...    ${SNAT_PUNT_TABLE}
+    ...    False
+    ...    ${EMPTY}
+    ...    tp_dst=${TCP_PORT} actions=drop
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    120s
+    ...    20s
+    ...    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${ARP_PUNT_TABLE}
+    ...    False
+    ...    ${EMPTY}
+    ...    arp_tpa=${EXTRA_NW_IP}[1],arp_op=1
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    120s
+    ...    20s
+    ...    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${ARP_LEARN_TABLE}
+    ...    False
+    ...    ${EMPTY}
+    ...    arp_spa=${EXTRA_NW_IP}[1],arp_op=1
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${L3_PUNT_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    learn(table=${L3_PUNT_TABLE},hard_timeout=${VALID_TIMEOUTS}[0]
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${snat_napt_switch_ip}
+    ...    ${SNAT_PUNT_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    learn(table=${SNAT_PUNT_TABLE},hard_timeout=${VALID_TIMEOUTS}[0]
+    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${ARP_PUNT_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    learn(table=${ARP_PUNT_TABLE},hard_timeout=${VALID_TIMEOUTS}[0]
+
 
 *** Keywords ***
 Suite Setup
@@ -271,7 +635,11 @@ Suite Setup
     FOR    ${index}    IN RANGE    0    ${count}
         OpenStackOperations.Create SubNet    ${NETWORKS}[${index}]    ${SUBNETS}[${index}]    ${SUBNETS_CIDR}[${index}]
     END
-    OpenStackOperations.Create SubNet    ${EXT_NETWORKS}    ${EXT_SUBNETS}    ${EXT_SUBNETS_CIDR}    additional_args=--no-dhcp
+    OpenStackOperations.Create SubNet
+    ...    ${EXT_NETWORKS}
+    ...    ${EXT_SUBNETS}
+    ...    ${EXT_SUBNETS_CIDR}
+    ...    additional_args=--no-dhcp
     FOR    ${router}    IN    @{ROUTERS}
         OpenStackOperations.Create Router    ${router}
         ${router_id} =    OpenStackOperations.Get Router Id    ${router}
@@ -286,14 +654,36 @@ Suite Setup
     ${ext_net} =    BuiltIn.Create List    ${EXT_NETWORKS}
     ${NETWORKS_ALL} =    Collections.Combine Lists    ${NETWORKS}    ${ext_net}
     FOR    ${index}    IN RANGE    0    3
-        OpenStackOperations.Create Port    ${NETWORKS_ALL}[${index}]    ${PORT_LIST}[${index + ${index}}]    sg=${SECURITY_GROUP}
-        OpenStackOperations.Create Port    ${NETWORKS_ALL}[${index}]    ${PORT_LIST}[${index + ${index + 1}}]    sg=${SECURITY_GROUP}
+        OpenStackOperations.Create Port
+        ...    ${NETWORKS_ALL}[${index}]
+        ...    ${PORT_LIST}[${index + ${index}}]
+        ...    sg=${SECURITY_GROUP}
+        OpenStackOperations.Create Port
+        ...    ${NETWORKS_ALL}[${index}]
+        ...    ${PORT_LIST}[${index + ${index + 1}}]
+        ...    sg=${SECURITY_GROUP}
     END
-    OpenStackOperations.Create Port    ${NETWORKS}[0]    ${EXTRA_PORTS}[0]    sg=${SECURITY_GROUP}    additional_args=--allowed-address ip-address=0.0.0.0 --fixed-ip subnet=${SUBNETS}[0],ip-address=${EXTRA_NW_IP}[0]
-    OpenStackOperations.Create Port    ${NETWORKS}[1]    ${EXTRA_PORTS}[1]    sg=${SECURITY_GROUP}    additional_args=--allowed-address ip-address=0.0.0.0 --fixed-ip subnet=${SUBNETS}[1],ip-address=${EXTRA_NW_IP}[1]
+    OpenStackOperations.Create Port
+    ...    ${NETWORKS}[0]
+    ...    ${EXTRA_PORTS}[0]
+    ...    sg=${SECURITY_GROUP}
+    ...    additional_args=--allowed-address ip-address=0.0.0.0 --fixed-ip subnet=${SUBNETS}[0],ip-address=${EXTRA_NW_IP}[0]
+    OpenStackOperations.Create Port
+    ...    ${NETWORKS}[1]
+    ...    ${EXTRA_PORTS}[1]
+    ...    sg=${SECURITY_GROUP}
+    ...    additional_args=--allowed-address ip-address=0.0.0.0 --fixed-ip subnet=${SUBNETS}[1],ip-address=${EXTRA_NW_IP}[1]
     FOR    ${index}    IN RANGE    0    3
-        OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORT_LIST}[${index + ${index}}]    ${VM_LIST}[${index + ${index}}]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
-        OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORT_LIST}[${index + ${index + 1}}]    ${VM_LIST}[${index + ${index + 1}}]    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
+        OpenStackOperations.Create Vm Instance With Port On Compute Node
+        ...    ${PORT_LIST}[${index + ${index}}]
+        ...    ${VM_LIST}[${index + ${index}}]
+        ...    ${OS_CMP1_HOSTNAME}
+        ...    sg=${SECURITY_GROUP}
+        OpenStackOperations.Create Vm Instance With Port On Compute Node
+        ...    ${PORT_LIST}[${index + ${index + 1}}]
+        ...    ${VM_LIST}[${index + ${index + 1}}]
+        ...    ${OS_CMP2_HOSTNAME}
+        ...    sg=${SECURITY_GROUP}
     END
     @{VM_IPS}    ${dhcp_ip} =    OpenStackOperations.Get VM IPs    @{VM_LIST}
     BuiltIn.Set Suite Variable    ${VM_IPS}
@@ -301,20 +691,31 @@ Suite Setup
     BuiltIn.Should Not Contain    ${VM_IPS}    None
     BuiltIn.Should Not Contain    ${dhcp_ip}    None
     FOR    ${index}    IN RANGE    0    2
-        VpnOperations.VPN Create L3VPN    name=${VPN_NAME}[${index}]    vpnid=${VPN_ID}[${index}]    rd=${L3VPN_RD_IRT_ERT}[${index}]    exportrt=${L3VPN_RD_IRT_ERT}[${index}]    importrt=${L3VPN_RD_IRT_ERT}[${index}]
+        VpnOperations.VPN Create L3VPN
+        ...    name=${VPN_NAME}[${index}]
+        ...    vpnid=${VPN_ID}[${index}]
+        ...    rd=${L3VPN_RD_IRT_ERT}[${index}]
+        ...    exportrt=${L3VPN_RD_IRT_ERT}[${index}]
+        ...    importrt=${L3VPN_RD_IRT_ERT}[${index}]
     END
     VpnOperations.Associate VPN to Router    routerid=${ROUTERS_ID}[0]    vpnid=${VPN_ID}[0]
     ${network_id} =    OpenStackOperations.Get Net Id    ${EXT_NETWORKS}
     VpnOperations.Associate L3VPN To Network    networkid=${network_id}    vpnid=${VPN_ID}[1]
-    OpenStackOperations.Add Router Gateway    ${ROUTERS}[1]    ${EXT_NETWORKS}    additional_args=--fixed-ip subnet=${EXT_SUBNETS},ip-address=${EXT_SUBNETS_FIXED_IP} --enable-snat
+    OpenStackOperations.Add Router Gateway
+    ...    ${ROUTERS}[1]
+    ...    ${EXT_NETWORKS}
+    ...    additional_args=--fixed-ip subnet=${EXT_SUBNETS},ip-address=${EXT_SUBNETS_FIXED_IP} --enable-snat
     Create Dictionary For DPN ID And Compute IP Mapping For All DPNS
     OpenStackOperations.Get Suite Debugs
 
 Set Original TimeOut In Xml
-    [Arguments]    ${hard_timeout}
     [Documentation]    Set default timeout in XML for all the punt files
+    [Arguments]    ${hard_timeout}
     FOR    ${index}    IN RANGE    0    3
-        Change Hard Timeout Value In XML File    ${FILES_PATH}[${index}]    ${hard_timeout}    ${ORIGINAL_TIMEOUTS}[${index}]
+        Change Hard Timeout Value In XML File
+        ...    ${FILES_PATH}[${index}]
+        ...    ${hard_timeout}
+        ...    ${ORIGINAL_TIMEOUTS}[${index}]
         Verify Punt Values In XML File    ${FILES_PATH}[${index}]    ${ORIGINAL_TIMEOUTS}[${index}]
     END
     ClusterManagement.Stop_Members_From_List_Or_All
@@ -322,21 +723,25 @@ Set Original TimeOut In Xml
     BuiltIn.Wait Until Keyword Succeeds    120s    20s    OVSDB.Check OVS OpenFlow Connections    ${OS_CMP1_IP}    2
 
 Verify Punt Values In XML File
-    [Arguments]    ${file_path}    ${value}
     [Documentation]    Verify the default value for SNAT, ARP in ELAN, Subnet Routing in the xml file in ODL Controller
-    ${output} =    Utils.Run Command On Remote System And Log    ${ODL_SYSTEM_IP}    cat ${file_path} | grep punt-timeout
+    [Arguments]    ${file_path}    ${value}
+    ${output} =    Utils.Run Command On Remote System And Log
+    ...    ${ODL_SYSTEM_IP}
+    ...    cat ${file_path} | grep punt-timeout
     @{matches} =    BuiltIn.Should Match Regexp    ${output}    punt.timeout.*?([0-9]+)
     BuiltIn.Should be true    ${matches}[1] == ${value}
 
 Change Hard Timeout Value In XML File
-    [Arguments]    ${file_path}    ${value_1}    ${value_2}
     [Documentation]    Change the default value in xml in the ODL controller for subnet route, SNAT and ARP
-    Utils.Run Command On Remote System And Log    ${ODL_SYSTEM_IP}    sed -i -e 's/punt-timeout\>${value_1}/punt-timeout\>${value_2}/' ${file_path}
+    [Arguments]    ${file_path}    ${value_1}    ${value_2}
+    Utils.Run Command On Remote System And Log
+    ...    ${ODL_SYSTEM_IP}
+    ...    sed -i -e 's/punt-timeout\>${value_1}/punt-timeout\>${value_2}/' ${file_path}
 
 Create Dictionary For DPN ID And Compute IP Mapping For All DPNS
     [Documentation]    Creating dictionary for DPN ID and compute IP mapping
     FOR    ${ip}    IN    @{OS_ALL_IPS}
-        ${dpnid}    OVSDB.Get DPID    ${ip}
+        ${dpnid}    OVSDB.Get DPID    ${ip}
         Collections.Append To List    ${DPN_IDS}    ${dpnid}
     END
     ${DPN_TO_COMPUTE_IP} =    BuiltIn.Create Dictionary
@@ -350,18 +755,20 @@ Create Dictionary For DPN ID And Compute IP Mapping For All DPNS
     BuiltIn.Set Suite Variable    ${DPN_TO_COMPUTE_IP}
 
 Get SNAT NAPT Switch DPID
-    [Arguments]    ${router_name}
     [Documentation]    Returns the SNAT NAPT switch dpnid from odl rest call.
+    [Arguments]    ${router_name}
     ${router_id} =    OpenStackOperations.Get Router Id    ${router_name}
-    ${resp}    RequestsLibrary.Get Request    session    ${CONFIG_API}/odl-nat:napt-switches/router-to-napt-switch/${router_id}
+    ${resp} =    RequestsLibrary.Get Request
+    ...    session
+    ...    ${CONFIG_API}/odl-nat:napt-switches/router-to-napt-switch/${router_id}
     Log    ${resp.content}
     @{matches} =    BuiltIn.Should Match Regexp    ${resp.content}    switch.id.*?([0-9]+)
     ${dpnid} =    BuiltIn.Convert To Integer    ${matches}[1]
-    [Return]    ${dpnid}
+    RETURN    ${dpnid}
 
 Get NAPT Switch IP From DPID
-    [Arguments]    ${router_name}
     [Documentation]    Return SNAT NAPT switch ip for the given router name
+    [Arguments]    ${router_name}
     ${dpnid} =    BuiltIn.Wait Until Keyword Succeeds    60s    15s    Get SNAT NAPT Switch DPID    ${router_name}
     ${compute_ip} =    Collections.Get From Dictionary    ${DPN_TO_COMPUTE_IP}    ${dpnid}
-    [Return]    ${compute_ip}
+    RETURN    ${compute_ip}
index 2378c6e80ddc7da1eb0ab858b6d486f465794a86..fd63b126882a8adfa7684923f55a7041c623d949 100644 (file)
@@ -1,45 +1,49 @@
 *** Settings ***
-Documentation     Test suite to validate network address translation(snat/dnat) functionality in openstack integrated environment.
-...               All the testcases were written to do flow validation since dc gateway is unavailable in csit environment.
-...               This suite assumes proper integration bridges and vxlan tunnels are configured in the environment.
-Suite Setup       Suite Setup
-Suite Teardown    Stop Suite
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     OpenStackOperations.Get Test Teardown Debugs
-Library           Collections
-Library           RequestsLibrary
-Library           SSHLibrary
-Library           String
-Resource          ../../../libraries/BgpOperations.robot
-Resource          ../../../libraries/OpenStackOperations.robot
-Resource          ../../../libraries/SetupUtils.robot
-Resource          ../../../libraries/Tcpdump.robot
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/VpnOperations.robot
-Resource          ../../../variables/Variables.robot
-Resource          ../../../variables/netvirt/Variables.robot
+Documentation       Test suite to validate network address translation(snat/dnat) functionality in openstack integrated environment.
+...                 All the testcases were written to do flow validation since dc gateway is unavailable in csit environment.
+...                 This suite assumes proper integration bridges and vxlan tunnels are configured in the environment.
+
+Library             Collections
+Library             RequestsLibrary
+Library             SSHLibrary
+Library             String
+Resource            ../../../libraries/BgpOperations.robot
+Resource            ../../../libraries/OpenStackOperations.robot
+Resource            ../../../libraries/SetupUtils.robot
+Resource            ../../../libraries/Tcpdump.robot
+Resource            ../../../libraries/Utils.robot
+Resource            ../../../libraries/VpnOperations.robot
+Resource            ../../../variables/Variables.robot
+Resource            ../../../variables/netvirt/Variables.robot
+
+Suite Setup         Suite Setup
+Suite Teardown      Stop Suite
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       OpenStackOperations.Get Test Teardown Debugs
+
 
 *** Variables ***
-${SECURITY_GROUP}    nat_sg
-${NETWORK_TYPE}    gre
-${SNAT_ENABLED}    "enable_snat": true
-${SNAT_DISABLED}    "enable_snat": false
-${ROUTER}         nat_router
-${AS_ID}          100
-${DCGW_SYSTEM_IP}    ${TOOLS_SYSTEM_1_IP}
-${LOOPBACK_IP}    5.5.5.2
-${DCGW_RD}        100:1
-${VPN_NAME}       vpn_1
-${VPN_INSTANCE_ID}    4ae8cd92-48ca-49b5-94e1-b2921a261442
-${ExtIP}          100.100.100.24
-@{NETWORKS}       nat_net_1    nat_net_2
-@{EXTERNAL_NETWORKS}    nat_ext_11    nat_ext_22
+${SECURITY_GROUP}           nat_sg
+${NETWORK_TYPE}             gre
+${SNAT_ENABLED}             "enable_snat": true
+${SNAT_DISABLED}            "enable_snat": false
+${ROUTER}                   nat_router
+${AS_ID}                    100
+${DCGW_SYSTEM_IP}           ${TOOLS_SYSTEM_1_IP}
+${LOOPBACK_IP}              5.5.5.2
+${DCGW_RD}                  100:1
+${VPN_NAME}                 vpn_1
+${VPN_INSTANCE_ID}          4ae8cd92-48ca-49b5-94e1-b2921a261442
+${ExtIP}                    100.100.100.24
+@{NETWORKS}                 nat_net_1    nat_net_2
+@{EXTERNAL_NETWORKS}        nat_ext_11    nat_ext_22
 @{EXTERNAL_SUB_NETWORKS}    nat_ext_sub_net_1    nat_ext_sub_net_2
-@{SUBNETS}        nat_sub_net_1    nat_sub_net_2
-@{SUBNET_CIDRS}    10.1.1.0/24    20.1.1.0/24
-@{EXT_SUBNET_CIDRS}    100.100.100.0/24    200.200.200.0/24
-@{PORTS}          nat_port_1    nat_port_2    nat_port_3    nat_port_4
-@{NET_1_VMS}      nat_net_1_vm_1    nat_net_1_vm_2    nat_net_1_vm_3    nat_net_1_vm_4
+@{SUBNETS}                  nat_sub_net_1    nat_sub_net_2
+@{SUBNET_CIDRS}             10.1.1.0/24    20.1.1.0/24
+@{EXT_SUBNET_CIDRS}         100.100.100.0/24    200.200.200.0/24
+@{PORTS}                    nat_port_1    nat_port_2    nat_port_3    nat_port_4
+@{NET_1_VMS}                nat_net_1_vm_1    nat_net_1_vm_2    nat_net_1_vm_3    nat_net_1_vm_4
+
 
 *** Test Cases ***
 Verify Successful Creation Of External Network With Router External Set To TRUE
@@ -68,29 +72,53 @@ Verify Successful Deletion Of External Network
 Verify Floating Ip Provision And Reachability From External Network Via Neutron Router Through L3vpn
     [Documentation]    Check floating IP should be present in dump flows after creating the floating IP and associating it to external network
     ...    which is associated to L3VPN
-    VpnOperations.VPN Create L3VPN    vpnid=${VPN_INSTANCE_ID}    name=${VPN_NAME}    rd=["${DCGW_RD}"]    exportrt=["${DCGW_RD}"]    importrt=["${DCGW_RD}"]
+    VpnOperations.VPN Create L3VPN
+    ...    vpnid=${VPN_INSTANCE_ID}
+    ...    name=${VPN_NAME}
+    ...    rd=["${DCGW_RD}"]
+    ...    exportrt=["${DCGW_RD}"]
+    ...    importrt=["${DCGW_RD}"]
     ${ext_net_id} =    OpenStackOperations.Get Net Id    ${EXTERNAL_NETWORKS}[0]
     VpnOperations.Associate L3VPN To Network    networkid=${ext_net_id}    vpnid=${VPN_INSTANCE_ID}
     OpenStackOperations.Add Router Gateway    ${ROUTER}    ${EXTERNAL_NETWORKS}[0]    --disable-snat
     ${output} =    OpenStackOperations.Show Router    ${ROUTER}
     BuiltIn.Should Contain    ${output}    ${SNAT_DISABLED}
     ${subnetid} =    OpenStackOperations.Get Subnet Id    ${EXTERNAL_SUB_NETWORKS}[0]
-    OpenStackOperations.Add Router Gateway    ${ROUTER}    ${EXTERNAL_NETWORKS}[0]    --fixed-ip subnet=${subnetid},ip-address=${ExtIP}
+    OpenStackOperations.Add Router Gateway
+    ...    ${ROUTER}
+    ...    ${EXTERNAL_NETWORKS}[0]
+    ...    --fixed-ip subnet=${subnetid},ip-address=${ExtIP}
     ${float} =    OpenStackOperations.Create And Associate Floating IPs    ${EXTERNAL_NETWORKS}[0]    ${NET_1_VMS}[0]
     ${float} =    BuiltIn.Set Variable    ${float}[0]
     @{matching_paras} =    BuiltIn.Create List    nw_dst=${float}    goto_table:${DNAT_TABLE}
-    BuiltIn.Wait Until Keyword Succeeds    10s    5s    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${PDNAT_TABLE}    True
-    ...    ${EMPTY}    @{matching_paras}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    10s
+    ...    5s
+    ...    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${PDNAT_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    @{matching_paras}
     @{matching_paras} =    BuiltIn.Create List    actions=set_field:${float}    goto_table:${SNAT_TABLE}
-    BuiltIn.Wait Until Keyword Succeeds    10s    5s    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${PSNAT_TABLE}    True
-    ...    ${EMPTY}    @{matching_paras}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    10s
+    ...    5s
+    ...    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${PSNAT_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    @{matching_paras}
 
 Verify Floating Ip De-provision And Reachability From External Network Via Neutron Router Through L3vpn
     [Documentation]    Check floating IP should not be present in dump flows after deleting the floating IP
     ...    and removing the external gateway from router which is associated to L3VPN
     OpenStackOperations.Get ControlNode Connection
     ${output} =    OpenStackOperations.OpenStack CLI    openstack floating ip list |awk '{print$2}'
-    ${floating_id} =    BuiltIn.Should Match Regexp    ${output}    [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
+    ${floating_id} =    BuiltIn.Should Match Regexp
+    ...    ${output}
+    ...    [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
     OpenStackOperations.Delete Floating IP    ${floating_id}
     OpenStackOperations.Remove Gateway    ${ROUTER}
     ${output} =    OVSDB.Get Flow Entries On Node    ${OS_CMP1_CONN_ID}
@@ -100,30 +128,57 @@ Verify Floating Ip Re-provision And Reachability From External Network Via Neutr
     [Documentation]    Check floating IP should be present in dump flows after creating the floating IP again wnd associating it to external network
     ...    which is associated to L3VPN
     ${subnetid} =    OpenStackOperations.Get Subnet Id    ${EXTERNAL_SUB_NETWORKS}[0]
-    OpenStackOperations.Add Router Gateway    ${ROUTER}    ${EXTERNAL_NETWORKS}[0]    --fixed-ip subnet=${subnetid},ip-address=${ExtIP}
+    OpenStackOperations.Add Router Gateway
+    ...    ${ROUTER}
+    ...    ${EXTERNAL_NETWORKS}[0]
+    ...    --fixed-ip subnet=${subnetid},ip-address=${ExtIP}
     ${float} =    OpenStackOperations.Create And Associate Floating IPs    ${EXTERNAL_NETWORKS}[0]    ${NET_1_VMS}[0]
     ${float} =    BuiltIn.Set Variable    ${float}[0]
     @{matching_paras} =    BuiltIn.Create List    nw_dst=${float}    goto_table:${DNAT_TABLE}
-    BuiltIn.Wait Until Keyword Succeeds    10s    5s    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${PDNAT_TABLE}    True
-    ...    ${EMPTY}    @{matching_paras}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    10s
+    ...    5s
+    ...    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${PDNAT_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    @{matching_paras}
     @{matching_paras} =    BuiltIn.Create List    actions=set_field:${float}    goto_table:${SNAT_TABLE}
-    BuiltIn.Wait Until Keyword Succeeds    10s    5s    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${PSNAT_TABLE}    True
-    ...    ${EMPTY}    @{matching_paras}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    10s
+    ...    5s
+    ...    OVSDB.Verify Dump Flows For Specific Table
+    ...    ${OS_CMP1_IP}
+    ...    ${PSNAT_TABLE}
+    ...    True
+    ...    ${EMPTY}
+    ...    @{matching_paras}
 
 Verify Multiple Floating Ip Creation and Association to external network
     [Documentation]    Check Multiple floating IPs should be present in dump flows after creating multiple floating IPs and associating it to external network
     ...    which is associated to L3VPN
     ${subnetid} =    OpenStackOperations.Get Subnet Id    ${EXTERNAL_SUB_NETWORKS}[0]
-    OpenStackOperations.Add Router Gateway    ${ROUTER}    ${EXTERNAL_NETWORKS}[0]    --fixed-ip subnet=${subnetid},ip-address=${ExtIP}
-    ${FloatIp1} =    OpenStackOperations.Create And Associate Floating IPs    ${EXTERNAL_NETWORKS}[0]    ${NET_1_VMS}[1]
-    ${FloatIp2} =    OpenStackOperations.Create And Associate Floating IPs    ${EXTERNAL_NETWORKS}[0]    ${NET_1_VMS}[2]
-    ${FloatIp3} =    OpenStackOperations.Create And Associate Floating IPs    ${EXTERNAL_NETWORKS}[0]    ${NET_1_VMS}[3]
+    OpenStackOperations.Add Router Gateway
+    ...    ${ROUTER}
+    ...    ${EXTERNAL_NETWORKS}[0]
+    ...    --fixed-ip subnet=${subnetid},ip-address=${ExtIP}
+    ${FloatIp1} =    OpenStackOperations.Create And Associate Floating IPs
+    ...    ${EXTERNAL_NETWORKS}[0]
+    ...    ${NET_1_VMS}[1]
+    ${FloatIp2} =    OpenStackOperations.Create And Associate Floating IPs
+    ...    ${EXTERNAL_NETWORKS}[0]
+    ...    ${NET_1_VMS}[2]
+    ${FloatIp3} =    OpenStackOperations.Create And Associate Floating IPs
+    ...    ${EXTERNAL_NETWORKS}[0]
+    ...    ${NET_1_VMS}[3]
     ${output} =    OVSDB.Get Flow Entries On Node    ${OS_CMP2_CONN_ID}
     BuiltIn.Should Match Regexp    ${output}    ${ExtIP}
     BuiltIn.Should Match Regexp    ${output}    .*${FloatIp1}.*
     BuiltIn.Should Match Regexp    ${output}    .*${FloatIp2}.*
     BuiltIn.Should Match Regexp    ${output}    .*${FloatIp3}.*
 
+
 *** Keywords ***
 Suite Setup
     [Documentation]    Test Suite for Subnet_Routing_and_Multicast_Deployments.
@@ -137,12 +192,21 @@ Suite Setup
 Create Setup
     Create Neutron Networks
     Create Neutron Subnets
-    OpenStackOperations.Create SubNet    ${EXTERNAL_NETWORKS}[0]    ${EXTERNAL_SUB_NETWORKS}[0]    ${EXT_SUBNET_CIDRS}[0]
+    OpenStackOperations.Create SubNet
+    ...    ${EXTERNAL_NETWORKS}[0]
+    ...    ${EXTERNAL_SUB_NETWORKS}[0]
+    ...    ${EXT_SUBNET_CIDRS}[0]
     OpenStackOperations.Create Allow All SecurityGroup    ${SECURITY_GROUP}
     Create Neutron Ports
     Create Nova VMs
     BgpOperations.Setup BGP Peering On ODL    ${ODL_SYSTEM_IP}    ${AS_ID}    ${DCGW_SYSTEM_IP}
-    BgpOperations.Setup BGP Peering On DCGW    ${DCGW_SYSTEM_IP}    ${AS_ID}    ${ODL_SYSTEM_IP}    ${VPN_NAME}    ${DCGW_RD}    ${LOOPBACK_IP}
+    BgpOperations.Setup BGP Peering On DCGW
+    ...    ${DCGW_SYSTEM_IP}
+    ...    ${AS_ID}
+    ...    ${ODL_SYSTEM_IP}
+    ...    ${VPN_NAME}
+    ...    ${DCGW_RD}
+    ...    ${LOOPBACK_IP}
     OpenStackOperations.Create Router    ${ROUTER}
     OpenStackOperations.Add Router Interface    ${ROUTER}    ${SUBNETS}[0]
     OpenStackOperations.Add Router Interface    ${ROUTER}    ${SUBNETS}[1]
@@ -161,7 +225,12 @@ Create Neutron Subnets
     FOR    ${index}    IN RANGE    0    ${num_of_networks}
         OpenStackOperations.Create SubNet    ${NETWORKS}[${index}]    ${SUBNETS}[${index}]    ${SUBNET_CIDRS}[${index}]
     END
-    BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${SUBNETWORK_URL}    ${SUBNETS}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    3s
+    ...    1s
+    ...    Utils.Check For Elements At URI
+    ...    ${SUBNETWORK_URL}
+    ...    ${SUBNETS}
 
 Create Neutron Ports
     [Documentation]    Create required number of ports under previously created subnets
@@ -169,14 +238,35 @@ Create Neutron Ports
     OpenStackOperations.Create Port    ${NETWORKS}[0]    ${PORTS}[1]    sg=${SECURITY_GROUP}
     OpenStackOperations.Create Port    ${NETWORKS}[1]    ${PORTS}[2]    sg=${SECURITY_GROUP}
     OpenStackOperations.Create Port    ${NETWORKS}[1]    ${PORTS}[3]    sg=${SECURITY_GROUP}
-    BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${CONFIG_API}/neutron:neutron/ports/    ${PORTS}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    3s
+    ...    1s
+    ...    Utils.Check For Elements At URI
+    ...    ${CONFIG_API}/neutron:neutron/ports/
+    ...    ${PORTS}
 
 Create Nova VMs
     [Documentation]    Create Vm instances on compute nodes
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS}[0]    ${NET_1_VMS}[0]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS}[1]    ${NET_1_VMS}[1]    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS}[2]    ${NET_1_VMS}[2]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS}[3]    ${NET_1_VMS}[3]    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${PORTS}[0]
+    ...    ${NET_1_VMS}[0]
+    ...    ${OS_CMP1_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${PORTS}[1]
+    ...    ${NET_1_VMS}[1]
+    ...    ${OS_CMP2_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${PORTS}[2]
+    ...    ${NET_1_VMS}[2]
+    ...    ${OS_CMP1_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${PORTS}[3]
+    ...    ${NET_1_VMS}[3]
+    ...    ${OS_CMP2_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
     @{NET_1_VM_IPS}    ${NET_1_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_1_VMS}
     BuiltIn.Set Suite Variable    @{NET_1_VM_IPS}
     BuiltIn.Should Not Contain    ${NET_1_VM_IPS}    None
index 18e110636f1e98eefb9e6f47e53317a21c52faeb..975c02cc200d937ed6dd80b70bea94d331531980 100644 (file)
@@ -1,59 +1,93 @@
 *** Settings ***
-Documentation     Test suite to validate subnet routing and multicast functionality in an openstack integrated environment.
-...               The assumption of this suite is that the environment is already configured with the proper
-...               integration bridges and vxlan tunnels.
-Suite Setup       Suite Setup
-Suite Teardown    Stop Suite
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     OpenStackOperations.Get Test Teardown Debugs
-Resource          ../../../libraries/BgpOperations.robot
-Resource          ../../../libraries/KarafKeywords.robot
-Resource          ../../../libraries/OpenStackOperations.robot
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/SetupUtils.robot
-Resource          ../../../variables/Variables.robot
-Resource          ../../../variables/netvirt/Variables.robot
-Resource          ../../../libraries/VpnOperations.robot
+Documentation       Test suite to validate subnet routing and multicast functionality in an openstack integrated environment.
+...                 The assumption of this suite is that the environment is already configured with the proper
+...                 integration bridges and vxlan tunnels.
+
+Resource            ../../../libraries/BgpOperations.robot
+Resource            ../../../libraries/KarafKeywords.robot
+Resource            ../../../libraries/OpenStackOperations.robot
+Resource            ../../../libraries/Utils.robot
+Resource            ../../../libraries/SetupUtils.robot
+Resource            ../../../variables/Variables.robot
+Resource            ../../../variables/netvirt/Variables.robot
+Resource            ../../../libraries/VpnOperations.robot
+
+Suite Setup         Suite Setup
+Suite Teardown      Stop Suite
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       OpenStackOperations.Get Test Teardown Debugs
+
 
 *** Variables ***
-${AS_ID}          100
-${SECURITY_GROUP}    mc_sg
-${NUM_OF_PORTS_PER_NETWORK}    4
-${NUM_OF_INSTANCES}    20
-${VPN_INSTANCE_ID}    4ae8cd92-48ca-49b5-94e1-b2921a261111
-${VPN_NAME}       mc_vpn1
-${LOOPBACK_IP}    5.5.5.2
-${L3VPN_RD}       2200:2
-${DCGW_SYSTEM_IP}    ${TOOLS_SYSTEM_1_IP}
-${RPING_MIP_IP}    sudo arping -I eth0:1 -c 5 -b -s ${EXTRA_NW_SUBNET}[0] ${EXTRA_NW_SUBNET}[0]
-${RPING_MIP_IP1}    sudo arping -I eth0:1 -c 5 -b -s ${EXTRA_NW_SUBNET}[1] ${EXTRA_NW_SUBNET}[1]
-${RPING_MIP_IP2}    sudo arping -I eth0:1 -c 5 -b -s ${EXTRA_NW_SUBNET}[2] ${EXTRA_NW_SUBNET}[2]
-${RPING_MIP_IP3}    sudo arping -I eth0:1 -c 5 -b -s ${NEW_EXTRA_NW_SUBNET} ${NEW_EXTRA_NW_SUBNET}
-@{INTERFACE_STATE}    up    down
-@{NETWORKS}       mc_net_1    mc_net_2    mc_net_3
-@{NET_1_VMS}      mc_net_1_vm_1    mc_net_1_vm_2    mc_net_1_vm_3    mc_net_1_vm_4
-@{NET_2_VMS}      mc_net_2_vm_1    mc_net_2_vm_2    mc_net_2_vm_3    mc_net_2_vm_4
-@{NET_3_VMS}      mc_net_3_vm_1    mc_net_3_vm_2    mc_net_3_vm_3    mc_net_3_vm_4
-@{NET_1_PORTS}    mc_net_1_port_1    mc_net_1_port_2    mc_net_1_port_3    mc_net_1_port_4
-@{NET_2_PORTS}    mc_net_2_port_1    mc_net_2_port_2    mc_net_2_port_3    mc_net_2_port_4
-@{NET_3_PORTS}    mc_net_3_port_1    mc_net_3_port_2    mc_net_3_port_3    mc_net_3_port_4
-@{SUBNETS}        mc_sub_1    mc_sub_2    mc_sub_3
-@{SUBNET_CIDR}    10.1.0.0/24    10.2.0.0/24    10.3.0.0/24
-@{EXTRA_NW_SUBNET}    10.1.0.100    10.2.0.100    10.3.0.100
-${NEW_EXTRA_NW_SUBNET}    10.1.0.110
-${MASK}           255.255.255.0
+${AS_ID}                        100
+${SECURITY_GROUP}               mc_sg
+${NUM_OF_PORTS_PER_NETWORK}     4
+${NUM_OF_INSTANCES}             20
+${VPN_INSTANCE_ID}              4ae8cd92-48ca-49b5-94e1-b2921a261111
+${VPN_NAME}                     mc_vpn1
+${LOOPBACK_IP}                  5.5.5.2
+${L3VPN_RD}                     2200:2
+${DCGW_SYSTEM_IP}               ${TOOLS_SYSTEM_1_IP}
+${RPING_MIP_IP}                 sudo arping -I eth0:1 -c 5 -b -s ${EXTRA_NW_SUBNET}[0] ${EXTRA_NW_SUBNET}[0]
+${RPING_MIP_IP1}                sudo arping -I eth0:1 -c 5 -b -s ${EXTRA_NW_SUBNET}[1] ${EXTRA_NW_SUBNET}[1]
+${RPING_MIP_IP2}                sudo arping -I eth0:1 -c 5 -b -s ${EXTRA_NW_SUBNET}[2] ${EXTRA_NW_SUBNET}[2]
+${RPING_MIP_IP3}                sudo arping -I eth0:1 -c 5 -b -s ${NEW_EXTRA_NW_SUBNET} ${NEW_EXTRA_NW_SUBNET}
+@{INTERFACE_STATE}              up    down
+@{NETWORKS}                     mc_net_1    mc_net_2    mc_net_3
+@{NET_1_VMS}                    mc_net_1_vm_1    mc_net_1_vm_2    mc_net_1_vm_3    mc_net_1_vm_4
+@{NET_2_VMS}                    mc_net_2_vm_1    mc_net_2_vm_2    mc_net_2_vm_3    mc_net_2_vm_4
+@{NET_3_VMS}                    mc_net_3_vm_1    mc_net_3_vm_2    mc_net_3_vm_3    mc_net_3_vm_4
+@{NET_1_PORTS}                  mc_net_1_port_1    mc_net_1_port_2    mc_net_1_port_3    mc_net_1_port_4
+@{NET_2_PORTS}                  mc_net_2_port_1    mc_net_2_port_2    mc_net_2_port_3    mc_net_2_port_4
+@{NET_3_PORTS}                  mc_net_3_port_1    mc_net_3_port_2    mc_net_3_port_3    mc_net_3_port_4
+@{SUBNETS}                      mc_sub_1    mc_sub_2    mc_sub_3
+@{SUBNET_CIDR}                  10.1.0.0/24    10.2.0.0/24    10.3.0.0/24
+@{EXTRA_NW_SUBNET}              10.1.0.100    10.2.0.100    10.3.0.100
+${NEW_EXTRA_NW_SUBNET}          10.1.0.110
+${MASK}                         255.255.255.0
+
 
 *** Test Cases ***
 Verify The Subnet Route When Neutron Port Hosting Subnet Route Is Down/up On Single VSwitch Topology
     [Documentation]    Verify the subnet route when enterprise host is down and up.
-    BuiltIn.Wait Until Keyword Succeeds    30s    5s    OpenStackOperations.Configure_IP_On_Sub_Interface    ${NETWORKS}[0]    ${EXTRA_NW_SUBNET}[0]    ${NET_1_VM_IPS}[0]
-    ...    ${MASK}    ${INTERFACE_STATE}[1]
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    5s
+    ...    OpenStackOperations.Configure_IP_On_Sub_Interface
+    ...    ${NETWORKS}[0]
+    ...    ${EXTRA_NW_SUBNET}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ${MASK}
+    ...    ${INTERFACE_STATE}[1]
     ${allowed_ip_list} =    BuiltIn.Create List    ${EXTRA_NW_SUBNET}[0]
-    BuiltIn.Wait Until Keyword Succeeds    30s    10s    Utils.Check For Elements At URI    ${FIB_ENTRY_URL}    ${allowed_ip_list}
-    BuiltIn.Wait Until Keyword Succeeds    30s    5s    OpenStackOperations.Configure_IP_On_Sub_Interface    ${NETWORKS}[0]    ${EXTRA_NW_SUBNET}[0]    ${NET_1_VM_IPS}[0]
-    ...    ${MASK}    ${INTERFACE_STATE}[0]
-    BuiltIn.Wait Until Keyword Succeeds    30s    5s    OpenStackOperations.Verify_IP_Configured_On_Sub_Interface    ${NETWORKS}[0]    ${EXTRA_NW_SUBNET}[0]    ${NET_1_VM_IPS}[0]
-    BuiltIn.Wait Until Keyword Succeeds    30s    10s    Utils.Check For Elements At URI    ${FIB_ENTRY_URL}    ${allowed_ip_list}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    Utils.Check For Elements At URI
+    ...    ${FIB_ENTRY_URL}
+    ...    ${allowed_ip_list}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    5s
+    ...    OpenStackOperations.Configure_IP_On_Sub_Interface
+    ...    ${NETWORKS}[0]
+    ...    ${EXTRA_NW_SUBNET}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ${MASK}
+    ...    ${INTERFACE_STATE}[0]
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    5s
+    ...    OpenStackOperations.Verify_IP_Configured_On_Sub_Interface
+    ...    ${NETWORKS}[0]
+    ...    ${EXTRA_NW_SUBNET}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    Utils.Check For Elements At URI
+    ...    ${FIB_ENTRY_URL}
+    ...    ${allowed_ip_list}
     Verify Ping between Inter Intra And Enterprise host
 
 Verify Enterprise Hosts Reachability After VM Reboot
@@ -62,9 +96,22 @@ Verify Enterprise Hosts Reachability After VM Reboot
     @{NET_1_VM_IPS}    ${NET1_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_1_VMS}
     OpenStackOperations.Reboot Nova VM    ${NET_1_VMS}[0]
     @{NET_1_VM_IPS}    ${NET1_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_1_VMS}
-    BuiltIn.Wait Until Keyword Succeeds    30s    5s    OpenStackOperations.Configure_IP_On_Sub_Interface    ${NETWORKS}[0]    ${EXTRA_NW_SUBNET}[0]    ${NET_1_VM_IPS}[0]
-    ...    ${MASK}    ${INTERFACE_STATE}[0]
-    BuiltIn.Wait Until Keyword Succeeds    30s    5s    OpenStackOperations.Verify_IP_Configured_On_Sub_Interface    ${NETWORKS}[0]    ${EXTRA_NW_SUBNET}[0]    ${NET_1_VM_IPS}[0]
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    5s
+    ...    OpenStackOperations.Configure_IP_On_Sub_Interface
+    ...    ${NETWORKS}[0]
+    ...    ${EXTRA_NW_SUBNET}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ${MASK}
+    ...    ${INTERFACE_STATE}[0]
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    5s
+    ...    OpenStackOperations.Verify_IP_Configured_On_Sub_Interface
+    ...    ${NETWORKS}[0]
+    ...    ${EXTRA_NW_SUBNET}[0]
+    ...    ${NET_1_VM_IPS}[0]
     Verify Ping between Inter Intra And Enterprise host
 
 Verify The Subnet Route For Multiple Subnets On Multi VSwitch Topology When DC-GW Is Restarted
@@ -96,7 +143,10 @@ Verify The Subnet Route When Vswitch Hosting Subnet Enterprise Host Is Restarted
 
 Verify The Subnet Route For One Subnet On Single Vswitch
     [Documentation]    Verify the subnet route for one subnet on a single VSwitch
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[2]    ${NET_2_VM_IPS}[1]    ping -c 3 ${EXTRA_NW_SUBNET}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[2]
+    ...    ${NET_2_VM_IPS}[1]
+    ...    ping -c 3 ${EXTRA_NW_SUBNET}[1]
     BuiltIn.Should Contain    ${output}    64 bytes
     Utils.Check For Elements At URI    ${FIB_ENTRY_URL}    ${EXTRA_NW_SUBNET}
     Verify Ping between Inter Intra And Enterprise host
@@ -106,10 +156,16 @@ Verify The Subnet Route For Multiple Subnets On Multi Vswitch Topology
     BuiltIn.Log    Bring up enterprise host in another vswitch
     Configure_IP_On_Sub_Interface    ${NETWORKS}[0]    ${NEW_EXTRA_NW_SUBNET}    ${NET_1_VM_IPS}[2]    ${MASK}
     Verify_IP_Configured_On_Sub_Interface    ${NETWORKS}[0]    ${NEW_EXTRA_NW_SUBNET}    ${NET_1_VM_IPS}[2]
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[2]    ${RPING_MIP_IP3}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[2]
+    ...    ${RPING_MIP_IP3}
     BuiltIn.Should Contain    ${output}    broadcast
     BuiltIn.Should Contain    ${output}    Received 0 reply
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[2]    ${NET_1_VM_IPS}[2]    ping -c 3 ${NEW_EXTRA_NW_SUBNET}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[2]
+    ...    ${NET_1_VM_IPS}[2]
+    ...    ping -c 3 ${NEW_EXTRA_NW_SUBNET}
     BuiltIn.Should Contain    ${output}    64 bytes
     Verify Ping between Inter Intra And Enterprise host
 
@@ -128,6 +184,7 @@ Verify The Subnet Route When The Network Is Removed From The Vpn
     Utils.Check For Elements At URI    ${FIB_ENTRY_URL}    ${vm_ip_list}
     Verify Ping between Inter Intra And Enterprise host
 
+
 *** Keywords ***
 Suite Setup
     [Documentation]    Test Suite for Subnet_Routing_and_Multicast_Deployments.
@@ -163,11 +220,20 @@ Create Setup
     Create BGP Config On ODL
     Create BGP Config On DCGW
     BuiltIn.Wait Until Keyword Succeeds    60s    10s    VpnOperations.Verify Tunnel Status as UP
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ${RPING_MIP_IP}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ${RPING_MIP_IP}
     BuiltIn.Should Contain    ${output}    broadcast    Received 0 reply
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${NET_2_VM_IPS}[0]    ${RPING_MIP_IP1}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${NET_2_VM_IPS}[0]
+    ...    ${RPING_MIP_IP1}
     BuiltIn.Should Contain    ${output}    broadcast    Received 0 reply
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[2]    ${NET_3_VM_IPS}[0]    ${RPING_MIP_IP2}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[2]
+    ...    ${NET_3_VM_IPS}[0]
+    ...    ${RPING_MIP_IP2}
     BuiltIn.Should Contain    ${output}    broadcast    Received 0 reply
 
 Create Neutron Networks
@@ -178,37 +244,81 @@ Create Neutron Networks
     BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${NETWORK_URL}    ${NETWORKS}
 
 Create Neutron Subnets
-    [Arguments]    ${num_of_network}    ${additional_args}=${EMPTY}    ${verbose}=TRUE
     [Documentation]    Create required number of subnets for previously created networks
+    [Arguments]    ${num_of_network}    ${additional_args}=${EMPTY}    ${verbose}=TRUE
     FOR    ${index}    IN RANGE    0    ${num_of_network}
         OpenStackOperations.Create SubNet    ${NETWORKS}[${index}]    ${SUBNETS}[${index}]    ${SUBNET_CIDR}[${index}]
     END
-    BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${SUBNETWORK_URL}    ${SUBNETS}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    3s
+    ...    1s
+    ...    Utils.Check For Elements At URI
+    ...    ${SUBNETWORK_URL}
+    ...    ${SUBNETS}
 
 Create Neutron Ports
     [Documentation]    Create required number of ports under previously created subnets
-    ${allowed_address_pairs_args1} =    BuiltIn.Set Variable    --allowed-address ip-address=${EXTRA_NW_SUBNET}[0] --allowed-address ip-address=${EXTRA_NW_SUBNET}[1]
-    ${allowed_address_pairs_args2} =    BuiltIn.Set Variable    --allowed-address ip-address=${EXTRA_NW_SUBNET}[1] --allowed-address ip-address=${EXTRA_NW_SUBNET}[2]
-    ${allowed_address_pairs_args3} =    BuiltIn.Set Variable    --allowed-address ip-address=${EXTRA_NW_SUBNET}[2] --allowed-address ip-address=${EXTRA_NW_SUBNET}[0]
+    ${allowed_address_pairs_args1} =    BuiltIn.Set Variable
+    ...    --allowed-address ip-address=${EXTRA_NW_SUBNET}[0] --allowed-address ip-address=${EXTRA_NW_SUBNET}[1]
+    ${allowed_address_pairs_args2} =    BuiltIn.Set Variable
+    ...    --allowed-address ip-address=${EXTRA_NW_SUBNET}[1] --allowed-address ip-address=${EXTRA_NW_SUBNET}[2]
+    ${allowed_address_pairs_args3} =    BuiltIn.Set Variable
+    ...    --allowed-address ip-address=${EXTRA_NW_SUBNET}[2] --allowed-address ip-address=${EXTRA_NW_SUBNET}[0]
     FOR    ${index}    IN RANGE    0    ${NUM_OF_PORTS_PER_NETWORK}
-        OpenStackOperations.Create Port    ${NETWORKS}[0]    ${NET_1_PORTS}[${index}]    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args1}
+        OpenStackOperations.Create Port
+        ...    ${NETWORKS}[0]
+        ...    ${NET_1_PORTS}[${index}]
+        ...    sg=${SECURITY_GROUP}
+        ...    additional_args=${allowed_address_pairs_args1}
     END
     FOR    ${index}    IN RANGE    0    ${NUM_OF_PORTS_PER_NETWORK}
-        OpenStackOperations.Create Port    ${NETWORKS}[1]    ${NET_2_PORTS}[${index}]    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args2}
+        OpenStackOperations.Create Port
+        ...    ${NETWORKS}[1]
+        ...    ${NET_2_PORTS}[${index}]
+        ...    sg=${SECURITY_GROUP}
+        ...    additional_args=${allowed_address_pairs_args2}
     END
     FOR    ${index}    IN RANGE    0    ${NUM_OF_PORTS_PER_NETWORK}
-        OpenStackOperations.Create Port    ${NETWORKS}[2]    ${NET_3_PORTS}[${index}]    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args3}
+        OpenStackOperations.Create Port
+        ...    ${NETWORKS}[2]
+        ...    ${NET_3_PORTS}[${index}]
+        ...    sg=${SECURITY_GROUP}
+        ...    additional_args=${allowed_address_pairs_args3}
     END
 
 Create Nova VMs
     [Documentation]    Create Vm instances on compute nodes
     FOR    ${index}    IN RANGE    0    2
-        OpenStackOperations.Create Vm Instance With Port On Compute Node    ${NET_1_PORTS}[${index}]    ${NET_1_VMS}[${index}]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
-        OpenStackOperations.Create Vm Instance With Port On Compute Node    ${NET_1_PORTS}[${index+2}]    ${NET_1_VMS}[${index+2}]    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
-        OpenStackOperations.Create Vm Instance With Port On Compute Node    ${NET_2_PORTS}[${index}]    ${NET_2_VMS}[${index}]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
-        OpenStackOperations.Create Vm Instance With Port On Compute Node    ${NET_2_PORTS}[${index+2}]    ${NET_2_VMS}[${index+2}]    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
-        OpenStackOperations.Create Vm Instance With Port On Compute Node    ${NET_3_PORTS}[${index}]    ${NET_3_VMS}[${index}]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
-        OpenStackOperations.Create Vm Instance With Port On Compute Node    ${NET_3_PORTS}[${index+2}]    ${NET_3_VMS}[${index+2}]    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
+        OpenStackOperations.Create Vm Instance With Port On Compute Node
+        ...    ${NET_1_PORTS}[${index}]
+        ...    ${NET_1_VMS}[${index}]
+        ...    ${OS_CMP1_HOSTNAME}
+        ...    sg=${SECURITY_GROUP}
+        OpenStackOperations.Create Vm Instance With Port On Compute Node
+        ...    ${NET_1_PORTS}[${index+2}]
+        ...    ${NET_1_VMS}[${index+2}]
+        ...    ${OS_CMP2_HOSTNAME}
+        ...    sg=${SECURITY_GROUP}
+        OpenStackOperations.Create Vm Instance With Port On Compute Node
+        ...    ${NET_2_PORTS}[${index}]
+        ...    ${NET_2_VMS}[${index}]
+        ...    ${OS_CMP1_HOSTNAME}
+        ...    sg=${SECURITY_GROUP}
+        OpenStackOperations.Create Vm Instance With Port On Compute Node
+        ...    ${NET_2_PORTS}[${index+2}]
+        ...    ${NET_2_VMS}[${index+2}]
+        ...    ${OS_CMP2_HOSTNAME}
+        ...    sg=${SECURITY_GROUP}
+        OpenStackOperations.Create Vm Instance With Port On Compute Node
+        ...    ${NET_3_PORTS}[${index}]
+        ...    ${NET_3_VMS}[${index}]
+        ...    ${OS_CMP1_HOSTNAME}
+        ...    sg=${SECURITY_GROUP}
+        OpenStackOperations.Create Vm Instance With Port On Compute Node
+        ...    ${NET_3_PORTS}[${index+2}]
+        ...    ${NET_3_VMS}[${index+2}]
+        ...    ${OS_CMP2_HOSTNAME}
+        ...    sg=${SECURITY_GROUP}
     END
     @{NET_1_VM_IPS}    ${NET1_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_1_VMS}
     @{NET_2_VM_IPS}    ${NET2_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_2_VMS}
@@ -223,21 +333,66 @@ Create Nova VMs
 
 Create Sub Interfaces And Verify
     [Documentation]    Create Sub Interface and verify for all VMs
-    BuiltIn.Wait Until Keyword Succeeds    30s    5s    OpenStackOperations.Configure_IP_On_Sub_Interface    ${NETWORKS}[0]    ${EXTRA_NW_SUBNET}[0]    ${NET_1_VM_IPS}[0]
-    ...    ${MASK}    ${INTERFACE_STATE}[0]
-    BuiltIn.Wait Until Keyword Succeeds    30s    5s    OpenStackOperations.Verify_IP_Configured_On_Sub_Interface    ${NETWORKS}[0]    ${EXTRA_NW_SUBNET}[0]    ${NET_1_VM_IPS}[0]
-    BuiltIn.Wait Until Keyword Succeeds    30s    5s    OpenStackOperations.Configure_IP_On_Sub_Interface    ${NETWORKS}[1]    ${EXTRA_NW_SUBNET}[1]    ${NET_2_VM_IPS}[0]
-    ...    ${MASK}    ${INTERFACE_STATE}[0]
-    BuiltIn.Wait Until Keyword Succeeds    30s    5s    OpenStackOperations.Verify_IP_Configured_On_Sub_Interface    ${NETWORKS}[1]    ${EXTRA_NW_SUBNET}[1]    ${NET_2_VM_IPS}[0]
-    BuiltIn.Wait Until Keyword Succeeds    30s    5s    OpenStackOperations.Configure_IP_On_Sub_Interface    ${NETWORKS}[2]    ${EXTRA_NW_SUBNET}[2]    ${NET_3_VM_IPS}[0]
-    ...    ${MASK}    ${INTERFACE_STATE}[0]
-    BuiltIn.Wait Until Keyword Succeeds    30s    5s    OpenStackOperations.Verify_IP_Configured_On_Sub_Interface    ${NETWORKS}[2]    ${EXTRA_NW_SUBNET}[2]    ${NET_3_VM_IPS}[0]
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    5s
+    ...    OpenStackOperations.Configure_IP_On_Sub_Interface
+    ...    ${NETWORKS}[0]
+    ...    ${EXTRA_NW_SUBNET}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ${MASK}
+    ...    ${INTERFACE_STATE}[0]
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    5s
+    ...    OpenStackOperations.Verify_IP_Configured_On_Sub_Interface
+    ...    ${NETWORKS}[0]
+    ...    ${EXTRA_NW_SUBNET}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    5s
+    ...    OpenStackOperations.Configure_IP_On_Sub_Interface
+    ...    ${NETWORKS}[1]
+    ...    ${EXTRA_NW_SUBNET}[1]
+    ...    ${NET_2_VM_IPS}[0]
+    ...    ${MASK}
+    ...    ${INTERFACE_STATE}[0]
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    5s
+    ...    OpenStackOperations.Verify_IP_Configured_On_Sub_Interface
+    ...    ${NETWORKS}[1]
+    ...    ${EXTRA_NW_SUBNET}[1]
+    ...    ${NET_2_VM_IPS}[0]
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    5s
+    ...    OpenStackOperations.Configure_IP_On_Sub_Interface
+    ...    ${NETWORKS}[2]
+    ...    ${EXTRA_NW_SUBNET}[2]
+    ...    ${NET_3_VM_IPS}[0]
+    ...    ${MASK}
+    ...    ${INTERFACE_STATE}[0]
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    5s
+    ...    OpenStackOperations.Verify_IP_Configured_On_Sub_Interface
+    ...    ${NETWORKS}[2]
+    ...    ${EXTRA_NW_SUBNET}[2]
+    ...    ${NET_3_VM_IPS}[0]
 
 Create L3VPN
     [Documentation]    Create L3VPN and verify the same
     ${net_id} =    OpenStackOperations.Get Net Id    ${NETWORKS}[0]
     ${tenant_id} =    OpenStackOperations.Get Tenant ID From Network    ${net_id}
-    VpnOperations.VPN Create L3VPN    vpnid=${VPN_INSTANCE_ID}    name=${VPN_NAME}    rd=["${L3VPN_RD}"]    exportrt=["${L3VPN_RD}"]    importrt=["${L3VPN_RD}"]    tenantid=${tenant_id}
+    VpnOperations.VPN Create L3VPN
+    ...    vpnid=${VPN_INSTANCE_ID}
+    ...    name=${VPN_NAME}
+    ...    rd=["${L3VPN_RD}"]
+    ...    exportrt=["${L3VPN_RD}"]
+    ...    importrt=["${L3VPN_RD}"]
+    ...    tenantid=${tenant_id}
     VpnOperations.Verify L3VPN On ODL    ${VPN_INSTANCE_ID}
 
 Create BGP Config On ODL
@@ -250,11 +405,22 @@ Create BGP Config On ODL
 
 Create BGP Config On DCGW
     [Documentation]    Configure BGP on DCGW
-    BgpOperations.Configure BGP And Add Neighbor On DCGW    ${DCGW_SYSTEM_IP}    ${AS_ID}    ${DCGW_SYSTEM_IP}    ${ODL_SYSTEM_IP}    ${VPN_NAME}    ${L3VPN_RD}
+    BgpOperations.Configure BGP And Add Neighbor On DCGW
+    ...    ${DCGW_SYSTEM_IP}
+    ...    ${AS_ID}
+    ...    ${DCGW_SYSTEM_IP}
+    ...    ${ODL_SYSTEM_IP}
+    ...    ${VPN_NAME}
+    ...    ${L3VPN_RD}
     ...    ${LOOPBACK_IP}
     ${output} =    BgpOperations.Execute Show Command On Quagga    ${DCGW_SYSTEM_IP}    ${RUN_CONFIG}
     BuiltIn.Should Contain    ${output}    ${ODL_SYSTEM_IP}
-    ${output} =    BuiltIn.Wait Until Keyword Succeeds    180s    10s    BgpOperations.Verify BGP Neighbor Status On Quagga    ${DCGW_SYSTEM_IP}    ${ODL_SYSTEM_IP}
+    ${output} =    BuiltIn.Wait Until Keyword Succeeds
+    ...    180s
+    ...    10s
+    ...    BgpOperations.Verify BGP Neighbor Status On Quagga
+    ...    ${DCGW_SYSTEM_IP}
+    ...    ${ODL_SYSTEM_IP}
 
 Verify Ping between Inter Intra And Enterprise host
     [Documentation]    Ping Enterprise Host for Intra, Inter from different and same network
index 3013597d4832f31ee2815c7236b408954f144ddc..5a5ea9530716df020e3fc1ed4fbf1f40bb861fe0 100644 (file)
@@ -1,37 +1,45 @@
 *** Settings ***
-Documentation     Test suite for ODL Upgrade. It is assumed that OLD + OpenStack
-...               integrated environment is deployed and ready.
-Suite Setup       Suite Setup
-Suite Teardown    Upgrade Suite Teardown
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     Get Test Teardown Debugs
-Library           OperatingSystem
-Library           RequestsLibrary
-Library           SSHLibrary
-Resource          ../../../libraries/ClusterManagement.robot
-Resource          ../../../libraries/DevstackUtils.robot
-Resource          ../../../libraries/KarafKeywords.robot
-Resource          ../../../libraries/OpenStackOperations.robot
-Resource          ../../../libraries/OVSDB.robot
-Resource          ../../../libraries/SetupUtils.robot
-Resource          ../../../libraries/Utils.robot
+Documentation       Test suite for ODL Upgrade. It is assumed that OLD + OpenStack
+...                 integrated environment is deployed and ready.
+
+Library             OperatingSystem
+Library             RequestsLibrary
+Library             SSHLibrary
+Resource            ../../../libraries/ClusterManagement.robot
+Resource            ../../../libraries/DevstackUtils.robot
+Resource            ../../../libraries/KarafKeywords.robot
+Resource            ../../../libraries/OpenStackOperations.robot
+Resource            ../../../libraries/OVSDB.robot
+Resource            ../../../libraries/SetupUtils.robot
+Resource            ../../../libraries/Utils.robot
+
+Suite Setup         Suite Setup
+Suite Teardown      Upgrade Suite Teardown
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       Get Test Teardown Debugs
+
 
 *** Variables ***
-${SECURITY_GROUP}    upgrade_sg
-@{NETWORKS}       upgrade_net_1    upgrade_net_2
-@{SUBNETS}        upgrade_sub_1    upgrade_sub_2
-@{NET_1_VMS}      upgrade_net_1_vm_1    upgrade_net_1_vm_2
-@{NET_2_VMS}      upgrade_net_2_vm_1    upgrade_net_2_vm_2
-@{SUBNETS_RANGE}    91.0.0.0/24    92.0.0.0/24
-${ROUTER}         upgrade_router_1
-${TYPE}           tun
-${PASSIVE_MANAGER}    ptcp:6641:127.0.0.1
-@{DEBUG_LOG_COMPONENTS}    org.opendaylight.ovsdb    org.opendaylight.ovsdb.lib    org.opendaylight.netvirt    org.opendaylight.genius
-${UPDATE_FLAG_PATH}    /restconf/config/odl-serviceutils-upgrade:upgrade-config
-${GET_ACTIVE_BUNDLE_URI}    /restconf/operations/arbitrator-reconcile:get-active-bundle
-${COMMIT_ACTIVE_BUNDLE_URI}    /restconf/operations/arbitrator-reconcile:commit-active-bundle
-${COMMIT_ACTIVE_BUNDLE_DIR}    ${CURDIR}/../../../variables/netvirt/commit_active_bundle
-${SET_BUNDLE_TIMEOUT}    sudo ovs-vsctl set O . other_config:bundle-idle-timeout=3600
+${SECURITY_GROUP}               upgrade_sg
+@{NETWORKS}                     upgrade_net_1    upgrade_net_2
+@{SUBNETS}                      upgrade_sub_1    upgrade_sub_2
+@{NET_1_VMS}                    upgrade_net_1_vm_1    upgrade_net_1_vm_2
+@{NET_2_VMS}                    upgrade_net_2_vm_1    upgrade_net_2_vm_2
+@{SUBNETS_RANGE}                91.0.0.0/24    92.0.0.0/24
+${ROUTER}                       upgrade_router_1
+${TYPE}                         tun
+${PASSIVE_MANAGER}              ptcp:6641:127.0.0.1
+@{DEBUG_LOG_COMPONENTS}
+...                             org.opendaylight.ovsdb
+...                             org.opendaylight.ovsdb.lib
+...                             org.opendaylight.netvirt
+...                             org.opendaylight.genius
+${UPDATE_FLAG_PATH}             /restconf/config/odl-serviceutils-upgrade:upgrade-config
+${GET_ACTIVE_BUNDLE_URI}        /restconf/operations/arbitrator-reconcile:get-active-bundle
+${COMMIT_ACTIVE_BUNDLE_URI}     /restconf/operations/arbitrator-reconcile:commit-active-bundle
+${COMMIT_ACTIVE_BUNDLE_DIR}     ${CURDIR}/../../../variables/netvirt/commit_active_bundle
+${SET_BUNDLE_TIMEOUT}           sudo ovs-vsctl set O . other_config:bundle-idle-timeout=3600
+
 
 *** Test Cases ***
 Create Setup And Verify Instance Connectivity
@@ -68,13 +76,18 @@ Wait For Full Sync
     Wait Until Keyword Succeeds    90s    5s    Canary Network Should Exist
 
 Set Upgrade Flag
-    ${resp} =    RequestsLibrary.Put Request    session    ${UPDATE_FLAG_PATH}    {"upgrade-config":{"upgradeInProgress":true}}
+    ${resp} =    RequestsLibrary.Put Request
+    ...    session
+    ...    ${UPDATE_FLAG_PATH}
+    ...    {"upgrade-config":{"upgradeInProgress":true}}
     BuiltIn.Should Be Equal As Strings    ${resp.status_code}    200
 
 Set OVS Manager And Controller
     [Documentation]    Set controller and manager on each OpenStack node and check that egress flows are present
     FOR    ${node}    IN    @{OS_ALL_IPS}
-        Utils.Run Command On Remote System And Log    ${node}    sudo ovs-vsctl set-manager tcp:${ODL_SYSTEM_IP}:${OVSDBPORT} ${PASSIVE_MANAGER}
+        Utils.Run Command On Remote System And Log
+        ...    ${node}
+        ...    sudo ovs-vsctl set-manager tcp:${ODL_SYSTEM_IP}:${OVSDBPORT} ${PASSIVE_MANAGER}
     END
     Wait Until Keyword Succeeds    60s    10s    Verify Bundle Active State
     FOR    ${node}    IN    @{OS_ALL_IPS}
@@ -88,7 +101,10 @@ Set OVS Manager And Controller
     Wait Until Keyword Succeeds    180s    15s    Check OVS Nodes Have Egress Flows
 
 UnSet Upgrade Flag
-    ${resp} =    RequestsLibrary.Put Request    session    ${UPDATE_FLAG_PATH}    {"upgrade-config":{"upgradeInProgress":false}}
+    ${resp} =    RequestsLibrary.Put Request
+    ...    session
+    ...    ${UPDATE_FLAG_PATH}
+    ...    {"upgrade-config":{"upgradeInProgress":false}}
     BuiltIn.Should Be Equal As Strings    ${resp.status_code}    200
 
 Check Connectivity With Previously Created Resources And br-int Info
@@ -96,6 +112,7 @@ Check Connectivity With Previously Created Resources And br-int Info
     ...    up and config is sync'd
     Wait Until Keyword Succeeds    90s    10s    Check Resource Connectivity
 
+
 *** Keywords ***
 Suite Setup
     OpenStackOperations.OpenStack Suite Setup
@@ -113,10 +130,18 @@ Create Resources
     OpenStackOperations.Create Allow All SecurityGroup    ${SECURITY_GROUP}
     OpenStackOperations.Create Nano Flavor
     FOR    ${vm}    IN    @{NET_1_VMS}
-        OpenStackOperations.Create Vm Instance On Compute Node    ${NETWORKS}[0]    ${vm}    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
+        OpenStackOperations.Create Vm Instance On Compute Node
+        ...    ${NETWORKS}[0]
+        ...    ${vm}
+        ...    ${OS_CMP1_HOSTNAME}
+        ...    sg=${SECURITY_GROUP}
     END
     FOR    ${vm}    IN    @{NET_2_VMS}
-        OpenStackOperations.Create Vm Instance On Compute Node    ${NETWORKS}[1]    ${vm}    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
+        OpenStackOperations.Create Vm Instance On Compute Node
+        ...    ${NETWORKS}[1]
+        ...    ${vm}
+        ...    ${OS_CMP2_HOSTNAME}
+        ...    sg=${SECURITY_GROUP}
     END
     OpenStackOperations.Create Router    ${ROUTER}
     FOR    ${interface}    IN    @{SUBNETS}
@@ -147,9 +172,11 @@ Check OVS Nodes Have Egress Flows
     END
 
 Does OVS Have Multiple Egress Flows
-    [Arguments]    ${ip}
     [Documentation]    Verifies that at least 1 flow exists on the node for the ${EGRESS_L2_FWD_TABLE}
-    ${flows} =    Utils.Run Command On Remote System And Log    ${ip}    sudo ovs-ofctl -O OpenFlow13 dump-flows ${INTEGRATION_BRIDGE}
+    [Arguments]    ${ip}
+    ${flows} =    Utils.Run Command On Remote System And Log
+    ...    ${ip}
+    ...    sudo ovs-ofctl -O OpenFlow13 dump-flows ${INTEGRATION_BRIDGE}
     ${egress_flows} =    String.Get Lines Containing String    ${flows}    table=${EGRESS_LPORT_DISPATCHER_TABLE}
     ${num_egress_flows} =    String.Get Line Count    ${egress_flows}
     BuiltIn.Should Be True    ${num_egress_flows} > 1
index 208b5cd6ba853274d7d439ebbc921b70ab5fec81..57435dce1681041175daf3923e673ca6f01f79e2 100644 (file)
@@ -1,62 +1,82 @@
 *** Settings ***
-Documentation     Test Suite for vni-based-l2-l3-nat:
-...               This feature attempts to realize the use of VxLAN VNI
-...               (Virtual Network Identifier) for VxLAN tenant traffic
-...               flowing on the cloud data-network. This is applicable
-...               to L2 switching, L3 forwarding and NATing for all VxLAN
-...               based provider networks. In doing so, it eliminates the
-...               presence of LPort tags, ELAN tags and MPLS labels on the
-...               wire and instead, replaces them with VNIs supplied by the
-...               tenant’s OpenStack.
-Suite Setup       Suite Setup
-Suite Teardown    Suite Teardown
-Test Setup        VpnOperations.VNI Test Setup
-Test Teardown     VpnOperations.VNI Test Teardown
-Library           OperatingSystem
-Library           RequestsLibrary
-Library           String
-Resource          ../../../libraries/DevstackUtils.robot
-Resource          ../../../libraries/KarafKeywords.robot
-Resource          ../../../variables/netvirt/Variables.robot
-Resource          ../../../libraries/OpenStackOperations.robot
-Resource          ../../../libraries/OVSDB.robot
-Resource          ../../../libraries/SetupUtils.robot
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/VpnOperations.robot
-Resource          ../../../variables/netvirt/Variables.robot
-Resource          ../../../variables/Variables.robot
+Documentation       Test Suite for vni-based-l2-l3-nat:
+...                 This feature attempts to realize the use of VxLAN VNI
+...                 (Virtual Network Identifier) for VxLAN tenant traffic
+...                 flowing on the cloud data-network. This is applicable
+...                 to L2 switching, L3 forwarding and NATing for all VxLAN
+...                 based provider networks. In doing so, it eliminates the
+...                 presence of LPort tags, ELAN tags and MPLS labels on the
+...                 wire and instead, replaces them with VNIs supplied by the
+...                 tenant’s OpenStack.
+
+Library             OperatingSystem
+Library             RequestsLibrary
+Library             String
+Resource            ../../../libraries/DevstackUtils.robot
+Resource            ../../../libraries/KarafKeywords.robot
+Resource            ../../../variables/netvirt/Variables.robot
+Resource            ../../../libraries/OpenStackOperations.robot
+Resource            ../../../libraries/OVSDB.robot
+Resource            ../../../libraries/SetupUtils.robot
+Resource            ../../../libraries/Utils.robot
+Resource            ../../../libraries/VpnOperations.robot
+Resource            ../../../variables/netvirt/Variables.robot
+Resource            ../../../variables/Variables.robot
+
+Suite Setup         Suite Setup
+Suite Teardown      Suite Teardown
+Test Setup          VpnOperations.VNI Test Setup
+Test Teardown       VpnOperations.VNI Test Teardown
+
 
 *** Variables ***
-${EGRESS}         Egress
-${INGRESS}        Ingress
-${IP}             ipv6
-${VNI6_SECURITY_GROUP}    vni6_sg
-@{VNI6_NETWORKS}    vni6_net_0    vni6_net_1    vni6_net_2    vni6_net_3
-@{VNI6_SUBNETS}    vni6_sub_0    vni6_sub_1    vni6_sub_2    vni6_sub_3
-@{VNI6_SUBNET_CIDRS}    2001:db8:0:4::/64    2001:db8:0:5::/64    2001:db8:0:6::/64    2001:db8:0:7::/64
-@{VNI6_NET_0_PORTS}    vni6_net_0_port_1    vni6_net_0_port_2
-@{VNI6_NET_1_PORTS}    vni6_net_1_port_1    vni6_net_1_port_2
-@{VNI6_NET_2_PORTS}    vni6_net_2_port_1    vni6_net_2_port_2
-@{VNI6_NET_3_PORTS}    vni6_net_3_port_1    vni6_net_3_port_2
-@{VNI6_NET_0_VMS}    vni6_net_0_vm_1
-@{VNI6_NET_1_VMS}    vni6_net_1_vm_1
-@{VNI6_NET_2_VMS}    vni6_net_2_vm_1
-@{VNI6_NET_3_VMS}    vni6_net_3_vm_1
-@{VNI6_ROUTER}    vni6_router1    vni6_router2    vni6_router3
-@{VNI6_RDS}       ["2600:2"]    ["2700:2"]    ["2800:2"]
-@{VNI6_VPN_NAMES}    VNI6_vpn_1    VNI6_vpn_2    VNI6_vpn_3
-@{VNI6_VPN_INSTANCE_IDS}    4ae8cd92-48ca-49b5-94e1-b2921a261551    4ae8cd92-48ca-49b5-94e1-b2921a261552    4ae8cd92-48ca-49b5-94e1-b2921a261553
-${NET0_ADDITIONAL_ARGS}    --ip-version=6 --ipv6-address-mode=slaac --ipv6-ra-mode=slaac --allocation-pool start=2001:db8:0:4::2,end=2001:db8:0:4:ffff:ffff:ffff:fffe
-${NET1_ADDITIONAL_ARGS}    --ip-version=6 --ipv6-address-mode=slaac --ipv6-ra-mode=slaac --allocation-pool start=2001:db8:0:5::2,end=2001:db8:0:5:ffff:ffff:ffff:fffe
-${NET2_ADDITIONAL_ARGS}    --ip-version=6 --ipv6-address-mode=slaac --ipv6-ra-mode=slaac --allocation-pool start=2001:db8:0:6::2,end=2001:db8:0:6:ffff:ffff:ffff:fffe
-${NET3_ADDITIONAL_ARGS}    --ip-version=6 --ipv6-address-mode=slaac --ipv6-ra-mode=slaac --allocation-pool start=2001:db8:0:7::2,end=2001:db8:0:7:ffff:ffff:ffff:fffe
+${EGRESS}                   Egress
+${INGRESS}                  Ingress
+${IP}                       ipv6
+${VNI6_SECURITY_GROUP}      vni6_sg
+@{VNI6_NETWORKS}            vni6_net_0    vni6_net_1    vni6_net_2    vni6_net_3
+@{VNI6_SUBNETS}             vni6_sub_0    vni6_sub_1    vni6_sub_2    vni6_sub_3
+@{VNI6_SUBNET_CIDRS}        2001:db8:0:4::/64    2001:db8:0:5::/64    2001:db8:0:6::/64    2001:db8:0:7::/64
+@{VNI6_NET_0_PORTS}         vni6_net_0_port_1    vni6_net_0_port_2
+@{VNI6_NET_1_PORTS}         vni6_net_1_port_1    vni6_net_1_port_2
+@{VNI6_NET_2_PORTS}         vni6_net_2_port_1    vni6_net_2_port_2
+@{VNI6_NET_3_PORTS}         vni6_net_3_port_1    vni6_net_3_port_2
+@{VNI6_NET_0_VMS}           vni6_net_0_vm_1
+@{VNI6_NET_1_VMS}           vni6_net_1_vm_1
+@{VNI6_NET_2_VMS}           vni6_net_2_vm_1
+@{VNI6_NET_3_VMS}           vni6_net_3_vm_1
+@{VNI6_ROUTER}              vni6_router1    vni6_router2    vni6_router3
+@{VNI6_RDS}                 ["2600:2"]    ["2700:2"]    ["2800:2"]
+@{VNI6_VPN_NAMES}           VNI6_vpn_1    VNI6_vpn_2    VNI6_vpn_3
+@{VNI6_VPN_INSTANCE_IDS}
+...                         4ae8cd92-48ca-49b5-94e1-b2921a261551
+...                         4ae8cd92-48ca-49b5-94e1-b2921a261552
+...                         4ae8cd92-48ca-49b5-94e1-b2921a261553
+${NET0_ADDITIONAL_ARGS}
+...                         --ip-version=6 --ipv6-address-mode=slaac --ipv6-ra-mode=slaac --allocation-pool start=2001:db8:0:4::2,end=2001:db8:0:4:ffff:ffff:ffff:fffe
+${NET1_ADDITIONAL_ARGS}
+...                         --ip-version=6 --ipv6-address-mode=slaac --ipv6-ra-mode=slaac --allocation-pool start=2001:db8:0:5::2,end=2001:db8:0:5:ffff:ffff:ffff:fffe
+${NET2_ADDITIONAL_ARGS}
+...                         --ip-version=6 --ipv6-address-mode=slaac --ipv6-ra-mode=slaac --allocation-pool start=2001:db8:0:6::2,end=2001:db8:0:6:ffff:ffff:ffff:fffe
+${NET3_ADDITIONAL_ARGS}
+...                         --ip-version=6 --ipv6-address-mode=slaac --ipv6-ra-mode=slaac --allocation-pool start=2001:db8:0:7::2,end=2001:db8:0:7:ffff:ffff:ffff:fffe
+
 
 *** Test Cases ***
 VNI Based IPv6 Forwarding
     [Documentation]    verify VNI id for IPv6 Unicast frames exchanged over OVS datapaths that are on different hypervisors
     BuiltIn.Pass Execution If    "${OPENSTACK_TOPO}" == "1cmb-0ctl-0cmp"    "Test is not supported for combo node"
-    BuiltIn.Wait Until Keyword Succeeds    60s    5s    OVSDB.Verify Vni Segmentation Id and Tunnel Id    ${VNI6_NET_0_PORTS}[0]    ${VNI6_NET_1_PORTS}[0]    ${VNI6_NETWORKS}[0]
-    ...    ${VNI6_NETWORKS}[1]    ${VM_IP_NET0}[0]    ${VM_IP_NET1}[0]    ${IP}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    60s
+    ...    5s
+    ...    OVSDB.Verify Vni Segmentation Id and Tunnel Id
+    ...    ${VNI6_NET_0_PORTS}[0]
+    ...    ${VNI6_NET_1_PORTS}[0]
+    ...    ${VNI6_NETWORKS}[0]
+    ...    ${VNI6_NETWORKS}[1]
+    ...    ${VM_IP_NET0}[0]
+    ...    ${VM_IP_NET1}[0]
+    ...    ${IP}
 
 VNI Based IPv6 Forwarding With BGPVPN Router Association
     [Documentation]    verify VNI id for IPv6 Unicast frames exchanged over OVS datapaths that are on different hypervisors
@@ -64,15 +84,30 @@ VNI Based IPv6 Forwarding With BGPVPN Router Association
     BuiltIn.Pass Execution If    "${OPENSTACK_TOPO}" == "1cmb-0ctl-0cmp"    "Test is not supported for combo node"
     ${net_id} =    OpenStackOperations.Get Net Id    ${VNI6_NETWORKS}[0]
     ${tenant_id} =    OpenStackOperations.Get Tenant ID From Network    ${net_id}
-    VpnOperations.VPN Create L3VPN    vpnid=${VNI6_VPN_INSTANCE_IDS}[0]    name=${VNI6_VPN_NAMES}[0]    rd=${VNI6_RDS}[0]    exportrt=${VNI6_RDS}[0]    importrt=${VNI6_RDS}[0]    tenantid=${tenant_id}
+    VpnOperations.VPN Create L3VPN
+    ...    vpnid=${VNI6_VPN_INSTANCE_IDS}[0]
+    ...    name=${VNI6_VPN_NAMES}[0]
+    ...    rd=${VNI6_RDS}[0]
+    ...    exportrt=${VNI6_RDS}[0]
+    ...    importrt=${VNI6_RDS}[0]
+    ...    tenantid=${tenant_id}
     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VNI6_VPN_INSTANCE_IDS}[0]
     BuiltIn.Should Contain    ${resp}    ${VNI6_VPN_INSTANCE_IDS}[0]
     ${router_id} =    OpenStackOperations.Get Router Id    ${VNI6_ROUTER}[0]
     VpnOperations.Associate VPN to Router    routerid=${router_id}    vpnid=${VNI6_VPN_INSTANCE_IDS}[0]
     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VNI6_VPN_INSTANCE_IDS}[0]
     BuiltIn.Should Contain    ${resp}    ${router_id}
-    BuiltIn.Wait Until Keyword Succeeds    60s    5s    OVSDB.Verify Vni Segmentation Id and Tunnel Id    ${VNI6_NET_0_PORTS}[0]    ${VNI6_NET_1_PORTS}[0]    ${VNI6_NETWORKS}[0]
-    ...    ${VNI6_NETWORKS}[1]    ${VM_IP_NET0}[0]    ${VM_IP_NET1}[0]    ${IP}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    60s
+    ...    5s
+    ...    OVSDB.Verify Vni Segmentation Id and Tunnel Id
+    ...    ${VNI6_NET_0_PORTS}[0]
+    ...    ${VNI6_NET_1_PORTS}[0]
+    ...    ${VNI6_NETWORKS}[0]
+    ...    ${VNI6_NETWORKS}[1]
+    ...    ${VM_IP_NET0}[0]
+    ...    ${VM_IP_NET1}[0]
+    ...    ${IP}
 
 VNI Based IPv6 Forwarding With Two Routers And BGPVPN With Irt Ert
     [Documentation]    verify VNI id for IPv6 Unicast frames exchanged over OVS datapaths that are on different hypervisors
@@ -80,8 +115,16 @@ VNI Based IPv6 Forwarding With Two Routers And BGPVPN With Irt Ert
     BuiltIn.Pass Execution If    "${OPENSTACK_TOPO}" == "1cmb-0ctl-0cmp"    "Test is not supported for combo node"
     OpenStackOperations.Create Network    ${VNI6_NETWORKS}[2]
     OpenStackOperations.Create Network    ${VNI6_NETWORKS}[3]
-    OpenStackOperations.Create SubNet    ${VNI6_NETWORKS}[2]    ${VNI6_SUBNETS}[2]    ${VNI6_SUBNET_CIDRS}[2]    ${NET2_ADDITIONAL_ARGS}
-    OpenStackOperations.Create SubNet    ${VNI6_NETWORKS}[3]    ${VNI6_SUBNETS}[3]    ${VNI6_SUBNET_CIDRS}[3]    ${NET3_ADDITIONAL_ARGS}
+    OpenStackOperations.Create SubNet
+    ...    ${VNI6_NETWORKS}[2]
+    ...    ${VNI6_SUBNETS}[2]
+    ...    ${VNI6_SUBNET_CIDRS}[2]
+    ...    ${NET2_ADDITIONAL_ARGS}
+    OpenStackOperations.Create SubNet
+    ...    ${VNI6_NETWORKS}[3]
+    ...    ${VNI6_SUBNETS}[3]
+    ...    ${VNI6_SUBNET_CIDRS}[3]
+    ...    ${NET3_ADDITIONAL_ARGS}
     OpenStackOperations.Create Port    ${VNI6_NETWORKS}[2]    ${VNI6_NET_2_PORTS}[0]    sg=${VNI6_SECURITY_GROUP}
     OpenStackOperations.Create Port    ${VNI6_NETWORKS}[3]    ${VNI6_NET_3_PORTS}[0]    sg=${VNI6_SECURITY_GROUP}
     OpenStackOperations.Create Router    ${VNI6_ROUTER}[1]
@@ -90,56 +133,125 @@ VNI Based IPv6 Forwarding With Two Routers And BGPVPN With Irt Ert
     OpenStackOperations.Add Router Interface    ${VNI6_ROUTER}[2]    ${VNI6_SUBNETS}[3]
     ${net_id} =    OpenStackOperations.Get Net Id    ${VNI6_NETWORKS}[2]
     ${tenant_id} =    OpenStackOperations.Get Tenant ID From Network    ${net_id}
-    VpnOperations.VPN Create L3VPN    vpnid=${VNI6_VPN_INSTANCE_IDS}[1]    name=${VNI6_VPN_NAMES}[1]    rd=${VNI6_RDS}[1]    exportrt=${VNI6_RDS}[1]    importrt=${VNI6_RDS}[2]    tenantid=${tenant_id}
+    VpnOperations.VPN Create L3VPN
+    ...    vpnid=${VNI6_VPN_INSTANCE_IDS}[1]
+    ...    name=${VNI6_VPN_NAMES}[1]
+    ...    rd=${VNI6_RDS}[1]
+    ...    exportrt=${VNI6_RDS}[1]
+    ...    importrt=${VNI6_RDS}[2]
+    ...    tenantid=${tenant_id}
     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VNI6_VPN_INSTANCE_IDS}[1]
     BuiltIn.Should Contain    ${resp}    ${VNI6_VPN_INSTANCE_IDS}[1]
     ${router_id} =    OpenStackOperations.Get Router Id    ${VNI6_ROUTER}[1]
     VpnOperations.Associate VPN to Router    routerid=${router_id}    vpnid=${VNI6_VPN_INSTANCE_IDS}[1]
     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VNI6_VPN_INSTANCE_IDS}[1]
     BuiltIn.Should Contain    ${resp}    ${router_id}
-    VpnOperations.VPN Create L3VPN    vpnid=${VNI6_VPN_INSTANCE_IDS}[2]    name=${VNI6_VPN_NAMES}[2]    rd=${VNI6_RDS}[2]    exportrt=${VNI6_RDS}[2]    importrt=${VNI6_RDS}[1]    tenantid=${tenant_id}
+    VpnOperations.VPN Create L3VPN
+    ...    vpnid=${VNI6_VPN_INSTANCE_IDS}[2]
+    ...    name=${VNI6_VPN_NAMES}[2]
+    ...    rd=${VNI6_RDS}[2]
+    ...    exportrt=${VNI6_RDS}[2]
+    ...    importrt=${VNI6_RDS}[1]
+    ...    tenantid=${tenant_id}
     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VNI6_VPN_INSTANCE_IDS}[2]
     BuiltIn.Should Contain    ${resp}    ${VNI6_VPN_INSTANCE_IDS}[2]
     ${router_id} =    OpenStackOperations.Get Router Id    ${VNI6_ROUTER}[2]
     VpnOperations.Associate VPN to Router    routerid=${router_id}    vpnid=${VNI6_VPN_INSTANCE_IDS}[2]
     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VNI6_VPN_INSTANCE_IDS}[2]
     BuiltIn.Should Contain    ${resp}    ${router_id}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${VNI6_NET_2_PORTS}[0]    ${VNI6_NET_2_VMS}[0]    ${OS_CMP1_HOSTNAME}    sg=${VNI6_SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${VNI6_NET_3_PORTS}[0]    ${VNI6_NET_3_VMS}[0]    ${OS_CMP2_HOSTNAME}    sg=${VNI6_SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${VNI6_NET_2_PORTS}[0]
+    ...    ${VNI6_NET_2_VMS}[0]
+    ...    ${OS_CMP1_HOSTNAME}
+    ...    sg=${VNI6_SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${VNI6_NET_3_PORTS}[0]
+    ...    ${VNI6_NET_3_VMS}[0]
+    ...    ${OS_CMP2_HOSTNAME}
+    ...    sg=${VNI6_SECURITY_GROUP}
     OpenStackOperations.Poll VM Is ACTIVE    ${VNI6_NET_2_VMS}[0]
     OpenStackOperations.Poll VM Is ACTIVE    ${VNI6_NET_3_VMS}[0]
     ${networks} =    BuiltIn.Create List    ${VNI6_NETWORKS}[2]    ${VNI6_NETWORKS}[3]
     ${subnet_cidrs} =    BuiltIn.Create List    ${VNI6_SUBNET_CIDRS}[2]    ${VNI6_SUBNET_CIDRS}[3]
-    BuiltIn.Wait Until Keyword Succeeds    30s    10s    OpenStackOperations.Wait For Routes To Propogate    ${networks}    ${subnet_cidrs}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    OpenStackOperations.Wait For Routes To Propogate
+    ...    ${networks}
+    ...    ${subnet_cidrs}
     ${prefix_net2} =    String.Replace String    ${VNI6_SUBNET_CIDRS}[2]    ::/64    (:[a-f0-9]{,4}){,4}
-    ${status}    ${message}    Run Keyword And Ignore Error    BuiltIn.Wait Until Keyword Succeeds    3x    60s    OpenStackOperations.Collect VM IPv6 SLAAC Addresses
-    ...    fail_on_none=true    vm_list=${VNI6_NET_2_VMS}    network=${VNI6_NETWORKS}[2]    subnet=${prefix_net2}
+    ${status}    ${message} =    Run Keyword And Ignore Error
+    ...    BuiltIn.Wait Until Keyword Succeeds
+    ...    3x
+    ...    60s
+    ...    OpenStackOperations.Collect VM IPv6 SLAAC Addresses
+    ...    fail_on_none=true
+    ...    vm_list=${VNI6_NET_2_VMS}
+    ...    network=${VNI6_NETWORKS}[2]
+    ...    subnet=${prefix_net2}
     ${prefix_net3} =    String.Replace String    ${VNI6_SUBNET_CIDRS}[3]    ::/64    (:[a-f0-9]{,4}){,4}
-    ${status}    ${message}    Run Keyword And Ignore Error    BuiltIn.Wait Until Keyword Succeeds    3x    60s    OpenStackOperations.Collect VM IPv6 SLAAC Addresses
-    ...    fail_on_none=true    vm_list=${VNI6_NET_3_VMS}    network=${VNI6_NETWORKS}[3]    subnet=${prefix_net3}
-    ${VM_IP_NET2} =    OpenStackOperations.Collect VM IPv6 SLAAC Addresses    fail_on_none=false    vm_list=${VNI6_NET_2_VMS}    network=${VNI6_NETWORKS}[2]    subnet=${prefix_net2}
-    ${VM_IP_NET3} =    OpenStackOperations.Collect VM IPv6 SLAAC Addresses    fail_on_none=false    vm_list=${VNI6_NET_3_VMS}    network=${VNI6_NETWORKS}[3]    subnet=${prefix_net3}
-    ${status}    ${message}    Run Keyword And Ignore Error    BuiltIn.Should Not Contain    ${VM_IP_NET2}    None
-    Run Keyword If    '${status}' == 'FAIL'    OpenStack CLI    openstack console log show ${VNI6_NET_2_VMS}[0]    30s
-    ${status}    ${message}    Run Keyword And Ignore Error    BuiltIn.Should Not Contain    ${VM_IP_NET3}    None
-    Run Keyword If    '${status}' == 'FAIL'    OpenStack CLI    openstack console log show ${VNI6_NET_3_VMS}[0]    30s
+    ${status}    ${message} =    Run Keyword And Ignore Error
+    ...    BuiltIn.Wait Until Keyword Succeeds
+    ...    3x
+    ...    60s
+    ...    OpenStackOperations.Collect VM IPv6 SLAAC Addresses
+    ...    fail_on_none=true
+    ...    vm_list=${VNI6_NET_3_VMS}
+    ...    network=${VNI6_NETWORKS}[3]
+    ...    subnet=${prefix_net3}
+    ${VM_IP_NET2} =    OpenStackOperations.Collect VM IPv6 SLAAC Addresses
+    ...    fail_on_none=false
+    ...    vm_list=${VNI6_NET_2_VMS}
+    ...    network=${VNI6_NETWORKS}[2]
+    ...    subnet=${prefix_net2}
+    ${VM_IP_NET3} =    OpenStackOperations.Collect VM IPv6 SLAAC Addresses
+    ...    fail_on_none=false
+    ...    vm_list=${VNI6_NET_3_VMS}
+    ...    network=${VNI6_NETWORKS}[3]
+    ...    subnet=${prefix_net3}
+    ${status}    ${message} =    Run Keyword And Ignore Error    BuiltIn.Should Not Contain    ${VM_IP_NET2}    None
+    IF    '${status}' == 'FAIL'
+        OpenStack CLI    openstack console log show ${VNI6_NET_2_VMS}[0]    30s
+    END
+    ${status}    ${message} =    Run Keyword And Ignore Error    BuiltIn.Should Not Contain    ${VM_IP_NET3}    None
+    IF    '${status}' == 'FAIL'
+        OpenStack CLI    openstack console log show ${VNI6_NET_3_VMS}[0]    30s
+    END
     OpenStackOperations.Copy DHCP Files From Control Node
     BuiltIn.Should Not Contain    ${VM_IP_NET2}    None
     BuiltIn.Should Not Contain    ${VM_IP_NET3}    None
-    BuiltIn.Wait Until Keyword Succeeds    60s    5s    OVSDB.Verify Vni Segmentation Id and Tunnel Id    ${VNI6_NET_2_PORTS}[0]    ${VNI6_NET_3_PORTS}[0]    ${VNI6_NETWORKS}[2]
-    ...    ${VNI6_NETWORKS}[3]    ${VM_IP_NET2}[0]    ${VM_IP_NET3}[0]    ${IP}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    60s
+    ...    5s
+    ...    OVSDB.Verify Vni Segmentation Id and Tunnel Id
+    ...    ${VNI6_NET_2_PORTS}[0]
+    ...    ${VNI6_NET_3_PORTS}[0]
+    ...    ${VNI6_NETWORKS}[2]
+    ...    ${VNI6_NETWORKS}[3]
+    ...    ${VM_IP_NET2}[0]
+    ...    ${VM_IP_NET3}[0]
+    ...    ${IP}
+
 
 *** Keywords ***
 Suite Setup
     [Documentation]    Create Basic setup for the feature. Creates single network, subnet, two ports and two VMs.
     ...    Create Two VMs for TC1 : (VM1, N1, Compute1) and (VM2, N2, Compute2) and R1
-    BuiltIn.Return From Keyword If    "${OPENSTACK_TOPO}" == "1cmb-0ctl-0cmp"
+    IF    "${OPENSTACK_TOPO}" == "1cmb-0ctl-0cmp"    RETURN
     VpnOperations.Basic Suite Setup
     OpenStackOperations.Create Allow All SecurityGroup    ${VNI6_SECURITY_GROUP}    IPv6
     OpenStackOperations.Create Network    ${VNI6_NETWORKS}[0]
     OpenStackOperations.Create Network    ${VNI6_NETWORKS}[1]
-    OpenStackOperations.Create SubNet    ${VNI6_NETWORKS}[0]    ${VNI6_SUBNETS}[0]    ${VNI6_SUBNET_CIDRS}[0]    ${NET0_ADDITIONAL_ARGS}
-    OpenStackOperations.Create SubNet    ${VNI6_NETWORKS}[1]    ${VNI6_SUBNETS}[1]    ${VNI6_SUBNET_CIDRS}[1]    ${NET1_ADDITIONAL_ARGS}
+    OpenStackOperations.Create SubNet
+    ...    ${VNI6_NETWORKS}[0]
+    ...    ${VNI6_SUBNETS}[0]
+    ...    ${VNI6_SUBNET_CIDRS}[0]
+    ...    ${NET0_ADDITIONAL_ARGS}
+    OpenStackOperations.Create SubNet
+    ...    ${VNI6_NETWORKS}[1]
+    ...    ${VNI6_SUBNETS}[1]
+    ...    ${VNI6_SUBNET_CIDRS}[1]
+    ...    ${NET1_ADDITIONAL_ARGS}
     OpenStackOperations.Create Port    ${VNI6_NETWORKS}[0]    ${VNI6_NET_0_PORTS}[0]    sg=${VNI6_SECURITY_GROUP}
     OpenStackOperations.Create Port    ${VNI6_NETWORKS}[1]    ${VNI6_NET_1_PORTS}[0]    sg=${VNI6_SECURITY_GROUP}
     OpenStackOperations.Create Router    ${VNI6_ROUTER}[0]
@@ -150,25 +262,64 @@ Suite Setup
     BuiltIn.Set Suite Variable    ${GWMAC_ADDRS}
     BuiltIn.Set Suite Variable    ${GWIP_ADDRS}
     ${router_list} =    BuiltIn.Create List    ${VNI6_ROUTER}[0]
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${VNI6_NET_0_PORTS}[0]    ${VNI6_NET_0_VMS}[0]    ${OS_CMP1_HOSTNAME}    sg=${VNI6_SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${VNI6_NET_1_PORTS}[0]    ${VNI6_NET_1_VMS}[0]    ${OS_CMP2_HOSTNAME}    sg=${VNI6_SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${VNI6_NET_0_PORTS}[0]
+    ...    ${VNI6_NET_0_VMS}[0]
+    ...    ${OS_CMP1_HOSTNAME}
+    ...    sg=${VNI6_SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${VNI6_NET_1_PORTS}[0]
+    ...    ${VNI6_NET_1_VMS}[0]
+    ...    ${OS_CMP2_HOSTNAME}
+    ...    sg=${VNI6_SECURITY_GROUP}
     OpenStackOperations.Poll VM Is ACTIVE    ${VNI6_NET_0_VMS}[0]
     OpenStackOperations.Poll VM Is ACTIVE    ${VNI6_NET_1_VMS}[0]
     ${networks} =    BuiltIn.Create List    ${VNI6_NETWORKS}[0]    ${VNI6_NETWORKS}[1]
     ${subnet_cidrs} =    BuiltIn.Create List    ${VNI6_SUBNET_CIDRS}[0]    ${VNI6_SUBNET_CIDRS}[1]
-    BuiltIn.Wait Until Keyword Succeeds    30s    10s    OpenStackOperations.Wait For Routes To Propogate    ${networks}    ${subnet_cidrs}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    OpenStackOperations.Wait For Routes To Propogate
+    ...    ${networks}
+    ...    ${subnet_cidrs}
     ${prefix_net0} =    Replace String    ${VNI6_SUBNET_CIDRS}[0]    ::/64    (:[a-f0-9]{,4}){,4}
-    ${status}    ${message}    Run Keyword And Ignore Error    BuiltIn.Wait Until Keyword Succeeds    3x    60s    OpenStackOperations.Collect VM IPv6 SLAAC Addresses
-    ...    fail_on_none=true    vm_list=${VNI6_NET_0_VMS}    network=${VNI6_NETWORKS}[0]    subnet=${prefix_net0}
+    ${status}    ${message} =    Run Keyword And Ignore Error
+    ...    BuiltIn.Wait Until Keyword Succeeds
+    ...    3x
+    ...    60s
+    ...    OpenStackOperations.Collect VM IPv6 SLAAC Addresses
+    ...    fail_on_none=true
+    ...    vm_list=${VNI6_NET_0_VMS}
+    ...    network=${VNI6_NETWORKS}[0]
+    ...    subnet=${prefix_net0}
     ${prefix_net1} =    Replace String    ${VNI6_SUBNET_CIDRS}[1]    ::/64    (:[a-f0-9]{,4}){,4}
-    ${status}    ${message}    Run Keyword And Ignore Error    BuiltIn.Wait Until Keyword Succeeds    3x    60s    OpenStackOperations.Collect VM IPv6 SLAAC Addresses
-    ...    fail_on_none=true    vm_list=${VNI6_NET_1_VMS}    network=${VNI6_NETWORKS}[1]    subnet=${prefix_net1}
-    ${VM_IP_NET0} =    OpenStackOperations.Collect VM IPv6 SLAAC Addresses    fail_on_none=false    vm_list=${VNI6_NET_0_VMS}    network=${VNI6_NETWORKS}[0]    subnet=${prefix_net0}
-    ${VM_IP_NET1} =    OpenStackOperations.Collect VM IPv6 SLAAC Addresses    fail_on_none=false    vm_list=${VNI6_NET_1_VMS}    network=${VNI6_NETWORKS}[1]    subnet=${prefix_net1}
-    ${status}    ${message}    Run Keyword And Ignore Error    BuiltIn.Should Not Contain    ${VM_IP_NET0}    None
-    Run Keyword If    '${status}' == 'FAIL'    OpenStack CLI    openstack console log show ${VNI6_NET_0_VMS}[0]    30s
-    ${status}    ${message}    Run Keyword And Ignore Error    BuiltIn.Should Not Contain    ${VM_IP_NET1}    None
-    Run Keyword If    '${status}' == 'FAIL'    OpenStack CLI    openstack console log show ${VNI6_NET_1_VMS}[0]    30s
+    ${status}    ${message} =    Run Keyword And Ignore Error
+    ...    BuiltIn.Wait Until Keyword Succeeds
+    ...    3x
+    ...    60s
+    ...    OpenStackOperations.Collect VM IPv6 SLAAC Addresses
+    ...    fail_on_none=true
+    ...    vm_list=${VNI6_NET_1_VMS}
+    ...    network=${VNI6_NETWORKS}[1]
+    ...    subnet=${prefix_net1}
+    ${VM_IP_NET0} =    OpenStackOperations.Collect VM IPv6 SLAAC Addresses
+    ...    fail_on_none=false
+    ...    vm_list=${VNI6_NET_0_VMS}
+    ...    network=${VNI6_NETWORKS}[0]
+    ...    subnet=${prefix_net0}
+    ${VM_IP_NET1} =    OpenStackOperations.Collect VM IPv6 SLAAC Addresses
+    ...    fail_on_none=false
+    ...    vm_list=${VNI6_NET_1_VMS}
+    ...    network=${VNI6_NETWORKS}[1]
+    ...    subnet=${prefix_net1}
+    ${status}    ${message} =    Run Keyword And Ignore Error    BuiltIn.Should Not Contain    ${VM_IP_NET0}    None
+    IF    '${status}' == 'FAIL'
+        OpenStack CLI    openstack console log show ${VNI6_NET_0_VMS}[0]    30s
+    END
+    ${status}    ${message} =    Run Keyword And Ignore Error    BuiltIn.Should Not Contain    ${VM_IP_NET1}    None
+    IF    '${status}' == 'FAIL'
+        OpenStack CLI    openstack console log show ${VNI6_NET_1_VMS}[0]    30s
+    END
     OpenStackOperations.Copy DHCP Files From Control Node
     BuiltIn.Set Suite Variable    ${VM_IP_NET0}
     BuiltIn.Set Suite Variable    ${VM_IP_NET1}
@@ -178,5 +329,5 @@ Suite Setup
     OpenStackOperations.Get Suite Debugs
 
 Suite Teardown
-    BuiltIn.Return From Keyword If    "${OPENSTACK_TOPO}" == "1cmb-0ctl-0cmp"
+    IF    "${OPENSTACK_TOPO}" == "1cmb-0ctl-0cmp"    RETURN
     OpenStackOperations.OpenStack Suite Teardown
index 0e9edd8529a36ecb962279c5ffbafa317bbb2e44..2251cdd3309560db71808341d01c0a5482d354ca 100644 (file)
@@ -1,38 +1,42 @@
 *** Settings ***
-Documentation     Test Suite for vni-based-l2-l3-nat:
-...               This feature attempts to realize the use of VxLAN VNI
-...               (Virtual Network Identifier) for VxLAN tenant traffic
-...               flowing on the cloud data-network. This is applicable
-...               to L2 switching, L3 forwarding and NATing for all VxLAN
-...               based provider networks. In doing so, it eliminates the
-...               presence of LPort tags, ELAN tags and MPLS labels on the
-...               wire and instead, replaces them with VNIs supplied by the
-...               tenant’s OpenStack.
-Suite Setup       Suite Setup
-Suite Teardown    Suite Teardown
-Test Setup        VpnOperations.VNI Test Setup
-Test Teardown     VpnOperations.VNI Test Teardown
-Library           OperatingSystem
-Library           RequestsLibrary
-Library           String
-Resource          ../../../libraries/DevstackUtils.robot
-Resource          ../../../libraries/KarafKeywords.robot
-Resource          ../../../variables/netvirt/Variables.robot
-Resource          ../../../libraries/OpenStackOperations.robot
-Resource          ../../../libraries/OVSDB.robot
-Resource          ../../../libraries/SetupUtils.robot
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/VpnOperations.robot
-Resource          ../../../variables/netvirt/Variables.robot
-Resource          ../../../variables/Variables.robot
+Documentation       Test Suite for vni-based-l2-l3-nat:
+...                 This feature attempts to realize the use of VxLAN VNI
+...                 (Virtual Network Identifier) for VxLAN tenant traffic
+...                 flowing on the cloud data-network. This is applicable
+...                 to L2 switching, L3 forwarding and NATing for all VxLAN
+...                 based provider networks. In doing so, it eliminates the
+...                 presence of LPort tags, ELAN tags and MPLS labels on the
+...                 wire and instead, replaces them with VNIs supplied by the
+...                 tenant’s OpenStack.
+
+Library             OperatingSystem
+Library             RequestsLibrary
+Library             String
+Resource            ../../../libraries/DevstackUtils.robot
+Resource            ../../../libraries/KarafKeywords.robot
+Resource            ../../../variables/netvirt/Variables.robot
+Resource            ../../../libraries/OpenStackOperations.robot
+Resource            ../../../libraries/OVSDB.robot
+Resource            ../../../libraries/SetupUtils.robot
+Resource            ../../../libraries/Utils.robot
+Resource            ../../../libraries/VpnOperations.robot
+Resource            ../../../variables/netvirt/Variables.robot
+Resource            ../../../variables/Variables.robot
+
+Suite Setup         Suite Setup
+Suite Teardown      Suite Teardown
+Test Setup          VpnOperations.VNI Test Setup
+Test Teardown       VpnOperations.VNI Test Teardown
+
 
 *** Variables ***
-${VNI_SECURITY_GROUP}    vni_l2_sg
-@{VNI_NETWORKS}    vni_l2_net_1
-@{VNI_SUBNETS}    vni_l2_sub_1    vni_l2_sub_2    vni_l2_sub_3
-@{VNI_SUBNET_CIDRS}    71.1.1.0/24    72.1.1.0/24    73.1.1.0/24
-@{VNI_NET_1_PORTS}    vni_l2_net_1_port_1    vni_l2_net_1_port_2
-@{VNI_NET_1_VMS}    vni_l2_net_1_vm_1    vni_l2_net_1_vm_2
+${VNI_SECURITY_GROUP}       vni_l2_sg
+@{VNI_NETWORKS}             vni_l2_net_1
+@{VNI_SUBNETS}              vni_l2_sub_1    vni_l2_sub_2    vni_l2_sub_3
+@{VNI_SUBNET_CIDRS}         71.1.1.0/24    72.1.1.0/24    73.1.1.0/24
+@{VNI_NET_1_PORTS}          vni_l2_net_1_port_1    vni_l2_net_1_port_2
+@{VNI_NET_1_VMS}            vni_l2_net_1_vm_1    vni_l2_net_1_vm_2
+
 
 *** Test Cases ***
 VNI Based L2 Switching
@@ -41,21 +45,59 @@ VNI Based L2 Switching
     ${port_mac1} =    OpenStackOperations.Get Port Mac    ${VNI_NET_1_PORTS}[0]
     ${port_mac2} =    OpenStackOperations.Get Port Mac    ${VNI_NET_1_PORTS}[1]
     ${segmentation_id} =    OpenStackOperations.Get Network Segmentation Id    ${VNI_NETWORKS}[0]
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${VNI_NETWORKS}[0]    ${VNI_NET_1_VM_IPS}[0]    ping -c ${DEFAULT_PING_COUNT} ${VNI_NET_1_VM_IPS}[1]
-    ${egress_tun_id}    ${before_count_egress_port1} =    OVSDB.Get Tunnel Id And Packet Count    ${OS_CMP1_CONN_ID}    ${ELAN_DMACTABLE}    tun_id=${segmentation_id}    mac=${port_mac2}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${VNI_NETWORKS}[0]
+    ...    ${VNI_NET_1_VM_IPS}[0]
+    ...    ping -c ${DEFAULT_PING_COUNT} ${VNI_NET_1_VM_IPS}[1]
+    ${egress_tun_id}    ${before_count_egress_port1} =    OVSDB.Get Tunnel Id And Packet Count
+    ...    ${OS_CMP1_CONN_ID}
+    ...    ${ELAN_DMACTABLE}
+    ...    tun_id=${segmentation_id}
+    ...    mac=${port_mac2}
     BuiltIn.Should Be Equal As Numbers    ${segmentation_id}    ${egress_tun_id}
-    ${egress_tun_id}    ${before_count_egress_port2} =    OVSDB.Get Tunnel Id And Packet Count    ${OS_CMP2_CONN_ID}    ${ELAN_DMACTABLE}    tun_id=${segmentation_id}    mac=${port_mac1}
+    ${egress_tun_id}    ${before_count_egress_port2} =    OVSDB.Get Tunnel Id And Packet Count
+    ...    ${OS_CMP2_CONN_ID}
+    ...    ${ELAN_DMACTABLE}
+    ...    tun_id=${segmentation_id}
+    ...    mac=${port_mac1}
     BuiltIn.Should Be Equal As Numbers    ${segmentation_id}    ${egress_tun_id}
-    ${ingress_tun_id}    ${before_count_ingress_port1} =    OVSDB.Get Tunnel Id And Packet Count    ${OS_CMP1_CONN_ID}    ${INTERNAL_TUNNEL_TABLE}    tun_id=${segmentation_id}    mac=""
+    ${ingress_tun_id}    ${before_count_ingress_port1} =    OVSDB.Get Tunnel Id And Packet Count
+    ...    ${OS_CMP1_CONN_ID}
+    ...    ${INTERNAL_TUNNEL_TABLE}
+    ...    tun_id=${segmentation_id}
+    ...    mac=""
     BuiltIn.Should Be Equal As Numbers    ${segmentation_id}    ${ingress_tun_id}
-    ${ingress_tun_id}    ${before_count_ingress_port2} =    OVSDB.Get Tunnel Id And Packet Count    ${OS_CMP2_CONN_ID}    ${INTERNAL_TUNNEL_TABLE}    tun_id=${segmentation_id}    mac=""
+    ${ingress_tun_id}    ${before_count_ingress_port2} =    OVSDB.Get Tunnel Id And Packet Count
+    ...    ${OS_CMP2_CONN_ID}
+    ...    ${INTERNAL_TUNNEL_TABLE}
+    ...    tun_id=${segmentation_id}
+    ...    mac=""
     BuiltIn.Should Be Equal As Numbers    ${segmentation_id}    ${ingress_tun_id}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${VNI_NETWORKS}[0]    ${VNI_NET_1_VM_IPS}[0]    ping -c ${DEFAULT_PING_COUNT} ${VNI_NET_1_VM_IPS}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${VNI_NETWORKS}[0]
+    ...    ${VNI_NET_1_VM_IPS}[0]
+    ...    ping -c ${DEFAULT_PING_COUNT} ${VNI_NET_1_VM_IPS}[1]
     BuiltIn.Should Contain    ${output}    64 bytes
-    ${tun_id}    ${after_count_egress_port1} =    OVSDB.Get Tunnel Id And Packet Count    ${OS_CMP1_CONN_ID}    ${ELAN_DMACTABLE}    tun_id=${segmentation_id}    mac=${port_mac2}
-    ${tun_id}    ${after_count_ingress_port1} =    OVSDB.Get Tunnel Id And Packet Count    ${OS_CMP1_CONN_ID}    ${INTERNAL_TUNNEL_TABLE}    tun_id=${segmentation_id}    mac=""
-    ${tun_id}    ${after_count_egress_port2} =    OVSDB.Get Tunnel Id And Packet Count    ${OS_CMP2_CONN_ID}    ${ELAN_DMACTABLE}    tun_id=${segmentation_id}    mac=${port_mac1}
-    ${tun_id}    ${after_count_ingress_port2} =    OVSDB.Get Tunnel Id And Packet Count    ${OS_CMP2_CONN_ID}    ${INTERNAL_TUNNEL_TABLE}    tun_id=${segmentation_id}    mac=""
+    ${tun_id}    ${after_count_egress_port1} =    OVSDB.Get Tunnel Id And Packet Count
+    ...    ${OS_CMP1_CONN_ID}
+    ...    ${ELAN_DMACTABLE}
+    ...    tun_id=${segmentation_id}
+    ...    mac=${port_mac2}
+    ${tun_id}    ${after_count_ingress_port1} =    OVSDB.Get Tunnel Id And Packet Count
+    ...    ${OS_CMP1_CONN_ID}
+    ...    ${INTERNAL_TUNNEL_TABLE}
+    ...    tun_id=${segmentation_id}
+    ...    mac=""
+    ${tun_id}    ${after_count_egress_port2} =    OVSDB.Get Tunnel Id And Packet Count
+    ...    ${OS_CMP2_CONN_ID}
+    ...    ${ELAN_DMACTABLE}
+    ...    tun_id=${segmentation_id}
+    ...    mac=${port_mac1}
+    ${tun_id}    ${after_count_ingress_port2} =    OVSDB.Get Tunnel Id And Packet Count
+    ...    ${OS_CMP2_CONN_ID}
+    ...    ${INTERNAL_TUNNEL_TABLE}
+    ...    tun_id=${segmentation_id}
+    ...    mac=""
     ${diff_count_egress_port1} =    BuiltIn.Evaluate    ${after_count_egress_port1} - ${before_count_egress_port1}
     ${diff_count_ingress_port1} =    BuiltIn.Evaluate    ${after_count_ingress_port1} - ${before_count_ingress_port1}
     ${diff_count_egress_port2} =    BuiltIn.Evaluate    ${after_count_egress_port2} - ${before_count_egress_port2}
@@ -65,19 +107,33 @@ VNI Based L2 Switching
     BuiltIn.Should Be True    ${diff_count_egress_port2} >= ${DEFAULT_PING_COUNT}
     BuiltIn.Should Be True    ${diff_count_ingress_port2} >= ${DEFAULT_PING_COUNT}
 
+
 *** Keywords ***
 Suite Setup
     [Documentation]    Create Basic setup for the feature. Creates single network, subnet, two ports and two VMs.
-    BuiltIn.Return From Keyword If    "${OPENSTACK_TOPO}" == "1cmb-0ctl-0cmp"
+    IF    "${OPENSTACK_TOPO}" == "1cmb-0ctl-0cmp"    RETURN
     VpnOperations.Basic Suite Setup
     OpenStackOperations.Create Allow All SecurityGroup    ${VNI_SECURITY_GROUP}
     OpenStackOperations.Create Network    ${VNI_NETWORKS}[0]
     OpenStackOperations.Create SubNet    ${VNI_NETWORKS}[0]    ${VNI_SUBNETS}[0]    ${VNI_SUBNET_CIDRS}[0]
     OpenStackOperations.Create Port    ${VNI_NETWORKS}[0]    ${VNI_NET_1_PORTS}[0]    sg=${VNI_SECURITY_GROUP}
     OpenStackOperations.Create Port    ${VNI_NETWORKS}[0]    ${VNI_NET_1_PORTS}[1]    sg=${VNI_SECURITY_GROUP}
-    BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${PORT_URL}    ${VNI_NET_1_PORTS}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${VNI_NET_1_PORTS}[0]    ${VNI_NET_1_VMS}[0]    ${OS_CMP1_HOSTNAME}    sg=${VNI_SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${VNI_NET_1_PORTS}[1]    ${VNI_NET_1_VMS}[1]    ${OS_CMP2_HOSTNAME}    sg=${VNI_SECURITY_GROUP}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    3s
+    ...    1s
+    ...    Utils.Check For Elements At URI
+    ...    ${PORT_URL}
+    ...    ${VNI_NET_1_PORTS}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${VNI_NET_1_PORTS}[0]
+    ...    ${VNI_NET_1_VMS}[0]
+    ...    ${OS_CMP1_HOSTNAME}
+    ...    sg=${VNI_SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${VNI_NET_1_PORTS}[1]
+    ...    ${VNI_NET_1_VMS}[1]
+    ...    ${OS_CMP2_HOSTNAME}
+    ...    sg=${VNI_SECURITY_GROUP}
     @{VNI_NET_1_VM_IPS}    ${vni_net_1_dhcp_ip} =    OpenStackOperations.Get VM IPs    @{VNI_NET_1_VMS}
     BuiltIn.Set Suite Variable    @{VNI_NET_1_VM_IPS}
     BuiltIn.Should Not Contain    ${VNI_NET_1_VM_IPS}    None
@@ -86,5 +142,5 @@ Suite Setup
     OpenStackOperations.Get Suite Debugs
 
 Suite Teardown
-    BuiltIn.Return From Keyword If    "${OPENSTACK_TOPO}" == "1cmb-0ctl-0cmp"
+    IF    "${OPENSTACK_TOPO}" == "1cmb-0ctl-0cmp"    RETURN
     OpenStackOperations.OpenStack Suite Teardown
index 8b938f978d99be0ca1cfe76c97d5b6d7acc033de..498377fb2dc48b1d0a1c4f9cec11f3d209336177 100644 (file)
@@ -1,63 +1,92 @@
 *** Settings ***
-Documentation     Test Suite for vni-based-l2-l3-nat:
-...               This feature attempts to realize the use of VxLAN VNI
-...               (Virtual Network Identifier) for VxLAN tenant traffic
-...               flowing on the cloud data-network. This is applicable
-...               to L2 switching, L3 forwarding and NATing for all VxLAN
-...               based provider networks. In doing so, it eliminates the
-...               presence of LPort tags, ELAN tags and MPLS labels on the
-...               wire and instead, replaces them with VNIs supplied by the
-...               tenant’s OpenStack.
-Suite Setup       Suite Setup
-Suite Teardown    Suite Teardown
-Test Setup        VpnOperations.VNI Test Setup
-Test Teardown     VpnOperations.VNI Test Teardown
-Library           OperatingSystem
-Library           RequestsLibrary
-Library           String
-Resource          ../../../libraries/DevstackUtils.robot
-Resource          ../../../libraries/KarafKeywords.robot
-Resource          ../../../variables/netvirt/Variables.robot
-Resource          ../../../libraries/OpenStackOperations.robot
-Resource          ../../../libraries/OVSDB.robot
-Resource          ../../../libraries/SetupUtils.robot
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/VpnOperations.robot
-Resource          ../../../variables/netvirt/Variables.robot
-Resource          ../../../variables/Variables.robot
+Documentation       Test Suite for vni-based-l2-l3-nat:
+...                 This feature attempts to realize the use of VxLAN VNI
+...                 (Virtual Network Identifier) for VxLAN tenant traffic
+...                 flowing on the cloud data-network. This is applicable
+...                 to L2 switching, L3 forwarding and NATing for all VxLAN
+...                 based provider networks. In doing so, it eliminates the
+...                 presence of LPort tags, ELAN tags and MPLS labels on the
+...                 wire and instead, replaces them with VNIs supplied by the
+...                 tenant’s OpenStack.
+
+Library             OperatingSystem
+Library             RequestsLibrary
+Library             String
+Resource            ../../../libraries/DevstackUtils.robot
+Resource            ../../../libraries/KarafKeywords.robot
+Resource            ../../../variables/netvirt/Variables.robot
+Resource            ../../../libraries/OpenStackOperations.robot
+Resource            ../../../libraries/OVSDB.robot
+Resource            ../../../libraries/SetupUtils.robot
+Resource            ../../../libraries/Utils.robot
+Resource            ../../../libraries/VpnOperations.robot
+Resource            ../../../variables/netvirt/Variables.robot
+Resource            ../../../variables/Variables.robot
+
+Suite Setup         Suite Setup
+Suite Teardown      Suite Teardown
+Test Setup          VpnOperations.VNI Test Setup
+Test Teardown       VpnOperations.VNI Test Teardown
+
 
 *** Variables ***
-${EGRESS}         Egress
-${INGRESS}        Ingress
-${IP}             ipv4
-${VNI_SECURITY_GROUP}    vni_sg
-@{VNI_NETWORKS}    vni_l3_net_0    vni_l3_net_1    vni_l3_net_2    vni_l3_net_3    vni_l3_net_4    vni_l3_net_5
-@{VNI_SUBNETS}    vni_l3_sub_0    vni_l3_sub_1    vni_l3_sub_2    vni_l3_sub_3    vni_l3_sub_4    vni_l3_sub_5
-@{VNI_SUBNET_CIDRS}    61.1.1.0/24    62.1.1.0/24    63.1.1.0/24    64.1.1.0/24    65.1.1.0/24    66.1.1.0/24
-@{VNI_NET_0_PORTS}    vni_l3_net_0_port_1    vni_l3_net_0_port_2
-@{VNI_NET_1_PORTS}    vni_l3_net_1_port_1    vni_l3_net_1_port_2
-@{VNI_NET_2_PORTS}    vni_l3_net_2_port_1    vni_l3_net_2_port_2
-@{VNI_NET_3_PORTS}    vni_l3_net_3_port_1    vni_l3_net_3_port_2
-@{VNI_NET_4_PORTS}    vni_l3_net_4_port_1    vni_l3_net_4_port_2
-@{VNI_NET_5_PORTS}    vni_l3_net_5_port_1    vni_l3_net_5_port_2
-@{VNI_NET_0_VMS}    vni_l3_net_0_vm
-@{VNI_NET_1_VMS}    vni_l3_net_1_vm
-@{VNI_NET_2_VMS}    vni_l3_net_2_vm
-@{VNI_NET_3_VMS}    vni_l3_net_3_vm
-@{VNI_NET_4_VMS}    vni_l3_net_4_vm
-@{VNI_NET_5_VMS}    vni_l3_net_5_vm
-@{VNI_ROUTER}     vni_l3_router1    vni_l3_router2
-@{VNI_BGPVPN}     vni_l3_bgpvpn
-@{VNI_RDS}        ["2200:2"]    ["2300:2"]    ["2400:2"]    ["2500:2"]
-@{VNI_VPN_NAMES}    vni_l3_vpn_1    vni_l3_vpn_2    vni_l3_vpn_3    vni_l3_vpn_4
-@{VNI_VPN_INSTANCE_IDS}    4ae8cd92-48ca-49b5-94e1-b2921a261441    4ae8cd92-48ca-49b5-94e1-b2921a261442    4ae8cd92-48ca-49b5-94e1-b2921a261443    4ae8cd92-48ca-49b5-94e1-b2921a261444
+${EGRESS}                   Egress
+${INGRESS}                  Ingress
+${IP}                       ipv4
+${VNI_SECURITY_GROUP}       vni_sg
+@{VNI_NETWORKS}
+...                         vni_l3_net_0
+...                         vni_l3_net_1
+...                         vni_l3_net_2
+...                         vni_l3_net_3
+...                         vni_l3_net_4
+...                         vni_l3_net_5
+@{VNI_SUBNETS}
+...                         vni_l3_sub_0
+...                         vni_l3_sub_1
+...                         vni_l3_sub_2
+...                         vni_l3_sub_3
+...                         vni_l3_sub_4
+...                         vni_l3_sub_5
+@{VNI_SUBNET_CIDRS}         61.1.1.0/24    62.1.1.0/24    63.1.1.0/24    64.1.1.0/24    65.1.1.0/24    66.1.1.0/24
+@{VNI_NET_0_PORTS}          vni_l3_net_0_port_1    vni_l3_net_0_port_2
+@{VNI_NET_1_PORTS}          vni_l3_net_1_port_1    vni_l3_net_1_port_2
+@{VNI_NET_2_PORTS}          vni_l3_net_2_port_1    vni_l3_net_2_port_2
+@{VNI_NET_3_PORTS}          vni_l3_net_3_port_1    vni_l3_net_3_port_2
+@{VNI_NET_4_PORTS}          vni_l3_net_4_port_1    vni_l3_net_4_port_2
+@{VNI_NET_5_PORTS}          vni_l3_net_5_port_1    vni_l3_net_5_port_2
+@{VNI_NET_0_VMS}            vni_l3_net_0_vm
+@{VNI_NET_1_VMS}            vni_l3_net_1_vm
+@{VNI_NET_2_VMS}            vni_l3_net_2_vm
+@{VNI_NET_3_VMS}            vni_l3_net_3_vm
+@{VNI_NET_4_VMS}            vni_l3_net_4_vm
+@{VNI_NET_5_VMS}            vni_l3_net_5_vm
+@{VNI_ROUTER}               vni_l3_router1    vni_l3_router2
+@{VNI_BGPVPN}               vni_l3_bgpvpn
+@{VNI_RDS}                  ["2200:2"]    ["2300:2"]    ["2400:2"]    ["2500:2"]
+@{VNI_VPN_NAMES}            vni_l3_vpn_1    vni_l3_vpn_2    vni_l3_vpn_3    vni_l3_vpn_4
+@{VNI_VPN_INSTANCE_IDS}
+...                         4ae8cd92-48ca-49b5-94e1-b2921a261441
+...                         4ae8cd92-48ca-49b5-94e1-b2921a261442
+...                         4ae8cd92-48ca-49b5-94e1-b2921a261443
+...                         4ae8cd92-48ca-49b5-94e1-b2921a261444
+
 
 *** Test Cases ***
 VNI Based L3 Forwarding
     [Documentation]    verify VNI id for L3 Unicast frames exchanged over OVS datapaths that are on different hypervisors
     BuiltIn.Pass Execution If    "${OPENSTACK_TOPO}" == "1cmb-0ctl-0cmp"    "Test is not supported for combo node"
-    Wait Until Keyword Succeeds    60s    5s    OVSDB.Verify Vni Segmentation Id and Tunnel Id    ${VNI_NET_0_PORTS}[0]    ${VNI_NET_1_PORTS}[0]    ${VNI_NETWORKS}[0]
-    ...    ${VNI_NETWORKS}[1]    ${NET_0_VM_IPS}[0]    ${NET_1_VM_IPS}[0]    ${IP}
+    Wait Until Keyword Succeeds
+    ...    60s
+    ...    5s
+    ...    OVSDB.Verify Vni Segmentation Id and Tunnel Id
+    ...    ${VNI_NET_0_PORTS}[0]
+    ...    ${VNI_NET_1_PORTS}[0]
+    ...    ${VNI_NETWORKS}[0]
+    ...    ${VNI_NETWORKS}[1]
+    ...    ${NET_0_VM_IPS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ${IP}
 
 VNI Based L3 Forwarding With BGPVPN Router Association
     [Documentation]    verify VNI id for L3 Unicast frames exchanged over OVS datapaths that are on different hypervisors
@@ -65,15 +94,30 @@ VNI Based L3 Forwarding With BGPVPN Router Association
     BuiltIn.Pass Execution If    "${OPENSTACK_TOPO}" == "1cmb-0ctl-0cmp"    "Test is not supported for combo node"
     ${net_id} =    OpenStackOperations.Get Net Id    ${VNI_NETWORKS}[0]
     ${tenant_id} =    OpenStackOperations.Get Tenant ID From Network    ${net_id}
-    VpnOperations.VPN Create L3VPN    vpnid=${VNI_VPN_INSTANCE_IDS}[0]    name=${VNI_VPN_NAMES}[0]    rd=${VNI_RDS}[0]    exportrt=${VNI_RDS}[0]    importrt=${VNI_RDS}[0]    tenantid=${tenant_id}
+    VpnOperations.VPN Create L3VPN
+    ...    vpnid=${VNI_VPN_INSTANCE_IDS}[0]
+    ...    name=${VNI_VPN_NAMES}[0]
+    ...    rd=${VNI_RDS}[0]
+    ...    exportrt=${VNI_RDS}[0]
+    ...    importrt=${VNI_RDS}[0]
+    ...    tenantid=${tenant_id}
     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VNI_VPN_INSTANCE_IDS}[0]
     BuiltIn.Should Contain    ${resp}    ${VNI_VPN_INSTANCE_IDS}[0]
     ${router_id} =    OpenStackOperations.Get Router Id    ${VNI_ROUTER}[0]
     VpnOperations.Associate VPN to Router    routerid=${router_id}    vpnid=${VNI_VPN_INSTANCE_IDS}[0]
     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VNI_VPN_INSTANCE_IDS}[0]
     BuiltIn.Should Contain    ${resp}    ${router_id}
-    BuiltIn.Wait Until Keyword Succeeds    60s    5s    OVSDB.Verify Vni Segmentation Id and Tunnel Id    ${VNI_NET_0_PORTS}[0]    ${VNI_NET_1_PORTS}[0]    ${VNI_NETWORKS}[0]
-    ...    ${VNI_NETWORKS}[1]    ${NET_0_VM_IPS}[0]    ${NET_1_VM_IPS}[0]    ${IP}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    60s
+    ...    5s
+    ...    OVSDB.Verify Vni Segmentation Id and Tunnel Id
+    ...    ${VNI_NET_0_PORTS}[0]
+    ...    ${VNI_NET_1_PORTS}[0]
+    ...    ${VNI_NETWORKS}[0]
+    ...    ${VNI_NETWORKS}[1]
+    ...    ${NET_0_VM_IPS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ${IP}
 
 VNI Based L3 Forwarding With BGPVPN Network Association
     [Documentation]    verify VNI id for L3 Unicast frames exchanged over OVS datapaths that are on different hypervisors
@@ -88,7 +132,13 @@ VNI Based L3 Forwarding With BGPVPN Network Association
     ${net_id} =    OpenStackOperations.Get Net Id    ${VNI_NETWORKS}[2]
     ${tenant_id} =    OpenStackOperations.Get Tenant ID From Network    ${net_id}
     BuiltIn.Log    ${VNI_RDS}[1]
-    VpnOperations.VPN Create L3VPN    vpnid=${VNI_VPN_INSTANCE_IDS}[1]    name=${VNI_VPN_NAMES}[1]    rd=${VNI_RDS}[1]    exportrt=${VNI_RDS}[1]    importrt=${VNI_RDS}[1]    tenantid=${tenant_id}
+    VpnOperations.VPN Create L3VPN
+    ...    vpnid=${VNI_VPN_INSTANCE_IDS}[1]
+    ...    name=${VNI_VPN_NAMES}[1]
+    ...    rd=${VNI_RDS}[1]
+    ...    exportrt=${VNI_RDS}[1]
+    ...    importrt=${VNI_RDS}[1]
+    ...    tenantid=${tenant_id}
     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VNI_VPN_INSTANCE_IDS}[1]
     BuiltIn.Should Contain    ${resp}    ${VNI_VPN_INSTANCE_IDS}[1]
     ${network2_id} =    OpenStackOperations.Get Net Id    ${VNI_NETWORKS}[2]
@@ -99,8 +149,16 @@ VNI Based L3 Forwarding With BGPVPN Network Association
     VpnOperations.Associate L3VPN To Network    networkid=${network3_id}    vpnid=${VNI_VPN_INSTANCE_IDS}[1]
     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VNI_VPN_INSTANCE_IDS}[1]
     BuiltIn.Should Contain    ${resp}    ${network3_id}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${VNI_NET_2_PORTS}[0]    ${VNI_NET_2_VMS}[0]    ${OS_CMP1_HOSTNAME}    sg=${VNI_SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${VNI_NET_3_PORTS}[0]    ${VNI_NET_3_VMS}[0]    ${OS_CMP2_HOSTNAME}    sg=${VNI_SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${VNI_NET_2_PORTS}[0]
+    ...    ${VNI_NET_2_VMS}[0]
+    ...    ${OS_CMP1_HOSTNAME}
+    ...    sg=${VNI_SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${VNI_NET_3_PORTS}[0]
+    ...    ${VNI_NET_3_VMS}[0]
+    ...    ${OS_CMP2_HOSTNAME}
+    ...    sg=${VNI_SECURITY_GROUP}
     @{NET_2_VM_IPS}    ${NET_2_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{VNI_NET_2_VMS}
     @{NET_3_VM_IPS}    ${NET_3_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{VNI_NET_3_VMS}
     BuiltIn.Set Suite Variable    @{NET_2_VM_IPS}
@@ -109,8 +167,17 @@ VNI Based L3 Forwarding With BGPVPN Network Association
     BuiltIn.Should Not Contain    ${NET_3_VM_IPS}    None
     BuiltIn.Should Not Contain    ${NET_2_DHCP_IP}    None
     BuiltIn.Should Not Contain    ${NET_3_DHCP_IP}    None
-    BuiltIn.Wait Until Keyword Succeeds    60s    5s    OVSDB.Verify Vni Segmentation Id and Tunnel Id    ${VNI_NET_2_PORTS}[0]    ${VNI_NET_3_PORTS}[0]    ${VNI_NETWORKS}[2]
-    ...    ${VNI_NETWORKS}[3]    ${NET_2_VM_IPS}[0]    ${NET_3_VM_IPS}[0]    ${IP}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    60s
+    ...    5s
+    ...    OVSDB.Verify Vni Segmentation Id and Tunnel Id
+    ...    ${VNI_NET_2_PORTS}[0]
+    ...    ${VNI_NET_3_PORTS}[0]
+    ...    ${VNI_NETWORKS}[2]
+    ...    ${VNI_NETWORKS}[3]
+    ...    ${NET_2_VM_IPS}[0]
+    ...    ${NET_3_VM_IPS}[0]
+    ...    ${IP}
 
 VNI Based L3 Forwarding With BGPVPN With Irt Ert
     [Documentation]    verify VNI id for L3 Unicast frames exchanged over OVS datapaths that are on different hypervisors
@@ -125,7 +192,13 @@ VNI Based L3 Forwarding With BGPVPN With Irt Ert
     ${net_id} =    OpenStackOperations.Get Net Id    ${VNI_NETWORKS}[4]
     ${tenant_id} =    OpenStackOperations.Get Tenant ID From Network    ${net_id}
     BuiltIn.Log    ${VNI_RDS}[2]
-    VpnOperations.VPN Create L3VPN    vpnid=${VNI_VPN_INSTANCE_IDS}[2]    name=${VNI_VPN_NAMES}[2]    rd=${VNI_RDS}[2]    exportrt=${VNI_RDS}[2]    importrt=${VNI_RDS}[3]    tenantid=${tenant_id}
+    VpnOperations.VPN Create L3VPN
+    ...    vpnid=${VNI_VPN_INSTANCE_IDS}[2]
+    ...    name=${VNI_VPN_NAMES}[2]
+    ...    rd=${VNI_RDS}[2]
+    ...    exportrt=${VNI_RDS}[2]
+    ...    importrt=${VNI_RDS}[3]
+    ...    tenantid=${tenant_id}
     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VNI_VPN_INSTANCE_IDS}[2]
     BuiltIn.Should Contain    ${resp}    ${VNI_VPN_INSTANCE_IDS}[2]
     ${network4_id} =    OpenStackOperations.Get Net Id    ${VNI_NETWORKS}[4]
@@ -133,15 +206,29 @@ VNI Based L3 Forwarding With BGPVPN With Irt Ert
     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VNI_VPN_INSTANCE_IDS}[2]
     BuiltIn.Should Contain    ${resp}    ${network4_id}
     BuiltIn.Log    ${VNI_RDS}[3]
-    VpnOperations.VPN Create L3VPN    vpnid=${VNI_VPN_INSTANCE_IDS}[3]    name=${VNI_VPN_NAMES}[3]    rd=${VNI_RDS}[3]    exportrt=${VNI_RDS}[3]    importrt=${VNI_RDS}[2]    tenantid=${tenant_id}
+    VpnOperations.VPN Create L3VPN
+    ...    vpnid=${VNI_VPN_INSTANCE_IDS}[3]
+    ...    name=${VNI_VPN_NAMES}[3]
+    ...    rd=${VNI_RDS}[3]
+    ...    exportrt=${VNI_RDS}[3]
+    ...    importrt=${VNI_RDS}[2]
+    ...    tenantid=${tenant_id}
     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VNI_VPN_INSTANCE_IDS}[3]
     BuiltIn.Should Contain    ${resp}    ${VNI_VPN_INSTANCE_IDS}[3]
     ${network5_id} =    OpenStackOperations.Get Net Id    ${VNI_NETWORKS}[5]
     VpnOperations.Associate L3VPN To Network    networkid=${network5_id}    vpnid=${VNI_VPN_INSTANCE_IDS}[3]
     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VNI_VPN_INSTANCE_IDS}[3]
     BuiltIn.Should Contain    ${resp}    ${network5_id}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${VNI_NET_4_PORTS}[0]    ${VNI_NET_4_VMS}[0]    ${OS_CMP1_HOSTNAME}    sg=${VNI_SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${VNI_NET_5_PORTS}[0]    ${VNI_NET_5_VMS}[0]    ${OS_CMP2_HOSTNAME}    sg=${VNI_SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${VNI_NET_4_PORTS}[0]
+    ...    ${VNI_NET_4_VMS}[0]
+    ...    ${OS_CMP1_HOSTNAME}
+    ...    sg=${VNI_SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${VNI_NET_5_PORTS}[0]
+    ...    ${VNI_NET_5_VMS}[0]
+    ...    ${OS_CMP2_HOSTNAME}
+    ...    sg=${VNI_SECURITY_GROUP}
     @{NET_4_VM_IPS}    ${NET_4_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{VNI_NET_4_VMS}
     @{NET_5_VM_IPS}    ${NET_5_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{VNI_NET_5_VMS}
     BuiltIn.Set Suite Variable    @{NET_4_VM_IPS}
@@ -150,14 +237,24 @@ VNI Based L3 Forwarding With BGPVPN With Irt Ert
     BuiltIn.Should Not Contain    ${NET_5_VM_IPS}    None
     BuiltIn.Should Not Contain    ${NET_4_DHCP_IP}    None
     BuiltIn.Should Not Contain    ${NET_5_DHCP_IP}    None
-    BuiltIn.Wait Until Keyword Succeeds    60s    5s    OVSDB.Verify Vni Segmentation Id and Tunnel Id    ${VNI_NET_4_PORTS}[0]    ${VNI_NET_5_PORTS}[0]    ${VNI_NETWORKS}[4]
-    ...    ${VNI_NETWORKS}[5]    ${NET_4_VM_IPS}[0]    ${NET_5_VM_IPS}[0]    ${IP}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    60s
+    ...    5s
+    ...    OVSDB.Verify Vni Segmentation Id and Tunnel Id
+    ...    ${VNI_NET_4_PORTS}[0]
+    ...    ${VNI_NET_5_PORTS}[0]
+    ...    ${VNI_NETWORKS}[4]
+    ...    ${VNI_NETWORKS}[5]
+    ...    ${NET_4_VM_IPS}[0]
+    ...    ${NET_5_VM_IPS}[0]
+    ...    ${IP}
+
 
 *** Keywords ***
 Suite Setup
     [Documentation]    Create Basic setup for the feature. Creates single network, subnet, two ports and two VMs.
     ...    Create Two VMs for TC1 : (VM1, N1, Compute1) and (VM2, N2, Compute2) and R1
-    BuiltIn.Return From Keyword If    "${OPENSTACK_TOPO}" == "1cmb-0ctl-0cmp"
+    IF    "${OPENSTACK_TOPO}" == "1cmb-0ctl-0cmp"    RETURN
     VpnOperations.Basic Suite Setup
     OpenStackOperations.Create Allow All SecurityGroup    ${VNI_SECURITY_GROUP}
     OpenStackOperations.Create Network    ${VNI_NETWORKS}[0]
@@ -174,8 +271,16 @@ Suite Setup
     BuiltIn.Set Suite Variable    ${GWMAC_ADDRS}
     BuiltIn.Set Suite Variable    ${GWIP_ADDRS}
     ${router_list} =    BuiltIn.Create List    ${VNI_ROUTER}[0]
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${VNI_NET_0_PORTS}[0]    ${VNI_NET_0_VMS}[0]    ${OS_CMP1_HOSTNAME}    sg=${VNI_SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${VNI_NET_1_PORTS}[0]    ${VNI_NET_1_VMS}[0]    ${OS_CMP2_HOSTNAME}    sg=${VNI_SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${VNI_NET_0_PORTS}[0]
+    ...    ${VNI_NET_0_VMS}[0]
+    ...    ${OS_CMP1_HOSTNAME}
+    ...    sg=${VNI_SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${VNI_NET_1_PORTS}[0]
+    ...    ${VNI_NET_1_VMS}[0]
+    ...    ${OS_CMP2_HOSTNAME}
+    ...    sg=${VNI_SECURITY_GROUP}
     @{NET_0_VM_IPS}    ${NET_0_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{VNI_NET_0_VMS}
     @{NET_1_VM_IPS}    ${NET_1_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{VNI_NET_1_VMS}
     BuiltIn.Set Suite Variable    @{NET_0_VM_IPS}
@@ -188,5 +293,5 @@ Suite Setup
     OpenStackOperations.Get Suite Debugs
 
 Suite Teardown
-    BuiltIn.Return From Keyword If    "${OPENSTACK_TOPO}" == "1cmb-0ctl-0cmp"
+    IF    "${OPENSTACK_TOPO}" == "1cmb-0ctl-0cmp"    RETURN
     OpenStackOperations.OpenStack Suite Teardown
index 7c3e2027eda5f1880a0bbe06b214d0d492a7cd0a..a089d761c600a9e9442d89935b1d9d5daa66ac23 100644 (file)
@@ -1,40 +1,50 @@
 *** Settings ***
-Documentation     Test suite for ARP Request. More test cases to be added in subsequent patches.
-Suite Setup       Suite Setup
-Suite Teardown    Suite Teardown
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     OpenStackOperations.Get Test Teardown Debugs
-Library           RequestsLibrary
-Library           SSHLibrary
-Resource          ../../../libraries/DevstackUtils.robot
-Resource          ../../../libraries/OpenStackOperations.robot
-Resource          ../../../libraries/SetupUtils.robot
-Resource          ../../../libraries/VpnOperations.robot
-Resource          ../../../variables/netvirt/Variables.robot
-Resource          ../../../variables/Variables.robot
+Documentation       Test suite for ARP Request. More test cases to be added in subsequent patches.
+
+Library             RequestsLibrary
+Library             SSHLibrary
+Resource            ../../../libraries/DevstackUtils.robot
+Resource            ../../../libraries/OpenStackOperations.robot
+Resource            ../../../libraries/SetupUtils.robot
+Resource            ../../../libraries/VpnOperations.robot
+Resource            ../../../variables/netvirt/Variables.robot
+Resource            ../../../variables/Variables.robot
+
+Suite Setup         Suite Setup
+Suite Teardown      Suite Teardown
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       OpenStackOperations.Get Test Teardown Debugs
+
 
 *** Variables ***
-${SECURITY_GROUP}    vpna_sg
-@{NETWORKS}       vpna_net_1    vpna_net_2    vpna_net_3
-@{SUBNETS}        vpna_sub_1    vpna_sub_2    vpna_sub_3
-@{SUBNET_CIDRS}    10.10.10.0/24    10.20.20.0/24    10.30.30.0/24
-@{PORTS}          vpna_net_1_port_1    vpna_net_1_port_2    vpna_net_2_port_1    vpna_net_2_port_2    vpna_net_3_port_1    vpna_net_3_port_2
-@{NET_1_VMS}      vpna_net_1_vm_1    vpna_net_1_vm_2
-@{NET_2_VMS}      vpna_net_2_vm_1    vpna_net_2_vm_2
-@{NET_3_VMS}      vpna_net_3_vm_1    vpna_net_3_vm_2
-${ROUTER}         vpna_router
-@{VPN_INSTANCE_IDS}    4ae8cd92-48ca-49b5-94e1-b2921a261111
-@{VPN_NAMES}      vpna_1
-${RD1}            ["2200:2"]
-${RD2}            ["2200:3"]
-${EXPORT_RT}      ["2200:2","2200:3"]
-${IMPORT_RT}      ["2200:2","2200:3"]
-${SUB_IF}         eth0:1
-@{EXTRA_NW_IP}    192.168.10.110    192.168.20.110
-${FIB_ENTRY_2}    192.168.10.110
-${RPING_MIP_IP}    sudo arping -I eth0:1 -c 5 -b -s 192.168.10.110 192.168.10.110
-${RPING_MIP_IP_2}    sudo arping -I eth0:1 -c 5 -b -s 192.168.20.110 192.168.20.110
-${RPING_EXP_STR}    broadcast
+${SECURITY_GROUP}       vpna_sg
+@{NETWORKS}             vpna_net_1    vpna_net_2    vpna_net_3
+@{SUBNETS}              vpna_sub_1    vpna_sub_2    vpna_sub_3
+@{SUBNET_CIDRS}         10.10.10.0/24    10.20.20.0/24    10.30.30.0/24
+@{PORTS}
+...                     vpna_net_1_port_1
+...                     vpna_net_1_port_2
+...                     vpna_net_2_port_1
+...                     vpna_net_2_port_2
+...                     vpna_net_3_port_1
+...                     vpna_net_3_port_2
+@{NET_1_VMS}            vpna_net_1_vm_1    vpna_net_1_vm_2
+@{NET_2_VMS}            vpna_net_2_vm_1    vpna_net_2_vm_2
+@{NET_3_VMS}            vpna_net_3_vm_1    vpna_net_3_vm_2
+${ROUTER}               vpna_router
+@{VPN_INSTANCE_IDS}     4ae8cd92-48ca-49b5-94e1-b2921a261111
+@{VPN_NAMES}            vpna_1
+${RD1}                  ["2200:2"]
+${RD2}                  ["2200:3"]
+${EXPORT_RT}            ["2200:2","2200:3"]
+${IMPORT_RT}            ["2200:2","2200:3"]
+${SUB_IF}               eth0:1
+@{EXTRA_NW_IP}          192.168.10.110    192.168.20.110
+${FIB_ENTRY_2}          192.168.10.110
+${RPING_MIP_IP}         sudo arping -I eth0:1 -c 5 -b -s 192.168.10.110 192.168.10.110
+${RPING_MIP_IP_2}       sudo arping -I eth0:1 -c 5 -b -s 192.168.20.110 192.168.20.110
+${RPING_EXP_STR}        broadcast
+
 
 *** Test Cases ***
 Verify Setup
@@ -42,7 +52,12 @@ Verify Setup
     ...    For this, we ssh to the VM using the dhcp-namespace on the controller node and verify ping
     ...    reachability to the second VM on the same network and VMs on other network (i.e., east-west routing)
     ${vms} =    BuiltIn.Create List    @{NET_1_VM_IPS}    @{NET_2_VM_IPS}    @{NET_3_VM_IPS}
-    BuiltIn.Wait Until Keyword Succeeds    30s    10s    Utils.Check For Elements At URI    ${FIB_ENTRIES_URL}    ${vms}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    Utils.Check For Elements At URI
+    ...    ${FIB_ENTRIES_URL}
+    ...    ${vms}
     Verify Ping On Same Networks
     Verify Ping On Different Networks
 
@@ -63,17 +78,39 @@ Verify GARP Requests
     ${output} =    VpnOperations.Get Fib Entries    session
     ${resp} =    BuiltIn.Should Match Regexp    ${output}    destPrefix\\":\\"${fib_entry_3}\/32".*"${OS_CMP2_IP}\\"
     ${resp} =    BuiltIn.Should Match Regexp    ${output}    destPrefix\\":\\"${fib_entry_1}\/32".*"${OS_CMP1_IP}\\"
-    ${rx_packet1_before} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[1]    ifconfig eth0
-    ${rx_packet0_before} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ifconfig eth0
-    ${config_extra_route_ip1} =    BuiltIn.Catenate    sudo ifconfig ${SUB_IF} ${EXTRA_NW_IP}[0] netmask 255.255.255.0 up
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[1]    ${config_extra_route_ip1}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[1]    ifconfig
+    ${rx_packet1_before} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[1]
+    ...    ifconfig eth0
+    ${rx_packet0_before} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ifconfig eth0
+    ${config_extra_route_ip1} =    BuiltIn.Catenate
+    ...    sudo ifconfig ${SUB_IF} ${EXTRA_NW_IP}[0] netmask 255.255.255.0 up
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[1]
+    ...    ${config_extra_route_ip1}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[1]
+    ...    ifconfig
     BuiltIn.Should Contain    ${output}    ${SUB_IF}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[1]    ${RPING_MIP_IP}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[1]
+    ...    ${RPING_MIP_IP}
     BuiltIn.Should Contain    ${output}    broadcast
     BuiltIn.Should Contain    ${output}    Received 0 reply
-    ${rx_packet1_after} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[1]    ifconfig eth0
-    ${rx_packet0_after} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ifconfig eth0
+    ${rx_packet1_after} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[1]
+    ...    ifconfig eth0
+    ${rx_packet0_after} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ifconfig eth0
     BuiltIn.Should Not Be Equal    ${rx_packet0_before}    ${rx_packet0_after}
     BuiltIn.Should Not Be Equal    ${rx_packet1_before}    ${rx_packet1_after}
     Verify Flows Are Present On All Compute Nodes
@@ -91,24 +128,49 @@ Verify MIP Migration
     ...    the extra_route_ip info with nexthop in the FIB entry pointing to Compute-0 hostip.
     BuiltIn.Pass Execution If    "${OPENSTACK_TOPO}" == "1cmb-0ctl-0cmp"    "Test is not supported for combo node"
     ${unconfig_extra_route_ip1} =    BuiltIn.Catenate    sudo ifconfig ${SUB_IF} down
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[1]    ${unconfig_extra_route_ip1}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[1]    ifconfig
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[1]
+    ...    ${unconfig_extra_route_ip1}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[1]
+    ...    ifconfig
     BuiltIn.Should Not Contain    ${output}    ${SUB_IF}
-    ${config_extra_route_ip1} =    BuiltIn.Catenate    sudo ifconfig ${SUB_IF} ${EXTRA_NW_IP}[0] netmask 255.255.255.0 up
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ${config_extra_route_ip1}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ifconfig
+    ${config_extra_route_ip1} =    BuiltIn.Catenate
+    ...    sudo ifconfig ${SUB_IF} ${EXTRA_NW_IP}[0] netmask 255.255.255.0 up
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ${config_extra_route_ip1}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ifconfig
     BuiltIn.Should Contain    ${output}    ${SUB_IF}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ifconfig ${SUB_IF}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ${RPING_MIP_IP}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ifconfig ${SUB_IF}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ${RPING_MIP_IP}
     BuiltIn.Should Contain    ${output}    Received 0 reply
     BuiltIn.Should Contain    ${output}    broadcast
     BuiltIn.Wait Until Keyword Succeeds    5s    1s    Verify Learnt IP    ${FIB_ENTRY_2}    session
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ${RPING_MIP_IP}
-    ${output}    VpnOperations.Get Fib Entries    session
-    ${resp}=    BuiltIn.Should Match Regexp    ${output}    destPrefix\\":\\"${FIB_ENTRY_2}\\/32".*"${OS_CMP1_IP}\\"
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ${RPING_MIP_IP}
+    ${output} =    VpnOperations.Get Fib Entries    session
+    ${resp} =    BuiltIn.Should Match Regexp    ${output}    destPrefix\\":\\"${FIB_ENTRY_2}\\/32".*"${OS_CMP1_IP}\\"
     Verify Ping To Sub Interface    ${FIB_ENTRY_2}
     ${unconfig_extra_route_ip1} =    BuiltIn.Catenate    sudo ifconfig ${SUB_IF} down
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ${unconfig_extra_route_ip1}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ${unconfig_extra_route_ip1}
 
 Verify ping to subnet gateway
     [Documentation]    Verify ping happens to subnet gateway. To be submitted in next patch
@@ -130,6 +192,7 @@ Same DPN MIP Migration
     [Tags]    not-implemented    exclude
     TODO
 
+
 *** Keywords ***
 Suite Setup
     [Documentation]    Suite Setup to create the necessary resources.
@@ -156,19 +219,72 @@ Suite Setup
         BuiltIn.Should Contain    ${neutron_subnets}    ${subnet}
     END
     OpenStackOperations.Create Allow All SecurityGroup    ${SECURITY_GROUP}
-    OpenStackOperations.Create Port    ${NETWORKS}[0]    ${PORTS}[0]    sg=${SECURITY_GROUP}    allowed_address_pairs=@{EXTRA_NW_IP}
-    OpenStackOperations.Create Port    ${NETWORKS}[0]    ${PORTS}[1]    sg=${SECURITY_GROUP}    allowed_address_pairs=@{EXTRA_NW_IP}
-    OpenStackOperations.Create Port    ${NETWORKS}[1]    ${PORTS}[2]    sg=${SECURITY_GROUP}    allowed_address_pairs=@{EXTRA_NW_IP}
-    OpenStackOperations.Create Port    ${NETWORKS}[1]    ${PORTS}[3]    sg=${SECURITY_GROUP}    allowed_address_pairs=@{EXTRA_NW_IP}
-    OpenStackOperations.Create Port    ${NETWORKS}[2]    ${PORTS}[4]    sg=${SECURITY_GROUP}    allowed_address_pairs=@{EXTRA_NW_IP}
-    OpenStackOperations.Create Port    ${NETWORKS}[2]    ${PORTS}[5]    sg=${SECURITY_GROUP}    allowed_address_pairs=@{EXTRA_NW_IP}
-    Wait Until Keyword Succeeds    3s    1s    Check For Elements At URI    ${CONFIG_API}/neutron:neutron/ports/    ${PORTS}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS}[0]    ${NET_1_VMS}[0]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS}[1]    ${NET_1_VMS}[1]    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS}[2]    ${NET_2_VMS}[0]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS}[3]    ${NET_2_VMS}[1]    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS}[4]    ${NET_3_VMS}[0]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS}[5]    ${NET_3_VMS}[1]    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Port
+    ...    ${NETWORKS}[0]
+    ...    ${PORTS}[0]
+    ...    sg=${SECURITY_GROUP}
+    ...    allowed_address_pairs=@{EXTRA_NW_IP}
+    OpenStackOperations.Create Port
+    ...    ${NETWORKS}[0]
+    ...    ${PORTS}[1]
+    ...    sg=${SECURITY_GROUP}
+    ...    allowed_address_pairs=@{EXTRA_NW_IP}
+    OpenStackOperations.Create Port
+    ...    ${NETWORKS}[1]
+    ...    ${PORTS}[2]
+    ...    sg=${SECURITY_GROUP}
+    ...    allowed_address_pairs=@{EXTRA_NW_IP}
+    OpenStackOperations.Create Port
+    ...    ${NETWORKS}[1]
+    ...    ${PORTS}[3]
+    ...    sg=${SECURITY_GROUP}
+    ...    allowed_address_pairs=@{EXTRA_NW_IP}
+    OpenStackOperations.Create Port
+    ...    ${NETWORKS}[2]
+    ...    ${PORTS}[4]
+    ...    sg=${SECURITY_GROUP}
+    ...    allowed_address_pairs=@{EXTRA_NW_IP}
+    OpenStackOperations.Create Port
+    ...    ${NETWORKS}[2]
+    ...    ${PORTS}[5]
+    ...    sg=${SECURITY_GROUP}
+    ...    allowed_address_pairs=@{EXTRA_NW_IP}
+    Wait Until Keyword Succeeds
+    ...    3s
+    ...    1s
+    ...    Check For Elements At URI
+    ...    ${CONFIG_API}/neutron:neutron/ports/
+    ...    ${PORTS}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${PORTS}[0]
+    ...    ${NET_1_VMS}[0]
+    ...    ${OS_CMP1_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${PORTS}[1]
+    ...    ${NET_1_VMS}[1]
+    ...    ${OS_CMP2_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${PORTS}[2]
+    ...    ${NET_2_VMS}[0]
+    ...    ${OS_CMP1_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${PORTS}[3]
+    ...    ${NET_2_VMS}[1]
+    ...    ${OS_CMP2_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${PORTS}[4]
+    ...    ${NET_3_VMS}[0]
+    ...    ${OS_CMP1_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${PORTS}[5]
+    ...    ${NET_3_VMS}[1]
+    ...    ${OS_CMP2_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
     @{NET_1_VM_IPS}    ${NET_1_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_1_VMS}
     @{NET_2_VM_IPS}    ${NET_2_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_2_VMS}
     @{NET_3_VM_IPS}    ${NET_3_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_3_VMS}
@@ -185,7 +301,13 @@ Suite Setup
     OpenStackOperations.Add Router Interface    ${ROUTER}    ${SUBNETS}[1]
     OpenStackOperations.Add Router Interface    ${ROUTER}    ${SUBNETS}[2]
     ${tenant_id} =    OpenStackOperations.Get Tenant ID From Network    ${NET_ID}
-    VpnOperations.VPN Create L3VPN    vpnid=${VPN_INSTANCE_IDS}[0]    name=${VPN_NAMES[0]}    rd=${RD1}    exportrt=${EXPORT_RT}    importrt=${IMPORT_RT}    tenantid=${tenant_id}
+    VpnOperations.VPN Create L3VPN
+    ...    vpnid=${VPN_INSTANCE_IDS}[0]
+    ...    name=${VPN_NAMES[0]}
+    ...    rd=${RD1}
+    ...    exportrt=${EXPORT_RT}
+    ...    importrt=${IMPORT_RT}
+    ...    tenantid=${tenant_id}
     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VPN_INSTANCE_IDS}[0]
     BuiltIn.Should Contain    ${resp}    ${VPN_INSTANCE_IDS}[0]
     Associate L3VPN To ROUTER
@@ -194,8 +316,14 @@ Suite Setup
 
 Suite Teardown
     [Documentation]    Delete the setup
-    BuiltIn.Run Keyword And Ignore Error    VpnOperations.Dissociate L3VPN From Networks    networkid=${NET_ID}    vpnid=${VPN_INSTANCE_IDS}[0]
-    BuiltIn.Run Keyword And Ignore Error    VpnOperations.Dissociate VPN to Router    routerid=${ROUTER_ID}    vpnid=${VPN_INSTANCE_IDS}[0]
+    BuiltIn.Run Keyword And Ignore Error
+    ...    VpnOperations.Dissociate L3VPN From Networks
+    ...    networkid=${NET_ID}
+    ...    vpnid=${VPN_INSTANCE_IDS}[0]
+    BuiltIn.Run Keyword And Ignore Error
+    ...    VpnOperations.Dissociate VPN to Router
+    ...    routerid=${ROUTER_ID}
+    ...    vpnid=${VPN_INSTANCE_IDS}[0]
     BuiltIn.Run Keyword And Ignore Error    VpnOperations.VPN Delete L3VPN    vpnid=${VPN_INSTANCE_IDS}[0]
     OpenStackOperations.OpenStack Suite Teardown
 
@@ -211,36 +339,68 @@ Associate L3VPN To ROUTER
 
 Verify Ping On Same Networks
     [Documentation]    Verify ping among VM of same network
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ping -c 3 ${NET_1_VM_IPS}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ping -c 3 ${NET_1_VM_IPS}[1]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${NET_2_VM_IPS}[0]    ping -c 3 ${NET_2_VM_IPS}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${NET_2_VM_IPS}[0]
+    ...    ping -c 3 ${NET_2_VM_IPS}[1]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[1]    ping -c 3 ${NET_1_VM_IPS}[0]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[1]
+    ...    ping -c 3 ${NET_1_VM_IPS}[0]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${NET_2_VM_IPS}[1]    ping -c 3 ${NET_2_VM_IPS}[0]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${NET_2_VM_IPS}[1]
+    ...    ping -c 3 ${NET_2_VM_IPS}[0]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[2]    ${NET_3_VM_IPS}[0]    ping -c 3 ${NET_3_VM_IPS}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[2]
+    ...    ${NET_3_VM_IPS}[0]
+    ...    ping -c 3 ${NET_3_VM_IPS}[1]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
 
 Verify Ping On Different Networks
     [Documentation]    Verify ping among VMs of different network
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ping -c 3 ${NET_2_VM_IPS}[0]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ping -c 3 ${NET_2_VM_IPS}[0]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${NET_2_VM_IPS}[0]    ping -c 3 ${NET_3_VM_IPS}[0]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${NET_2_VM_IPS}[0]
+    ...    ping -c 3 ${NET_3_VM_IPS}[0]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[1]    ping -c 3 ${NET_2_VM_IPS}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[1]
+    ...    ping -c 3 ${NET_2_VM_IPS}[1]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${NET_2_VM_IPS}[1]    ping -c 3 ${NET_3_VM_IPS}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${NET_2_VM_IPS}[1]
+    ...    ping -c 3 ${NET_3_VM_IPS}[1]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[2]    ${NET_3_VM_IPS}[0]    ping -c 3 ${NET_1_VM_IPS}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[2]
+    ...    ${NET_3_VM_IPS}[0]
+    ...    ping -c 3 ${NET_1_VM_IPS}[1]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
 
 Verify Flows Are Present
-    [Arguments]    ${ip}
     [Documentation]    Verify Flows Are Present
     ...    Verify that Flows to support L3 Connectivity (like ELAN_SMAC_TABLE, FIB_TABLE)
     ...    and a FIB entry to reach all the VMs in the network exist in the OVS pipeline.
-    ${flow_output}=    Utils.Run Command On Remote System    ${ip}    sudo ovs-ofctl -O OpenFlow13 dump-flows ${INTEGRATION_BRIDGE}
+    [Arguments]    ${ip}
+    ${flow_output} =    Utils.Run Command On Remote System
+    ...    ${ip}
+    ...    sudo ovs-ofctl -O OpenFlow13 dump-flows ${INTEGRATION_BRIDGE}
     BuiltIn.Log    ${flow_output}
     ${resp} =    BuiltIn.Should Contain    ${flow_output}    table=50
     ${resp} =    BuiltIn.Should Contain    ${flow_output}    table=21,
@@ -258,19 +418,30 @@ Verify Flows Are Present On All Compute Nodes
     END
 
 Verify Ping To Sub Interface
-    [Arguments]    ${sub_interface_ip}
     [Documentation]    Verify ping to the sub-interface
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ping -c 3 ${sub_interface_ip}
+    [Arguments]    ${sub_interface_ip}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ping -c 3 ${sub_interface_ip}
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${NET_2_VM_IPS}[0]    ping -c 3 ${sub_interface_ip}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${NET_2_VM_IPS}[0]
+    ...    ping -c 3 ${sub_interface_ip}
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[2]    ${NET_3_VM_IPS}[0]    ping -c 3 ${sub_interface_ip}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[2]
+    ...    ${NET_3_VM_IPS}[0]
+    ...    ping -c 3 ${sub_interface_ip}
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
 
 Verify Learnt IP
-    [Arguments]    ${ip}    ${session}
     [Documentation]    Check that sub interface ip has been learnt after ARP request
-    ${resp}    RequestsLibrary.Get Request    ${session}    /restconf/operational/odl-l3vpn:learnt-vpn-vip-to-port-data/
+    [Arguments]    ${ip}    ${session}
+    ${resp} =    RequestsLibrary.Get Request
+    ...    ${session}
+    ...    /restconf/operational/odl-l3vpn:learnt-vpn-vip-to-port-data/
     BuiltIn.Log    ${resp.text}
     BuiltIn.Should Contain    ${resp.text}    ${ip}
 
index 76b044d615e5ae95e1c3ac4e63bbda1a14ae2e03..02b08a2004a3f16b70c7b63f013c6652d90dec26 100644 (file)
@@ -1,57 +1,75 @@
 *** Settings ***
-Documentation     Test suite to validate vpnservice functionality in an openstack integrated environment.
-...               The assumption of this suite is that the environment is already configured with the proper
-...               integration bridges and vxlan tunnels.
-Suite Setup       Suite Setup
-Suite Teardown    Suite Teardown
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     OpenStackOperations.Get Test Teardown Debugs
-Library           OperatingSystem
-Library           RequestsLibrary
-Resource          ../../../libraries/CompareStream.robot
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/OpenStackOperations.robot
-Resource          ../../../libraries/DevstackUtils.robot
-Resource          ../../../libraries/VpnOperations.robot
-Resource          ../../../libraries/OVSDB.robot
-Resource          ../../../libraries/SetupUtils.robot
-Resource          ../../../libraries/Tcpdump.robot
-Resource          ../../../variables/Variables.robot
-Resource          ../../../variables/netvirt/Variables.robot
+Documentation       Test suite to validate vpnservice functionality in an openstack integrated environment.
+...                 The assumption of this suite is that the environment is already configured with the proper
+...                 integration bridges and vxlan tunnels.
+
+Library             OperatingSystem
+Library             RequestsLibrary
+Resource            ../../../libraries/CompareStream.robot
+Resource            ../../../libraries/Utils.robot
+Resource            ../../../libraries/OpenStackOperations.robot
+Resource            ../../../libraries/DevstackUtils.robot
+Resource            ../../../libraries/VpnOperations.robot
+Resource            ../../../libraries/OVSDB.robot
+Resource            ../../../libraries/SetupUtils.robot
+Resource            ../../../libraries/Tcpdump.robot
+Resource            ../../../variables/Variables.robot
+Resource            ../../../variables/netvirt/Variables.robot
+
+Suite Setup         Suite Setup
+Suite Teardown      Suite Teardown
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       OpenStackOperations.Get Test Teardown Debugs
+
 
 *** Variables ***
-${SECURITY_GROUP}    vpn_sg
-@{NETWORKS}       vpn_net_1    vpn_net_2
-@{SUBNETS}        vpn_sub_1    vpn_sub_2
-@{SUBNET_CIDRS}    10.1.1.0/24    20.1.1.0/24
-@{PORTS}          vpn_net_1_port_1    vpn_net_1_port_2    vpn_net_2_port_1    vpn_net_2_port_2
-@{NET_1_VMS}      vpn_net_1_vm_1    vpn_net_1_vm_2
-@{NET_2_VMS}      vpn_net_2_vm_1    vpn_net_2_vm_2
-${ROUTER}         vpn_router
-@{EXTRA_NW_IP}    71.1.1.2    72.1.1.2
-@{EXTRA_NW_SUBNET}    71.1.1.0/24    72.1.1.0/24
-${UPDATE_NETWORK}    UpdateNetwork
-${UPDATE_SUBNET}    UpdateSubnet
-${UPDATE_PORT}    UpdatePort
-@{VPN_INSTANCE_IDS}    4ae8cd92-48ca-49b5-94e1-b2921a261441    4ae8cd92-48ca-49b5-94e1-b2921a261442    4ae8cd92-48ca-49b5-94e1-b2921a261443
-@{VPN_NAMES}      vpn_1    vpn_2    vpn_3
-@{RDS}            ["2200:2"]    ["2300:2"]    ["2400:2"]
-${PORT_NEW}       vpn_net_1_port_new
-${VM_NAME_NEW}    vpn_net_1_vm_new
-${INVALID_VPN_INSTANCE_ID}    AAAAAAAAAA-4848-4949-9494-666666666666
+${SECURITY_GROUP}               vpn_sg
+@{NETWORKS}                     vpn_net_1    vpn_net_2
+@{SUBNETS}                      vpn_sub_1    vpn_sub_2
+@{SUBNET_CIDRS}                 10.1.1.0/24    20.1.1.0/24
+@{PORTS}                        vpn_net_1_port_1    vpn_net_1_port_2    vpn_net_2_port_1    vpn_net_2_port_2
+@{NET_1_VMS}                    vpn_net_1_vm_1    vpn_net_1_vm_2
+@{NET_2_VMS}                    vpn_net_2_vm_1    vpn_net_2_vm_2
+${ROUTER}                       vpn_router
+@{EXTRA_NW_IP}                  71.1.1.2    72.1.1.2
+@{EXTRA_NW_SUBNET}              71.1.1.0/24    72.1.1.0/24
+${UPDATE_NETWORK}               UpdateNetwork
+${UPDATE_SUBNET}                UpdateSubnet
+${UPDATE_PORT}                  UpdatePort
+@{VPN_INSTANCE_IDS}
+...                             4ae8cd92-48ca-49b5-94e1-b2921a261441
+...                             4ae8cd92-48ca-49b5-94e1-b2921a261442
+...                             4ae8cd92-48ca-49b5-94e1-b2921a261443
+@{VPN_NAMES}                    vpn_1    vpn_2    vpn_3
+@{RDS}                          ["2200:2"]    ["2300:2"]    ["2400:2"]
+${PORT_NEW}                     vpn_net_1_port_new
+${VM_NAME_NEW}                  vpn_net_1_vm_new
+${INVALID_VPN_INSTANCE_ID}      AAAAAAAAAA-4848-4949-9494-666666666666
+
 
 *** Test Cases ***
 Check ELAN Datapath Traffic Within The Networks
     [Documentation]    Checks datapath within the same network with different vlans.
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ping -c 3 ${NET_1_VM_IPS}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ping -c 3 ${NET_1_VM_IPS}[1]
     BuiltIn.Should Contain    ${output}    64 bytes
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${NET_2_VM_IPS}[0]    ping -c 3 ${NET_2_VM_IPS}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${NET_2_VM_IPS}[0]
+    ...    ping -c 3 ${NET_2_VM_IPS}[1]
     BuiltIn.Should Contain    ${output}    64 bytes
 
 Create Router
     OpenStackOperations.Create Router    ${ROUTER}
     ${router_list} =    BuiltIn.Create List    ${ROUTER}
-    BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${ROUTER_URL}    ${router_list}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    3s
+    ...    1s
+    ...    Utils.Check For Elements At URI
+    ...    ${ROUTER_URL}
+    ...    ${router_list}
 
 Add Interfaces To Router
     FOR    ${interface}    IN    @{SUBNETS}
@@ -63,9 +81,17 @@ Add Interfaces To Router
     BuiltIn.Set Suite Variable    ${GWIP_ADDRS}
 
 Check L3_Datapath Traffic Across Networks With Router
-    @{tcpdump_conn_ids} =    OpenStackOperations.Start Packet Capture On Nodes    tcpdump_vpn    ${EMPTY}    @{OS_ALL_IPS}
+    @{tcpdump_conn_ids} =    OpenStackOperations.Start Packet Capture On Nodes
+    ...    tcpdump_vpn
+    ...    ${EMPTY}
+    ...    @{OS_ALL_IPS}
     ${vm_ips} =    BuiltIn.Create List    @{NET_1_VM_IPS}    @{NET_2_VM_IPS}
-    BuiltIn.Wait Until Keyword Succeeds    30s    10s    Utils.Check For Elements At URI    ${FIB_ENTRY_URL}    ${vm_ips}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    Utils.Check For Elements At URI
+    ...    ${FIB_ENTRY_URL}
+    ...    ${vm_ips}
     Verify Flows Are Present For L3VPN On All Compute Nodes    ${vm_ips}
     BuiltIn.Wait Until Keyword Succeeds    30s    10s    VpnOperations.Verify GWMAC Entry On ODL    ${GWMAC_ADDRS}
     Verify GWMAC Flow Entry On Flow Table On All Compute Nodes
@@ -77,22 +103,45 @@ Check L3_Datapath Traffic Across Networks With Router
 
 Add Multiple Extra Routes And Check Datapath Before L3VPN Creation
     ${CONFIG_EXTRA_ROUTE_IP1} =    BuiltIn.Catenate    sudo ifconfig eth0:1 ${EXTRA_NW_IP}[0] netmask 255.255.255.0 up
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ${CONFIG_EXTRA_ROUTE_IP1}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ${CONFIG_EXTRA_ROUTE_IP1}
     ${CONFIG_EXTRA_ROUTE_IP2} =    BuiltIn.Catenate    sudo ifconfig eth0:2 ${EXTRA_NW_IP}[1] netmask 255.255.255.0 up
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ${CONFIG_EXTRA_ROUTE_IP2}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ifconfig
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ${CONFIG_EXTRA_ROUTE_IP2}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ifconfig
     ${ext_rt1} =    BuiltIn.Set Variable    destination=${EXTRA_NW_SUBNET}[0],gateway=${NET_1_VM_IPS}[0]
     ${ext_rt2} =    BuiltIn.Set Variable    destination=${EXTRA_NW_SUBNET}[1],gateway=${NET_1_VM_IPS}[0]
     ${cmd} =    BuiltIn.Catenate    ${RT_OPTIONS}    ${ext_rt1}    ${RT_OPTIONS}    ${ext_rt2}
     OpenStackOperations.Update Router    ${ROUTER}    ${cmd}
     OpenStackOperations.Show Router    ${ROUTER}
     ${vm_ips} =    BuiltIn.Create List    @{EXTRA_NW_SUBNET}
-    BuiltIn.Wait Until Keyword Succeeds    30s    10s    Utils.Check For Elements At URI    ${FIB_ENTRY_URL}    ${vm_ips}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[1]    ping -c 3 ${EXTRA_NW_IP}[1]
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    Utils.Check For Elements At URI
+    ...    ${FIB_ENTRY_URL}
+    ...    ${vm_ips}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[1]
+    ...    ping -c 3 ${EXTRA_NW_IP}[1]
     BuiltIn.Should Contain    ${output}    64 bytes
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${NET_2_VM_IPS}[1]    ping -c 3 ${EXTRA_NW_IP}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${NET_2_VM_IPS}[1]
+    ...    ping -c 3 ${EXTRA_NW_IP}[1]
     BuiltIn.Should Contain    ${output}    64 bytes
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[1]    ping -c 3 ${EXTRA_NW_IP}[0]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[1]
+    ...    ping -c 3 ${EXTRA_NW_IP}[0]
     BuiltIn.Should Contain    ${output}    64 bytes
 
 Delete Extra Route
@@ -102,12 +151,18 @@ Delete Extra Route
 Delete And Recreate Extra Route
     [Documentation]    Recreate multiple extra route and check data path before L3VPN creation
     ${CONFIG_EXTRA_ROUTE_IP1} =    BuiltIn.Catenate    sudo ifconfig eth0:1 ${EXTRA_NW_IP}[0] netmask 255.255.255.0 up
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ${CONFIG_EXTRA_ROUTE_IP1}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ${CONFIG_EXTRA_ROUTE_IP1}
     ${ext_rt1} =    BuiltIn.Set Variable    destination=${EXTRA_NW_SUBNET}[0],gateway=${NET_1_VM_IPS}[0]
     ${cmd} =    BuiltIn.Catenate    ${RT_OPTIONS}    ${ext_rt1}
     OpenStackOperations.Update Router    ${ROUTER}    ${cmd}
     OpenStackOperations.Show Router    ${ROUTER}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[1]    ping -c 3 ${EXTRA_NW_IP}[0]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[1]
+    ...    ping -c 3 ${EXTRA_NW_IP}[0]
     BuiltIn.Should Contain    ${output}    64 bytes
     # clear off extra-routes before the next set of tests
     [Teardown]    BuiltIn.Run Keywords    OpenStackOperations.Update Router    ${ROUTER}    ${RT_CLEAR}
@@ -118,7 +173,13 @@ Create L3VPN
     ${net_id} =    OpenStackOperations.Get Net Id    ${NETWORKS}[0]
     ${tenant_id} =    OpenStackOperations.Get Tenant ID From Network    ${net_id}
     BuiltIn.Log    ${RDS}[0]
-    VpnOperations.VPN Create L3VPN    vpnid=${VPN_INSTANCE_IDS}[0]    name=${VPN_NAMES}[0]    rd=${RDS}[0]    exportrt=${RDS}[0]    importrt=${RDS}[0]    tenantid=${tenant_id}
+    VpnOperations.VPN Create L3VPN
+    ...    vpnid=${VPN_INSTANCE_IDS}[0]
+    ...    name=${VPN_NAMES}[0]
+    ...    rd=${RDS}[0]
+    ...    exportrt=${RDS}[0]
+    ...    importrt=${RDS}[0]
+    ...    tenantid=${tenant_id}
     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VPN_INSTANCE_IDS}[0]
     BuiltIn.Should Contain    ${resp}    ${VPN_INSTANCE_IDS}[0]
 
@@ -130,10 +191,27 @@ Associate L3VPN To Routers
 
 Verify L3VPN Datapath With Router Association
     ${vm_ips} =    BuiltIn.Create List    @{NET_1_VM_IPS}    @{NET_2_VM_IPS}
-    CompareStream.Run_Keyword_If_Less_Than_Magnesium    BuiltIn.Wait Until Keyword Succeeds    30s    10s    Utils.Check For Elements At URI    ${VPN_IFACES_URL}    ${vm_ips}
-    CompareStream.Run_Keyword_If_At_Least_Magnesium    BuiltIn.Wait Until Keyword Succeeds    30s    10s    Utils.Check For Elements At URI    ${VPN_INST_IFACES_URL}    ${vm_ips}
+    CompareStream.Run_Keyword_If_Less_Than_Magnesium
+    ...    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    Utils.Check For Elements At URI
+    ...    ${VPN_IFACES_URL}
+    ...    ${vm_ips}
+    CompareStream.Run_Keyword_If_At_Least_Magnesium
+    ...    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    Utils.Check For Elements At URI
+    ...    ${VPN_INST_IFACES_URL}
+    ...    ${vm_ips}
     ${RD} =    Strip String    ${RDS}[0]    characters="[]
-    BuiltIn.Wait Until Keyword Succeeds    60s    15s    Utils.Check For Elements At URI    ${CONFIG_API}/odl-fib:fibEntries/vrfTables/${RD}/    ${vm_ips}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    60s
+    ...    15s
+    ...    Utils.Check For Elements At URI
+    ...    ${CONFIG_API}/odl-fib:fibEntries/vrfTables/${RD}/
+    ...    ${vm_ips}
     Verify Flows Are Present For L3VPN On All Compute Nodes    ${vm_ips}
     BuiltIn.Wait Until Keyword Succeeds    30s    15s    VpnOperations.Verify GWMAC Entry On ODL    ${GWMAC_ADDRS}
     Verify GWMAC Flow Entry On Flow Table On All Compute Nodes
@@ -152,7 +230,12 @@ Delete Router Failure When Associated With L3VPN
     ${router_output} =    OpenStackOperations.List Routers
     BuiltIn.Should Contain    ${router_output}    ${ROUTER}
     @{router_list} =    BuiltIn.Create List    ${ROUTER}
-    BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${ROUTER_URL}    ${router_list}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    3s
+    ...    1s
+    ...    Utils.Check For Elements At URI
+    ...    ${ROUTER_URL}
+    ...    ${router_list}
     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VPN_INSTANCE_IDS}[0]
     BuiltIn.Should Contain    ${resp}    ${router_id}
     Verify GWMAC Flow Entry On Flow Table On All Compute Nodes
@@ -160,7 +243,11 @@ Delete Router Failure When Associated With L3VPN
 Verify Remove Interface From Router When Associated With L3VPN
     OpenStackOperations.Remove Interface    ${ROUTER}    ${SUBNETS}[0]
     OpenStackOperations.Test Operations From Vm Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ${NET_1_VM_IPS}
-    OpenStackOperations.Test Operations From Vm Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ${NET_2_VM_IPS}    ping_should_succeed=False
+    OpenStackOperations.Test Operations From Vm Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ${NET_2_VM_IPS}
+    ...    ping_should_succeed=False
 
 Verify L3VPN Datapath With Router Dissociation When Interfaces are Added To Router
     OpenStackOperations.Add Router Interface    ${ROUTER}    ${SUBNETS}[0]
@@ -174,14 +261,24 @@ Verify L3VPN Datapath With Router Dissociation When Interfaces are Added To Rout
     OpenStackOperations.Test Operations From Vm Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ${dst_ip_list}
     BuiltIn.Log    Check datapath from network2 to network1
     ${dst_ip_list} =    BuiltIn.Create List    ${NET_2_VM_IPS}[1]    @{NET_1_VM_IPS}
-    BuiltIn.Wait Until Keyword Succeeds    60s    10s    OpenStackOperations.Test Operations From Vm Instance    ${NETWORKS}[1]    ${NET_2_VM_IPS}[0]    ${dst_ip_list}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    60s
+    ...    10s
+    ...    OpenStackOperations.Test Operations From Vm Instance
+    ...    ${NETWORKS}[1]
+    ...    ${NET_2_VM_IPS}[0]
+    ...    ${dst_ip_list}
 
 Remove Router Interfaces And Check L3_Datapath Traffic Across Networks
     ${router_id} =    OpenStackOperations.Get Router Id    ${ROUTER}
     FOR    ${INTERFACE}    IN    @{SUBNETS}
         OpenStackOperations.Remove Interface    ${ROUTER}    ${INTERFACE}
         OpenStackOperations.Test Operations From Vm Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ${NET_1_VM_IPS}
-        OpenStackOperations.Test Operations From Vm Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ${NET_2_VM_IPS}    ping_should_succeed=False
+        OpenStackOperations.Test Operations From Vm Instance
+        ...    ${NETWORKS}[0]
+        ...    ${NET_1_VM_IPS}[0]
+        ...    ${NET_2_VM_IPS}
+        ...    ping_should_succeed=False
     END
     ${interface_output} =    OpenStackOperations.Show Router Interface    ${ROUTER}
     FOR    ${INTERFACE}    IN    @{SUBNETS}
@@ -194,7 +291,13 @@ Delete Router
     ${router_output} =    OpenStackOperations.List Routers
     BuiltIn.Should Not Contain    ${router_output}    ${ROUTER}
     @{router_list} =    BuiltIn.Create List    ${ROUTER}
-    BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements Not At URI    ${ROUTER_URL}    ${router_list}    check_for_null=True
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    3s
+    ...    1s
+    ...    Utils.Check For Elements Not At URI
+    ...    ${ROUTER_URL}
+    ...    ${router_list}
+    ...    check_for_null=True
     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VPN_INSTANCE_IDS}[0]
     BuiltIn.Should Not Contain    ${resp}    ${ROUTER}
     Verify GWMAC Flow Entry Removed From Flow Table On All Compute Nodes
@@ -205,7 +308,9 @@ Delete Router With NonExistentRouter Name
     BuiltIn.Log    ${result.stdout}
     BuiltIn.Log    ${result.stderr}
     BuiltIn.Should Be True    '${result.rc}' == '1'
-    BuiltIn.Should Match Regexp    ${result.stderr}    Failed to delete router with name or ID 'nonExistentRouter': No Router found for nonExistentRouter
+    BuiltIn.Should Match Regexp
+    ...    ${result.stderr}
+    ...    Failed to delete router with name or ID 'nonExistentRouter': No Router found for nonExistentRouter
 
 Associate Networks To L3VPN
     [Documentation]    Associates L3VPN to networks and verify
@@ -220,40 +325,83 @@ Associate Networks To L3VPN
 
 Check Datapath Traffic Across Networks With L3VPN
     [Documentation]    Datapath Test Across the networks with VPN.
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ping -c 20 ${NET_1_VM_IPS}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ping -c 20 ${NET_1_VM_IPS}[1]
     BuiltIn.Should Contain    ${output}    64 bytes
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ping -c 20 ${NET_2_VM_IPS}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ping -c 20 ${NET_2_VM_IPS}[1]
     BuiltIn.Should Contain    ${output}    64 bytes
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ping -c 20 ${NET_2_VM_IPS}[0]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ping -c 20 ${NET_2_VM_IPS}[0]
     BuiltIn.Should Contain    ${output}    64 bytes
 
 Verification of route update after VM port removed and re added to VPN
     [Documentation]    Verify route update after VM port removed and re added to VPN
     OpenStackOperations.Delete Port    ${PORTS}[0]
     ${net_list} =    BuiltIn.Create List    ${NET_1_VM_IPS[0]}
-    BuiltIn.Wait Until Keyword Succeeds    30s    10s    Utils.Check For Elements Not At URI    ${FIB_ENTRY_URL}    ${net_list}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    Utils.Check For Elements Not At URI
+    ...    ${FIB_ENTRY_URL}
+    ...    ${net_list}
     OpenStackOperations.Delete Vm Instance    ${NET_1_VMS}[0]
     OpenStackOperations.Create Port    ${NETWORKS}[0]    ${PORTS}[0]    sg=${SECURITY_GROUP}
     BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${PORT_URL}    ${PORTS}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS}[0]    ${NET_1_VMS}[0]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${PORTS}[0]
+    ...    ${NET_1_VMS}[0]
+    ...    ${OS_CMP1_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
     OpenStackOperations.Poll VM Is ACTIVE    ${NET_1_VMS}[0]
-    ${status}    ${ips_and_console_log} =    BuiltIn.Run Keyword And Ignore Error    BuiltIn.Wait Until Keyword Succeeds    360s    15s    OpenStackOperations.Get VM IP
-    ...    true    ${NET_1_VMS}[0]
+    ${status}    ${ips_and_console_log} =    BuiltIn.Run Keyword And Ignore Error
+    ...    BuiltIn.Wait Until Keyword Succeeds
+    ...    360s
+    ...    15s
+    ...    OpenStackOperations.Get VM IP
+    ...    true
+    ...    ${NET_1_VMS}[0]
     @{NET_1_VM_IPS}    ${NET_1_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_1_VMS}
     BuiltIn.Set Suite Variable    @{NET_1_VM_IPS}
-    BuiltIn.Wait Until Keyword Succeeds    30s    10s    Utils.Check For Elements At URI    ${FIB_ENTRY_URL}    ${NET_1_VM_IPS}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ping -c 10 ${NET_1_VM_IPS}[1]
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    Utils.Check For Elements At URI
+    ...    ${FIB_ENTRY_URL}
+    ...    ${NET_1_VM_IPS}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ping -c 10 ${NET_1_VM_IPS}[1]
     BuiltIn.Should Contain    ${output}    64 bytes
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ping -c 10 ${NET_2_VM_IPS}[0]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPS}[0]
+    ...    ping -c 10 ${NET_2_VM_IPS}[0]
     BuiltIn.Should Contain    ${output}    64 bytes
 
 Verification of route update after reconfiguring vpn by adding new ports
     [Documentation]    Verify route update after reconfiguring vpn by creating new VM with new port on openvswitch1
     OpenStackOperations.Create Port    ${NETWORKS}[0]    ${PORT_NEW}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORT_NEW}    ${VM_NAME_NEW}    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${PORT_NEW}
+    ...    ${VM_NAME_NEW}
+    ...    ${OS_CMP1_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
     OpenStackOperations.Poll VM Is ACTIVE    ${VM_NAME_NEW}
-    ${status}    ${ips_and_console_log} =    BuiltIn.Run Keyword And Ignore Error    BuiltIn.Wait Until Keyword Succeeds    360s    15s    OpenStackOperations.Get VM IP
-    ...    true    ${VM_NAME_NEW}
+    ${status}    ${ips_and_console_log} =    BuiltIn.Run Keyword And Ignore Error
+    ...    BuiltIn.Wait Until Keyword Succeeds
+    ...    360s
+    ...    15s
+    ...    OpenStackOperations.Get VM IP
+    ...    true
+    ...    ${VM_NAME_NEW}
     ${output} =    VpnOperations.Get Fib Entries    session
     BuiltIn.Should Contain    ${output}    ${ips_and_console_log[0]}
     OpenStackOperations.Delete Vm Instance    ${VM_NAME_NEW}
@@ -272,7 +420,9 @@ Dissociate L3VPN From Networks
 
 Delete Unknown L3VPN
     [Documentation]    Verification of a failure response with deletion of an unknown L3VPN
-    ${status}    ${message} =    BuiltIn.Run Keyword And Ignore Error    VpnOperations.VPN Delete L3VPN    vpnid=${INVALID_VPN_INSTANCE_ID}
+    ${status}    ${message} =    BuiltIn.Run Keyword And Ignore Error
+    ...    VpnOperations.VPN Delete L3VPN
+    ...    vpnid=${INVALID_VPN_INSTANCE_ID}
     BuiltIn.Should Contain    ${status}    FAIL
 
 Delete L3VPN
@@ -283,9 +433,27 @@ Create Multiple L3VPN
     [Documentation]    Creates three L3VPNs and then verify the same
     ${net_id} =    OpenStackOperations.Get Net Id    ${NETWORKS}[0]
     ${tenant_id} =    OpenStackOperations.Get Tenant ID From Network    ${net_id}
-    VpnOperations.VPN Create L3VPN    vpnid=${VPN_INSTANCE_IDS}[0]    name=${VPN_NAMES}[0]    rd=${RDS}[0]    exportrt=${RDS}[0]    importrt=${RDS}[0]    tenantid=${tenant_id}
-    VpnOperations.VPN Create L3VPN    vpnid=${VPN_INSTANCE_IDS}[1]    name=${VPN_NAMES}[1]    rd=${RDS}[1]    exportrt=${RDS}[1]    importrt=${RDS}[1]    tenantid=${tenant_id}
-    VpnOperations.VPN Create L3VPN    vpnid=${VPN_INSTANCE_IDS}[2]    name=${VPN_NAMES}[2]    rd=${RDS}[2]    exportrt=${RDS}[2]    importrt=${RDS}[2]    tenantid=${tenant_id}
+    VpnOperations.VPN Create L3VPN
+    ...    vpnid=${VPN_INSTANCE_IDS}[0]
+    ...    name=${VPN_NAMES}[0]
+    ...    rd=${RDS}[0]
+    ...    exportrt=${RDS}[0]
+    ...    importrt=${RDS}[0]
+    ...    tenantid=${tenant_id}
+    VpnOperations.VPN Create L3VPN
+    ...    vpnid=${VPN_INSTANCE_IDS}[1]
+    ...    name=${VPN_NAMES}[1]
+    ...    rd=${RDS}[1]
+    ...    exportrt=${RDS}[1]
+    ...    importrt=${RDS}[1]
+    ...    tenantid=${tenant_id}
+    VpnOperations.VPN Create L3VPN
+    ...    vpnid=${VPN_INSTANCE_IDS}[2]
+    ...    name=${VPN_NAMES}[2]
+    ...    rd=${RDS}[2]
+    ...    exportrt=${RDS}[2]
+    ...    importrt=${RDS}[2]
+    ...    tenantid=${tenant_id}
     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VPN_INSTANCE_IDS}[0]
     BuiltIn.Should Contain    ${resp}    ${VPN_INSTANCE_IDS}[0]
     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VPN_INSTANCE_IDS}[1]
@@ -293,6 +461,7 @@ Create Multiple L3VPN
     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VPN_INSTANCE_IDS}[2]
     BuiltIn.Should Contain    ${resp}    ${VPN_INSTANCE_IDS}[2]
 
+
 *** Keywords ***
 Suite Setup
     VpnOperations.Basic Suite Setup
@@ -304,26 +473,64 @@ Suite Setup
     BuiltIn.Should Contain    ${output}    ${UPDATE_NETWORK}
     OpenStackOperations.Create SubNet    ${NETWORKS}[0]    ${SUBNETS}[0]    ${SUBNET_CIDRS}[0]
     OpenStackOperations.Create SubNet    ${NETWORKS}[1]    ${SUBNETS}[1]    ${SUBNET_CIDRS}[1]
-    BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${SUBNETWORK_URL}    ${SUBNETS}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    3s
+    ...    1s
+    ...    Utils.Check For Elements At URI
+    ...    ${SUBNETWORK_URL}
+    ...    ${SUBNETS}
     OpenStackOperations.Update SubNet    ${SUBNETS}[0]    additional_args=--description ${UPDATE_SUBNET}
     ${output} =    OpenStackOperations.Show SubNet    ${SUBNETS}[0]
     BuiltIn.Should Contain    ${output}    ${UPDATE_SUBNET}
     OpenStackOperations.Create Allow All SecurityGroup    ${SECURITY_GROUP}
-    ${allowed_address_pairs_args} =    BuiltIn.Set Variable    --allowed-address ip-address=${EXTRA_NW_SUBNET}[0] --allowed-address ip-address=${EXTRA_NW_SUBNET}[1]
-    Create Port    ${NETWORKS}[0]    ${PORTS}[0]    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args}
-    Create Port    ${NETWORKS}[0]    ${PORTS}[1]    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args}
-    Create Port    ${NETWORKS}[1]    ${PORTS}[2]    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args}
-    Create Port    ${NETWORKS}[1]    ${PORTS}[3]    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args}
+    ${allowed_address_pairs_args} =    BuiltIn.Set Variable
+    ...    --allowed-address ip-address=${EXTRA_NW_SUBNET}[0] --allowed-address ip-address=${EXTRA_NW_SUBNET}[1]
+    Create Port
+    ...    ${NETWORKS}[0]
+    ...    ${PORTS}[0]
+    ...    sg=${SECURITY_GROUP}
+    ...    additional_args=${allowed_address_pairs_args}
+    Create Port
+    ...    ${NETWORKS}[0]
+    ...    ${PORTS}[1]
+    ...    sg=${SECURITY_GROUP}
+    ...    additional_args=${allowed_address_pairs_args}
+    Create Port
+    ...    ${NETWORKS}[1]
+    ...    ${PORTS}[2]
+    ...    sg=${SECURITY_GROUP}
+    ...    additional_args=${allowed_address_pairs_args}
+    Create Port
+    ...    ${NETWORKS}[1]
+    ...    ${PORTS}[3]
+    ...    sg=${SECURITY_GROUP}
+    ...    additional_args=${allowed_address_pairs_args}
     Wait Until Keyword Succeeds    3s    1s    Check For Elements At URI    ${PORT_URL}    ${PORTS}
     ${PORTS_MACADDR} =    Get Ports MacAddr    ${PORTS}
     Set Suite Variable    ${PORTS_MACADDR}
     Update Port    ${PORTS}[0]    additional_args=--description ${UPDATE_PORT}
     ${output} =    Show Port    ${PORTS}[0]
     Should Contain    ${output}    ${UPDATE_PORT}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS}[0]    ${NET_1_VMS}[0]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS}[1]    ${NET_1_VMS}[1]    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS}[2]    ${NET_2_VMS}[0]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS}[3]    ${NET_2_VMS}[1]    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${PORTS}[0]
+    ...    ${NET_1_VMS}[0]
+    ...    ${OS_CMP1_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${PORTS}[1]
+    ...    ${NET_1_VMS}[1]
+    ...    ${OS_CMP2_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${PORTS}[2]
+    ...    ${NET_2_VMS}[0]
+    ...    ${OS_CMP1_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${PORTS}[3]
+    ...    ${NET_2_VMS}[1]
+    ...    ${OS_CMP2_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
     @{NET_1_VM_IPS}    ${NET_1_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_1_VMS}
     @{NET_2_VM_IPS}    ${NET_2_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_2_VMS}
     BuiltIn.Set Suite Variable    @{NET_1_VM_IPS}
index 2fd9d4c60a4df31591fe812dd2b2673cd2cc86b3..5acf11ddce8875a43fd565423abc6e74e0907f07 100644 (file)
@@ -1,65 +1,93 @@
 *** Settings ***
-Documentation     Test suite to validate dualstack (IPv4 + IPv6) vpnservice functionality in an Openstack
-...               integrated environment.
-...               The assumption of this suite is that the environment is already configured with the proper
-...               integration bridges and vxlan tunnels.
-Suite Setup       Suite Setup
-Suite Teardown    Suite Teardown
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     OpenStackOperations.Get Test Teardown Debugs
-Library           Collections
-Library           OperatingSystem
-Library           RequestsLibrary
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/OpenStackOperations.robot
-Resource          ../../../libraries/DevstackUtils.robot
-Resource          ../../../libraries/VpnOperations.robot
-Resource          ../../../libraries/OVSDB.robot
-Resource          ../../../libraries/SetupUtils.robot
-Resource          ../../../libraries/Tcpdump.robot
-Resource          ../../../variables/Variables.robot
-Resource          ../../../variables/netvirt/Variables.robot
+Documentation       Test suite to validate dualstack (IPv4 + IPv6) vpnservice functionality in an Openstack
+...                 integrated environment.
+...                 The assumption of this suite is that the environment is already configured with the proper
+...                 integration bridges and vxlan tunnels.
+
+Library             Collections
+Library             OperatingSystem
+Library             RequestsLibrary
+Resource            ../../../libraries/Utils.robot
+Resource            ../../../libraries/OpenStackOperations.robot
+Resource            ../../../libraries/DevstackUtils.robot
+Resource            ../../../libraries/VpnOperations.robot
+Resource            ../../../libraries/OVSDB.robot
+Resource            ../../../libraries/SetupUtils.robot
+Resource            ../../../libraries/Tcpdump.robot
+Resource            ../../../variables/Variables.robot
+Resource            ../../../variables/netvirt/Variables.robot
+
+Suite Setup         Suite Setup
+Suite Teardown      Suite Teardown
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       OpenStackOperations.Get Test Teardown Debugs
+
 
 *** Variables ***
-${SECURITY_GROUP}    vpn_sg_dualstack
-@{NETWORKS}       vpn_net_1_dualstack    vpn_net_2_dualstack
-@{SUBNETS4}       vpn_net_ipv4_1_dualstack    vpn_net_ipv4_2_dualstack
-@{SUBNETS6}       vpn_net_ipv6_1_dualstack    vpn_net_ipv6_2_dualstack
-@{SUBNETS4_CIDR}    30.1.1.0/24    40.1.1.0/24
-@{SUBNETS6_CIDR}    2001:db5:0:2::/64    2001:db5:0:3::/64
-${SUBNET_ADDITIONAL_ARGS}    --ip-version=6 --ipv6-address-mode=slaac --ipv6-ra-mode=slaac
-@{PORTS}          vpn_port_1_dualstack    vpn_port_2_dualstack    vpn_port_3_dualstack    vpn_port_4_dualstack
-@{NET_1_VM_INSTANCES}    vpn_net_1_vm_1_dualstack    vpn_net_1_vm_2_dualstack
-@{NET_2_VM_INSTANCES}    vpn_net_2_vm_1_dualstack    vpn_net_2_vm_2_dualstack
-@{EXTRA_NW_IPV4}    76.1.1.2    77.1.1.2
-@{EXTRA_NW_IPV6}    3001:db9:cafe:d::10    3001:db9:abcd:d::20
-@{EXTRA_NW_SUBNET_IPv4}    76.1.1.0/24    77.1.1.0/24
-@{EXTRA_NW_SUBNET_IPv6}    3001:db9:cafe:d::/64    3001:db9:abcd:d::/64
-${ROUTER}         vpn_router_dualstack
-${UPDATE_NETWORK}    UpdateNetwork_dualstack
-${UPDATE_SUBNET}    UpdateSubnet_dualstack
-${UPDATE_PORT}    UpdatePort_dualstack
-@{VPN_INSTANCE_ID}    1bc8cd92-48ca-49b5-94e1-b2921a261661    1bc8cd92-48ca-49b5-94e1-b2921a261662    1bc8cd92-48ca-49b5-94e1-b2921a261663
-@{VPN_NAME}       vpn1_dualstack    vpn2_dualstack    vpn3_dualstack
-@{RDS}            ["2506:2"]    ["2606:2"]    ["2706:2"]
+${SECURITY_GROUP}               vpn_sg_dualstack
+@{NETWORKS}                     vpn_net_1_dualstack    vpn_net_2_dualstack
+@{SUBNETS4}                     vpn_net_ipv4_1_dualstack    vpn_net_ipv4_2_dualstack
+@{SUBNETS6}                     vpn_net_ipv6_1_dualstack    vpn_net_ipv6_2_dualstack
+@{SUBNETS4_CIDR}                30.1.1.0/24    40.1.1.0/24
+@{SUBNETS6_CIDR}                2001:db5:0:2::/64    2001:db5:0:3::/64
+${SUBNET_ADDITIONAL_ARGS}       --ip-version=6 --ipv6-address-mode=slaac --ipv6-ra-mode=slaac
+@{PORTS}
+...                             vpn_port_1_dualstack
+...                             vpn_port_2_dualstack
+...                             vpn_port_3_dualstack
+...                             vpn_port_4_dualstack
+@{NET_1_VM_INSTANCES}           vpn_net_1_vm_1_dualstack    vpn_net_1_vm_2_dualstack
+@{NET_2_VM_INSTANCES}           vpn_net_2_vm_1_dualstack    vpn_net_2_vm_2_dualstack
+@{EXTRA_NW_IPV4}                76.1.1.2    77.1.1.2
+@{EXTRA_NW_IPV6}                3001:db9:cafe:d::10    3001:db9:abcd:d::20
+@{EXTRA_NW_SUBNET_IPv4}         76.1.1.0/24    77.1.1.0/24
+@{EXTRA_NW_SUBNET_IPv6}         3001:db9:cafe:d::/64    3001:db9:abcd:d::/64
+${ROUTER}                       vpn_router_dualstack
+${UPDATE_NETWORK}               UpdateNetwork_dualstack
+${UPDATE_SUBNET}                UpdateSubnet_dualstack
+${UPDATE_PORT}                  UpdatePort_dualstack
+@{VPN_INSTANCE_ID}
+...                             1bc8cd92-48ca-49b5-94e1-b2921a261661
+...                             1bc8cd92-48ca-49b5-94e1-b2921a261662
+...                             1bc8cd92-48ca-49b5-94e1-b2921a261663
+@{VPN_NAME}                     vpn1_dualstack    vpn2_dualstack    vpn3_dualstack
+@{RDS}                          ["2506:2"]    ["2606:2"]    ["2706:2"]
+
 
 *** Test Cases ***
 Check ELAN Datapath Traffic Within The Networks
     [Documentation]    Checks datapath within the same network with different vlans.
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPV4[0]}    ping -I ${NET_1_VM_IPV4[0]} -c 3 ${NET_1_VM_IPV4[1]}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPV4[0]}
+    ...    ping -I ${NET_1_VM_IPV4[0]} -c 3 ${NET_1_VM_IPV4[1]}
     BuiltIn.Should Contain    ${output}    64 bytes
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPV6[0]}    ping6 -I ${NET_1_VM_IPV6[0]} -c 3 ${NET_1_VM_IPV6[1]}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPV6[0]}
+    ...    ping6 -I ${NET_1_VM_IPV6[0]} -c 3 ${NET_1_VM_IPV6[1]}
     BuiltIn.Should Contain    ${output}    64 bytes
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${NET_2_VM_IPV4[0]}    ping -I ${NET_2_VM_IPV4[0]} -c 3 ${NET_2_VM_IPV4[1]}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${NET_2_VM_IPV4[0]}
+    ...    ping -I ${NET_2_VM_IPV4[0]} -c 3 ${NET_2_VM_IPV4[1]}
     BuiltIn.Should Contain    ${output}    64 bytes
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${NET_2_VM_IPV6[0]}    ping6 -I ${NET_2_VM_IPV6[0]} -c 3 ${NET_2_VM_IPV6[1]}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${NET_2_VM_IPV6[0]}
+    ...    ping6 -I ${NET_2_VM_IPV6[0]} -c 3 ${NET_2_VM_IPV6[1]}
     BuiltIn.Should Contain    ${output}    64 bytes
 
 Create Router
     [Documentation]    Create Router.
     OpenStackOperations.Create Router    ${ROUTER}
     @{ROUTER_LIST} =    BuiltIn.Create List    ${ROUTER}
-    BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${ROUTER_URL}    ${ROUTER_LIST}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    3s
+    ...    1s
+    ...    Utils.Check For Elements At URI
+    ...    ${ROUTER_URL}
+    ...    ${ROUTER_LIST}
 
 Add Router Ports
     [Documentation]    Add created subnets to router.
@@ -83,11 +111,28 @@ Add Router Ports
 Check L3_Datapath Traffic Across Networks With Router
     [Documentation]    L3 Datapath test across networks using previously created router.
     BuiltIn.Log    Verification of FIB Entries and Flow
-    @{tcpdump_conn_ids} =    OpenStackOperations.Start Packet Capture On Nodes    tcpdump_vpn_ds    ${EMPTY}    @{OS_ALL_IPS}
-    ${vm_instances} =    BuiltIn.Create List    @{NET_1_VM_IPV4}    @{NET_2_VM_IPV4}    @{NET_1_VM_IPV6}    @{NET_2_VM_IPV6}
-    BuiltIn.Wait Until Keyword Succeeds    30s    5s    Utils.Check For Elements At URI    ${FIB_ENTRY_URL}    ${vm_instances}
+    @{tcpdump_conn_ids} =    OpenStackOperations.Start Packet Capture On Nodes
+    ...    tcpdump_vpn_ds
+    ...    ${EMPTY}
+    ...    @{OS_ALL_IPS}
+    ${vm_instances} =    BuiltIn.Create List
+    ...    @{NET_1_VM_IPV4}
+    ...    @{NET_2_VM_IPV4}
+    ...    @{NET_1_VM_IPV6}
+    ...    @{NET_2_VM_IPV6}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    5s
+    ...    Utils.Check For Elements At URI
+    ...    ${FIB_ENTRY_URL}
+    ...    ${vm_instances}
     FOR    ${VM}    IN    ${vm_instances}
-        BuiltIn.Wait Until Keyword Succeeds    30s    5s    VpnOperations.Verify Flows Are Present For L3VPN    ${OS_CMP1_IP}    ${VM}
+        BuiltIn.Wait Until Keyword Succeeds
+        ...    30s
+        ...    5s
+        ...    VpnOperations.Verify Flows Are Present For L3VPN
+        ...    ${OS_CMP1_IP}
+        ...    ${VM}
     END
     BuiltIn.Wait Until Keyword Succeeds    30s    5s    VpnOperations.Verify GWMAC Entry On ODL    ${GW_MAC_ADDRS}
     Verify GWMAC Flow Entry On Flow Table On All Compute Nodes
@@ -108,7 +153,10 @@ Add Multiple Extra Routes And Check Datapath Before L3VPN Creation
     FOR    ${extra_ip}    IN    @{EXTRA_NW_IPV4}
         ${cmd} =    BuiltIn.Catenate    sudo ip addr add ${extra_ip}/24 dev eth0
         OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPV4}[0]    ${cmd}
-        ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPV4}[0]    ip a
+        ${output} =    OpenStackOperations.Execute Command on VM Instance
+        ...    ${NETWORKS}[0]
+        ...    ${NET_1_VM_IPV4}[0]
+        ...    ip a
         BuiltIn.Should Contain    ${output}    ${extra_ip}/24
     END
     ${ext_rt1} =    BuiltIn.Set Variable    destination=${EXTRA_NW_SUBNET_IPV4}[0],gateway=${NET_1_VM_IPV4}[0]
@@ -119,7 +167,10 @@ Add Multiple Extra Routes And Check Datapath Before L3VPN Creation
     FOR    ${extra_ip}    IN    @{EXTRA_NW_IPV6}
         ${cmd} =    BuiltIn.Catenate    sudo ip -6 addr add ${extra_ip}/64 dev eth0
         OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPV6}[0]    ${cmd}
-        ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPV6}[0]    ip -6 a
+        ${output} =    OpenStackOperations.Execute Command on VM Instance
+        ...    ${NETWORKS}[0]
+        ...    ${NET_1_VM_IPV6}[0]
+        ...    ip -6 a
         BuiltIn.Should Contain    ${output}    ${extra_ip}/64
     END
     ${ext_rt3} =    BuiltIn.Set Variable    destination=${EXTRA_NW_SUBNET_IPV6}[0],gateway=${NET_1_VM_IPV6}[0]
@@ -129,21 +180,44 @@ Add Multiple Extra Routes And Check Datapath Before L3VPN Creation
     OpenStackOperations.Show Router    ${ROUTER}
     BuiltIn.Log    Verify FIB table
     ${vm_ips} =    BuiltIn.Create List    @{EXTRA_NW_SUBNET_IPV4}    @{EXTRA_NW_SUBNET_IPV6}
-    BuiltIn.Wait Until Keyword Succeeds    30s    5s    Utils.Check For Elements At URI    ${FIB_ENTRY_URL}    ${vm_ips}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    5s
+    ...    Utils.Check For Elements At URI
+    ...    ${FIB_ENTRY_URL}
+    ...    ${vm_ips}
     FOR    ${extra_ip}    IN    @{EXTRA_NW_IPV4}
-        ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPV4[1]}    ping -c 3 ${extra_ip}
+        ${output} =    OpenStackOperations.Execute Command on VM Instance
+        ...    ${NETWORKS}[0]
+        ...    ${NET_1_VM_IPV4[1]}
+        ...    ping -c 3 ${extra_ip}
         BuiltIn.Should Contain    ${output}    64 bytes
-        ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${NET_2_VM_IPV4[0]}    ping -c 3 ${extra_ip}
+        ${output} =    OpenStackOperations.Execute Command on VM Instance
+        ...    ${NETWORKS}[1]
+        ...    ${NET_2_VM_IPV4[0]}
+        ...    ping -c 3 ${extra_ip}
         BuiltIn.Should Contain    ${output}    64 bytes
-        ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${NET_2_VM_IPV4[1]}    ping -c 3 ${extra_ip}
+        ${output} =    OpenStackOperations.Execute Command on VM Instance
+        ...    ${NETWORKS}[1]
+        ...    ${NET_2_VM_IPV4[1]}
+        ...    ping -c 3 ${extra_ip}
         BuiltIn.Should Contain    ${output}    64 bytes
     END
     FOR    ${extra_ip}    IN    @{EXTRA_NW_IPV6}
-        ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPV6[1]}    ping6 -c 3 ${extra_ip}
+        ${output} =    OpenStackOperations.Execute Command on VM Instance
+        ...    ${NETWORKS}[0]
+        ...    ${NET_1_VM_IPV6[1]}
+        ...    ping6 -c 3 ${extra_ip}
         BuiltIn.Should Contain    ${output}    64 bytes
-        ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${NET_2_VM_IPV6[0]}    ping6 -c 3 ${extra_ip}
+        ${output} =    OpenStackOperations.Execute Command on VM Instance
+        ...    ${NETWORKS}[1]
+        ...    ${NET_2_VM_IPV6[0]}
+        ...    ping6 -c 3 ${extra_ip}
         BuiltIn.Should Contain    ${output}    64 bytes
-        ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${NET_2_VM_IPV6[1]}    ping6 -c 3 ${extra_ip}
+        ${output} =    OpenStackOperations.Execute Command on VM Instance
+        ...    ${NETWORKS}[1]
+        ...    ${NET_2_VM_IPV6[1]}
+        ...    ping6 -c 3 ${extra_ip}
         BuiltIn.Should Contain    ${output}    64 bytes
     END
 
@@ -153,15 +227,21 @@ Delete And Recreate Extra Route
     BuiltIn.Log    Delete all extra routes
     OpenStackOperations.Update Router    ${ROUTER}    ${RT_CLEAR}
     OpenStackOperations.Show Router    ${ROUTER}
-    ${cmd}=    BuiltIn.Catenate    sudo ip addr add ${EXTRA_NW_IPV4}[0]/24 dev eth0
+    ${cmd} =    BuiltIn.Catenate    sudo ip addr add ${EXTRA_NW_IPV4}[0]/24 dev eth0
     OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPV4}[0]    ${cmd}
     ${ext_rt_ipv4} =    BuiltIn.Set Variable    destination=${EXTRA_NW_SUBNET_IPV4}[0],gateway=${NET_1_VM_IPV4}[0]
     ${cmd} =    BuiltIn.Catenate    ${RT_OPTIONS}    ${ext_rt_ipv4}
     OpenStackOperations.Update Router    ${ROUTER}    ${cmd}
     OpenStackOperations.Show Router    ${ROUTER}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPV4}[1]    ping -c 3 ${EXTRA_NW_IPV4}[0]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPV4}[1]
+    ...    ping -c 3 ${EXTRA_NW_IPV4}[0]
     BuiltIn.Should Contain    ${output}    64 bytes
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${NET_2_VM_IPV4}[0]    ping -c 3 ${EXTRA_NW_IPV4}[0]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${NET_2_VM_IPV4}[0]
+    ...    ping -c 3 ${EXTRA_NW_IPV4}[0]
     BuiltIn.Should Contain    ${output}    64 bytes
     ${cmd} =    BuiltIn.Catenate    sudo ip -6 addr add ${EXTRA_NW_IPV6}[0]/64 dev eth0
     OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPV6}[0]    ${cmd}
@@ -169,9 +249,15 @@ Delete And Recreate Extra Route
     ${cmd} =    BuiltIn.Catenate    ${RT_OPTIONS}    ${ext_rt2}
     OpenStackOperations.Update Router    ${ROUTER}    ${cmd}
     OpenStackOperations.Show Router    ${ROUTER}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPV6}[1]    ping6 -c 3 ${EXTRA_NW_IPV6}[0]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPV6}[1]
+    ...    ping6 -c 3 ${EXTRA_NW_IPV6}[0]
     BuiltIn.Should Contain    ${output}    64 bytes
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${NET_2_VM_IPV6}[0]    ping6 -c 3 ${EXTRA_NW_IPV6}[0]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${NET_2_VM_IPV6}[0]
+    ...    ping6 -c 3 ${EXTRA_NW_IPV6}[0]
     BuiltIn.Should Contain    ${output}    64 bytes
     # clear off extra-routes before the next set of tests
     OpenStackOperations.Update Router    ${ROUTER}    ${RT_CLEAR}
@@ -182,7 +268,13 @@ Delete And Recreate Extra Route
 Create L3VPN
     ${net_id} =    OpenStackOperations.Get Net Id    ${NETWORKS}[0]
     ${tenant_id} =    OpenStackOperations.Get Tenant ID From Network    ${net_id}
-    VpnOperations.VPN Create L3VPN    vpnid=${VPN_INSTANCE_ID[0]}    name=${VPN_NAME[0]}    rd=${RDS}[0]    exportrt=${RDS}[0]    importrt=${RDS}[0]    tenantid=${tenant_id}
+    VpnOperations.VPN Create L3VPN
+    ...    vpnid=${VPN_INSTANCE_ID[0]}
+    ...    name=${VPN_NAME[0]}
+    ...    rd=${RDS}[0]
+    ...    exportrt=${RDS}[0]
+    ...    importrt=${RDS}[0]
+    ...    tenantid=${tenant_id}
     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VPN_INSTANCE_ID[0]}
     BuiltIn.Should Contain    ${resp}    ${VPN_INSTANCE_ID[0]}
 
@@ -196,9 +288,19 @@ Associate L3VPN To Routers
 Verify L3VPN Datapath With Router Association
     [Documentation]    Datapath test across networks using L3VPN associated with router.
     BuiltIn.Log    Verify VPN interfaces, FIB entries and Flow table
-    BuiltIn.Wait Until Keyword Succeeds    30s    5s    Utils.Check For Elements At URI    ${VPN_IFACES_URL}    ${VM_IPS}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    5s
+    ...    Utils.Check For Elements At URI
+    ...    ${VPN_IFACES_URL}
+    ...    ${VM_IPS}
     ${RD} =    Strip String    ${RDS[0]}    characters="[]
-    BuiltIn.Wait Until Keyword Succeeds    60s    15s    Utils.Check For Elements At URI    ${CONFIG_API}/odl-fib:fibEntries/vrfTables/${RD}/    ${VM_IPS}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    60s
+    ...    15s
+    ...    Utils.Check For Elements At URI
+    ...    ${CONFIG_API}/odl-fib:fibEntries/vrfTables/${RD}/
+    ...    ${VM_IPS}
     Verify Flows Are Present For L3VPN On All Compute Nodes    ${VM_IPS}
     BuiltIn.Wait Until Keyword Succeeds    30s    5s    VpnOperations.Verify GWMAC Entry On ODL    ${GW_MAC_ADDRS}
     Verify GWMAC Flow Entry On Flow Table On All Compute Nodes
@@ -223,9 +325,15 @@ Delete IPv6 Subnet And Check IPv4 datapath
         Remove Interface    ${ROUTER}    ${PORT}
     END
     BuiltIn.Log    Test L2 datapath
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${NET_1_VM_IPV4[0]}    ping -I ${NET_1_VM_IPV4[0]} -c 3 ${NET_1_VM_IPV4[1]}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${NET_1_VM_IPV4[0]}
+    ...    ping -I ${NET_1_VM_IPV4[0]} -c 3 ${NET_1_VM_IPV4[1]}
     BuiltIn.Should Contain    ${output}    64 bytes
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${NET_2_VM_IPV4[0]}    ping -I ${NET_2_VM_IPV4[0]} -c 3 ${NET_2_VM_IPV4[1]}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${NET_2_VM_IPV4[0]}
+    ...    ping -I ${NET_2_VM_IPV4[0]} -c 3 ${NET_2_VM_IPV4[1]}
     BuiltIn.Should Contain    ${output}    64 bytes
     BuiltIn.Log    Test L3 datapath
     ${dst_ipv4_list1} =    BuiltIn.Create List    ${NET_1_VM_IPV4[1]}    @{NET_2_VM_IPV4}
@@ -259,7 +367,13 @@ Delete Router And Router Interfaces With L3VPN
     ${router_output} =    OpenStackOperations.List Routers
     BuiltIn.Should Not Contain    ${router_output}    ${ROUTER}
     ${router_list} =    BuiltIn.Create List    ${ROUTER}
-    BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements Not At URI    ${ROUTER_URL}    ${router_list}    check_for_null=True
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    3s
+    ...    1s
+    ...    Utils.Check For Elements Not At URI
+    ...    ${ROUTER_URL}
+    ...    ${router_list}
+    ...    check_for_null=True
     # Verify Router Entry removed from L3VPN
     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VPN_INSTANCE_ID[0]}
     BuiltIn.Should Not Contain    ${resp}    ${router_id}
@@ -268,7 +382,9 @@ Delete Router And Router Interfaces With L3VPN
 Delete Router With NonExistentRouter Name
     [Documentation]    Delete router with nonExistentRouter name.
     ${rc}    ${output} =    Run And Return Rc And Output    openstack router delete nonExistentRouter
-    BuiltIn.Should Match Regexp    ${output}    Failed to delete router with name or ID 'nonExistentRouter'|Failed to delete router\\(s\\) with name or ID\\(s\\) 'nonExistentRouter'
+    BuiltIn.Should Match Regexp
+    ...    ${output}
+    ...    Failed to delete router with name or ID 'nonExistentRouter'|Failed to delete router\\(s\\) with name or ID\\(s\\) 'nonExistentRouter'
 
 Associate L3VPN To Networks
     [Documentation]    Associates L3VPN to networks.
@@ -300,9 +416,27 @@ Create Multiple L3VPN
     [Documentation]    Creates three L3VPNs and then check the same.
     ${net_id} =    OpenStackOperations.Get Net Id    ${NETWORKS}[0]
     ${tenant_id} =    OpenStackOperations.Get Tenant ID From Network    ${net_id}
-    VpnOperations.VPN Create L3VPN    vpnid=${VPN_INSTANCE_ID[0]}    name=${VPN_NAME[0]}    rd=${RDS[0]}    exportrt=${RDS[0]}    importrt=${RDS[0]}    tenantid=${tenant_id}
-    VpnOperations.VPN Create L3VPN    vpnid=${VPN_INSTANCE_ID[1]}    name=${VPN_NAME[1]}    rd=${RDS[1]}    exportrt=${RDS[1]}    importrt=${RDS[1]}    tenantid=${tenant_id}
-    VpnOperations.VPN Create L3VPN    vpnid=${VPN_INSTANCE_ID[2]}    name=${VPN_NAME[2]}    rd=${RDS[2]}    exportrt=${RDS[2]}    importrt=${RDS[2]}    tenantid=${tenant_id}
+    VpnOperations.VPN Create L3VPN
+    ...    vpnid=${VPN_INSTANCE_ID[0]}
+    ...    name=${VPN_NAME[0]}
+    ...    rd=${RDS[0]}
+    ...    exportrt=${RDS[0]}
+    ...    importrt=${RDS[0]}
+    ...    tenantid=${tenant_id}
+    VpnOperations.VPN Create L3VPN
+    ...    vpnid=${VPN_INSTANCE_ID[1]}
+    ...    name=${VPN_NAME[1]}
+    ...    rd=${RDS[1]}
+    ...    exportrt=${RDS[1]}
+    ...    importrt=${RDS[1]}
+    ...    tenantid=${tenant_id}
+    VpnOperations.VPN Create L3VPN
+    ...    vpnid=${VPN_INSTANCE_ID[2]}
+    ...    name=${VPN_NAME[2]}
+    ...    rd=${RDS[2]}
+    ...    exportrt=${RDS[2]}
+    ...    importrt=${RDS[2]}
+    ...    tenantid=${tenant_id}
     ${resp} =    VPN Get L3VPN    vpnid=${VPN_INSTANCE_ID[0]}
     BuiltIn.Should Contain    ${resp}    ${VPN_INSTANCE_ID[0]}
     ${resp} =    VPN Get L3VPN    vpnid=${VPN_INSTANCE_ID[1]}
@@ -310,6 +444,7 @@ Create Multiple L3VPN
     ${resp} =    VPN Get L3VPN    vpnid=${VPN_INSTANCE_ID[2]}
     BuiltIn.Should Contain    ${resp}    ${VPN_INSTANCE_ID[2]}
 
+
 *** Keywords ***
 Suite Setup
     VpnOperations.Basic Suite Setup
@@ -321,27 +456,94 @@ Suite Setup
     ${output} =    OpenStackOperations.Show Network    ${NETWORKS}[0]
     BuiltIn.Should Contain    ${output}    ${UPDATE_NETWORK}
     OpenStackOperations.Create SubNet    ${NETWORKS}[0]    ${SUBNETS4}[0]    ${SUBNETS4_CIDR}[0]
-    OpenStackOperations.Create SubNet    ${NETWORKS}[0]    ${SUBNETS6}[0]    ${SUBNETS6_CIDR}[0]    ${SUBNET_ADDITIONAL_ARGS}
+    OpenStackOperations.Create SubNet
+    ...    ${NETWORKS}[0]
+    ...    ${SUBNETS6}[0]
+    ...    ${SUBNETS6_CIDR}[0]
+    ...    ${SUBNET_ADDITIONAL_ARGS}
     OpenStackOperations.Create SubNet    ${NETWORKS}[1]    ${SUBNETS4}[1]    ${SUBNETS4_CIDR}[1]
-    OpenStackOperations.Create SubNet    ${NETWORKS}[1]    ${SUBNETS6}[1]    ${SUBNETS6_CIDR}[1]    ${SUBNET_ADDITIONAL_ARGS}
+    OpenStackOperations.Create SubNet
+    ...    ${NETWORKS}[1]
+    ...    ${SUBNETS6}[1]
+    ...    ${SUBNETS6_CIDR}[1]
+    ...    ${SUBNET_ADDITIONAL_ARGS}
     ${SUB_LIST} =    OpenStackOperations.List Subnets
-    BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${SUBNETWORK_URL}    ${SUBNETS4}
-    BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${SUBNETWORK_URL}    ${SUBNETS6}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    3s
+    ...    1s
+    ...    Utils.Check For Elements At URI
+    ...    ${SUBNETWORK_URL}
+    ...    ${SUBNETS4}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    3s
+    ...    1s
+    ...    Utils.Check For Elements At URI
+    ...    ${SUBNETWORK_URL}
+    ...    ${SUBNETS6}
     OpenStackOperations.Update SubNet    ${SUBNETS4}[0]    additional_args=--description ${UPDATE_SUBNET}
     ${output} =    OpenStackOperations.Show SubNet    ${SUBNETS4}[0]
     BuiltIn.Should Contain    ${output}    ${UPDATE_SUBNET}
     OpenStackOperations.Create Allow All SecurityGroup    ${SECURITY_GROUP}    IPv4
-    OpenStackOperations.Neutron Security Group Rule Create    ${SECURITY_GROUP}    direction=ingress    ethertype=IPv6    port_range_max=65535    port_range_min=1    protocol=tcp
-    OpenStackOperations.Neutron Security Group Rule Create    ${SECURITY_GROUP}    direction=egress    ethertype=IPv6    port_range_max=65535    port_range_min=1    protocol=tcp
-    OpenStackOperations.Neutron Security Group Rule Create    ${SECURITY_GROUP}    direction=ingress    ethertype=IPv6    protocol=icmp
-    OpenStackOperations.Neutron Security Group Rule Create    ${SECURITY_GROUP}    direction=egress    ethertype=IPv6    protocol=icmp
-    OpenStackOperations.Neutron Security Group Rule Create    ${SECURITY_GROUP}    direction=ingress    ethertype=IPv6    port_range_max=65535    port_range_min=1    protocol=udp
-    OpenStackOperations.Neutron Security Group Rule Create    ${SECURITY_GROUP}    direction=egress    ethertype=IPv6    port_range_max=65535    port_range_min=1    protocol=udp
-    ${allowed_address_pairs_args} =    BuiltIn.Set Variable    --allowed-address ip-address=${EXTRA_NW_SUBNET_IPV4}[0] --allowed-address ip-address=${EXTRA_NW_SUBNET_IPV4}[1] --allowed-address ip-address=${EXTRA_NW_SUBNET_IPV6}[0] --allowed-address ip-address=${EXTRA_NW_SUBNET_IPV6}[1]
-    OpenStackOperations.Create Port    ${NETWORKS}[0]    ${PORTS}[0]    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args}
-    OpenStackOperations.Create Port    ${NETWORKS}[0]    ${PORTS}[1]    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args}
-    OpenStackOperations.Create Port    ${NETWORKS}[1]    ${PORTS}[2]    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args}
-    OpenStackOperations.Create Port    ${NETWORKS}[1]    ${PORTS}[3]    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args}
+    OpenStackOperations.Neutron Security Group Rule Create
+    ...    ${SECURITY_GROUP}
+    ...    direction=ingress
+    ...    ethertype=IPv6
+    ...    port_range_max=65535
+    ...    port_range_min=1
+    ...    protocol=tcp
+    OpenStackOperations.Neutron Security Group Rule Create
+    ...    ${SECURITY_GROUP}
+    ...    direction=egress
+    ...    ethertype=IPv6
+    ...    port_range_max=65535
+    ...    port_range_min=1
+    ...    protocol=tcp
+    OpenStackOperations.Neutron Security Group Rule Create
+    ...    ${SECURITY_GROUP}
+    ...    direction=ingress
+    ...    ethertype=IPv6
+    ...    protocol=icmp
+    OpenStackOperations.Neutron Security Group Rule Create
+    ...    ${SECURITY_GROUP}
+    ...    direction=egress
+    ...    ethertype=IPv6
+    ...    protocol=icmp
+    OpenStackOperations.Neutron Security Group Rule Create
+    ...    ${SECURITY_GROUP}
+    ...    direction=ingress
+    ...    ethertype=IPv6
+    ...    port_range_max=65535
+    ...    port_range_min=1
+    ...    protocol=udp
+    OpenStackOperations.Neutron Security Group Rule Create
+    ...    ${SECURITY_GROUP}
+    ...    direction=egress
+    ...    ethertype=IPv6
+    ...    port_range_max=65535
+    ...    port_range_min=1
+    ...    protocol=udp
+    ${allowed_address_pairs_args} =    BuiltIn.Set Variable
+    ...    --allowed-address ip-address=${EXTRA_NW_SUBNET_IPV4}[0] --allowed-address ip-address=${EXTRA_NW_SUBNET_IPV4}[1] --allowed-address ip-address=${EXTRA_NW_SUBNET_IPV6}[0] --allowed-address ip-address=${EXTRA_NW_SUBNET_IPV6}[1]
+    OpenStackOperations.Create Port
+    ...    ${NETWORKS}[0]
+    ...    ${PORTS}[0]
+    ...    sg=${SECURITY_GROUP}
+    ...    additional_args=${allowed_address_pairs_args}
+    OpenStackOperations.Create Port
+    ...    ${NETWORKS}[0]
+    ...    ${PORTS}[1]
+    ...    sg=${SECURITY_GROUP}
+    ...    additional_args=${allowed_address_pairs_args}
+    OpenStackOperations.Create Port
+    ...    ${NETWORKS}[1]
+    ...    ${PORTS}[2]
+    ...    sg=${SECURITY_GROUP}
+    ...    additional_args=${allowed_address_pairs_args}
+    OpenStackOperations.Create Port
+    ...    ${NETWORKS}[1]
+    ...    ${PORTS}[3]
+    ...    sg=${SECURITY_GROUP}
+    ...    additional_args=${allowed_address_pairs_args}
     BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${PORT_URL}    ${PORTS}
     ${PORTS_MACADDR} =    OpenStackOperations.Get Ports MacAddr    ${PORTS}
     BuiltIn.Set Suite Variable    ${PORTS_MACADDR}
@@ -349,14 +551,40 @@ Suite Setup
     ${output} =    Show Port    ${UPDATE_PORT}
     BuiltIn.Should Contain    ${output}    ${UPDATE_PORT}
     OpenStackOperations.Update Port    ${UPDATE_PORT}    additional_args=--name ${PORTS}[0]
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS}[0]    ${NET_1_VM_INSTANCES[0]}    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS}[1]    ${NET_1_VM_INSTANCES[1]}    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS}[2]    ${NET_2_VM_INSTANCES[0]}    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS}[3]    ${NET_2_VM_INSTANCES[1]}    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${PORTS}[0]
+    ...    ${NET_1_VM_INSTANCES[0]}
+    ...    ${OS_CMP1_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${PORTS}[1]
+    ...    ${NET_1_VM_INSTANCES[1]}
+    ...    ${OS_CMP2_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${PORTS}[2]
+    ...    ${NET_2_VM_INSTANCES[0]}
+    ...    ${OS_CMP1_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${PORTS}[3]
+    ...    ${NET_2_VM_INSTANCES[1]}
+    ...    ${OS_CMP2_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
     ${VM_INSTANCES} =    BuiltIn.Create List    @{NET_1_VM_INSTANCES}    @{NET_2_VM_INSTANCES}
     BuiltIn.Set Suite Variable    ${VM_INSTANCES}
-    BuiltIn.Wait Until Keyword Succeeds    30s    10s    OpenStackOperations.Wait For Routes To Propogate    ${NETWORKS}    ${SUBNETS4_CIDR}
-    BuiltIn.Wait Until Keyword Succeeds    30s    10s    OpenStackOperations.Wait For Routes To Propogate    ${NETWORKS}    ${SUBNETS6_CIDR}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    OpenStackOperations.Wait For Routes To Propogate
+    ...    ${NETWORKS}
+    ...    ${SUBNETS4_CIDR}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    OpenStackOperations.Wait For Routes To Propogate
+    ...    ${NETWORKS}
+    ...    ${SUBNETS6_CIDR}
     @{NET_1_VM_IPV4}    ${NET_1_DHCP_IPV4} =    OpenStackOperations.Get VM IPs    @{NET_1_VM_INSTANCES}
     @{NET_2_VM_IPV4}    ${NET_2_DHCP_IPV4} =    OpenStackOperations.Get VM IPs    @{NET_2_VM_INSTANCES}
     BuiltIn.Should Not Contain    ${NET_1_VM_IPV4}    None
@@ -364,20 +592,58 @@ Suite Setup
     BuiltIn.Should Not Contain    ${NET_1_DHCP_IPV4}    None
     BuiltIn.Should Not Contain    ${NET_2_DHCP_IPV4}    None
     BuiltIn.Log    Collect VMs IPv6 addresses
-    ${prefix_net10} =    String.Replace String    ${SUBNETS6_CIDR}[0]    ${IP6_SUBNET_CIDR_SUFFIX}    ${IP6_ADDR_SUFFIX}
-    ${prefix_net20} =    String.Replace String    ${SUBNETS6_CIDR}[1]    ${IP6_SUBNET_CIDR_SUFFIX}    ${IP6_ADDR_SUFFIX}
-    ${status}    ${message}    Run Keyword And Ignore Error    BuiltIn.Wait Until Keyword Succeeds    3x    60s    OpenStackOperations.Collect VM IPv6 SLAAC Addresses
-    ...    true    ${NET_1_VM_INSTANCES}    ${NETWORKS}[0]    ${prefix_net10}
-    ${status}    ${message}    Run Keyword And Ignore Error    BuiltIn.Wait Until Keyword Succeeds    3x    60s    OpenStackOperations.Collect VM IPv6 SLAAC Addresses
-    ...    true    ${NET_2_VM_INSTANCES}    ${NETWORKS}[1]    ${prefix_net20}
-    ${NET_1_VM_IPV6} =    OpenStackOperations.Collect VM IPv6 SLAAC Addresses    false    ${NET_1_VM_INSTANCES}    ${NETWORKS}[0]    ${prefix_net10}
-    ${NET_2_VM_IPV6} =    OpenStackOperations.Collect VM IPv6 SLAAC Addresses    false    ${NET_2_VM_INSTANCES}    ${NETWORKS}[1]    ${prefix_net20}
-    ${LOOP_COUNT}    Get Length    ${NET_1_VM_INSTANCES}
+    ${prefix_net10} =    String.Replace String
+    ...    ${SUBNETS6_CIDR}[0]
+    ...    ${IP6_SUBNET_CIDR_SUFFIX}
+    ...    ${IP6_ADDR_SUFFIX}
+    ${prefix_net20} =    String.Replace String
+    ...    ${SUBNETS6_CIDR}[1]
+    ...    ${IP6_SUBNET_CIDR_SUFFIX}
+    ...    ${IP6_ADDR_SUFFIX}
+    ${status}    ${message} =    Run Keyword And Ignore Error
+    ...    BuiltIn.Wait Until Keyword Succeeds
+    ...    3x
+    ...    60s
+    ...    OpenStackOperations.Collect VM IPv6 SLAAC Addresses
+    ...    true
+    ...    ${NET_1_VM_INSTANCES}
+    ...    ${NETWORKS}[0]
+    ...    ${prefix_net10}
+    ${status}    ${message} =    Run Keyword And Ignore Error
+    ...    BuiltIn.Wait Until Keyword Succeeds
+    ...    3x
+    ...    60s
+    ...    OpenStackOperations.Collect VM IPv6 SLAAC Addresses
+    ...    true
+    ...    ${NET_2_VM_INSTANCES}
+    ...    ${NETWORKS}[1]
+    ...    ${prefix_net20}
+    ${NET_1_VM_IPV6} =    OpenStackOperations.Collect VM IPv6 SLAAC Addresses
+    ...    false
+    ...    ${NET_1_VM_INSTANCES}
+    ...    ${NETWORKS}[0]
+    ...    ${prefix_net10}
+    ${NET_2_VM_IPV6} =    OpenStackOperations.Collect VM IPv6 SLAAC Addresses
+    ...    false
+    ...    ${NET_2_VM_INSTANCES}
+    ...    ${NETWORKS}[1]
+    ...    ${prefix_net20}
+    ${LOOP_COUNT} =    Get Length    ${NET_1_VM_INSTANCES}
     FOR    ${index}    IN RANGE    0    ${LOOP_COUNT}
-        ${status}    ${message}    Run Keyword And Ignore Error    BuiltIn.Should Not Contain    ${NET_1_VM_IPV6}[${index}]    None
-        Run Keyword If    '${status}' == 'FAIL'    Write Commands Until Prompt    nova console-log ${NET_1_VM_INSTANCES}[${index}]    30s
-        ${status}    ${message}    Run Keyword And Ignore Error    BuiltIn.Should Not Contain    ${NET_2_VM_IPV6}[${index}]    None
-        Run Keyword If    '${status}' == 'FAIL'    Write Commands Until Prompt    nova console-log ${NET_2_VM_INSTANCES}[${index}]    30s
+        ${status}    ${message} =    Run Keyword And Ignore Error
+        ...    BuiltIn.Should Not Contain
+        ...    ${NET_1_VM_IPV6}[${index}]
+        ...    None
+        IF    '${status}' == 'FAIL'
+            Write Commands Until Prompt    nova console-log ${NET_1_VM_INSTANCES}[${index}]    30s
+        END
+        ${status}    ${message} =    Run Keyword And Ignore Error
+        ...    BuiltIn.Should Not Contain
+        ...    ${NET_2_VM_IPV6}[${index}]
+        ...    None
+        IF    '${status}' == 'FAIL'
+            Write Commands Until Prompt    nova console-log ${NET_2_VM_INSTANCES}[${index}]    30s
+        END
     END
     BuiltIn.Set Suite Variable    ${NET_1_VM_IPV4}
     BuiltIn.Set Suite Variable    ${NET_2_VM_IPV4}
@@ -396,10 +662,14 @@ Suite Teardown
     OpenStackOperations.OpenStack Suite Teardown
 
 Verify GWMAC Flow Entry On Flow Table
-    [Arguments]    ${cnIp}
     [Documentation]    Verify GWMAC Table, ARP Response table and Dispatcher table.
-    ${flow_output} =    Run Command On Remote System    ${cnIp}    sudo ovs-ofctl -O OpenFlow13 dump-flows ${INTEGRATION_BRIDGE}
-    ${group_output} =    Run Command On Remote System    ${cnIp}    sudo ovs-ofctl -O OpenFlow13 dump-groups ${INTEGRATION_BRIDGE}
+    [Arguments]    ${cnIp}
+    ${flow_output} =    Run Command On Remote System
+    ...    ${cnIp}
+    ...    sudo ovs-ofctl -O OpenFlow13 dump-flows ${INTEGRATION_BRIDGE}
+    ${group_output} =    Run Command On Remote System
+    ...    ${cnIp}
+    ...    sudo ovs-ofctl -O OpenFlow13 dump-groups ${INTEGRATION_BRIDGE}
     BuiltIn.Should Contain    ${flow_output}    table=${DISPATCHER_TABLE}
     ${dispatcher_table} =    Get Lines Containing String    ${flow_output}    table=${DISPATCHER_TABLE}
     BuiltIn.Should Contain    ${dispatcher_table}    goto_table:${GWMAC_TABLE}
@@ -421,7 +691,8 @@ Verify GWMAC Flow Entry On Flow Table
     ${icmp_ipv6_flows} =    Get Lines Containing String    ${flow_output}    icmp_type=${ICMP_TYPE}
     # Verify IPv6 icmp_type=135
     FOR    ${ip_addr}    IN    @{GW_IPV6_ADDRS}
-        ${rule} =    BuiltIn.Set Variable    icmp_type=${ICMP_TYPE},icmp_code=0,nd_target=${ip_addr} actions=CONTROLLER:65535
+        ${rule} =    BuiltIn.Set Variable
+        ...    icmp_type=${ICMP_TYPE},icmp_code=0,nd_target=${ip_addr} actions=CONTROLLER:65535
         BuiltIn.Should Match Regexp    ${icmp_ipv6_flows}    ${rule}
     END
     VpnOperations.Verify ARP REQUEST in groupTable    ${group_output}    ${groupID[1]}
@@ -430,6 +701,7 @@ Verify GWMAC Flow Entry On Flow Table
     ${arpResponder_table} =    Get Lines Containing String    ${flow_output}    table=${ARP_RESPONSE_TABLE}
     BuiltIn.Should Contain    ${arpResponder_table}    priority=0 actions=drop
     FOR    ${macAdd}    ${ipAdd}    IN ZIP    ${GW1_MAC_ADDRS}    ${GW_IPV4_ADDRS}
-        ${ARP_RESPONSE_IP_MAC_REGEX} =    BuiltIn.Set Variable    arp_tpa=${ipAdd},arp_op=1 actions=.*,set_field:${macAdd}->eth_src
+        ${ARP_RESPONSE_IP_MAC_REGEX} =    BuiltIn.Set Variable
+        ...    arp_tpa=${ipAdd},arp_op=1 actions=.*,set_field:${macAdd}->eth_src
         BuiltIn.Should Match Regexp    ${arpResponder_table}    ${ARP_RESPONSE_IP_MAC_REGEX}
     END
index a17a92ebf4475ea93f510acff21219148eb9f20e..decd724e0116bee3ca0ccd47776a17791d2b5f3b 100644 (file)
@@ -1,68 +1,99 @@
 *** Settings ***
-Documentation     Test suite to validate subnet routing functionality for hidden IPv4/IPv6 address in an Openstack
-...               integrated environment.
-...               The assumption of this suite is that the environment is already configured with the proper
-...               integration bridges and vxlan tunnels.
-Suite Setup       Suite Setup
-Suite Teardown    Suite Teardown
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     OpenStackOperations.Get Test Teardown Debugs
-Library           Collections
-Library           OperatingSystem
-Library           RequestsLibrary
-Resource          ../../../libraries/DevstackUtils.robot
-Resource          ../../../libraries/OpenStackOperations.robot
-Resource          ../../../libraries/OVSDB.robot
-Resource          ../../../libraries/SetupUtils.robot
-Resource          ../../../libraries/Tcpdump.robot
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../variables/Variables.robot
-Resource          ../../../variables/netvirt/Variables.robot
-Resource          ../../../libraries/VpnOperations.robot
+Documentation       Test suite to validate subnet routing functionality for hidden IPv4/IPv6 address in an Openstack
+...                 integrated environment.
+...                 The assumption of this suite is that the environment is already configured with the proper
+...                 integration bridges and vxlan tunnels.
+
+Library             Collections
+Library             OperatingSystem
+Library             RequestsLibrary
+Resource            ../../../libraries/DevstackUtils.robot
+Resource            ../../../libraries/OpenStackOperations.robot
+Resource            ../../../libraries/OVSDB.robot
+Resource            ../../../libraries/SetupUtils.robot
+Resource            ../../../libraries/Tcpdump.robot
+Resource            ../../../libraries/Utils.robot
+Resource            ../../../variables/Variables.robot
+Resource            ../../../variables/netvirt/Variables.robot
+Resource            ../../../libraries/VpnOperations.robot
+
+Suite Setup         Suite Setup
+Suite Teardown      Suite Teardown
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       OpenStackOperations.Get Test Teardown Debugs
+
 
 *** Variables ***
-${SECURITY_GROUP}    vpndssr_sg
-@{NETWORKS}       vpndssr_net_1    vpndssr_net_2
-@{SUBNETS4}       vpndssr_ipv4_sub_1    vpndssr_ipv4_sub_2
-@{SUBNETS6}       vpndssr_ipv6_sub_1    vpndssr_ipv6_sub_2
-@{SUBNETS4_CIDR}    30.1.1.0/24    40.1.1.0/24
-@{SUBNETS6_CIDR}    2001:db5:0:2::/64    2001:db5:0:3::/64
-${SUBNET_ADDITIONAL_ARGS}    --ip-version=6 --ipv6-address-mode=slaac --ipv6-ra-mode=slaac
-@{PORTS}          vpndssr_port_1    vpndssr_port_2    vpndssr_port_3    vpndssr_port_4
-@{NET_1_VMS}      vpndssr_net_1_vm_1    vpndssr_net_1_vm_2
-@{NET_2_VMS}      vpndssr_net_2_vm_1    vpndssr_net_2_vm_2
-@{EXTRA_NW_IPV4}    30.1.1.209    30.1.1.210    40.1.1.209    40.1.1.210    40.1.1.211    30.1.1.211
-@{EXTRA_NW_IPV6}    2001:db5:0:2::10    2001:db5:0:2::20    2001:db5:0:3::10    2001:db5:0:3::20    2001:db5:0:3::30    2001:db5:0:2::30
-@{EXTRA_NW_SUBNET_IPv4}    30.1.1.0/24    40.1.1.0/24
-@{EXTRA_NW_SUBNET_IPv6}    2001:db5:0:2::/64    2001:db5:0:3::/64
-${ROUTER}         vpn_router_dualstack_subnet
-${UPDATE_NETWORK}    update_network_dualstack_subnet
-${UPDATE_SUBNET}    update_subnet_dualstack_subnet
-${UPDATE_PORT}    update_port_dualstack_subnet
-@{VPN_INSTANCE_ID}    1bc8cd92-48ca-49b5-94e1-b2921a261661    1bc8cd92-48ca-49b5-94e1-b2921a261662    1bc8cd92-48ca-49b5-94e1-b2921a261663
-@{VPN_NAME}       vpn1_dualstack_subnet    vpn2_dualstack_subnet    vpn3_dualstack_subnet
-@{RDS}            ["2506:2"]    ["2606:2"]    ["2706:2"]
-${LOOP_COUNT}     4
-@{TABLE_NO_21}    21
-${DUMP_FLOWS}     sudo ovs-ofctl dump-flows br-int -O Openflow13
+${SECURITY_GROUP}               vpndssr_sg
+@{NETWORKS}                     vpndssr_net_1    vpndssr_net_2
+@{SUBNETS4}                     vpndssr_ipv4_sub_1    vpndssr_ipv4_sub_2
+@{SUBNETS6}                     vpndssr_ipv6_sub_1    vpndssr_ipv6_sub_2
+@{SUBNETS4_CIDR}                30.1.1.0/24    40.1.1.0/24
+@{SUBNETS6_CIDR}                2001:db5:0:2::/64    2001:db5:0:3::/64
+${SUBNET_ADDITIONAL_ARGS}       --ip-version=6 --ipv6-address-mode=slaac --ipv6-ra-mode=slaac
+@{PORTS}                        vpndssr_port_1    vpndssr_port_2    vpndssr_port_3    vpndssr_port_4
+@{NET_1_VMS}                    vpndssr_net_1_vm_1    vpndssr_net_1_vm_2
+@{NET_2_VMS}                    vpndssr_net_2_vm_1    vpndssr_net_2_vm_2
+@{EXTRA_NW_IPV4}                30.1.1.209    30.1.1.210    40.1.1.209    40.1.1.210    40.1.1.211    30.1.1.211
+@{EXTRA_NW_IPV6}
+...                             2001:db5:0:2::10
+...                             2001:db5:0:2::20
+...                             2001:db5:0:3::10
+...                             2001:db5:0:3::20
+...                             2001:db5:0:3::30
+...                             2001:db5:0:2::30
+@{EXTRA_NW_SUBNET_IPv4}         30.1.1.0/24    40.1.1.0/24
+@{EXTRA_NW_SUBNET_IPv6}         2001:db5:0:2::/64    2001:db5:0:3::/64
+${ROUTER}                       vpn_router_dualstack_subnet
+${UPDATE_NETWORK}               update_network_dualstack_subnet
+${UPDATE_SUBNET}                update_subnet_dualstack_subnet
+${UPDATE_PORT}                  update_port_dualstack_subnet
+@{VPN_INSTANCE_ID}
+...                             1bc8cd92-48ca-49b5-94e1-b2921a261661
+...                             1bc8cd92-48ca-49b5-94e1-b2921a261662
+...                             1bc8cd92-48ca-49b5-94e1-b2921a261663
+@{VPN_NAME}                     vpn1_dualstack_subnet    vpn2_dualstack_subnet    vpn3_dualstack_subnet
+@{RDS}                          ["2506:2"]    ["2606:2"]    ["2706:2"]
+${LOOP_COUNT}                   4
+@{TABLE_NO_21}                  21
+${DUMP_FLOWS}                   sudo ovs-ofctl dump-flows br-int -O Openflow13
+
 
 *** Test Cases ***
 Check ELAN Datapath Traffic Within The Networks
     [Documentation]    Checks datapath within the same network with different vlans.
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${net_1_vm_ipv4}[0]    ping -I ${net_1_vm_ipv4}[0] -c 3 ${net_1_vm_ipv4}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${net_1_vm_ipv4}[0]
+    ...    ping -I ${net_1_vm_ipv4}[0] -c 3 ${net_1_vm_ipv4}[1]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${net_1_vm_ipv6}[0]    ping6 -I ${net_1_vm_ipv6}[0] -c 3 ${net_1_vm_ipv6}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${net_1_vm_ipv6}[0]
+    ...    ping6 -I ${net_1_vm_ipv6}[0] -c 3 ${net_1_vm_ipv6}[1]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${net_2_vm_ipv4}[0]    ping -I ${net_2_vm_ipv4}[0] -c 3 ${net_2_vm_ipv4}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${net_2_vm_ipv4}[0]
+    ...    ping -I ${net_2_vm_ipv4}[0] -c 3 ${net_2_vm_ipv4}[1]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${net_2_vm_ipv6}[0]    ping6 -I ${net_2_vm_ipv6}[0] -c 3 ${net_2_vm_ipv6}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${net_2_vm_ipv6}[0]
+    ...    ping6 -I ${net_2_vm_ipv6}[0] -c 3 ${net_2_vm_ipv6}[1]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
 
 Create L3VPN
     [Documentation]    Create L3VPN
     ${net_id} =    OpenStackOperations.Get Net Id    ${NETWORKS}[0]
     ${tenant_id} =    OpenStackOperations.Get Tenant ID From Network    ${net_id}
-    VpnOperations.VPN Create L3VPN    vpnid=${VPN_INSTANCE_ID}[0]    name=${VPN_NAME}[0]    rd=${RDS}[0]    exportrt=${RDS}[0]    importrt=${RDS}[0]    tenantid=${tenant_id}
+    VpnOperations.VPN Create L3VPN
+    ...    vpnid=${VPN_INSTANCE_ID}[0]
+    ...    name=${VPN_NAME}[0]
+    ...    rd=${RDS}[0]
+    ...    exportrt=${RDS}[0]
+    ...    importrt=${RDS}[0]
+    ...    tenantid=${tenant_id}
     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VPN_INSTANCE_ID}[0]
     BuiltIn.Should Contain    ${resp}    ${VPN_INSTANCE_ID}[0]
 
@@ -75,13 +106,27 @@ Associate L3VPN To Routers
 
 Configure Extra IPv4/IPv6 Addresss On Interface For Subnet Routing
     [Documentation]    Extra IPv4/IPv6 Address configuration on Interfaces
-    ${VM_IPV6} =    BuiltIn.Create List    ${net_1_vm_ipv6}[0]    ${net_1_vm_ipv6}[1]    ${net_2_vm_ipv6}[0]    ${net_2_vm_ipv6}[1]
-    ${VM_IPV4} =    BuiltIn.Create List    ${net_1_vm_ipv4}[0]    ${net_1_vm_ipv4}[1]    ${net_2_vm_ipv4}[0]    ${net_2_vm_ipv4}[1]
+    ${VM_IPV6} =    BuiltIn.Create List
+    ...    ${net_1_vm_ipv6}[0]
+    ...    ${net_1_vm_ipv6}[1]
+    ...    ${net_2_vm_ipv6}[0]
+    ...    ${net_2_vm_ipv6}[1]
+    ${VM_IPV4} =    BuiltIn.Create List
+    ...    ${net_1_vm_ipv4}[0]
+    ...    ${net_1_vm_ipv4}[1]
+    ...    ${net_2_vm_ipv4}[0]
+    ...    ${net_2_vm_ipv4}[1]
     FOR    ${index}    IN RANGE    0    ${LOOP_COUNT}
-        OpenStackOperations.Execute Command on VM Instance    ${network_list}[${index}]    ${VM_IPV6}[${index}]    sudo ip -6 addr add ${EXTRA_NW_IPV6}[${index}]/64 dev eth0; sudo ifconfig eth0 allmulti; ip -6 a
+        OpenStackOperations.Execute Command on VM Instance
+        ...    ${network_list}[${index}]
+        ...    ${VM_IPV6}[${index}]
+        ...    sudo ip -6 addr add ${EXTRA_NW_IPV6}[${index}]/64 dev eth0; sudo ifconfig eth0 allmulti; ip -6 a
     END
     FOR    ${index}    IN RANGE    0    ${LOOP_COUNT}
-        OpenStackOperations.Execute Command on VM Instance    ${network_list}[${index}]    ${VM_IPV4}[${index}]    sudo ifconfig eth0:1 ${EXTRA_NW_IPV4}[${index}] netmask 255.255.255.0 up; ip a
+        OpenStackOperations.Execute Command on VM Instance
+        ...    ${network_list}[${index}]
+        ...    ${VM_IPV4}[${index}]
+        ...    sudo ifconfig eth0:1 ${EXTRA_NW_IPV4}[${index}] netmask 255.255.255.0 up; ip a
     END
     BuiltIn.Set Suite Variable    ${VM_IPV6}
     BuiltIn.Set Suite Variable    ${VM_IPV4}
@@ -114,10 +159,16 @@ Associate L3VPN Again To Routers and verify traffic
 Delete the configured extra IPv4/IPv6 Addresss and verify traffic
     [Documentation]    Delete IPv4/IPv6 Address configuration on Interfaces and verify traffic
     FOR    ${index}    IN RANGE    0    ${LOOP_COUNT}
-        OpenStackOperations.Execute Command on VM Instance    ${network_list}[${index}]    ${VM_IPV6}[${index}]    sudo ip -6 addr del ${EXTRA_NW_IPV6}[${index}]/64 dev eth0
+        OpenStackOperations.Execute Command on VM Instance
+        ...    ${network_list}[${index}]
+        ...    ${VM_IPV6}[${index}]
+        ...    sudo ip -6 addr del ${EXTRA_NW_IPV6}[${index}]/64 dev eth0
     END
     FOR    ${index}    IN RANGE    0    ${LOOP_COUNT}
-        OpenStackOperations.Execute Command on VM Instance    ${network_list}[${index}]    ${VM_IPV4}[${index}]    sudo ifconfig eth0:1 down
+        OpenStackOperations.Execute Command on VM Instance
+        ...    ${network_list}[${index}]
+        ...    ${VM_IPV4}[${index}]
+        ...    sudo ifconfig eth0:1 down
     END
     BuiltIn.Wait Until Keyword Succeeds    10x    30s    Verify Ipv4 Data No Traffic
     BuiltIn.Wait Until Keyword Succeeds    10x    30s    Verify Ipv6 Data No Traffic
@@ -126,10 +177,16 @@ Delete the configured extra IPv4/IPv6 Addresss and verify traffic
 Configure Again Extra IPv4/IPv6 Addresss On Interface For Subnet Routing
     [Documentation]    Extra IPv4/IPv6 Address configuration on Interfaces
     FOR    ${index}    IN RANGE    0    ${LOOP_COUNT}
-        OpenStackOperations.Execute Command on VM Instance    ${network_list}[${index}]    ${VM_IPV6}[${index}]    sudo ip -6 addr add ${EXTRA_NW_IPV6}[${index}]/64 dev eth0; sudo ifconfig eth0 allmulti; ip -6 a
+        OpenStackOperations.Execute Command on VM Instance
+        ...    ${network_list}[${index}]
+        ...    ${VM_IPV6}[${index}]
+        ...    sudo ip -6 addr add ${EXTRA_NW_IPV6}[${index}]/64 dev eth0; sudo ifconfig eth0 allmulti; ip -6 a
     END
     FOR    ${index}    IN RANGE    0    ${LOOP_COUNT}
-        OpenStackOperations.Execute Command on VM Instance    ${network_list}[${index}]    ${VM_IPV4}[${index}]    sudo ifconfig eth0:1 ${EXTRA_NW_IPV4}[${index}] netmask 255.255.255.0 up; ip a
+        OpenStackOperations.Execute Command on VM Instance
+        ...    ${network_list}[${index}]
+        ...    ${VM_IPV4}[${index}]
+        ...    sudo ifconfig eth0:1 ${EXTRA_NW_IPV4}[${index}] netmask 255.255.255.0 up; ip a
     END
     BuiltIn.Wait Until Keyword Succeeds    10x    30s    Verify Ipv4 Data Traffic
     BuiltIn.Wait Until Keyword Succeeds    10x    30s    Verify Ipv6 Data Traffic
@@ -176,7 +233,13 @@ ReCreate L3VPN and associate L3VPN To Routers and verify traffic
     [Documentation]    Recreate L3VPN and associate L3VPN To Routers and verify ipv4/ipv6 traffic
     ${net_id} =    OpenStackOperations.Get Net Id    ${NETWORKS}[0]
     ${tenant_id} =    OpenStackOperations.Get Tenant ID From Network    ${net_id}
-    VpnOperations.VPN Create L3VPN    vpnid=${VPN_INSTANCE_ID}[0]    name=${VPN_NAME}[0]    rd=${RDS}[0]    exportrt=${RDS}[0]    importrt=${RDS}[0]    tenantid=${tenant_id}
+    VpnOperations.VPN Create L3VPN
+    ...    vpnid=${VPN_INSTANCE_ID}[0]
+    ...    name=${VPN_NAME}[0]
+    ...    rd=${RDS}[0]
+    ...    exportrt=${RDS}[0]
+    ...    importrt=${RDS}[0]
+    ...    tenantid=${tenant_id}
     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VPN_INSTANCE_ID}[0]
     BuiltIn.Should Contain    ${resp}    ${VPN_INSTANCE_ID}[0]
     ${router_id} =    OpenStackOperations.Get Router Id    ${ROUTER}
@@ -186,6 +249,7 @@ ReCreate L3VPN and associate L3VPN To Routers and verify traffic
     BuiltIn.Wait Until Keyword Succeeds    10x    30s    Verify Ipv4 Data Traffic
     BuiltIn.Wait Until Keyword Succeeds    10x    30s    Verify Ipv6 Data Traffic
 
+
 *** Keywords ***
 Suite Setup
     [Documentation]    Create basic setup for feature.Create two network,subnet,four ports and four VMs
@@ -197,17 +261,40 @@ Suite Setup
     ${output} =    OpenStackOperations.Show Network    ${NETWORKS}[0]
     BuiltIn.Should Contain    ${output}    ${UPDATE_NETWORK}
     OpenStackOperations.Create SubNet    ${NETWORKS}[0]    ${SUBNETS4}[0]    ${SUBNETS4_CIDR}[0]
-    OpenStackOperations.Create SubNet    ${NETWORKS}[0]    ${SUBNETS6}[0]    ${SUBNETS6_CIDR}[0]    ${SUBNET_ADDITIONAL_ARGS}
+    OpenStackOperations.Create SubNet
+    ...    ${NETWORKS}[0]
+    ...    ${SUBNETS6}[0]
+    ...    ${SUBNETS6_CIDR}[0]
+    ...    ${SUBNET_ADDITIONAL_ARGS}
     OpenStackOperations.Create SubNet    ${NETWORKS}[1]    ${SUBNETS4}[1]    ${SUBNETS4_CIDR}[1]
-    OpenStackOperations.Create SubNet    ${NETWORKS}[1]    ${SUBNETS6}[1]    ${SUBNETS6_CIDR}[1]    ${SUBNET_ADDITIONAL_ARGS}
-    BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${SUBNETWORK_URL}    ${SUBNETS4}
-    BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${SUBNETWORK_URL}    ${SUBNETS6}
+    OpenStackOperations.Create SubNet
+    ...    ${NETWORKS}[1]
+    ...    ${SUBNETS6}[1]
+    ...    ${SUBNETS6_CIDR}[1]
+    ...    ${SUBNET_ADDITIONAL_ARGS}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    3s
+    ...    1s
+    ...    Utils.Check For Elements At URI
+    ...    ${SUBNETWORK_URL}
+    ...    ${SUBNETS4}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    3s
+    ...    1s
+    ...    Utils.Check For Elements At URI
+    ...    ${SUBNETWORK_URL}
+    ...    ${SUBNETS6}
     OpenStackOperations.Update SubNet    ${SUBNETS4}[0]    additional_args=--description ${UPDATE_SUBNET}
     ${output} =    OpenStackOperations.Show SubNet    ${SUBNETS4}[0]
     BuiltIn.Should Contain    ${output}    ${UPDATE_SUBNET}
     OpenStackOperations.Create Router    ${ROUTER}
     @{router_list} =    BuiltIn.Create List    ${ROUTER}
-    BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${ROUTER_URL}    ${router_list}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    3s
+    ...    1s
+    ...    Utils.Check For Elements At URI
+    ...    ${ROUTER_URL}
+    ...    ${router_list}
     FOR    ${port}    IN    @{SUBNETS4}
         OpenStackOperations.Add Router Interface    ${ROUTER}    ${port}
     END
@@ -217,23 +304,54 @@ Suite Setup
     END
     ${interface_output} =    OpenStackOperations.Show Router Interface    ${ROUTER}
     Create Allow All SecurityGroup    ${SECURITY_GROUP}    IPv4    True
-    ${allowed_address_pairs_args} =    BuiltIn.Set Variable    --allowed-address ip-address=${EXTRA_NW_SUBNET_IPV4}[0] --allowed-address ip-address=${EXTRA_NW_SUBNET_IPV4}[1] --allowed-address ip-address=${EXTRA_NW_SUBNET_IPV6}[0] --allowed-address ip-address=${EXTRA_NW_SUBNET_IPV6}[1]
+    ${allowed_address_pairs_args} =    BuiltIn.Set Variable
+    ...    --allowed-address ip-address=${EXTRA_NW_SUBNET_IPV4}[0] --allowed-address ip-address=${EXTRA_NW_SUBNET_IPV4}[1] --allowed-address ip-address=${EXTRA_NW_SUBNET_IPV6}[0] --allowed-address ip-address=${EXTRA_NW_SUBNET_IPV6}[1]
     ${network_list} =    BuiltIn.Create List    ${NETWORKS}[0]    ${NETWORKS}[0]    ${NETWORKS}[1]    ${NETWORKS}[1]
     BuiltIn.Set Suite Variable    ${network_list}
     FOR    ${index}    IN RANGE    0    ${LOOP_COUNT}
-        OpenStackOperations.Create Port    ${network_list}[${index}]    ${PORTS}[${index}]    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args}
+        OpenStackOperations.Create Port
+        ...    ${network_list}[${index}]
+        ...    ${PORTS}[${index}]
+        ...    sg=${SECURITY_GROUP}
+        ...    additional_args=${allowed_address_pairs_args}
     END
     BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${PORT_URL}    ${PORTS}
     OpenStackOperations.Update Port    ${PORTS}[0]    additional_args=--name ${UPDATE_PORT}
     ${output} =    Show Port    ${UPDATE_PORT}
     BuiltIn.Should Contain    ${output}    ${UPDATE_PORT}
     OpenStackOperations.Update Port    ${UPDATE_PORT}    additional_args=--name ${PORTS}[0]
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS}[0]    ${NET_1_VMS}[0]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS}[1]    ${NET_1_VMS}[1]    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS}[2]    ${NET_2_VMS}[0]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS}[3]    ${NET_2_VMS}[1]    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
-    BuiltIn.Wait Until Keyword Succeeds    30s    10s    OpenStackOperations.Wait For Routes To Propogate    ${NETWORKS}    ${SUBNETS4_CIDR}
-    BuiltIn.Wait Until Keyword Succeeds    30s    10s    OpenStackOperations.Wait For Routes To Propogate    ${NETWORKS}    ${SUBNETS6_CIDR}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${PORTS}[0]
+    ...    ${NET_1_VMS}[0]
+    ...    ${OS_CMP1_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${PORTS}[1]
+    ...    ${NET_1_VMS}[1]
+    ...    ${OS_CMP2_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${PORTS}[2]
+    ...    ${NET_2_VMS}[0]
+    ...    ${OS_CMP1_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${PORTS}[3]
+    ...    ${NET_2_VMS}[1]
+    ...    ${OS_CMP2_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    OpenStackOperations.Wait For Routes To Propogate
+    ...    ${NETWORKS}
+    ...    ${SUBNETS4_CIDR}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    OpenStackOperations.Wait For Routes To Propogate
+    ...    ${NETWORKS}
+    ...    ${SUBNETS6_CIDR}
     @{net_1_vm_ipv4}    ${net_1_dhcp_ipv4} =    OpenStackOperations.Get VM IPs    @{NET_1_VMS}
     @{net_2_vm_ipv4}    ${net_2_dhcp_ipv4} =    OpenStackOperations.Get VM IPs    @{NET_2_VMS}
     BuiltIn.Should Not Contain    ${net_1_vm_ipv4}    None
@@ -241,20 +359,58 @@ Suite Setup
     BuiltIn.Should Not Contain    ${net_1_dhcp_ipv4}    None
     BuiltIn.Should Not Contain    ${net_2_dhcp_ipv4}    None
     BuiltIn.Log    Collect VMs IPv6 addresses
-    ${prefix_net10} =    String.Replace String    ${SUBNETS6_CIDR}[0]    ${IP6_SUBNET_CIDR_SUFFIX}    ${IP6_ADDR_SUFFIX}
-    ${prefix_net20} =    String.Replace String    ${SUBNETS6_CIDR}[1]    ${IP6_SUBNET_CIDR_SUFFIX}    ${IP6_ADDR_SUFFIX}
-    ${status}    ${message}    Run Keyword And Ignore Error    BuiltIn.Wait Until Keyword Succeeds    3x    60s    OpenStackOperations.Collect VM IPv6 SLAAC Addresses
-    ...    true    ${NET_1_VMS}    ${NETWORKS}[0]    ${prefix_net10}
-    ${status}    ${message}    Run Keyword And Ignore Error    BuiltIn.Wait Until Keyword Succeeds    3x    60s    OpenStackOperations.Collect VM IPv6 SLAAC Addresses
-    ...    true    ${NET_2_VMS}    ${NETWORKS}[1]    ${prefix_net20}
-    ${net_1_vm_ipv6} =    OpenStackOperations.Collect VM IPv6 SLAAC Addresses    false    ${NET_1_VMS}    ${NETWORKS}[0]    ${prefix_net10}
-    ${net_2_vm_ipv6} =    OpenStackOperations.Collect VM IPv6 SLAAC Addresses    false    ${NET_2_VMS}    ${NETWORKS}[1]    ${prefix_net20}
-    ${loop_count}    Get Length    ${NET_1_VMS}
+    ${prefix_net10} =    String.Replace String
+    ...    ${SUBNETS6_CIDR}[0]
+    ...    ${IP6_SUBNET_CIDR_SUFFIX}
+    ...    ${IP6_ADDR_SUFFIX}
+    ${prefix_net20} =    String.Replace String
+    ...    ${SUBNETS6_CIDR}[1]
+    ...    ${IP6_SUBNET_CIDR_SUFFIX}
+    ...    ${IP6_ADDR_SUFFIX}
+    ${status}    ${message} =    Run Keyword And Ignore Error
+    ...    BuiltIn.Wait Until Keyword Succeeds
+    ...    3x
+    ...    60s
+    ...    OpenStackOperations.Collect VM IPv6 SLAAC Addresses
+    ...    true
+    ...    ${NET_1_VMS}
+    ...    ${NETWORKS}[0]
+    ...    ${prefix_net10}
+    ${status}    ${message} =    Run Keyword And Ignore Error
+    ...    BuiltIn.Wait Until Keyword Succeeds
+    ...    3x
+    ...    60s
+    ...    OpenStackOperations.Collect VM IPv6 SLAAC Addresses
+    ...    true
+    ...    ${NET_2_VMS}
+    ...    ${NETWORKS}[1]
+    ...    ${prefix_net20}
+    ${net_1_vm_ipv6} =    OpenStackOperations.Collect VM IPv6 SLAAC Addresses
+    ...    false
+    ...    ${NET_1_VMS}
+    ...    ${NETWORKS}[0]
+    ...    ${prefix_net10}
+    ${net_2_vm_ipv6} =    OpenStackOperations.Collect VM IPv6 SLAAC Addresses
+    ...    false
+    ...    ${NET_2_VMS}
+    ...    ${NETWORKS}[1]
+    ...    ${prefix_net20}
+    ${loop_count} =    Get Length    ${NET_1_VMS}
     FOR    ${index}    IN RANGE    0    ${loop_count}
-        ${status}    ${message}    Run Keyword And Ignore Error    BuiltIn.Should Not Contain    ${net_1_vm_ipv6}[${index}]    None
-        Run Keyword If    '${status}' == 'FAIL'    Write Commands Until Prompt    nova console-log ${NET_1_VMS}[${index}]    30s
-        ${status}    ${message}    Run Keyword And Ignore Error    BuiltIn.Should Not Contain    ${net_2_vm_ipv6}[${index}]    None
-        Run Keyword If    '${status}' == 'FAIL'    Write Commands Until Prompt    nova console-log ${NET_2_VMS}[${index}]    30s
+        ${status}    ${message} =    Run Keyword And Ignore Error
+        ...    BuiltIn.Should Not Contain
+        ...    ${net_1_vm_ipv6}[${index}]
+        ...    None
+        IF    '${status}' == 'FAIL'
+            Write Commands Until Prompt    nova console-log ${NET_1_VMS}[${index}]    30s
+        END
+        ${status}    ${message} =    Run Keyword And Ignore Error
+        ...    BuiltIn.Should Not Contain
+        ...    ${net_2_vm_ipv6}[${index}]
+        ...    None
+        IF    '${status}' == 'FAIL'
+            Write Commands Until Prompt    nova console-log ${NET_2_VMS}[${index}]    30s
+        END
     END
     BuiltIn.Set Suite Variable    ${net_1_vm_ipv4}
     BuiltIn.Set Suite Variable    ${net_2_vm_ipv4}
@@ -265,110 +421,250 @@ Suite Setup
 
 Verify Ipv4 Data Traffic
     [Documentation]    Check Ipv4 data path verification within and across network
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${net_1_vm_ipv4}[0]    ping -c 3 ${EXTRA_NW_IPV4}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${net_1_vm_ipv4}[0]
+    ...    ping -c 3 ${EXTRA_NW_IPV4}[1]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${net_1_vm_ipv4}[0]    ping -c 3 ${EXTRA_NW_IPV4}[3]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${net_1_vm_ipv4}[0]
+    ...    ping -c 3 ${EXTRA_NW_IPV4}[3]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${net_1_vm_ipv4}[0]    ping -c 3 ${EXTRA_NW_IPV4}[2]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${net_1_vm_ipv4}[0]
+    ...    ping -c 3 ${EXTRA_NW_IPV4}[2]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${net_1_vm_ipv4}[1]    ping -c 3 ${EXTRA_NW_IPV4}[0]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${net_1_vm_ipv4}[1]
+    ...    ping -c 3 ${EXTRA_NW_IPV4}[0]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${net_1_vm_ipv4}[1]    ping -c 3 ${EXTRA_NW_IPV4}[3]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${net_1_vm_ipv4}[1]
+    ...    ping -c 3 ${EXTRA_NW_IPV4}[3]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${net_1_vm_ipv4}[1]    ping -c 3 ${EXTRA_NW_IPV4}[2]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${net_1_vm_ipv4}[1]
+    ...    ping -c 3 ${EXTRA_NW_IPV4}[2]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${net_2_vm_ipv4}[0]    ping -c 3 ${EXTRA_NW_IPV4}[0]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${net_2_vm_ipv4}[0]
+    ...    ping -c 3 ${EXTRA_NW_IPV4}[0]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${net_2_vm_ipv4}[0]    ping -c 3 ${EXTRA_NW_IPV4}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${net_2_vm_ipv4}[0]
+    ...    ping -c 3 ${EXTRA_NW_IPV4}[1]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${net_2_vm_ipv4}[0]    ping -c 3 ${EXTRA_NW_IPV4}[2]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${net_2_vm_ipv4}[0]
+    ...    ping -c 3 ${EXTRA_NW_IPV4}[2]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${net_2_vm_ipv4}[1]    ping -c 3 ${EXTRA_NW_IPV4}[0]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${net_2_vm_ipv4}[1]
+    ...    ping -c 3 ${EXTRA_NW_IPV4}[0]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${net_2_vm_ipv4}[1]    ping -c 3 ${EXTRA_NW_IPV4}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${net_2_vm_ipv4}[1]
+    ...    ping -c 3 ${EXTRA_NW_IPV4}[1]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${net_2_vm_ipv4}[1]    ping -c 3 ${EXTRA_NW_IPV4}[3]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${net_2_vm_ipv4}[1]
+    ...    ping -c 3 ${EXTRA_NW_IPV4}[3]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
 
 Verify Ipv4 Data No Traffic
     [Documentation]    Check Ipv4 data path verification within and across network
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${net_1_vm_ipv4}[0]    ping -c 3 ${EXTRA_NW_IPV4}[3]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${net_1_vm_ipv4}[0]
+    ...    ping -c 3 ${EXTRA_NW_IPV4}[3]
     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${net_1_vm_ipv4}[0]    ping -c 3 ${EXTRA_NW_IPV4}[2]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${net_1_vm_ipv4}[0]
+    ...    ping -c 3 ${EXTRA_NW_IPV4}[2]
     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${net_1_vm_ipv4}[1]    ping -c 3 ${EXTRA_NW_IPV4}[3]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${net_1_vm_ipv4}[1]
+    ...    ping -c 3 ${EXTRA_NW_IPV4}[3]
     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${net_1_vm_ipv4}[1]    ping -c 3 ${EXTRA_NW_IPV4}[2]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${net_1_vm_ipv4}[1]
+    ...    ping -c 3 ${EXTRA_NW_IPV4}[2]
     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${net_2_vm_ipv4}[0]    ping -c 3 ${EXTRA_NW_IPV4}[0]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${net_2_vm_ipv4}[0]
+    ...    ping -c 3 ${EXTRA_NW_IPV4}[0]
     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${net_2_vm_ipv4}[0]    ping -c 3 ${EXTRA_NW_IPV4}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${net_2_vm_ipv4}[0]
+    ...    ping -c 3 ${EXTRA_NW_IPV4}[1]
     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${net_2_vm_ipv4}[1]    ping -c 3 ${EXTRA_NW_IPV4}[0]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${net_2_vm_ipv4}[1]
+    ...    ping -c 3 ${EXTRA_NW_IPV4}[0]
     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${net_2_vm_ipv4}[1]    ping -c 3 ${EXTRA_NW_IPV4}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${net_2_vm_ipv4}[1]
+    ...    ping -c 3 ${EXTRA_NW_IPV4}[1]
     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
 
 Verify Ipv6 Data Traffic
     [Documentation]    Check Ipv6 data path verification within and across network
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${net_1_vm_ipv6}[0]    ping6 -c 3 ${EXTRA_NW_IPV6}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${net_1_vm_ipv6}[0]
+    ...    ping6 -c 3 ${EXTRA_NW_IPV6}[1]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${net_1_vm_ipv6}[0]    ping6 -c 3 ${EXTRA_NW_IPV6}[3]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${net_1_vm_ipv6}[0]
+    ...    ping6 -c 3 ${EXTRA_NW_IPV6}[3]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${net_1_vm_ipv6}[0]    ping6 -c 3 ${EXTRA_NW_IPV6}[2]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${net_1_vm_ipv6}[0]
+    ...    ping6 -c 3 ${EXTRA_NW_IPV6}[2]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${net_1_vm_ipv6}[1]    ping6 -c 3 ${EXTRA_NW_IPV6}[0]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${net_1_vm_ipv6}[1]
+    ...    ping6 -c 3 ${EXTRA_NW_IPV6}[0]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${net_1_vm_ipv6}[1]    ping6 -c 3 ${EXTRA_NW_IPV6}[3]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${net_1_vm_ipv6}[1]
+    ...    ping6 -c 3 ${EXTRA_NW_IPV6}[3]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${net_1_vm_ipv6}[1]    ping6 -c 3 ${EXTRA_NW_IPV6}[2]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${net_1_vm_ipv6}[1]
+    ...    ping6 -c 3 ${EXTRA_NW_IPV6}[2]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${net_2_vm_ipv6}[0]    ping6 -c 3 ${EXTRA_NW_IPV6}[0]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${net_2_vm_ipv6}[0]
+    ...    ping6 -c 3 ${EXTRA_NW_IPV6}[0]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${net_2_vm_ipv6}[0]    ping6 -c 3 ${EXTRA_NW_IPV6}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${net_2_vm_ipv6}[0]
+    ...    ping6 -c 3 ${EXTRA_NW_IPV6}[1]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${net_2_vm_ipv6}[0]    ping6 -c 3 ${EXTRA_NW_IPV6}[2]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${net_2_vm_ipv6}[0]
+    ...    ping6 -c 3 ${EXTRA_NW_IPV6}[2]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${net_2_vm_ipv6}[1]    ping6 -c 3 ${EXTRA_NW_IPV6}[0]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${net_2_vm_ipv6}[1]
+    ...    ping6 -c 3 ${EXTRA_NW_IPV6}[0]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${net_2_vm_ipv6}[1]    ping6 -c 3 ${EXTRA_NW_IPV6}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${net_2_vm_ipv6}[1]
+    ...    ping6 -c 3 ${EXTRA_NW_IPV6}[1]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${net_2_vm_ipv6}[1]    ping6 -c 3 ${EXTRA_NW_IPV6}[3]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${net_2_vm_ipv6}[1]
+    ...    ping6 -c 3 ${EXTRA_NW_IPV6}[3]
     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
 
 Verify Ipv6 Data No Traffic
     [Documentation]    Check Ipv6 data path verification within and across network
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${net_1_vm_ipv6}[0]    ping6 -c 3 ${EXTRA_NW_IPV6}[3]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${net_1_vm_ipv6}[0]
+    ...    ping6 -c 3 ${EXTRA_NW_IPV6}[3]
     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${net_1_vm_ipv6}[0]    ping6 -c 3 ${EXTRA_NW_IPV6}[2]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${net_1_vm_ipv6}[0]
+    ...    ping6 -c 3 ${EXTRA_NW_IPV6}[2]
     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${net_1_vm_ipv6}[1]    ping6 -c 3 ${EXTRA_NW_IPV6}[3]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${net_1_vm_ipv6}[1]
+    ...    ping6 -c 3 ${EXTRA_NW_IPV6}[3]
     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${net_1_vm_ipv6}[1]    ping6 -c 3 ${EXTRA_NW_IPV6}[2]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${net_1_vm_ipv6}[1]
+    ...    ping6 -c 3 ${EXTRA_NW_IPV6}[2]
     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${net_2_vm_ipv6}[0]    ping6 -c 3 ${EXTRA_NW_IPV6}[0]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${net_2_vm_ipv6}[0]
+    ...    ping6 -c 3 ${EXTRA_NW_IPV6}[0]
     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${net_2_vm_ipv6}[0]    ping6 -c 3 ${EXTRA_NW_IPV6}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${net_2_vm_ipv6}[0]
+    ...    ping6 -c 3 ${EXTRA_NW_IPV6}[1]
     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${net_2_vm_ipv6}[1]    ping6 -c 3 ${EXTRA_NW_IPV6}[0]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${net_2_vm_ipv6}[1]
+    ...    ping6 -c 3 ${EXTRA_NW_IPV6}[0]
     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${net_2_vm_ipv6}[1]    ping6 -c 3 ${EXTRA_NW_IPV6}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${net_2_vm_ipv6}[1]
+    ...    ping6 -c 3 ${EXTRA_NW_IPV6}[1]
     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
 
 Verify Table 21 for VPN Routes
     FOR    ${index}    IN RANGE    0    ${LOOP_COUNT}
-        OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${TABLE_NO_21}    True    ${EMPTY}    ipv6_dst=${EXTRA_NW_IPV6}[${index}]
+        OVSDB.Verify Dump Flows For Specific Table
+        ...    ${OS_CMP1_IP}
+        ...    ${TABLE_NO_21}
+        ...    True
+        ...    ${EMPTY}
+        ...    ipv6_dst=${EXTRA_NW_IPV6}[${index}]
     END
     FOR    ${index}    IN RANGE    0    ${LOOP_COUNT}
-        OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${TABLE_NO_21}    True    ${EMPTY}    ipv6_dst=${EXTRA_NW_IPV4}[${index}]
+        OVSDB.Verify Dump Flows For Specific Table
+        ...    ${OS_CMP1_IP}
+        ...    ${TABLE_NO_21}
+        ...    True
+        ...    ${EMPTY}
+        ...    ipv6_dst=${EXTRA_NW_IPV4}[${index}]
     END
 
 Verify Table 21 for No VPN Routes
     FOR    ${index}    IN RANGE    0    ${LOOP_COUNT}
-        OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${TABLE_NO_21}    False    ${EMPTY}    ipv6_dst=${EXTRA_NW_IPV6}[${index}]
+        OVSDB.Verify Dump Flows For Specific Table
+        ...    ${OS_CMP1_IP}
+        ...    ${TABLE_NO_21}
+        ...    False
+        ...    ${EMPTY}
+        ...    ipv6_dst=${EXTRA_NW_IPV6}[${index}]
     END
     FOR    ${index}    IN RANGE    0    ${LOOP_COUNT}
-        OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${TABLE_NO_21}    False    ${EMPTY}    ipv6_dst=${EXTRA_NW_IPV4}[${index}]
+        OVSDB.Verify Dump Flows For Specific Table
+        ...    ${OS_CMP1_IP}
+        ...    ${TABLE_NO_21}
+        ...    False
+        ...    ${EMPTY}
+        ...    ipv6_dst=${EXTRA_NW_IPV4}[${index}]
     END
 
 Suite Teardown
index 4065881918c5f2186c98c2d1bab3f391732c47d0..cc1a1a27873ba512e3006942a3cd96772e839403 100644 (file)
@@ -1,56 +1,87 @@
 *** Settings ***
-Documentation     Test suite to validate IPv6 vpnservice functionality in an Openstack integrated environment.
-...               The assumption of this suite is that the environment is already configured with the proper
-...               integration bridges and vxlan tunnels.
-Suite Setup       Suite Setup
-Suite Teardown    Suite Teardown
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     OpenStackOperations.Get Test Teardown Debugs
-Library           OperatingSystem
-Library           RequestsLibrary
-Resource          ../../../libraries/CompareStream.robot
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/OpenStackOperations.robot
-Resource          ../../../libraries/DevstackUtils.robot
-Resource          ../../../libraries/VpnOperations.robot
-Resource          ../../../libraries/OVSDB.robot
-Resource          ../../../libraries/SetupUtils.robot
-Resource          ../../../libraries/Tcpdump.robot
-Resource          ../../../variables/Variables.robot
-Resource          ../../../variables/netvirt/Variables.robot
+Documentation       Test suite to validate IPv6 vpnservice functionality in an Openstack integrated environment.
+...                 The assumption of this suite is that the environment is already configured with the proper
+...                 integration bridges and vxlan tunnels.
+
+Library             OperatingSystem
+Library             RequestsLibrary
+Resource            ../../../libraries/CompareStream.robot
+Resource            ../../../libraries/Utils.robot
+Resource            ../../../libraries/OpenStackOperations.robot
+Resource            ../../../libraries/DevstackUtils.robot
+Resource            ../../../libraries/VpnOperations.robot
+Resource            ../../../libraries/OVSDB.robot
+Resource            ../../../libraries/SetupUtils.robot
+Resource            ../../../libraries/Tcpdump.robot
+Resource            ../../../variables/Variables.robot
+Resource            ../../../variables/netvirt/Variables.robot
+
+Suite Setup         Suite Setup
+Suite Teardown      Suite Teardown
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       OpenStackOperations.Get Test Teardown Debugs
+
 
 *** Variables ***
-${SECURITY_GROUP}    vpn6_sg
-@{NETWORKS}       vpn6_net_1    vpn6_net_2
-@{SUBNETS}        vpn6_sub_1    vpn6_sub_2
-@{SUBNET_CIDRS}    2001:db8:0:2::/64    2001:db8:0:3::/64
-@{PORTS}          vpn6_net_1_port_1    vpn6_net_1_port_2    vpn6_net_2_port_1    vpn6_net_2_port_2
-@{NET_1_VMS}      vpn6_net_1_vm_1    vpn6_net_1_vm_2
-@{NET_2_VMS}      vpn6_net_2_vm_1    vpn6_net_2_vm_2
-${ROUTER}         vpn6_router
-@{EXTRA_NW_IP}    2001:db9:cafe:d::10    2001:db9:abcd:d::20
-@{EXTRA_NW_SUBNET}    2001:db9:cafe:d::/64    2001:db9:abcd:d::/64
-${UPDATE_NETWORK}    UpdateNetworkV6
-${UPDATE_SUBNET}    UpdateSubnetV6
-${UPDATE_PORT}    UpdatePortV6
-@{VPN_INSTANCE_IDS}    4ae8cd92-48ca-49b5-94e1-b2921a261661    4ae8cd92-48ca-49b5-94e1-b2921a261662    4ae8cd92-48ca-49b5-94e1-b2921a261663
-@{VPN_NAMES}      vpn6_1    vpn6_2    vpn6_3
-@{RDS}            ["2206:2"]    ["2306:2"]    ["2406:2"]
+${SECURITY_GROUP}       vpn6_sg
+@{NETWORKS}             vpn6_net_1    vpn6_net_2
+@{SUBNETS}              vpn6_sub_1    vpn6_sub_2
+@{SUBNET_CIDRS}         2001:db8:0:2::/64    2001:db8:0:3::/64
+@{PORTS}                vpn6_net_1_port_1    vpn6_net_1_port_2    vpn6_net_2_port_1    vpn6_net_2_port_2
+@{NET_1_VMS}            vpn6_net_1_vm_1    vpn6_net_1_vm_2
+@{NET_2_VMS}            vpn6_net_2_vm_1    vpn6_net_2_vm_2
+${ROUTER}               vpn6_router
+@{EXTRA_NW_IP}          2001:db9:cafe:d::10    2001:db9:abcd:d::20
+@{EXTRA_NW_SUBNET}      2001:db9:cafe:d::/64    2001:db9:abcd:d::/64
+${UPDATE_NETWORK}       UpdateNetworkV6
+${UPDATE_SUBNET}        UpdateSubnetV6
+${UPDATE_PORT}          UpdatePortV6
+@{VPN_INSTANCE_IDS}
+...                     4ae8cd92-48ca-49b5-94e1-b2921a261661
+...                     4ae8cd92-48ca-49b5-94e1-b2921a261662
+...                     4ae8cd92-48ca-49b5-94e1-b2921a261663
+@{VPN_NAMES}            vpn6_1    vpn6_2    vpn6_3
+@{RDS}                  ["2206:2"]    ["2306:2"]    ["2406:2"]
+
 
 *** Test Cases ***
 Check ELAN Datapath Traffic Within The Networks
-    ${output}=    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${VM_IP_NET10}[0]    ping6 -c 3 ${VM_IP_NET10}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${VM_IP_NET10}[0]
+    ...    ping6 -c 3 ${VM_IP_NET10}[1]
     BuiltIn.Should Contain    ${output}    64 bytes
-    ${output}=    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${VM_IP_NET20}[0]    ping6 -c 3 ${VM_IP_NET20}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${VM_IP_NET20}[0]
+    ...    ping6 -c 3 ${VM_IP_NET20}[1]
     BuiltIn.Should Contain    ${output}    64 bytes
 
 Check L3_Datapath Traffic Across Networks With Router
     BuiltIn.Log    Verification of FIB Entries and Flow
-    @{tcpdump_conn_ids} =    OpenStackOperations.Start Packet Capture On Nodes    tcpdump_vpn6    ${EMPTY}    @{OS_ALL_IPS}
+    @{tcpdump_conn_ids} =    OpenStackOperations.Start Packet Capture On Nodes
+    ...    tcpdump_vpn6
+    ...    ${EMPTY}
+    ...    @{OS_ALL_IPS}
     ${vm_ips} =    BuiltIn.Create List    @{VM_IP_NET10}    @{VM_IP_NET20}
-    BuiltIn.Wait Until Keyword Succeeds    30s    10s    Utils.Check For Elements At URI    ${FIB_ENTRY_URL}    ${vm_ips}
-    BuiltIn.Wait Until Keyword Succeeds    30s    10s    VpnOperations.Verify Flows Are Present For L3VPN    ${OS_CMP1_IP}    ${VM_IP_NET10}
-    BuiltIn.Wait Until Keyword Succeeds    30s    10s    VpnOperations.Verify Flows Are Present For L3VPN    ${OS_CMP1_IP}    ${VM_IP_NET20}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    Utils.Check For Elements At URI
+    ...    ${FIB_ENTRY_URL}
+    ...    ${vm_ips}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    VpnOperations.Verify Flows Are Present For L3VPN
+    ...    ${OS_CMP1_IP}
+    ...    ${VM_IP_NET10}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    VpnOperations.Verify Flows Are Present For L3VPN
+    ...    ${OS_CMP1_IP}
+    ...    ${VM_IP_NET20}
     BuiltIn.Wait Until Keyword Succeeds    30s    10s    VpnOperations.Verify GWMAC Entry On ODL    ${GWMAC_ADDRS}
     Verify GWMAC Flow Entry On Flow Table On All Compute Nodes    ipv6
     ${dst_ip_list} =    BuiltIn.Create List    ${VM_IP_NET10}[1]    @{VM_IP_NET20}
@@ -61,10 +92,16 @@ Check L3_Datapath Traffic Across Networks With Router
 
 Add Multiple Extra Routes And Check Datapath Before L3VPN Creation
     ${CONFIG_EXTRA_ROUTE_IP1} =    BuiltIn.Catenate    sudo ip -6 addr add ${EXTRA_NW_IP}[0]/64 dev eth0
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${VM_IP_NET10}[0]    ${CONFIG_EXTRA_ROUTE_IP1}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${VM_IP_NET10}[0]
+    ...    ${CONFIG_EXTRA_ROUTE_IP1}
     ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${VM_IP_NET10}[0]    ip -6 a
     ${CONFIG_EXTRA_ROUTE_IP2} =    BuiltIn.Catenate    sudo ip -6 addr add ${EXTRA_NW_IP}[1]/64 dev eth0
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${VM_IP_NET10}[0]    ${CONFIG_EXTRA_ROUTE_IP2}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${VM_IP_NET10}[0]
+    ...    ${CONFIG_EXTRA_ROUTE_IP2}
     ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${VM_IP_NET10}[0]    ip -6 a
     ${EXT_RT1} =    Set Variable    destination=${EXTRA_NW_SUBNET}[0],gateway=${VM_IP_NET10}[0]
     ${EXT_RT2} =    Set Variable    destination=${EXTRA_NW_SUBNET}[1],gateway=${VM_IP_NET10}[0]
@@ -72,12 +109,26 @@ Add Multiple Extra Routes And Check Datapath Before L3VPN Creation
     OpenStackOperations.Update Router    ${ROUTER}    ${cmd}
     OpenStackOperations.Show Router    ${ROUTER}
     ${vm_ips} =    BuiltIn.Create List    @{EXTRA_NW_SUBNET}
-    BuiltIn.Wait Until Keyword Succeeds    30s    10s    Utils.Check For Elements At URI    ${FIB_ENTRY_URL}    ${vm_ips}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${VM_IP_NET10}[1]    ping6 -c 3 ${EXTRA_NW_IP}[1]
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    Utils.Check For Elements At URI
+    ...    ${FIB_ENTRY_URL}
+    ...    ${vm_ips}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${VM_IP_NET10}[1]
+    ...    ping6 -c 3 ${EXTRA_NW_IP}[1]
     BuiltIn.Should Contain    ${output}    64 bytes
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[1]    ${VM_IP_NET20}[1]    ping6 -c 3 ${EXTRA_NW_IP}[1]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[1]
+    ...    ${VM_IP_NET20}[1]
+    ...    ping6 -c 3 ${EXTRA_NW_IP}[1]
     BuiltIn.Should Contain    ${output}    64 bytes
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${VM_IP_NET10}[1]    ping6 -c 3 ${EXTRA_NW_IP}[0]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${VM_IP_NET10}[1]
+    ...    ping6 -c 3 ${EXTRA_NW_IP}[0]
     BuiltIn.Should Contain    ${output}    64 bytes
 
 Delete Extra Route
@@ -87,12 +138,18 @@ Delete Extra Route
 Delete And Recreate Extra Route
     [Documentation]    Recreate multiple extra route and check data path before L3VPN creation
     ${CONFIG_EXTRA_ROUTE_IP1} =    BuiltIn.Catenate    sudo ip -6 addr add ${EXTRA_NW_IP}[1]/64 dev eth0
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${VM_IP_NET10}[0]    ${CONFIG_EXTRA_ROUTE_IP1}
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${VM_IP_NET10}[0]
+    ...    ${CONFIG_EXTRA_ROUTE_IP1}
     ${EXT_RT1} =    Set Variable    destination=${EXTRA_NW_SUBNET}[0],gateway=${VM_IP_NET10}[0]
     ${cmd} =    BuiltIn.Catenate    ${RT_OPTIONS}    ${EXT_RT1}
     OpenStackOperations.Update Router    ${ROUTER}    ${cmd}
     OpenStackOperations.Show Router    ${ROUTER}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    ${NETWORKS}[0]    ${VM_IP_NET10}[1]    ping6 -c 3 ${EXTRA_NW_IP}[0]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance
+    ...    ${NETWORKS}[0]
+    ...    ${VM_IP_NET10}[1]
+    ...    ping6 -c 3 ${EXTRA_NW_IP}[0]
     BuiltIn.Should Contain    ${output}    64 bytes
     # clear off extra-routes before the next set of tests
     [Teardown]    BuiltIn.Run Keywords    OpenStackOperations.Update Router    ${ROUTER}    ${RT_CLEAR}
@@ -102,23 +159,46 @@ Delete And Recreate Extra Route
 Create L3VPN
     ${net_id} =    OpenStackOperations.Get Net Id    ${NETWORKS}[0]
     ${tenant_id} =    OpenStackOperations.Get Tenant ID From Network    ${net_id}
-    VpnOperations.VPN Create L3VPN    vpnid=${VPN_INSTANCE_IDS}[0]    name=${VPN_NAMES}[0]    rd=${RDS}[0]    exportrt=${RDS}[0]    importrt=${RDS}[0]    tenantid=${tenant_id}
-    ${resp}=    VpnOperations.VPN Get L3VPN    vpnid=${VPN_INSTANCE_IDS}[0]
+    VpnOperations.VPN Create L3VPN
+    ...    vpnid=${VPN_INSTANCE_IDS}[0]
+    ...    name=${VPN_NAMES}[0]
+    ...    rd=${RDS}[0]
+    ...    exportrt=${RDS}[0]
+    ...    importrt=${RDS}[0]
+    ...    tenantid=${tenant_id}
+    ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VPN_INSTANCE_IDS}[0]
     BuiltIn.Should Contain    ${resp}    ${VPN_INSTANCE_IDS}[0]
 
 Associate L3VPN To Routers
     ${router_id} =    OpenStackOperations.Get Router Id    ${ROUTER}
     VpnOperations.Associate VPN to Router    routerid=${router_id}    vpnid=${VPN_INSTANCE_IDS}[0]
-    ${resp}=    VpnOperations.VPN Get L3VPN    vpnid=${VPN_INSTANCE_IDS}[0]
+    ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VPN_INSTANCE_IDS}[0]
     BuiltIn.Should Contain    ${resp}    ${router_id}
 
 Verify L3VPN Datapath With Router Association
     BuiltIn.Log    Verify VPN interfaces, FIB entries and Flow table
     ${vm_ips} =    BuiltIn.Create List    @{VM_IP_NET10}    @{VM_IP_NET20}
-    CompareStream.Run_Keyword_If_Less_Than_Magnesium    BuiltIn.Wait Until Keyword Succeeds    30s    10s    Utils.Check For Elements At URI    ${VPN_IFACES_URL}    ${vm_ips}
-    CompareStream.Run_Keyword_If_At_Least_Magnesium    BuiltIn.Wait Until Keyword Succeeds    30s    10s    Utils.Check For Elements At URI    ${VPN_INST_IFACES_URL}    ${vm_ips}
+    CompareStream.Run_Keyword_If_Less_Than_Magnesium
+    ...    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    Utils.Check For Elements At URI
+    ...    ${VPN_IFACES_URL}
+    ...    ${vm_ips}
+    CompareStream.Run_Keyword_If_At_Least_Magnesium
+    ...    BuiltIn.Wait Until Keyword Succeeds
+    ...    30s
+    ...    10s
+    ...    Utils.Check For Elements At URI
+    ...    ${VPN_INST_IFACES_URL}
+    ...    ${vm_ips}
     ${RD} =    Strip String    ${RDS}[0]    characters="[]
-    BuiltIn.Wait Until Keyword Succeeds    60s    15s    Utils.Check For Elements At URI    ${CONFIG_API}/odl-fib:fibEntries/vrfTables/${RD}/    ${vm_ips}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    60s
+    ...    15s
+    ...    Utils.Check For Elements At URI
+    ...    ${CONFIG_API}/odl-fib:fibEntries/vrfTables/${RD}/
+    ...    ${vm_ips}
     Verify Flows Are Present For L3VPN On All Compute Nodes    ${vm_ips}
     BuiltIn.Wait Until Keyword Succeeds    30s    10s    VpnOperations.Verify GWMAC Entry On ODL    ${GWMAC_ADDRS}
     Verify GWMAC Flow Entry On Flow Table On All Compute Nodes    ipv6
@@ -130,13 +210,13 @@ Verify L3VPN Datapath With Router Association
     OpenStackOperations.Test Operations From Vm Instance    ${NETWORKS}[1]    ${VM_IP_NET20}[0]    ${dst_ip_list}
 
 Dissociate L3VPN From Routers
-    ${router_id}=    OpenStackOperations.Get Router Id    ${ROUTER}
+    ${router_id} =    OpenStackOperations.Get Router Id    ${ROUTER}
     VpnOperations.Dissociate VPN to Router    routerid=${router_id}    vpnid=${VPN_INSTANCE_IDS}[0]
-    ${resp}=    VpnOperations.VPN Get L3VPN    vpnid=${VPN_INSTANCE_IDS}[0]
+    ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VPN_INSTANCE_IDS}[0]
     BuiltIn.Should Not Contain    ${resp}    ${router_id}
 
 Delete Router And Router Interfaces With L3VPN
-    ${router_id}=    OpenStackOperations.Get Router Id    ${ROUTER}
+    ${router_id} =    OpenStackOperations.Get Router Id    ${ROUTER}
     VpnOperations.Associate VPN to Router    routerid=${router_id}    vpnid=${VPN_INSTANCE_IDS}[0]
     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VPN_INSTANCE_IDS}[0]
     BuiltIn.Should Contain    ${resp}    ${router_id}
@@ -152,8 +232,14 @@ Delete Router And Router Interfaces With L3VPN
     ${router_output} =    OpenStackOperations.List Routers
     BuiltIn.Should Not Contain    ${router_output}    ${ROUTER}
     @{router_list} =    BuiltIn.Create List    ${ROUTER}
-    BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements Not At URI    ${ROUTER_URL}    ${router_list}    check_for_null=True
-    ${resp}=    VpnOperations.VPN Get L3VPN    vpnid=${VPN_INSTANCE_IDS}[0]
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    3s
+    ...    1s
+    ...    Utils.Check For Elements Not At URI
+    ...    ${ROUTER_URL}
+    ...    ${router_list}
+    ...    check_for_null=True
+    ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VPN_INSTANCE_IDS}[0]
     BuiltIn.Should Not Contain    ${resp}    ${router_id}
     Verify GWMAC Flow Entry Removed From Flow Table On All Compute Nodes
 
@@ -162,7 +248,9 @@ Delete Router With NonExistentRouter Name
     BuiltIn.Log    ${result.stdout}
     BuiltIn.Log    ${result.stderr}
     BuiltIn.Should Be True    '${result.rc}' == '1'
-    BuiltIn.Should Match Regexp    ${result.stderr}    Failed to delete router with name or ID 'nonExistentRouter': No Router found for nonExistentRouter
+    BuiltIn.Should Match Regexp
+    ...    ${result.stderr}
+    ...    Failed to delete router with name or ID 'nonExistentRouter': No Router found for nonExistentRouter
 
 Delete L3VPN
     VpnOperations.VPN Delete L3VPN    vpnid=${VPN_INSTANCE_IDS}[0]
@@ -170,16 +258,35 @@ Delete L3VPN
 Create Multiple L3VPN
     ${net_id} =    Get Net Id    ${NETWORKS}[0]
     ${tenant_id} =    Get Tenant ID From Network    ${net_id}
-    VpnOperations.VPN Create L3VPN    vpnid=${VPN_INSTANCE_IDS}[0]    name=${VPN_NAMES}[0]    rd=${RDS}[0]    exportrt=${RDS}[0]    importrt=${RDS}[0]    tenantid=${tenant_id}
-    VpnOperations.VPN Create L3VPN    vpnid=${VPN_INSTANCE_IDS}[1]    name=${VPN_NAMES}[1]    rd=${RDS}[1]    exportrt=${RDS}[1]    importrt=${RDS}[1]    tenantid=${tenant_id}
-    VpnOperations.VPN Create L3VPN    vpnid=${VPN_INSTANCE_IDS}[2]    name=${VPN_NAMES}[2]    rd=${RDS}[2]    exportrt=${RDS}[2]    importrt=${RDS}[2]    tenantid=${tenant_id}
-    ${resp}=    VpnOperations.VPN Get L3VPN    vpnid=${VPN_INSTANCE_IDS}[0]
+    VpnOperations.VPN Create L3VPN
+    ...    vpnid=${VPN_INSTANCE_IDS}[0]
+    ...    name=${VPN_NAMES}[0]
+    ...    rd=${RDS}[0]
+    ...    exportrt=${RDS}[0]
+    ...    importrt=${RDS}[0]
+    ...    tenantid=${tenant_id}
+    VpnOperations.VPN Create L3VPN
+    ...    vpnid=${VPN_INSTANCE_IDS}[1]
+    ...    name=${VPN_NAMES}[1]
+    ...    rd=${RDS}[1]
+    ...    exportrt=${RDS}[1]
+    ...    importrt=${RDS}[1]
+    ...    tenantid=${tenant_id}
+    VpnOperations.VPN Create L3VPN
+    ...    vpnid=${VPN_INSTANCE_IDS}[2]
+    ...    name=${VPN_NAMES}[2]
+    ...    rd=${RDS}[2]
+    ...    exportrt=${RDS}[2]
+    ...    importrt=${RDS}[2]
+    ...    tenantid=${tenant_id}
+    ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VPN_INSTANCE_IDS}[0]
     BuiltIn.Should Contain    ${resp}    ${VPN_INSTANCE_IDS}[0]
-    ${resp}=    VpnOperations.VPN Get L3VPN    vpnid=${VPN_INSTANCE_IDS}[1]
+    ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VPN_INSTANCE_IDS}[1]
     BuiltIn.Should Contain    ${resp}    ${VPN_INSTANCE_IDS}[1]
-    ${resp}=    VpnOperations.VPN Get L3VPN    vpnid=${VPN_INSTANCE_IDS}[2]
+    ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VPN_INSTANCE_IDS}[2]
     BuiltIn.Should Contain    ${resp}    ${VPN_INSTANCE_IDS}[2]
 
+
 *** Keywords ***
 Suite Setup
     VpnOperations.Basic Suite Setup
@@ -189,17 +296,37 @@ Suite Setup
     OpenStackOperations.Update Network    ${NETWORKS}[0]    additional_args=--description ${UPDATE_NETWORK}
     ${output} =    OpenStackOperations.Show Network    ${NETWORKS}[0]
     BuiltIn.Should Contain    ${output}    ${UPDATE_NETWORK}
-    ${net1_additional_args}=    BuiltIn.Catenate    --ip-version=6 --ipv6-address-mode=slaac --ipv6-ra-mode=slaac ${NET1_IPV6_ADDR_POOL}
-    ${net2_additional_args}=    BuiltIn.Catenate    --ip-version=6 --ipv6-address-mode=slaac --ipv6-ra-mode=slaac ${NET2_IPV6_ADDR_POOL}
-    OpenStackOperations.Create SubNet    ${NETWORKS}[0]    ${SUBNETS}[0]    ${SUBNET_CIDRS}[0]    ${net1_additional_args}
-    OpenStackOperations.Create SubNet    ${NETWORKS}[1]    ${SUBNETS}[1]    ${SUBNET_CIDRS}[1]    ${net2_additional_args}
-    BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${SUBNETWORK_URL}    ${SUBNETS}
+    ${net1_additional_args} =    BuiltIn.Catenate
+    ...    --ip-version=6 --ipv6-address-mode=slaac --ipv6-ra-mode=slaac ${NET1_IPV6_ADDR_POOL}
+    ${net2_additional_args} =    BuiltIn.Catenate
+    ...    --ip-version=6 --ipv6-address-mode=slaac --ipv6-ra-mode=slaac ${NET2_IPV6_ADDR_POOL}
+    OpenStackOperations.Create SubNet
+    ...    ${NETWORKS}[0]
+    ...    ${SUBNETS}[0]
+    ...    ${SUBNET_CIDRS}[0]
+    ...    ${net1_additional_args}
+    OpenStackOperations.Create SubNet
+    ...    ${NETWORKS}[1]
+    ...    ${SUBNETS}[1]
+    ...    ${SUBNET_CIDRS}[1]
+    ...    ${net2_additional_args}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    3s
+    ...    1s
+    ...    Utils.Check For Elements At URI
+    ...    ${SUBNETWORK_URL}
+    ...    ${SUBNETS}
     OpenStackOperations.Update SubNet    ${SUBNETS}[0]    additional_args=--description ${UPDATE_SUBNET}
     ${output} =    OpenStackOperations.Show SubNet    ${SUBNETS}[0]
     BuiltIn.Should Contain    ${output}    ${UPDATE_SUBNET}
     OpenStackOperations.Create Router    ${ROUTER}
     ${router_list} =    BuiltIn.Create List    ${ROUTER}
-    BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${ROUTER_URL}    ${router_list}
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    3s
+    ...    1s
+    ...    Utils.Check For Elements At URI
+    ...    ${ROUTER_URL}
+    ...    ${router_list}
     FOR    ${interface}    IN    @{SUBNETS}
         OpenStackOperations.Add Router Interface    ${ROUTER}    ${interface}
     END
@@ -212,39 +339,99 @@ Suite Setup
     BuiltIn.Set Suite Variable    ${GWMAC_ADDRS}
     BuiltIn.Set Suite Variable    ${GWIP_ADDRS}
     OpenStackOperations.Create Allow All SecurityGroup    ${SECURITY_GROUP}    IPv6
-    ${allowed_address_pairs_args} =    BuiltIn.Set Variable    --allowed-address ip-address=${EXTRA_NW_SUBNET}[0] --allowed-address ip-address=${EXTRA_NW_SUBNET}[1]
-    Create Port    ${NETWORKS}[0]    ${PORTS}[0]    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args}
-    Create Port    ${NETWORKS}[0]    ${PORTS}[1]    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args}
-    Create Port    ${NETWORKS}[1]    ${PORTS}[2]    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args}
-    Create Port    ${NETWORKS}[1]    ${PORTS}[3]    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args}
+    ${allowed_address_pairs_args} =    BuiltIn.Set Variable
+    ...    --allowed-address ip-address=${EXTRA_NW_SUBNET}[0] --allowed-address ip-address=${EXTRA_NW_SUBNET}[1]
+    Create Port
+    ...    ${NETWORKS}[0]
+    ...    ${PORTS}[0]
+    ...    sg=${SECURITY_GROUP}
+    ...    additional_args=${allowed_address_pairs_args}
+    Create Port
+    ...    ${NETWORKS}[0]
+    ...    ${PORTS}[1]
+    ...    sg=${SECURITY_GROUP}
+    ...    additional_args=${allowed_address_pairs_args}
+    Create Port
+    ...    ${NETWORKS}[1]
+    ...    ${PORTS}[2]
+    ...    sg=${SECURITY_GROUP}
+    ...    additional_args=${allowed_address_pairs_args}
+    Create Port
+    ...    ${NETWORKS}[1]
+    ...    ${PORTS}[3]
+    ...    sg=${SECURITY_GROUP}
+    ...    additional_args=${allowed_address_pairs_args}
     BuiltIn.Wait Until Keyword Succeeds    3s    1s    Check For Elements At URI    ${PORT_URL}    ${PORTS}
     OpenStackOperations.Update Port    ${PORTS}[0]    additional_args=--name ${UPDATE_PORT}
     ${output} =    Show Port    ${UPDATE_PORT}
     BuiltIn.Should Contain    ${output}    ${UPDATE_PORT}
     OpenStackOperations.Update Port    ${UPDATE_PORT}    additional_args=--name ${PORTS}[0]
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS}[0]    ${NET_1_VMS}[0]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS}[1]    ${NET_1_VMS}[1]    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS}[2]    ${NET_2_VMS}[0]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${PORTS}[3]    ${NET_2_VMS}[1]    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
-    ${vms}=    BuiltIn.Create List    @{NET_1_VMS}    @{NET_2_VMS}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${PORTS}[0]
+    ...    ${NET_1_VMS}[0]
+    ...    ${OS_CMP1_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${PORTS}[1]
+    ...    ${NET_1_VMS}[1]
+    ...    ${OS_CMP2_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${PORTS}[2]
+    ...    ${NET_2_VMS}[0]
+    ...    ${OS_CMP1_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node
+    ...    ${PORTS}[3]
+    ...    ${NET_2_VMS}[1]
+    ...    ${OS_CMP2_HOSTNAME}
+    ...    sg=${SECURITY_GROUP}
+    ${vms} =    BuiltIn.Create List    @{NET_1_VMS}    @{NET_2_VMS}
     FOR    ${vm}    IN    @{vms}
         OpenStackOperations.Poll VM Is ACTIVE    ${vm}
     END
     BuiltIn.Wait Until Keyword Succeeds    30s    10s    Wait For Routes To Propogate    ${NETWORKS}    ${SUBNET_CIDRS}
     ${prefix_net10} =    Replace String    ${SUBNET_CIDRS}[0]    ::/64    (:[a-f0-9]{,4}){,4}
-    ${status}    ${message}    Run Keyword And Ignore Error    BuiltIn.Wait Until Keyword Succeeds    3x    60s    OpenStackOperations.Collect VM IPv6 SLAAC Addresses
-    ...    fail_on_none=true    vm_list=${NET_1_VMS}    network=${NETWORKS}[0]    subnet=${prefix_net10}
+    ${status}    ${message} =    Run Keyword And Ignore Error
+    ...    BuiltIn.Wait Until Keyword Succeeds
+    ...    3x
+    ...    60s
+    ...    OpenStackOperations.Collect VM IPv6 SLAAC Addresses
+    ...    fail_on_none=true
+    ...    vm_list=${NET_1_VMS}
+    ...    network=${NETWORKS}[0]
+    ...    subnet=${prefix_net10}
     ${prefix_net20} =    Replace String    ${SUBNET_CIDRS}[1]    ::/64    (:[a-f0-9]{,4}){,4}
-    ${status}    ${message}    Run Keyword And Ignore Error    BuiltIn.Wait Until Keyword Succeeds    3x    60s    OpenStackOperations.Collect VM IPv6 SLAAC Addresses
-    ...    fail_on_none=true    vm_list=${NET_2_VMS}    network=${NETWORKS}[1]    subnet=${prefix_net20}
-    ${VM_IP_NET10} =    OpenStackOperations.Collect VM IPv6 SLAAC Addresses    fail_on_none=false    vm_list=${NET_1_VMS}    network=${NETWORKS}[0]    subnet=${prefix_net10}
-    ${VM_IP_NET20} =    OpenStackOperations.Collect VM IPv6 SLAAC Addresses    fail_on_none=false    vm_list=${NET_2_VMS}    network=${NETWORKS}[1]    subnet=${prefix_net20}
+    ${status}    ${message} =    Run Keyword And Ignore Error
+    ...    BuiltIn.Wait Until Keyword Succeeds
+    ...    3x
+    ...    60s
+    ...    OpenStackOperations.Collect VM IPv6 SLAAC Addresses
+    ...    fail_on_none=true
+    ...    vm_list=${NET_2_VMS}
+    ...    network=${NETWORKS}[1]
+    ...    subnet=${prefix_net20}
+    ${VM_IP_NET10} =    OpenStackOperations.Collect VM IPv6 SLAAC Addresses
+    ...    fail_on_none=false
+    ...    vm_list=${NET_1_VMS}
+    ...    network=${NETWORKS}[0]
+    ...    subnet=${prefix_net10}
+    ${VM_IP_NET20} =    OpenStackOperations.Collect VM IPv6 SLAAC Addresses
+    ...    fail_on_none=false
+    ...    vm_list=${NET_2_VMS}
+    ...    network=${NETWORKS}[1]
+    ...    subnet=${prefix_net20}
     ${VM_INSTANCES} =    Collections.Combine Lists    ${NET_1_VMS}    ${NET_2_VMS}
-    ${VM_IPS}=    Collections.Combine Lists    ${VM_IP_NET10}    ${VM_IP_NET20}
-    ${LOOP_COUNT}    BuiltIn.Get Length    ${NET_1_VMS}
+    ${VM_IPS} =    Collections.Combine Lists    ${VM_IP_NET10}    ${VM_IP_NET20}
+    ${LOOP_COUNT}    BuiltIn.Get Length    ${NET_1_VMS}
     FOR    ${index}    IN RANGE    0    ${LOOP_COUNT}
-        ${status}    ${message}    Run Keyword And Ignore Error    BuiltIn.Should Not Contain    ${VM_IPS}[${index}]    None
-        Run Keyword If    '${status}' == 'FAIL'    OpenStack CLI    openstack console log show ${VM_INSTANCES}[${index}]    30s
+        ${status}    ${message} =    Run Keyword And Ignore Error
+        ...    BuiltIn.Should Not Contain
+        ...    ${VM_IPS}[${index}]
+        ...    None
+        IF    '${status}' == 'FAIL'
+            OpenStack CLI    openstack console log show ${VM_INSTANCES}[${index}]    30s
+        END
     END
     OpenStackOperations.Copy DHCP Files From Control Node
     BuiltIn.Set Suite Variable    ${VM_IP_NET10}
index 443d1503171c4b0f7159c3acafffdbd8c47c13cb..9c20cee0e4473a34aae17e0aa7c319368cb8caea 100644 (file)
@@ -1,31 +1,35 @@
 *** Settings ***
-Documentation     Test suite for OCPPLUGIN
-Suite Setup       Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
-Suite Teardown    Delete All Sessions
-Library           SSHLibrary
-Library           Collections
-Library           RequestsLibrary
-Library           ../../../libraries/Common.py
-Library           ../../../libraries/Topology.py
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/OcpAgentKeywords.robot
-Variables         ../../../variables/Variables.py
-Variables         ../../../variables/ocpplugin/Variables.py
+Documentation       Test suite for OCPPLUGIN
+
+Library             SSHLibrary
+Library             Collections
+Library             RequestsLibrary
+Library             ../../../libraries/Common.py
+Library             ../../../libraries/Topology.py
+Resource            ../../../libraries/Utils.robot
+Resource            ../../../libraries/OcpAgentKeywords.robot
+Variables           ../../../variables/Variables.py
+Variables           ../../../variables/ocpplugin/Variables.py
+
+Suite Setup         Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
+Suite Teardown      Delete All Sessions
 
-*** Variables ***
 
 *** Test Cases ***
 Check if node exist
     [Documentation]    get inventory node
     [Tags]    get node
     OcpAgentKeywords.Install Agent
-    ${mininet_conn_id}=    OcpAgentKeywords.Start Emulator Single
+    ${mininet_conn_id}    OcpAgentKeywords.Start Emulator Single
     ${resp}    Get Request    session    ${NODE_ID}TST-100
     Should Be Equal As Strings    ${resp.status_code}    200
 
 Get param from emulator
     [Documentation]    OCPPLUGIN get param
-    [Tags]    OCPPLUGIN get
-    ${resp}    Post Request    session    ${REST_GET_PARAM}    data={"input":{"nodeId":"ocp:TST-100","objId":"ALL","paramName":"ALL"}}
+    [Tags]    ocpplugin get
+    ${resp}    Post Request
+    ...    session
+    ...    ${REST_GET_PARAM}
+    ...    data={"input":{"nodeId":"ocp:TST-100","objId":"ALL","paramName":"ALL"}}
     Should Be Equal As Strings    ${resp.status_code}    200
     Stop Emulator And Exit    ${mininet_conn_id}
index e02da4a075443792af9a6a1da96abebc61e1eb24..9683ac0ff41c6d1b58ab5e1627218223a9ece4aa 100644 (file)
@@ -1,19 +1,23 @@
 *** Settings ***
-Documentation     Test suite for OCPPLUGIN
-Suite Setup       Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
-Suite Teardown    Delete All Sessions
-Library           SSHLibrary
-Library           Collections
-Library           RequestsLibrary
-Library           ../../../libraries/Common.py
-Library           ../../../libraries/Topology.py
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/OcpAgentKeywords.robot
-Variables         ../../../variables/Variables.py
-Variables         ../../../variables/ocpplugin/Variables.py
+Documentation       Test suite for OCPPLUGIN
+
+Library             SSHLibrary
+Library             Collections
+Library             RequestsLibrary
+Library             ../../../libraries/Common.py
+Library             ../../../libraries/Topology.py
+Resource            ../../../libraries/Utils.robot
+Resource            ../../../libraries/OcpAgentKeywords.robot
+Variables           ../../../variables/Variables.py
+Variables           ../../../variables/ocpplugin/Variables.py
+
+Suite Setup         Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
+Suite Teardown      Delete All Sessions
+
 
 *** Variables ***
-${NODE_AMOUNT}    20
+${NODE_AMOUNT}      20
+
 
 *** Test Cases ***
 Install agent
@@ -26,15 +30,18 @@ Create multiple emulators
     [Tags]    get node
     ${NODE_AMOUNT}=    Convert To Integer    ${NODE_AMOUNT}
     ${mininet_conn_id}=    OcpAgentKeywords.Start Emulator Multiple    number=${NODE_AMOUNT+1}
-    ${resp}    Get Request    session    ${NODE_ID}TST-${NODE_AMOUNT}
+    ${resp}=    Get Request    session    ${NODE_ID}TST-${NODE_AMOUNT}
     Should Be Equal As Strings    ${resp.status_code}    200
 
 Get param from emulators
     [Documentation]    OCPPLUGIN get param
-    [Tags]    OCPPLUGIN get
+    [Tags]    ocpplugin get
     ${NODE_AMOUNT}=    Convert To Integer    ${NODE_AMOUNT}
     FOR    ${NODE_NUM}    IN RANGE    1    ${NODE_AMOUNT+1}
-        ${resp}    Post Request    session    ${REST_GET_PARAM}    data={"input":{"nodeId":"ocp:TST-${NODE_NUM}","objId":"ALL","paramName":"ALL"}}
+        ${resp}=    Post Request
+        ...    session
+        ...    ${REST_GET_PARAM}
+        ...    data={"input":{"nodeId":"ocp:TST-${NODE_NUM}","objId":"ALL","paramName":"ALL"}}
         Should Be Equal As Strings    ${resp.status_code}    200
     END
     Stop Emulator And Exit    ${mininet_conn_id}
index 03957cc8d483a2d0eb7ae2a6cf71da390512ec4e..0151ef361206d887121287e4414f353db5c53e1d 100644 (file)
@@ -1,28 +1,32 @@
 *** Settings ***
-Documentation     This is a suite which has both ODL Micro and Netconf Testtool
-...               execution . suite reports failures if functional error
-...               is detected, or if various time limits expire.
-...               For passing test cases, their duration is the performance metric.
-Library           SSHLibrary    timeout=10s
-Library           RequestsLibrary
-Resource          ${CURDIR}/../../libraries/NexusKeywords.robot
-Resource          ${CURDIR}/../../libraries/NetconfKeywords.robot
-Resource          ${CURDIR}/../../libraries/ODLMicroKeywords.robot
+Documentation       This is a suite which has both ODL Micro and Netconf Testtool
+...                 execution . suite reports failures if functional error
+...                 is detected, or if various time limits expire.
+...                 For passing test cases, their duration is the performance metric.
+
+Library             SSHLibrary    timeout=10s
+Library             RequestsLibrary
+Resource            ${CURDIR}/../../libraries/NexusKeywords.robot
+Resource            ${CURDIR}/../../libraries/NetconfKeywords.robot
+Resource            ${CURDIR}/../../libraries/ODLMicroKeywords.robot
+
 
 *** Variables ***
-${BASE_URL}       https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/odlmicro/micro-netconf
-${ORG_URL}        ${BASE_URL}/${ODL_MICRO_VERSION}/
-${BUNDLE_URL}     ${BASE_URL}
-${ODL_MICRO_WORKSPACE}    /tmp
-${directory_with_template_folders}    ${CURDIR}/../../../variables/netconf/CRUD
-${device_name}    netconf-test-device
-${device_type}    full-uri-device
-${USE_NETCONF_CONNECTOR}    ${False}
-${RESTCONF_PASSWORD}    ${PWD}    # from Variables.robot
-${RESTCONF_REUSE}    True
-${RESTCONF_SCOPE}    ${EMPTY}
-${RESTCONF_USER}    ${USER}    # from Variables.robot
-${TOOLS_SYSTEM_PROMPT}    ${ODL_SYSTEM_PROMPT}
+${BASE_URL}
+...                                     https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/odlmicro/micro-netconf
+${ORG_URL}                              ${BASE_URL}/${ODL_MICRO_VERSION}/
+${BUNDLE_URL}                           ${BASE_URL}
+${ODL_MICRO_WORKSPACE}                  /tmp
+${directory_with_template_folders}      ${CURDIR}/../../../variables/netconf/CRUD
+${device_name}                          netconf-test-device
+${device_type}                          full-uri-device
+${USE_NETCONF_CONNECTOR}                ${False}
+${RESTCONF_PASSWORD}                    ${PWD}    # from Variables.robot
+${RESTCONF_REUSE}                       True
+${RESTCONF_SCOPE}                       ${EMPTY}
+${RESTCONF_USER}                        ${USER}    # from Variables.robot
+${TOOLS_SYSTEM_PROMPT}                  ${ODL_SYSTEM_PROMPT}
+
 
 *** Test Cases ***
 Download and Run ODL Micro
@@ -36,6 +40,7 @@ Download and Run Netconf Testtool
     [Documentation]    Download and Run Netconf Testtool in Tools VM.
     Download Netconf Testtool
 
+
 *** Keywords ***
 Teardown
     Kill process    NetconfMain
index 98b69997f1b58a47ef92b37fae79f219672c35ce..3ffb3f28b814620418f9440ed4eb35c155bf1004 100644 (file)
@@ -1,6 +1,8 @@
 *** Settings ***
-Documentation     Test suite to verify odltools
-Resource          ../../libraries/ODLTools.robot
+Documentation       Test suite to verify odltools
+
+Resource            ../../libraries/ODLTools.robot
+
 
 *** Test Cases ***
 Verify Installation