From 8c84e243918b41441e115887b9d17cbb94dc4571 Mon Sep 17 00:00:00 2001 From: JayaPr Date: Wed, 3 Apr 2019 06:09:29 +0530 Subject: [PATCH] Add testcase for vm readd and connectivity Added testcase to check when Deleted VM is added back again ping and connectivity should be fine Also reorganised suite to make it more readble. Change-Id: Id14f39638da25fb51a81280b982c7034127dcd5b Signed-off-by: JayaPr --- csit/suites/openstack/connectivity/l2.robot | 44 ++++++--------------- 1 file changed, 13 insertions(+), 31 deletions(-) diff --git a/csit/suites/openstack/connectivity/l2.robot b/csit/suites/openstack/connectivity/l2.robot index 7f0aead74d..54ecf754c3 100644 --- a/csit/suites/openstack/connectivity/l2.robot +++ b/csit/suites/openstack/connectivity/l2.robot @@ -25,66 +25,48 @@ ${SECURITY_GROUP} l2_sg ${NET_1_VLAN_ID} 1121 *** Test Cases *** -Ping Vm Instance1 In net_1 +Ping Vm Instances In net_1 [Documentation] Check reachability of vm instances by pinging to them. OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[0] @{NET_1_VM_IPS}[0] - -Ping Vm Instance2 In net_1 - [Documentation] Check reachability of vm instances by pinging to them. OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[0] @{NET_1_VM_IPS}[1] - -Ping Vm Instance3 In net_1 - [Documentation] Check reachability of vm instances by pinging to them. OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[0] @{NET_1_VM_IPS}[2] -Ping Vm Instance1 In net_2 +Ping Vm Instances In net_2 [Documentation] Check reachability of vm instances by pinging to them. OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[1] @{NET_2_VM_IPS}[0] - -Ping Vm Instance2 In net_2 - [Documentation] Check reachability of vm instances by pinging to them. OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[1] @{NET_2_VM_IPS}[1] - -Ping Vm Instance3 In net_2 - [Documentation] Check reachability of vm instances by pinging to them. OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[1] @{NET_2_VM_IPS}[2] -Connectivity Tests From Vm Instance1 In net_1 +Connectivity Tests From Vm Instances In net_1 [Documentation] Login to the vm instance and test some operations OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[0] @{NET_1_VM_IPS}[0] ${NET_1_VM_IPS} - -Connectivity Tests From Vm Instance2 In net_1 - [Documentation] Login to the vm instance and test operations OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[0] @{NET_1_VM_IPS}[1] ${NET_1_VM_IPS} - -Connectivity Tests From Vm Instance3 In net_1 - [Documentation] Login to the vm instance and test operations OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[0] @{NET_1_VM_IPS}[2] ${NET_1_VM_IPS} -Connectivity Tests From Vm Instance1 In net_2 +Connectivity Tests From Vm Instances In net_2 [Documentation] Login to the vm instance and test operations OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[1] @{NET_2_VM_IPS}[0] ${NET_2_VM_IPS} - -Connectivity Tests From Vm Instance2 In net_2 - [Documentation] Logging to the vm instance using generated key pair. OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[1] @{NET_2_VM_IPS}[1] ${NET_2_VM_IPS} - -Connectivity Tests From Vm Instance3 In net_2 - [Documentation] Login to the vm instance using generated key pair. OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[1] @{NET_2_VM_IPS}[2] ${NET_2_VM_IPS} Delete A Vm Instance - [Documentation] Delete Vm instances using instance names. Also remove the VM from the - ... list so that later cleanup will not try to delete it. + [Documentation] Delete Vm instances using instance names. [Tags] NON_GATE OpenStackOperations.Delete Vm Instance @{NET_1_VMS}[0] - Remove From List ${NET_1_VMS} 0 No Ping For Deleted Vm [Documentation] Check non reachability of deleted vm instances by pinging to them. [Tags] NON_GATE OpenStackOperations.Ping From DHCP Should Not Succeed @{NETWORKS}[0] @{NET_1_VM_IPS}[0] +Recreate The Deleted Vm Instance and check ping & connectivity. + [Documentation] Check reachability of recreated vm instances by pinging to them. + [Tags] NON_GATE + OpenStackOperations.Create Vm Instance On Compute Node @{NETWORKS}[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} + OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[0] @{NET_1_VM_IPS}[0] + OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[0] @{NET_1_VM_IPS}[0] ${NET_1_VM_IPS} + *** Keywords *** Suite Setup OpenStackOperations.OpenStack Suite Setup -- 2.36.6