From beba0109d241e922accbd5c53fb59a89a57b52f9 Mon Sep 17 00:00:00 2001 From: Sam Hague Date: Tue, 24 Jul 2018 17:23:57 -0400 Subject: [PATCH] Update remaining tests for combos - Map all incoming slave ips to internal test ips to match test expectations, i.e. tests expecting to have two computes but there is only one so map the second compute to the first internally - Use OS_ALL_IPS to list all ips instead of explicitly calling each node ip Depends-On: I5e3577f60ba8b176b3c24badf26b6ac73792bc9c JIRA: NETVIRT-1370 Change-Id: I67f03c66cd32d60829e73f8dd3d870e71ee498ea Signed-off-by: Sam Hague --- csit/libraries/DevstackUtils.robot | 11 +++-- csit/libraries/LiveMigration.robot | 14 +++--- csit/libraries/Tempest.robot | 8 ++-- csit/libraries/VpnOperations.robot | 25 +++++++++++ .../aclservicerecovery.robot | 6 +-- csit/suites/netvirt/elan/elan.robot | 30 ++++++------- csit/suites/netvirt/l2l3_gatewaymac_arp.robot | 44 +++++++++---------- .../vnibasedIpv6forwarding.robot | 16 +++++-- .../vnibasedl2switching.robot | 17 ++++--- .../vnibasedl3forwarding.robot | 17 +++++-- .../netvirt/vpnservice/arp_learning.robot | 25 ++++++----- .../suites/netvirt/vpnservice/vpn_basic.robot | 26 +++++------ .../vpn_basic_dualstack_one_router.robot | 16 +++---- .../netvirt/vpnservice/vpn_basic_ipv6.robot | 24 +++++----- csit/suites/openstack/clustering/ha_l2.robot | 18 ++++---- .../connectivity/live_migration.robot | 3 +- .../security_group_l3bcast.robot | 27 +++++++----- 17 files changed, 187 insertions(+), 140 deletions(-) diff --git a/csit/libraries/DevstackUtils.robot b/csit/libraries/DevstackUtils.robot index 4357a26f6b..899ae77117 100644 --- a/csit/libraries/DevstackUtils.robot +++ b/csit/libraries/DevstackUtils.robot @@ -71,6 +71,7 @@ Set Node Data For AllinOne Setup BuiltIn.Set Suite Variable ${OS_CMP1_CONN_ID} ${OS_CNTL_CONN_ID} BuiltIn.Set Suite Variable ${OS_CMP2_CONN_ID} ${OS_CNTL_CONN_ID} BuiltIn.Set Suite Variable @{OS_ALL_CONN_IDS} ${OS_CNTL_CONN_ID} + BuiltIn.Set Suite Variable @{OS_CMP_CONN_IDS} ${OS_CNTL_CONN_ID} Set Node Data For Control And Compute Node Setup [Documentation] Assign global variables for DevStack nodes where the control node is also the compute @@ -81,8 +82,9 @@ Set Node Data For Control And Compute Node Setup BuiltIn.Set Suite Variable ${OS_CMP1_CONN_ID} ${OS_CNTL_CONN_ID} DevstackUtils.Open Connection OS_CMP2_CONN_ID ${OS_COMPUTE_1_IP} BuiltIn.Set Suite Variable @{OS_ALL_CONN_IDS} ${OS_CNTL_CONN_ID} ${OS_CMP2_CONN_ID} + BuiltIn.Set Suite Variable @{OS_CMP_CONN_IDS} ${OS_CNTL_CONN_ID} ${OS_CMP2_CONN_ID} -Set Node Data For Control Only Node Setup +Set Node Data For Control And Two Compute Node Setup [Documentation] Assign global variables for DevStack nodes where the control node is different than the compute BuiltIn.Set Suite Variable ${OS_CMP1_IP} ${OS_COMPUTE_1_IP} BuiltIn.Set Suite Variable ${OS_CMP2_IP} ${OS_COMPUTE_2_IP} @@ -91,13 +93,14 @@ Set Node Data For Control Only Node Setup DevstackUtils.Open Connection OS_CMP1_CONN_ID ${OS_COMPUTE_1_IP} DevstackUtils.Open Connection OS_CMP2_CONN_ID ${OS_COMPUTE_2_IP} BuiltIn.Set Suite Variable @{OS_ALL_CONN_IDS} ${OS_CNTL_CONN_ID} ${OS_CMP1_CONN_ID} ${OS_CMP2_CONN_ID} + BuiltIn.Set Suite Variable @{OS_CMP_CONN_IDS} ${OS_CMP1_CONN_ID} ${OS_CMP2_CONN_ID} Get DevStack Nodes Data [Documentation] Assign global variables for DevStack nodes BuiltIn.Set Suite Variable ${OS_CNTL_IP} ${OS_CONTROL_NODE_IP} DevstackUtils.Open Connection OS_CNTL_CONN_ID ${OS_CNTL_IP} - BuiltIn.Run Keyword If ${NUM_OS_SYSTEM} == 1 DevstackUtils.Set Node Data For AllinOne Setup - ... ELSE IF ${NUM_OS_SYSTEM} == 2 DevstackUtils.Set Node Data For Control And Compute Node Setup - ... ELSE IF ${NUM_OS_SYSTEM} == 3 DevstackUtils.Set Node Data For Control Only Node Setup + BuiltIn.Run Keyword If "${OS_DEPLOY}" == "1cmb-0ctl-0cmp" DevstackUtils.Set Node Data For AllinOne Setup + ... ELSE IF "${OS_DEPLOY}" == "1cmb-0ctl-1cmp" DevstackUtils.Set Node Data For Control And Compute Node Setup + ... ELSE IF "${OS_DEPLOY}" == "0cmb-1ctl-2cmp" DevstackUtils.Set Node Data For Control And Two Compute Node Setup DevstackUtils.Get DevStack Hostnames DevstackUtils.Log Devstack Nodes Data diff --git a/csit/libraries/LiveMigration.robot b/csit/libraries/LiveMigration.robot index 7d295f0417..d080b56194 100644 --- a/csit/libraries/LiveMigration.robot +++ b/csit/libraries/LiveMigration.robot @@ -24,14 +24,12 @@ Live Migration Suite Teardown Setup Live Migration In Compute Nodes [Documentation] Set instances to be created in the shared directory. - OpenStackOperations.Modify OpenStack Configuration File ${OS_CMP1_CONN_ID} ${NOVA_CPU_CONF} DEFAULT instances_path ${CMP_INSTANCES_SHARED_PATH} - OpenStackOperations.Modify OpenStack Configuration File ${OS_CMP2_CONN_ID} ${NOVA_CPU_CONF} DEFAULT instances_path ${CMP_INSTANCES_SHARED_PATH} - OpenStackOperations.Restart DevStack Service ${OS_CMP1_CONN_ID} ${NOVA_COMPUTE_SERVICE} - OpenStackOperations.Restart DevStack Service ${OS_CMP2_CONN_ID} ${NOVA_COMPUTE_SERVICE} + : FOR ${conn_id} IN @{OS_CMP_CONN_IDS} + \ OpenStackOperations.Modify OpenStack Configuration File ${conn_id} ${NOVA_CPU_CONF} DEFAULT instances_path ${CMP_INSTANCES_SHARED_PATH} + \ OpenStackOperations.Restart DevStack Service ${conn_id} ${NOVA_COMPUTE_SERVICE} UnSet Live Migration In Compute Nodes [Documentation] Clear settings done for Live Migration - OpenStackOperations.Modify OpenStack Configuration File ${OS_CMP1_CONN_ID} ${NOVA_CPU_CONF} DEFAULT instances_path ${CMP_INSTANCES_DEFAULT_PATH} - OpenStackOperations.Modify OpenStack Configuration File ${OS_CMP2_CONN_ID} ${NOVA_CPU_CONF} DEFAULT instances_path ${CMP_INSTANCES_DEFAULT_PATH} - OpenStackOperations.Restart DevStack Service ${OS_CMP1_CONN_ID} ${NOVA_COMPUTE_SERVICE} - OpenStackOperations.Restart DevStack Service ${OS_CMP2_CONN_ID} ${NOVA_COMPUTE_SERVICE} + : FOR ${conn_id} IN @{OS_CMP_CONN_IDS} + \ OpenStackOperations.Modify OpenStack Configuration File ${conn_id} ${NOVA_CPU_CONF} DEFAULT instances_path ${CMP_INSTANCES_DEFAULT_PATH} + \ OpenStackOperations.Restart DevStack Service ${conn_id} ${NOVA_COMPUTE_SERVICE} diff --git a/csit/libraries/Tempest.robot b/csit/libraries/Tempest.robot index 0bef8a653b..81958125cd 100644 --- a/csit/libraries/Tempest.robot +++ b/csit/libraries/Tempest.robot @@ -36,7 +36,7 @@ Run Tempest Tests Without Debug BuiltIn.Return From Keyword If "skip_if_${OPENSTACK_BRANCH}" in @{TEST_TAGS} BuiltIn.Return From Keyword If "skip_if_${SECURITY_GROUP_MODE}" in @{TEST_TAGS} BuiltIn.Return From Keyword If "skip_if_${ODL_SNAT_MODE}" in @{TEST_TAGS} - ${tempest_conn_id} = SSHLibrary.Open Connection ${OS_CONTROL_NODE_IP} prompt=${DEFAULT_LINUX_PROMPT_STRICT} + ${tempest_conn_id} = SSHLibrary.Open Connection ${OS_CNTL_IP} prompt=${DEFAULT_LINUX_PROMPT_STRICT} SSHKeywords.Flexible SSH Login ${OS_USER} ${DEVSTACK_SYSTEM_PASSWORD} DevstackUtils.Write Commands Until Prompt source ${DEVSTACK_DEPLOY_PATH}/openrc admin admin DevstackUtils.Write Commands Until Prompt cd ${TEMPEST_DIRectory} @@ -59,7 +59,7 @@ Run Tempest Tests With Debug BuiltIn.Return From Keyword If "skip_if_${OPENSTACK_BRANCH}" in @{TEST_TAGS} BuiltIn.Return From Keyword If "skip_if_${SECURITY_GROUP_MODE}" in @{TEST_TAGS} BuiltIn.Return From Keyword If "skip_if_${ODL_SNAT_MODE}" in @{TEST_TAGS} - ${tempest_conn_id} = SSHLibrary.Open Connection ${OS_CONTROL_NODE_IP} prompt=${DEFAULT_LINUX_PROMPT_STRICT} + ${tempest_conn_id} = SSHLibrary.Open Connection ${OS_CNTL_IP} prompt=${DEFAULT_LINUX_PROMPT_STRICT} SSHKeywords.Flexible SSH Login ${OS_USER} ${DEVSTACK_SYSTEM_PASSWORD} DevstackUtils.Write Commands Until Prompt source ${DEVSTACK_DEPLOY_PATH}/openrc admin admin DevstackUtils.Write Commands Until Prompt cd ${TEMPEST_DIRectory} @@ -91,7 +91,7 @@ Log In To Tempest Executor And Setup Test Environment OpenStackOperations.Create Network ${EXTERNAL_NET_NAME} --external --default --provider-network-type flat --provider-physical-network ${PUBLIC_PHYSICAL_NETWORK} OpenStackOperations.Create Subnet ${EXTERNAL_NET_NAME} ${EXTERNAL_SUBNET_NAME} ${EXTERNAL_SUBNET} --gateway ${EXTERNAL_GATEWAY} --allocation-pool ${EXTERNAL_SUBNET_ALLOCATION_POOL} OpenStackOperations.List Networks - ${control_node_conn_id} = SSHLibrary.Open Connection ${OS_CONTROL_NODE_IP} prompt=${DEFAULT_LINUX_PROMPT_STRICT} + ${control_node_conn_id} = SSHLibrary.Open Connection ${OS_CNTL_IP} prompt=${DEFAULT_LINUX_PROMPT_STRICT} SSHKeywords.Flexible SSH Login ${OS_USER} DevstackUtils.Write Commands Until Prompt And Log sudo pip install -U --verbose pip timeout=120s DevstackUtils.Write Commands Until Prompt And Log sudo pip install -U --verbose os-testr>=1.0.0 timeout=120s @@ -134,4 +134,4 @@ Create Blacklist File : FOR ${exclusion} IN @{${OPENSTACK_BRANCH}_EXCLUSION_REGEXES} \ OperatingSystem.Append To File ${BLACKLIST_FILE} ${exclusion}\n OperatingSystem.Log File ${BLACKLIST_FILE} - SSHKeywords.Copy File To Remote System ${OS_CONTROL_NODE_IP} ${BLACKLIST_FILE} ${BLACKLIST_FILE} + SSHKeywords.Copy File To Remote System ${OS_CNTL_IP} ${BLACKLIST_FILE} ${BLACKLIST_FILE} diff --git a/csit/libraries/VpnOperations.robot b/csit/libraries/VpnOperations.robot index 6d1c72308c..c6c7aa9e3e 100644 --- a/csit/libraries/VpnOperations.robot +++ b/csit/libraries/VpnOperations.robot @@ -136,6 +136,12 @@ Verify Flows Are Present For L3VPN : FOR ${i} IN @{vm_ips} \ ${resp}= Should Contain ${l3vpn_table} ${i} +Verify Flows Are Present For L3VPN On All Compute Nodes + [Arguments] ${vm_ips} + [Documentation] Verify Flows Are Present For L3VPN On All Compute Nodes + : FOR ${ip} IN @{OS_CMP_IPS} + \ BuiltIn.Wait Until Keyword Succeeds 30s 10s VpnOperations.Verify Flows Are Present For L3VPN ${ip} ${vm_ips} + Verify GWMAC Entry On ODL [Arguments] ${GWMAC_ADDRS} [Documentation] get ODL GWMAC table entry @@ -156,6 +162,11 @@ Verify GWMAC Flow Entry Removed From Flow Table : FOR ${macAdd} IN @{GWMAC_ADDRS} \ Should Not Contain ${gwmac_table} dl_dst=${macAdd} actions=goto_table:${L3_TABLE} +Verify GWMAC Flow Entry Removed From Flow Table On All Compute Nodes + [Documentation] Verify the GWMAC Table, ARP Response table and Dispatcher table. + : FOR ${ip} IN @{OS_CMP_IPS} + \ BuiltIn.Wait Until Keyword Succeeds 30s 10s Verify GWMAC Flow Entry Removed From Flow Table ${ip} + Verify ARP REQUEST in groupTable [Arguments] ${group_output} ${Group-ID} [Documentation] get flow dump for group ID @@ -264,8 +275,22 @@ Verify GWMAC Flow Entry On Flow Table BuiltIn.Run Keyword If '${ipv}' == 'ipv4' Verify IPv4 GWMAC Flow Entry On Flow Table ${group_output} ${group_id} ${flow_output} ... ELSE Verify IPv6 GWMAC Flow Entry On Flow Table ${flow_output} +Verify GWMAC Flow Entry On Flow Table On All Compute Nodes + [Arguments] ${ipv}=ipv4 + [Documentation] Verify the GWMAC Table, ARP Response table and Dispatcher table. + : FOR ${ip} IN @{OS_CMP_IPS} + \ BuiltIn.Wait Until Keyword Succeeds 30s 10s VpnOperations.Verify GWMAC Flow Entry On Flow Table ${ip} ${ipv} + Delete Multiple L3VPNs [Arguments] @{vpns} [Documentation] Delete three L3VPNs created using Multiple L3VPN Test : FOR ${vpn} IN ${vpns} \ VPN Delete L3VPN vpnid=${vpn} + +VNI Test Setup + BuiltIn.Return From Keyword If "${OS_DEPLOY}" == "1cmb-0ctl-0cmp" + SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing + +VNI Test Teardown + BuiltIn.Return From Keyword If "${OS_DEPLOY}" == "1cmb-0ctl-0cmp" + OpenStackOperations.Get Test Teardown Debugs diff --git a/csit/suites/netvirt/aclservicerecovery/aclservicerecovery.robot b/csit/suites/netvirt/aclservicerecovery/aclservicerecovery.robot index 4624808130..305afa669b 100644 --- a/csit/suites/netvirt/aclservicerecovery/aclservicerecovery.robot +++ b/csit/suites/netvirt/aclservicerecovery/aclservicerecovery.robot @@ -39,7 +39,7 @@ ${TEST_LOG_LEVEL} trace 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_COMPUTE_1_IP} + ${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} Should Be Equal As Strings ${resp.status_code} 200 Wait Until Keyword Succeeds 30s 5s Verify ACL Flows Should Not Contain ${OS_CMP1_CONN_ID} ${INGRESS_ACL_REMOTE_ACL_TABLE} @@ -50,7 +50,7 @@ ACL Service Recovery CLI 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_COMPUTE_1_IP} + ${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 Verify ACL Flows Should Not Contain ${OS_CMP1_CONN_ID} ${EGRESS_LEARN_ACL_FILTER_TABLE} icmp ${output} = OpenStack CLI openstack security group show ${acl_sr_security_group} | awk '/ id / {print $4}' @@ -67,7 +67,7 @@ ACL Interface Recovery CLI @{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_COMPUTE_1_IP} + ${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} Wait Until Keyword Succeeds 30s 5s Verify ACL Flows Should Not Contain ${OS_CMP1_CONN_ID} ${EGRESS_ACL_TABLE} ${port_mac} ${output} = OpenStack CLI openstack port show ${acl_sr_net_1_ports[0]} |awk '/ id / {print$4}' diff --git a/csit/suites/netvirt/elan/elan.robot b/csit/suites/netvirt/elan/elan.robot index ea7c252564..e9c4e0558e 100644 --- a/csit/suites/netvirt/elan/elan.robot +++ b/csit/suites/netvirt/elan/elan.robot @@ -51,8 +51,8 @@ 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_COMPUTE_1_IP} ${smac_cn1} ${NET_1_MACS} - BuiltIn.Wait Until Keyword Succeeds 30s 10s Verify Flows Are Present For ELAN Service ${OS_COMPUTE_2_IP} ${smac_cn2} ${NET_1_MACS} + 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] @@ -60,14 +60,14 @@ Verify Datapath for Single ELAN with Multiple DPN Verify Datapath After OVS Restart [Documentation] Verify datapath after OVS restart - OVSDB.Restart OVSDB ${OS_COMPUTE_1_IP} - OVSDB.Restart OVSDB ${OS_COMPUTE_2_IP} - BuiltIn.Wait Until Keyword Succeeds 30s 10s OVSDB.Verify OVS Reports Connected tools_system=${OS_COMPUTE_1_IP} - BuiltIn.Wait Until Keyword Succeeds 30s 10s OVSDB.Verify OVS Reports Connected tools_system=${OS_COMPUTE_2_IP} + : FOR ${ip} IN @{OS_CMP_IPS} + \ OVSDB.Restart OVSDB ${ip} + : FOR ${ip} IN @{OS_CMP_IPS} + \ BuiltIn.Wait Until Keyword Succeeds 30s 10s OVSDB.Verify OVS Reports Connected tools_system=${ip} ${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_COMPUTE_1_IP} ${smac_cn1} ${NET_1_MACS} - BuiltIn.Wait Until Keyword Succeeds 60s 10s Verify Flows Are Present For ELAN Service ${OS_COMPUTE_2_IP} ${smac_cn2} ${NET_1_MACS} + 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] @@ -77,14 +77,14 @@ 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_COMPUTE_1_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} @{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_COMPUTE_1_IP} ${smac_cn1} ${NET_1_MACS} + 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] @@ -94,8 +94,8 @@ Delete All elan_net_1 VM And Verify Flow Table Updated [Documentation] Verify Flow table after all VM instance deleted : FOR ${vm} IN @{NET_1_VMS} \ OpenStackOperations.Delete Vm Instance ${vm} - BuiltIn.Wait Until Keyword Succeeds 30s 10s Verify Flows Are Removed For ELAN Service ${OS_COMPUTE_1_IP} ${NET_1_MACS} - BuiltIn.Wait Until Keyword Succeeds 30s 10s Verify Flows Are Removed For ELAN Service ${OS_COMPUTE_2_IP} ${NET_1_MACS} + BuiltIn.Wait Until Keyword Succeeds 30s 10s Verify Flows Are Removed For ELAN Service ${OS_CMP1_IP} ${NET_1_MACS} + BuiltIn.Wait Until Keyword Succeeds 30s 10s Verify Flows Are Removed For ELAN Service ${OS_CMP2_IP} ${NET_1_MACS} Verify Datapath for Multiple ELAN with Multiple DPN [Documentation] Verify Flow Table and Data path for Multiple ELAN with Multiple DPN @@ -104,8 +104,8 @@ 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_COMPUTE_1_IP} ${smac_cn1} ${MAC_LIST} - BuiltIn.Wait Until Keyword Succeeds 30s 10s Verify Flows Are Present For ELAN Service ${OS_COMPUTE_2_IP} ${smac_cn2} ${MAC_LIST} + 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]} @@ -117,7 +117,7 @@ Verify Datapath for Multiple ELAN with Multiple DPN @{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_COMPUTE_1_IP} ${smac_cn1} ${MAC_LIST} + 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} [Teardown] BuiltIn.Run Keywords OpenStackOperations.Get Test Teardown Debugs diff --git a/csit/suites/netvirt/l2l3_gatewaymac_arp.robot b/csit/suites/netvirt/l2l3_gatewaymac_arp.robot index 4234e957b4..a6329f08b9 100644 --- a/csit/suites/netvirt/l2l3_gatewaymac_arp.robot +++ b/csit/suites/netvirt/l2l3_gatewaymac_arp.robot @@ -54,22 +54,22 @@ ${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_COMPUTE_1_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 ${subport_id_1} = OpenStackOperations.Get Sub Port Id ${PORT_LIST[0]} ${subport_id_2} = OpenStackOperations.Get Sub Port Id ${PORT_LIST[1]} - ${port_num_1} = OVSDB.Get Port Number ${subport_id_1} ${OS_COMPUTE_1_IP} - ${port_num_2} = OVSDB.Get Port Number ${subport_id_2} ${OS_COMPUTE_1_IP} - OVSDB.Verify Dump Flows For Specific Table ${OS_COMPUTE_1_IP} ${TABLE_NO_0} True ${EMPTY} in_port=${port_num_1} goto_table:${DISPATCHER_TABLE} - ${metadata} = OVSDB.Get Port Metadata ${OS_COMPUTE_1_IP} ${port_num_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} + ${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_COMPUTE_1_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_COMPUTE_1_IP} ${ARP_RESPONSE_TABLE} True ${EMPTY} set_field:${gw_mac_addr} resubmit(,220) - OVSDB.Verify Dump Flows For Specific Table ${OS_COMPUTE_1_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,39 +78,39 @@ 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_COMPUTE_1_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_COMPUTE_1_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_COMPUTE_1_IP} ${INTEGRATION_BRIDGE} table=${GWMAC_TABLE} | grep dl_dst=${gw_mac_addr_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_COMPUTE_1_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_COMPUTE_2_IP} ${INTEGRATION_BRIDGE} table=${GWMAC_TABLE} | grep dl_dst=${gw_mac_addr_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_COMPUTE_2_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_COMPUTE_1_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_COMPUTE_1_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_COMPUTE_1_IP} ${GWMAC_TABLE} True + 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,7 +119,7 @@ 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_COMPUTE_1_IP} ${GWMAC_TABLE} True + 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]} @@ -198,12 +198,12 @@ Add Interfaces To Routers 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_COMPUTE_1_IP} ${DUMP_FLOWS} | grep table=${GWMAC_TABLE} + ${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_COMPUTE_1_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_COMPUTE_1_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_COMPUTE_1_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) diff --git a/csit/suites/netvirt/vnibasedIpv6forwarding/vnibasedIpv6forwarding.robot b/csit/suites/netvirt/vnibasedIpv6forwarding/vnibasedIpv6forwarding.robot index 5e94426486..85512d36fb 100644 --- a/csit/suites/netvirt/vnibasedIpv6forwarding/vnibasedIpv6forwarding.robot +++ b/csit/suites/netvirt/vnibasedIpv6forwarding/vnibasedIpv6forwarding.robot @@ -9,10 +9,9 @@ Documentation Test Suite for vni-based-l2-l3-nat: ... wire and instead, replaces them with VNIs supplied by the ... tenant’s OpenStack. Suite Setup Start Suite -Suite Teardown OpenStackOperations.OpenStack Suite Teardown -Test Setup Run Keywords OpenStackOperations.Get DumpFlows And Ovsconfig ${OS_CMP1_CONN_ID} -... AND OpenStackOperations.Get DumpFlows And Ovsconfig ${OS_CMP2_CONN_ID} -Test Teardown OpenStackOperations.Get Test Teardown Debugs +Suite Teardown Stop Suite +Test Setup VpnOperations.VNI Test Setup +Test Teardown VpnOperations.VNI Test Teardown Library OperatingSystem Library RequestsLibrary Library String @@ -55,12 +54,14 @@ ${NET3_ADDITIONAL_ARGS} --ip-version=6 --ipv6-address-mode=slaac --ipv6-ra-mo *** 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 "${OS_DEPLOY}" == "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} 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 ... With Router associated to a BGPVPN. + BuiltIn.Pass Execution If "${OS_DEPLOY}" == "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} @@ -76,6 +77,7 @@ VNI Based IPv6 Forwarding With BGPVPN Router Association 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 ... With Two Routers each associated to a BGPVPN and The Two BGPVPN is connected with irt and ert. + BuiltIn.Pass Execution If "${OS_DEPLOY}" == "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} @@ -131,6 +133,7 @@ VNI Based IPv6 Forwarding With Two Routers And BGPVPN With Irt Ert Start Suite [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 "${OS_DEPLOY}" == "1cmb-0ctl-0cmp" VpnOperations.Basic Suite Setup OpenStackOperations.Create Allow All SecurityGroup ${VNI6_SECURITY_GROUP} IPv6 OpenStackOperations.Create Network @{VNI6_NETWORKS}[0] @@ -171,3 +174,8 @@ Start Suite BuiltIn.Set Suite Variable ${VM_IP_NET1} BuiltIn.Should Not Contain ${VM_IP_NET0} None BuiltIn.Should Not Contain ${VM_IP_NET1} None + Get OvsDebugInfo + +Stop Suite + BuiltIn.Return From Keyword If "${OS_DEPLOY}" == "1cmb-0ctl-0cmp" + OpenStackOperations.OpenStack Suite Teardown diff --git a/csit/suites/netvirt/vnibasedl2switching/vnibasedl2switching.robot b/csit/suites/netvirt/vnibasedl2switching/vnibasedl2switching.robot index 5494e4d968..3bb379b324 100644 --- a/csit/suites/netvirt/vnibasedl2switching/vnibasedl2switching.robot +++ b/csit/suites/netvirt/vnibasedl2switching/vnibasedl2switching.robot @@ -9,10 +9,9 @@ Documentation Test Suite for vni-based-l2-l3-nat: ... wire and instead, replaces them with VNIs supplied by the ... tenant’s OpenStack. Suite Setup Start Suite -Suite Teardown OpenStackOperations.OpenStack Suite Teardown -Test Setup Run Keywords OpenStackOperations.Get DumpFlows And Ovsconfig ${OS_CMP1_CONN_ID} -... AND OpenStackOperations.Get DumpFlows And Ovsconfig ${OS_CMP2_CONN_ID} -Test Teardown OpenStackOperations.Get Test Teardown Debugs +Suite Teardown Stop Suite +Test Setup VpnOperations.VNI Test Setup +Test Teardown VpnOperations.VNI Test Teardown Library OperatingSystem Library RequestsLibrary Library String @@ -23,6 +22,7 @@ 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 @@ -39,6 +39,7 @@ ${VNI_SECURITY_GROUP} vni_l2_sg *** Test Cases *** VNI Based L2 Switching [Documentation] verify VNI id for L2 Unicast frames exchanged over OVS datapaths that are on different hypervisors + BuiltIn.Pass Execution If "${OS_DEPLOY}" == "1cmb-0ctl-0cmp" "Test is not supported for combo node" ${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] @@ -73,7 +74,8 @@ VNI Based L2 Switching *** Keywords *** Start Suite [Documentation] Create Basic setup for the feature. Creates single network, subnet, two ports and two VMs. - OpenStackOperations.OpenStack Suite Setup + BuiltIn.Return From Keyword If "${OS_DEPLOY}" == "1cmb-0ctl-0cmp" + 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] @@ -86,3 +88,8 @@ Start Suite BuiltIn.Set Suite Variable @{VNI_NET_1_VM_IPS} BuiltIn.Should Not Contain ${VNI_NET_1_VM_IPS} None BuiltIn.Should Not Contain ${vni_net_1_dhcp_ip} None + Get OvsDebugInfo + +Stop Suite + BuiltIn.Return From Keyword If "${OS_DEPLOY}" == "1cmb-0ctl-0cmp" + OpenStackOperations.OpenStack Suite Teardown diff --git a/csit/suites/netvirt/vnibasedl3forwarding/vnibasedl3forwarding.robot b/csit/suites/netvirt/vnibasedl3forwarding/vnibasedl3forwarding.robot index 16628bdd20..d62af48860 100644 --- a/csit/suites/netvirt/vnibasedl3forwarding/vnibasedl3forwarding.robot +++ b/csit/suites/netvirt/vnibasedl3forwarding/vnibasedl3forwarding.robot @@ -9,10 +9,9 @@ Documentation Test Suite for vni-based-l2-l3-nat: ... wire and instead, replaces them with VNIs supplied by the ... tenant’s OpenStack. Suite Setup Start Suite -Suite Teardown OpenStackOperations.OpenStack Suite Teardown -Test Setup Run Keywords OpenStackOperations.Get DumpFlows And Ovsconfig ${OS_CMP1_CONN_ID} -... AND OpenStackOperations.Get DumpFlows And Ovsconfig ${OS_CMP2_CONN_ID} -Test Teardown OpenStackOperations.Get Test Teardown Debugs +Suite Teardown Stop Suite +Test Setup VpnOperations.VNI Test Setup +Test Teardown VpnOperations.VNI Test Teardown Library OperatingSystem Library RequestsLibrary Library String @@ -56,12 +55,14 @@ ${VNI_SECURITY_GROUP} vni_sg *** 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 "${OS_DEPLOY}" == "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} 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 ... With Router associated to a BGPVPN. + BuiltIn.Pass Execution If "${OS_DEPLOY}" == "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} @@ -77,6 +78,7 @@ VNI Based L3 Forwarding With BGPVPN Router Association 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 ... With Networks associated to a BGPVPN. + BuiltIn.Pass Execution If "${OS_DEPLOY}" == "1cmb-0ctl-0cmp" "Test is not supported for combo node" OpenStackOperations.Create Network @{VNI_NETWORKS}[2] OpenStackOperations.Create Network @{VNI_NETWORKS}[3] OpenStackOperations.Create SubNet @{VNI_NETWORKS}[2] @{VNI_SUBNETS}[2] @{VNI_SUBNET_CIDRS}[2] @@ -113,6 +115,7 @@ VNI Based L3 Forwarding With BGPVPN Network Association 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 ... With two Networks associated to two BGPVPN. + BuiltIn.Pass Execution If "${OS_DEPLOY}" == "1cmb-0ctl-0cmp" "Test is not supported for combo node" OpenStackOperations.Create Network @{VNI_NETWORKS}[4] OpenStackOperations.Create Network @{VNI_NETWORKS}[5] OpenStackOperations.Create SubNet @{VNI_NETWORKS}[4] @{VNI_SUBNETS}[4] @{VNI_SUBNET_CIDRS}[4] @@ -154,6 +157,7 @@ VNI Based L3 Forwarding With BGPVPN With Irt Ert Start Suite [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 "${OS_DEPLOY}" == "1cmb-0ctl-0cmp" VpnOperations.Basic Suite Setup OpenStackOperations.Create Allow All SecurityGroup ${VNI_SECURITY_GROUP} OpenStackOperations.Create Network @{VNI_NETWORKS}[0] @@ -180,3 +184,8 @@ Start Suite BuiltIn.Should Not Contain ${NET_1_VM_IPS} None BuiltIn.Should Not Contain ${NET_0_DHCP_IP} None BuiltIn.Should Not Contain ${NET_1_DHCP_IP} None + Get OvsDebugInfo + +Stop Suite + BuiltIn.Return From Keyword If "${OS_DEPLOY}" == "1cmb-0ctl-0cmp" + OpenStackOperations.OpenStack Suite Teardown diff --git a/csit/suites/netvirt/vpnservice/arp_learning.robot b/csit/suites/netvirt/vpnservice/arp_learning.robot index e133c87e3b..ee84566c16 100644 --- a/csit/suites/netvirt/vpnservice/arp_learning.robot +++ b/csit/suites/netvirt/vpnservice/arp_learning.robot @@ -115,13 +115,13 @@ Verify Setup Verify GARP Requests [Documentation] Verify that GARP request are sent to controller + BuiltIn.Pass Execution If "${OS_DEPLOY}" == "1cmb-0ctl-0cmp" "Test is not supported for combo node" BuiltIn.Set Test Variable ${fib_entry_1} @{NET_1_VM_IPS}[0] BuiltIn.Set Test Variable ${fib_entry_3} @{NET_1_VM_IPS}[1] - BuiltIn.Wait Until Keyword Succeeds 10s 2s Verify Flows Are Present ${OS_COMPUTE_1_IP} - BuiltIn.Wait Until Keyword Succeeds 10s 2s Verify Flows Are Present ${OS_COMPUTE_2_IP} + Verify Flows Are Present On All Compute Nodes ${output} = VpnOperations.Get Fib Entries session - ${resp} = BuiltIn.Should Match Regexp ${output} destPrefix\\":\\"${fib_entry_3}\/32".*"${OS_COMPUTE_2_IP}\\" - ${resp} = BuiltIn.Should Match Regexp ${output} destPrefix\\":\\"${fib_entry_1}\/32".*"${OS_COMPUTE_1_IP}\\" + ${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 @@ -135,17 +135,17 @@ Verify GARP Requests ${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} - BuiltIn.Wait Until Keyword Succeeds 30s 10s Verify Flows Are Present ${OS_COMPUTE_1_IP} - BuiltIn.Wait Until Keyword Succeeds 30s 10s Verify Flows Are Present ${OS_COMPUTE_2_IP} + Verify Flows Are Present On All Compute Nodes BuiltIn.Wait Until Keyword Succeeds 5s 1s Verify Learnt IP ${FIB_ENTRY_2} session ${output} = VpnOperations.Get Fib Entries session - ${resp} = BuiltIn.Should Match Regexp ${output} destPrefix\\":\\"${fib_entry_3}\\/32".*"${OS_COMPUTE_2_IP}\\" - ${resp} = BuiltIn.Should Match Regexp ${output} destPrefix\\":\\"${fib_entry_1}\\/32".*"${OS_COMPUTE_1_IP}\\" - ${resp} = BuiltIn.Should Match Regexp ${output} destPrefix\\":\\"${FIB_ENTRY_2}\\/32".*"${OS_COMPUTE_2_IP}\\" + ${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}\\" + ${resp} = BuiltIn.Should Match Regexp ${output} destPrefix\\":\\"${FIB_ENTRY_2}\\/32".*"${OS_CMP2_IP}\\" Verify Ping To Sub Interface ${FIB_ENTRY_2} Verify MIP Migration [Documentation] Verify that after migration of movable ip across compute nodes, the controller updates the routes + BuiltIn.Pass Execution If "${OS_DEPLOY}" == "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 @@ -161,7 +161,7 @@ Verify MIP Migration 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_COMPUTE_1_IP}\\" + ${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} @@ -243,6 +243,11 @@ Verify Flows Are Present : FOR ${ip} IN @{vm_ips} \ ${resp} = Should Match regexp ${flow_output} table=21.*nw_dst=${ip} +Verify Flows Are Present On All Compute Nodes + [Documentation] Verify Flows Are Present On All Compute Nodes + : FOR ${ip} IN @{OS_CMP_IPS} + \ BuiltIn.Wait Until Keyword Succeeds 10s 2s Verify Flows Are Present ${ip} + Verify Ping To Sub Interface [Arguments] ${sub_interface_ip} [Documentation] Verify ping to the sub-interface diff --git a/csit/suites/netvirt/vpnservice/vpn_basic.robot b/csit/suites/netvirt/vpnservice/vpn_basic.robot index 8c7f9e84f9..4e1c11457a 100644 --- a/csit/suites/netvirt/vpnservice/vpn_basic.robot +++ b/csit/suites/netvirt/vpnservice/vpn_basic.robot @@ -112,14 +112,12 @@ 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_CONTROL_NODE_IP} ${OS_COMPUTE_1_IP} ${OS_COMPUTE_2_IP} + @{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 VpnOperations.Verify Flows Are Present For L3VPN ${OS_COMPUTE_1_IP} ${vm_ips} - BuiltIn.Wait Until Keyword Succeeds 30s 10s VpnOperations.Verify Flows Are Present For L3VPN ${OS_COMPUTE_2_IP} ${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} - BuiltIn.Wait Until Keyword Succeeds 30s 10s VpnOperations.Verify GWMAC Flow Entry On Flow Table ${OS_COMPUTE_1_IP} - BuiltIn.Wait Until Keyword Succeeds 30s 10s VpnOperations.Verify GWMAC Flow Entry On Flow Table ${OS_COMPUTE_2_IP} + Verify GWMAC Flow Entry On Flow Table On All Compute Nodes ${dst_ip_list} = BuiltIn.Create List @{NET_1_VM_IPS}[1] @{NET_2_VM_IPS} OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[0] @{NET_1_VM_IPS}[0] ${dst_ip_list} ${dst_ip_list} = BuiltIn.Create List @{NET_2_VM_IPS}[1] @{NET_1_VM_IPS} @@ -180,15 +178,13 @@ Associate L3VPN To Routers BuiltIn.Should Contain ${resp} ${router_id} Verify L3VPN Datapath With Router Association - ${vm_instances} = BuiltIn.Create List @{NET_1_VM_IPS} @{NET_2_VM_IPS} - BuiltIn.Wait Until Keyword Succeeds 30s 10s Utils.Check For Elements At URI ${VPN_IFACES_URL} ${vm_instances} + ${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 ${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_instances} - BuiltIn.Wait Until Keyword Succeeds 60s 15s VpnOperations.Verify Flows Are Present For L3VPN ${OS_COMPUTE_1_IP} ${vm_instances} - BuiltIn.Wait Until Keyword Succeeds 60s 15s VpnOperations.Verify Flows Are Present For L3VPN ${OS_COMPUTE_2_IP} ${vm_instances} + 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} - BuiltIn.Wait Until Keyword Succeeds 30s 15s VpnOperations.Verify GWMAC Flow Entry On Flow Table ${OS_COMPUTE_1_IP} - BuiltIn.Wait Until Keyword Succeeds 30s 15s VpnOperations.Verify GWMAC Flow Entry On Flow Table ${OS_COMPUTE_2_IP} + Verify GWMAC Flow Entry On Flow Table On All Compute Nodes BuiltIn.Log Check datapath from network1 to network2 ${dst_ip_list} = BuiltIn.Create List @{NET_1_VM_IPS}[1] @{NET_2_VM_IPS} OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[0] @{NET_1_VM_IPS}[0] ${dst_ip_list} @@ -207,8 +203,7 @@ Delete Router Failure When Associated With L3VPN 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} - BuiltIn.Wait Until Keyword Succeeds 30s 15s VpnOperations.Verify GWMAC Flow Entry On Flow Table ${OS_COMPUTE_1_IP} - BuiltIn.Wait Until Keyword Succeeds 30s 15s VpnOperations.Verify GWMAC Flow Entry On Flow Table ${OS_COMPUTE_2_IP} + Verify GWMAC Flow Entry On Flow Table On All Compute Nodes Remove Router Interfaces ${router_id} = OpenStackOperations.Get Router Id ${ROUTER} @@ -233,8 +228,7 @@ Delete Router BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements Not At URI ${ROUTER_URL} ${router_list} ${resp} = VpnOperations.VPN Get L3VPN vpnid=@{VPN_INSTANCE_IDS}[0] BuiltIn.Should Not Contain ${resp} ${ROUTER} - BuiltIn.Wait Until Keyword Succeeds 30s 10s VpnOperations.Verify GWMAC Flow Entry Removed From Flow Table ${OS_COMPUTE_1_IP} - BuiltIn.Wait Until Keyword Succeeds 30s 10s VpnOperations.Verify GWMAC Flow Entry Removed From Flow Table ${OS_COMPUTE_2_IP} + Verify GWMAC Flow Entry Removed From Flow Table On All Compute Nodes Delete Router With NonExistentRouter Name [Documentation] Delete router with nonExistentRouter name diff --git a/csit/suites/netvirt/vpnservice/vpn_basic_dualstack_one_router.robot b/csit/suites/netvirt/vpnservice/vpn_basic_dualstack_one_router.robot index 4b17934cd1..a37341575d 100644 --- a/csit/suites/netvirt/vpnservice/vpn_basic_dualstack_one_router.robot +++ b/csit/suites/netvirt/vpnservice/vpn_basic_dualstack_one_router.robot @@ -170,14 +170,13 @@ Check ELAN Datapath Traffic Within The Networks 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_CONTROL_NODE_IP} ${OS_COMPUTE_1_IP} ${OS_COMPUTE_2_IP} + @{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_COMPUTE_1_IP} ${VM} + \ 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 GWMAC Entry On ODL ${GW_MAC_ADDRS} - BuiltIn.Wait Until Keyword Succeeds 30s 5s Verify GWMAC Flow Entry On Flow Table ${OS_COMPUTE_1_IP} - BuiltIn.Wait Until Keyword Succeeds 30s 5s Verify GWMAC Flow Entry On Flow Table ${OS_COMPUTE_2_IP} + Verify GWMAC Flow Entry On Flow Table On All Compute Nodes BuiltIn.Log L3 Datapath test across the networks using router ${dst_ipv4_list1} = BuiltIn.Create List ${NET_1_VM_IPV4[1]} @{NET_2_VM_IPV4} Test Operations From Vm Instance @{NETWORKS}[0] ${NET_1_VM_IPV4[0]} ${dst_ipv4_list1} @@ -282,11 +281,9 @@ Verify L3VPN Datapath With Router Association 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 5s VpnOperations.Verify Flows Are Present For L3VPN ${OS_COMPUTE_1_IP} ${VM_IPS} - BuiltIn.Wait Until Keyword Succeeds 60s 5s VpnOperations.Verify Flows Are Present For L3VPN ${OS_COMPUTE_2_IP} ${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} - BuiltIn.Wait Until Keyword Succeeds 30s 5s Verify GWMAC Flow Entry On Flow Table ${OS_COMPUTE_1_IP} - BuiltIn.Wait Until Keyword Succeeds 30s 5s Verify GWMAC Flow Entry On Flow Table ${OS_COMPUTE_2_IP} + Verify GWMAC Flow Entry On Flow Table On All Compute Nodes BuiltIn.Log L3 Datapath test across the networks using L3VPN ${dst_ipv4_list1} = BuiltIn.Create List ${NET_1_VM_IPV4[1]} @{NET_2_VM_IPV4} Test Operations From Vm Instance @{NETWORKS}[0] ${NET_1_VM_IPV4[0]} ${dst_ipv4_list1} @@ -346,8 +343,7 @@ Delete Router And Router Interfaces With L3VPN # Verify Router Entry removed from L3VPN ${resp} = VpnOperations.VPN Get L3VPN vpnid=${VPN_INSTANCE_ID[0]} BuiltIn.Should Not Contain ${resp} ${router_id} - BuiltIn.Wait Until Keyword Succeeds 30s 5s VpnOperations.Verify GWMAC Flow Entry Removed From Flow Table ${OS_COMPUTE_1_IP} - BuiltIn.Wait Until Keyword Succeeds 30s 5s VpnOperations.Verify GWMAC Flow Entry Removed From Flow Table ${OS_COMPUTE_2_IP} + Verify GWMAC Flow Entry Removed From Flow Table On All Compute Nodes Delete Router With NonExistentRouter Name [Documentation] Delete router with nonExistentRouter name. diff --git a/csit/suites/netvirt/vpnservice/vpn_basic_ipv6.robot b/csit/suites/netvirt/vpnservice/vpn_basic_ipv6.robot index 981f68825c..2ae30e880e 100644 --- a/csit/suites/netvirt/vpnservice/vpn_basic_ipv6.robot +++ b/csit/suites/netvirt/vpnservice/vpn_basic_ipv6.robot @@ -125,14 +125,13 @@ Check ELAN Datapath Traffic Within The Networks 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_CONTROL_NODE_IP} ${OS_COMPUTE_1_IP} ${OS_COMPUTE_2_IP} + @{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_COMPUTE_1_IP} ${VM_IP_NET10} - BuiltIn.Wait Until Keyword Succeeds 30s 10s VpnOperations.Verify Flows Are Present For L3VPN ${OS_COMPUTE_1_IP} ${VM_IP_NET20} + 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} - BuiltIn.Wait Until Keyword Succeeds 30s 10s VpnOperations.Verify GWMAC Flow Entry On Flow Table ${OS_COMPUTE_1_IP} ipv6 - BuiltIn.Wait Until Keyword Succeeds 30s 10s VpnOperations.Verify GWMAC Flow Entry On Flow Table ${OS_COMPUTE_2_IP} ipv6 + 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} OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[0] @{VM_IP_NET10}[0] ${dst_ip_list} ${dst_ip_list} = BuiltIn.Create List @{VM_IP_NET20}[1] @{VM_IP_NET10} @@ -194,15 +193,13 @@ Associate L3VPN To Routers Verify L3VPN Datapath With Router Association BuiltIn.Log Verify VPN interfaces, FIB entries and Flow table - ${vm_instances} = BuiltIn.Create List @{VM_IP_NET10} @{VM_IP_NET20} - BuiltIn.Wait Until Keyword Succeeds 30s 10s Utils.Check For Elements At URI ${VPN_IFACES_URL} ${vm_instances} + ${vm_ips} = BuiltIn.Create List @{VM_IP_NET10} @{VM_IP_NET20} + BuiltIn.Wait Until Keyword Succeeds 30s 10s 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_instances} - BuiltIn.Wait Until Keyword Succeeds 60s 15s VpnOperations.Verify Flows Are Present For L3VPN ${OS_COMPUTE_1_IP} ${vm_instances} - BuiltIn.Wait Until Keyword Succeeds 60s 15s VpnOperations.Verify Flows Are Present For L3VPN ${OS_COMPUTE_2_IP} ${vm_instances} + 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} - BuiltIn.Wait Until Keyword Succeeds 30s 10s VpnOperations.Verify GWMAC Flow Entry On Flow Table ${OS_COMPUTE_1_IP} ipv6 - BuiltIn.Wait Until Keyword Succeeds 30s 10s VpnOperations.Verify GWMAC Flow Entry On Flow Table ${OS_COMPUTE_2_IP} ipv6 + Verify GWMAC Flow Entry On Flow Table On All Compute Nodes ipv6 BuiltIn.Log Check datapath from network1 to network2 ${dst_ip_list} = BuiltIn.Create List @{VM_IP_NET10}[1] @{VM_IP_NET20} OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[0] @{VM_IP_NET10}[0] ${dst_ip_list} @@ -234,8 +231,7 @@ Delete Router And Router Interfaces With L3VPN BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements Not At URI ${ROUTER_URL} ${router_list} ${resp}= VpnOperations.VPN Get L3VPN vpnid=@{VPN_INSTANCE_IDS}[0] BuiltIn.Should Not Contain ${resp} ${router_id} - BuiltIn.Wait Until Keyword Succeeds 30s 10s Verify GWMAC Flow Entry Removed From Flow Table ${OS_COMPUTE_1_IP} - BuiltIn.Wait Until Keyword Succeeds 30s 10s Verify GWMAC Flow Entry Removed From Flow Table ${OS_COMPUTE_2_IP} + Verify GWMAC Flow Entry Removed From Flow Table On All Compute Nodes Delete Router With NonExistentRouter Name ${rc} ${output}= Run And Return Rc And Output neutron router-delete nonExistentRouter diff --git a/csit/suites/openstack/clustering/ha_l2.robot b/csit/suites/openstack/clustering/ha_l2.robot index 50f8de51bc..64608eba65 100644 --- a/csit/suites/openstack/clustering/ha_l2.robot +++ b/csit/suites/openstack/clustering/ha_l2.robot @@ -54,15 +54,15 @@ Add Ssh Allow All Rule Create Bridge Manually and Verify Before Fail [Documentation] Create bridge with OVS command and verify it gets applied from all instances. - ClusterOvsdb.Create Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP} + ClusterOvsdb.Create Sample Bridge Manually And Verify ${OS_CNTL_IP} Add Tap Device Manually and Verify Before Fail [Documentation] Add tap devices to the bridge with OVS command and verify it gets applied from all instances. - ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify ${OS_CONTROL_NODE_IP} + ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify ${OS_CNTL_IP} Delete the Bridge Manually and Verify Before Fail [Documentation] Delete bridge with OVS command and verify it gets deleted from all instances. - ClusterOvsdb.Delete Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP} + ClusterOvsdb.Delete Sample Bridge Manually And Verify ${OS_CNTL_IP} Take Down ODL1 [Documentation] Kill the karaf in First Controller @@ -71,15 +71,15 @@ Take Down ODL1 Create Bridge Manually and Verify After Fail [Documentation] Create bridge with OVS command and verify it gets applied from all instances. - ClusterOvsdb.Create Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP} ${new_cluster_list} + ClusterOvsdb.Create Sample Bridge Manually And Verify ${OS_CNTL_IP} ${new_cluster_list} Add Tap Device Manually and Verify After Fail [Documentation] Add tap devices to the bridge with OVS command and verify it gets applied from all instances. - ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify ${OS_CONTROL_NODE_IP} ${new_cluster_list} + ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify ${OS_CNTL_IP} ${new_cluster_list} Delete the Bridge Manually and Verify After Fail [Documentation] Delete bridge with OVS command and verify it gets deleted from all instances. - ClusterOvsdb.Delete Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP} ${new_cluster_list} + ClusterOvsdb.Delete Sample Bridge Manually And Verify ${OS_CNTL_IP} ${new_cluster_list} Bring Up ODL1 [Documentation] Bring up ODL1 again @@ -87,15 +87,15 @@ Bring Up ODL1 Create Bridge Manually and Verify After Recover [Documentation] Create bridge with OVS command and verify it gets applied from all instances. - ClusterOvsdb.Create Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP} + ClusterOvsdb.Create Sample Bridge Manually And Verify ${OS_CNTL_IP} Add Tap Device Manually and Verify After Recover [Documentation] Add tap devices to the bridge with OVS command and verify it gets applied from all instances. - ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify ${OS_CONTROL_NODE_IP} + ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify ${OS_CNTL_IP} Delete the Bridge Manually and Verify After Recover [Documentation] Delete bridge with OVS command and verify it gets deleted from all instances. - ClusterOvsdb.Delete Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP} + ClusterOvsdb.Delete Sample Bridge Manually And Verify ${OS_CNTL_IP} Take Down ODL2 [Documentation] Kill the karaf in Second Controller diff --git a/csit/suites/openstack/connectivity/live_migration.robot b/csit/suites/openstack/connectivity/live_migration.robot index 9e9af8f065..bc7c3ff4dd 100644 --- a/csit/suites/openstack/connectivity/live_migration.robot +++ b/csit/suites/openstack/connectivity/live_migration.robot @@ -63,7 +63,8 @@ Migrate Instance And Verify Connectivity While Migration And After : FOR ${vm} IN @{vm_list} \ BuiltIn.Wait Until Keyword Succeeds 6x 20s OpenStackOperations.Check If Migration Is Complete ${vm} ${vm_host_after_migration} = OpenStackOperations.Get Hypervisor Host Of Vm @{NET_1_VMS}[0] - BuiltIn.Should Not Match ${vm_host_after_migration} ${vm_host_before_migration} + BuiltIn.Run Keyword If "${OS_DEPLOY}" == "1cmb-0ctl-0cmp" BuiltIn.Should Match ${vm_host_after_migration} ${vm_host_before_migration} + ... ELSE BuiltIn.Should Not Match ${vm_host_after_migration} ${vm_host_before_migration} SSHLibrary.Switch Connection ${devstack_conn_id} RemoteBash.Write_Bare_Ctrl_C ${output} = SSHLibrary.Read Until packet loss diff --git a/csit/suites/openstack/securitygroup/security_group_l3bcast.robot b/csit/suites/openstack/securitygroup/security_group_l3bcast.robot index 0f6a198eca..f89e09e37a 100644 --- a/csit/suites/openstack/securitygroup/security_group_l3bcast.robot +++ b/csit/suites/openstack/securitygroup/security_group_l3bcast.robot @@ -33,6 +33,9 @@ ${ROUTER} sgbcast_router ${DUMP_FLOW} sudo ovs-ofctl dump-flows br-int -OOpenflow13 ${DUMP_PORT_DESC} sudo ovs-ofctl dump-ports-desc br-int -OOpenflow13 ${PACKET_COUNT} 5 +${PACKET_COUNT_CMB} 10 +${PACKET_DIFF} 0 +${PACKET_DIFF_CMB} 5 ${BCAST_IP} 255.255.255.255 ${SUBNET1_BCAST_IP} 10.0.0.255 ${SUBNET2_BCAST_IP} 20.0.0.255 @@ -41,12 +44,12 @@ ${ENABLE_BCAST} echo 0 | sudo tee /proc/sys/net/ipv4/icmp_echo_ignore_broadca *** Test case *** Verify Network Broadcast traffic between the VMs hosted in Single Network [Documentation] This TC is to verify Network Broadcast traffic between the VMs hosted in Same Network on same/different compute node - Wait Until Keyword Succeeds 30s 5s Verify L3Broadcast With Antispoofing Table ${OS_COMPUTE1_IP} ${EGRESS_ACL_TABLE} ${BCAST_IP} + Wait Until Keyword Succeeds 30s 5s Verify L3Broadcast With Antispoofing Table ${OS_CMP1_IP} ${EGRESS_ACL_TABLE} ${BCAST_IP} ... @{VM_IPS}[0] same Verify Network Broadcast traffic between the VMs hosted in Multi Network [Documentation] This TC is to verify Network Broadcast traffic between the VMs hosted in Different Network on same/different compute node. - Wait Until Keyword Succeeds 30s 5s Verify L3Broadcast With Antispoofing Table ${OS_COMPUTE1_IP} ${EGRESS_ACL_TABLE} ${BCAST_IP} + Wait Until Keyword Succeeds 30s 5s Verify L3Broadcast With Antispoofing Table ${OS_CMP1_IP} ${EGRESS_ACL_TABLE} ${BCAST_IP} ... @{VM_IPS}[3] different *** Keywords *** @@ -81,15 +84,15 @@ Create Setup OpenStackOperations.Execute Command on VM Instance ${NETWORKS[0]} @{VM_IPS}[0] ${ENABLE_BCAST} OpenStackOperations.Execute Command on VM Instance ${NETWORKS[1]} @{VM_IPS}[3] ${ENABLE_BCAST} ${vm1_in_port} ${vm1_meta} = BuiltIn.Wait Until Keyword Succeeds 60s 10s Get VMs Metadata and In Port @{NET_1_PORTS}[0] - ... ${OS_COMPUTE_1_IP} + ... ${OS_CMP1_IP} ${vm2_in_port} ${vm2_meta} = BuiltIn.Wait Until Keyword Succeeds 60s 10s Get VMs Metadata and In Port @{NET_1_PORTS}[1] - ... ${OS_COMPUTE_1_IP} + ... ${OS_CMP1_IP} ${vm3_in_port} ${vm3_meta} = BuiltIn.Wait Until Keyword Succeeds 60s 10s Get VMs Metadata and In Port @{NET_1_PORTS}[2] - ... ${OS_COMPUTE_2_IP} + ... ${OS_CMP2_IP} ${vm4_in_port} ${vm4_meta} = BuiltIn.Wait Until Keyword Succeeds 60s 10s Get VMs Metadata and In Port @{NET_2_PORTS}[0] - ... ${OS_COMPUTE_1_IP} + ... ${OS_CMP1_IP} ${vm5_in_port} ${vm5_meta} = BuiltIn.Wait Until Keyword Succeeds 60s 10s Get VMs Metadata and In Port @{NET_2_PORTS}[1] - ... ${OS_COMPUTE_2_IP} + ... ${OS_CMP2_IP} ${VM1_SUBMETA} = Get Submetadata ${vm1_meta} ${VM2_SUBMETA} = Get Submetadata ${vm2_meta} ${VM3_SUBMETA} = Get Submetadata ${vm3_meta} @@ -119,9 +122,9 @@ Get VMs Metadata and In Port Get Submetadata [Arguments] ${vm_metadata} [Documentation] Get the submetadata of the VM - ${cmd1} = Utils.Run Command On Remote System And Log ${OS_COMPUTE1_IP} ${DUMP_FLOW} | grep ${EGRESS_LPORT_DISPATCHER_TABLE} | grep write_metadata: + ${cmd1} = Utils.Run Command On Remote System And Log ${OS_CMP1_IP} ${DUMP_FLOW} | grep ${EGRESS_LPORT_DISPATCHER_TABLE} | grep write_metadata: ${output1} = String.Get Regexp Matches ${cmd1} reg6=(\\w+) 1 - ${cmd2} = Utils.Run Command On Remote System And Log ${OS_COMPUTE2_IP} ${DUMP_FLOW} | grep ${EGRESS_LPORT_DISPATCHER_TABLE} | grep write_metadata: + ${cmd2} = Utils.Run Command On Remote System And Log ${OS_CMP2_IP} ${DUMP_FLOW} | grep ${EGRESS_LPORT_DISPATCHER_TABLE} | grep write_metadata: ${output2} = String.Get Regexp Matches ${cmd2} reg6=(\\w+) 1 ${metalist} = Collections.Combine Lists ${output1} ${output2} : FOR ${meta} IN @{metalist} @@ -137,5 +140,7 @@ Verify L3Broadcast With Antispoofing Table ${bcast_egress} = Utils.Run Command On Remote System And Log ${OS_COMPUTE_IP} ${DUMP_FLOW} | grep table=${EGRESS_ACL_TABLE} | grep ${BCAST_IP} ${get_pkt_count_after_bcast} = OvsManager.Get Packet Count In Table For IP ${OS_COMPUTE_IP} ${EGRESS_ACL_TABLE} ${BCAST_IP} ${pkt_diff} = Evaluate int(${get_pkt_count_after_bcast})-int(${get_pkt_count_before_bcast}) - BuiltIn.Run Keyword If '${subnet_var}' == 'same' Should Be Equal As Numbers ${pkt_diff} ${PACKET_COUNT} - ... ELSE Should Be True ${pkt_diff}==0 + ${pkt_diff_expected} = BuiltIn.Set Variable If "${OS_DEPLOY}" == "1cmb-0ctl-0cmp" ${PACKET_DIFF_CMB} ${PACKET_DIFF} + ${pkt_count} = BuiltIn.Set Variable If "${OS_DEPLOY}" == "1cmb-0ctl-0cmp" ${PACKET_COUNT_CMB} ${PACKET_COUNT} + BuiltIn.Run Keyword If '${subnet_var}' == 'same' Should Be Equal As Numbers ${pkt_diff} ${pkt_count} + ... ELSE Should Be True ${pkt_diff} == ${pkt_diff_expected} -- 2.36.6