summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiruna Paun <Miruna.Paun@enea.com>2019-05-15 17:27:34 +0200
committerMartin Borg <martin.borg@enea.com>2019-05-16 11:16:48 +0200
commitcdfd320516250acdc5d3a9b11b07a066262ad849 (patch)
tree89a984f48fdb0cd72c23017a02919d2596a84742
parente0e4fa4f73db0fbd803b60b4368adbcb3667912e (diff)
downloadnfv-access-documentation-cdfd320516250acdc5d3a9b11b07a066262ad849.tar.gz
Add Content in all remaining chapters + basic formatting.
Content proofing to follow in new patches. Change-Id: I3439ad81e05eef5b77fbd437e0aba635db7923c9
-rw-r--r--doc/book-enea-nfv-access-auto-fw-th-user-guide/doc/automation_framework_test_harness.xml1694
-rw-r--r--doc/book-enea-nfv-access-auto-fw-th-user-guide/doc/components.xml112
-rwxr-xr-xdoc/book-enea-nfv-access-auto-fw-th-user-guide/doc/getting_started.xml~223
-rw-r--r--doc/book-enea-nfv-access-auto-fw-th-user-guide/doc/troubleshooting_guide.xml33
4 files changed, 1757 insertions, 305 deletions
diff --git a/doc/book-enea-nfv-access-auto-fw-th-user-guide/doc/automation_framework_test_harness.xml b/doc/book-enea-nfv-access-auto-fw-th-user-guide/doc/automation_framework_test_harness.xml
index 53940eb..85d8dbf 100644
--- a/doc/book-enea-nfv-access-auto-fw-th-user-guide/doc/automation_framework_test_harness.xml
+++ b/doc/book-enea-nfv-access-auto-fw-th-user-guide/doc/automation_framework_test_harness.xml
@@ -2,106 +2,1666 @@
2<chapter id="auto_fw_test_harness"> 2<chapter id="auto_fw_test_harness">
3 <title>Automation Framework and Test Harness</title> 3 <title>Automation Framework and Test Harness</title>
4 4
5 <para>The Automation Framework and Test Harness installation directory is
6 structured as follows:</para>
7
8 <programlisting>.
9|-- automation_framework
10| |-- device
11| | |-- addDevice.py
12| | |-- getEventsForUcpe.py
13| | |-- removeDevice.py
14| | `-- waitDeviceUp.py
15| |-- eneaUcpeMgr.py
16| |-- network
17| | |-- bindNetworkInterface.py
18| | |-- delNetworkBridge.py
19| | |-- getNetworkInterfaces.py
20| | |-- newNetworkBridge.py
21| | `-- unbindNetworkInterface.py
22| |-- unittestSuite
23| | |-- config
24| | | |-- addDevice.json
25| | | |-- bindNetworkInterface.json
26| | | |-- controlVNFI.json
27| | | |-- delNetworkBridge.json
28| | | |-- destroyVNFI.json
29| | | |-- instantiateVNFI.json
30| | | |-- newNetworkBridge.json
31| | | |-- offboardVNF.json
32| | | |-- onboardVNF.json
33| | | |-- onboardVNFRaw.json
34| | | |-- removeDevice.json
35| | | |-- unbindNetworkInterface.json
36| | | `-- waitDeviceUp.json
37| | |-- fortigateCleanup.json
38| | |-- fortigateDeploy.json
39| | |-- unittestLoader.py
40| | `-- unittestSuite.py
41| `-- vnf
42| |-- controlVNFI.py
43| |-- destroyVNFI.py
44| |-- instantiateVNFI.py
45| |-- offboardVNF.py
46| |-- onboardVNF.py
47| `-- onboardVNFRaw.py
48|-- ansible.cfg
49|-- hosts
50|-- setup_env.sh
51|-- lab_config
52| |-- intelc3850-2
53| | |-- intelc3850-2.json
54| | |-- lan_br.json
55| | |-- lan_nic.json
56| | |-- wan_br.json
57| | `-- wan_nic.json
58| |-- inteld1521-1
59| | |-- inteld1521-1.json
60| | |-- lan_br.json
61| | |-- lan_nic.json
62| | |-- mgmt_nic.json
63| | |-- sfc_br.json
64| | |-- vnf_mgmt_br.json
65| | |-- wan_br.json
66| | `-- wan_nic.json
67| `-- inteld1521-2
68| |-- inteld1521-2.json
69| |-- lan_br.json
70| |-- lan_nic.json
71| |-- mgmt_nic.json
72| |-- sfc_br.json
73| |-- vnf_mgmt_br.json
74| |-- wan_br.json
75| `-- wan_nic.json
76|-- playbooks
77| |-- addBridge.yml
78| |-- addDevice.yml
79| |-- bindNIC.yml
80| |-- chainedVNFsService
81| | |-- chainedVNFsService.yml
82| | |-- cleanupChainedVNFsService.yml
83| | `-- testChainedVNFsService.yml
84| |-- controlVNFI.yml
85| |-- deleteBridge.yml
86| |-- destroyVNFI.yml
87| |-- fortigateFWService
88| | |-- cleanupFortigateFWInstance.yml
89| | |-- cleanupTestFortigateFWInstance.yml
90| | |-- instantiateFortigateFW.yml
91| | `-- testFortigateFWInstance.yml
92| |-- instantiateVNFI.yml
93| |-- offboardVNF.yml
94| |-- onboardVNFBundle.yml
95| |-- onboardVNFImage.yml
96| |-- removeDevice.yml
97| |-- setupuCPEManager.yml
98| |-- unbindNIC.yml
99| `-- unittestSuiteTest
100| |-- cleanupFortigateFWScenario.yml
101| `-- deployFortigateFWScenario.yml
102|-- uCPEM_config
103| `-- ucpem01.json
104|-- vnf_config
105| |-- fortigateFWImage
106| | |-- fortigateFWImage.json
107| | |-- fortigateFWInstance1.json
108| | `-- fortigateFWInstance2.json
109| |-- fortigateImage
110| | |-- fortigateFWInstance.json
111| | `-- fortigateImage.json
112| `-- junipervSRXImage
113| |-- junipervSRXImage.json
114| |-- junipervSRXInstanceAtomC1.json
115| |-- junipervSRXInstanceAtomC2.json
116| |-- junipervSRXInstanceXeonD1.json
117| `-- junipervSRXInstanceXeonD2.json
118`-- vnf_image</programlisting>
119
5 <section id="auto_fw"> 120 <section id="auto_fw">
6 <title>Automation Framework</title> 121 <title>Automation Framework</title>
7 122
8 <para></para> 123 <para>All Automation Framework sources are under the
9 124 <literal>&lt;AF-TH-install-dir&gt;/automation_framework</literal>
10 <section id="python_testsuite"> 125 directory.</para>
11 <title>Python Unit-Test Suite</title>
12 126
13 <para></para> 127 <para>The <literal>/device</literal> folder contains Python scripts for
14 </section> 128 adding a uCPE device, receiving uCPE events' reports, removing a uCPE
15 129 device, and waiting for a uCPE device to connect to the uCPE
16 <section id="add_ucpe_device"> 130 Manager.</para>
17 <title>Adding a uCPE Device</title>
18 131
19 <para></para> 132 <para>The <literal>/network</literal> folder contains Python scripts for
20 </section> 133 binding or unbinding a network interface to/from a target (DPDK or
134 SR-IOV), creating or deleting an OVS network bridge, or dumping network
135 interface information about the available interfaces.</para>
21 136
22 <section id="remove_ucpe_device"> 137 <para>The <literal>/unittestSuite</literal> folder contains Python
23 <title>Removing a uCPE Device</title> 138 unit-test class and loader scripts for generating specific test cases for
139 the available Python scripts. The generated test cases are injected into
140 the Python unit-test suite class to be run using the Python unit-test
141 framework.</para>
24 142
25 <para></para> 143 <para>The <literal>/unittestSuite/config</literal> folder contains
26 </section> 144 configuration files in JSON format that describe the list of test cases
145 for a particular Python script. Each defined test case is a dictionary
146 that must contain the test case name and arguments to be passed to the
147 Python script for running the test case.</para>
27 148
28 <section id="wait_ucpe_device"> 149 <para>The <literal>/vnf</literal> folder contains Python scripts for
29 <title>Waiting a uCPE Device</title> 150 onboarding and offboarding a VNF bundle or image, instantiating a VNF,
151 controlling a VNF instance or destroying an existing one.</para>
30 152
31 <para></para> 153 <para>The <filename>eneaUcpeMgr.py</filename> file acts as a library for
32 </section> 154 the (Python) Automation Framework scripts. It contains common functions
155 and unit-test configuration options.</para>
33 156
34 <section id="bind_ucpe_device"> 157 <section id="python_testsuite">
35 <title>Bind a uCPE Device</title> 158 <title>Python Unit-Test Suite</title>
36 159
37 <para></para> 160 <para>The Python unit-test class defined in the
38 </section> 161 <filename>unittestSuite.py</filename> script provides a way to automate
162 the execution of specific test cases for each supported Python script.
163 This class requires a test suite configuration JSON file that contains a
164 dictionary list of the Python scripts to be processed. Each dictionary
165 must contain the path of the Python script to be loaded and the path to
166 the file describing the test cases to be performed against the
167 designated script.</para>
39 168
40 <section id="unbind_ucpe_device"> 169 <para>Steps for running the Python unit-test suite onto the uCPE Manager
41 <title>Unbind a uCPE Device</title> 170 are provided below.</para>
42 171
43 <para></para> 172 <section id="script_opts">
44 </section> 173 <title>Script Options</title>
45
46 <section id="create_ovs_net_bridge">
47 <title>Create an OVS Network Bridge</title>
48 174
49 <para></para> 175 <programlisting>$ python unittestSuite.py -h
50 </section> 176Usage: unittestSuite.py [options]
51 177
52 <section id="delete_ovs_net_bridge"> 178Run selected unit-test suite against Enea uCPE Manager.
53 <title>Delete an OVS Network Bridge</title>
54 179
55 <para></para> 180Options:
56 </section> 181 --version show program's version number and exit
182 -h, --help show this help message and exit
183 -u USERNAME, --username=USERNAME
184 Enea uCPE Manager login username
185 -p PASSWORD, --password=PASSWORD
186 Enea uCPE Manager login password
187 -H HOST, --host=HOST Enea uCPE Manager host name or IP address
188 -n DEVICENAME, --deviceName=DEVICENAME
189 Name of vCPE device (Virtual Infrastructure Manager)
190 -s SUITEFILE, --suite=SUITEFILE
191 Test suite configuration file in JSON format
192 -d DESCRIPTION, --description=DESCRIPTION
193 Test suite description
57 194
58 <section id="onboard_vnf_bundle"> 195 Mandatory options:
59 <title>Onboard a VNF Bundle</title> 196 -H/--host, -n/--deviceName, -s/--suiteFile, -d/--description</programlisting>
197 </section>
60 198
61 <para></para> 199 <section id="config_ut_json">
62 </section> 200 <title>Configuring Unit-Test JSON File<remark>Starting from this
201 section onward NOTHING has been proofed</remark></title>
63 202
64 <section id="onboard_vnf_image"> 203 <para>The unit-test suite JSON configuration file contains a list of
65 <title>Onboard a VNF Image</title> 204 dictionaries, each dictionary indicating the path of the Python module
205 to load and the test cases configuration file to be executed against
206 the loaded module.</para>
66 207
67 <para></para> 208 <para>Sample unit-test configuration file describing the Fortigate
68 </section> 209 deployment scenario, fortigateDeploy.json:</para>
69 210
70 <section id="offboard_vnf"> 211 <para><programlisting>[
71 <title>Offboard a VNF</title> 212 {
213 "config": "config/addDevice.json",
214 "module": "../device/addDevice.py"
215 },
216 {
217 "config": "config/waitDeviceUp.json",
218 "module": "../device/waitDeviceUp.py"
219 },
220 {
221 "config": "config/bindNetworkInterface.json",
222 "module": "../network/bindNetworkInterface.py"
223 },
224 {
225 "config": "config/newNetworkBridge.json",
226 "module": "../network/newNetworkBridge.py"
227 },
228 {
229 "config": "config/onboardVNFRaw.json",
230 "module": "../vnf/onboardVNFRaw.py"
231 },
232 {
233 "config": "config/instantiateVNFI.json",
234 "module": "../vnf/instantiateVNFI.py"
235 },
236 {
237 "config": "config/controlVNFI.json",
238 "module": "../vnf/controlVNFI.py"
239 }
240]</programlisting>Sample unit-test configuration file describing the Fortigate
241 cleanup scenario, fortigateCleanup.json:</para>
72 242
73 <para></para> 243 <programlisting>[
74 </section> 244 {
245 "config": "config/destroyVNFI.json",
246 "module": "../vnf/destroyVNFI.py"
247 },
248 {
249 "config": "config/delNetworkBridge.json",
250 "module": "../network/delNetworkBridge.py"
251 },
252 {
253 "config": "config/unbindNetworkInterface.json",
254 "module": "../network/unbindNetworkInterface.py"
255 },
256 {
257 "config": "config/offboardVNF.json",
258 "module": "../vnf/offboardVNF.py"
259 },
260 {
261 "config": "config/removeDevice.json",
262 "module": "../device/removeDevice.py"
263 }
264]</programlisting>
75 265
76 <section id="instantiate_vnf"> 266 <para>"config" key contains the path to the test cases configuration
77 <title>Instantiate a VNF</title> 267 file.</para>
78 268
79 <para></para> 269 <para>"module" key contains the path to the Python script to be
80 </section> 270 executed.</para>
271 </section>
81 272
82 <section id="control_vnf_inst"> 273 <section id="ut_config_opts">
83 <title>Control a VNF Instance</title> 274 <title>Unit-Test Configuration Options</title>
84 275
85 <para></para> 276 <para>The unit-test behavior can be tweaked in a number of ways
86 </section> 277 through the following options set through the eneaUcpeMgr.py
278 file:<programlisting># Defaults for the framework
279username = "admin"
280password = "admin"
281host = None
282deviceName = None
283directory = "."
284ftpUsername = "ftp"
285ftpPassword = "ftp"
286ftpPort = "2021"
87 287
88 <section id="destroy_vnf_inst"> 288# Stop the test run on the first error or failure
89 <title>Destroy a VNF Instance</title> 289failfast = True
90 290
91 <para></para> 291# Logging levels ordered by the highest severity:
92 </section> 292# CRITICAL 50
293# ERROR 40
294# WARNING 30
295# INFO 20
296# DEBUG 10
297# NOTSET 0
298fileLoggingLevel = logging.DEBUG
299consoleLoggingLevel = logging.INFO</programlisting>username - user to be used
300 when authenticating to uCPE Manager; this can be overwritten by
301 setting the Python unit-test suite command line option -u.</para>
302
303 <para>password - password to be used when authenticating to uCPE
304 Manager; this can be overwritten by setting the Python unit-test suite
305 command line option -p.</para>
306
307 <para>host - IP address of the uCPE Manager host; this can be
308 overwritten by setting the Python unit-test suite command line option
309 -H.</para>
310
311 <para>devicename - name of the VCPE agent to perform the tests
312 against; this can be overwritten by setting the Python unit-test suite
313 command line option -n.</para>
314
315 <para>ftpUsername - user to be used for the FTP connection when
316 onboarding a VNF bundle/image; this can be overwritten by setting the
317 Python script command line option -f.</para>
318
319 <para>ftpPassword - password to be used for the FTP connection when
320 onboarding a VNF bundle/image; this can be overwritten by setting the
321 Python script command line option -w.</para>
322
323 <para>ftpPort - port to be used for the FTP connection when onboarding
324 a VNF bundle/image; this can be overwritten by setting the Python
325 script command line option -P.</para>
326
327 <para>failfast - describes the unit-test execution behavior on the
328 first error or failure encountered.</para>
329
330 <para>fileLoggingLevel - sets the file logging level.</para>
331
332 <para>consoleLoggingLevel - sets the console logging level.</para>
333 </section>
334
335 <section id="ut_suite_log">
336 <title>Python Unit-Test Suite Logging</title>
337
338 <para>Logging messages are displayed in the console and also saved to
339 the specified log file depending on the chosen logging level.</para>
340
341 <para>Logging messages are ranked by their severity
342 level:<programlisting>CRITICAL 50
343ERROR 40
344WARNING 30
345INFO 20
346DEBUG 10
347NOTSET 0</programlisting>Logging messages which are less severe than the
348 logging level set will be ignored.</para>
349
350 <para>Setting console logging level to INFO is done through the
351 consoleLoggingLevel option:<programlisting>consoleLoggingLevel = logging.INFO</programlisting>Setting
352 file logging level to DEBUG is done through the fileLoggingLevel
353 option:<programlisting>fileLoggingLevel = logging.DEBUG</programlisting></para>
354 </section>
355
356 <section id="run_ut_suite">
357 <title>Running Python Unit-Test Suite</title>
358
359 <para>Sample unit-test command line options for running the Fortigate
360 deployment scenario:</para>
361
362 <para><programlisting>$ python unittestSuite.py -u admin -p admin -H localhost -n intelc3850-2 -s
363fortigateDeploy.json -d "Fortigate deployment scenario"</programlisting>Setting
364 console logging level to DEBUG:<programlisting>consoleLoggingLevel = logging.DEBUG</programlisting><emphasis
365 role="bold">Expected Output:</emphasis><programlisting>2019-03-07 18:03:20,791 - DEBUG: Started logging
366
367Running Fortigate deployment scenario...
368
369test 001: Add VCPE Agent device (__main__.UnittestSuite) ...
3702019-03-07 18:03:20,795 - INFO: Add uCPE device
3712019-03-07 18:03:20,924 - DEBUG: Login successful on host 'localhost'
3722019-03-07 18:03:20,925 - DEBUG: Session token is: 876160c3-40f2-11e9-a81f525400d08e1d
3732019-03-07 18:03:20,949 - DEBUG: Add new device 'intelc3850-2' to uCPE Manager host
3742019-03-07 18:03:21,100 - INFO: Done
3752019-03-07 18:03:21,133 - DEBUG: Logging out and exiting...
376ok
377test 002: Wait VCPE Agent device be up (__main__.UnittestSuite) ...
3782019-03-07 18:03:21,133 - INFO: Wait uCPE device
3792019-03-07 18:03:21,149 - DEBUG: Login successful on host 'localhost'
3802019-03-07 18:03:21,149 - DEBUG: Session token is: 8785b1a0-40f2-11e9-a81f525400d08e1d
3812019-03-07 18:03:21,157 - DEBUG: Found device with name 'intelc3850-2'
3822019-03-07 18:03:21,157 - DEBUG: Wait for device 'intelc3850-2' to connect
3832019-03-07 18:03:29,356 - DEBUG: Status: Connected
3842019-03-07 18:03:29,356 - INFO: Done
3852019-03-07 18:03:29,365 - DEBUG: Logging out and exiting...
386ok
387test 003: Bind lan NIC to DPDK target (__main__.UnittestSuite) ...
3882019-03-07 18:03:29,366 - INFO: Bind NIC
3892019-03-07 18:03:29,406 - DEBUG: Login successful on host 'localhost'
3902019-03-07 18:03:29,406 - DEBUG: Session token is: 8c719cb0-40f2-11e9-a81f525400d08e1d
3912019-03-07 18:03:29,415 - DEBUG: Found device with name 'intelc3850-2'
3922019-03-07 18:03:29,415 - DEBUG: Bind NIC '0000:01:00.1' to dpdk target
3932019-03-07 18:03:30,030 - INFO: Done
3942019-03-07 18:03:30,067 - DEBUG: Logging out and exiting...
395ok
396test 004: Bind wan NIC to DPDK target (__main__.UnittestSuite) ...
3972019-03-07 18:03:30,068 - INFO: Bind NIC
3982019-03-07 18:03:30,086 - DEBUG: Login successful on host 'localhost'
3992019-03-07 18:03:30,087 - DEBUG: Session token is: 8cd95f32-40f2-11e9-a81f525400d08e1d
4002019-03-07 18:03:30,095 - DEBUG: Found device with name 'intelc3850-2'
4012019-03-07 18:03:30,096 - DEBUG: Bind NIC '0000:03:00.2' to dpdk target
4022019-03-07 18:03:30,729 - INFO: Done
4032019-03-07 18:03:30,767 - DEBUG: Logging out and exiting...
404ok
405test 005: Creating network bridge LAN (__main__.UnittestSuite) ...
4062019-03-07 18:03:30,768 - INFO: New OVS network bridge
4072019-03-07 18:03:30,801 - DEBUG: Login successful on host 'localhost'
4082019-03-07 18:03:30,801 - DEBUG: Session token is: 8d454061-40f2-11e9-a81f525400d08e1d
4092019-03-07 18:03:30,811 - DEBUG: Found device with name 'intelc3850-2'
4102019-03-07 18:03:30,812 - DEBUG: Create new OVS network bridge 'lan_br'
4112019-03-07 18:03:37,358 - INFO: Done
4122019-03-07 18:03:37,402 - DEBUG: Logging out and exiting...
413ok
414test 006: Creating network bridge WAN (__main__.UnittestSuite) ...
4152019-03-07 18:03:37,402 - INFO: New OVS network bridge
4162019-03-07 18:03:37,461 - DEBUG: Login successful on host 'localhost'
4172019-03-07 18:03:37,461 - DEBUG: Session token is: 913c4420-40f2-11e9-a81f525400d08e1d
4182019-03-07 18:03:37,485 - DEBUG: Found device with name 'intelc3850-2'
4192019-03-07 18:03:37,485 - DEBUG: Create new OVS network bridge 'wan_br'
4202019-03-07 18:03:37,755 - INFO: Done
4212019-03-07 18:03:37,792 - DEBUG: Logging out and exiting...
422ok
423test 007: Onboarding Fortigate VNF (wizard API) (__main__.UnittestSuite) ...
4242019-03-07 18:03:37,792 - INFO: Onboard wizard
4252019-03-07 18:03:37,859 - DEBUG: Login successful on host 'localhost'
4262019-03-07 18:03:37,859 - DEBUG: Session token is: 91770330-40f2-11e9-a81f525400d08e1d
4272019-03-07 18:03:37,860 - DEBUG: FTP file '../../vnf_bundles/fortios.qcow2' on host
428'localhost', port '2021'
4292019-03-07 18:03:38,027 - DEBUG: Onboard VNF raw: fortios.qcow2
4302019-03-07 18:03:41,701 - INFO: Done
4312019-03-07 18:03:41,748 - DEBUG: Logging out and exiting...
432ok
433test 008: Instantiate Fortigate VNF (__main__.UnittestSuite) ...
4342019-03-07 18:03:41,778 - INFO: Instantiate VNF
4352019-03-07 18:03:41,813 - DEBUG: Login successful on host 'localhost'
4362019-03-07 18:03:41,815 - DEBUG: Session token is: 93d69e10-40f2-11e9-a81f525400d08e1d
4372019-03-07 18:03:41,834 - DEBUG: Found device with name 'intelc3850-2'
4382019-03-07 18:03:41,878 - DEBUG: Found VNF descriptor with name 'fortigateImage'
4392019-03-07 18:03:41,888 - DEBUG: Encrypt string content:
440cloudInit("vnf_config/fortigateImage/fortigateFW.conf")
4412019-03-07 18:03:41,889 - DEBUG: Encrypt string content:
442License("vnf_config/fortigateImage/fortigateLicense.lic")
4432019-03-07 18:03:41,889 - DEBUG: Instantiate fortigateImage VNF on 'intelc3850-2'
4442019-03-07 18:03:49,887 - INFO: Done
4452019-03-07 18:03:49,921 - DEBUG: Logging out and exiting...
446ok
447test 009: Pause Fortigate VNF instance (__main__.UnittestSuite) ...
4482019-03-07 18:03:49,923 - INFO: Control VNF
4492019-03-07 18:03:49,982 - DEBUG: Login successful on host 'localhost'
4502019-03-07 18:03:49,983 - DEBUG: Session token is: 98b17220-40f2-11e9-a81f525400d08e1d
4512019-03-07 18:03:49,991 - DEBUG: Found device with name 'intelc3850-2'
4522019-03-07 18:03:50,031 - DEBUG: Found VNF instance with name 'fortigateFWInstance'
4532019-03-07 18:03:50,031 - DEBUG: Control VNF instance 'intelc3850-2', command:
454pause
4552019-03-07 18:03:50,914 - INFO: Done
4562019-03-07 18:03:50,933 - DEBUG: Logging out and exiting...
457ok
458test 010: Resume Fortigate VNF instance (__main__.UnittestSuite) ...
4592019-03-07 18:03:50,933 - INFO: Control VNF
4602019-03-07 18:03:50,992 - DEBUG: Login successful on host 'localhost'
4612019-03-07 18:03:50,992 - DEBUG: Session token is: 994c0473-40f2-11e9-a81f525400d08e1d
4622019-03-07 18:03:51,005 - DEBUG: Found device with name 'intelc3850-2'
4632019-03-07 18:03:51,023 - DEBUG: Found VNF instance with name 'fortigateFWInstance'
4642019-03-07 18:03:51,024 - DEBUG: Control VNF instance 'intelc3850-2', command:
465resume
4662019-03-07 18:03:51,963 - INFO: Done
4672019-03-07 18:03:51,991 - DEBUG: Logging out and exiting...
468ok
469test 011: Stop Fortigate VNF instance (__main__.UnittestSuite) ...
4702019-03-07 18:03:51,992 - INFO: Control VNF
4712019-03-07 18:03:52,031 - DEBUG: Login successful on host 'localhost'
4722019-03-07 18:03:52,031 - DEBUG: Session token is: 99ed9ba3-40f2-11e9-a81f525400d08e1d
4732019-03-07 18:03:52,046 - DEBUG: Found device with name 'intelc3850-2'
4742019-03-07 18:03:52,073 - DEBUG: Found VNF instance with name 'fortigateFWInstance'
4752019-03-07 18:03:52,073 - DEBUG: Control VNF instance 'intelc3850-2', command: stop
4762019-03-07 18:03:53,011 - INFO: Done
4772019-03-07 18:03:53,047 - DEBUG: Logging out and exiting...
478ok
479test 012: Start Fortigate VNF instance (__main__.UnittestSuite) ...
4802019-03-07 18:03:53,048 - INFO: Control VNF
4812019-03-07 18:03:53,080 - DEBUG: Login successful on host 'localhost'
4822019-03-07 18:03:53,080 - DEBUG: Session token is: 9a8d8523-40f2-11e9-a81f525400d08e1d
4832019-03-07 18:03:53,109 - DEBUG: Found device with name 'intelc3850-2'
4842019-03-07 18:03:53,140 - DEBUG: Found VNF instance with name 'fortigateFWInstance'
4852019-03-07 18:03:53,141 - DEBUG: Control VNF instance 'intelc3850-2', command:
486start
4872019-03-07 18:03:54,087 - INFO: Done
4882019-03-07 18:03:54,123 - DEBUG: Logging out and exiting...
489ok
490
491----------------------------------------------------------------------
492Ran 12 tests in 33.328s
493
494OK</programlisting></para>
495
496 <para>Sample unit-test command line options for running the Fortigate
497 cleanup scenario:<programlisting>$ python unittestSuite.py -u admin -p admin -H localhost -n intelc3850-2 -s
498fortigateCleanup.json -d "Fortigate cleanup scenario"</programlisting></para>
499
500 <para>Setting console logging level to INFO: <programlisting>consoleLoggingLevel = logging.INFO</programlisting></para>
501
502 <para><emphasis role="bold">Expected
503 Output:</emphasis><programlisting>Running Fortigate cleanup scenario...
504test 001: Destroying Fortigate VNF (__main__.UnittestSuite) ...
5052019-03-07 18:04:55,997 - INFO: Destroy VNF
5062019-03-07 18:04:56,668 - INFO: Done
507ok
508test 002: Deleting network bridge LAN (__main__.UnittestSuite) ...
5092019-03-07 18:04:56,739 - INFO: Delete OVS network bridge
5102019-03-07 18:04:57,908 - INFO: Done
511ok
512test 003: Deleting network bridge WAN (__main__.UnittestSuite) ...
5132019-03-07 18:04:57,931 - INFO: Delete OVS network bridge
5142019-03-07 18:04:59,464 - INFO: Done
515ok
516test 004: Unbind lan NIC from DPDK target (__main__.UnittestSuite) ...
5172019-03-07 18:04:59,477 - INFO: Unbind NIC
5182019-03-07 18:05:00,639 - INFO: Done
519ok
520test 005: Unbind wan NIC from DPDK target (__main__.UnittestSuite) ...
5212019-03-07 18:05:00,658 - INFO: Unbind NIC
5222019-03-07 18:05:01,533 - INFO: Done
523ok
524test 006: Offboarding Fortigate VNF (__main__.UnittestSuite) ...
5252019-03-07 18:05:01,566 - INFO: Offboard VNF
5262019-03-07 18:05:01,814 - INFO: Done
527ok
528test 007: Remove VCPE Agent device (__main__.UnittestSuite) ...
5292019-03-07 18:05:01,853 - INFO: Remove uCPE device
5302019-03-07 18:05:02,184 - INFO: Done
531ok
532
533----------------------------------------------------------------------
534Ran 7 tests in 6.198s
535
536OK</programlisting></para>
537 </section>
538 </section>
539
540 <section id="add_ucpe_device">
541 <title>Adding a uCPE Device</title>
542
543 <para>Adds a uCPE device to the uCPE manager.</para>
544
545 <section id="opts_add_device">
546 <title>Script Options</title>
547
548 <programlisting>$ python addDevice.py -h
549Usage: addDevice.py [options]
550
551Add a uCPE in Enea uCPE Manager.
552
553Options:
554 --version show program's version number and exit
555 -h, --help show this help message and exit
556 -u USERNAME, --username=USERNAME
557 Enea uCPE Manager login username
558 -p PASSWORD, --password=PASSWORD
559 Enea uCPE Manager login password
560 -H HOST, --host=HOST Enea uCPE Manager host name or IP address
561 -f DEVICEFILE, --file=DEVICEFILE
562 File containing uCPE Information in JSON format
563
564 Mandatory options:
565 -H/--host, -f/--file</programlisting>
566 </section>
567
568 <section id="config_json_adddev">
569 <title>Configuring the JSON File</title>
570
571 <para>The add device suite JSON configuration file should contain a
572 list of dictionaries, each dictionary indicating the test case name
573 and the test case arguments passed to the addDevice Python
574 module.</para>
575
576 <para><emphasis role="bold">Sample configuration file in JSON
577 format:</emphasis></para>
578
579 <programlisting>[
580 {
581 "name": "Add VCPE Agent device ",
582 "args": "-f ../../lab_config/intelc3850-2/intelc3850-2.json"
583 }
584]</programlisting>
585
586 <para><emphasis role="bold">Sample intelc3850-2.json configuration
587 file:</emphasis></para>
588
589 <programlisting>{
590 "name": " intelc3850-2",
591 "description": "",
592 "address": "192.168.1.100",
593 "port": "22",
594 "username": "root",
595 "password": "root",
596 "certificate": null,
597 "passphrase": null,
598 "maintMode": "false"
599}</programlisting>
600 </section>
601
602 <section id="run_py_mod">
603 <title>Running the Python Module</title>
604
605 <para>The addDevice Python module can be executed individually by
606 running the following command line:</para>
607
608 <programlisting>$ python addDevice.py -u admin -p admin -H localhost -f config/device.json
6092019-03-07 17:33:10,755 - DEBUG: Started logging
6102019-03-07 17:33:10,756 - INFO: Add uCPE device
6112019-03-07 17:33:10,975 - DEBUG: Login successful on host 'localhost'
6122019-03-07 17:33:10,979 - DEBUG: Session token is: 508b6ea2-40ee-11e9-a81f525400d08e1d
6132019-03-07 17:33:11,049 - DEBUG: Add new device 'intelc3850-2' to uCPE Manager host
6142019-03-07 17:33:11,483 - INFO: Done
6152019-03-07 17:33:11,501 - DEBUG: Logging out and exiting....</programlisting>
616 </section>
617 </section>
618
619 <section id="remove_ucpe_device">
620 <title>Removing a uCPE Device</title>
621
622 <para>Removes a uCPE device from uCPE manager.</para>
623
624 <section id="rem_script_opts">
625 <title>Script Options</title>
626
627 <programlisting>$ python removeDevice.py -h
628Usage: removeDevice.py [options]
629
630Remove a uCPE from Enea uCPE Manager.
631
632Options:
633 --version show program's version number and exit
634 -h, --help show this help message and exit
635 -u USERNAME, --username=USERNAME
636 Enea uCPE Manager login username
637 -p PASSWORD, --password=PASSWORD
638 Enea uCPE Manager login password
639 -H HOST, --host=HOST Enea uCPE Manager host name or IP address
640 -f DEVICEFILE, --file=DEVICEFILE
641 File containing uCPE Information in JSON format
642
643 Mandatory options:
644 -H/--host, -f/--file</programlisting>
645 </section>
646
647 <section id="config_json_rem">
648 <title>Configuring the JSON File</title>
649
650 <para>The remove device suite JSON configuration file should contain a
651 list of dictionaries, each dictionary indicating the test case name
652 and the test case arguments passed to the removeDevice Python
653 module.</para>
654
655 <para><emphasis role="bold">Sample unit-test JSON file
656 format:</emphasis></para>
657
658 <programlisting>[
659 {
660 "name": "Remove VCPE Agent device ",
661 "args": "-f ../../lab_config/intelc3850-2/intelc3850-2.json"
662 }
663]</programlisting>
664
665 <para><emphasis role="bold">Sample intelc3850-2.json configuration
666 file:</emphasis></para>
667
668 <programlisting>{
669 "name": "intelc3850-2"
670}</programlisting>
671 </section>
672
673 <section id="Run_py_mod_rem">
674 <title>Running the Python Module</title>
675
676 <para>The removeDevice Python module can be executed individually by
677 running the following command line:</para>
678
679 <programlisting>$ python removeDevice.py -u admin -p admin -H localhost -f
680../../lab_config/intelc3850-2/intelc3850-2.json
6812019-03-07 17:33:56,834 - DEBUG: Started logging
6822019-03-07 17:33:56,835 - INFO: Remove uCPE device
6832019-03-07 17:33:56,856 - DEBUG: Login successful on host 'localhost'
6842019-03-07 17:33:56,856 - DEBUG: Session token is: 6bebcb43-40ee-11e9-a81f525400d08e1d
6852019-03-07 17:33:56,856 - DEBUG: Delete device 'intelc3850-2' from uCPE Manager
686host
6872019-03-07 17:33:56,875 - DEBUG: Found device with name 'intelc3850-2'
6882019-03-07 17:33:57,159 - INFO: Done
6892019-03-07 17:33:57,171 - DEBUG: Logging out and exiting...</programlisting>
690 </section>
691 </section>
692
693 <section id="wait_ucpe_device">
694 <title>Waiting a uCPE Device</title>
695
696 <para>Wait for uCPE to connect to the Enea uCPE Manager after
697 installation.</para>
698
699 <section id="wait_script_opts">
700 <title>Script Options</title>
701
702 <programlisting>$ python waitDeviceUp.py -h
703Usage: waitDeviceUp.py [options]
704
705Wait for uCPE to connect to the Enea uCPE Manager after installation.
706
707Options:
708 --version show program's version number and exit
709 -h, --help show this help message and exit
710 -u USERNAME, --username=USERNAME
711 Enea uCPE Manager login username
712 -p PASSWORD, --password=PASSWORD
713 Enea uCPE Manager login password
714 -H HOST, --host=HOST Enea uCPE Manager host name or IP address
715 -f DEVICEFILE, --file=DEVICEFILE
716 File containing uCPE Information in JSON format
717 -t TIMEOUT, --timeout=TIMEOUT
718 Time in seconds for maximum wait period, default =
719 instant
720
721 Mandatory options:
722 -H/--host, -f/--file</programlisting>
723 </section>
724
725 <section id="config_json_wait">
726 <title>Configuring the JSON File</title>
727
728 <para>The wait device suite JSON configuration file should contain a
729 list of dictionaries, each dictionary indicating the test case name
730 and the test case arguments passed to the waitDeviceUp Python
731 module.</para>
732
733 <para><emphasis role="bold">Sample unit-test JSON file
734 format:</emphasis></para>
735
736 <programlisting>[
737 {
738 "name": "Wait VCPE Agent device be up",
739 "args": "-f ../../lab_config/intelc3850-2/intelc3850-2.json -t 60"
740 }
741]</programlisting>
742
743 <para><emphasis role="bold">Sample intelc3850-2.json configuration
744 file:</emphasis></para>
745
746 <programlisting>{
747 "name": "intelc3850-2"
748}</programlisting>
749 </section>
750
751 <section id="runpy_mod_wait">
752 <title>Running the Python Module</title>
753
754 <para>The waitDeviceUp Python module can be executed individually by
755 running the following command line:<programlisting>$ python waitDeviceUp.py -u admin -p admin -H localhost -t 60 -f
756../../lab_config/intelc3850-2/intelc3850-2.json
7572019-03-07 18:03:21,132 - DEBUG: Started logging
7582019-03-07 18:03:21,133 - INFO: Wait uCPE device
7592019-03-07 18:03:21,149 - DEBUG: Login successful on host 'localhost'
7602019-03-07 18:03:21,149 - DEBUG: Session token is: 8785b1a0-40f2-11e9-a81f525400d08e1d
7612019-03-07 18:03:21,157 - DEBUG: Found device with name 'intelc3850-2'
7622019-03-07 18:03:21,157 - DEBUG: Wait for device 'intelc3850-2' to connect
7632019-03-07 18:03:29,356 - DEBUG: Status: Connected
7642019-03-07 18:03:29,356 - INFO: Done
7652019-03-07 18:03:29,365 - DEBUG: Logging out and exiting...</programlisting></para>
766 </section>
767 </section>
768
769 <section id="bind_ucpe_device">
770 <title>Bind a uCPE Device</title>
771
772 <para>Binds a physical network interface to a DPDK or SR-IOV
773 target.</para>
774
775 <section id="script_opts_bind">
776 <title>Script Options</title>
777
778 <programlisting>$ python bindNetworkInterface.py -h
779Usage: bindNetworkInterface.py [options]
780
781Binds a physical network interface to a DPDK or SR-IOV target.
782
783Options:
784 --version show program's version number and exit
785 -h, --help show this help message and exit
786 -u USERNAME, --username=USERNAME
787 Enea uCPE Manager login username
788 -p PASSWORD, --password=PASSWORD
789 Enea uCPE Manager login password
790 -H HOST, --host=HOST Enea uCPE Manager host name or IP address
791 -f NICFILE, --file=NICFILE
792File containing network interface Information in JSON
793format
794 -n DEVICENAME, --device-name=DEVICENAME
795 Name of the device
796
797 Mandatory options:
798 -H/--host, -f/--file, -n/--device-name</programlisting>
799 </section>
800
801 <section id="bind_config">
802 <title>Configuring the JSON File</title>
803
804 <para>The bind network interface suite JSON configuration file should
805 contain a list of dictionaries, each dictionary indicating the test
806 case name and the test case arguments passed to the
807 bindNetworkInterface Python module.</para>
808
809 <para><emphasis role="bold">Sample unit-test JSON file
810 format:</emphasis><programlisting>[
811 {
812 "name": "Bind lan NIC to DPDK target ",
813 "args": "-f ../../lab_config/intelc3850-2/lan_nic.json"
814 },
815 {
816 "name": "Bind wan NIC to DPDK target ",
817 "args": "-f ../../lab_config/intelc3850-2/wan_nic.json"
818 }
819]</programlisting><emphasis role="bold">Sample lan_nic.json configuration
820 file:</emphasis><programlisting>{
821 "name": "0000:01:00.1",
822 "type": "dpdk",
823 "subType": "igb_uio"
824}</programlisting><emphasis role="bold">Sample wan_nic.json configuration
825 file:</emphasis><programlisting>{
826 "name": "0000:03:00.2",
827 "type": "dpdk",
828 "subType": "igb_uio"
829}</programlisting></para>
830 </section>
831
832 <section id="runpy_bind">
833 <title>Running the Python Module</title>
834
835 <para>The bindNetworkInterface Python module can be executed
836 individually by running the following command line:</para>
837
838 <programlisting>$ python bindNetworkInterface.py -u admin -p admin -H localhost -f
839../../lab_config/intelc3850-2/lan_nic.json -n intelc3850-2
8402019-03-07 18:03:29,365 - DEBUG: Started logging
8412019-03-07 18:03:29,366 - INFO: Bind NIC
8422019-03-07 18:03:29,406 - DEBUG: Login successful on host 'localhost'
8432019-03-07 18:03:29,406 - DEBUG: Session token is: 8c719cb0-40f2-11e9-a81f525400d08e1d
8442019-03-07 18:03:29,415 - DEBUG: Found device with name 'intelc3850-2'
8452019-03-07 18:03:29,415 - DEBUG: Bind NIC '0000:01:00.1' to dpdk target
8462019-03-07 18:03:30,030 - INFO: Done
8472019-03-07 18:03:30,067 - DEBUG: Logging out and exiting...</programlisting>
848 </section>
849 </section>
850
851 <section id="unbind_ucpe_device">
852 <title>Unbind a uCPE Device</title>
853
854 <para>Unbinds a physical network interface from a DPDK or SR-IOV
855 target.</para>
856
857 <section id="script_opts_unbind">
858 <title>Script Options</title>
859
860 <programlisting>$ python unbindNetworkInterface.py -h
861Usage: unbindNetworkInterface.py [options]
862
863Unbinds a physical network interface from a DPDK or SR-IOV target.
864
865Options:
866 --version show program's version number and exit
867 -h, --help show this help message and exit
868 -u USERNAME, --username=USERNAME
869 Enea uCPE Manager login username
870 -p PASSWORD, --password=PASSWORD
871 Enea uCPE Manager login password
872 -H HOST, --host=HOST Enea uCPE Manager host name or IP address
873 -f NICFILE, --file=NICFILE
874 File containing network interface Information in JSON
875 format
876 -n DEVICENAME, --device-name=DEVICENAME
877 Name of the device
878
879 Mandatory options:
880 -H/--host, -f/--file, -n/--device-name</programlisting>
881 </section>
882
883 <section id="json_unbind">
884 <title>Configuring the JSON File</title>
885
886 <para>The unbind network interface suite JSON configuration file
887 should contain a list of dictionaries, each dictionary indicating the
888 test case name and the test case arguments passed to the
889 unbindNetworkInterface Python module.</para>
890
891 <para><emphasis role="bold">Sample unit-test JSON file
892 format:</emphasis><programlisting>[
893 {
894 "name": "Unbind lan NIC from DPDK target",
895 "args": "-f ../../lab_config/intelc3850-2/lan_nic.json"
896 },
897 {
898 "name": "Unbind wan NIC from DPDK target",
899 "args": "-f ../../lab_config/intelc3850-2/wan_nic.json"
900 }
901]</programlisting></para>
902
903 <para><emphasis role="bold">Sample lan_nic.json configuration
904 file:</emphasis></para>
905
906 <programlisting>{
907 "name": "0000:01:00.1",
908 "type": "dpdk"
909}</programlisting>
910
911 <para><emphasis role="bold">Sample wan_nic.json configuration
912 file:</emphasis></para>
913
914 <programlisting>{
915 "name": "0000:03:00.2",
916 "type": "dpdk",
917}
918</programlisting>
919 </section>
920
921 <section id="pymod_unbind">
922 <title>Running the Python Module</title>
923
924 <para>The unbindNetworkInterface Python module can be executed
925 individually by running the following command line:</para>
926
927 <programlisting>$ python unbindNetworkInterface.py -u admin -p admin -H localhost -f
928../../lab_config/intelc3850-2/lan_nic.json -n intelc3850-2
9292019-03-07 17:33:54,377 - DEBUG: Started logging
9302019-03-07 17:33:54,378 - INFO: Unbind NIC
9312019-03-07 17:33:54,431 - DEBUG: Login successful on host 'localhost'
9322019-03-07 17:33:54,432 - DEBUG: Session token is: 6a77a1d1-40ee-11e9-a81f525400d08e1d
9332019-03-07 17:33:54,467 - DEBUG: Found device with name 'intelc3850-2'
9342019-03-07 17:33:54,468 - DEBUG: Unbind NIC '0000:01:00.1' from dpdk target
9352019-03-07 17:33:55,616 - INFO: Done
9362019-03-07 17:33:55,659 - DEBUG: Logging out and exiting...</programlisting>
937 </section>
938 </section>
939
940 <section id="create_ovs_net_bridge">
941 <title>Create an OVS Network Bridge</title>
942
943 <para>Create an OVS Bridge on a device.</para>
944
945 <section id="script_opts_creovs">
946 <title>Script Options</title>
947
948 <programlisting>$ python newNetworkBridge.py -h
949Usage: newNetworkBridge.py [options]
950
951Create an OVS Bridge on a device.
952
953Options:
954 --version show program's version number and exit
955 -h, --help show this help message and exit
956 -u USERNAME, --username=USERNAME
957 Enea uCPE Manager login username
958 -p PASSWORD, --password=PASSWORD
959 Enea uCPE Manager login password
960 -H HOST, --host=HOST Enea uCPE Manager host name or IP address
961 -f OVSFILE, --file=OVSFILE
962 File containing OVS bridge Information in JSON format
963 -n DEVICENAME, --device-name=DEVICENAME
964 Name of the device
965
966 Mandatory options:
967 -H/--host, -f/--file, -n/--device-name</programlisting>
968 </section>
969
970 <section id="json_creovs">
971 <title>Configuring the JSON File</title>
972
973 <para>The new network bridge suite JSON configuration file should
974 contain a list of dictionaries, each dictionary indicating the test
975 case name and the test case arguments passed to the newNetworkBridge
976 Python module.</para>
977
978 <para><emphasis role="bold">Sample unit-test JSON file
979 format:</emphasis></para>
980
981 <programlisting>[
982 {
983 "name": "Creating network bridge LAN ",
984 "args": "-f ../../lab_config/intelc3850-2/lan_br.json"
985 },
986 {
987 "name": "Creating network bridge WAN ",
988 "args": "-f ../../lab_config/intelc3850-2/wan_br.json"
989 }
990]</programlisting>
991
992 <para><emphasis role="bold">Sample lan_br.json configuration
993 file:</emphasis></para>
994
995 <programlisting>{
996 "name": "lan_br",
997 "interfaces": ["0000:01:00.1"]
998}</programlisting>
999
1000 <para><emphasis role="bold">Sample wan_br.json configuration
1001 file:</emphasis></para>
1002
1003 <programlisting>{
1004 "name": "wan_br",
1005 "interfaces": ["0000:03:00.2"]
1006}</programlisting>
1007 </section>
1008
1009 <section id="pymod_creovs">
1010 <title>Running the Python Module</title>
1011
1012 <para>The newNetworkBridge Python module can be executed individually
1013 by running the following command line:</para>
1014
1015 <programlisting>$ python newNetworkBridge.py -u admin -p admin -H localhost -f
1016../../lab_config/intelc3850-2/lan_br.json -n intelc3850-2
10172019-03-07 18:03:30,767 - DEBUG: Started logging
10182019-03-07 18:03:30,768 - INFO: New OVS network bridge
10192019-03-07 18:03:30,801 - DEBUG: Login successful on host 'localhost'
10202019-03-07 18:03:30,801 - DEBUG: Session token is: 8d454061-40f2-11e9-a81f525400d08e1d
10212019-03-07 18:03:30,811 - DEBUG: Found device with name 'intelc3850-2'
10222019-03-07 18:03:30,812 - DEBUG: Create new OVS network bridge 'lan_br'
10232019-03-07 18:03:37,358 - INFO: Done
10242019-03-07 18:03:37,402 - DEBUG: Logging out and exiting...</programlisting>
1025 </section>
1026 </section>
1027
1028 <section id="delete_ovs_net_bridge">
1029 <title>Delete an OVS Network Bridge</title>
1030
1031 <para>Delete an OVS Bridge from a device.</para>
1032
1033 <section id="script_opts_delovs">
1034 <title>Script Options</title>
1035
1036 <programlisting>$ python delNetworkBridge.py -h
1037Usage: delNetworkBridge.py [options]
1038
1039Delete an OVS Bridge from a device.
1040
1041Options:
1042 --version show program's version number and exit
1043 -h, --help show this help message and exit
1044 -u USERNAME, --username=USERNAME
1045 Enea uCPE Manager login username
1046 -p PASSWORD, --password=PASSWORD
1047 Enea uCPE Manager login password
1048 -H HOST, --host=HOST Enea uCPE Manager host name or IP address
1049 -f OVSFILE, --file=OVSFILE
1050 File containing OVS bridge Information in JSON format
1051 -n DEVICENAME, --device-name=DEVICENAME
1052 Name of the device
1053
1054 Mandatory options:
1055 -H/--host, -f/--file, -n/--device-name</programlisting>
1056 </section>
1057
1058 <section id="json_delovs">
1059 <title>Configuring the JSON File</title>
1060
1061 <para>The delete network bridge suite JSON configuration file should
1062 contain a list of dictionaries, each dictionary indicating the test
1063 case name and the test case arguments passed to the delNetworkBridge
1064 Python module.</para>
1065
1066 <para><emphasis role="bold">Sample unit-test JSON file
1067 format:</emphasis></para>
1068
1069 <programlisting>[
1070 {
1071 "name": "Deleting network bridge LAN ",
1072 "args": "-f ../../lab_config/intelc3850-2/lan_br.json"
1073 },
1074 {
1075 "name": "Deleting network bridge WAN ",
1076 "args": "-f ../../lab_config/intelc3850-2/wan_br.json"
1077 }
1078]</programlisting>
1079
1080 <para><emphasis role="bold">Sample lan_br.json configuration
1081 file:</emphasis></para>
1082
1083 <programlisting>{
1084 "name" : "lan_br"
1085}</programlisting>
1086
1087 <para><emphasis role="bold">Sample wan_br.json configuration
1088 file:</emphasis></para>
1089
1090 <programlisting>{
1091 "name" : "wan_br"
1092}</programlisting>
1093 </section>
1094
1095 <section id="pymod_delovs">
1096 <title>Running the Python Module</title>
1097
1098 <para>The delNetworkBridge Python module can be executed individually
1099 by running the following command line:</para>
1100
1101 <programlisting>$ python delNetworkBridge.py -u admin -p admin -H localhost -f
1102../../lab_config/intelc3850-2/lan_br.json -n intelc3850-2
11032019-03-07 17:33:51,712 - DEBUG: Started logging
11042019-03-07 17:33:51,713 - INFO: Delete OVS network bridge
11052019-03-07 17:33:51,751 - DEBUG: Login successful on host 'localhost'
11062019-03-07 17:33:51,752 - DEBUG: Session token is: 68e08711-40ee-11e9-a81f525400d08e1d
11072019-03-07 17:33:51,768 - DEBUG: Found device with name 'intelc3850-2'
11082019-03-07 17:33:51,768 - DEBUG: Delete OVS network bridge 'lan_br'
11092019-03-07 17:33:52,839 - INFO: Done
11102019-03-07 17:33:52,872 - DEBUG: Logging out and exiting...</programlisting>
1111 </section>
1112 </section>
1113
1114 <section id="onboard_vnf_bundle">
1115 <title>Onboard a VNF Bundle</title>
1116
1117 <para>Onboard a VNF to Enea uCPE Manager.</para>
1118
1119 <section id="script_opts_onbvnf">
1120 <title>Script Options</title>
1121
1122 <programlisting>$ python onboardVNF.py -h
1123Usage: onboardVNF.py [options]
1124
1125Onboard a VNF to Enea uCPE Manager.
1126
1127Options:
1128 --version show program's version number and exit
1129 -h, --help show this help message and exit
1130 -u USERNAME, --username=USERNAME
1131 Enea uCPE Manager login username
1132 -p PASSWORD, --password=PASSWORD
1133 Enea uCPE Manager login password
1134 -H HOST, --host=HOST Enea uCPE Manager host name or IP address
1135 -f FTPUSERNAME, --ftpUsername=FTPUSERNAME
1136 Username for FTP
1137 -w FTPPASSWORD, --ftpPassword=FTPPASSWORD
1138 FTP password
1139 -P FTPPORT, --ftpPort=FTPPORT
1140 FTP port
1141 -b VNFBUNDLE, --bundle=VNFBUNDLE
1142 File name of VNF bundle in ZIP format
1143
1144 Mandatory options:
1145 -H/--host, -b/--bundle</programlisting>
1146 </section>
1147
1148 <section id="json_onbvnf">
1149 <title>Configuring the JSON File</title>
1150
1151 <para>The onboard VNF suite JSON configuration file should contain a
1152 list of dictionaries, each dictionary indicating the test case name
1153 and the test case arguments passed to the onboardVNF Python
1154 module.</para>
1155
1156 <para><emphasis role="bold">Sample unit-test JSON file
1157 format:</emphasis><programlisting>[
1158 {
1159 "name": "Onboarding Fortigate VNF ",
1160 "args": "-b ../../vnf_images/Fortigate.zip"
1161 }
1162]</programlisting></para>
1163 </section>
1164
1165 <section id="pymod_onbvnf">
1166 <title>Running the Python Module</title>
1167
1168 <para>The onboardVNF Python module can be executed individually by
1169 running the following command line:</para>
1170
1171 <programlisting>$ python onboardVNF.py -u admin -p admin -f ftp -w ftp -H localhost -b
1172../../vnf_images/Fortigate.zip
11732019-02-25 16:00:53,890 - DEBUG: Started logging
11742019-02-25 16:00:53,890 - INFO: Onboard VNF
11752019-02-25 16:00:53,985 - DEBUG: Login successful on host 'localhost'
11762019-02-25 16:00:53,985 - DEBUG: Session token is: c421cd03-3905-11e9-a81f525400d08e1d
11772019-02-25 16:00:53,994 - DEBUG: FTP file '../../vnf_images/Fortigate.zip' on host
1178'localhost', port '2021'
11792019-02-25 16:00:54,229 - DEBUG: Onboard VNF: Fortigate
11802019-02-25 16:00:56,836 - INFO: Done
11812019-02-25 16:00:56,861 - DEBUG: Logging out and exiting...</programlisting>
1182 </section>
1183 </section>
1184
1185 <section id="onboard_vnf_image">
1186 <title>Onboard a VNF Image</title>
1187
1188 <para>Onboard a VNF image in Enea uCPE Manager based upon its raw
1189 constituents.</para>
1190
1191 <section id="script_opts_image">
1192 <title>Script Options</title>
1193
1194 <programlisting>$ python onboardVNFRaw.py -h
1195Usage: onboardVNFRaw.py [options]
1196
1197Onboard a VNF in Enea uCPE Manager based upon its raw constituents.
1198
1199Options:
1200 --version show program's version number and exit
1201 -h, --help show this help message and exit
1202 -u USERNAME, --username=USERNAME
1203 Enea uCPE Manager login username
1204 -p PASSWORD, --password=PASSWORD
1205 Enea uCPE Manager login password
1206 -H HOST, --host=HOST Enea uCPE Manager host name or IP address
1207 -f FTPUSERNAME, --ftpUsername=FTPUSERNAME
1208 Username for FTP
1209 -w FTPPASSWORD, --ftpPassword=FTPPASSWORD
1210 FTP password
1211 -P FTPPORT, --ftpPort=FTPPORT
1212 FTP port
1213 -i IMAGEPATH, --imagePath=IMAGEPATH
1214 VNF bundle image path
1215 -b BUNDLEINFO, --bundleInfo=BUNDLEINFO
1216 File name of VNF bundle information in JSON format
1217
1218 Mandatory options:
1219 -H/--host, -b/--bundleInfo, -i/--imagePath</programlisting>
1220 </section>
1221
1222 <section id="json_image">
1223 <title>Configuring the JSON File</title>
1224
1225 <para>The onboard VNF image suite JSON configuration file should
1226 contain a list of dictionaries, each dictionary indicating the test
1227 case name and the test case arguments passed to the onboardVNFRaw
1228 Python module.</para>
1229
1230 <para><emphasis role="bold">Sample unit-test JSON file
1231 format:</emphasis></para>
1232
1233 <programlisting>[
1234 {
1235 "name": "Onboarding Fortigate VNF (wizard API)",
1236 "args": "-b ../../vnf_config/fortigateImage/fortigateImage.json -i
1237../../vnf_images/fortios.qcow2"
1238 }
1239]</programlisting>
1240
1241 <para><emphasis role="bold">Sample fortigateImage.json configuration
1242 file:</emphasis><programlisting>{
1243 "name" : "fortigateImage",
1244 "version" : "1.0",
1245 "description" : "Fortigate VNF Image",
1246 "provider" : "Fortinet, Inc",
1247 "numVcpus" : 1,
1248 "imageFormat" : "QCOW2",
1249 "memoryInMb" : 1024,
1250 "storageInGb" : 20,
1251 "image" : "fortios.qcow2",
1252 "interfaces" : [
1253 {
1254 "name" : "external",
1255 "type" : "PhysicalPort",
1256 "description" : "External interface"
1257 },
1258 {
1259 "name" : "in",
1260 "type" : "PhysicalPort",
1261 "description" : "Incoming interface"
1262 },
1263 {
1264 "name" : "out",
1265 "type" : "PhysicalPort",
1266 "description" : "Outgoing interface"
1267 }
1268 ],
1269 "cloudInitDataSource" : "ConfigDrive",
1270 "cloudInitDriveType" : "cdrom",
1271 "cloudInitContentParams" : [
1272 {
1273 "path" : "License",
1274 "description" : "Operational license"
1275 }
1276 ]
1277}</programlisting></para>
1278 </section>
1279
1280 <section id="pymod_image">
1281 <title>Running the Python Module</title>
1282
1283 <para>The onboardVNFRaw Python module can be executed individually by
1284 running the following command line:</para>
1285
1286 <programlisting>$ python onboardVNFRaw.py -u admin -p admin -f ftp -w ftp -H localhost -b b
1287../../vnf_config/fortigateImage/fortigateImage.json -i
1288../../vnf_images/fortios.qcow2
12892019-03-07 18:03:37,791 - DEBUG: Started logging
12902019-03-07 18:03:37,792 - INFO: Onboard wizard
12912019-03-07 18:03:37,859 - DEBUG: Login successful on host 'localhost'
12922019-03-07 18:03:37,859 - DEBUG: Session token is: 91770330-40f2-11e9-a81f525400d08e1d
12932019-03-07 18:03:37,860 - DEBUG: FTP file '../../vnf_images/fortios.qcow2' on host
1294'localhost', port '2021'
12952019-03-07 18:03:38,027 - DEBUG: Onboard VNF raw: fortios.qcow2
12962019-03-07 18:03:41,701 - INFO: Done
12972019-03-07 18:03:41,748 - DEBUG: Logging out and exiting...</programlisting>
1298 </section>
1299 </section>
1300
1301 <section id="offboard_vnf">
1302 <title>Offboard a VNF</title>
1303
1304 <para>Offboard a VNF from Enea uCPE Manager.</para>
1305
1306 <section id="script_opts_offimage">
1307 <title>Script Options</title>
1308
1309 <programlisting>$ python offboardVNF.py -h
1310Usage: offboardVNF.py [options]
1311
1312Offboard a VNF from Enea uCPE Manager.
1313
1314Options:
1315 --version show program's version number and exit
1316 -h, --help show this help message and exit
1317 -u USERNAME, --username=USERNAME
1318 Enea uCPE Manager login username
1319 -p PASSWORD, --password=PASSWORD
1320 Enea uCPE Manager login password
1321 -H HOST, --host=HOST Enea uCPE Manager host name or IP address
1322 -n VNFDNAME, --vnfdName=VNFDNAME
1323 Name of VNF descriptor to offboard
1324
1325 Mandatory options:
1326 -H/--host, -n/--vnfdName</programlisting>
1327 </section>
1328
1329 <section id="json_offimage">
1330 <title>Configuring the JSON File</title>
1331
1332 <para>The offboard VNF suite JSON configuration file should contain a
1333 list of dictionaries, each dictionary indicating the test case name
1334 and the test case arguments passed to the offboardVNF Python
1335 module.</para>
1336
1337 <para><emphasis role="bold">Sample unit-test JSON file
1338 format:</emphasis></para>
1339
1340 <programlisting>[
1341 {
1342 "name": "Offboarding Fortigate VNF ",
1343 "args": "-n fortigateImage"
1344 }
1345]</programlisting>
1346 </section>
1347
1348 <section id="pymod_offimage">
1349 <title>Running the Python Module</title>
1350
1351 <para>The offboardVNF Python module can be executed individually by
1352 running the following command line:</para>
1353
1354 <programlisting>$ python offboardVNF.py -u admin -p admin -H localhost -n fortigateImage
13552019-03-07 17:33:56,523 - DEBUG: Started logging
13562019-03-07 17:33:56,524 - INFO: Offboard VNF
13572019-03-07 17:33:56,557 - DEBUG: Login successful on host 'localhost'
13582019-03-07 17:33:56,557 - DEBUG: Session token is: 6bbe2b90-40ee-11e9-a81f525400d08e1d
13592019-03-07 17:33:56,682 - DEBUG: Found VNF descriptor with name 'fortigateImage'
13602019-03-07 17:33:56,683 - DEBUG: Offboard VNF: fortigateImage
13612019-03-07 17:33:56,811 - INFO: Done
13622019-03-07 17:33:56,834 - DEBUG: Logging out and exiting...</programlisting>
1363 </section>
1364 </section>
1365
1366 <section id="instantiate_vnf">
1367 <title>Instantiate a VNF</title>
1368
1369 <para>Instantiate a VNF via Enea uCPE Manager.</para>
1370
1371 <section id="script_opts_inst">
1372 <title>Script Options</title>
1373
1374 <programlisting>$ python instantiateVNFI.py -h
1375Usage: instantiateVNFI.py [options]
1376
1377Instantiate a VNF via Enea uCPE Manager.
1378
1379Options:
1380 --version show program's version number and exit
1381 -h, --help show this help message and exit
1382 -u USERNAME, --username=USERNAME
1383 Enea uCPE Manager login username
1384 -p PASSWORD, --password=PASSWORD
1385 Enea uCPE Manager login password
1386 -H HOST, --host=HOST Enea uCPE Manager host name or IP address
1387 -t VNFTYPE, --vnfType=VNFTYPE
1388 VNF Type (Name of VNF descriptor)
1389 -n VIMDEVICENAME, --device-name=VIMDEVICENAME
1390 Name of the device
1391 -f PROPSFILE, --file=PROPSFILE
1392 File containing VNF instance properties in JSON format
1393
1394 Mandatory options:
1395 -H/--host, -t/--vnfType, -n/--device-name, -f/--file</programlisting>
1396 </section>
1397
1398 <section id="json_inst">
1399 <title>Configuring the JSON File</title>
1400
1401 <para>The instantiate VNF suite JSON configuration file should contain
1402 a list of dictionaries, each dictionary indicating the test case name
1403 and the test case arguments passed to the instantiateVNFI Python
1404 module.</para>
1405
1406 <para><emphasis role="bold">Sample unit-test JSON file
1407 format:</emphasis></para>
1408
1409 <programlisting>[
1410 {
1411 "name": "Instantiate Fortigate VNF ",
1412 "args": "-t fortigateImage -f
1413../../vnf_config/fortigateImage/fortigateFWInstance.json"
1414 }
1415]</programlisting>
1416
1417 <para>The VNF instance JSON configuration file is specific to each
1418 VNF.</para>
1419 </section>
1420
1421 <section id="pymod_inst">
1422 <title>Running the Python Module</title>
1423
1424 <para>The instantiateVNFI Python module can be executed individually
1425 by running the following command line:</para>
1426
1427 <programlisting>$ python instantiateVNFI.py -u admin -p admin -H localhost -n intelc3850-2 -t
1428fortigateImage -f ../../vnf_config/fortigateImage/fortigateFWInstance.json
14292019-03-07 18:03:41,777 - DEBUG: Started logging
14302019-03-07 18:03:41,778 - INFO: Instantiate VNF
14312019-03-07 18:03:41,813 - DEBUG: Login successful on host 'localhost'
14322019-03-07 18:03:41,815 - DEBUG: Session token is: 93d69e10-40f2-11e9-a81f525400d08e1d
14332019-03-07 18:03:41,834 - DEBUG: Found device with name 'intelc3850-2'
14342019-03-07 18:03:41,878 - DEBUG: Found VNF descriptor with name 'fortigateImage'
14352019-03-07 18:03:41,888 - DEBUG: Encrypt string content:
1436cloudInit("vnf_config/fortigateImage/fortigateFW.conf")
14372019-03-07 18:03:41,889 - DEBUG: Encrypt string content:
1438License("vnf_config/fortigateImage/fortigateLicense.lic")
14392019-03-07 18:03:41,889 - DEBUG: Instantiate fortigateImage VNF on 'intelc3850-2'
14402019-03-07 18:03:49,887 - INFO: Done
14412019-03-07 18:03:49,921 - DEBUG: Logging out and exiting...</programlisting>
1442 </section>
1443 </section>
1444
1445 <section id="control_vnf_inst">
1446 <title>Control a VNF Instance</title>
1447
1448 <para>Controls a VNF instance from Enea uCPE Manager.</para>
1449
1450 <section id="script_opts_control">
1451 <title>Script Options</title>
1452
1453 <programlisting>$ python controlVNFI.py -h
1454Usage: controlVNFI.py [options]
1455
1456Controls a VNF instance from Enea uCPE Manager.
1457
1458Options:
1459 --version show program's version number and exit
1460 -h, --help show this help message and exit
1461 -u USERNAME, --username=USERNAME
1462 Enea uCPE Manager login username
1463 -p PASSWORD, --password=PASSWORD
1464 Enea uCPE Manager login password
1465 -H HOST, --host=HOST Enea uCPE Manager host name or IP address
1466 -i VNFINSTANCENAME, --vnfInstanceName=VNFINSTANCENAME
1467 Name of VNF instance
1468 -n VIMDEVICENAME, --device-name=VIMDEVICENAME
1469 Name of the device
1470 -c COMMAND, --command=COMMAND
1471 Control command (stop, start, pause or resume)
1472
1473 Mandatory options:
1474 -H/--host, -i/--vnfInstanceName, -n/--device-name, -c/--command</programlisting>
1475 </section>
1476
1477 <section id="json_control">
1478 <title>Configuring the JSON File</title>
1479
1480 <para>The control VNF instance suite JSON configuration file should
1481 contain a list of dictionaries, each dictionary indicating the test
1482 case name and the test case arguments passed to the controlVNFI Python
1483 module.</para>
1484
1485 <para><emphasis role="bold">Sample unit-test JSON file
1486 format:</emphasis></para>
1487
1488 <programlisting>[
1489 {
1490 "name": "Pause Fortigate VNF instance",
1491 "args": "-i fortigateFWInstance -c pause"
1492 },
1493 {
1494 "name": "Resume Fortigate VNF instance",
1495 "args": "-i fortigateFWInstance -c resume"
1496 },
1497 {
1498 "name": "Stop Fortigate VNF instance ",
1499 "args": "-i fortigateFWInstance -c stop"
1500 },
1501 {
1502 "name": "Start Fortigate VNF instance",
1503 "args": "-i fortigateFWInstance -c start"
1504 }
1505]</programlisting>
1506 </section>
1507
1508 <section id="pymod_control">
1509 <title>Running the Python Module</title>
1510
1511 <para>The controlVNFI Python module can be executed individually by
1512 running the following command line:</para>
1513
1514 <programlisting>$ python controlVNFI.py -u admin -p admin -H localhost -n intelc3850-2 -i
1515fortigateFWInstance -c stop
15162019-03-07 18:03:51,991 - DEBUG: Started logging
15172019-03-07 18:03:51,992 - INFO: Control VNF
15182019-03-07 18:03:52,031 - DEBUG: Login successful on host 'localhost'
15192019-03-07 18:03:52,031 - DEBUG: Session token is: 99ed9ba3-40f2-11e9-a81f525400d08e1d
15202019-03-07 18:03:52,046 - DEBUG: Found device with name 'intelc3850-2'
15212019-03-07 18:03:52,073 - DEBUG: Found VNF instance with name 'fortigateFWInstance'
15222019-03-07 18:03:52,073 - DEBUG: Control VNF instance 'intelc3850-2', command: stop
15232019-03-07 18:03:53,011 - INFO: Done
15242019-03-07 18:03:53,047 - DEBUG: Logging out and exiting...</programlisting>
1525 </section>
1526 </section>
1527
1528 <section id="destroy_vnf_inst">
1529 <title>Destroy a VNF Instance</title>
1530
1531 <para>Destroys a VNF instance from Enea uCPE Manager.</para>
1532
1533 <section id="script_opts_destroy">
1534 <title>Script Options</title>
1535
1536 <programlisting>$ python destroyVNFI.py -h
1537Usage: destroyVNFI.py [options]
1538
1539Destroys a VNF instance from Enea uCPE Manager.
1540
1541Options:
1542 --version show program's version number and exit
1543 -h, --help show this help message and exit
1544 -u USERNAME, --username=USERNAME
1545 Enea uCPE Manager login username
1546 -p PASSWORD, --password=PASSWORD
1547 Enea uCPE Manager login password
1548 -H HOST, --host=HOST Enea uCPE Manager host name or IP address
1549 -i VNFINSTANCENAME, --vnfInstanceName=VNFINSTANCENAME
1550 Name of VNF instance
1551 -n VIMDEVICENAME, --device-name=VIMDEVICENAME
1552 Name of the device
1553
1554 Mandatory options:
1555 -H/--host, -i/--vnfInstanceName, -n/--device-name</programlisting>
1556 </section>
1557
1558 <section id="json_destroy">
1559 <title>Configuring the JSON File</title>
1560
1561 <para>The destroy VNF instance suite JSON configuration file should
1562 contain a list of dictionaries, each dictionary indicating the test
1563 case name and the test case arguments passed to the destroyVNFI Python
1564 module.</para>
1565
1566 <para><emphasis role="bold">Sample unit-test JSON file
1567 format:</emphasis><programlisting>[
1568 {
1569 "name": "Destroying Fortigate VNF ",
1570 "args": "-i fortigateFWInstance"
1571 }
1572]</programlisting></para>
1573 </section>
1574
1575 <section id="pymod_destory">
1576 <title>Running the Python Module</title>
1577
1578 <para>The destroyVNFI Python module can be executed individually by
1579 running the following command line:</para>
1580
1581 <programlisting>$ python destroyVNFI.py -u admin -p admin -H localhost -n intelc3850-2 -i
1582fortigateFWInstance
15832019-03-07 17:33:51,025 - DEBUG: Started logging
15842019-03-07 17:33:51,026 - INFO: Destroy VNF
15852019-03-07 17:33:51,119 - DEBUG: Login successful on host 'localhost'
15862019-03-07 17:33:51,119 - DEBUG: Session token is: 68803ea5-40ee-11e9-a81f525400d08e1d
15872019-03-07 17:33:51,128 - DEBUG: Found device with name 'intelc3850-2'
15882019-03-07 17:33:51,148 - DEBUG: Found VNF instance with name 'fortigateFWInstance'
15892019-03-07 17:33:51,149 - DEBUG: Destroy VNF: fortigateFWInstance
15902019-03-07 17:33:51,655 - INFO: Done
15912019-03-07 17:33:51,712 - DEBUG: Logging out and exiting...</programlisting>
1592 </section>
1593 </section>
93 </section> 1594 </section>
94 1595
95 <section id="test_harness"> 1596 <section id="test_harness">
96 <title>Test Harness</title> 1597 <title>Test Harness</title>
97 1598
98 <para></para> 1599 <para>All Test Harness sources are under &lt;AF-TH-install-dir&gt;
99 1600 directory, except under the automation_framework sub-directory. See
100 <section id="test_suites"> 1601 chapter 4 for a complete tree listing.</para>
101 <title>Extending functionality - Test Suites</title>
102 1602
103 <para></para> 1603 <para>The Ansible based Test Harness represents an example of how to
104 </section> 1604 structure all the files needed for creating automated test cases using the
105 1605 AF and provides a way to implement them. The ansible.cfg file contains an
1606 example of the Ansible default configuration. It offers the possibility to
1607 display the Ansible console output in different ways, by setting the
1608 stdout_callback to selective or debug. Default is set to selective to
1609 print only certain tasks. It is recommended to switch on debug when a test
1610 fails. By setting any_errors_fatal to True, task failures will be
1611 considered fatal errors (the play execution will stop). The hosts file is
1612 the Ansible inventory file.</para>
1613
1614 <para>All the Playbooks that are executing AF python modules are run on
1615 localhost. New entries have to be created for direct communication over
1616 SSH with the boards, like [fortigateFW] example. The setup_env.sh script
1617 sets up the "testHarness" test environment by creating testHarness-venv
1618 python virtualenv, installing requests needed by Automation Framework
1619 python modules and installing Ansible. The playbooks directory contains
1620 all the implemented Ansible Playbooks. For details please refer to chapter
1621 "Sample Test Cases" from the Enea NFV Access System Test Specification
1622 document.</para>
1623
1624 <para>The uCPEM_config directory stores JSON configuration files needed
1625 for the setup of the uCPE Manager used by TH. One configuration file is
1626 needed per uCPE Manager installation to be used in the TH. The vnf_image
1627 directory stores the VNF Images needed by the Ansible Playbooks (i.e. the
1628 sample test cases).</para>
1629
1630 <para>The lab_config directory stores the JSON configuration files related
1631 to a device (devices, NICs and bridges). Each subfolder should be named
1632 exactly like the device name and should contain all the related
1633 configuration files needed for the test cases to be run on it.</para>
1634
1635 <para>The vnf_config directory stores the configuration files related to a
1636 VNF Descriptor. Typically these include a VNF Image JSON, VNF Instance
1637 JSON, VNF license and any other files required by the type of the VNF.
1638 Each subfolder should be named exactly like the name of the VNF Descriptor
1639 and should contain all the related configuration files needed for test
1640 cases to be run using this VNF.</para>
1641
1642 <para>The log directory is created when the setup_env.sh is run. When test
1643 cases are ran, the Ansible and the Python logs are stored in ansible.log
1644 and debug.log files, respectively.</para>
1645
1646 <section id="test_suites">
1647 <title>Extending functionality - Test Suites</title>
1648
1649 <para>To extend the functionality of the Test Harness it is typically
1650 needed that the functionlity of the Automation Framework be also
1651 extended to cover additional uCPE Manager REST Northbound APIs. The
1652 extension of the Automation Framework will result in new Python modules
1653 that have to be created.</para>
1654
1655 <para>Additional Python modules, that are not related to the
1656 functionality of the Automation Framework, could be easily integrated
1657 into Test Harness to aid in the creation of more complex test cases.
1658 Using the TH one can implement test cases that are run directly on the
1659 boards with Enea NFV Access, over SSH.</para>
1660
1661 <para>For a better understanding of the Test Harness functionality and
1662 how to extend the test suites, please refer to the chapter "Sample Test
1663 Cases" from the Enea NFV Access System Test Specification document and
1664 the TH code source.</para>
1665 </section>
106 </section> 1666 </section>
107</chapter> \ No newline at end of file 1667</chapter> \ No newline at end of file
diff --git a/doc/book-enea-nfv-access-auto-fw-th-user-guide/doc/components.xml b/doc/book-enea-nfv-access-auto-fw-th-user-guide/doc/components.xml
index 0f72709..8b98ca2 100644
--- a/doc/book-enea-nfv-access-auto-fw-th-user-guide/doc/components.xml
+++ b/doc/book-enea-nfv-access-auto-fw-th-user-guide/doc/components.xml
@@ -2,33 +2,117 @@
2<chapter id="components"> 2<chapter id="components">
3 <title>Components</title> 3 <title>Components</title>
4 4
5 <para>An overview of the Enea NFV Access solution and the uCPE Manager in
6 cooperation with the Automation Framework and Test Harness, will be
7 presented in detail.</para>
8
9 <figure>
10 <title>Component Overview</title>
11
12 <mediaobject>
13 <imageobject>
14 <imagedata align="center" fileref="images/autofw_testh_overview.png"
15 scale="40" />
16 </imageobject>
17 </mediaobject>
18 </figure>
19
5 <section id="enfva_solution"> 20 <section id="enfva_solution">
6 <title>Enea NFV Access Solution</title> 21 <title>Enea NFV Access Solution</title>
7 22
8 <para></para> 23 <para>The Enea NFV Access Solution is comprised of the Enea NFV Access
9 24 Runtime Platform and the Enea uCPE Manager.</para>
10 <section id="eucpe_manager"> 25
11 <title>Enea uCPE Manager</title> 26 <section id="eucpe_manager">
27 <title>Enea uCPE Manager</title>
28
29 <para>The Enea uCPE Manager application needs to be installed on a
30 supported platform. Upon installation, the system will be set up to
31 manage Enea NFV Access "devices", these are the virtualized CPE devices
32 used in testing.</para>
33
34 <para>For more on Enea uCPE Manager installation instructions, please
35 refer to chapter "Getting Started with Enea uCPE Manager" from the Enea
36 NFV Access Getting Started manual.</para>
37 </section>
38
39 <section id="ena_plat">
40 <title>Enea NFV Access</title>
41
42 <para>One or more NFV Access devices are required as target hosts
43 running the VNF(s). The NFV Access device is known to the uCPE Manager
44 as the "VcpeAgent" device module.</para>
45
46 <para>Adding a VcpeAgent device can be done via one of two
47 methods:</para>
12 48
13 <para></para> 49 <itemizedlist>
14 </section> 50 <listitem>
15 51 <para>Through the uCPE Manager GUI. Add the device using the
16 <section id="ena_plat"> 52 appropriate parameters by launching the UI under Devices -&gt;
17 <title>Enea NFV Access</title> 53 Manage in the main screen.</para>
54 </listitem>
18 55
19 <para></para> 56 <listitem>
20 </section> 57 <para>REST API. Invoke the uCPE Manager REST API to add a
58 device.</para>
59 </listitem>
60 </itemizedlist>
61
62 <para>For more on Enea NFV Access installation instructions, please
63 refer to chapter "Getting Started with Enea NFV Access" from the Enea
64 NFV Access Getting Started manual.</para>
65 </section>
21 </section> 66 </section>
22 67
23 <section id="automation"> 68 <section id="automation">
24 <title>Automation Framework</title> 69 <title>Automation Framework</title>
25 70
26 <para></para> 71 <para>Testing can be performed by running the available Python scripts
72 against the uCPE Manager REST API (Python samples supplied). This can be
73 done by using the Python scripts individually or by using the Python
74 unit-test suite that is able to automatically run test-cases defined for
75 each available Python script.</para>
76
77 <para>In either case, it is desirable to use a third system (instead of
78 running the tests on the same system as the uCPE Manager) in order to
79 ensure that uCPE Manager is setup and installed correctly in terms of
80 allowing external users to access it and use it effectively.</para>
27 </section> 81 </section>
28 82
29 <section id="harness"> 83 <section id="harness">
30 <title>Test Harness</title> 84 <title>Test Harness</title>
31 85
32 <para></para> 86 <para>The Test Harness (TH) provides a way for driving configuration with
87 Ansible Playbooks, by running the python modules from the Automation
88 Framework (AF) and by direct connection over SSH to the boards that run
89 the Enea NFV Access solution.</para>
90
91 <para>The Test Harness includes an automated test suite that
92 contains:</para>
93
94 <itemizedlist>
95 <listitem>
96 <para>VNF, Device and Network Smoke Test Cases. A sample test suite
97 that acts as basic smoke tests for the Enea NFV Access Solution and
98 also as a sanity-check test suite for the AF and TH.</para>
99 </listitem>
100
101 <listitem>
102 <para>VNF Deployment and Lifecycle. A sample test suite that verifies
103 the instantiation, lifecycle control and destruction of a VNF for the
104 Enea NFV Access Solution.</para>
105 </listitem>
106
107 <listitem>
108 <para>Service Creation and Lifecycle: A sample test suite that
109 contains complex test cases showcasing service creation and lifecycle
110 management.</para>
111 </listitem>
112 </itemizedlist>
113
114 <para>For details about the test suites or test cases please refer to the
115 chapter "Sample Test Cases" from the Enea NFV Access System Test
116 Specification document.</para>
33 </section> 117 </section>
34</chapter> \ No newline at end of file 118</chapter> \ No newline at end of file
diff --git a/doc/book-enea-nfv-access-auto-fw-th-user-guide/doc/getting_started.xml~ b/doc/book-enea-nfv-access-auto-fw-th-user-guide/doc/getting_started.xml~
deleted file mode 100755
index a52f99b..0000000
--- a/doc/book-enea-nfv-access-auto-fw-th-user-guide/doc/getting_started.xml~
+++ /dev/null
@@ -1,223 +0,0 @@
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<chapter id="getting_started">
3 <title>Getting Started with the Automation Framework and Test
4 Harness</title>
5
6 <section id="prerequisites">
7 <title>Prerequisites</title>
8
9 <para>For installation of the Automation Framework and Test Harness a
10 CentOS 7 host machine is needed with support for:</para>
11
12 <itemizedlist>
13 <listitem>
14 <para>Python 2.7</para>
15 </listitem>
16
17 <listitem>
18 <para>EPEL Repository installed:<programlisting>sudo yum install epel-release</programlisting></para>
19 </listitem>
20
21 <listitem>
22 <para>PIP package manager installed: <programlisting>sudo yum -y install python-pip</programlisting></para>
23 </listitem>
24
25 <listitem>
26 <para>Virtualenv tool installed: <programlisting>sudo pip install virtualenv</programlisting></para>
27 </listitem>
28 </itemizedlist>
29
30 <note>
31 <para>The Automation Framework and Test Harness installation may be done
32 on the same machine used for uCPE Manager installation, although this is
33 not encouraged. For more details see <link linkend="automation">chapter
34 3.2</link>.</para>
35 </note>
36 </section>
37
38 <section id="envrion">
39 <title>Environment</title>
40
41 <para><figure>
42 <title>Lab setup overview for Basic Setup</title>
43
44 <mediaobject>
45 <imageobject>
46 <imagedata align="center"
47 fileref="images/environment_basicsetup.png" scale="35" />
48 </imageobject>
49 </mediaobject>
50 </figure>The following enviroment setup is needed for running all the
51 tests defined in the Enea NFV Access System Test Specification
52 document:</para>
53
54 <para><emphasis role="bold">Lab Network</emphasis><itemizedlist>
55 <listitem>
56 <para>DHCP enabled.</para>
57 </listitem>
58
59 <listitem>
60 <para>Internet Connectivity.</para>
61 </listitem>
62 </itemizedlist></para>
63
64 <para><emphasis role="bold">uCPE Manager host</emphasis></para>
65
66 <itemizedlist>
67 <listitem>
68 <para>Running CentOS 7.</para>
69 </listitem>
70
71 <listitem>
72 <para>Connected to Lab Network.</para>
73 </listitem>
74
75 <listitem>
76 <para>uCPE Manager installed.</para>
77
78 <note>
79 <para>For details on how to install the uCPE Manager, see "Getting
80 Started with Enea uCPE Manager" from the Enea NFV Access Getting
81 Started manual.</para>
82 </note>
83 </listitem>
84 </itemizedlist>
85
86 <para><emphasis role="bold">1<superscript>st</superscript> Intel Whitebox
87 target device</emphasis><itemizedlist>
88 <listitem>
89 <para>Minimum 4 Physical Network Devices.</para>
90 </listitem>
91
92 <listitem>
93 <para>4GB RAM and 4 cores (Intel C3000 or Xeon D).</para>
94 </listitem>
95
96 <listitem>
97 <para>2 Physical connections to Lab Network.</para>
98 </listitem>
99
100 <listitem>
101 <para>Enea NFV Access installed.</para>
102
103 <note>
104 <para>For information on how to install Enea NFV Access<remark>the
105 solution or the platform?</remark>, refer to "Getting Started with
106 Enea NFV Access" from the Enea NFV Access Getting Started
107 manual.</para>
108 </note>
109 </listitem>
110 </itemizedlist><figure>
111 <title>Lab setup overview for ChainedVNFsService Setup</title>
112
113 <mediaobject>
114 <imageobject>
115 <imagedata align="center"
116 fileref="images/ChainedVNFsService_setup.png"
117 scale="40" />
118 </imageobject>
119 </mediaobject>
120 </figure></para>
121
122 <para><emphasis role="bold">Changes to 1st Intel Whitebox target
123 device</emphasis></para>
124
125 <itemizedlist>
126 <listitem>
127 <para>16GB RAM and 8 cores (Intel C3000 or Xeon D).</para>
128 </listitem>
129
130 <listitem>
131 <para>1 Physical connection back to back with the 2nd Intel Whitebox
132 target device.</para>
133 </listitem>
134 </itemizedlist>
135
136 <para><emphasis role="bold">2<superscript>nd</superscript> Intel Whitebox
137 target device</emphasis><itemizedlist>
138 <listitem>
139 <para>Minimum 4 Physical Network Devices.</para>
140 </listitem>
141
142 <listitem>
143 <para>16GB RAM and 8 cores (Intel C3000 or Xeon D).</para>
144 </listitem>
145
146 <listitem>
147 <para>2 Physical connections to Lab Network.</para>
148 </listitem>
149
150 <listitem>
151 <para>1 Physical connection back to back with the
152 1<superscript>st</superscript> Intel Whitebox target device.</para>
153 </listitem>
154
155 <listitem>
156 <para>Enea NFV Access installed.</para>
157
158 <note>
159 <para>For information on how to install Enea NFV Access<remark>the
160 solution or the platform?</remark>, refer to "Getting Started with
161 Enea NFV Access" from the Enea NFV Access Getting Started
162 manual.</para>
163 </note>
164 </listitem>
165 </itemizedlist></para>
166 </section>
167
168 <section id="initial_setup">
169 <title>Installation and Initial Setup</title>
170
171 <para>Download <filename>nfvaccess22_af-th.zip</filename> from the Enea
172 Portal and unzip it on the a supported host machine. Henceforth, the
173 directory in which the ZIP archive has been unpacked will be denoted as
174 <literal>&lt;AF-TH-installdir&gt;</literal>.</para>
175
176 <para>Enter the <literal>&lt;AF-TH-install-dir&gt;</literal> directory and
177 run the <filename>setup_env.sh</filename> script to do the initial setup
178 of the Test Harness environment: <filename>source
179 setup_env.sh</filename>.</para>
180
181 <para>Setup the uCPE Manager which will be used by the TH:</para>
182
183 <orderedlist>
184 <listitem>
185 <para>Create the uCPE Manager JSON config file in the
186 <literal>&lt;AF-TH-install-dir&gt;/uCPEM_config/</literal>
187 directory:<programlisting>{
188"ucpe_usr":"uCPE Manager Username",
189"ucpe_pass":"uCPE Manager Password",
190"ucpe_host":"uCPE Manager IP/Hostname",
191"ftp_usr":"FTP Username",
192"ftp_pass":"FTP Password",
193"ftp_port":"FTP Port"
194}</programlisting>See the
195 <filename>&lt;AF-TH-install-dir&gt;/uCPEM_config/ucpem01.json</filename>
196 file as an example.</para>
197 </listitem>
198
199 <listitem>
200 <para>Run the <filename>setupuCPEManager.yml</filename> Ansible
201 Playbook with the JSON config path as parameter: <programlisting>ansible-playbook playbooks/setupuCPEManager.yml &ndash;e\
202"@uCPEM_config/&lt;config_name&gt;.json"</programlisting></para>
203
204 <para><emphasis role="bold">Example</emphasis> <programlisting>ansible-playbook playbooks/setupuCPEManager.yml &ndash;e\
205"@uCPEM_config/ucpem01.json"</programlisting></para>
206 </listitem>
207 </orderedlist>
208
209 <para>Note that the steps presented in this sub-chapter are to be executed
210 only once, for the initial setup of the TH environment. Afterwards, each
211 session ends by closing the Python virtual environment (<literal>source
212 &lt;AF-THinstall-dir&gt;/testHarness/bin/deactivate</literal>) and
213 subsequent use of the installation requires activating the Python virtual
214 enviroment before using the Automation Framework and Test Harness
215 (<literal>source
216 &lt;AF-THinstall-dir&gt;/testHarness/bin/activate</literal>). </para>
217
218 <para>Furthermore, if a user wants to use a new uCPE Manager instance for
219 a new session, the user also has to re-run the
220 <filename>setupuCPEManager.yml</filename> playbook with the corresponding
221 JSON config for the new uCPE Manager instance.</para>
222 </section>
223</chapter> \ No newline at end of file
diff --git a/doc/book-enea-nfv-access-auto-fw-th-user-guide/doc/troubleshooting_guide.xml b/doc/book-enea-nfv-access-auto-fw-th-user-guide/doc/troubleshooting_guide.xml
index f9d4381..2f0509b 100644
--- a/doc/book-enea-nfv-access-auto-fw-th-user-guide/doc/troubleshooting_guide.xml
+++ b/doc/book-enea-nfv-access-auto-fw-th-user-guide/doc/troubleshooting_guide.xml
@@ -2,5 +2,36 @@
2<chapter id="troubleshooting_guide"> 2<chapter id="troubleshooting_guide">
3 <title>Troubleshooting Guide</title> 3 <title>Troubleshooting Guide</title>
4 4
5 <para></para> 5 <para>The following are best practices and possible solutions to problems
6 that may occur during operation.</para>
7
8 <itemizedlist>
9 <listitem>
10 <para>All the Playbooks have to be run from the root directory of the
11 Test Harness to avoid failures such as "File not found!", because the
12 paths to the needed configuration files are hardcoded into the
13 Playbooks.</para>
14 </listitem>
15
16 <listitem>
17 <para>If the setup_env.sh fails, for debugging, remove &amp;&gt;
18 /dev/null from the failed command. Then the output of the command will
19 be printed, and will not be redirected to /dev/null anymore.</para>
20 </listitem>
21
22 <listitem>
23 <para>When setup the uCPE Manager to be used by the TH using
24 setupuCPEManager.yml Playbook, if the uCPE username/password/host are
25 wrong or are missing, all the Sample test cases will fail. If the FTP
26 username/password/port are wrong or are missing, the tests that requires
27 file transfer to uCPE Manager will fail.</para>
28 </listitem>
29
30 <listitem>
31 <para>Ansible logs are not written into the log/ansible.log file when
32 the stdout_callback is set to selective in the ansible.cfg. For
33 debugging, check the python logs from log/debug.log file or change the
34 stdout_callback to debug and rerun the test.</para>
35 </listitem>
36 </itemizedlist>
6</chapter> \ No newline at end of file 37</chapter> \ No newline at end of file