Place VMs deterministically 32/67132/3
authorSam Hague <shague@redhat.com>
Fri, 12 Jan 2018 23:18:13 +0000 (18:18 -0500)
committerSam Hague <shague@redhat.com>
Sat, 13 Jan 2018 03:36:11 +0000 (03:36 +0000)
Change-Id: I8e3f117f76a4446cedae62287560ddd17a0ac469
Signed-off-by: Sam Hague <shague@redhat.com>
13 files changed:
csit/libraries/DevstackUtils.robot
csit/libraries/OpenStackOperations.robot
csit/suites/netvirt/elan/elan.robot
csit/suites/netvirt/vpnservice/arp_learning.robot
csit/suites/netvirt/vpnservice/bgp.robot
csit/suites/netvirt/vpnservice/vpn_basic.robot
csit/suites/netvirt/vpnservice/vpn_basic_ipv6.robot
csit/suites/openstack/clustering/ha_l2.robot
csit/suites/openstack/clustering/ha_l3.robot
csit/suites/openstack/connectivity/external_network.robot
csit/suites/openstack/connectivity/l2.robot
csit/suites/openstack/connectivity/l3.robot
csit/suites/openstack/connectivity/security_group.robot

index 6a9c3fc74b8ad6af14eb423553f08b84f3d8a587..437c31e2c144438da24ef298ac6804503c66bd6e 100644 (file)
@@ -33,6 +33,11 @@ ${TEMPEST_TIMEOUT}    420s
 ${OS_CNTL_CONN_ID}    None
 ${OS_CMP1_CONN_ID}    None
 ${OS_CMP2_CONN_ID}    None
+${OS_CNTL_IP}     ${EMPTY}
+${OS_CMP1_IP}     ${EMPTY}
+${OS_CMP2_IP}     ${EMPTY}
+@{OS_ALL_IPS}     @{EMPTY}
+@{OS_CMP_IPS}     @{EMPTY}
 
 *** Keywords ***
 Run Tempest Tests
@@ -158,6 +163,7 @@ Open Connection
 Devstack Suite Setup
     [Arguments]    ${odl_ip}=${ODL_SYSTEM_IP}
     [Documentation]    Open connections to the nodes
+    Get DevStack Nodes Data
     Create Session    session    http://${odl_ip}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
     SSHLibrary.Set Default Configuration    timeout=${default_devstack_prompt_timeout}
     Run Keyword If    0 < ${NUM_OS_SYSTEM}    Open Connection    OS_CNTL_CONN_ID    ${OS_CONTROL_NODE_IP}
@@ -180,3 +186,39 @@ Write Commands Until Prompt And Log
     ${output} =    Write Commands Until Prompt    ${cmd}    ${timeout}
     Log    ${output}
     [Return]    ${output}
