2 Documentation Test suite to verify packet flows between vm instances.
3 Suite Setup BuiltIn.Run Keywords SetupUtils.Setup_Utils_For_Setup_And_Teardown
4 ... AND DevstackUtils.Devstack Suite Setup Tests
5 Suite Teardown Close All Connections
6 Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
7 Test Teardown Run Keywords Show Debugs ${NET_1_VM_INSTANCES}
8 ... AND Show Debugs ${NET_2_VM_INSTANCES}
9 ... AND Get OvsDebugInfo
11 Library OperatingSystem
12 Library RequestsLibrary
13 Resource ../../../libraries/Utils.robot
14 Resource ../../../libraries/OpenStackOperations.robot
15 Resource ../../../libraries/DevstackUtils.robot
16 Resource ../../../libraries/SetupUtils.robot
19 @{NETWORKS_NAME} l2_network_1 l2_network_2
20 @{SUBNETS_NAME} l2_subnet_1 l2_subnet_2
21 @{NET_1_VM_INSTANCES} MyFirstInstance_1 MySecondInstance_1 MyThirdInstance_1
22 @{NET_2_VM_INSTANCES} MyFirstInstance_2 MySecondInstance_2 MyThirdInstance_2
23 @{NET_1_VM_IPS} 30.0.0.3 30.0.0.4 30.0.0.5
24 @{NET_2_VM_IPS} 40.0.0.3 40.0.0.4 40.0.0.5
25 @{VM_IPS_NOT_DELETED} 30.0.0.4 30.0.0.5
26 @{GATEWAY_IPS} 30.0.0.1 40.0.0.1
27 @{DHCP_IPS} 30.0.0.2 40.0.0.2
28 @{SUBNETS_RANGE} 30.0.0.0/24 40.0.0.0/24
32 [Documentation] Create Network with neutron request.
33 : FOR ${NetworkElement} IN @{NETWORKS_NAME}
34 \ Create Network ${NetworkElement}
36 Create Subnets For l2_network_1
37 [Documentation] Create Sub Nets for the Networks with neutron request.
38 Create SubNet l2_network_1 l2_subnet_1 @{SUBNETS_RANGE}[0]
40 Create Subnets For l2_network_2
41 [Documentation] Create Sub Nets for the Networks with neutron request.
42 Create SubNet l2_network_2 l2_subnet_2 @{SUBNETS_RANGE}[1]
45 [Documentation] Allow all TCP packets for testing
46 Create Security Group csit "CSIT SSH Allow"
47 Create Security Rule ingress tcp 1 65535 0.0.0.0/0 csit
48 Create Security Rule egress tcp 1 65535 0.0.0.0/0 csit
50 Create Vm Instances For l2_network_1
51 [Documentation] Create Four Vm instances using flavor and image names for a network.
52 Create Vm Instances l2_network_1 ${NET_1_VM_INSTANCES} sg=csit
54 Create Vm Instances For l2_network_2
55 [Documentation] Create Four Vm instances using flavor and image names for a network.
56 Create Vm Instances l2_network_2 ${NET_2_VM_INSTANCES} sg=csit
58 Ping Vm Instance1 In l2_network_1
59 [Documentation] Check reachability of vm instances by pinging to them.
61 Ping Vm From DHCP Namespace l2_network_1 @{NET_1_VM_IPS}[0]
63 Ping Vm Instance2 In l2_network_1
64 [Documentation] Check reachability of vm instances by pinging to them.
66 Ping Vm From DHCP Namespace l2_network_1 @{NET_1_VM_IPS}[1]
68 Ping Vm Instance3 In l2_network_1
69 [Documentation] Check reachability of vm instances by pinging to them.
71 Ping Vm From DHCP Namespace l2_network_1 @{NET_1_VM_IPS}[2]
73 Ping Vm Instance1 In l2_network_2
74 [Documentation] Check reachability of vm instances by pinging to them.
76 Ping Vm From DHCP Namespace l2_network_2 @{NET_2_VM_IPS}[0]
78 Ping Vm Instance2 In l2_network_2
79 [Documentation] Check reachability of vm instances by pinging to them.
81 Ping Vm From DHCP Namespace l2_network_2 @{NET_2_VM_IPS}[1]
83 Ping Vm Instance3 In l2_network_2
84 [Documentation] Check reachability of vm instances by pinging to them.
86 Ping Vm From DHCP Namespace l2_network_2 @{NET_2_VM_IPS}[2]
88 Connectivity Tests From Vm Instance1 In l2_network_1
89 [Documentation] Logging to the vm instance1
90 ${dst_ip_list}= Create List @{NET_1_VM_IPS}[1] @{DHCP_IPS}[0] @{NET_1_VM_IPS}[2]
93 Test Operations From Vm Instance l2_network_1 @{NET_1_VM_IPS}[0] ${dst_ip_list}
95 Connectivity Tests From Vm Instance2 In l2_network_1
96 [Documentation] Logging to the vm instance2
97 ${dst_ip_list}= Create List @{NET_1_VM_IPS}[0] @{DHCP_IPS}[0] @{NET_1_VM_IPS}[2]
100 Test Operations From Vm Instance l2_network_1 @{NET_1_VM_IPS}[1] ${dst_ip_list}
102 Connectivity Tests From Vm Instance3 In l2_network_1
103 [Documentation] Logging to the vm instance2
104 ${dst_ip_list}= Create List @{NET_1_VM_IPS}[0] @{DHCP_IPS}[0] @{NET_1_VM_IPS}[1]
107 Test Operations From Vm Instance l2_network_1 @{NET_1_VM_IPS}[2] ${dst_ip_list}
109 Connectivity Tests From Vm Instance1 In l2_network_2
110 [Documentation] Logging to the vm instance using generated key pair.
111 ${dst_ip_list}= Create List @{NET_2_VM_IPS}[1] @{DHCP_IPS}[1] @{NET_2_VM_IPS}[2]
114 Test Operations From Vm Instance l2_network_2 @{NET_2_VM_IPS}[0] ${dst_ip_list}
116 Connectivity Tests From Vm Instance2 In l2_network_2
117 [Documentation] Logging to the vm instance using generated key pair.
118 ${dst_ip_list}= Create List @{NET_2_VM_IPS}[0] @{DHCP_IPS}[1] @{NET_2_VM_IPS}[2]
121 Test Operations From Vm Instance l2_network_2 @{NET_2_VM_IPS}[1] ${dst_ip_list}
123 Connectivity Tests From Vm Instance3 In l2_network_2
124 [Documentation] Logging to the vm instance using generated key pair.
125 ${dst_ip_list}= Create List @{NET_2_VM_IPS}[0] @{DHCP_IPS}[1] @{NET_2_VM_IPS}[1]
128 Test Operations From Vm Instance l2_network_2 @{NET_2_VM_IPS}[2] ${dst_ip_list}
131 [Documentation] Delete Vm instances using instance names.
132 Delete Vm Instance MyFirstInstance_1
134 No Ping For Deleted Vm
135 [Documentation] Check non reachability of deleted vm instances by pinging to them.
137 ${output}= Ping From DHCP Should Not Succeed l2_network_1 @{NET_1_VM_IPS}[0]
139 Delete Vm Instances In l2_network_1
140 [Documentation] Delete Vm instances using instance names in l2_network_1.
141 : FOR ${VmElement} IN @{NET_1_VM_INSTANCES}
142 \ Delete Vm Instance ${VmElement}
144 Delete Vm Instances In l2_network_2
145 [Documentation] Delete Vm instances using instance names in l2_network_2.
146 : FOR ${VmElement} IN @{NET_2_VM_INSTANCES}
147 \ Delete Vm Instance ${VmElement}
149 Delete Sub Networks In l2_network_1
150 [Documentation] Delete Sub Nets for the Networks with neutron request.
151 Delete SubNet l2_subnet_1
153 Delete Sub Networks In l2_network_2
154 [Documentation] Delete Sub Nets for the Networks with neutron request.
155 Delete SubNet l2_subnet_2
158 [Documentation] Delete Networks with neutron request.
159 : FOR ${NetworkElement} IN @{NETWORKS_NAME}
160 \ Delete Network ${NetworkElement}