2 Documentation Test suite to verify packet flows between vm instances.
3 Suite Setup Devstack Suite Setup Tests
4 Suite Teardown Close All Connections
6 Library OperatingSystem
7 Library RequestsLibrary
8 Resource ../../../libraries/Utils.robot
9 Resource ../../../libraries/OpenStackOperations.robot
10 Resource ../../../libraries/DevstackUtils.robot
13 @{NETWORKS_NAME} l2_network_1 l2_network_2
14 @{SUBNETS_NAME} l2_subnet_1 l2_subnet_2
15 @{NET_1_VM_INSTANCES} MyFirstInstance_1 MySecondInstance_1 MyThirdInstance_1
16 @{NET_2_VM_INSTANCES} MyFirstInstance_2 MySecondInstance_2 MyThirdInstance_2
17 @{NET_1_VM_IPS} 30.0.0.3 30.0.0.4 30.0.0.5
18 @{NET_2_VM_IPS} 40.0.0.3 40.0.0.4 40.0.0.5
19 @{VM_IPS_NOT_DELETED} 30.0.0.4 30.0.0.5
20 @{GATEWAY_IPS} 30.0.0.1 40.0.0.1
21 @{DHCP_IPS} 30.0.0.2 40.0.0.2
22 @{SUBNETS_RANGE} 30.0.0.0/24 40.0.0.0/24
26 [Documentation] Create Network with neutron request.
27 : FOR ${NetworkElement} IN @{NETWORKS_NAME}
28 \ Create Network ${NetworkElement}
30 Create Subnets For l2_network_1
31 [Documentation] Create Sub Nets for the Networks with neutron request.
32 Create SubNet l2_network_1 l2_subnet_1 @{SUBNETS_RANGE}[0]
34 Create Subnets For l2_network_2
35 [Documentation] Create Sub Nets for the Networks with neutron request.
36 Create SubNet l2_network_2 l2_subnet_2 @{SUBNETS_RANGE}[1]
38 Create Vm Instances For l2_network_1
39 [Documentation] Create Four Vm instances using flavor and image names for a network.
40 Create Vm Instances l2_network_1 ${NET_1_VM_INSTANCES}
41 [Teardown] Show Debugs ${NET_1_VM_INSTANCES}
43 Create Vm Instances For l2_network_2
44 [Documentation] Create Four Vm instances using flavor and image names for a network.
45 Create Vm Instances l2_network_2 ${NET_2_VM_INSTANCES}
46 [Teardown] Show Debugs ${NET_2_VM_INSTANCES}
48 Ping Vm Instance1 In l2_network_1
49 [Documentation] Check reachability of vm instances by pinging to them.
50 Ping Vm From DHCP Namespace l2_network_1 @{NET_1_VM_IPS}[0]
52 Ping Vm Instance2 In l2_network_1
53 [Documentation] Check reachability of vm instances by pinging to them.
54 Ping Vm From DHCP Namespace l2_network_1 @{NET_1_VM_IPS}[1]
56 Ping Vm Instance3 In l2_network_1
57 [Documentation] Check reachability of vm instances by pinging to them.
58 Ping Vm From DHCP Namespace l2_network_1 @{NET_1_VM_IPS}[2]
60 Ping Vm Instance1 In l2_network_2
61 [Documentation] Check reachability of vm instances by pinging to them.
62 Ping Vm From DHCP Namespace l2_network_2 @{NET_2_VM_IPS}[0]
64 Ping Vm Instance2 In l2_network_2
65 [Documentation] Check reachability of vm instances by pinging to them.
66 Ping Vm From DHCP Namespace l2_network_2 @{NET_2_VM_IPS}[1]
68 Ping Vm Instance3 In l2_network_2
69 [Documentation] Check reachability of vm instances by pinging to them.
70 Ping Vm From DHCP Namespace l2_network_2 @{NET_2_VM_IPS}[2]
72 Connectivity Tests From Vm Instance1 In l2_network_1
73 [Documentation] Logging to the vm instance1
74 ${dst_ip_list}= Create List @{NET_1_VM_IPS}[1] @{DHCP_IPS}[0] @{NET_1_VM_IPS}[2]
76 Test Operations From Vm Instance l2_network_1 @{NET_1_VM_IPS}[0] ${dst_ip_list}
78 Connectivity Tests From Vm Instance2 In l2_network_1
79 [Documentation] Logging to the vm instance2
80 ${dst_ip_list}= Create List @{NET_1_VM_IPS}[0] @{DHCP_IPS}[0] @{NET_1_VM_IPS}[2]
82 Test Operations From Vm Instance l2_network_1 @{NET_1_VM_IPS}[1] ${dst_ip_list}
84 Connectivity Tests From Vm Instance3 In l2_network_1
85 [Documentation] Logging to the vm instance2
86 ${dst_ip_list}= Create List @{NET_1_VM_IPS}[0] @{DHCP_IPS}[0] @{NET_1_VM_IPS}[1]
88 Test Operations From Vm Instance l2_network_1 @{NET_1_VM_IPS}[2] ${dst_ip_list}
90 Connectivity Tests From Vm Instance1 In l2_network_2
91 [Documentation] Logging to the vm instance using generated key pair.
92 ${dst_ip_list}= Create List @{NET_2_VM_IPS}[1] @{DHCP_IPS}[1] @{NET_2_VM_IPS}[2]
94 Test Operations From Vm Instance l2_network_2 @{NET_2_VM_IPS}[0] ${dst_ip_list}
96 Connectivity Tests From Vm Instance2 In l2_network_2
97 [Documentation] Logging to the vm instance using generated key pair.
98 ${dst_ip_list}= Create List @{NET_2_VM_IPS}[0] @{DHCP_IPS}[1] @{NET_2_VM_IPS}[2]
100 Test Operations From Vm Instance l2_network_2 @{NET_2_VM_IPS}[1] ${dst_ip_list}
102 Connectivity Tests From Vm Instance3 In l2_network_2
103 [Documentation] Logging to the vm instance using generated key pair.
104 ${dst_ip_list}= Create List @{NET_2_VM_IPS}[0] @{DHCP_IPS}[1] @{NET_2_VM_IPS}[1]
106 Test Operations From Vm Instance l2_network_2 @{NET_2_VM_IPS}[2] ${dst_ip_list}
109 [Documentation] Delete Vm instances using instance names.
110 Delete Vm Instance MyFirstInstance_1
112 No Ping For Deleted Vm
113 [Documentation] Check non reachability of deleted vm instances by pinging to them.
114 ${output}= Ping From DHCP Should Not Succeed l2_network_1 @{NET_1_VM_IPS}[0]
116 Delete Vm Instances In l2_network_1
117 [Documentation] Delete Vm instances using instance names in l2_network_1.
118 : FOR ${VmElement} IN @{NET_1_VM_INSTANCES}
119 \ Delete Vm Instance ${VmElement}
121 Delete Vm Instances In l2_network_2
122 [Documentation] Delete Vm instances using instance names in l2_network_2.
123 : FOR ${VmElement} IN @{NET_2_VM_INSTANCES}
124 \ Delete Vm Instance ${VmElement}
126 Delete Sub Networks In l2_network_1
127 [Documentation] Delete Sub Nets for the Networks with neutron request.
128 Delete SubNet l2_subnet_1
130 Delete Sub Networks In l2_network_2
131 [Documentation] Delete Sub Nets for the Networks with neutron request.
132 Delete SubNet l2_subnet_2
135 [Documentation] Delete Networks with neutron request.
136 : FOR ${NetworkElement} IN @{NETWORKS_NAME}
137 \ Delete Network ${NetworkElement}