+
+Log Devstack Nodes Data
+    ${output} =    BuiltIn.Catenate    SEPARATOR=\n    OS_CNTL_HN: ${OS_CNTL_HN} - OS_CNTL_IP: ${OS_CNTL_IP} - OS_CONTROL_NODE_IP: ${OS_CONTROL_NODE_IP}    OS_CMP1_HN: ${OS_CMP1_HN} - OS_CMP1_IP: ${OS_CMP1_IP} - OS_COMPUTE_1_IP: ${OS_COMPUTE_1_IP}    OS_CMP2_HN: ${OS_CMP2_HN} - OS_CMP2_IP: ${OS_CMP2_IP} - OS_COMPUTE_2_IP: ${OS_COMPUTE_2_IP}    OS_ALL_IPS: @{OS_ALL_IPS}
+    ...    OS_CMP_IPS: @{OS_CMP_IPS}
+    BuiltIn.Log    DevStack Nodes Data:\n${output}
+
+Get DevStack Hostnames
+    [Documentation]    Assign hostname global variables for DevStack nodes
+    ${OS_CNTL_HN} =    OpenStackOperations.Get Hypervisor Hostname From IP    ${OS_CNTL_IP}
+    ${OS_CMP1_HN} =    OpenStackOperations.Get Hypervisor Hostname From IP    ${OS_CMP1_IP}
+    ${OS_CMP2_HN} =    OpenStackOperations.Get Hypervisor Hostname From IP    ${OS_CMP2_IP}
+    BuiltIn.Set Suite Variable    ${OS_CNTL_HN}
+    BuiltIn.Set Suite Variable    ${OS_CMP1_HN}
+    BuiltIn.Set Suite Variable    ${OS_CMP2_HN}
+
+Set Node Data For Control And Compute Node Setup
+    [Documentation]    Assign global variables for DevStack nodes where the control node is also the compute
+    BuiltIn.Set Suite Variable    ${OS_CMP1_IP}    ${OS_CNTL_IP}
+    BuiltIn.Set Suite Variable    ${OS_CMP2_IP}    ${OS_COMPUTE_1_IP}
+    BuiltIn.Set Suite Variable    @{OS_ALL_IPS}    ${OS_CNTL_IP}    ${OS_CMP2_IP}
+    BuiltIn.Set Suite Variable    @{OS_CMP_IPS}    ${OS_CMP1_IP}    ${OS_CMP2_IP}
+
+Set Node Data For Control Only Node Setup
+    [Documentation]    Assign global variables for DevStack nodes where the control node is different than the compute
+    BuiltIn.Set Suite Variable    ${OS_CMP1_IP}    ${OS_COMPUTE_1_IP}
+    BuiltIn.Set Suite Variable    ${OS_CMP2_IP}    ${OS_COMPUTE_2_IP}
+    BuiltIn.Set Suite Variable    @{OS_ALL_IPS}    ${OS_CNTL_IP}    ${OS_CMP1_IP}    ${OS_CMP2_IP}
+    BuiltIn.Set Suite Variable    @{OS_CMP_IPS}    ${OS_CMP1_IP}    ${OS_CMP2_IP}
+
+Get DevStack Nodes Data
+    [Documentation]    Assign global variables for DevStack nodes
+    BuiltIn.Set Suite Variable    ${OS_CNTL_IP}    ${OS_CONTROL_NODE_IP}
+    Run Keyword If    '${OS_COMPUTE_2_IP}' == '${EMPTY}'    Set Node Data For Control And Compute Node Setup
+    ...    ELSE    Set Node Data For Control Only Node Setup
+    Get DevStack Hostnames
+    Log Devstack Nodes Data
index 9ed3806d847b33fb2915cb53c5558787d976c0d0..3ae94893ce7ad765c729c3e9a3ef3f9ede408327 100644 (file)
@@ -258,6 +258,15 @@ Create Vm Instances
     \    Should Be True    '${rc}' == '0'
     \    Log    ${output}
 
+Create Vm Instance On Compute Node
+    [Arguments]    ${net_name}    ${vm_name}    ${node_hostname}    ${image}=${EMPTY}    ${flavor}=m1.nano    ${sg}=default
+    [Documentation]    Create a VM instance on a specific compute node.
+    ${image} =    Set Variable If    "${image}"=="${EMPTY}"    ${CIRROS_${OPENSTACK_BRANCH}}    ${image}
+    ${net_id} =    Get Net Id    ${net_name}
+    ${rc}    ${output} =    Run And Return Rc And Output    openstack server create ${vm_name} --image ${image} --flavor ${flavor} --nic net-id=${net_id} --security-group ${sg} --availability-zone nova:${node_hostname}
+    Should Not Be True    ${rc}
+    Log    ${output}
+
 Create Vm Instance With Port
     [Arguments]    ${port_name}    ${vm_instance_name}    ${image}=${EMPTY}    ${flavor}=m1.nano    ${sg}=default
     [Documentation]    Create One VM instance using given ${port_name} and for given ${compute_node}
