Test Option for min max with server create 98/62398/5
authorgvrangan <venkatrangang@hcl.com>
Tue, 29 Aug 2017 23:58:18 +0000 (19:58 -0400)
committerJamo Luhrsen <jluhrsen@redhat.com>
Fri, 8 Sep 2017 22:01:52 +0000 (22:01 +0000)
This patch helps to test --min and --max option
with openstack server create. These options have been
observed to fail with 3node.

Change-Id: I9154a21b1eedbbbe886785959d1b86250d9c545c
Signed-off-by: gvrangan <venkatrangang@hcl.com>
csit/libraries/OpenStackOperations.robot
csit/suites/openstack/connectivity/01_l2_tests.robot

index f752b02bdcc38772ed9137786f54b9624f8926b7..a0383affcee0740f83d462061071abe1e88129ad 100644 (file)
@@ -252,12 +252,13 @@ Get Router Id
     [Return]    ${router_id}
 
 Create Vm Instances
-    [Arguments]    ${net_name}    ${vm_instance_names}    ${image}=${EMPTY}    ${flavor}=m1.nano    ${sg}=default
+    [Arguments]    ${net_name}    ${vm_instance_names}    ${image}=${EMPTY}    ${flavor}=m1.nano    ${sg}=default    ${min}=1
+    ...    ${max}=1
     [Documentation]    Create X Vm Instance with the net id of the Netowrk.
     ${image}    Set Variable If    "${image}"=="${EMPTY}"    ${CIRROS_${OPENSTACK_BRANCH}}    ${image}
     ${net_id}=    Get Net Id    ${net_name}    ${devstack_conn_id}
     : FOR    ${VmElement}    IN    @{vm_instance_names}
-    \    ${rc}    ${output}=    Run And Return Rc And Output    openstack server create --image ${image} --flavor ${flavor} --nic net-id=${net_id} ${VmElement} --security-group ${sg}
+    \    ${rc}    ${output}=    Run And Return Rc And Output    openstack server create --image ${image} --flavor ${flavor} --nic net-id=${net_id} ${VmElement} --security-group ${sg} --min ${min} --max ${max}
     \    Should Not Be True    ${rc}
     \    Log    ${output}
 
index b59a52184765abcf1cb21525534c0e08c76781f9..39c10b089976883019fb00e50872c998177dc152 100644 (file)
@@ -20,8 +20,10 @@ Resource          ../../../variables/netvirt/Variables.robot
 ${SECURITY_GROUP}    sg-connectivity
 @{NETWORKS_NAME}    l2_network_1    l2_network_2
 @{SUBNETS_NAME}    l2_subnet_1    l2_subnet_2
-@{NET_1_VM_INSTANCES}    MyFirstInstance_1    MySecondInstance_1    MyThirdInstance_1
-@{NET_2_VM_INSTANCES}    MyFirstInstance_2    MySecondInstance_2    MyThirdInstance_2
+@{NET_1_VM_GRP_NAME}    NET1-VM
+@{NET_2_VM_GRP_NAME}    NET2-VM
+@{NET_1_VM_INSTANCES}    NET1-VM-1    NET1-VM-2    NET1-VM-3    NET1-VM-4
+@{NET_2_VM_INSTANCES}    NET2-VM-1    NET2-VM-2    NET2-VM-3    NET2-VM-4
 @{SUBNETS_RANGE}    30.0.0.0/24    40.0.0.0/24
 ${network1_vlan_id}    1235
 
@@ -54,11 +56,11 @@ Add Ssh Allow Rule
 
 Create Vm Instances For l2_network_1
     [Documentation]    Create Four Vm instances using flavor and image names for a network.
-    Create Vm Instances    l2_network_1    ${NET_1_VM_INSTANCES}    sg=${SECURITY_GROUP}
+    Create Vm Instances    l2_network_1    ${NET_1_VM_GRP_NAME}    sg=${SECURITY_GROUP}    min=4    max=4
 
 Create Vm Instances For l2_network_2
     [Documentation]    Create Four Vm instances using flavor and image names for a network.
-    Create Vm Instances    l2_network_2    ${NET_2_VM_INSTANCES}    sg=${SECURITY_GROUP}
+    Create Vm Instances    l2_network_2    ${NET_2_VM_GRP_NAME}    sg=${SECURITY_GROUP}    min=4    max=4
 
 Check Vm Instances Have Ip Address
     [Documentation]    Test case to verify that all created VMs are ready and have received their ip addresses.
@@ -139,7 +141,7 @@ Connectivity Tests From Vm Instance3 In l2_network_2
 
 Delete A Vm Instance
     [Documentation]    Delete Vm instances using instance names.
-    Delete Vm Instance    MyFirstInstance_1
+    Delete Vm Instance    NET1-VM-1
 
 No Ping For Deleted Vm
     [Documentation]    Check non reachability of deleted vm instances by pinging to them.