1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
5 ========================
6 Vping test specification
7 ========================
15 The vping test area evaluates basic NFVi capabilities of the system under test.
16 These capabilities include creating a small number of virtual machines,
17 establishing basic L3 connectivity between them and verifying connectivity by
18 means of ICMP packets.
26 - https://docs.openstack.org/shade/latest/user/index.html
30 - http://docs.paramiko.org/en/2.2/
34 - https://pypi.python.org/pypi/scp
37 Definitions and abbreviations
38 =============================
40 The following terms and abbreviations are used in conjunction with this test
43 - ICMP - Internet Control Message Protocol
45 - NFVi - Network functions virtualization infrastructure
48 - VM - Virtual machine
51 System Under Test (SUT)
52 =======================
54 The system under test is assumed to be the NFVi and VIM in operation on a
55 Pharos compliant infrastructure.
61 The test area is structured in two separate tests which are executed
62 sequentially. The order of the tests is arbitrary as there are no dependencies
69 --------------------------------------------------------------------
70 Test Case 1 - vPing using userdata provided by nova metadata service
71 --------------------------------------------------------------------
76 dovetail.vping.userdata
79 Use case specification
80 ----------------------
82 This test evaluates the use case where an NFVi tenant boots up two VMs and
83 requires L3 connectivity between those VMs. The target IP is passed to the VM
84 that will initiate pings by using a custom userdata script provided by nova metadata service.
90 At least one compute node is available. No further pre-configuration needed.
93 Basic test flow execution description and pass/fail criteria
94 ------------------------------------------------------------
96 Methodology for verifying connectivity
97 ''''''''''''''''''''''''''''''''''''''
99 Connectivity between VMs is tested by sending ICMP ping packets between
100 selected VMs. The target IP is passed to the VM sending pings by using a
101 custom userdata script by means of the config driver mechanism provided by
102 Nova metadata service. Whether or not a ping was successful is determined by
103 checking the console output of the source VMs.
110 * Create a private tenant network by using neutron client
111 * Create one subnet and one router in the network by neutron client
112 * Add one interface between the subnet and router
113 * Add one gateway route to the router by neutron client
114 * Store the network id in the response
115 * **Test assertion 1:** The network id, subnet id and router id can be found in the response
117 * Create an security group by using neutron client
118 * Store the security group id parameter in the response
119 * **Test assertion 2:** The security group id can be found in the response
120 * Test action 3: boot VM1 by using nova client with configured name, image, flavor, private tenant
121 network created in test action 1, security group created in test action 2
122 * **Test assertion 3:** The VM1 object can be found in the response
123 * Test action 4: Generate ping script with the IP of VM1 to be passed as userdata provided by
124 the **nova metadata service**.
125 * Test action 5: Boot VM2 by using nova client with configured name, image, flavor, private tenant
126 network created in test action 1, security group created in test action 2, userdata created
128 * **Test assertion 4:** The VM2 object can be found in the response
129 * Test action 6: Inside VM2, the ping script is executed automatically when booted and it contains a
130 loop doing the ping until the return code is 0 or timeout reached. For each ping, when the return
131 code is 0, "vPing OK" is printed in the VM2 console-log, otherwise, "vPing KO" is printed.
132 Monitoring the console-log of VM2 to see the response generated by the script.
133 * **Test assertion 5:** "vPing OK" is detected, when monitoring the console-log in VM2
134 * Test action 7: delete VM1, VM2
135 * **Test assertion 6:** VM1 and VM2 are not present in the VM list
136 * Test action 8: delete security group, gateway, interface, router, subnet and network
137 * **Test assertion 7:** The security group, gateway, interface, router, subnet and network are
138 no longer present in the lists after deleting
144 This test evaluates basic NFVi capabilities of the system under test.
145 Specifically, the test verifies that:
147 * Neutron client network, subnet, router, interface create commands return valid "id" parameters
148 which are shown in the create response message
149 * Neutron client interface add command to add between subnet and router returns success code
150 * Neutron client gateway add command to add to router returns success code
151 * Neutron client security group create command returns valid "id" parameter which is shown in
153 * Nova client VM create command returns valid VM attributes response message
154 * Nova metadata server can transfer userdata configuration at nova client VM booting time
155 * Ping command from one VM to the other in same private tenant network returns valid code
156 * All items created using neutron client or nova client create commands are able to be removed by
157 using the returned identifiers
159 In order to pass this test, all test assertions listed in the test execution
169 ----------------------------------------------
170 Test Case 2 - vPing using SSH to a floating IP
171 ----------------------------------------------
179 Use case specification
180 ----------------------
182 This test evaluates the use case where an NFVi tenant boots up two VMs and requires
183 L3 connectivity between those VMs. An SSH connection is establised from the host to
184 a floating IP associated with VM2 and ``ping`` is executed on VM2 with the IP of VM1 as target.
190 At least one compute node is available. There should exist an OpenStack external network
191 and can assign floating IP.
194 Basic test flow execution description and pass/fail criteria
195 ------------------------------------------------------------
197 Methodology for verifying connectivity
198 ''''''''''''''''''''''''''''''''''''''
200 Connectivity between VMs is tested by sending ICMP ping packets between
201 selected VMs. To this end, the test establishes an SSH connection from the host
202 running the test suite to a floating IP associated with VM2 and executes ``ping``
203 on VM2 with the IP of VM1 as target.
211 * Create a private tenant network by neutron client
212 * Create one subnet and one router are created in the network by using neutron client
213 * Create one interface between the subnet and router
214 * Add one gateway route to the router by neutron client
215 * Store the network id in the response
216 * **Test assertion 1:** The network id, subnet id and router id can be found in the response
218 * Create an security group by using neutron client
219 * Store the security group id parameter in the response
220 * **Test assertion 2:** The security group id can be found in the response
221 * Test action 3: Boot VM1 by using nova client with configured name, image, flavor, private tenant
222 network created in test action 1, security group created in test action 2
223 * **Test assertion 3:** The VM1 object can be found in the response
224 * Test action 4: Boot VM2 by using nova client with configured name, image, flavor, private tenant
225 network created in test action 1, security group created in test action 2
226 * **Test assertion 4:** The VM2 object can be found in the response
227 * Test action 5: create one floating IP by using neutron client, storing the floating IP address
228 returned in the response
229 * **Test assertion 5:** Floating IP address can be found in the response
230 * Test action 6: Assign the floating IP address created in test action 5 to VM2 by using nova client
231 * **Test assertion 6:** The assigned floating IP can be found in the VM2 console log file
232 * Test action 7: Establish SSH connection between the test host and VM2 through the floating IP
233 * **Test assertion 7:** SSH connection between the test host and VM2 is established within
235 * Test action 8: Copy the Ping script from the test host to VM2 by using SCPClient
236 * **Test assertion 8:** The Ping script can be found inside VM2
237 * Test action 9: Inside VM2, to execute the Ping script to ping VM1, the Ping script contains a
238 loop doing the ping until the return code is 0 or timeout reached, for each ping, when the return
239 code is 0, "vPing OK" is printed in the VM2 console-log, otherwise, "vPing KO" is printed.
240 Monitoring the console-log of VM2 to see the response generated by the script.
241 * **Test assertion 9:** "vPing OK" is detected, when monitoring the console-log in VM2
242 * Test action 10: delete VM1, VM2
243 * **Test assertion 10:** VM1 and VM2 are not present in the VM list
244 * Test action 11: delete floating IP, security group, gateway, interface, router, subnet and network
245 * **Test assertion 11:** The security group, gateway, interface, router, subnet and network are
246 no longer present in the lists after deleting
251 This test evaluates basic NFVi capabilities of the system under test.
252 Specifically, the test verifies that:
254 * Neutron client network, subnet, router, interface create commands return valid "id" parameters
255 which are shown in the create response message
256 * Neutron client interface add command to add between subnet and router return success code
257 * Neutron client gateway add command to add to router return success code
258 * Neutron client security group create command returns valid "id" parameter which is shown in the
260 * Nova client VM create command returns valid VM attributes response message
261 * Neutron client floating IP create command return valid floating IP address
262 * Nova client add floating IP command returns valid response message
263 * SSH connection can be established using a floating IP
264 * Ping command from one VM to another in same private tenant network returns valid code
265 * All items created using neutron client or nova client create commands are able to be removed by
266 using the returned identifiers
268 In order to pass this test, all test assertions listed in the test execution