@@ -277,12 +286,11 @@ Create Vm Instance With Ports
     Should Be True    '${rc}' == '0'
 
 Create Vm Instance With Port On Compute Node
-    [Arguments]    ${port_name}    ${vm_instance_name}    ${compute_node}    ${image}=${EMPTY}    ${flavor}=m1.nano    ${sg}=default
+    [Arguments]    ${port_name}    ${vm_instance_name}    ${node_hostname}    ${image}=${EMPTY}    ${flavor}=m1.nano    ${sg}=default
     [Documentation]    Create One VM instance using given ${port_name} and for given ${compute_node}
     ${image}    Set Variable If    "${image}"=="${EMPTY}"    ${CIRROS_${OPENSTACK_BRANCH}}    ${image}
     ${port_id}=    Get Port Id    ${port_name}
-    ${hostname_compute_node}=    Get Hypervisor Hostname From IP    ${compute_node}
-    ${rc}    ${output}=    Run And Return Rc And Output    openstack server create --image ${image} --flavor ${flavor} --nic port-id=${port_id} --security-group ${sg} --availability-zone nova:${hostname_compute_node} ${vm_instance_name}
+    ${rc}    ${output}=    Run And Return Rc And Output    openstack server create --image ${image} --flavor ${flavor} --nic port-id=${port_id} --security-group ${sg} --availability-zone nova:${node_hostname} ${vm_instance_name}
     Log    ${output}
     Should Be True    '${rc}' == '0'
 
