Add testcase for vm readd and connectivity
[integration/test.git] / csit / suites / openstack / connectivity / l2.robot
index 7f0aead74d569e38d5afc6f0b09fc151ddcf93d2..54ecf754c3bf8729daf53ef32cadeeeeddecda48 100644 (file)
@@ -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