diff options
Diffstat (limited to 'doc/book-enea-nfv-access-system-test-specification/doc/sample_test_cases.xml')
-rw-r--r-- | doc/book-enea-nfv-access-system-test-specification/doc/sample_test_cases.xml | 855 |
1 files changed, 855 insertions, 0 deletions
diff --git a/doc/book-enea-nfv-access-system-test-specification/doc/sample_test_cases.xml b/doc/book-enea-nfv-access-system-test-specification/doc/sample_test_cases.xml new file mode 100644 index 0000000..50907ca --- /dev/null +++ b/doc/book-enea-nfv-access-system-test-specification/doc/sample_test_cases.xml | |||
@@ -0,0 +1,855 @@ | |||
1 | <?xml version="1.0" encoding="ISO-8859-1"?> | ||
2 | <chapter id="sample_testcases"> | ||
3 | <title>Sample Test Cases</title> | ||
4 | |||
5 | <para>The test cases specified in this chapter are implemented as a Sample | ||
6 | Test Suite included in the TH.</para> | ||
7 | |||
8 | <section id="vnf_dev_net_smoke"> | ||
9 | <title>VNF, Device and Network Smoke Test Cases</title> | ||
10 | |||
11 | <para>The following is an automated test suite that acts as basic smoke | ||
12 | tests for the Enea NFV Access Solution and as a sanity-check test suite | ||
13 | for the AF and TH.</para> | ||
14 | |||
15 | <section id="onb_vnf_image"> | ||
16 | <title>VNF - Onboard_VNF_Image</title> | ||
17 | |||
18 | <para><emphasis role="bold">Description: </emphasis>Onboarding a VNF | ||
19 | Image into the uCPE Manager. For details please refer to:</para> | ||
20 | |||
21 | <para><filename><AF-TH-install-dir>/playbooks/onboardVNFImage.yml</filename></para> | ||
22 | |||
23 | <para><filename><AF-TH-install-dir>/automation_framework/vnf/onboardVNFRaw.py</filename></para> | ||
24 | |||
25 | <para><emphasis role="bold">Preconditions:</emphasis></para> | ||
26 | |||
27 | <itemizedlist> | ||
28 | <listitem> | ||
29 | <para>Add the VNF Image in the <literal>vnf_image</literal> folder | ||
30 | in QCOW2 format: <programlisting><AF-TH-install-dir>/vnf_image/<VNF-Image-name>.qcow2</programlisting></para> | ||
31 | </listitem> | ||
32 | |||
33 | <listitem> | ||
34 | <para>A VNF Image JSON configuration file is created: | ||
35 | <filename><AF-TH-install-dir>/vnf_config/<VNF-Descriptor-name>/<VNF-Descriptor-name>.json</filename>.</para> | ||
36 | |||
37 | <para><emphasis role="bold">Example:</emphasis><programlisting><AF-TH-install-dir>/vnf_config/fortigateImage/fortigateImage.json</programlisting></para> | ||
38 | </listitem> | ||
39 | </itemizedlist> | ||
40 | |||
41 | <para><emphasis role="bold">Action:</emphasis> Run the | ||
42 | <filename>onboardVNFImage.yml</filename> Ansible Playbook with the | ||
43 | <literal><VNF-Image-name></literal> and the | ||
44 | <literal><VNF-Descriptor-name></literal> as extra-vars: | ||
45 | <programlisting>ansible-playbook playbooks/onboardVNFImage.yml -e "vnfb=<VNF-Image-name> \ | ||
46 | vnfd=<VNF-Descriptor-name>"</programlisting></para> | ||
47 | |||
48 | <para><emphasis role="bold">Result:</emphasis> Output of the test case | ||
49 | run using the Test Harness: <programlisting># Onboard VNF Image task result | ||
50 | <VNF-Descriptor-name> successfully onboarded!</programlisting><emphasis | ||
51 | role="bold">Note:</emphasis> The test will not fail if the VNF Image is | ||
52 | already onboarded. The output will instead contain: <programlisting># debug <VNF-Descriptor-name> already onboarded!</programlisting></para> | ||
53 | </section> | ||
54 | |||
55 | <section id="onb_vnf_bundle"> | ||
56 | <title>VNF - Onboard_VNF_Bundle<remark>since we're removing mention of | ||
57 | bundles is this section still relevant?</remark></title> | ||
58 | |||
59 | <para><emphasis role="bold">Description:</emphasis> Onboarding a VNF | ||
60 | Bundle into the uCPE Manager. For details please refer to:</para> | ||
61 | |||
62 | <para><filename><AF-TH-install-dir>/playbooks/onboardVNFBundle.yml</filename></para> | ||
63 | |||
64 | <para><filename><AF-TH-install-dir>/automation_framework/vnf/onboardVNF.py</filename></para> | ||
65 | |||
66 | <para><emphasis role="bold">Precondition:</emphasis> Add the VNF Bundle | ||
67 | in the <literal>vnf_image</literal> folder in the zip format: | ||
68 | <filename><AF-TH-install-dir>/vnf_image/<VNF-Bundle-name>.zip</filename>.</para> | ||
69 | |||
70 | <para><emphasis role="bold">Action:</emphasis> Run the | ||
71 | <filename>onboardVNFBundle.yml</filename> Ansible Playbook with the | ||
72 | <literal><VNF-Bundle-name></literal> as extra-vars: | ||
73 | <programlisting>ansible-playbook playbooks/onboardVNFBundle.yml -e "vnfb=<VNF-Bundle-name>"</programlisting></para> | ||
74 | |||
75 | <para><emphasis role="bold">Result:</emphasis> Output of the test case | ||
76 | run using the Test Harness: <programlisting># Onboard VNF Bundle task result | ||
77 | <VNF-Bundle-name> successfully onboarded!</programlisting><emphasis | ||
78 | role="bold">Note:</emphasis> The test will not fail if the VNF Bundle is | ||
79 | already onboarded. The output will instead contain: <programlisting># debug <VNF-Bundle-name> already onboarded!</programlisting></para> | ||
80 | </section> | ||
81 | |||
82 | <section id="offb_vnf"> | ||
83 | <title>VNF - Offboard_VNF</title> | ||
84 | |||
85 | <para><emphasis role="bold">Description:</emphasis> Removing a VNF | ||
86 | Descriptor from the uCPE Manager. For details please refer to:</para> | ||
87 | |||
88 | <para><filename><AF-TH-install-dir>/playbooks/offboardVNF.yml</filename></para> | ||
89 | |||
90 | <para><filename><AF-TH-install-dir>/automation_framework/vnf/offboardVNF.py</filename>.</para> | ||
91 | |||
92 | <para><emphasis role="bold">Precondition:</emphasis> The VNF has been | ||
93 | previously onboarded in the uCPE Manager instance.</para> | ||
94 | |||
95 | <para><emphasis role="bold">Action:</emphasis> Run the | ||
96 | <filename>offboardVNF.yml</filename> Ansible Playbook with the | ||
97 | <literal><VNF-Descriptor-name></literal> as extra-vars: | ||
98 | <programlisting>ansible-playbook playbooks/offboardVNF.yml -e "vnfd=<VNF-Descriptor-name>"</programlisting></para> | ||
99 | |||
100 | <para><emphasis role="bold">Result:</emphasis> Output of the test case | ||
101 | run using the Test Harness: <programlisting># Remove Descriptor task result | ||
102 | <VNF-Descriptor-name> was removed!</programlisting><emphasis | ||
103 | role="bold">Note:</emphasis> The test will not fail if the VNF | ||
104 | Descriptor does not exist. The output will instead contain: | ||
105 | <programlisting># debug No Descriptor with name <VNF-Descriptor-name>!</programlisting></para> | ||
106 | </section> | ||
107 | |||
108 | <section id="add_device"> | ||
109 | <title>Device - Add_Device</title> | ||
110 | |||
111 | <para><emphasis role="bold">Description:</emphasis> Adding a uCPE device | ||
112 | to the uCPE Manager. For details please refer to:</para> | ||
113 | |||
114 | <para><filename><AF-TH-install-dir>/playbooks/addDevice.yml</filename></para> | ||
115 | |||
116 | <para><filename><AF-TH-install-dir>/automation_framework/device/addDevice.py</filename>.</para> | ||
117 | |||
118 | <para><emphasis role="bold">Precondition:</emphasis> A device JSON | ||
119 | configuration file must be created: | ||
120 | <filename><AF-TH-install-dir>/lab_config/<Device-name>/<Device-name>.json</filename>.</para> | ||
121 | |||
122 | <para><emphasis role="bold">Example:</emphasis> <programlisting><AF-TH-install-dir>/lab_config/intelc3850-2/intelc3850-2.json</programlisting></para> | ||
123 | |||
124 | <para><emphasis role="bold">Action:</emphasis> Run the | ||
125 | <filename>addDevice.yml</filename> Ansible playbook with the | ||
126 | <filename><Device-name></filename> as extra-vars: <programlisting>ansible-playbook playbooks/addDevice.yml -e "device=<Device-name>"</programlisting></para> | ||
127 | |||
128 | <para><emphasis role="bold">Result:</emphasis> Output of the test case | ||
129 | run using the Test Harness: <programlisting># Add Device task result | ||
130 | <Device-name> device was added!</programlisting><emphasis | ||
131 | role="bold">Note:</emphasis> The test will not fail if the device | ||
132 | already exists. The output will instead contain: <programlisting># debug | ||
133 | <Device-name> device already exists!</programlisting></para> | ||
134 | </section> | ||
135 | |||
136 | <section id="remv_dev"> | ||
137 | <title>Device - Remove_Device</title> | ||
138 | |||
139 | <para><emphasis role="bold">Description:</emphasis> Removing a uCPE | ||
140 | device from the uCPE Manager. For details please refer to:</para> | ||
141 | |||
142 | <para><filename><AF-TH-install-dir>/playbooks/removeDevice.yml</filename></para> | ||
143 | |||
144 | <para><filename><AF-TH-install-dir>/automation_framework/device/removeDevice.py</filename>.</para> | ||
145 | |||
146 | <para><emphasis role="bold">Preconditions:</emphasis></para> | ||
147 | |||
148 | <itemizedlist> | ||
149 | <listitem> | ||
150 | <para>The device has to be previously added to the uCPE Manager | ||
151 | instance.</para> | ||
152 | </listitem> | ||
153 | |||
154 | <listitem> | ||
155 | <para>The device JSON configuration file must exist: | ||
156 | <programlisting><AF-TH-install-dir>/lab_config/<Device-name>/<Device-name>.json</programlisting></para> | ||
157 | </listitem> | ||
158 | </itemizedlist> | ||
159 | |||
160 | <para><emphasis role="bold">Action:</emphasis> Run the | ||
161 | <filename>removeDevice.yml</filename> Ansible Playbook with the | ||
162 | <literal><Device-name></literal> as extra-vars: <programlisting>ansible-playbook playbooks/removeDevice.yml -e "device=<Device-name>"</programlisting></para> | ||
163 | |||
164 | <para><emphasis role="bold">Result:</emphasis> Output of the test case | ||
165 | run using the Test Harness:<programlisting># Remove Device task result | ||
166 | <Device-name> device was removed!</programlisting> <emphasis | ||
167 | role="bold">Note:</emphasis> The test will not fail if the device does | ||
168 | not exist. The output will contain: <programlisting># debug | ||
169 | <Device-name> device was not found!</programlisting></para> | ||
170 | </section> | ||
171 | |||
172 | <section id="bind_nic"> | ||
173 | <title>Network - Bind_NIC</title> | ||
174 | |||
175 | <para><emphasis role="bold">Description:</emphasis> Binding a physical | ||
176 | network interface (NIC) to a device. For details please refer to:</para> | ||
177 | |||
178 | <para><filename><AF-TH-install-dir>/playbooks/bindNIC.yml</filename></para> | ||
179 | |||
180 | <para><filename><AF-TH-install-dir>/automation_framework/network/bindNetworkInterface.py</filename>.</para> | ||
181 | |||
182 | <para><emphasis role="bold">Preconditions:</emphasis></para> | ||
183 | |||
184 | <itemizedlist> | ||
185 | <listitem> | ||
186 | <para>A device must have been previously added to the uCPE Manager | ||
187 | instance.</para> | ||
188 | </listitem> | ||
189 | |||
190 | <listitem> | ||
191 | <para>A NIC JSON configuration file must exist: | ||
192 | <filename><AF-TH-install-dir>/lab_config/<Device-name>/<NIC>.json</filename>.</para> | ||
193 | |||
194 | <para><emphasis role="bold">Example:</emphasis> <programlisting><AF-TH-install-dir>/lab_config/intelc3850-2/wan_nic.json | ||
195 | <AF-TH-install-dir>/lab_config/intelc3850-2/lan_nic.json</programlisting></para> | ||
196 | </listitem> | ||
197 | </itemizedlist> | ||
198 | |||
199 | <para><emphasis role="bold">Action:</emphasis> Run the | ||
200 | <filename>bindNIC.yml</filename> Ansible Playbook with the | ||
201 | <literal><Device-name></literal> and | ||
202 | <literal><NIC></literal> as extra-vars: <programlisting>ansible-playbook playbooks/bindNIC.yml -e "device=<Device-name> nic=<NIC>"</programlisting></para> | ||
203 | |||
204 | <para><emphasis role="bold">Result:</emphasis> Output of the test case | ||
205 | run using the Test Harness: <programlisting># Bind NIC task result | ||
206 | <NIC> binded successfully!</programlisting> <emphasis | ||
207 | role="bold">Note:</emphasis> The test will not fail if the NIC is | ||
208 | already bound, it will be unbound and bound again with the provided | ||
209 | configuration.</para> | ||
210 | </section> | ||
211 | |||
212 | <section id="unbind_nic"> | ||
213 | <title>Network - Unbind_NIC</title> | ||
214 | |||
215 | <para><emphasis role="bold">Description:</emphasis> Unbinding a physical | ||
216 | network interface (NIC) from a device. For details please refer | ||
217 | to:</para> | ||
218 | |||
219 | <para><filename><AF-TH-install-dir>/playbooks/unbindNIC.yml</filename></para> | ||
220 | |||
221 | <para><filename><AF-TH-install-dir>/automation_framework/network/unbindNetworkInterface.py</filename>.</para> | ||
222 | |||
223 | <para><emphasis role="bold">Preconditions:</emphasis></para> | ||
224 | |||
225 | <itemizedlist> | ||
226 | <listitem> | ||
227 | <para>A NIC is bound to a device in a uCPE Manager instance.</para> | ||
228 | </listitem> | ||
229 | |||
230 | <listitem> | ||
231 | <para>A NIC JSON configuration file exists: | ||
232 | <filename><AF-TH-install-dir>/lab_config/<Device-name>/<NIC>.json</filename></para> | ||
233 | </listitem> | ||
234 | </itemizedlist> | ||
235 | |||
236 | <para><emphasis role="bold">Action:</emphasis> Run the | ||
237 | <filename>unbindNIC.yml</filename> Ansible Playbook with the | ||
238 | <literal><Device-name></literal> and | ||
239 | <literal><NIC></literal> as extra-vars: <programlisting>ansible-playbook playbooks/unbindNIC.yml -e "device=<Device-name> nic=<NIC>"</programlisting></para> | ||
240 | |||
241 | <para><emphasis role="bold">Result:</emphasis> Output of the test case | ||
242 | run using the Test Harness: <programlisting># Unbind NIC task result | ||
243 | <NIC> unbinded!</programlisting> <emphasis role="bold">Note:</emphasis> | ||
244 | The test will not fail if the NIC is not bound. The output will instead | ||
245 | contain:<programlisting># debug | ||
246 | <NIC> is not binded!</programlisting></para> | ||
247 | </section> | ||
248 | |||
249 | <section id="create_bri"> | ||
250 | <title>Network - Create_Bridge</title> | ||
251 | |||
252 | <para><emphasis role="bold">Description:</emphasis> Creating an OVS | ||
253 | network bridge on a uCPE device. For details please refer to:</para> | ||
254 | |||
255 | <para><filename><AF-TH-install-dir>/playbooks/addBridge.yml</filename></para> | ||
256 | |||
257 | <para><filename><AF-TH-install-dir>/automation_framework/network/newNetworkBridge.py</filename>.</para> | ||
258 | |||
259 | <para><emphasis role="bold">Precondition:</emphasis><itemizedlist> | ||
260 | <listitem> | ||
261 | <para>A NIC is bound to a device in a uCPE Manager | ||
262 | instance.</para> | ||
263 | </listitem> | ||
264 | |||
265 | <listitem> | ||
266 | <para>A Bridge JSON configuration file is created: | ||
267 | <filename><AF-TH-install-dir>/lab_config/<Device-name>/<Bridge-name>.json</filename></para> | ||
268 | |||
269 | <para><emphasis role="bold">Example:</emphasis><programlisting><AF-TH-install-dir>/lab_config/intelc3850-2/wan_br.json | ||
270 | <AF-TH-install-dir>/lab_config/intelc3850-2/lan_br.json</programlisting></para> | ||
271 | </listitem> | ||
272 | </itemizedlist></para> | ||
273 | |||
274 | <para><emphasis role="bold">Action:</emphasis> Run the | ||
275 | <filename>addBridge.yml</filename> Ansible Playbook with the | ||
276 | <literal><Device-name></literal> and the | ||
277 | <literal><Bridge-name></literal> as extra-vars: <programlisting>ansible-playbook playbooks/addBridge.yml -e "device=<Device-name> bridge=<Bridge-name>"</programlisting></para> | ||
278 | |||
279 | <para><emphasis role="bold">Result:</emphasis> Output of the test case | ||
280 | run using the Test Harness: <programlisting># Add Bridge task result | ||
281 | <Bridge-name> network bridge was added!</programlisting><emphasis | ||
282 | role="bold">Note:</emphasis> The test will not fail if there already | ||
283 | exists a bridge with the same name, it will be deleted and the bridge | ||
284 | will be created again with the provided configuration.</para> | ||
285 | </section> | ||
286 | |||
287 | <section id="remov_bri"> | ||
288 | <title>Network - Remove_Bridge</title> | ||
289 | |||
290 | <para><emphasis role="bold">Description:</emphasis> Removing an OVS | ||
291 | network bridge from a uCPE device. For details please refer to:</para> | ||
292 | |||
293 | <para><filename><AF-TH-install-dir>/playbooks/deleteBridge.yml</filename></para> | ||
294 | |||
295 | <para><filename><AF-TH-install-dir>/automation_framework/network/delNetworkBridge.py</filename>.</para> | ||
296 | |||
297 | <para><emphasis role="bold">Preconditions:</emphasis> <itemizedlist> | ||
298 | <listitem> | ||
299 | <para>A Bridge is created in a uCPE Manager instance.</para> | ||
300 | </listitem> | ||
301 | |||
302 | <listitem> | ||
303 | <para>A Bridge JSON configuration file exists: | ||
304 | <filename><AF-TH-install-dir>/lab_config/<Device-name>/<Bridge-name>.json</filename>.</para> | ||
305 | </listitem> | ||
306 | </itemizedlist><emphasis role="bold">Action:</emphasis> Run the | ||
307 | <filename>deleteBridge.yml</filename> Ansible Playbook with the | ||
308 | <literal><Device-name></literal> and the | ||
309 | <literal><Bridge-name></literal> as extra-vars: <programlisting>ansible-playbook playbooks/deleteBridge.yml -e "device=<Device-name> \ | ||
310 | bridge=<Bridge-name>"</programlisting></para> | ||
311 | |||
312 | <para><emphasis role="bold">Result:</emphasis> Output of the test case | ||
313 | run using the Test Harness: <programlisting># Delete Bridge task result | ||
314 | <Bridge-name> network bridge was deleted!</programlisting><emphasis | ||
315 | role="bold">Note:</emphasis> The test will not fail if the bridge does | ||
316 | not exist: <programlisting># debug | ||
317 | <Bridge-name> bridge not found!</programlisting></para> | ||
318 | </section> | ||
319 | </section> | ||
320 | |||
321 | <section id="vnf_deploy_lifecycle"> | ||
322 | <title>VNF Deployment and Lifecycle</title> | ||
323 | |||
324 | <para>The following details the automated suite that handles the testing | ||
325 | of the instantiation, lifecycle and destruction of a VNF for the Enea NFV | ||
326 | Access Solution.</para> | ||
327 | |||
328 | <section id="inst_vnfi"> | ||
329 | <title>Instantiate_VNFI</title> | ||
330 | |||
331 | <para><emphasis role="bold">Description:</emphasis> Creating a VNF | ||
332 | instance on a uCPE device. For details please refer to:</para> | ||
333 | |||
334 | <para><filename><AF-TH-install-dir>/playbooks/instantiateVNFI.yml</filename></para> | ||
335 | |||
336 | <para><filename><AF-TH-install-dir>/automation_framework/vnf/instantiateVNFI.py</filename>.</para> | ||
337 | |||
338 | <para><emphasis role="bold">Preconditions:</emphasis> <itemizedlist> | ||
339 | <listitem> | ||
340 | <para>A VNF Image is onboarded and a device is added to the uCPE | ||
341 | Manager. Depending on the VNF, other steps may be required.</para> | ||
342 | </listitem> | ||
343 | |||
344 | <listitem> | ||
345 | <para>A VNFI JSON configuration file is created: | ||
346 | <filename><AF-TH-install-dir>/vnf_config/<VNF-Descriptor-name>/<VNFI-name>.json</filename></para> | ||
347 | |||
348 | <para><emphasis role="bold">Example:</emphasis> <programlisting><AF-TH-install-dir>/vnf_config/fortigateImage/fortigateFWInstance.json</programlisting></para> | ||
349 | </listitem> | ||
350 | </itemizedlist></para> | ||
351 | |||
352 | <para><emphasis role="bold">Action:</emphasis> Run the | ||
353 | <filename>instantiateVNFI.yml</filename> Ansible Playbook with the | ||
354 | <literal><Device-name></literal>, | ||
355 | <literal><VNF-Descriptor-name></literal> and the | ||
356 | <literal><VNFI-name></literal> as extra-vars: <programlisting>ansible-playbook playbooks/instantiateVNFI.yml -e "device=<Device-name> \ | ||
357 | vnfd=<VNF-Descriptor-name> vnfi=<VNFI-name>"</programlisting></para> | ||
358 | |||
359 | <para><emphasis role="bold">Result:</emphasis> Output of the test case | ||
360 | run using the Test Harness: <programlisting># Instantiate VNF task result | ||
361 | <VNFI-name> was instantiated!</programlisting><emphasis | ||
362 | role="bold">Note:</emphasis> The test will not fail when the VNF | ||
363 | instance already exists. The output will contain: <programlisting># debug | ||
364 | <VNFI-name> already exists!</programlisting></para> | ||
365 | </section> | ||
366 | |||
367 | <section id="control_vnfi"> | ||
368 | <title>Control_VNFI</title> | ||
369 | |||
370 | <para><emphasis role="bold">Description:</emphasis> Changing the status | ||
371 | of a VNF instance (Pause, Resume, Stop, Start). For details please refer | ||
372 | to:</para> | ||
373 | |||
374 | <para><filename><AF-TH-install-dir>/playbooks/controlVNFI.yml</filename></para> | ||
375 | |||
376 | <para><filename><AF-TH-install-dir>/automation_framework/vnf/controlVNFI.py</filename>.</para> | ||
377 | |||
378 | <para><emphasis role="bold">Precondition:</emphasis> A VNF is | ||
379 | instantiated on a uCPE device.</para> | ||
380 | |||
381 | <para><emphasis role="bold">Action:</emphasis> Run the | ||
382 | <filename>controlVNFI.yml</filename> Ansible Playbook with the | ||
383 | <literal><Device-name></literal>, | ||
384 | <literal><VNFI-name></literal> and the | ||
385 | <literal><Command></literal> as extra-vars: <programlisting>ansible-playbook playbooks/controlVNFI.yml -e "device=<Device-name> \ | ||
386 | vnfi=<VNFI-name> status=<Command>"</programlisting>Where Command = | ||
387 | { pause | resume | stop | start }</para> | ||
388 | |||
389 | <para><emphasis role="bold">Result:</emphasis> Output of the test case | ||
390 | run using the Test Harness: <programlisting># Change VNFI Status task result | ||
391 | <VNFI-name> status was set to <Command></programlisting><emphasis | ||
392 | role="bold">Note:</emphasis> The test will not fail if the VNF instance | ||
393 | does not exist or when the specified command is not valid. Depending on | ||
394 | the case, the output will contain: <programlisting># debug | ||
395 | <VNFI-name> was not found!</programlisting><programlisting># debug | ||
396 | Invalid VNF Instance control command specified - <Command></programlisting></para> | ||
397 | </section> | ||
398 | |||
399 | <section id="destroy_vnfi"> | ||
400 | <title>Destroy_VNFI</title> | ||
401 | |||
402 | <para><emphasis role="bold">Description:</emphasis> Destroying a VNF | ||
403 | instance from a uCPE device. For details please refer to:</para> | ||
404 | |||
405 | <para><filename><AF-TH-install-dir>/playbooks/destroyVNFI.yml</filename></para> | ||
406 | |||
407 | <para><filename><AF-TH-install-dir>/automation_framework/vnf/destroyVNFI.py</filename>.</para> | ||
408 | |||
409 | <para><emphasis role="bold">Precondition:</emphasis> A VNF is | ||
410 | instantiated on a uCPE device.</para> | ||
411 | |||
412 | <para><emphasis role="bold">Action:</emphasis> Run the | ||
413 | <filename>destroyVNFI.yml</filename> Ansible Playbook with the | ||
414 | <literal><Device-name></literal> and the | ||
415 | <filename><VNFI-name></filename> as extra-vars: <programlisting>ansible-playbook playbooks/destroyVNFI.yml -e "device=<Device-name> vnfi=<VNFI-name>"</programlisting><emphasis | ||
416 | role="bold">Result:</emphasis> Output of the test case run using the | ||
417 | Test Harness:<programlisting># Destroy VNFI task result | ||
418 | <VNFI-name> was destroyed!</programlisting><emphasis | ||
419 | role="bold">Note:</emphasis> The test will not fail when the VNF | ||
420 | instance does not exist. The output will contain: <programlisting># debug | ||
421 | <VNFI-name> was not found!</programlisting></para> | ||
422 | </section> | ||
423 | </section> | ||
424 | |||
425 | <section id="serv_creat_lifecycle"> | ||
426 | <title>Service Creation and Lifecycle</title> | ||
427 | |||
428 | <para>This test suite contains more complex test cases designed to verify | ||
429 | service creation and service lifecycle management. These test cases also | ||
430 | serve as examples of how different services can be deployed using the | ||
431 | Automation Framework (AF) and the Test Harness (TH).</para> | ||
432 | |||
433 | <section id="fortigate_firewall"> | ||
434 | <title>Fortigate_VNF_as_a_Firewall</title> | ||
435 | |||
436 | <para>This test case was implemented in 2 different ways to exemplify | ||
437 | both methods supported by the AF and TH to deploy such services.</para> | ||
438 | |||
439 | <para>Prerequisites needed in order to deploy the FortiGate VNF as a | ||
440 | Firewall:</para> | ||
441 | |||
442 | <orderedlist> | ||
443 | <listitem> | ||
444 | <para>Onboard the FortiGate VNF Image.</para> | ||
445 | </listitem> | ||
446 | |||
447 | <listitem> | ||
448 | <para>Add a device.</para> | ||
449 | </listitem> | ||
450 | |||
451 | <listitem> | ||
452 | <para>Bind 2 physical interfaces, <literal>wan_nic</literal> (this | ||
453 | physical interface has to be connected to Lab Network) and | ||
454 | <literal>lan_nic</literal>.</para> | ||
455 | </listitem> | ||
456 | |||
457 | <listitem> | ||
458 | <para>Create 2 bridges, <literal>wan_br</literal> (using | ||
459 | <literal>wan_nic</literal> interface) and <literal>lan_br</literal> | ||
460 | (using <literal>lan_nic</literal> interface).</para> | ||
461 | </listitem> | ||
462 | |||
463 | <listitem> | ||
464 | <para>Instantiate the FortiGate VNF using the basic Firewall | ||
465 | configuration and the FortiGate License.</para> | ||
466 | </listitem> | ||
467 | </orderedlist> | ||
468 | |||
469 | <para>For more information please refer to "FortiGate VNF as a Firewall" | ||
470 | chapter from the "Enea NFV Access Example Use-cases" manual.<note> | ||
471 | <para>The license and configuration files for the FortiGate VNF are | ||
472 | not included in the TH and should be obtained from the user's Enea | ||
473 | Portal account.</para> | ||
474 | </note></para> | ||
475 | |||
476 | <section id="fortigate_fw_instance"> | ||
477 | <title>FortigateFWInstance Test</title> | ||
478 | |||
479 | <para><emphasis role="bold">Description:</emphasis> Instantiate the | ||
480 | FortiGate VNF as a Firewall and test it using isolated network | ||
481 | namespace.</para> | ||
482 | |||
483 | <para>This example was implemented with the "Test Harness" method, | ||
484 | based on Ansible Playbooks. For details please refer to:</para> | ||
485 | |||
486 | <itemizedlist> | ||
487 | <listitem> | ||
488 | <para><filename><AF-TH-install-dir>/playbooks/fortigateFWService/instantiateFortigateFW.yml</filename></para> | ||
489 | </listitem> | ||
490 | |||
491 | <listitem> | ||
492 | <para><filename><AF-TH-install-dir>/playbooks/fortigateFWService/testFortigateFWInstance.yml</filename></para> | ||
493 | </listitem> | ||
494 | |||
495 | <listitem> | ||
496 | <para><filename><AF-TH-install-dir>/playbooks/fortigateFWService/cleanupTestFortigateFWInstance.yml</filename></para> | ||
497 | </listitem> | ||
498 | |||
499 | <listitem> | ||
500 | <para><filename><AF-TH-install-dir>/playbooks/fortigateFWService/cleanupFortigateFWInstance.yml</filename></para> | ||
501 | </listitem> | ||
502 | </itemizedlist> | ||
503 | |||
504 | <para><emphasis role="bold">Preconditions:</emphasis></para> | ||
505 | |||
506 | <itemizedlist> | ||
507 | <listitem> | ||
508 | <para>Add the Fortigate VNF Image | ||
509 | (<filename>fortios.qcow2</filename>) to the | ||
510 | <literal>vnf_image</literal> folder.</para> | ||
511 | </listitem> | ||
512 | |||
513 | <listitem> | ||
514 | <para>Device JSON configuration file is created: | ||
515 | <filename><AF-TH-install-dir>/lab_config/<Device-name>/<Device-name>.json</filename>.</para> | ||
516 | </listitem> | ||
517 | |||
518 | <listitem> | ||
519 | <para>Add device settings in the <literal>hosts</literal> Ansible | ||
520 | inventory file under <literal>[fortigateFW]</literal> and remove | ||
521 | the <filename>intelc3850-2</filename> example.</para> | ||
522 | |||
523 | <para><emphasis role="bold">Example:</emphasis> <programlisting>intelc3850-2 ansible_host=172.24.12.114 ansible_port=22 \ | ||
524 | ansible_user=root ansible_pass=root</programlisting></para> | ||
525 | </listitem> | ||
526 | |||
527 | <listitem> | ||
528 | <para>NIC JSON configuration files are created:</para> | ||
529 | |||
530 | <para><filename><AF-TH-install-dir>/lab_config/<Device-name>/wan_nic.json</filename></para> | ||
531 | |||
532 | <para><filename><AF-TH-install-dir>/lab_config/<Device-name>/lan_nic.json</filename></para> | ||
533 | </listitem> | ||
534 | |||
535 | <listitem> | ||
536 | <para>Bridge JSON configuration files are created:</para> | ||
537 | |||
538 | <para><filename><AF-TH-install-dir>/lab_config/<Device-name>/wan_br.json</filename></para> | ||
539 | |||
540 | <para><filename><AF-TH-install-dir>/lab_config/<Device-name>/lan_br.json</filename></para> | ||
541 | </listitem> | ||
542 | |||
543 | <listitem> | ||
544 | <para>Download the FortiGate VNF Firewall basic configuration from | ||
545 | the Enea Portal, copy it into the | ||
546 | <filename><AF-TH-install-dir>/vnf_config/fortigateImage</filename> | ||
547 | directory and rename it to<filename> | ||
548 | fortigateFW.conf</filename>.</para> | ||
549 | </listitem> | ||
550 | |||
551 | <listitem> | ||
552 | <para>Retrieve the FortiGate VNF license from Fortinet or the Enea | ||
553 | Portal, copy it into the | ||
554 | <literal><AF-TH-install-dir>/vnf_config/fortigateImage</literal> | ||
555 | directory and rename it to | ||
556 | <filename>fortigateLicense.lic</filename>.</para> | ||
557 | |||
558 | <para>Please refer to "FortiGate VNF as a Firewall" chapter from | ||
559 | the Enea NFV Access Example Use-cases manual.</para> | ||
560 | </listitem> | ||
561 | </itemizedlist> | ||
562 | |||
563 | <para><emphasis role="bold">Action:</emphasis> Run the <emphasis | ||
564 | role="bold">instantiateFortigateFW.yml</emphasis> Ansible Playbook | ||
565 | with the <literal><Device-name></literal> as | ||
566 | extra-vars:<programlisting>ansible-playbook playbooks/fortigateFWService/instantiateFortigateFW.yml \ | ||
567 | -e "device=<Device-name>"</programlisting></para> | ||
568 | |||
569 | <para><emphasis role="bold">Result:</emphasis> Output of the test case | ||
570 | run using the Test Harness: <programlisting># Test FortigateFWInstance task result | ||
571 | FortigateFWInstance tested successfully!</programlisting></para> | ||
572 | |||
573 | <para><emphasis role="bold">Cleanup:</emphasis> Run the | ||
574 | <literal>cleanupFortigateFWInstance.yml</literal> Ansible Playbook | ||
575 | with the <literal><Device-name></literal> as extra-vars: | ||
576 | <programlisting>ansible-playbook playbooks/fortigateFWService/cleanupFortigateFWInstance.yml \ | ||
577 | -e "device=<Device-name>"</programlisting></para> | ||
578 | </section> | ||
579 | |||
580 | <section id="deploy_fortigate_fw"> | ||
581 | <title>DeployFortigateFW Scenario</title> | ||
582 | |||
583 | <para><emphasis role="bold">Description:</emphasis> Deploy the | ||
584 | Fortigate VNF as a Firewall. This example was implemented with the | ||
585 | "Automation Framework" method, based on the | ||
586 | <filename>unittestSuite.py</filename> Python module.</para> | ||
587 | |||
588 | <para>For details please refer to:</para> | ||
589 | |||
590 | <itemizedlist> | ||
591 | <listitem> | ||
592 | <para><literal><AF-TH-install-dir>/playbooks/unittestSuiteTest/deployFortigateFWScenario.yml</literal></para> | ||
593 | </listitem> | ||
594 | |||
595 | <listitem> | ||
596 | <para><literal><AF-TH-install-dir>/playbooks/unittestSuiteTest/cleanupFortigateFWScenario.yml</literal></para> | ||
597 | </listitem> | ||
598 | |||
599 | <listitem> | ||
600 | <para><literal><AF-TH-install-dir>/automation_framework/unittestSuite</literal> | ||
601 | directory.</para> | ||
602 | </listitem> | ||
603 | </itemizedlist> | ||
604 | |||
605 | <para><emphasis role="bold">Preconditions:</emphasis></para> | ||
606 | |||
607 | <itemizedlist> | ||
608 | <listitem> | ||
609 | <para>Add the FortiGate VNF Image | ||
610 | (<filename>fortios.qcow2</filename>) to the | ||
611 | <literal>vnf_image</literal> folder.</para> | ||
612 | </listitem> | ||
613 | |||
614 | <listitem> | ||
615 | <para>Device JSON configuration file is created: | ||
616 | <filename></filename></para> | ||
617 | |||
618 | <para><filename><AF-TH-install-dir>/lab_config/<Device-name>/<Device-name>.json</filename>.</para> | ||
619 | </listitem> | ||
620 | |||
621 | <listitem> | ||
622 | <para>NIC JSON configuration files are created:</para> | ||
623 | |||
624 | <para><filename><AF-TH-install-dir>/lab_config/<Device-name>/wan_nic.json</filename></para> | ||
625 | |||
626 | <para><filename><AF-TH-install-dir>/lab_config/<Device-name>/lan_nic.json</filename></para> | ||
627 | </listitem> | ||
628 | |||
629 | <listitem> | ||
630 | <para>Bridge JSON configuration files are created:</para> | ||
631 | |||
632 | <para><filename><AF-TH-install-dir>/lab_config/<Device-name>/wan_br.json</filename></para> | ||
633 | |||
634 | <para><filename><AF-TH-install-dir>/lab_config/<Device-name>/lan_br.json</filename></para> | ||
635 | </listitem> | ||
636 | |||
637 | <listitem> | ||
638 | <para>Download the FortiGate VNF Firewall basic configuration from | ||
639 | the Enea Portal, copy it into the | ||
640 | <literal><AF-TH-install-dir>/vnf_config/fortigateImage</literal> | ||
641 | directory and rename it to | ||
642 | <filename>fortigateFW.conf</filename>.</para> | ||
643 | </listitem> | ||
644 | |||
645 | <listitem> | ||
646 | <para>Retrieve the FortiGate VNF license file from Fortinet or the | ||
647 | Enea Portal, copy it into the | ||
648 | <literal><AF-TH-install-dir>/vnf_config/fortigateImage</literal> | ||
649 | directory and rename it to | ||
650 | <filename>fortigateLicense.lic</filename>.</para> | ||
651 | |||
652 | <para>For more details, please refer to:</para> | ||
653 | |||
654 | <itemizedlist> | ||
655 | <listitem> | ||
656 | <para>The "FortiGate VNF as a Firewall" chapter from the Enea | ||
657 | NFV Access Example Use-cases manual.</para> | ||
658 | </listitem> | ||
659 | |||
660 | <listitem> | ||
661 | <para>The "Python Unit-Test Suite" chapter from the Enea NFV | ||
662 | Access Automation Framework and Test Harness User | ||
663 | Guide.</para> | ||
664 | </listitem> | ||
665 | </itemizedlist> | ||
666 | </listitem> | ||
667 | </itemizedlist> | ||
668 | |||
669 | <para><emphasis role="bold">Action:</emphasis> Run the | ||
670 | <filename>deployFortigateFWScenario.yml</filename> Ansible Playbook | ||
671 | with the <literal><Device-name></literal> as extra-vars: | ||
672 | <programlisting>ansible-playbook playbooks/unittestSuiteTest/deployFortigateFWScenario.yml \ | ||
673 | -e "device=<Device-name>"</programlisting></para> | ||
674 | |||
675 | <para><emphasis role="bold">Result:</emphasis> Output of the test case | ||
676 | run using the Test Harness: <programlisting># unittestSuite Deploy Test task result | ||
677 | FortigateFW Scenario deployed successfully!</programlisting></para> | ||
678 | |||
679 | <para><emphasis role="bold">Cleanup:</emphasis> Run the | ||
680 | <filename>cleanupFortigateFWScenario.yml</filename> Ansible Playbook | ||
681 | with the <literal><Device-name></literal> as extra-vars: | ||
682 | <programlisting>ansible-playbook playbooks/unittestSuiteTest/cleanupFortigateFWScenario.yml \ | ||
683 | -e "device=<Device-name>"</programlisting></para> | ||
684 | </section> | ||
685 | </section> | ||
686 | |||
687 | <section id="chained_vnf"> | ||
688 | <title>chainedVNFsService</title> | ||
689 | |||
690 | <para><emphasis role="bold">Description:</emphasis> This sample test | ||
691 | case corresponds to the "VNF Chaining Example Use-case" from the Enea | ||
692 | NFV Access Example Use-cases manual.</para> | ||
693 | |||
694 | <para>For details please refer to:</para> | ||
695 | |||
696 | <itemizedlist> | ||
697 | <listitem> | ||
698 | <para><filename><AF-TH-install-dir>/playbooks/chainedVNFsService/chainedVNFsService.yml</filename></para> | ||
699 | </listitem> | ||
700 | |||
701 | <listitem> | ||
702 | <para><filename><AF-TH-install-dir>/playbooks/chainedVNFsService/testChainedVNFsService.yml</filename></para> | ||
703 | </listitem> | ||
704 | |||
705 | <listitem> | ||
706 | <para><filename><AF-TH-install-dir>/playbooks/chainedVNFsService/cleanupChainedVNFsService.yml</filename></para> | ||
707 | </listitem> | ||
708 | </itemizedlist> | ||
709 | |||
710 | <para><emphasis role="bold">Preconditions:</emphasis></para> | ||
711 | |||
712 | <itemizedlist> | ||
713 | <listitem> | ||
714 | <para>Add the Fortigate VNF Image | ||
715 | (<filename>fortios.qcow2</filename>) to the | ||
716 | <literal>vnf_image</literal> folder.</para> | ||
717 | </listitem> | ||
718 | |||
719 | <listitem> | ||
720 | <para>Add the Juniper vSRX VNF Image | ||
721 | (<filename>juniper.qcow2</filename>) to the | ||
722 | <literal>vnf_image</literal> folder.</para> | ||
723 | </listitem> | ||
724 | |||
725 | <listitem> | ||
726 | <para>Devices JSON configuration files are created, e.g.:</para> | ||
727 | |||
728 | <para><filename><AF-TH-install-dir>/lab_config/<Device-name>/<Device-name>.json</filename>.</para> | ||
729 | </listitem> | ||
730 | |||
731 | <listitem> | ||
732 | <para>Add device settings in the <literal>hosts</literal> Ansible | ||
733 | inventory file under <literal>[chainedVNFs]</literal>, keeping both | ||
734 | devices, the "site1" and "site2" entries, and updating the values | ||
735 | for <literal>ansible_host</literal>, | ||
736 | <literal>ansible_port</literal>, <literal>ansible_user</literal> and | ||
737 | <literal>ansible_pass</literal>, as applicable.</para> | ||
738 | |||
739 | <para><emphasis role="bold">Example:</emphasis></para> | ||
740 | |||
741 | <para><programlisting>site1 ansible_host=172.24.14.157 ansible_port=22 ansible_user=root \ | ||
742 | ansible_pass=root</programlisting></para> | ||
743 | |||
744 | <para><programlisting>site2 ansible_host=172.24.14.50 ansible_port=22 ansible_user=root \ | ||
745 | ansible_pass=root</programlisting></para> | ||
746 | </listitem> | ||
747 | |||
748 | <listitem> | ||
749 | <para>NIC JSON configuration files are created for each of the | ||
750 | devices, where <literal>mgmt_nic</literal> is connected to the DHCP | ||
751 | from the Lab Network and <literal>wan_nic</literal> is connected | ||
752 | back to back to the other device:</para> | ||
753 | |||
754 | <itemizedlist> | ||
755 | <listitem> | ||
756 | <para><filename><AF-TH-install-dir>/lab_config/<Device-name>/mgmt_nic.json</filename></para> | ||
757 | </listitem> | ||
758 | |||
759 | <listitem> | ||
760 | <para><filename><AF-TH-install-dir>/lab_config/<Device-name>/wan_nic.json</filename></para> | ||
761 | </listitem> | ||
762 | |||
763 | <listitem> | ||
764 | <para><filename><AF-TH-install-dir>/lab_config/<Device-name>/lan_nic.json</filename></para> | ||
765 | </listitem> | ||
766 | </itemizedlist> | ||
767 | </listitem> | ||
768 | |||
769 | <listitem> | ||
770 | <para>Bridge JSON configuration files are created for each of the | ||
771 | devices:</para> | ||
772 | |||
773 | <itemizedlist> | ||
774 | <listitem> | ||
775 | <para><filename><AF-TH-install-dir>/lab_config/<Device-name>/vnf_mgmt_br.json</filename></para> | ||
776 | </listitem> | ||
777 | |||
778 | <listitem> | ||
779 | <para><filename><AF-TH-install-dir>/lab_config/<Device-name>/sfc_br.json</filename></para> | ||
780 | </listitem> | ||
781 | |||
782 | <listitem> | ||
783 | <para><filename><AF-TH-install-dir>/lab_config/<Device-name>/wan_br.json</filename></para> | ||
784 | </listitem> | ||
785 | |||
786 | <listitem> | ||
787 | <para><filename><AF-TH-install-dir>/lab_config/<Device-name>/lan_br.json</filename></para> | ||
788 | </listitem> | ||
789 | </itemizedlist> | ||
790 | |||
791 | <para>Note that sample configuration files needed for devices' NICs | ||
792 | and bridges can be found in: | ||
793 | <literal><AF-TH-install-dir>/lab_config/inteld1521-1</literal> | ||
794 | and | ||
795 | <literal><AF-TH-install-dir>/lab_config/inteld1521-2</literal>.</para> | ||
796 | </listitem> | ||
797 | |||
798 | <listitem> | ||
799 | <para>Download the FortiGate VNF Firewall basic configuration files | ||
800 | from the Enea Portal (<filename>FortiFW-Site1.conf</filename> and | ||
801 | <filename>FortiFW-Site2.conf</filename>), and copy them into the | ||
802 | <literal><AF-TH-install-dir>/vnf_config/fortigateFWImage</literal> | ||
803 | directory.</para> | ||
804 | </listitem> | ||
805 | |||
806 | <listitem> | ||
807 | <para>Retrieve the FortiGate VNF license from Fortinet or the Enea | ||
808 | Portal, copy it into the | ||
809 | <literal><AF-TH-install-dir>/vnf_config/fortigateFWImage</literal> | ||
810 | directory and rename it to | ||
811 | <filename>fortigateLicense.lic</filename>.</para> | ||
812 | </listitem> | ||
813 | |||
814 | <listitem> | ||
815 | <para>Download the Juniper vSRX basic configuration files from the | ||
816 | Enea Portal (<filename>vSRX-Site1.iso</filename> and | ||
817 | <filename>vSRX-Site2.iso</filename>), and copy them into the | ||
818 | <literal><AF-TH-install-dir>/vnf_config/junipervSRXImage</literal> | ||
819 | directory.</para> | ||
820 | </listitem> | ||
821 | |||
822 | <listitem> | ||
823 | <para>Download <filename>vSRX-domain-update-script</filename> from | ||
824 | the Enea Portal and copy it into the | ||
825 | <literal>junipervSRXImage</literal> directory.</para> | ||
826 | |||
827 | <para>Please refer to the "VNF Chaining Example Use-case" chapter | ||
828 | from the Enea NFV Access Example Use-cases manual for additional | ||
829 | information about the preconditions.</para> | ||
830 | </listitem> | ||
831 | </itemizedlist> | ||
832 | |||
833 | <para><emphasis role="bold">Action:</emphasis> Run the | ||
834 | <filename>chainedVNFsService.yml</filename> Ansible Playbook as follows: | ||
835 | <programlisting>ansible-playbook playbooks/chainedVNFsService/chainedVNFsService.yml \ | ||
836 | -e "site1=inteld1521-1 site2=inteld1521-2 arch=XeonD"</programlisting></para> | ||
837 | |||
838 | <para>Note that "arch" may either be { XeonD | AtomC } depending on the | ||
839 | target set chosen.</para> | ||
840 | |||
841 | <para><emphasis role="bold">Result:</emphasis> Output of the test case | ||
842 | run using the Test Harness: <programlisting># testChainedVNFsService task result | ||
843 | ****************************************************************************** | ||
844 | * site1 - changed=False ---------------------------------------------- | ||
845 | ---- | ||
846 | <site1_lan-ip> ---> <site2_lan-ip> | ||
847 | LAN-to-LAN connectivity (through VPN tunnel)tested successfully!</programlisting></para> | ||
848 | |||
849 | <para><emphasis role="bold">Cleanup:</emphasis> Run the | ||
850 | <filename>cleanupChainedVNFsService.yml</filename> Ansible Playbook as | ||
851 | follows: <programlisting>ansible-playbook playbooks/chainedVNFsService/cleanupChainedVNFsService.yml \ | ||
852 | -e "site1=inteld1521-1 site2=inteld1521-2 arch=XeonD"</programlisting></para> | ||
853 | </section> | ||
854 | </section> | ||
855 | </chapter> \ No newline at end of file | ||