From 9e73fca83721fc883f07e3b5c9243648b698fc1f Mon Sep 17 00:00:00 2001 From: gvrangan Date: Tue, 29 Aug 2017 19:58:18 -0400 Subject: [PATCH] Test Option for min max with server create 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 --- csit/libraries/OpenStackOperations.robot | 5 +++-- csit/suites/openstack/connectivity/01_l2_tests.robot | 12 +++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/csit/libraries/OpenStackOperations.robot b/csit/libraries/OpenStackOperations.robot index f752b02bdc..a0383affce 100644 --- a/csit/libraries/OpenStackOperations.robot +++ b/csit/libraries/OpenStackOperations.robot @@ -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} diff --git a/csit/suites/openstack/connectivity/01_l2_tests.robot b/csit/suites/openstack/connectivity/01_l2_tests.robot index b59a521847..39c10b0899 100644 --- a/csit/suites/openstack/connectivity/01_l2_tests.robot +++ b/csit/suites/openstack/connectivity/01_l2_tests.robot @@ -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. -- 2.36.6