${SECURITY_GROUP} sg-connectivity
@{NETWORKS_NAME} network_1 network_2 network_3
@{SUBNETS_NAME} subnet_1 subnet_2 subnet_3
-@{NET_1_VM_INSTANCES} l3_instance_net_1_1 l3_instance_net_1_2 l3_instance_net_1_3
-@{NET_2_VM_INSTANCES} l3_instance_net_2_1 l3_instance_net_2_2 l3_instance_net_2_3
-@{NET_3_VM_INSTANCES} l3_instance_net_3_1 l3_instance_net_3_2 l3_instance_net_3_3
+@{NET_1_VM_INSTANCES} l3_net_1_vm_1 l3_net_1_vm_2 l3_net_1_vm_3
+@{NET_2_VM_INSTANCES} l3_net_2_vm_1 l3_net_2_vm_2 l3_net_2_vm_3
+@{NET_3_VM_INSTANCES} l3_net_3_vm_1 l3_net_3_vm_2 l3_net_3_vm_3
@{SUBNETS_RANGE} 50.0.0.0/24 60.0.0.0/24 70.0.0.0/24
${network1_vlan_id} 1236
Create Vm Instances network_3 ${NET_3_VM_INSTANCES} sg=${SECURITY_GROUP}
Check Vm Instances Have Ip Address
- [Documentation] Test case to verify that all created VMs are ready and have received their ip addresses.
- ... We are polling first and longest on the last VM created assuming that if it's received it's address
- ... already the other instances should have theirs already or at least shortly thereafter.
- # first, ensure all VMs are in ACTIVE state. if not, we can just fail the test case and not waste time polling
- # for dhcp addresses
- : FOR ${vm} IN @{NET_1_VM_INSTANCES} @{NET_2_VM_INSTANCES} @{NET_3_VM_INSTANCES}
- \ Wait Until Keyword Succeeds 600s 5s Verify VM Is ACTIVE ${vm}
- ${status} ${message} Run Keyword And Ignore Error Wait Until Keyword Succeeds 60s 5s Collect VM IP Addresses
- ... true @{NET_1_VM_INSTANCES}
- ${status} ${message} Run Keyword And Ignore Error Wait Until Keyword Succeeds 60s 5s Collect VM IP Addresses
- ... true @{NET_2_VM_INSTANCES}
- ${status} ${message} Run Keyword And Ignore Error Wait Until Keyword Succeeds 60s 5s Collect VM IP Addresses
- ... true @{NET_3_VM_INSTANCES}
- ${NET3_L3_VM_IPS} ${NET3_DHCP_IP} Collect VM IP Addresses false @{NET_3_VM_INSTANCES}
- ${NET2_L3_VM_IPS} ${NET2_DHCP_IP} Collect VM IP Addresses false @{NET_2_VM_INSTANCES}
- ${NET1_L3_VM_IPS} ${NET1_DHCP_IP} Collect VM IP Addresses false @{NET_1_VM_INSTANCES}
- ${VM_INSTANCES}= Collections.Combine Lists ${NET_1_VM_INSTANCES} ${NET_2_VM_INSTANCES} ${NET_3_VM_INSTANCES}
- ${VM_IPS}= Collections.Combine Lists ${NET1_L3_VM_IPS} ${NET2_L3_VM_IPS} ${NET3_L3_VM_IPS}
- ${LOOP_COUNT} Get Length ${VM_INSTANCES}
- : FOR ${index} IN RANGE 0 ${LOOP_COUNT}
- \ ${status} ${message} Run Keyword And Ignore Error Should Not Contain @{VM_IPS}[${index}] None
- \ Run Keyword If '${status}' == 'FAIL' Write Commands Until Prompt nova console-log @{VM_INSTANCES}[${index}] 30s
+ @{NET1_L3_VM_IPS} ${NET1_L3_DHCP_IP} = Get VM IPs @{NET_1_VM_INSTANCES}
+ @{NET2_L3_VM_IPS} ${NET2_L3_DHCP_IP} = Get VM IPs @{NET_2_VM_INSTANCES}
+ @{NET3_L3_VM_IPS} ${NET3_L3_DHCP_IP} = Get VM IPs @{NET_3_VM_INSTANCES}
Set Suite Variable ${NET1_L3_VM_IPS}
- Set Suite Variable ${NET1_DHCP_IP}
Set Suite Variable ${NET2_L3_VM_IPS}
- Set Suite Variable ${NET2_DHCP_IP}
Set Suite Variable ${NET3_L3_VM_IPS}
- Set Suite Variable ${NET3_DHCP_IP}
Should Not Contain ${NET1_L3_VM_IPS} None
Should Not Contain ${NET2_L3_VM_IPS} None
- Should Not Contain ${NET1_DHCP_IP} None
- Should Not Contain ${NET2_DHCP_IP} None
- Should Not Contain ${NET3_DHCP_IP} None
+ Should Not Contain ${NET3_L3_VM_IPS} None
+ Should Not Contain ${NET1_L3_DHCP_IP} None
+ Should Not Contain ${NET2_L3_DHCP_IP} None
+ Should Not Contain ${NET3_L3_DHCP_IP} None
[Teardown] Run Keywords Show Debugs @{NET_1_VM_INSTANCES} @{NET_2_VM_INSTANCES} @{NET_3_VM_INSTANCES}
... AND Get Test Teardown Debugs