2 Documentation Test suite to check connectivity in L3 using routers.
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_IPS}
7 ... AND Show Debugs ${NET_2_VM_IPS}
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} network_1 network_2
18 @{SUBNETS_NAME} subnet_1 subnet_2
19 @{NET_1_VM_INSTANCES} l3_instance_net_1_1 l3_instance_net_1_2 l3_instance_net_1_3
20 @{NET_2_VM_INSTANCES} l3_instance_net_2_1 l3_instance_net_2_2 l3_instance_net_2_3
21 @{NET_1_VM_IPS} 50.0.0.3 50.0.0.4 50.0.0.5
22 @{NET_2_VM_IPS} 60.0.0.3 60.0.0.4 60.0.0.5
23 @{GATEWAY_IPS} 50.0.0.1 60.0.0.1
24 @{DHCP_IPS} 50.0.0.2 60.0.0.2
25 @{SUBNETS_RANGE} 50.0.0.0/24 60.0.0.0/24
29 [Documentation] Create Network with neutron request.
30 : FOR ${NetworkElement} IN @{NETWORKS_NAME}
31 \ Create Network ${NetworkElement}
33 Create Subnets For network_1
34 [Documentation] Create Sub Nets for the Networks with neutron request.
35 Create SubNet network_1 subnet_1 @{SUBNETS_RANGE}[0]
37 Create Subnets For network_2
38 [Documentation] Create Sub Nets for the Networks with neutron request.
39 Create SubNet network_2 subnet_2 @{SUBNETS_RANGE}[1]
41 Create Vm Instances For network_1
42 [Documentation] Create Four Vm instances using flavor and image names for a network.
43 Create Vm Instances network_1 ${NET_1_VM_INSTANCES} sg=csit
45 Create Vm Instances For network_2
46 [Documentation] Create Four Vm instances using flavor and image names for a network.
47 Create Vm Instances network_2 ${NET_2_VM_INSTANCES} sg=csit
50 [Documentation] Create Router
51 Create Router router_1
53 Add Interfaces To Router
54 [Documentation] Add Interfaces
55 : FOR ${interface} IN @{SUBNETS_NAME}
56 \ Add Router Interface router_1 ${interface}
58 Ping Vm Instance1 In network_2 From network_1
59 [Documentation] Check reachability of vm instances by pinging to them after creating routers.
61 Ping Vm From DHCP Namespace network_1 @{NET_2_VM_IPS}[0]
63 Ping Vm Instance2 In network_2 From network_1
64 [Documentation] Check reachability of vm instances by pinging to them after creating routers.
66 Ping Vm From DHCP Namespace network_1 @{NET_2_VM_IPS}[1]
68 Ping Vm Instance3 In network_2 From network_1
69 [Documentation] Check reachability of vm instances by pinging to them after creating routers.
71 Ping Vm From DHCP Namespace network_1 @{NET_2_VM_IPS}[2]
73 Ping Vm Instance1 In network_1 From network_2
74 [Documentation] Check reachability of vm instances by pinging to them after creating routers.
76 Ping Vm From DHCP Namespace network_2 @{NET_1_VM_IPS}[0]
78 Ping Vm Instance2 In network_1 From network_2
79 [Documentation] Check reachability of vm instances by pinging to them after creating routers.
81 Ping Vm From DHCP Namespace network_2 @{NET_1_VM_IPS}[1]
83 Ping Vm Instance3 In network_1 From network_2
84 [Documentation] Check reachability of vm instances by pinging to them after creating routers.
86 Ping Vm From DHCP Namespace network_2 @{NET_1_VM_IPS}[2]
88 Connectivity Tests From Vm Instance1 In network_1
89 [Documentation] Logging to the vm instance using generated key pair.
90 ${dst_ip_list}= Create List @{DHCP_IPS}[0] @{NET_1_VM_IPS}[1] @{NET_1_VM_IPS}[2]
92 ${other_dst_ip_list}= Create List @{DHCP_IPS}[1] @{NET_2_VM_IPS}[0] @{NET_2_VM_IPS}[1] @{NET_2_VM_IPS}[2]
93 Log ${other_dst_ip_list}
95 Test Operations From Vm Instance network_1 @{NET_1_VM_IPS}[0] ${dst_ip_list} l2_or_l3=l3 list_of_external_dst_ips=${other_dst_ip_list}
97 Connectivity Tests From Vm Instance2 In network_1
98 [Documentation] Logging to the vm instance using generated key pair.
99 ${dst_ip_list}= Create List @{DHCP_IPS}[0] @{NET_1_VM_IPS}[1] @{NET_1_VM_IPS}[2]
101 ${other_dst_ip_list}= Create List @{DHCP_IPS}[1] @{NET_2_VM_IPS}[0] @{NET_2_VM_IPS}[1] @{NET_2_VM_IPS}[2]
102 Log ${other_dst_ip_list}
104 Test Operations From Vm Instance network_1 @{NET_1_VM_IPS}[1] ${dst_ip_list} l2_or_l3=l3 list_of_external_dst_ips=${other_dst_ip_list}
106 Connectivity Tests From Vm Instance3 In network_1
107 [Documentation] Logging to the vm instance using generated key pair.
108 ${dst_ip_list}= Create List @{DHCP_IPS}[0] @{NET_1_VM_IPS}[1] @{NET_1_VM_IPS}[2]
110 ${other_dst_ip_list}= Create List @{DHCP_IPS}[1] @{NET_2_VM_IPS}[0] @{NET_2_VM_IPS}[1] @{NET_2_VM_IPS}[2]
111 Log ${other_dst_ip_list}
113 Test Operations From Vm Instance network_1 @{NET_1_VM_IPS}[2] ${dst_ip_list} l2_or_l3=l3 list_of_external_dst_ips=${other_dst_ip_list}
115 Connectivity Tests From Vm Instance1 In network_2
116 [Documentation] Logging to the vm instance using generated key pair.
117 ${dst_ip_list}= Create List @{DHCP_IPS}[1] @{NET_2_VM_IPS}[1] @{NET_2_VM_IPS}[2]
119 ${other_dst_ip_list}= Create List @{DHCP_IPS}[0] @{NET_1_VM_IPS}[0] @{NET_1_VM_IPS}[1] @{NET_1_VM_IPS}[2]
120 Log ${other_dst_ip_list}
122 Test Operations From Vm Instance network_2 @{NET_2_VM_IPS}[0] ${dst_ip_list} l2_or_l3=l3 list_of_external_dst_ips=${other_dst_ip_list}
124 Connectivity Tests From Vm Instance2 In network_2
125 [Documentation] Logging to the vm instance using generated key pair.
126 ${dst_ip_list}= Create List @{DHCP_IPS}[1] @{NET_2_VM_IPS}[0] @{NET_2_VM_IPS}[2]
128 ${other_dst_ip_list}= Create List @{DHCP_IPS}[0] @{NET_1_VM_IPS}[0] @{NET_1_VM_IPS}[1] @{NET_1_VM_IPS}[2]
129 Log ${other_dst_ip_list}
131 Test Operations From Vm Instance network_2 @{NET_2_VM_IPS}[1] ${dst_ip_list} l2_or_l3=l3 list_of_external_dst_ips=${other_dst_ip_list}
133 Connectivity Tests From Vm Instance3 In network_2
134 [Documentation] Logging to the vm instance using generated key pair.
135 ${dst_ip_list}= Create List @{DHCP_IPS}[1] @{NET_2_VM_IPS}[0] @{NET_2_VM_IPS}[1]
137 ${other_dst_ip_list}= Create List @{DHCP_IPS}[0] @{NET_1_VM_IPS}[0] @{NET_1_VM_IPS}[1] @{NET_1_VM_IPS}[2]
138 Log ${other_dst_ip_list}
140 Test Operations From Vm Instance network_2 @{NET_2_VM_IPS}[2] ${dst_ip_list} l2_or_l3=l3 list_of_external_dst_ips=${other_dst_ip_list}
142 Delete Vm Instances In network_1
143 [Documentation] Delete Vm instances using instance names in network_1.
144 : FOR ${VmElement} IN @{NET_1_VM_INSTANCES}
145 \ Delete Vm Instance ${VmElement}
147 Delete Vm Instances In network_2
148 [Documentation] Delete Vm instances using instance names in network_2.
149 : FOR ${VmElement} IN @{NET_2_VM_INSTANCES}
150 \ Delete Vm Instance ${VmElement}
152 Delete Router Interfaces
153 [Documentation] Remove Interface to the subnets.
154 : FOR ${interface} IN @{SUBNETS_NAME}
155 \ Remove Interface router_1 ${interface}
158 [Documentation] Delete Router and Interface to the subnets.
159 Delete Router router_1
161 Delete Sub Networks In network_1
162 [Documentation] Delete Sub Nets for the Networks with neutron request.
163 Delete SubNet subnet_1
165 Delete Sub Networks In network_2
166 [Documentation] Delete Sub Nets for the Networks with neutron request.
167 Delete SubNet subnet_2
170 [Documentation] Delete Networks with neutron request.
171 : FOR ${NetworkElement} IN @{NETWORKS_NAME}
172 \ Delete Network ${NetworkElement}