index 8304ee424aaf6aefe27e78374506a9f51601703a..9482d97be5738dff66c95f702056fd1ea65b1c55 100644 (file)
@@ -39,8 +39,8 @@ Create Single Elan
     OpenStackOperations.Create Port    @{NETWORKS}[0]    ${NET_1_PORTS[0]}    sg=${SECURITY_GROUP}
     OpenStackOperations.Create Port    @{NETWORKS}[0]    ${NET_1_PORTS[1]}    sg=${SECURITY_GROUP}
     BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${PORT_URL}    ${NET_1_PORTS}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${NET_1_PORTS[0]}    ${NET_1_VMS[0]}    ${OS_COMPUTE_1_IP}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${NET_1_PORTS[1]}    ${NET_1_VMS[1]}    ${OS_COMPUTE_2_IP}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${NET_1_PORTS[0]}    ${NET_1_VMS[0]}    ${OS_CMP1_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${NET_1_PORTS[1]}    ${NET_1_VMS[1]}    ${OS_CMP2_HN}    sg=${SECURITY_GROUP}
     @{NET_1_VM_IPS}    ${NET_1_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_1_VMS}
     Builtin.Set Suite Variable    @{NET_1_VM_IPS}
     BuiltIn.Should Not Contain    ${NET_1_VM_IPS}    None
@@ -80,7 +80,7 @@ Verify Datapath After Recreate VM Instance
     ${smac_cn1} =    BuiltIn.Create List    @{NET_1_MACS}[0]
     BuiltIn.Wait Until Keyword Succeeds    30s    10s    Verify Flows Are Removed For ELAN Service    ${OS_COMPUTE_1_IP}    ${smac_cn1}
     OpenStackOperations.Remove RSA Key From KnownHosts    @{NET_1_VM_IPS}[0]
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${NET_1_PORTS[0]}    ${NET_1_VMS[0]}    ${OS_COMPUTE_1_IP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${NET_1_PORTS[0]}    ${NET_1_VMS[0]}    ${OS_CMP1_HN}
     @{NET_1_VM_IPS}    ${NET_1_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_1_VMS}
     Builtin.Set Suite Variable    @{NET_1_VM_IPS}
     BuiltIn.Should Not Contain    ${NET_1_VM_IPS}    None
@@ -146,10 +146,10 @@ MultipleElan Testsuite Setup
     OpenStackOperations.Create Port    @{NETWORKS}[2]    ${NET_3_PORTS[0]}    sg=${SECURITY_GROUP}
     OpenStackOperations.Create Port    @{NETWORKS}[2]    ${NET_3_PORTS[1]}    sg=${SECURITY_GROUP}
     BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${PORT_URL}    ${NET_3_PORTS}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${NET_2_PORTS[0]}    ${NET_2_VMS[0]}    ${OS_COMPUTE_1_IP}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${NET_2_PORTS[1]}    ${NET_2_VMS[1]}    ${OS_COMPUTE_2_IP}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${NET_3_PORTS[0]}    ${NET_3_VMS[0]}    ${OS_COMPUTE_1_IP}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${NET_3_PORTS[1]}    ${NET_3_VMS[1]}    ${OS_COMPUTE_2_IP}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${NET_2_PORTS[0]}    ${NET_2_VMS[0]}    ${OS_CMP1_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${NET_2_PORTS[1]}    ${NET_2_VMS[1]}    ${OS_CMP2_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${NET_3_PORTS[0]}    ${NET_3_VMS[0]}    ${OS_CMP1_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node    ${NET_3_PORTS[1]}    ${NET_3_VMS[1]}    ${OS_CMP2_HN}    sg=${SECURITY_GROUP}
     @{NET_2_VM_IPS}    ${NET_2_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_2_VMS}
     @{NET_3_VM_IPS}    ${NET_3_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_3_VMS}
     Builtin.Set Suite Variable    @{NET_2_VM_IPS}
index 489447592fc080f4f1ef72f9db64fa295678cf4b..17a87c3d2145e66ee0d3975aaa13003f629165fd 100644 (file)
@@ -168,12 +168,12 @@ Create Setup
     OpenStackOperations.Create Port    @{NETWORKS}[1]    @{PORTS}[3]    sg=${SECURITY_GROUP}    allowed_address_pairs=@{EXTRA_NW_IP}
     OpenStackOperations.Create Port    @{NETWORKS}[2]    @{PORTS}[4]    sg=${SECURITY_GROUP}    allowed_address_pairs=@{EXTRA_NW_IP}
     OpenStackOperations.Create Port    @{NETWORKS}[2]    @{PORTS}[5]    sg=${SECURITY_GROUP}    allowed_address_pairs=@{EXTRA_NW_IP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[0]    @{NET_1_VMS}[0]    ${OS_COMPUTE_1_IP}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[1]    @{NET_1_VMS}[1]    ${OS_COMPUTE_2_IP}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[2]    @{NET_2_VMS}[0]    ${OS_COMPUTE_1_IP}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[3]    @{NET_2_VMS}[1]    ${OS_COMPUTE_2_IP}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[4]    @{NET_3_VMS}[0]    ${OS_COMPUTE_1_IP}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[5]    @{NET_3_VMS}[1]    ${OS_COMPUTE_2_IP}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[0]    @{NET_1_VMS}[0]    ${OS_CMP1_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[1]    @{NET_1_VMS}[1]    ${OS_CMP2_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[2]    @{NET_2_VMS}[0]    ${OS_CMP1_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[3]    @{NET_2_VMS}[1]    ${OS_CMP2_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[4]    @{NET_3_VMS}[0]    ${OS_CMP1_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[5]    @{NET_3_VMS}[1]    ${OS_CMP2_HN}    sg=${SECURITY_GROUP}
     OpenStackOperations.Create Router    ${ROUTERS}
     OpenStackOperations.Add Router Interface    ${ROUTERS}    @{SUBNETS}[1]
     OpenStackOperations.Add Router Interface    ${ROUTERS}    @{SUBNETS}[2]
index 46477b1327d963237e43396dddfe63ca5d8587f2..92f4af1a88505c0cdf5eb5598f4cb5ee54bd9f8a 100644 (file)
@@ -120,10 +120,10 @@ Create Basic Configuartion for BGP VPNservice Suite
     : FOR    ${network}    ${port}    IN ZIP    ${NETWORKS}    ${PORTS}
     \    OpenStackOperations.Create Port    ${network}    ${port}    sg=${SECURITY_GROUP}
     BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${PORT_URL}    ${PORTS}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[0]    @{VM_NAMES}[0]    ${OS_COMPUTE_1_IP}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[1]    @{VM_NAMES}[1]    ${OS_COMPUTE_1_IP}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[2]    @{VM_NAMES}[2]    ${OS_COMPUTE_2_IP}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[3]    @{VM_NAMES}[3]    ${OS_COMPUTE_2_IP}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[0]    @{VM_NAMES}[0]    ${OS_CMP1_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[1]    @{VM_NAMES}[1]    ${OS_CMP1_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[2]    @{VM_NAMES}[2]    ${OS_CMP2_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[3]    @{VM_NAMES}[3]    ${OS_CMP2_HN}    sg=${SECURITY_GROUP}
     @{VM_IPS}    ${DHCP_IPS} =    OpenStackOperations.Get VM IPs    @{VM_NAMES}
     BuiltIn.Set Suite Variable    @{VM_IPS}
     BuiltIn.Should Not Contain    ${VM_IPS}    None
index 87f83792a6779c46511824502d41f01992eb00c1..7963053c88604cd17abc63dcdd88770b2bf69213 100644 (file)
@@ -72,10 +72,10 @@ Create Neutron Ports
     Should Contain    ${output}    ${UPDATE_PORT}
 
 Create Nova VMs
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[0]    @{NET_1_VMS}[0]    ${OS_COMPUTE_1_IP}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[1]    @{NET_1_VMS}[1]    ${OS_COMPUTE_2_IP}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[2]    @{NET_2_VMS}[0]    ${OS_COMPUTE_1_IP}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[3]    @{NET_2_VMS}[1]    ${OS_COMPUTE_2_IP}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[0]    @{NET_1_VMS}[0]    ${OS_CMP1_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[1]    @{NET_1_VMS}[1]    ${OS_CMP2_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[2]    @{NET_2_VMS}[0]    ${OS_CMP1_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[3]    @{NET_2_VMS}[1]    ${OS_CMP2_HN}    sg=${SECURITY_GROUP}
     @{NET_1_VM_IPS}    ${NET_1_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_1_VMS}
     @{NET_2_VM_IPS}    ${NET_2_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_2_VMS}
     BuiltIn.Set Suite Variable    @{NET_1_VM_IPS}
index ba02bbde191970a685b9bdd2c0a5d0e0fc3c00f5..86f194c7f9d2ec92b45068149453e211ddd3bac2 100644 (file)
@@ -87,10 +87,10 @@ Create Neutron Ports
     OpenStackOperations.Update Port    ${UPDATE_PORT}    additional_args=--name @{PORTS}[0]
 
 Create Nova VMs
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[0]    @{NET_1_VMS}[0]    ${OS_COMPUTE_1_IP}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[1]    @{NET_1_VMS}[1]    ${OS_COMPUTE_2_IP}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[2]    @{NET_2_VMS}[0]    ${OS_COMPUTE_1_IP}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[3]    @{NET_2_VMS}[1]    ${OS_COMPUTE_2_IP}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[0]    @{NET_1_VMS}[0]    ${OS_CMP1_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[1]    @{NET_1_VMS}[1]    ${OS_CMP2_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[2]    @{NET_2_VMS}[0]    ${OS_CMP1_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[3]    @{NET_2_VMS}[1]    ${OS_CMP2_HN}    sg=${SECURITY_GROUP}
     ${vms}=    BuiltIn.Create List    @{NET_1_VMS}    @{NET_2_VMS}
     : FOR    ${vm}    IN    @{vms}
     \    OpenStackOperations.Poll VM Is ACTIVE    ${vm}
index 42520124dada7a7b6961444d6f323f09aacb06b3..b4b4e92029bee8d0b3e1a806bacc36a4c117ba31 100644 (file)
@@ -102,11 +102,15 @@ Take Down ODL2
 
 Create Vm Instances For net_1
     [Documentation]    Create Vm instances using flavor and image names for a network.
-    OpenStackOperations.Create Vm Instances    @{NETWORKS}[0]    ${NET_1_VMS}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance On Compute Node    @{NETWORKS}[0]    @{NET_1_VMS}[0]    ${OS_CMP1_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance On Compute Node    @{NETWORKS}[0]    @{NET_1_VMS}[1]    ${OS_CMP1_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance On Compute Node    @{NETWORKS}[0]    @{NET_1_VMS}[2]    ${OS_CMP2_HN}    sg=${SECURITY_GROUP}
 
 Create Vm Instances For net_2
     [Documentation]    Create Vm instances using flavor and image names for a network.
-    OpenStackOperations.Create Vm Instances    @{NETWORKS}[1]    ${NET_2_VMS}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance On Compute Node    @{NETWORKS}[1]    @{NET_2_VMS}[0]    ${OS_CMP1_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance On Compute Node    @{NETWORKS}[1]    @{NET_2_VMS}[1]    ${OS_CMP2_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance On Compute Node    @{NETWORKS}[1]    @{NET_2_VMS}[2]    ${OS_CMP2_HN}    sg=${SECURITY_GROUP}
 
 Check Vm Instances Have Ip Address
     @{NET_1_VM_IPS}    ${NET_1_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_1_VMS}
index ecaad95f18b0bebb9c8a8d1c53f4e4178758fa5b..2f1fd7ddff50853531b7bf26b6433b504db4eb2c 100644 (file)
@@ -57,7 +57,9 @@ Take Down ODL1
 
 Create Vm Instances For net_1
     [Documentation]    Create Vm instances using flavor and image names for a network.
-    OpenStackOperations.Create Vm Instances    @{NETWORKS}[0]    ${NET_1_VMS}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance On Compute Node    @{NETWORKS}[0]    @{NET_1_VMS}[0]    ${OS_CMP1_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance On Compute Node    @{NETWORKS}[0]    @{NET_1_VMS}[1]    ${OS_CMP1_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance On Compute Node    @{NETWORKS}[0]    @{NET_1_VMS}[2]    ${OS_CMP2_HN}    sg=${SECURITY_GROUP}
 
 Bring Up ODL1
     [Documentation]    Bring up ODL1 again
@@ -69,7 +71,9 @@ Take Down ODL2
 
 Create Vm Instances For net_2
     [Documentation]    Create Vm instances using flavor and image names for a network.
-    OpenStackOperations.Create Vm Instances    @{NETWORKS}[1]    ${NET_2_VMS}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance On Compute Node    @{NETWORKS}[1]    @{NET_2_VMS}[0]    ${OS_CMP1_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance On Compute Node    @{NETWORKS}[1]    @{NET_2_VMS}[1]    ${OS_CMP2_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance On Compute Node    @{NETWORKS}[1]    @{NET_2_VMS}[2]    ${OS_CMP2_HN}    sg=${SECURITY_GROUP}
 
 Check Vm Instances Have Ip Address
     @{NET_1_L3_VM_IPS}    ${NET_1_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_1_VMS}
index 557b1882acd59e65b1cf0beb19d5af8ec03511d4..e604ec3a53308a34318d59bfe7835476c664b8fd 100644 (file)
@@ -50,8 +50,10 @@ Add Ssh Allow Rule
 
 Create Vm Instances
     [Documentation]    Create VM instances using flavor and image names for a network.
-    OpenStackOperations.Create Vm Instances    @{NETWORKS}[0]    ${FIP_VMS}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instances    @{NETWORKS}[0]    ${SNAT_VMS}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance On Compute Node    @{NETWORKS}[0]    @{FIP_VMS}[0]    ${OS_CMP1_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance On Compute Node    @{NETWORKS}[0]    @{FIP_VMS}[1]    ${OS_CMP2_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance On Compute Node    @{NETWORKS}[0]    @{SNAT_VMS}[0]    ${OS_CMP1_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance On Compute Node    @{NETWORKS}[0]    @{SNAT_VMS}[1]    ${OS_CMP2_HN}    sg=${SECURITY_GROUP}
 
 Check Vm Instances Have Ip Address
     @{FIP_VM_IPS}    ${FLOATING_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{FIP_VMS}
index a23bde09461cb67e4c98c754708bb6c7dd549d31..579de78f55f17181bf81915dfff50e057b875b6e 100644 (file)
@@ -50,12 +50,16 @@ Add Ssh Allow All Rule
     OpenStackOperations.Create Allow All SecurityGroup    ${SECURITY_GROUP}
 
 Create Vm Instances For net_1
-    [Documentation]    Create Vm instances using flavor and image names for a network.
-    OpenStackOperations.Create Vm Instances    @{NETWORKS}[0]    ${NET_1_VMS}    sg=${SECURITY_GROUP}
+    [Documentation]    Create VM instances using flavor and image names for a network.
+    OpenStackOperations.Create Vm Instance On Compute Node    @{NETWORKS}[0]    @{NET_1_VMS}[0]    ${OS_CMP1_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance On Compute Node    @{NETWORKS}[0]    @{NET_1_VMS}[1]    ${OS_CMP1_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance On Compute Node    @{NETWORKS}[0]    @{NET_1_VMS}[2]    ${OS_CMP2_HN}    sg=${SECURITY_GROUP}
 
 Create Vm Instances For net_2
-    [Documentation]    Create Vm instances using flavor and image names for a network.
-    OpenStackOperations.Create Vm Instances    @{NETWORKS}[1]    ${NET_2_VMS}    sg=${SECURITY_GROUP}
+    [Documentation]    Create VM instances using flavor and image names for a network.
+    OpenStackOperations.Create Vm Instance On Compute Node    @{NETWORKS}[1]    @{NET_2_VMS}[0]    ${OS_CMP1_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance On Compute Node    @{NETWORKS}[1]    @{NET_2_VMS}[1]    ${OS_CMP2_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance On Compute Node    @{NETWORKS}[1]    @{NET_2_VMS}[2]    ${OS_CMP2_HN}    sg=${SECURITY_GROUP}
 
 Check Vm Instances Have Ip Address
     @{NET_1_VM_IPS}    ${NET_1_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_1_VMS}
index 8105acb8568dc7526b24cc9c8c0a0e1b5ce7c457..4ec87077a72b88217fcadb36cc38db251ca1f030 100644 (file)
@@ -59,24 +59,30 @@ Add Ssh Allow All Rule
     OpenStackOperations.Create Allow All SecurityGroup    ${SECURITY_GROUP}
 
 Create Vm Instances For net_1
-    [Documentation]    Create Vm instances using flavor and image names for a network.
-    OpenStackOperations.Create Vm Instances    @{NETWORKS}[0]    ${NET_1_VMS}    sg=${SECURITY_GROUP}
+    [Documentation]    Create VM instances using flavor and image names for a network.
+    OpenStackOperations.Create Vm Instance On Compute Node    @{NETWORKS}[0]    @{NET_1_VMS}[0]    ${OS_CMP1_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance On Compute Node    @{NETWORKS}[0]    @{NET_1_VMS}[1]    ${OS_CMP1_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance On Compute Node    @{NETWORKS}[0]    @{NET_1_VMS}[2]    ${OS_CMP2_HN}    sg=${SECURITY_GROUP}
 
 Create Vm Instances For net_2
-    [Documentation]    Create Vm instances using flavor and image names for a network.
-    OpenStackOperations.Create Vm Instances    @{NETWORKS}[1]    ${NET_2_VMS}    sg=${SECURITY_GROUP}
+    [Documentation]    Create VM instances using flavor and image names for a network.
+    OpenStackOperations.Create Vm Instance On Compute Node    @{NETWORKS}[1]    @{NET_2_VMS}[0]    ${OS_CMP1_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance On Compute Node    @{NETWORKS}[1]    @{NET_2_VMS}[1]    ${OS_CMP2_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance On Compute Node    @{NETWORKS}[1]    @{NET_2_VMS}[2]    ${OS_CMP2_HN}    sg=${SECURITY_GROUP}
 
 Create Vm Instances For net_3
-    [Documentation]    Create Vm instances using flavor and image names for a network.
-    OpenStackOperations.Create Vm Instances    @{NETWORKS}[2]    ${NET_3_VMS}    sg=${SECURITY_GROUP}
+    [Documentation]    Create VM instances using flavor and image names for a network.
+    OpenStackOperations.Create Vm Instance On Compute Node    @{NETWORKS}[2]    @{NET_3_VMS}[0]    ${OS_CMP1_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance On Compute Node    @{NETWORKS}[2]    @{NET_3_VMS}[1]    ${OS_CMP1_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance On Compute Node    @{NETWORKS}[2]    @{NET_3_VMS}[2]    ${OS_CMP2_HN}    sg=${SECURITY_GROUP}
 
 Check Vm Instances Have Ip Address
     @{NET_1_L3_VM_IPS}    ${NET_1_L3_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_1_VMS}
     @{NET_2_L3_VM_IPS}    ${NET_2_L3_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_2_VMS}
     @{NET_3_L3_VM_IPS}    ${NET_3_L3_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_3_VMS}
-    BuiltIn.Set Suite Variable    ${NET_1_L3_VM_IPS}
-    BuiltIn.Set Suite Variable    ${NET_2_L3_VM_IPS}
-    BuiltIn.Set Suite Variable    ${NET_3_L3_VM_IPS}
+    BuiltIn.Set Suite Variable    @{NET_1_L3_VM_IPS}
+    BuiltIn.Set Suite Variable    @{NET_2_L3_VM_IPS}
+    BuiltIn.Set Suite Variable    @{NET_3_L3_VM_IPS}
     BuiltIn.Should Not Contain    ${NET_1_L3_VM_IPS}    None
     BuiltIn.Should Not Contain    ${NET_2_L3_VM_IPS}    None
     BuiltIn.Should Not Contain    ${NET_3_L3_VM_IPS}    None
index 84f5d1fd253a74fcefd8ecb84b394d09df75b04a..48dac02b9ea3ea8c583543eefcb8ccb98426cd83 100644 (file)
@@ -45,11 +45,12 @@ Add TCP Allow Rules
 
 Create Vm Instances For net_1
     [Documentation]    Create VM instances using flavor and image names for a network.
-    OpenStackOperations.Create Vm Instances    @{NETWORKS}[0]    ${NET_1_VMS}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance On Compute Node    @{NETWORKS}[0]    @{NET_1_VMS}[0]    ${OS_CMP1_HN}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance On Compute Node    @{NETWORKS}[0]    @{NET_1_VMS}[1]    ${OS_CMP2_HN}    sg=${SECURITY_GROUP}
 
 Create Vm Instances For net_2
     [Documentation]    Create VM instances using flavor and image names for a network.
-    OpenStackOperations.Create Vm Instances    @{NETWORKS}[1]    ${NET_2_VMS}    sg=${SECURITY_GROUP}
+    OpenStackOperations.Create Vm Instance On Compute Node    @{NETWORKS}[1]    @{NET_2_VMS}[0]    ${OS_CMP1_HN}    sg=${SECURITY_GROUP}
 
 Check Vm Instances Have Ip Address
     @{NET_1_VM_IPS}    ${NET_1_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_1_VMS}