X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=csit%2Fsuites%2Fopenstack%2Fclustering%2F01_l2_tests.robot;h=674bece6b4d5574b593f0d0c356f41fc8d80a728;hb=f42cf8e16695417aa44af38d4e0682a839238471;hp=5c9b6900ea6e8a10b7567694a419392daae4fb32;hpb=40924f5c2ca334d5581f6185060a78f2ff4542a7;p=integration%2Ftest.git diff --git a/csit/suites/openstack/clustering/01_l2_tests.robot b/csit/suites/openstack/clustering/01_l2_tests.robot index 5c9b6900ea..674bece6b4 100644 --- a/csit/suites/openstack/clustering/01_l2_tests.robot +++ b/csit/suites/openstack/clustering/01_l2_tests.robot @@ -3,7 +3,7 @@ Documentation Test suite to verify packet flows between vm instances. Suite Setup Devstack Suite Setup source_pwd=yes Suite Teardown Close All Connections Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing -Test Teardown Run Keywords Get OvsDebugInfo +Test Teardown Get Test Teardown Debugs Library SSHLibrary Library OperatingSystem Library RequestsLibrary @@ -25,6 +25,7 @@ Variables ../../../variables/Variables.py @{VM_IPS_NOT_DELETED} 70.0.0.4 @{cluster_down_list} ${1} ${2} @{SUBNETS_RANGE} 70.0.0.0/24 80.0.0.0/24 +${SECURITY_GROUP} sg-clustering *** Test Cases *** Create All Controller Sessions @@ -44,6 +45,10 @@ Create Subnets For l2_net_2 [Documentation] Create Sub Nets for the Networks with neutron request. OpenStackOperations.Create SubNet l2_net_2 l2_sub_net_2 @{SUBNETS_RANGE}[1] +Add Ssh Allow Rule + [Documentation] Allow all TCP/UDP/ICMP packets for this suite + OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP} + 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} @@ -95,12 +100,12 @@ Take Down ODL2 Create Vm Instances For l2_net_2 [Documentation] Create Vm instances using flavor and image names for a network. - OpenStackOperations.Create Vm Instances l2_net_2 ${NET_2_VM_INSTANCES} sg=csit + OpenStackOperations.Create Vm Instances l2_net_2 ${NET_2_VM_INSTANCES} sg=${SECURITY_GROUP} Create Vm Instances For l2_net_1 [Documentation] Create Vm instances using flavor and image names for a network. Log ${devstack_conn_id} - OpenStackOperations.Create Vm Instances l2_net_1 ${NET_1_VM_INSTANCES} sg=csit + OpenStackOperations.Create Vm Instances l2_net_1 ${NET_1_VM_INSTANCES} sg=${SECURITY_GROUP} Check Vm Instances Have Ip Address [Documentation] Test case to verify that all created VMs are ready and have received their ip addresses. @@ -110,21 +115,26 @@ Check Vm Instances Have Ip Address # for dhcp addresses : FOR ${vm} IN @{NET_1_VM_INSTANCES} @{NET_2_VM_INSTANCES} \ Wait Until Keyword Succeeds 15s 5s Verify VM Is ACTIVE ${vm} - ${NET1_VM_COUNT} Get Length ${NET_1_VM_INSTANCES} - ${NET2_VM_COUNT} Get Length ${NET_2_VM_INSTANCES} - ${LOOP_COUNT} Evaluate ${NET1_VM_COUNT}+${NET2_VM_COUNT} - : FOR ${index} IN RANGE 1 ${LOOP_COUNT} - \ ${NET1_VM_IPS} ${NET1_DHCP_IP} Verify VMs Received DHCP Lease @{NET_1_VM_INSTANCES} - \ ${NET2_VM_IPS} ${NET2_DHCP_IP} Verify VMs Received DHCP Lease @{NET_2_VM_INSTANCES} - \ ${NET1_VM_LIST_LENGTH}= Get Length ${NET1_VM_IPS} - \ ${NET2_VM_LIST_LENGTH}= Get Length ${NET2_VM_IPS} - \ Exit For Loop If ${NET1_VM_LIST_LENGTH}==${NET1_VM_COUNT} and ${NET2_VM_LIST_LENGTH}==${NET2_VM_COUNT} - Append To List ${NET1_VM_IPS} ${NET1_DHCP_IP} + ${status} ${message} Run Keyword And Ignore Error Wait Until Keyword Succeeds 60s 5s Collect VM IP Addresses + ... true @{NET_1_VM_INSTANCES} + ${status} ${message} Run Keyword And Ignore Error Wait Until Keyword Succeeds 60s 5s Collect VM IP Addresses + ... true @{NET_2_VM_INSTANCES} + ${NET1_VM_IPS} ${NET1_DHCP_IP} Collect VM IP Addresses false @{NET_1_VM_INSTANCES} + ${NET2_VM_IPS} ${NET2_DHCP_IP} Collect VM IP Addresses false @{NET_2_VM_INSTANCES} + ${VM_INSTANCES}= Collections.Combine Lists ${NET_1_VM_INSTANCES} ${NET_2_VM_INSTANCES} + ${VM_IPS}= Collections.Combine Lists ${NET1_VM_IPS} ${NET2_VM_IPS} + ${LOOP_COUNT} Get Length ${VM_INSTANCES} + : FOR ${index} IN RANGE 0 ${LOOP_COUNT} + \ ${status} ${message} Run Keyword And Ignore Error Should Not Contain @{VM_IPS}[${index}] None + \ Run Keyword If '${status}' == 'FAIL' Write Commands Until Prompt nova console-log @{VM_INSTANCES}[${index}] 30s Set Suite Variable ${NET1_VM_IPS} - Append To List ${NET2_VM_IPS} ${NET2_DHCP_IP} Set Suite Variable ${NET2_VM_IPS} + Should Not Contain ${NET1_VM_IPS} None + Should Not Contain ${NET2_VM_IPS} None + Should Not Contain ${NET1_DHCP_IP} None + Should Not Contain ${NET2_DHCP_IP} None [Teardown] Run Keywords Show Debugs @{NET_1_VM_INSTANCES} @{NET_2_VM_INSTANCES} - ... AND Get OvsDebugInfo + ... AND Get Test Teardown Debugs Bring Up ODL2 [Documentation] Bring up ODL2 again @@ -230,3 +240,7 @@ Delete Networks [Documentation] Delete Networks with neutron request. : FOR ${NetworkElement} IN @{NETWORKS_NAME} \ OpenStackOperations.Delete Network ${NetworkElement} + +Verify Flows Cleanup + [Documentation] Verify that flows have been cleaned up properly after removing all neutron configurations + Verify Flows Are Cleaned Up On All OpenStack Nodes