2 Documentation Test suite to verify packet flows between vm instances.
3 Suite Setup Devstack Suite Setup
5 Library OperatingSystem
6 Library RequestsLibrary
7 Resource ../../../libraries/Utils.robot
8 Resource ../../../libraries/OpenStackOperations.robot
9 Resource ../../../libraries/DevstackUtils.robot
12 @{NETWORKS_NAME} network_1 network_2
13 @{SUBNETS_NAME} subnet_1 subnet_2
14 @{NET_1_VM_INSTANCES} MyFirstInstance_1 MySecondInstance_1
15 @{NET_2_VM_INSTANCES} MyFirstInstance_2 MySecondInstance_2
16 @{NET_1_VM_IPS} 30.0.0.3 30.0.0.4
17 @{NET_2_VM_IPS} 40.0.0.3 40.0.0.4
18 @{VM_IPS_NOT_DELETED} 30.0.0.4
19 @{GATEWAY_IPS} 30.0.0.1 40.0.0.1
20 @{DHCP_IPS} 30.0.0.2 40.0.0.2
21 @{SUBNETS_RANGE} 30.0.0.0/24 40.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}
47 List Networks With Namespaces
48 ${output}= Write Commands Until Prompt sudo ip netns list
51 Ping Vm Instance1 In network_1
52 [Documentation] Check reachability of vm instances by pinging to them.
53 Ping Vm From DHCP Namespace network_1 @{NET_1_VM_IPS}[0]
55 Ping Vm Instance2 In network_1
56 [Documentation] Check reachability of vm instances by pinging to them.
57 Ping Vm From DHCP Namespace network_1 @{NET_1_VM_IPS}[1]
59 Ping Vm Instance1 In network_2
60 [Documentation] Check reachability of vm instances by pinging to them.
61 Ping Vm From DHCP Namespace network_2 @{NET_2_VM_IPS}[0]
63 Ping Vm Instance2 In network_2
64 [Documentation] Check reachability of vm instances by pinging to them.
65 Ping Vm From DHCP Namespace network_2 @{NET_2_VM_IPS}[1]
67 Connectivity Tests From Vm Instance1 In network_1
68 [Documentation] Logging to the vm instance1
69 ${dst_ip_list}= Create List @{NET_1_VM_IPS}[1] @{DHCP_IPS}[0]
71 Test Operations From Vm Instance network_1 @{NET_1_VM_IPS}[0] ${dst_ip_list}
73 Connectivity Tests From Vm Instance2 In network_1
74 [Documentation] Logging to the vm instance2
75 ${dst_ip_list}= Create List @{NET_1_VM_IPS}[0] @{DHCP_IPS}[0]
77 Test Operations From Vm Instance network_1 @{NET_1_VM_IPS}[1] ${dst_ip_list}
79 Connectivity Tests From Vm Instance1 In network_2
80 [Documentation] Logging to the vm instance1
81 ${dst_ip_list}= Create List @{NET_2_VM_IPS}[1] @{DHCP_IPS}[1]
83 Test Operations From Vm Instance network_2 @{NET_2_VM_IPS}[0] ${dst_ip_list}
85 Connectivity Tests From Vm Instance2 In network_2
86 [Documentation] Logging to the vm instance2
87 ${dst_ip_list}= Create List @{NET_2_VM_IPS}[0] @{DHCP_IPS}[1]
89 Test Operations From Vm Instance network_2 @{NET_2_VM_IPS}[1] ${dst_ip_list}
92 [Documentation] Delete Vm instances using instance names.
93 Delete Vm Instance MyFirstInstance_1
95 No Ping For Deleted Vm
96 [Documentation] Check non reachability of deleted vm instances by pinging to them.
97 ${output}= Ping Vm From DHCP Namespace ${net_id} @{NET_1_VM_IPS}[0]
99 Delete Vm Instances In network_1
100 [Documentation] Delete Vm instances using instance names in network_1.
101 : FOR ${VmElement} IN @{NET_1_VM_INSTANCES}
102 \ Delete Vm Instance ${VmElement}
104 Delete Vm Instances In network_2
105 [Documentation] Delete Vm instances using instance names in network_2.
106 : FOR ${VmElement} IN @{NET_2_VM_INSTANCES}
107 \ Delete Vm Instance ${VmElement}
109 Delete Sub Networks In network_1
110 [Documentation] Delete Sub Nets for the Networks with neutron request.
111 Delete SubNet subnet_1
113 Delete Sub Networks In network_2
114 [Documentation] Delete Sub Nets for the Networks with neutron request.
115 Delete SubNet subnet_2
118 [Documentation] Delete Networks with neutron request.
119 : FOR ${NetworkElement} IN @{NETWORKS_NAME}
120 \ Delete Network ${NetworkElement}