2 Documentation Test suite to check connectivity in L3 using routers.
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} network_1 network_2
14 @{SUBNETS_NAME} subnet_1 subnet_2
15 @{NET_1_VM_INSTANCES} l3_instance_net_1_1 l3_instance_net_1_2 l3_instance_net_1_3
16 @{NET_2_VM_INSTANCES} l3_instance_net_2_1 l3_instance_net_2_2 l3_instance_net_2_3
17 @{NET_1_VM_IPS} 50.0.0.3 50.0.0.4 50.0.0.5
18 @{NET_2_VM_IPS} 60.0.0.3 60.0.0.4 60.0.0.5
19 @{GATEWAY_IPS} 50.0.0.1 60.0.0.1
20 @{DHCP_IPS} 50.0.0.2 60.0.0.2
21 @{SUBNETS_RANGE} 50.0.0.0/24 60.0.0.0/24
25 [Documentation] Create Network with neutron request.
26 : FOR ${NetworkElement} IN @{NETWORKS_NAME}
27 \ Create Network ${NetworkElement}
29 Create Subnets For network_1
30 [Documentation] Create Sub Nets for the Networks with neutron request.
31 Create SubNet network_1 subnet_1 @{SUBNETS_RANGE}[0]
33 Create Subnets For network_2
34 [Documentation] Create Sub Nets for the Networks with neutron request.
35 Create SubNet network_2 subnet_2 @{SUBNETS_RANGE}[1]
37 Create Vm Instances For network_1
38 [Documentation] Create Four Vm instances using flavor and image names for a network.
39 Create Vm Instances network_1 ${NET_1_VM_INSTANCES}
40 [Teardown] Show Debugs ${NET_1_VM_INSTANCES}
42 Create Vm Instances For network_2
43 [Documentation] Create Four Vm instances using flavor and image names for a network.
44 Create Vm Instances network_2 ${NET_2_VM_INSTANCES}
45 [Teardown] Show Debugs ${NET_2_VM_INSTANCES}
48 [Documentation] Create Router
49 Create Router router_1
51 Add Interfaces To Router
52 [Documentation] Add Interfaces
53 : FOR ${interface} IN @{SUBNETS_NAME}
54 \ Add Router Interface router_1 ${interface}
56 Ping Vm Instance1 In network_2 From network_1
57 [Documentation] Check reachability of vm instances by pinging to them after creating routers.
58 Ping Vm From DHCP Namespace network_1 @{NET_2_VM_IPS}[0]
60 Ping Vm Instance2 In network_2 From network_1
61 [Documentation] Check reachability of vm instances by pinging to them after creating routers.
62 Ping Vm From DHCP Namespace network_1 @{NET_2_VM_IPS}[1]
64 Ping Vm Instance3 In network_2 From network_1
65 [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}[2]
68 Ping Vm Instance1 In network_1 From network_2
69 [Documentation] Check reachability of vm instances by pinging to them after creating routers.
70 Ping Vm From DHCP Namespace network_2 @{NET_1_VM_IPS}[0]
72 Ping Vm Instance2 In network_1 From network_2
73 [Documentation] Check reachability of vm instances by pinging to them after creating routers.
74 Ping Vm From DHCP Namespace network_2 @{NET_1_VM_IPS}[1]
76 Ping Vm Instance3 In network_1 From network_2
77 [Documentation] Check reachability of vm instances by pinging to them after creating routers.
78 Ping Vm From DHCP Namespace network_2 @{NET_1_VM_IPS}[2]
80 Connectivity Tests From Vm Instance1 In network_1
81 [Documentation] Logging to the vm instance using generated key pair.
82 ${dst_ip_list}= Create List @{DHCP_IPS}[0] @{NET_1_VM_IPS}[1] @{NET_1_VM_IPS}[2]
84 ${other_dst_ip_list}= Create List @{DHCP_IPS}[1] @{NET_2_VM_IPS}[0] @{NET_2_VM_IPS}[1] @{NET_2_VM_IPS}[2]
85 Log ${other_dst_ip_list}
86 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}
88 Connectivity Tests From Vm Instance2 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}
94 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}
96 Connectivity Tests From Vm Instance3 In network_1
97 [Documentation] Logging to the vm instance using generated key pair.
98 ${dst_ip_list}= Create List @{DHCP_IPS}[0] @{NET_1_VM_IPS}[1] @{NET_1_VM_IPS}[2]
100 ${other_dst_ip_list}= Create List @{DHCP_IPS}[1] @{NET_2_VM_IPS}[0] @{NET_2_VM_IPS}[1] @{NET_2_VM_IPS}[2]
101 Log ${other_dst_ip_list}
102 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}
104 Connectivity Tests From Vm Instance1 In network_2
105 [Documentation] Logging to the vm instance using generated key pair.
106 ${dst_ip_list}= Create List @{DHCP_IPS}[1] @{NET_2_VM_IPS}[1] @{NET_2_VM_IPS}[2]
108 ${other_dst_ip_list}= Create List @{DHCP_IPS}[0] @{NET_1_VM_IPS}[0] @{NET_1_VM_IPS}[1] @{NET_1_VM_IPS}[2]
109 Log ${other_dst_ip_list}
110 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}
112 Connectivity Tests From Vm Instance2 In network_2
113 [Documentation] Logging to the vm instance using generated key pair.
114 ${dst_ip_list}= Create List @{DHCP_IPS}[1] @{NET_2_VM_IPS}[0] @{NET_2_VM_IPS}[2]
116 ${other_dst_ip_list}= Create List @{DHCP_IPS}[0] @{NET_1_VM_IPS}[0] @{NET_1_VM_IPS}[1] @{NET_1_VM_IPS}[2]
117 Log ${other_dst_ip_list}
118 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}
120 Connectivity Tests From Vm Instance3 In network_2
121 [Documentation] Logging to the vm instance using generated key pair.
122 ${dst_ip_list}= Create List @{DHCP_IPS}[1] @{NET_2_VM_IPS}[0] @{NET_2_VM_IPS}[1]
124 ${other_dst_ip_list}= Create List @{DHCP_IPS}[0] @{NET_1_VM_IPS}[0] @{NET_1_VM_IPS}[1] @{NET_1_VM_IPS}[2]
125 Log ${other_dst_ip_list}
126 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}
128 Delete Vm Instances In network_1
129 [Documentation] Delete Vm instances using instance names in network_1.
130 : FOR ${VmElement} IN @{NET_1_VM_INSTANCES}
131 \ Delete Vm Instance ${VmElement}
133 Delete Vm Instances In network_2
134 [Documentation] Delete Vm instances using instance names in network_2.
135 : FOR ${VmElement} IN @{NET_2_VM_INSTANCES}
136 \ Delete Vm Instance ${VmElement}
138 Delete Router Interfaces
139 [Documentation] Remove Interface to the subnets.
140 : FOR ${interface} IN @{SUBNETS_NAME}
141 \ Remove Interface router_1 ${interface}
144 [Documentation] Delete Router and Interface to the subnets.
145 Delete Router router_1
147 Delete Sub Networks In network_1
148 [Documentation] Delete Sub Nets for the Networks with neutron request.
149 Delete SubNet subnet_1
151 Delete Sub Networks In network_2
152 [Documentation] Delete Sub Nets for the Networks with neutron request.
153 Delete SubNet subnet_2
156 [Documentation] Delete Networks with neutron request.
157 : FOR ${NetworkElement} IN @{NETWORKS_NAME}
158 \ Delete Network ${NetworkElement}