2 Documentation Test suite to verify packet flows between vm instances.
3 Suite Setup Devstack Suite Setup Tests
4 Suite Teardown Close All Connections
5 Test Setup Log Testcase Start To Controller Karaf
6 Test Teardown Run Keywords Show Debugs ${NET_1_VM_INSTANCES}
7 ... AND Show Debugs ${NET_2_VM_INSTANCES}
8 ... AND Get OvsDebugInfo
10 Library OperatingSystem
11 Library RequestsLibrary
12 Resource ../../../libraries/Utils.robot
13 Resource ../../../libraries/OpenStackOperations.robot
14 Resource ../../../libraries/DevstackUtils.robot
17 @{NETWORKS_NAME} l2_network_1 l2_network_2
18 @{SUBNETS_NAME} l2_subnet_1 l2_subnet_2
19 @{NET_1_VM_INSTANCES} MyFirstInstance_1 MySecondInstance_1 MyThirdInstance_1
20 @{NET_2_VM_INSTANCES} MyFirstInstance_2 MySecondInstance_2 MyThirdInstance_2
21 @{NET_1_VM_IPS} 30.0.0.3 30.0.0.4 30.0.0.5
22 @{NET_2_VM_IPS} 40.0.0.3 40.0.0.4 40.0.0.5
23 @{VM_IPS_NOT_DELETED} 30.0.0.4 30.0.0.5
24 @{GATEWAY_IPS} 30.0.0.1 40.0.0.1
25 @{DHCP_IPS} 30.0.0.2 40.0.0.2
26 @{SUBNETS_RANGE} 30.0.0.0/24 40.0.0.0/24
30 [Documentation] Create Network with neutron request.
31 : FOR ${NetworkElement} IN @{NETWORKS_NAME}
32 \ Create Network ${NetworkElement}
34 Create Subnets For l2_network_1
35 [Documentation] Create Sub Nets for the Networks with neutron request.
36 Create SubNet l2_network_1 l2_subnet_1 @{SUBNETS_RANGE}[0]
38 Create Subnets For l2_network_2
39 [Documentation] Create Sub Nets for the Networks with neutron request.
40 Create SubNet l2_network_2 l2_subnet_2 @{SUBNETS_RANGE}[1]
43 [Documentation] Allow all TCP packets for testing
44 Create Security Group csit "CSIT SSH Allow"
45 Create Security Rule ingress tcp 1 65535 0.0.0.0/0 csit
46 Create Security Rule egress tcp 1 65535 0.0.0.0/0 csit
48 Create Vm Instances For l2_network_1
49 [Documentation] Create Four Vm instances using flavor and image names for a network.
50 Create Vm Instances l2_network_1 ${NET_1_VM_INSTANCES} sg=csit
52 Create Vm Instances For l2_network_2
53 [Documentation] Create Four Vm instances using flavor and image names for a network.
54 Create Vm Instances l2_network_2 ${NET_2_VM_INSTANCES} sg=csit
56 Ping Vm Instance1 In l2_network_1
57 [Documentation] Check reachability of vm instances by pinging to them.
59 Ping Vm From DHCP Namespace l2_network_1 @{NET_1_VM_IPS}[0]
61 Ping Vm Instance2 In l2_network_1
62 [Documentation] Check reachability of vm instances by pinging to them.
64 Ping Vm From DHCP Namespace l2_network_1 @{NET_1_VM_IPS}[1]
66 Ping Vm Instance3 In l2_network_1
67 [Documentation] Check reachability of vm instances by pinging to them.
69 Ping Vm From DHCP Namespace l2_network_1 @{NET_1_VM_IPS}[2]
71 Ping Vm Instance1 In l2_network_2
72 [Documentation] Check reachability of vm instances by pinging to them.
74 Ping Vm From DHCP Namespace l2_network_2 @{NET_2_VM_IPS}[0]
76 Ping Vm Instance2 In l2_network_2
77 [Documentation] Check reachability of vm instances by pinging to them.
79 Ping Vm From DHCP Namespace l2_network_2 @{NET_2_VM_IPS}[1]
81 Ping Vm Instance3 In l2_network_2
82 [Documentation] Check reachability of vm instances by pinging to them.
84 Ping Vm From DHCP Namespace l2_network_2 @{NET_2_VM_IPS}[2]
86 Connectivity Tests From Vm Instance1 In l2_network_1
87 [Documentation] Logging to the vm instance1
88 ${dst_ip_list}= Create List @{NET_1_VM_IPS}[1] @{DHCP_IPS}[0] @{NET_1_VM_IPS}[2]
91 Test Operations From Vm Instance l2_network_1 @{NET_1_VM_IPS}[0] ${dst_ip_list}
93 Connectivity Tests From Vm Instance2 In l2_network_1
94 [Documentation] Logging to the vm instance2
95 ${dst_ip_list}= Create List @{NET_1_VM_IPS}[0] @{DHCP_IPS}[0] @{NET_1_VM_IPS}[2]
98 Test Operations From Vm Instance l2_network_1 @{NET_1_VM_IPS}[1] ${dst_ip_list}
100 Connectivity Tests From Vm Instance3 In l2_network_1
101 [Documentation] Logging to the vm instance2
102 ${dst_ip_list}= Create List @{NET_1_VM_IPS}[0] @{DHCP_IPS}[0] @{NET_1_VM_IPS}[1]
105 Test Operations From Vm Instance l2_network_1 @{NET_1_VM_IPS}[2] ${dst_ip_list}
107 Connectivity Tests From Vm Instance1 In l2_network_2
108 [Documentation] Logging to the vm instance using generated key pair.
109 ${dst_ip_list}= Create List @{NET_2_VM_IPS}[1] @{DHCP_IPS}[1] @{NET_2_VM_IPS}[2]
112 Test Operations From Vm Instance l2_network_2 @{NET_2_VM_IPS}[0] ${dst_ip_list}
114 Connectivity Tests From Vm Instance2 In l2_network_2
115 [Documentation] Logging to the vm instance using generated key pair.
116 ${dst_ip_list}= Create List @{NET_2_VM_IPS}[0] @{DHCP_IPS}[1] @{NET_2_VM_IPS}[2]
119 Test Operations From Vm Instance l2_network_2 @{NET_2_VM_IPS}[1] ${dst_ip_list}
121 Connectivity Tests From Vm Instance3 In l2_network_2
122 [Documentation] Logging to the vm instance using generated key pair.
123 ${dst_ip_list}= Create List @{NET_2_VM_IPS}[0] @{DHCP_IPS}[1] @{NET_2_VM_IPS}[1]
126 Test Operations From Vm Instance l2_network_2 @{NET_2_VM_IPS}[2] ${dst_ip_list}
129 [Documentation] Delete Vm instances using instance names.
130 Delete Vm Instance MyFirstInstance_1
132 No Ping For Deleted Vm
133 [Documentation] Check non reachability of deleted vm instances by pinging to them.
135 ${output}= Ping From DHCP Should Not Succeed l2_network_1 @{NET_1_VM_IPS}[0]
137 Delete Vm Instances In l2_network_1
138 [Documentation] Delete Vm instances using instance names in l2_network_1.
139 : FOR ${VmElement} IN @{NET_1_VM_INSTANCES}
140 \ Delete Vm Instance ${VmElement}
142 Delete Vm Instances In l2_network_2
143 [Documentation] Delete Vm instances using instance names in l2_network_2.
144 : FOR ${VmElement} IN @{NET_2_VM_INSTANCES}
145 \ Delete Vm Instance ${VmElement}
147 Delete Sub Networks In l2_network_1
148 [Documentation] Delete Sub Nets for the Networks with neutron request.
149 Delete SubNet l2_subnet_1
151 Delete Sub Networks In l2_network_2
152 [Documentation] Delete Sub Nets for the Networks with neutron request.
153 Delete SubNet l2_subnet_2
156 [Documentation] Delete Networks with neutron request.
157 : FOR ${NetworkElement} IN @{NETWORKS_NAME}
158 \ Delete Network ${NetworkElement}