From 9b73d6629b68f9b4a6f613b011a3a6a2ea7844da Mon Sep 17 00:00:00 2001 From: Sam Hague Date: Mon, 30 Jul 2018 14:56:35 -0400 Subject: [PATCH] Use suite teardown resource cleanup The suites updated have separate tests to do all the neutron resource cleanup, but the OpenStackOperations.Suite Teardown already does the full cleanup. All other suites in the netvirt CSIT beyond those in this patch already use the Suite Teardown for the cleanup. This will help with test runtimes and logging sizes since there is heavy logging at the end of each test case. With the test cases removed that logging time is removed also. Change-Id: Ie81e2dee0600992ce7b2cc77e170a5768b17830d Signed-off-by: Sam Hague --- .../connectivity/external_network.robot | 38 ------------ csit/suites/openstack/connectivity/l2.robot | 32 ---------- csit/suites/openstack/connectivity/l3.robot | 61 ------------------- .../connectivity/live_migration.robot | 18 ------ .../connectivity/security_group.robot | 8 --- 5 files changed, 157 deletions(-) diff --git a/csit/suites/openstack/connectivity/external_network.robot b/csit/suites/openstack/connectivity/external_network.robot index d911158ae7..4e140edfac 100644 --- a/csit/suites/openstack/connectivity/external_network.robot +++ b/csit/suites/openstack/connectivity/external_network.robot @@ -233,41 +233,3 @@ Ping External Network PNF from Vm Instance 2 After Floating IP Removal ${expect_ping_to_work} = Set Variable If "skip_if_controller" in @{TEST_TAGS} False True ${dst_ip} = BuiltIn.Create List ${EXTERNAL_PNF} OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[0] @{NET1_FIP_VM_IPS}[1] ${dst_ip} ttl=1 ping_should_succeed=${expect_ping_to_work} - -Delete Vm Instances - [Documentation] Delete Vm instances using instance names. - : FOR ${vm} IN @{NET1_FIP_VMS} - \ OpenStackOperations.Delete Vm Instance ${vm} - : FOR ${vm} IN @{SNAT_VMS} - \ OpenStackOperations.Delete Vm Instance ${vm} - -Delete Router Interfaces - [Documentation] Remove Interface to the subnets. - : FOR ${router} ${interface} IN ZIP ${ROUTERS} ${SUBNETS} - \ OpenStackOperations.Remove Interface ${router} ${interface} - -Delete Routers - [Documentation] Delete Router and Interface to the subnets. - : FOR ${router} IN @{ROUTERS} - \ OpenStackOperations.Delete Router ${router} - -Verify Deleted Router - [Documentation] Check deleted router using northbound rest call - ${data} Utils.Get Data From URI 1 ${NEUTRON_ROUTERS_API} - BuiltIn.Log ${data} - : FOR ${router} IN @{ROUTERS} - \ BuiltIn.Should Not Contain ${data} ${ROUTER} - -Delete Networks - [Documentation] Delete Networks with neutron request. - : FOR ${network} IN @{NETWORKS} - \ OpenStackOperations.Delete Network ${network} - OpenStackOperations.Delete Network ${EXTERNAL_NET_NAME} - -Delete Security Group - [Documentation] Delete security groups with neutron request - OpenStackOperations.Delete SecurityGroup ${SECURITY_GROUP} - -Verify Flows Cleanup - [Documentation] Verify that flows have been cleaned up properly after removing all neutron configurations - DataModels.Verify Flows Are Cleaned Up On All OpenStack Nodes diff --git a/csit/suites/openstack/connectivity/l2.robot b/csit/suites/openstack/connectivity/l2.robot index 8864b82c72..34db0113f8 100644 --- a/csit/suites/openstack/connectivity/l2.robot +++ b/csit/suites/openstack/connectivity/l2.robot @@ -126,35 +126,3 @@ Delete A Vm Instance No Ping For Deleted Vm [Documentation] Check non reachability of deleted vm instances by pinging to them. OpenStackOperations.Ping From DHCP Should Not Succeed @{NETWORKS}[0] @{NET_1_VM_IPS}[0] - -Delete Vm Instances In net_1 - [Documentation] Delete Vm instances using instance names in net_1. - : FOR ${vm} IN @{NET_1_VMS} - \ OpenStackOperations.Delete Vm Instance ${vm} - -Delete Vm Instances In net_2 - [Documentation] Delete Vm instances using instance names in net_2. - : FOR ${vm} IN @{NET_2_VMS} - \ OpenStackOperations.Delete Vm Instance ${vm} - -Delete Sub Network In net_1 - [Documentation] Delete Sub Net for the Networks with neutron request. - OpenStackOperations.Delete SubNet @{SUBNETS}[0] - -Delete Sub Network In net_2 - [Documentation] Delete Sub Net for the Networks with neutron request. - OpenStackOperations.Delete SubNet @{SUBNETS}[1] - -Delete Networks - [Documentation] Delete Networks with neutron request. - : FOR ${networks} IN @{NETWORKS} - \ OpenStackOperations.Delete Network ${networks} - -Delete Security Group - [Documentation] Delete security group with neutron request - OpenStackOperations.Delete SecurityGroup ${SECURITY_GROUP} - -Verify Flows Cleanup - [Documentation] Verify that flows have been cleaned up properly after removing all neutron configurations - ${feature_check_status}= Run Keyword And Return Status Verify Feature Is Installed odl-vtn-manager-neutron - BuiltIn.Run Keyword If '${feature_check_status}' != 'True' DataModels.Verify Flows Are Cleaned Up On All OpenStack Nodes diff --git a/csit/suites/openstack/connectivity/l3.robot b/csit/suites/openstack/connectivity/l3.robot index f8b3744686..606aa671a1 100644 --- a/csit/suites/openstack/connectivity/l3.robot +++ b/csit/suites/openstack/connectivity/l3.robot @@ -241,64 +241,3 @@ Connectivity Tests From Vm Instance4 In net_5 [Documentation] Check reachability of vm instance on a different network with one vlan vm in source and destination. ${dst_list} = BuiltIn.Create List @{NET_4_L3_VM_IPS} OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[4] @{NET_5_L3_VM_IPS}[0] ${dst_list} - -Delete Vm Instances In net_4 - [Documentation] Delete Vm instances using instance names in net_2. - : FOR ${vm} IN @{NET_4_VMS} - \ OpenStackOperations.Delete Vm Instance ${vm} - -Delete Vm Instances In net_5 - [Documentation] Delete Vm instances using instance names in net_3. - : FOR ${vm} IN @{NET_5_VMS} - \ OpenStackOperations.Delete Vm Instance ${vm} - -Delete Router1 Interfaces - [Documentation] Remove Interface to the subnets. - : FOR ${interface} IN @{SUBNETS_1} - \ OpenStackOperations.Remove Interface @{ROUTER}[0] ${interface} - -Delete Router1 - [Documentation] Delete Router and Interface to the subnets. - OpenStackOperations.Delete Router @{ROUTER}[0] - -Delete Router2 Interfaces - [Documentation] Remove Interface to the subnets. - : FOR ${interface} IN @{SUBNETS_2} - \ OpenStackOperations.Remove Interface @{ROUTER}[1] ${interface} - -Delete Router2 - [Documentation] Delete Router and Interface to the subnets. - OpenStackOperations.Delete Router @{ROUTER}[1] - -Delete Sub Network In net_1 - [Documentation] Delete Sub Net for the Network with neutron request. - OpenStackOperations.Delete SubNet l3_sub_1 - -Delete Sub Network In net_2 - [Documentation] Delete Sub Net for the Network with neutron request. - OpenStackOperations.Delete SubNet l3_sub_2 - -Delete Sub Network In net_3 - [Documentation] Delete Sub Net for the Network with neutron request. - OpenStackOperations.Delete SubNet l3_sub_3 - -Delete Sub Network In net_4 - [Documentation] Delete Sub Net for the Network with neutron request. - OpenStackOperations.Delete SubNet l3_sub_4 - -Delete Sub Network In net_5 - [Documentation] Delete Sub Net for the Network with neutron request. - OpenStackOperations.Delete SubNet l3_sub_5 - -Delete Networks - [Documentation] Delete Networks with neutron request. - : FOR ${network} IN @{NETWORKS} - \ OpenStackOperations.Delete Network ${network} - -Delete Security Group - [Documentation] Delete security group with neutron request - OpenStackOperations.Delete SecurityGroup ${SECURITY_GROUP} - -Verify Flows Cleanup - [Documentation] Verify that flows have been cleaned up properly after removing all neutron configurations - DataModels.Verify Flows Are Cleaned Up On All OpenStack Nodes diff --git a/csit/suites/openstack/connectivity/live_migration.robot b/csit/suites/openstack/connectivity/live_migration.robot index bc7c3ff4dd..ffb0bf39a9 100644 --- a/csit/suites/openstack/connectivity/live_migration.robot +++ b/csit/suites/openstack/connectivity/live_migration.robot @@ -71,21 +71,3 @@ Migrate Instance And Verify Connectivity While Migration And After BuiltIn.Should Contain ${output} 64 bytes ${output} = DevstackUtils.Write Commands Until Prompt sudo ip netns exec qdhcp-${net_id} ping -c 10 @{NET1_VM_IPS}[0] BuiltIn.Should Contain ${output} 64 bytes - -Delete Vm Instances In migration_net_1 - [Documentation] Delete Vm instances using instance names in network_1. - : FOR ${vm} IN @{NET_1_VMS} - \ OpenStackOperations.Delete Vm Instance ${vm} - -Delete Sub Networks In migration_net_1 - [Documentation] Delete Sub Nets for the Networks with neutron request. - OpenStackOperations.Delete SubNet @{SUBNETS}[0] - -Delete Networks - [Documentation] Delete Networks with neutron request. - : FOR ${NetworkElement} IN @{NETWORKS} - \ OpenStackOperations.Delete Network ${NetworkElement} - -Delete SecurityGroup - [Documentation] Delete SecurityGroup with neutron request. - OpenStackOperations.Delete SecurityGroup ${SECURITY_GROUP} diff --git a/csit/suites/openstack/connectivity/security_group.robot b/csit/suites/openstack/connectivity/security_group.robot index 7c66c50aae..3d0243945c 100644 --- a/csit/suites/openstack/connectivity/security_group.robot +++ b/csit/suites/openstack/connectivity/security_group.robot @@ -227,11 +227,3 @@ Repeat Ping From Vm Instance2 To Vm Instance1 With net_2 VM Deleted [Documentation] Login to the vm instance and test operations ${vm_ips} = BuiltIn.Create List @{NET_1_VM_IPS}[0] OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[0] @{NET_1_VM_IPS}[1] ${vm_ips} - -Delete Vm Instances In net_1 - : FOR ${VmElement} IN @{NET_1_VMS} - \ OpenStackOperations.Delete Vm Instance ${VmElement} - -Delete Security Groups - OpenStackOperations.Delete SecurityGroup additional-sg - OpenStackOperations.Delete SecurityGroup ${SECURITY_GROUP} -- 2.36.6