summaryrefslogtreecommitdiffstats
path: root/doc/book-enea-nfv-access-auto-fw-th-user-guide/doc/automation_framework_test_harness.xml
blob: cdf024cdfd1dc93bd7442d954e59a3a62ffa9157 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
<?xml version="1.0" encoding="ISO-8859-1"?>
<chapter id="auto_fw_test_harness">
  <title>Automation Framework and Test Harness</title>

  <section id="auto_fw">
    <title>Automation Framework</title>

    <para>All Automation Framework sources are under the
    <literal>&lt;AF-TH-install-dir&gt;/automation_framework</literal>
    directory.</para>

    <para>The <literal>/device</literal> folder contains Python scripts for
    adding uCPE device(s), receiving uCPE events' reports, removing a uCPE
    device, waiting for a uCPE device to connect to the uCPE Manager, as well
    as scripts for adding and removing an offline configuration store.</para>

    <para>The <literal>/network</literal> folder contains Python scripts for
    binding or unbinding a network interface to and from a uCPE device (DPDK or
    SR-IOV), creating or deleting an OVS network bridge, or dumping network
    interface information about the available interfaces. Three of the scripts
    mentioned here (binding, creating, deleting) are also applicable for an
    Offline Configuration Store.</para>

    <note>
      <para>Commands within the network folder that include the option
      <emphasis role="bold">-o</emphasis> allow the user to perform the action
      in an offline configuration store alternative available for use at a
      later setup time. All options contain either <emphasis
      role="bold">-n</emphasis>, <emphasis role="bold">-o</emphasis> or both.
      One of them must always be provided, if both are provided, -o has
      priority, and -n is thus ignored.</para>
    </note>

    <para>The <literal>/unittestSuite</literal> folder contains Python
    unit-test class and loader scripts for generating specific test cases for
    the available Python scripts. The generated test cases are injected into
    the Python unit-test suite class to be run using the Python unit-test
    framework.</para>

    <para>The <literal>/unittestSuite/config</literal> folder contains
    configuration files in JSON format that describe the list of test cases
    for a particular Python script. Each defined test case is a dictionary
    that must contain the test case name and arguments to be passed to the
    Python script for running the test case.</para>

    <para>The <literal>/vnf</literal> folder contains Python scripts for
    onboarding and offboarding a VNF image, instantiating a VNF, controlling a
    VNF instance or destroying an existing one.</para>

    <para>The <filename>eneaUcpeMgr.py</filename> file acts as a library for
    the (Python) Automation Framework scripts. It contains common functions
    and unit-test configuration options.</para>

    <section id="python_testsuite">
      <title>Python Unit-Test Suite</title>

      <para>The Python unit-test class defined in the
      <filename>unittestSuite.py</filename> script provides a way to automate
      the execution of specific test cases for each supported Python
      script.</para>

      <para>This class requires a test suite configuration JSON file that
      contains a dictionary list of the Python scripts to be processed. Each
      dictionary must contain the path of the Python script to be loaded and
      the path to the file describing the test cases to be performed against
      the designated script.</para>

      <para>Steps for running the Python unit-test suite on the uCPE Manager
      are provided below.</para>

      <section id="script_opts">
        <title>Script Options</title>

        <programlisting>$ python unittestSuite.py -h
Usage: unittestSuite.py [options]

Run selected unit-test suite against Enea uCPE Manager.

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -u USERNAME, --username=USERNAME
                        Enea uCPE Manager login username
  -p PASSWORD, --password=PASSWORD
                        Enea uCPE Manager login password
  -H HOST, --host=HOST  Enea uCPE Manager host name or IP address
  -n DEVICENAME, --deviceName=DEVICENAME
                        Name of vCPE device (Virtual Infrastructure Manager)
  -s SUITEFILE, --suite=SUITEFILE
                        Test suite configuration file in JSON format
  -d DESCRIPTION, --description=DESCRIPTION
                        Test suite description
  -o OFFLINE, --offline=OFFLINE
                        Offline Configuration(ZTP)

  Mandatory options:
    -H/--host, -n/--deviceName, -s/--suiteFile, -d/--description</programlisting>
      </section>

      <section id="config_ut_json">
        <title>Configuring Unit-Test JSON File</title>

        <para>The Unit-Test suite JSON configuration file contains a list of
        dictionaries. Each dictionary indicates the path of the Python module
        to load and the test case's configuration file to be executed against
        the loaded module.</para>

        <para>Below is a sample unit-test configuration file, describing the
        Fortigate <emphasis role="bold">deployment</emphasis> scenario
        <filename>fortigateDeploy.json</filename>:</para>

        <para><programlisting>[
   {
      "config": "config/waitDeviceUp.json",
      "module": "../device/waitDeviceUp.py"
   },
   {
      "config": "config/bindNetworkInterface.json",
      "module": "../network/bindNetworkInterface.py"
   },
   {
      "config": "config/newNetworkBridge.json",
      "module": "../network/newNetworkBridge.py"
   },
   {
      "config": "config/onboardVNFRaw.json",
      "module": "../vnf/onboardVNFRaw.py"
   },
   {
      "config": "config/instantiateVNFI.json",
      "module": "../vnf/instantiateVNFI.py"
   },
   {
      "config": "config/controlVNFI.json",
      "module": "../vnf/controlVNFI.py"
   }
]</programlisting></para>

        <para>Below is a sample unit-test configuration file, describing the
        Fortigate <emphasis role="bold">cleanup</emphasis> scenario
        <filename>fortigateCleanup.json</filename>:</para>

        <programlisting>[
   {
      "config": "config/destroyVNFI.json",
      "module": "../vnf/destroyVNFI.py"
   },
   {
      "config": "config/delNetworkBridge.json",
      "module": "../network/delNetworkBridge.py"
   },
   {
      "config": "config/unbindNetworkInterface.json",
      "module": "../network/unbindNetworkInterface.py"
   },
   {
      "config": "config/offboardVNF.json",
      "module": "../vnf/offboardVNF.py"
   }
]</programlisting>

        <para>The <literal>config</literal> key contains the path to the test
        case's configuration file.</para>

        <para>The <literal>module</literal> key contains the path to the
        Python script to be executed.</para>
      </section>

      <section id="ut_config_opts">
        <title>Unit-Test Configuration Options</title>

        <para>Unit-test behavior can be tweaked through setting any of the
        following options. This is done through the
        <filename>eneaUcpeMgr.py</filename> file:</para>

        <programlisting># Defaults for the framework
username = "admin"
password = "admin"
host = None
deviceName = None
directory =  "."
ftpUsername = "ftp"
ftpPassword = "ftp"
ftpPort = "2021"

# Stop the test run on the first error or failure
failfast = True

# Logging levels ordered by the highest severity:
#  CRITICAL      50
#  ERROR         40
#  WARNING       30
#  INFO          20
#  DEBUG         10
#  NOTSET        0
fileLoggingLevel = logging.DEBUG
consoleLoggingLevel = logging.INFO
</programlisting>

        <table>
          <title>eneaUcpeMgr.py Options</title>

          <tgroup cols="2">
            <colspec align="left" />

            <colspec colwidth="2*" />

            <colspec colwidth="5*" />

            <thead>
              <row>
                <entry align="center">Option</entry>

                <entry align="center">Description</entry>
              </row>
            </thead>

            <tbody>
              <row>
                <entry><literal>username</literal></entry>

                <entry>The user authentication used to log into the uCPE
                Manager. This can be overwritten by setting the Python
                unit-test suite command line option
                <literal>-u</literal>.</entry>
              </row>

              <row>
                <entry><literal>password</literal></entry>

                <entry>The password used to log into the uCPE Manager. This
                can be overwritten by setting the Python unit-test suite
                command line option <literal>-p</literal>.</entry>
              </row>

              <row>
                <entry><literal>host</literal></entry>

                <entry>The IP address of the uCPE Manager host. This can be
                overwritten by setting the Python unit-test suite command line
                option <literal>-H</literal>.</entry>
              </row>

              <row>
                <entry><literal>devicename</literal></entry>

                <entry>The name of the vCPE agent against which tests will be
                performed. This can be overwritten by setting the Python
                unit-test suite command line option
                <literal>-n</literal>.</entry>
              </row>

              <row>
                <entry><literal>ftpUsername</literal></entry>

                <entry>The user authentication used for the FTP connection
                when onboarding a VNF image. This can be overwritten by
                setting the Python script command line option
                <literal>-f</literal>.</entry>
              </row>

              <row>
                <entry><literal>ftpPassword</literal></entry>

                <entry>The password used for the FTP connection when
                onboarding a VNF image. This can be overwritten by setting the
                Python script command line option
                <literal><literal>-w</literal></literal>.</entry>
              </row>

              <row>
                <entry><literal>ftpPort</literal></entry>

                <entry>The port used for the FTP connection when onboarding a
                VNF image. This can be overwritten by setting the Python
                script command line option <literal>-P</literal>.</entry>
              </row>

              <row>
                <entry><literal>failfast</literal></entry>

                <entry>Describes the unit-test execution behavior on the first
                error or failure encountered.</entry>
              </row>

              <row>
                <entry><literal>fileLoggingLevel</literal></entry>

                <entry>Sets the file logging level.</entry>
              </row>

              <row>
                <entry><literal>consoleLoggingLevel</literal></entry>

                <entry>Sets the console logging level.</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </section>

      <section id="ut_suite_log">
        <title>Python Unit-Test Suite Logging</title>

        <para>Logging messages are displayed in the console and also saved to
        the specified log file. They are shown depending on the chosen logging
        level.</para>

        <para>Logging messages are ranked by their severity
        level:<programlisting>CRITICAL 50
ERROR 40
WARNING 30
INFO 20
DEBUG 10
NOTSET 0</programlisting></para>

        <note>
          <para>Logging messages less severe than the set logging level will
          be ignored.</para>
        </note>

        <para>Setting the console logging level to INFO is done through the
        <literal>consoleLoggingLevel</literal> option:<programlisting>consoleLoggingLevel = logging.INFO</programlisting>Setting
        the file logging level to DEBUG is done through the
        <literal>fileLoggingLevel</literal> option:<programlisting>fileLoggingLevel = logging.DEBUG</programlisting></para>
      </section>

      <section id="run_ut_suite">
        <title>Running Python Unit-Test Suite</title>

        <para>Below you'll find sample unit-test command line options for
        running the Fortigate <emphasis role="bold">deployment</emphasis>
        scenario:</para>

        <programlisting>$ python unittestSuite.py -u admin -p admin -H localhost -n intelc3850-2 -s
fortigateDeploy.json -d "Fortigate deployment scenario"</programlisting>

        <para>Setting the console logging level to DEBUG:</para>

        <para><programlisting>consoleLoggingLevel = logging.DEBUG</programlisting>
        <emphasis role="bold">Expected Output:</emphasis></para>

        <programlisting>2020-04-15 07:58:40,668 - DEBUG: Started logging

Running Fortigate deployment scenario...

test 001: Wait VCPE Agent device be up (__main__.UnittestSuite) ...
2020-04-15 07:58:40,681 - INFO: Wait uCPE device
2020-04-15 07:58:40,722 - DEBUG: Login successful on host 'localhost'
2020-04-15 07:58:40,723 - DEBUG: Session token is: 280028c0-7ede-11ea-a9a8-02429dc76bdd
2020-04-15 07:58:40,746 - DEBUG: Found device with name 'intelc3850-2'
2020-04-15 07:58:40,747 - DEBUG: Wait for device 'intelc3850-2' to connect
2020-04-15 07:58:41,769 - DEBUG: HACK: sleep 30s more
2020-04-15 07:59:11,791 - DEBUG: HACK: continue
2020-04-15 07:59:11,792 - INFO: Status: Connected
2020-04-15 07:59:11,793 - INFO: Done
2020-04-15 07:59:11,827 - DEBUG: Logging out and exiting...
ok
test 002: Bind lan NIC to DPDK (__main__.UnittestSuite) ...
2020-04-15 07:59:11,832 - INFO: Bind NIC
2020-04-15 07:59:11,868 - DEBUG: Login successful on host 'localhost'
2020-04-15 07:59:11,870 - DEBUG: Session token is: 3a90a960-7ede-11ea-a9a8-02429dc76bdd
2020-04-15 07:59:11,897 - DEBUG: Found device with name 'intelc3850-2'
2020-04-15 07:59:11,898 - DEBUG: Bind NIC 'eno6' to dpdk
2020-04-15 07:59:12,952 - INFO: Done
2020-04-15 07:59:12,983 - DEBUG: Logging out and exiting...
ok
test 003: Bind wan NIC to DPDK (__main__.UnittestSuite) ...
2020-04-15 07:59:12,986 - INFO: Bind NIC
2020-04-15 07:59:13,023 - DEBUG: Login successful on host 'localhost'
2020-04-15 07:59:13,025 - DEBUG: Session token is: 3b410da0-7ede-11ea-a9a8-02429dc76bdd
2020-04-15 07:59:13,048 - DEBUG: Found device with name 'intelc3850-2'
2020-04-15 07:59:13,050 - DEBUG: Bind NIC 'eno8' to dpdk
2020-04-15 07:59:14,365 - INFO: Done
2020-04-15 07:59:14,392 - DEBUG: Logging out and exiting...
ok
test 004: Creating network bridge LAN  (__main__.UnittestSuite) ...
2020-04-15 07:59:14,395 - INFO: New OVS network bridge
2020-04-15 07:59:14,428 - DEBUG: Login successful on host 'localhost'
2020-04-15 07:59:14,429 - DEBUG: Session token is: 3c174961-7ede-11ea-a9a8-02429dc76bdd
2020-04-15 07:59:14,452 - DEBUG: Found device with name 'intelc3850-2'
2020-04-15 07:59:14,453 - DEBUG: Create new OVS network bridge 'lan_br'
2020-04-15 07:59:14,454 - DEBUG: Attaching interface 'eno6' to bridge 'lan_br'
2020-04-15 07:59:21,751 - INFO: Done
2020-04-15 07:59:21,779 - DEBUG: Logging out and exiting...
ok
test 005: Creating network bridge WAN  (__main__.UnittestSuite) ...
2020-04-15 07:59:21,782 - INFO: New OVS network bridge
2020-04-15 07:59:21,818 - DEBUG: Login successful on host 'localhost'
2020-04-15 07:59:21,819 - DEBUG: Session token is: 407ec231-7ede-11ea-a9a8-02429dc76bdd
2020-04-15 07:59:21,845 - DEBUG: Found device with name 'intelc3850-2'
2020-04-15 07:59:21,846 - DEBUG: Create new OVS network bridge 'wan_br'
2020-04-15 07:59:21,847 - DEBUG: Attaching interface 'eno8' to bridge 'wan_br'
2020-04-15 07:59:22,813 - INFO: Done
2020-04-15 07:59:22,845 - DEBUG: Logging out and exiting...
ok
test 006: Onboarding Fortigate VNF (wizard API) (__main__.UnittestSuite) ...
2020-04-15 07:59:22,849 - INFO: Onboard wizard
2020-04-15 07:59:22,885 - DEBUG: Login successful on host 'localhost'
2020-04-15 07:59:22,886 - DEBUG: Session token is: 4121b8f1-7ede-11ea-a9a8-02429dc76bdd
2020-04-15 07:59:22,890 - DEBUG: FTP file '../../vnf_image/fortios.qcow2' on host \
'localhost', port '2021'
2020-04-15 07:59:23,127 - DEBUG: Onboard VNF raw: fortios.qcow2
2020-04-15 07:59:27,107 - INFO: Done
2020-04-15 07:59:27,140 - DEBUG: Logging out and exiting...
ok
test 007: Instantiate Fortigate VNF (__main__.UnittestSuite) ...
2020-04-15 07:59:27,144 - INFO: Instantiate VNF
2020-04-15 07:59:27,182 - DEBUG: Login successful on host 'localhost'
2020-04-15 07:59:27,184 - DEBUG: Session token is: 43b16480-7ede-11ea-a9a8-02429dc76bdd
2020-04-15 07:59:27,207 - DEBUG: Found device with name 'intelc3850-2'
2020-04-15 07:59:27,281 - DEBUG: Found VNF descriptor with name 'fortigateImage'
2020-04-15 07:59:27,286 - DEBUG: Reading file content as text: \
vnf_config/fortigateImage/fortigateFW.conf
2020-04-15 07:59:27,359 - DEBUG: Encrypt file content: \
vnf_config/fortigateImage/fortigateFW.conf
2020-04-15 07:59:27,364 - DEBUG: Reading file content as text: \
vnf_config/fortigateImage/fortigateLicense.lic
2020-04-15 07:59:27,407 - DEBUG: Encrypt file content: \
vnf_config/fortigateImage/fortigateLicense.lic
2020-04-15 07:59:27,409 - DEBUG: Instantiate fortigateImage VNF on 'intelc3850-2'
2020-04-15 07:59:32,720 - INFO: Done
2020-04-15 07:59:32,747 - DEBUG: Logging out and exiting...
ok
test 008: Pause Fortigate VNF instance (__main__.UnittestSuite) ...
2020-04-15 07:59:32,840 - INFO: Control VNF
2020-04-15 07:59:32,877 - DEBUG: Login successful on host 'localhost'
2020-04-15 07:59:32,880 - DEBUG: Session token is: 47166170-7ede-11ea-a9a8-02429dc76bdd
2020-04-15 07:59:32,904 - DEBUG: Found device with name 'intelc3850-2'
2020-04-15 07:59:32,954 - DEBUG: Found VNF instance with name 'fortigateFWInstance'
2020-04-15 07:59:32,955 - DEBUG: Control VNF instance 'intelc3850-2', command: pause
2020-04-15 07:59:33,114 - INFO: Done
2020-04-15 07:59:33,138 - DEBUG: Logging out and exiting...
ok
test 009: Resume Fortigate VNF instance (__main__.UnittestSuite) ...
2020-04-15 07:59:33,142 - INFO: Control VNF
2020-04-15 07:59:33,174 - DEBUG: Login successful on host 'localhost'
2020-04-15 07:59:33,177 - DEBUG: Session token is: 4743b300-7ede-11ea-a9a8-02429dc76bdd
2020-04-15 07:59:33,209 - DEBUG: Found device with name 'intelc3850-2'
2020-04-15 07:59:33,257 - DEBUG: Found VNF instance with name 'fortigateFWInstance'
2020-04-15 07:59:33,258 - DEBUG: Control VNF instance 'intelc3850-2', command: resume
2020-04-15 07:59:33,365 - INFO: Done
2020-04-15 07:59:33,389 - DEBUG: Logging out and exiting...
ok
test 010: Stop Fortigate VNF instance  (__main__.UnittestSuite) ...
2020-04-15 07:59:33,393 - INFO: Control VNF
2020-04-15 07:59:33,436 - DEBUG: Login successful on host 'localhost'
2020-04-15 07:59:33,438 - DEBUG: Session token is: 476aea10-7ede-11ea-a9a8-02429dc76bdd
2020-04-15 07:59:33,467 - DEBUG: Found device with name 'intelc3850-2'
2020-04-15 07:59:33,511 - DEBUG: Found VNF instance with name 'fortigateFWInstance'
2020-04-15 07:59:33,513 - DEBUG: Control VNF instance 'intelc3850-2', command: stop
2020-04-15 07:59:33,865 - INFO: Done
2020-04-15 07:59:33,891 - DEBUG: Logging out and exiting...
ok
test 011: Start Fortigate VNF instance (__main__.UnittestSuite) ...
2020-04-15 07:59:33,895 - INFO: Control VNF
2020-04-15 07:59:33,931 - DEBUG: Login successful on host 'localhost'
2020-04-15 07:59:33,932 - DEBUG: Session token is: 47b70e41-7ede-11ea-a9a8-02429dc76bdd
2020-04-15 07:59:33,956 - DEBUG: Found device with name 'intelc3850-2'
2020-04-15 07:59:34,013 - DEBUG: Found VNF instance with name 'fortigateFWInstance'
2020-04-15 07:59:34,015 - DEBUG: Control VNF instance 'intelc3850-2', command: start
2020-04-15 07:59:36,599 - INFO: Done
2020-04-15 07:59:36,623 - DEBUG: Logging out and exiting...
ok

----------------------------------------------------------------------
Ran 11 tests in 55.946s

OK</programlisting>

        <para>Below you'll find sample unit-test command line options for
        running the Fortigate <emphasis role="bold">cleanup</emphasis>
        scenario:</para>

        <programlisting>$ python unittestSuite.py -u admin -p admin -H localhost -n intelc3850-2 -s
fortigateCleanup.json -d "Fortigate cleanup scenario"</programlisting>

        <para>Setting the console logging level to INFO: <programlisting>consoleLoggingLevel = logging.INFO</programlisting></para>

        <para><emphasis role="bold">Expected Output:</emphasis></para>

        <programlisting>Running Fortigate cleanup scenario...

test 001: Destroying Fortigate VNF (__main__.UnittestSuite) ...
2020-04-15 08:03:40,756 - INFO: Destroy VNF
2020-04-15 08:03:41,358 - INFO: Done
ok
test 002: Deleting network bridge LAN (__main__.UnittestSuite) ...
2020-04-15 08:03:41,494 - INFO: Delete OVS network bridge
2020-04-15 08:03:41,731 - INFO: Done
ok
test 003: Deleting network bridge WAN (__main__.UnittestSuite) ...
2020-04-15 08:03:41,766 - INFO: Delete OVS network bridge
2020-04-15 08:03:43,270 - INFO: Done
ok
test 004: Unbind lan NIC from DPDK (__main__.UnittestSuite) ...
2020-04-15 08:03:43,375 - INFO: Unbind NIC
2020-04-15 08:03:45,405 - INFO: Done
ok
test 005: Unbind wan NIC from DPDK (__main__.UnittestSuite) ...
2020-04-15 08:03:45,434 - INFO: Unbind NIC
2020-04-15 08:03:47,633 - INFO: Done
ok
test 006: Offboarding Fortigate VNF (__main__.UnittestSuite) ...
2020-04-15 08:03:47,701 - INFO: Offboard VNF
2020-04-15 08:03:47,919 - INFO: Done
ok

----------------------------------------------------------------------
Ran 6 tests in 7.192s

OK</programlisting>
      </section>
    </section>

    <section id="add_ucpe_device">
      <title>Adding a uCPE Device</title>

      <para>Steps for adding, configuring and running a uCPE device onto the
      uCPE manager are described below .</para>

      <section id="opts_add_device">
        <title>Script Options</title>

        <programlisting>$ python addDevice.py -h
Usage: addDevice.py [options]

Add a uCPE device in Enea uCPE Manager.

Options:
 --version show program's version number and exit
 -h, --help show this help message and exit
 -u USERNAME, --username=USERNAME
 Enea uCPE Manager login username
 -p PASSWORD, --password=PASSWORD
 Enea uCPE Manager login password
 -H HOST, --host=HOST Enea uCPE Manager host name or IP address
 -f DEVICEFILE, --file=DEVICEFILE
 File containing uCPE Information in JSON format

 Mandatory options:
 -H/--host, -f/--file</programlisting>
      </section>

      <section id="config_json_adddev">
        <title>Configuring the JSON File</title>

        <para>The JSON configuration file needed for adding a uCPE device
        should contain a list of dictionaries. Each dictionary indicates the
        test case name and the arguments passed to the
        <literal>addDevice</literal> Python module.</para>

        <para><emphasis role="bold">Sample configuration file in JSON
        format:</emphasis></para>

        <programlisting>[
 {
 "name": "Add VCPE Agent device ",
 "args": "-f ../../lab_config/intelc3850-2/intelc3850-2.json"
 }
]</programlisting>

        <para><emphasis role="bold">Sample
        <filename>intelc3850-2.json</filename> configuration
        file:</emphasis></para>

        <programlisting>{
 "name": " intelc3850-2",
 "description": "",
 "address": "192.168.1.100",
 "port": "22",
 "username": "root",
 "password": "root",
 "certificate": null,
 "passphrase": null,
 "maintMode": "false"
}</programlisting>
      </section>

      <section id="run_py_mod">
        <title>Running the Python Module</title>

        <para>The <filename>addDevice</filename> Python module can be executed
        independently by running the following command:</para>

        <programlisting>$ python addDevice.py -u admin -p admin -H localhost -f config/device.json
2019-03-07 17:33:10,755 - DEBUG: Started logging
2019-03-07 17:33:10,756 - INFO: Add uCPE device
2019-03-07 17:33:10,975 - DEBUG: Login successful on host 'localhost'
2019-03-07 17:33:10,979 - DEBUG: Session token is: 508b6ea2-40ee-11e9-a81f525400d08e1d
2019-03-07 17:33:11,049 - DEBUG: Add new device 'intelc3850-2' to uCPE Manager host
2019-03-07 17:33:11,483 - INFO: Done
2019-03-07 17:33:11,501 - DEBUG: Logging out and exiting....</programlisting>
      </section>
    </section>

    <section id="remove_ucpe_device">
      <title>Removing a uCPE Device</title>

      <para>Steps for removing a uCPE device from the uCPE manager are
      described below.</para>

      <section id="rem_script_opts">
        <title>Script Options</title>

        <programlisting>$ python removeDevice.py -h
Usage: removeDevice.py [options]

Remove a uCPE from Enea uCPE Manager.

Options:
 --version show program's version number and exit
 -h, --help show this help message and exit
 -u USERNAME, --username=USERNAME
 Enea uCPE Manager login username
 -p PASSWORD, --password=PASSWORD
 Enea uCPE Manager login password
 -H HOST, --host=HOST Enea uCPE Manager host name or IP address
 -f DEVICEFILE, --file=DEVICEFILE
 File containing uCPE Information in JSON format

 Mandatory options:
 -H/--host, -f/--file</programlisting>
      </section>

      <section id="config_json_rem">
        <title>Configuring the JSON File</title>

        <para>The JSON configuration file needed to remove a uCPE device
        should contain a list of dictionaries. Each dictionary indicates the
        test case name and the arguments passed to the
        <filename>removeDevice</filename> Python module.</para>

        <para><emphasis role="bold">Sample unit-test JSON file
        format:</emphasis></para>

        <programlisting>[
 {
 "name": "Remove VCPE Agent device ",
 "args": "-f ../../lab_config/intelc3850-2/intelc3850-2.json"
 }
]</programlisting>

        <para><emphasis role="bold">Sample
        <filename>intelc3850-2.json</filename> configuration
        file:</emphasis></para>

        <programlisting>{
 "name": "intelc3850-2"
}</programlisting>
      </section>

      <section id="Run_py_mod_rem">
        <title>Running the Python Module</title>

        <para>The <filename>removeDevice</filename> Python module can be
        executed individually by running the following command:</para>

        <programlisting>$ python removeDevice.py -u admin -p admin -H localhost -f
../../lab_config/intelc3850-2/intelc3850-2.json
2019-03-07 17:33:56,834 - DEBUG: Started logging
2019-03-07 17:33:56,835 - INFO: Remove uCPE device
2019-03-07 17:33:56,856 - DEBUG: Login successful on host 'localhost'
2019-03-07 17:33:56,856 - DEBUG: Session token is: 6bebcb43-40ee-11e9-a81f525400d08e1d
2019-03-07 17:33:56,856 - DEBUG: Delete device 'intelc3850-2' from uCPE Manager
host
2019-03-07 17:33:56,875 - DEBUG: Found device with name 'intelc3850-2'
2019-03-07 17:33:57,159 - INFO: Done
2019-03-07 17:33:57,171 - DEBUG: Logging out and exiting...</programlisting>
      </section>
    </section>

    <section id="wait_ucpe_device">
      <title>Waiting a uCPE Device</title>

      <para>Steps and details for how to Wait a uCPE device to connect to the
      uCPE Manager after installation, are described below.</para>

      <section id="wait_script_opts">
        <title>Script Options</title>

        <programlisting>$ python waitDeviceUp.py -h
Usage: waitDeviceUp.py [options]

Wait for uCPE to connect to the Enea uCPE Manager after installation.

Options:
 --version show program's version number and exit
 -h, --help show this help message and exit
 -u USERNAME, --username=USERNAME
 Enea uCPE Manager login username
 -p PASSWORD, --password=PASSWORD
 Enea uCPE Manager login password
 -H HOST, --host=HOST Enea uCPE Manager host name or IP address
 -f DEVICEFILE, --file=DEVICEFILE
 File containing uCPE Information in JSON format
 -t TIMEOUT, --timeout=TIMEOUT
 Time in seconds for maximum wait period, default =
 instant

 Mandatory options:
 -H/--host, -f/--file</programlisting>
      </section>

      <section id="config_json_wait">
        <title>Configuring the JSON File</title>

        <para>The JSON configuration file needed to wait a uCPE device should
        contain a list of dictionaries. Each dictionary indicates the test
        case name and the test case arguments passed to the
        <filename>waitDeviceUp</filename> Python module.</para>

        <para><emphasis role="bold">Sample unit-test JSON file
        format:</emphasis></para>

        <programlisting>[
 {
 "name": "Wait VCPE Agent device be up",
 "args": "-f ../../lab_config/intelc3850-2/intelc3850-2.json -t 60"
 }
]</programlisting>

        <para><emphasis role="bold">Sample
        <filename>intelc3850-2.json</filename> configuration
        file:</emphasis></para>

        <programlisting>{
 "name": "intelc3850-2"
}</programlisting>
      </section>

      <section id="runpy_mod_wait">
        <title>Running the Python Module</title>

        <para>The <filename>waitDeviceUp</filename> Python module can be
        executed individually by running the following command
        line:<programlisting>$ python waitDeviceUp.py -u admin -p admin -H localhost -t 60 -f
../../lab_config/intelc3850-2/intelc3850-2.json
2019-03-07 18:03:21,132 - DEBUG: Started logging
2019-03-07 18:03:21,133 - INFO: Wait uCPE device
2019-03-07 18:03:21,149 - DEBUG: Login successful on host 'localhost'
2019-03-07 18:03:21,149 - DEBUG: Session token is: 8785b1a0-40f2-11e9-a81f525400d08e1d
2019-03-07 18:03:21,157 - DEBUG: Found device with name 'intelc3850-2'
2019-03-07 18:03:21,157 - DEBUG: Wait for device 'intelc3850-2' to connect
2019-03-07 18:03:29,356 - DEBUG: Status: Connected
2019-03-07 18:03:29,356 - INFO: Done
2019-03-07 18:03:29,365 - DEBUG: Logging out and exiting...</programlisting></para>
      </section>
    </section>

    <section id="print_ucpe_log">
      <title>Printing the uCPE Device Log</title>

      <para>Steps and details on how to Print the events log for a specific
      uCPE device installed in the uCPE Manager, are explained below.</para>

      <section id="print_script_opts">
        <title>Script Options</title>

        <programlisting>$ python getEventsForUcpe.py -h
Usage: getEventsForUcpe.py [options]

Print the events log for a specific uCPE installed in Enea uCPE Manager.

Options:
--version                          show program's version number and exit
-h, --help                         show this help message and exit
-u USERNAME, --username=USERNAME   Enea uCPE Manager login username
-p PASSWORD, --password=PASSWORD   Enea uCPE Manager login password
-H HOST, --host=HOST               Enea uCPE Manager host name or IP address
-f DEVICEFILE, --file=DEVICEFILE   File containing uCPE Information in JSON format
-s SEVERITY, --severity=SEVERITY   Event severity level (Critical|Major|Minor)

Mandatory options:
-H/--host, -f/--file            </programlisting>
      </section>

      <section id="config_json_log">
        <title>Configuring the JSON File</title>

        <para><emphasis role="bold">Sample
        <filename>intelc3850-2.json</filename> configuration
        file:</emphasis></para>

        <programlisting>{
"name": "intelc3850-2",
"description": "",
"address": "172.24.12.114",
"port": "22",
"username": "root",
"password": "root",
"certificate": null,
"passphrase": null,
"maintMode": "false"
              }</programlisting>
      </section>

      <section id="runpy_mod_log">
        <title>Running the Python Module</title>

        <para>The <literal>getEventsForUcpe</literal> Python module can be
        executed individually by running the following command:</para>

        <programlisting>$ python getEventsForUcpe.py -H localhost -f \
../../lab_config/intelc3850-2/intelc3850-2.json

2019-07-04 13:48:31,289 - DEBUG: Started logging
2019-07-04 13:48:31,290 - INFO: Dump uCPE events
2019-07-04 13:48:31,336 - DEBUG: Login successful on host '172.24.3.108'
2019-07-04 13:48:31,336 - DEBUG: Session token is: a53c68d3-9e51-11e9-a715-5254007632e2
2019-07-04 13:48:31,356 - DEBUG: Found device with name 'intelc3850-2'
2019-07-04 13:48:31,357 - DEBUG:
Events on device: intelc3850-2 and severity: 1000
2019-07-04 13:48:31,450 - DEBUG:  Dumping 1 events
2019-07-04 13:48:31,450 - DEBUG: Device Disconnected | Alarm | Device | None | \
    2019-07-04 09:57:40.042
2019-07-04 13:48:31,469 - DEBUG:  Dumping 0 events
2019-07-04 13:48:31,469 - INFO: Done
2019-07-04 13:48:31,488 - DEBUG: Logging out and exiting... </programlisting>
      </section>
    </section>

    <section id="enable_disable_dpdk">
      <title>Enabling or Disabling the DPDK</title>

      <para>Steps and details on how to enable or disable the DPDK are
      explained below.</para>

      <section id="script_dpdk">
        <title>Script Options</title>

        <programlisting>$ python configDPDK.py -h
Usage: configDPDK.py [options]

Configure DPDK

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -u USERNAME, --username=USERNAME
                        Enea uCPE Manager login username
  -p PASSWORD, --password=PASSWORD
                        Enea uCPE Manager login password
  -H HOST, --host=HOST  Enea uCPE Manager host name or IP address
  -s STATE, --state=STATE
                        Enable/Disable
  -n DEVICENAME, --device-name=DEVICENAME
                        Name of the device
  -o STORENAME, --store-name=STORENAME
                        Name of the store

  Mandatory options:
    -H/--host, -s/--state, -n/--device-name or -o/--store-name</programlisting>
      </section>

      <section id="run_pydpdk">
        <title>Running the Python Module</title>

        <para>The <literal>configDPDK</literal> Python module can be executed
        individually by running the following command lines:</para>

        <para>To Enable DPDK:</para>

        <programlisting>$ python configDPDK.py -s enable -n intelc3850-2

2020-01-06 08:35:16,820 - DEBUG: Started logging
2020-01-06 08:35:16,821 - INFO: Configure DPDK
2020-01-06 08:35:16,870 - DEBUG: Login successful on host '172.24.3.90'
2020-01-06 08:35:16,871 - DEBUG: Session token is: 601149e0-3089-11ea-b0c7-525400b7889f
2020-01-06 08:35:16,894 - DEBUG: Found device with name 'inteld1521-1'
2020-01-06 08:35:16,895 - DEBUG: Set DPDK state to enable
2020-01-06 08:35:16,936 - INFO: Done
2020-01-06 08:35:16,961 - DEBUG: Logging out and exiting...</programlisting>

        <para>To Disable DPDK:</para>

        <programlisting>$ python configDPDK.py -s disable -n intelc3850-2

2020-01-06 08:33:57,157 - DEBUG: Started logging
2020-01-06 08:33:57,158 - INFO: Configure DPDK
2020-01-06 08:33:57,215 - DEBUG: Login successful on host '172.24.3.90'
2020-01-06 08:33:57,216 - DEBUG: Session token is: 3096e670-3089-11ea-b0c7-525400b7889f
2020-01-06 08:33:57,239 - DEBUG: Found device with name 'inteld1521-1'
2020-01-06 08:33:57,241 - DEBUG: Set DPDK state to disable
2020-01-06 08:33:57,284 - INFO: Done
2020-01-06 08:33:57,310 - DEBUG: Logging out and exiting...</programlisting>
      </section>
    </section>

    <section id="bind_ucpe_device">
      <title>Binding a Network Interface</title>

      <para>How to Bind a physical network interface to a DPDK, Standard or
      SR-IOV is detailed below.</para>

      <section id="script_opts_bind">
        <title>Script Options</title>

        <programlisting>$ python bindNetworkInterface.py -h
Usage: bindNetworkInterface.py [options]

Binds a physical network interface to a DPDK or SR-IOV.

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -u USERNAME, --username=USERNAME
                        Enea uCPE Manager login username
  -p PASSWORD, --password=PASSWORD
                        Enea uCPE Manager login password
  -H HOST, --host=HOST  Enea uCPE Manager host name or IP address
  -f NICFILE, --file=NICFILE
                        File containing network interface Information in JSON
                        format
  -n DEVICENAME, --device-name=DEVICENAME
                        Name of the device
  -o STORENAME, --store-name=STORENAME
                        Name of the store

  Mandatory options:
    -H/--host, -f/--file, -n/--device-name or -o/--store-name</programlisting>
      </section>

      <section id="bind_config">
        <title>Configuring the JSON File</title>

        <para>The JSON configuration file needed to bind a physical network
        interface should contain a list of dictionaries. Each dictionary
        indicates the test case name and the test case arguments passed to the
        <filename>bindNetworkInterface</filename> Python module.</para>

        <para><emphasis role="bold">Sample unit-test JSON file
        format:</emphasis><programlisting>[
 {
 "name": "Bind lan NIC to DPDK",
 "args": "-f ../../lab_config/intelc3850-2/lan_nic.json"
 },
 {
 "name": "Bind wan NIC to DPDK",
 "args": "-f ../../lab_config/intelc3850-2/wan_nic.json"
 },
 {
 "name": "Bind wan/lan NIC to SR-IOV",
 "args": "-f ../../lab_config/intelc3850-2/sriov_nic.json"
 },
 {
 "name": "Bind wan/lan NIC to Standard",
 "args": "-f ../../lab_config/intelc3850-2/std_nic.json"
 }
]</programlisting><emphasis role="bold">Sample
        <filename>lan_nic.json</filename> configuration
        file:</emphasis><programlisting>{
 "name": "enp4s0f0",
 "type": "dpdk",
 "subType": "vfio-pci"
}</programlisting><emphasis role="bold">Sample
        <filename>wan_nic.json</filename> configuration
        file:</emphasis><programlisting>{
 "name": "enp4s0f1",
 "type": "dpdk",
 "subType": "vfio-pci"
}</programlisting><emphasis role="bold">Sample
        <filename>sriov_nic.json</filename> configuration
        file:</emphasis><programlisting>{
 "name": "eno1",
 "type": "srIov",
 "subType": "passthrough | adapter-pool"
}</programlisting><emphasis role="bold">Sample
        <filename>std_nic.json</filename> configuration
        file:</emphasis><programlisting>{
 "name": "eno2",
 "type": "standard"
}</programlisting></para>
      </section>

      <section id="runpy_bind">
        <title>Running the Python Module</title>

        <para>The <literal>bindNetworkInterface</literal> Python module can be
        executed individually by running the following command line:</para>

        <programlisting>$ python bindNetworkInterface.py -u admin -p admin -H localhost -f
../../lab_config/intelc3850-2/lan_nic.json -n intelc3850-2
2019-03-07 18:03:29,365 - DEBUG: Started logging
2019-03-07 18:03:29,366 - INFO: Bind NIC
2019-03-07 18:03:29,406 - DEBUG: Login successful on host 'localhost'
2019-03-07 18:03:29,406 - DEBUG: Session token is: 8c719cb0-40f2-11e9-a81f525400d08e1d
2019-03-07 18:03:29,415 - DEBUG: Found device with name 'intelc3850-2'
2019-03-07 18:03:29,415 - DEBUG: Bind NIC '0000:01:00.1'
2019-03-07 18:03:30,030 - INFO: Done
2019-03-07 18:03:30,067 - DEBUG: Logging out and exiting...</programlisting>
      </section>
    </section>

    <section id="unbind_ucpe_device">
      <title>Unbinding a Network Interface</title>

      <para>How to Unbind a physical network interface from a DPDK or SR-IOV
      is described below.</para>

      <section id="script_opts_unbind">
        <title>Script Options</title>

        <programlisting>$ python unbindNetworkInterface.py -h
Usage: unbindNetworkInterface.py [options]

Unbinds a physical interface to the DPDK or SR-IOV.

Options:
 --version show program's version number and exit
 -h, --help show this help message and exit
 -u USERNAME, --username=USERNAME
 Enea uCPE Manager login username
 -p PASSWORD, --password=PASSWORD
 Enea uCPE Manager login password
 -H HOST, --host=HOST Enea uCPE Manager host name or IP address
 -f NICFILE, --file=NICFILE
 File containing network interface Information in JSON
 format
 -n DEVICENAME, --device-name=DEVICENAME
 Name of the device

 Mandatory options:
 -H/--host, -f/--file, -n/--device-name</programlisting>
      </section>

      <section id="json_unbind">
        <title>Configuring the JSON File</title>

        <para>The JSON configuration file needed to unbind a network interface
        should contain a list of dictionaries. Each dictionary indicates the
        test case name and the test case arguments passed to the
        <filename>unbindNetworkInterface</filename> Python module.</para>

        <para><emphasis role="bold">Sample unit-test JSON file
        format:</emphasis><programlisting>[
 {
 "name": "Unbind lan NIC",
 "args": "-f ../../lab_config/intelc3850-2/lan_nic.json"
 },
 {
  name": "Unbind wan NIe",
Unbinds a physical interface to the DPDK or SR-IOV
 "args": "-f ../../lab_config/intelc3850-2/wan_nic.json"
 }
]</programlisting></para>

        <para><emphasis role="bold">Sample <filename>lan_nic.json</filename>
        configuration file:</emphasis></para>

        <programlisting>{
 "name": "enp4s0f0",
 "type": "dpdk"
}</programlisting>

        <para><emphasis role="bold">Sample <filename>wan_nic.json</filename>
        configuration file:</emphasis></para>

        <programlisting>{
 "name": "enp4s0f1",
 "type": "dpdk",
}
</programlisting>
      </section>

      <section id="pymod_unbind">
        <title>Running the Python Module</title>

        <para>The <filename>unbindNetworkInterface</filename> Python module
        can be executed individually by running the following command
        line:</para>

        <programlisting>$ python unbindNetworkInterface.py -u admin -p admin -H localhost -f
../../lab_config/intelc3850-2/lan_nic.json -n intelc3850-2
2019-03-07 17:33:54,377 - DEBUG: Started logging
2019-03-07 17:33:54,378 - INFO: Unbind NIC
2019-03-07 17:33:54,431 - DEBUG: Login successful on host 'localhost'
2019-03-07 17:33:54,432 - DEBUG: Session token is: 6a77a1d1-40ee-11e9-a81f525400d08e1d
2019-03-07 17:33:54,467 - DEBUG: Found device with name 'intelc3850-2'
2019-03-07 17:33:54,468 - DEBUG: Unbind NIC '0000:01:00.1'
2019-03-07 17:33:55,616 - INFO: Done
2019-03-07 17:33:55,659 - DEBUG: Logging out and exiting...</programlisting>
      </section>
    </section>

    <section id="get_network_interface">
      <title>Getting a Network Interface</title>

      <para>Details and steps on how to List the network interfaces for a
      device, are described below.</para>

      <section id="script_opts_interface">
        <title>Script Options</title>

        <programlisting>$ python getNetworkInterfaces.py -h
2019-07-04 16:35:50,496 - DEBUG: Started logging
2019-07-04 16:35:50,496 - INFO: Dump NICs
Usage: getNetworkInterfaces.py [options]

Options:
  --version                               show program's version number and exit
  -h, --help                              show this help message and exit
  -u USERNAME, --username=USERNAME        Enea uCPE Manager login username
  -p PASSWORD, --password=PASSWORD        Enea uCPE Manager login password
  -H HOST, --host=HOST                    Enea uCPE Manager host name or IP address
  -n DEVICENAME, --device-name=DEVICENAME Name of the uCPE to get network /
                                          interfaces from

  Mandatory options:
    -H/--host, -n/--device-name</programlisting>
      </section>

      <section id="runpy_net_interface">
        <title>Running the Python Module</title>

        <para>The <literal>getNetworkInterfaces</literal> Python module can be
        executed individually by running the following command:</para>

        <programlisting>$ python getNetworkInterfaces.py -H localhost -n intelc3850-2
2020-01-07 05:58:03,630 - DEBUG: Started logging
2020-01-07 05:58:03,630 - INFO: Dump NICs
2020-01-07 05:58:03,687 - DEBUG: Login successful on host '172.24.3.90'
2020-01-07 05:58:03,688 - DEBUG: Session token is: 93dd3cd0-313c-11ea-b0c7-525400b7889f
2020-01-07 05:58:03,715 - DEBUG: Found device with name 'intelc3850-2'
2020-01-07 05:58:03,717 - DEBUG:
----------------External Network Interfaces for intelc3850-2----------------
2020-01-07 05:58:07,622 - DEBUG: eno4 DpdkTypes: [u'igb_uio', u'vfio-pci'] \ 
MacAddress: 0c:c4:7a:fb:85:dfsriov(7)
2020-01-07 05:58:07,624 - DEBUG:
2020-01-07 05:58:07,656 - DEBUG:
----------------Configured External Network Interfaces for intelc3850-2----------------
2020-01-07 05:58:07,657 - DEBUG: eno3 DpdkType: vfio-pci ID: \
47556b22-b5c2-4acb-b3cb-09b1f024b3a7
2020-01-07 05:58:07,658 - DEBUG: enp1s0f1 DpdkType: vfio-pci ID: \
2c06b4f7-6814-4432-8765-a9d0cd5303c1
2020-01-07 05:58:07,659 - DEBUG: enp1s0f0 DpdkTypes: [u'igb_uio', u'vfio-pci'] \
MacAddress: ac:1f:6b:2d:ee:58sriov(63)
2020-01-07 05:58:07,660 - DEBUG:
2020-01-07 05:58:07,690 - DEBUG:
----------------Configured External Network Interfaces for intelc3850-2----------------
2020-01-07 05:58:07,691 - DEBUG: eno3 DpdkType: vfio-pci ID: \
47556b22-b5c2-4acb-b3cb-09b1f024b3a7
2020-01-07 05:58:07,692 - DEBUG: enp1s0f1 DpdkType: vfio-pci ID: \
2c06b4f7-6814-4432-8765-a9d0cd5303c1
2020-01-07 05:58:07,693 - DEBUG: eno2 DpdkTypes: [u'igb_uio', u'vfio-pci'] \
MacAddress: 0c:c4:7a:fb:85:ddsriov(7)
2020-01-07 05:58:07,695 - DEBUG:
2020-01-07 05:58:07,724 - DEBUG:
----------------Configured External Network Interfaces for intelc3850-2----------------
2020-01-07 05:58:07,725 - DEBUG: eno3 DpdkType: vfio-pci ID: \
47556b22-b5c2-4acb-b3cb-09b1f024b3a7
2020-01-07 05:58:07,726 - DEBUG: enp1s0f1 DpdkType: vfio-pci ID: \
2c06b4f7-6814-4432-8765-a9d0cd5303c1
2020-01-07 05:58:07,727 - DEBUG: eno1 DpdkTypes: [u'igb_uio', u'vfio-pci'] \
MacAddress: 0c:c4:7a:fb:85:dcsriov(7)
2020-01-07 05:58:07,728 - DEBUG:
2020-01-07 05:58:07,760 - DEBUG:
----------------Configured External Network Interfaces for intelc3850-2----------------
2020-01-07 05:58:07,761 - DEBUG: eno3 DpdkType: vfio-pci ID: \
47556b22-b5c2-4acb-b3cb-09b1f024b3a7
2020-01-07 05:58:07,761 - DEBUG: enp1s0f1 DpdkType: vfio-pci ID: \
2c06b4f7-6814-4432-8765-a9d0cd5303c1
2020-01-07 05:58:07,762 - DEBUG:
2020-01-07 05:58:07,763 - INFO: Done
2020-01-07 05:58:07,787 - DEBUG: Logging out and exiting...</programlisting>
      </section>
    </section>

    <section id="create_ovs_net_bridge">
      <title>Creating an OVS Network Bridge</title>

      <para>Instructions on how to Create an OVS Bridge on a device are
      detailed below.</para>

      <section id="script_opts_creovs">
        <title>Script Options</title>

        <programlisting>$ python newNetworkBridge.py -h
Usage: newNetworkBridge.py [options]

Create an OVS Bridge on a device.

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -u USERNAME, --username=USERNAME
                        Enea uCPE Manager login username
  -p PASSWORD, --password=PASSWORD
                        Enea uCPE Manager login password
  -H HOST, --host=HOST  Enea uCPE Manager host name or IP address
  -f OVSFILE, --file=OVSFILE
                        File containing OVS bridge Information in JSON format
  -n DEVICENAME, --device-name=DEVICENAME
                        Name of the device
  -o STORENAME, --store-name=STORENAME
                        Name of the store

  Mandatory options:
    -H/--host, -f/--file, -n/--device-name or -o/--store-name</programlisting>
      </section>

      <section id="json_creovs">
        <title>Configuring the JSON File</title>

        <para>The JSON configuration file needed to create a new network
        bridge should contain a list of dictionaries. Each dictionary
        indicates the test case name and the test case arguments passed to the
        <literal>newNetworkBridge</literal> Python module.</para>

        <para><emphasis role="bold">Sample unit-test JSON file
        format:</emphasis></para>

        <programlisting>[
 {
 "name": "Creating network bridge LAN ",
 "args": "-f ../../lab_config/intelc3850-2/lan_br.json"
 },
 {
 "name": "Creating network bridge WAN ",
 "args": "-f ../../lab_config/intelc3850-2/wan_br.json"
 }
]</programlisting>

        <para><emphasis role="bold">Sample <filename>lan_br.json</filename>
        configuration file:</emphasis></para>

        <programlisting>{
 "name": "lan_br",
 "interfaces": ["enp4s0f0"]
}</programlisting>

        <para><emphasis role="bold">Sample <filename>wan_br.json</filename>
        configuration file:</emphasis></para>

        <programlisting>{
 "name": "wan_br",
 "interfaces": ["enp4s0f1"]
}</programlisting>
      </section>

      <section id="pymod_creovs">
        <title>Running the Python Module</title>

        <para>The <filename>newNetworkBridge</filename> Python module can be
        executed individually by running the following command line:</para>

        <programlisting>$ python newNetworkBridge.py -u admin -p admin -H localhost -f
../../lab_config/intelc3850-2/lan_br.json -n intelc3850-2
2019-03-07 18:03:30,767 - DEBUG: Started logging
2019-03-07 18:03:30,768 - INFO: New OVS network bridge
2019-03-07 18:03:30,801 - DEBUG: Login successful on host 'localhost'
2019-03-07 18:03:30,801 - DEBUG: Session token is: 8d454061-40f2-11e9-a81f525400d08e1d
2019-03-07 18:03:30,811 - DEBUG: Found device with name 'intelc3850-2'
2019-03-07 18:03:30,812 - DEBUG: Create new OVS network bridge 'lan_br'
2019-03-07 18:03:37,358 - INFO: Done
2019-03-07 18:03:37,402 - DEBUG: Logging out and exiting...</programlisting>
      </section>
    </section>

    <section id="delete_ovs_net_bridge">
      <title>Deleting an OVS Network Bridge</title>

      <para>How to Delete an OVS Bridge from a device is detailed in the
      following.</para>

      <section id="script_opts_delovs">
        <title>Script Options</title>

        <programlisting>$ python delNetworkBridge.py -h
Usage: delNetworkBridge.py [options]

Delete an OVS Bridge from a device.

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -u USERNAME, --username=USERNAME
                        Enea uCPE Manager login username
  -p PASSWORD, --password=PASSWORD
                        Enea uCPE Manager login password
  -H HOST, --host=HOST  Enea uCPE Manager host name or IP address
  -f OVSFILE, --file=OVSFILE
                        File containing OVS bridge Information in JSON format
  -n DEVICENAME, --device-name=DEVICENAME
                        Name of the device
  -o STORENAME, --store-name=STORENAME
                        Name of the store

  Mandatory options:
    -H/--host, -f/--file, -n/--device-name or -o/--store-name</programlisting>
      </section>

      <section id="json_delovs">
        <title>Configuring the JSON File</title>

        <para>The JSON configuration file needed to delete a network bridge
        should contain a list of dictionaries. Each dictionary indicates the
        test case name and the test case arguments passed to the
        <filename>delNetworkBridge</filename> Python module.</para>

        <para><emphasis role="bold">Sample unit-test JSON file
        format:</emphasis></para>

        <programlisting>[
 {
 "name": "Deleting network bridge LAN ",
 "args": "-f ../../lab_config/intelc3850-2/lan_br.json"
 },
 {
 "name": "Deleting network bridge WAN ",
 "args": "-f ../../lab_config/intelc3850-2/wan_br.json"
 }
]</programlisting>

        <para><emphasis role="bold">Sample <filename>lan_br.json</filename>
        configuration file:</emphasis></para>

        <programlisting>{
 "name" : "lan_br"
}</programlisting>

        <para><emphasis role="bold">Sample <filename>wan_br.json</filename>
        configuration file:</emphasis></para>

        <programlisting>{
 "name" : "wan_br"
}</programlisting>
      </section>

      <section id="pymod_delovs">
        <title>Running the Python Module</title>

        <para>The <filename>delNetworkBridge</filename> Python module can be
        executed individually by running the following command line:</para>

        <programlisting>$ python delNetworkBridge.py -u admin -p admin -H localhost -f
../../lab_config/intelc3850-2/lan_br.json -n intelc3850-2
2019-03-07 17:33:51,712 - DEBUG: Started logging
2019-03-07 17:33:51,713 - INFO: Delete OVS network bridge
2019-03-07 17:33:51,751 - DEBUG: Login successful on host 'localhost'
2019-03-07 17:33:51,752 - DEBUG: Session token is: 68e08711-40ee-11e9-a81f525400d08e1d
2019-03-07 17:33:51,768 - DEBUG: Found device with name 'intelc3850-2'
2019-03-07 17:33:51,768 - DEBUG: Delete OVS network bridge 'lan_br'
2019-03-07 17:33:52,839 - INFO: Done
2019-03-07 17:33:52,872 - DEBUG: Logging out and exiting...</programlisting>
      </section>
    </section>

    <section id="onboard_vnf_bundle">
      <title>Onboarding a VNF Image</title>

      <para>The specifics of how to Onboard a VNF image onto the Enea uCPE
      Manager is detailed below.</para>

      <section id="script_opts_onbvnf">
        <title>Script Options</title>

        <programlisting>$ python onboardVNF.py -h
Usage: onboardVNF.py [options]

Onboard a VNF to Enea uCPE Manager.

Options:
 --version show program's version number and exit
 -h, --help show this help message and exit
 -u USERNAME, --username=USERNAME
 Enea uCPE Manager login username
 -p PASSWORD, --password=PASSWORD
 Enea uCPE Manager login password
 -H HOST, --host=HOST Enea uCPE Manager host name or IP address
 -f FTPUSERNAME, --ftpUsername=FTPUSERNAME
 Username for FTP
 -w FTPPASSWORD, --ftpPassword=FTPPASSWORD
 FTP password
 -P FTPPORT, --ftpPort=FTPPORT
 FTP port
 -b VNFBUNDLE, --bundle=VNFBUNDLE
 File name of VNF bundle in ZIP format

 Mandatory options:
 -H/--host, -b/--bundle</programlisting>
      </section>

      <section id="json_onbvnf">
        <title>Configuring the JSON File</title>

        <para>The JSON configuration file needed to onboard a VNF image should
        contain a list of dictionaries. Each dictionary indicates the test
        case name and the test case arguments passed to the
        <filename>onboardVNF</filename> Python module.</para>

        <para><emphasis role="bold">Sample unit-test JSON file
        format:</emphasis><programlisting>[
 {
 "name": "Onboarding Fortigate VNF ",
 "args": "-b ../../vnf_images/Fortigate.zip"
 }
]</programlisting></para>
      </section>

      <section id="pymod_onbvnf">
        <title>Running the Python Module</title>

        <para>The <filename>onboardVNF</filename> Python module can be
        executed individually by running the following command line:</para>

        <programlisting>$ python onboardVNF.py -u admin -p admin -f ftp -w ftp -H localhost -b
../../vnf_images/Fortigate.zip
2019-02-25 16:00:53,890 - DEBUG: Started logging
2019-02-25 16:00:53,890 - INFO: Onboard VNF
2019-02-25 16:00:53,985 - DEBUG: Login successful on host 'localhost'
2019-02-25 16:00:53,985 - DEBUG: Session token is: c421cd03-3905-11e9-a81f525400d08e1d
2019-02-25 16:00:53,994 - DEBUG: FTP file '../../vnf_images/Fortigate.zip' on host
'localhost', port '2021'
2019-02-25 16:00:54,229 - DEBUG: Onboard VNF: Fortigate
2019-02-25 16:00:56,836 - INFO: Done
2019-02-25 16:00:56,861 - DEBUG: Logging out and exiting...</programlisting>
      </section>
    </section>

    <section id="onboard_vnf_image">
      <title>Onboarding a VNF Image Raw</title>

      <para>How to Onboard a VNF image in the uCPE Manager based upon its raw
      constituents, is detailed in depth below.</para>

      <section id="script_opts_image">
        <title>Script Options</title>

        <programlisting>$ python onboardVNFRaw.py -h
Usage: onboardVNFRaw.py [options]

Onboard a VNF in Enea uCPE Manager based upon its raw constituents.

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -u USERNAME, --username=USERNAME
                        Enea uCPE Manager login username
  -p PASSWORD, --password=PASSWORD
                        Enea uCPE Manager login password
  -H HOST, --host=HOST  Enea uCPE Manager host name or IP address
  -f FTPUSERNAME, --ftpUsername=FTPUSERNAME
                        Username for FTP
  -w FTPPASSWORD, --ftpPassword=FTPPASSWORD
                        FTP password
  -P FTPPORT, --ftpPort=FTPPORT
                        FTP port
  -i IMAGEPATH, --imagePath=IMAGEPATH
                        VNF image path
  -b IMAGEINFO, --imageInfo=IMAGEINFO
                        File name of VNF image information in JSON format

  Mandatory options:
    -H/--host, -b/--imageInfo, -i/--imagePath</programlisting>
      </section>

      <section id="json_image">
        <title>Configuring the JSON File</title>

        <para>The JSON configuration file needed to onboard a VNF image Raw
        should contain a list of dictionaries. Each dictionary indicates the
        test case name and the test case arguments passed to the
        <filename>onboardVNFRaw</filename> Python module.</para>

        <para><emphasis role="bold">Sample unit-test JSON file
        format:</emphasis></para>

        <programlisting>[
 {
 "name": "Onboarding Fortigate VNF (wizard API)",
 "args": "-b ../../vnf_config/fortigateImage/fortigateImage.json -i
../../vnf_images/fortios.qcow2"
 }
]</programlisting>

        <para><emphasis role="bold">Sample
        <filename>fortigateImage.json</filename> configuration
        file:</emphasis><programlisting>{
 "name" : "fortigateImage",
 "version" : "1.0",
 "description" : "Fortigate VNF Image",
 "provider" : "Fortinet, Inc",
 "numVcpus" : 1,
 "imageFormat" : "QCOW2",
 "memoryInMb" : 1024,
 "storageInGb" : 20,
 "image" : "fortios.qcow2",
 "interfaces" : [
 {
 "name" : "external",
 "type" : "PhysicalPort",
 "description" : "External interface"
 },
 {
 "name" : "in",
 "type" : "PhysicalPort",
 "description" : "Incoming interface"
 },
 {
 "name" : "out",
 "type" : "PhysicalPort",
 "description" : "Outgoing interface"
 }
 ],
 "cloudInitDataSource" : "ConfigDrive",
 "cloudInitDriveType" : "cdrom",
 "cloudInitContentParams" : [
 {
 "path" : "License",
 "description" : "Operational license"
 }
 ]
}</programlisting></para>
      </section>

      <section id="pymod_image">
        <title>Running the Python Module</title>

        <para>The <filename>onboardVNFRaw</filename> Python module can be
        executed individually by running the following command line:</para>

        <programlisting>$ python onboardVNFRaw.py -u admin -p admin -f ftp -w ftp -H localhost -b b
../../vnf_config/fortigateImage/fortigateImage.json -i
../../vnf_images/fortios.qcow2
2019-03-07 18:03:37,791 - DEBUG: Started logging
2019-03-07 18:03:37,792 - INFO: Onboard wizard
2019-03-07 18:03:37,859 - DEBUG: Login successful on host 'localhost'
2019-03-07 18:03:37,859 - DEBUG: Session token is: 91770330-40f2-11e9-a81f525400d08e1d
2019-03-07 18:03:37,860 - DEBUG: FTP file '../../vnf_images/fortios.qcow2' on host
'localhost', port '2021'
2019-03-07 18:03:38,027 - DEBUG: Onboard VNF raw: fortios.qcow2
2019-03-07 18:03:41,701 - INFO: Done
2019-03-07 18:03:41,748 - DEBUG: Logging out and exiting...</programlisting>
      </section>
    </section>

    <section id="offboard_vnf">
      <title>Offboarding a VNF</title>

      <para>Steps on how to Offboard a VNF from the uCPE Manager are detailed
      below.</para>

      <section id="script_opts_offimage">
        <title>Script Options</title>

        <programlisting>$ python offboardVNF.py -h
Usage: offboardVNF.py [options]

Offboard a VNF from Enea uCPE Manager.

Options:
 --version show program's version number and exit
 -h, --help show this help message and exit
 -u USERNAME, --username=USERNAME
 Enea uCPE Manager login username
 -p PASSWORD, --password=PASSWORD
 Enea uCPE Manager login password
 -H HOST, --host=HOST Enea uCPE Manager host name or IP address
 -n VNFDNAME, --vnfdName=VNFDNAME
 Name of VNF descriptor to offboard

 Mandatory options:
 -H/--host, -n/--vnfdName</programlisting>
      </section>

      <section id="json_offimage">
        <title>Configuring the JSON File</title>

        <para>The JSON configuration file needed to offboard a VNF should
        contain a list of dictionaries. Each dictionary indicates the test
        case name and the test case arguments passed to the
        <filename>offboardVNF</filename> Python module.</para>

        <para><emphasis role="bold">Sample unit-test JSON file
        format:</emphasis></para>

        <programlisting>[
 {
 "name": "Offboarding Fortigate VNF ",
 "args": "-n fortigateImage"
 }
]</programlisting>
      </section>

      <section id="pymod_offimage">
        <title>Running the Python Module</title>

        <para>The <filename>offboardVNF</filename> Python module can be
        executed individually by running the following command line:</para>

        <programlisting>$ python offboardVNF.py -u admin -p admin -H localhost -n fortigateImage
2019-03-07 17:33:56,523 - DEBUG: Started logging
2019-03-07 17:33:56,524 - INFO: Offboard VNF
2019-03-07 17:33:56,557 - DEBUG: Login successful on host 'localhost'
2019-03-07 17:33:56,557 - DEBUG: Session token is: 6bbe2b90-40ee-11e9-a81f525400d08e1d
2019-03-07 17:33:56,682 - DEBUG: Found VNF descriptor with name 'fortigateImage'
2019-03-07 17:33:56,683 - DEBUG: Offboard VNF: fortigateImage
2019-03-07 17:33:56,811 - INFO: Done
2019-03-07 17:33:56,834 - DEBUG: Logging out and exiting...</programlisting>
      </section>
    </section>

    <section id="instantiate_vnf">
      <title>Instantiating a VNF</title>

      <para>Instantiating a VNF via the uCPE Manager is detailed below.</para>

      <section id="script_opts_inst">
        <title>Script Options</title>

        <programlisting>$ python instantiateVNFI.py -h
Usage: instantiateVNFI.py [options]

Instantiate a VNF via Enea uCPE Manager.

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -u USERNAME, --username=USERNAME
                        Enea uCPE Manager login username
  -p PASSWORD, --password=PASSWORD
                        Enea uCPE Manager login password
  -H HOST, --host=HOST  Enea uCPE Manager host name or IP address
  -t VNFTYPE, --vnfType=VNFTYPE
                        VNF Type (Name of VNF descriptor)
  -n VIMDEVICENAME, --device-name=VIMDEVICENAME
                        Name of the device
  -f PROPSFILE, --file=PROPSFILE
                        File containing VNF instance properties in JSON format

  Mandatory options:
    -H/--host, -t/--vnfType, -n/--device-name, -f/--file</programlisting>
      </section>

      <section id="json_inst">
        <title>Configuring the JSON File</title>

        <para>The JSON configuration file needed to instantiate a VNF should
        contain a list of dictionaries. Each dictionary indicates the test
        case name and the test case arguments passed to the
        <filename>instantiateVNFI</filename> Python module.</para>

        <para><emphasis role="bold">Sample unit-test JSON file
        format:</emphasis></para>

        <programlisting>[
 {
 "name": "Instantiate Fortigate VNF ",
 "args": "-t fortigateImage -f
../../vnf_config/fortigateImage/fortigateFWInstance.json"
 }
]</programlisting>

        <para>The VNF instance JSON configuration file is specific to each
        VNF.</para>
      </section>

      <section id="pymod_inst">
        <title>Running the Python Module</title>

        <para>The <filename>instantiateVNFI</filename> Python module can be
        executed individually by running the following command line:</para>

        <programlisting>$ python instantiateVNFI.py -u admin -p admin -H localhost -n intelc3850-2 -t
fortigateImage -f ../../vnf_config/fortigateImage/fortigateFWInstance.json
2019-03-07 18:03:41,777 - DEBUG: Started logging
2019-03-07 18:03:41,778 - INFO: Instantiate VNF
2019-03-07 18:03:41,813 - DEBUG: Login successful on host 'localhost'
2019-03-07 18:03:41,815 - DEBUG: Session token is: 93d69e10-40f2-11e9-a81f525400d08e1d
2019-03-07 18:03:41,834 - DEBUG: Found device with name 'intelc3850-2'
2019-03-07 18:03:41,878 - DEBUG: Found VNF descriptor with name 'fortigateImage'
2019-03-07 18:03:41,888 - DEBUG: Encrypt string content:
cloudInit("vnf_config/fortigateImage/fortigateFW.conf")
2019-03-07 18:03:41,889 - DEBUG: Encrypt string content:
License("vnf_config/fortigateImage/fortigateLicense.lic")
2019-03-07 18:03:41,889 - DEBUG: Instantiate fortigateImage VNF on 'intelc3850-2'
2019-03-07 18:03:49,887 - INFO: Done
2019-03-07 18:03:49,921 - DEBUG: Logging out and exiting...</programlisting>
      </section>
    </section>

    <section id="control_vnf_inst">
      <title>Controlling a VNF Instance</title>

      <para>How to Control a VNF instance from the Enea uCPE Manager is
      detailed below.</para>

      <section id="script_opts_control">
        <title>Script Options</title>

        <programlisting>$ python controlVNFI.py -h
Usage: controlVNFI.py [options]

Controls a VNF instance from Enea uCPE Manager.

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -u USERNAME, --username=USERNAME
                        Enea uCPE Manager login username
  -p PASSWORD, --password=PASSWORD
                        Enea uCPE Manager login password
  -H HOST, --host=HOST  Enea uCPE Manager host name or IP address
  -i VNFINSTANCENAME, --vnfInstanceName=VNFINSTANCENAME
                        Name of VNF instance
  -n VIMDEVICENAME, --device-name=VIMDEVICENAME
                        Name of the device
  -c COMMAND, --command=COMMAND
                        Control command (stop, start, pause or resume)

  Mandatory options:
    -H/--host, -i/--vnfInstanceName, -n/--device-name, -c/--command</programlisting>
      </section>

      <section id="json_control">
        <title>Configuring the JSON File</title>

        <para>The JSON configuration file needed to control a VNF instance
        should contain a list of dictionaries. Each dictionary indicates the
        test case name and the test case arguments passed to the
        <filename>controlVNFI</filename> Python module.</para>

        <para><emphasis role="bold">Sample unit-test JSON file
        format:</emphasis></para>

        <programlisting>[
 {
 "name": "Pause Fortigate VNF instance",
 "args": "-i fortigateFWInstance -c pause"
 },
 {
 "name": "Resume Fortigate VNF instance",
 "args": "-i fortigateFWInstance -c resume"
 },
 {
 "name": "Stop Fortigate VNF instance ",
 "args": "-i fortigateFWInstance -c stop"
 },
 {
 "name": "Start Fortigate VNF instance",
 "args": "-i fortigateFWInstance -c start"
 }
]</programlisting>
      </section>

      <section id="pymod_control">
        <title>Running the Python Module</title>

        <para>The <filename>controlVNFI</filename> Python module can be
        executed individually by running the following command line:</para>

        <programlisting>$ python controlVNFI.py -u admin -p admin -H localhost -n intelc3850-2 -i
fortigateFWInstance -c stop
2019-03-07 18:03:51,991 - DEBUG: Started logging
2019-03-07 18:03:51,992 - INFO: Control VNF
2019-03-07 18:03:52,031 - DEBUG: Login successful on host 'localhost'
2019-03-07 18:03:52,031 - DEBUG: Session token is: 99ed9ba3-40f2-11e9-a81f525400d08e1d
2019-03-07 18:03:52,046 - DEBUG: Found device with name 'intelc3850-2'
2019-03-07 18:03:52,073 - DEBUG: Found VNF instance with name 'fortigateFWInstance'
2019-03-07 18:03:52,073 - DEBUG: Control VNF instance 'intelc3850-2', command: stop
2019-03-07 18:03:53,011 - INFO: Done
2019-03-07 18:03:53,047 - DEBUG: Logging out and exiting...</programlisting>
      </section>
    </section>

    <section id="destroy_vnf_inst">
      <title>Destroying a VNF Instance</title>

      <para>Steps and options on how to Destroy a VNF instance from the Enea
      uCPE Manager are described below.</para>

      <section id="script_opts_destroy">
        <title>Script Options</title>

        <programlisting>$ python destroyVNFI.py -h
Usage: destroyVNFI.py [options]

Destroys a VNF instance from Enea uCPE Manager.

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -u USERNAME, --username=USERNAME
                        Enea uCPE Manager login username
  -p PASSWORD, --password=PASSWORD
                        Enea uCPE Manager login password
  -H HOST, --host=HOST  Enea uCPE Manager host name or IP address
  -i VNFINSTANCENAME, --vnfInstanceName=VNFINSTANCENAME
                        Name of VNF instance
  -n VIMDEVICENAME, --device-name=VIMDEVICENAME
                        Name of the device

  Mandatory options:
    -H/--host, -i/--vnfInstanceName, -n/--device-name</programlisting>
      </section>

      <section id="json_destroy">
        <title>Configuring the JSON File</title>

        <para>The JSON configuration file needed to destroy a VNF instance
        should contain a list of dictionaries. Each dictionary indicates the
        test case name and the test case arguments passed to the
        <filename>destroyVNFI</filename> Python module.</para>

        <para><emphasis role="bold">Sample unit-test JSON file
        format:</emphasis><programlisting>[
 {
 "name": "Destroying Fortigate VNF ",
 "args": "-i fortigateFWInstance"
 }
]</programlisting></para>
      </section>

      <section id="pymod_destory">
        <title>Running the Python Module</title>

        <para>The <filename>destroyVNFI</filename> Python module can be
        executed individually by running the following command line:</para>

        <programlisting>$ python destroyVNFI.py -u admin -p admin -H localhost -n intelc3850-2 -i
fortigateFWInstance
2019-03-07 17:33:51,025 - DEBUG: Started logging
2019-03-07 17:33:51,026 - INFO: Destroy VNF
2019-03-07 17:33:51,119 - DEBUG: Login successful on host 'localhost'
2019-03-07 17:33:51,119 - DEBUG: Session token is: 68803ea5-40ee-11e9-a81f525400d08e1d
2019-03-07 17:33:51,128 - DEBUG: Found device with name 'intelc3850-2'
2019-03-07 17:33:51,148 - DEBUG: Found VNF instance with name 'fortigateFWInstance'
2019-03-07 17:33:51,149 - DEBUG: Destroy VNF: fortigateFWInstance
2019-03-07 17:33:51,655 - INFO: Done
2019-03-07 17:33:51,712 - DEBUG: Logging out and exiting...</programlisting>
      </section>
    </section>

    <section id="upload_vnf_image">
      <title>Uploading a NFV Access image onto the Enea uCPE Manager</title>

      <para>Steps and options on how to Upload a NFV Access image onto the
      Enea uCPE Manager are described below.</para>

      <section id="script_opts_upload">
        <title>Script Options</title>

        <programlisting>$ python uploadImage.py -h
Upload NFVA image on uCPE Manager
Usage: uploadImage.py [options]

Upload NFVA image on uCPE Manager.

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -u USERNAME, --username=USERNAME
                        Enea uCPE Manager login username
  -p PASSWORD, --password=PASSWORD
                        Enea uCPE Manager login password
  -H HOST, --host=HOST  Enea uCPE Manager host name or IP address
  -f FILENAME, --fileName=FILENAME
                        Path to NFVA image file name
  -m MODULE, --module=MODULE
                        Module name (default is: VcpeAgent)
  -t UPGRADETYPE, --upgradeType=UPGRADETYPE
                        Upgrade Type depends on architecture: xeon_d or
                        atom_c3000

  Mandatory options:
    -H/--host, -f/--fileName, -m/--module, -t/--upgradeType</programlisting>
      </section>

      <section id="json_upload">
        <title>Configuring the JSON File</title>

        <para>The JSON configuration file needed to upload a NFV Access image
        should contain a list of dictionaries. Each dictionary indicates the
        test case name and the test case arguments passed to the
        <filename>uploadImage</filename> Python module.</para>

        <para><emphasis role="bold">Sample unit-test JSON file
        format:</emphasis><programlisting>[
 {
 "name": "Upload NFVA image on uCPE Manager",
 "args": "-f /tmp/enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2 -t xeon_d"
 }
]</programlisting></para>
      </section>

      <section id="pymod_upload">
        <title>Running the Python Module</title>

        <para>The <filename>uploadImage</filename> Python module can be
        executed individually by running the following command line:</para>

        <programlisting>$ python uploadImage.py -u admin -p admin -H localhost \
-f /tmp/enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2 -t xeon_d
2020-02-28 11:38:42,754 - DEBUG: Started logging
2020-02-28 11:38:42,755 - INFO: Upload NFVA image on uCPE Manager
2020-02-28 11:38:43,307 - DEBUG: Login successful on host 'localhost'
2020-02-28 11:38:43,308 - DEBUG: Session token is: 7da3f960-5a16-11ea-a3de-5652b3ac1c30
2020-02-28 11:41:29,148 - INFO: Verify image validation flag
2020-02-28 11:41:29,149 - INFO: Valid flag: True
2020-02-28 11:41:29,344 - INFO: The image \
'enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2' was successfully uploaded
2020-02-28 11:41:29,344 - INFO: Done
2020-02-28 11:41:29,388 - DEBUG: Logging out and exiting...</programlisting>
      </section>
    </section>

    <section id="delete_vnf_image">
      <title>Deleting a NFV Access image file from the Enea uCPE
      Manager</title>

      <para>Steps and options on how to Delete a NFV Access image from the
      Enea uCPE Manager are described below.</para>

      <section id="script_opts_deleteupload">
        <title>Script Options</title>

        <programlisting>$ python deleteUpgradeFile.py -h
Delete NFVA image from uCPE Manager
Usage: deleteUpgradeFile.py [options]

Delete NFVA image from uCPE Manager.

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -u USERNAME, --username=USERNAME
                        Enea uCPE Manager login username
  -p PASSWORD, --password=PASSWORD
                        Enea uCPE Manager login password
  -H HOST, --host=HOST  Enea uCPE Manager host name or IP address
  -i IMAGENAME, --imageName=IMAGENAME
                        NFVA Image name
  -m MODULE, --module=MODULE
                        Module name - default is VcpeAgent

  Mandatory options:
    -H/--host, -i/--imageName, -m/--module.</programlisting>
      </section>

      <section id="json_delete_upload">
        <title>Configuring the JSON File</title>

        <para>The JSON configuration file needed to delete a NFV Access image
        should contain a list of dictionaries. Each dictionary indicates the
        test case name and the test case arguments passed to the
        <filename>deleteUpgradeFile</filename> Python module.</para>

        <para><emphasis role="bold">Sample unit-test JSON file
        format:</emphasis><programlisting>[
 {
 "name": "Delete NFVA image on uCPE Manager",
 "args": "-i enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2"
 }
]</programlisting></para>
      </section>

      <section id="pymod_delete_upload">
        <title>Running the Python Module</title>

        <para>The <filename>deleteUpgradeFile</filename> Python module can be
        executed individually by running the following command line:</para>

        <programlisting>$ python deleteUpgradeFile.py -u admin -p admin -H localhost -i \
enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2
2020-02-28 12:06:20,111 - DEBUG: Started logging
2020-02-28 12:06:20,112 - INFO: Delete NFVA image from uCPE Manager
2020-02-28 12:06:20,210 - DEBUG: Login successful on host 'localhost'
2020-02-28 12:06:20,211 - DEBUG: Session token is: 594b2d50-5a1a-11ea-a3de-5652b3ac1c30
2020-02-28 12:06:20,255 - INFO: The image \
'enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2' was successfully found
2020-02-28 12:06:20,256 - INFO: The oid for \
'enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2' image name is as follows: \
VcpeAgent/xeon_d/enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2
2020-02-28 12:06:20,449 - INFO: The 'enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2' \
image was successfully removed
2020-02-28 12:06:20,479 - INFO: Done
2020-02-28 12:06:20,517 - DEBUG: Logging out and exiting...</programlisting>
      </section>
    </section>

    <section id="install_activate_vnf_image">
      <title>Installing and activating a NFV Access image on an uCPE device
      from the Enea uCPE Manager</title>

      <para>Steps and options on how to Install and Activate a NFV Access
      image on an uCPE device from the Enea uCPE Manager are described
      below.</para>

      <section id="script_opts_install_activate">
        <title>Script Options</title>

        <programlisting>$ python installAndActivate.py -h
Install and activate NFVA image from uCPE Manager
Usage: installAndActivate.py [options]

Install and activate NFVA image from uCPE Manager.

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -u USERNAME, --username=USERNAME
                        Enea uCPE Manager login username
  -p PASSWORD, --password=PASSWORD
                        Enea uCPE Manager login password
  -H HOST, --host=HOST  Enea uCPE Manager host name or IP address
  -i IMAGENAME, --imageName=IMAGENAME
                        Image name
  -m MODULE, --module=MODULE
                        Module name -- VcpeAgent
  -t UPGRADETYPE, --upgradeType=UPGRADETYPE
                        Upgrade Type -- xeon_d or atom_c3000
  -d DEVICENAME, --deviceName=DEVICENAME
                        Device Name

  Mandatory options:
    -H/--host, -i/--imageName, -t/--upgradeType, -d/--deviceName,
    -m/--module</programlisting>
      </section>

      <section id="json_install_activate">
        <title>Configuring the JSON File</title>

        <para>The JSON configuration file needed to install and activate a NFV
        Access image on a uCPE device from the Enea uCPE Manager should
        contain a list of dictionaries. Each dictionary indicates the test
        case name and the test case arguments passed to the
        <filename>installAndActivate</filename> Python module.</para>

        <para><emphasis role="bold">Sample unit-test JSON file
        format:</emphasis></para>

        <programlisting>[
 {
 "name": "Install and activate NFVA image on uCPE device from uCPE Manager",
 "args": "-i enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2 -t xeon_d -d inteld1521-16"
 }
]</programlisting>
      </section>

      <section id="pymod_install_activate">
        <title>Running the Python Module</title>

        <para>The <filename>installAndActivate</filename> Python module can be
        executed individually by running the following command line:</para>

        <programlisting>$ python installAndActivate.py -u admin -p admin -H localhost -i \
enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2 -t xeon_d -d inteld1521-16
2020-02-28 12:36:46,137 - DEBUG: Started logging
2020-02-28 12:36:46,138 - INFO: Install and activate NFVA image from uCPE Manager
2020-02-28 12:36:46,288 - DEBUG: Login successful on host 'localhost'
2020-02-28 12:36:46,288 - DEBUG: Session token is: 99b7cde0-5a1e-11ea-a3de-5652b3ac1c30
2020-02-28 12:36:46,325 - DEBUG: Found device with name 'inteld1521-16'
2020-02-28 12:36:46,459 - INFO: Display info about NFVA installation \
[inteld1521-16:1001:172.24.12.152] Install Started
2020-02-28 12:36:46,492 - INFO: Transferring Image: \
enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2
2020-02-28 12:36:56,552 - INFO: Verifying Release [1]
2020-02-28 12:37:06,599 - INFO: Verifying Release [2]
2020-02-28 12:37:16,652 - INFO: Validating Upgrade to \
enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2
2020-02-28 12:37:26,713 - INFO: Validating upgrade to \
enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2 [3]
2020-02-28 12:37:36,770 - INFO: Validating upgrade to \
enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2 [5]
2020-02-28 12:37:46,819 - INFO: Validating upgrade to \
enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2 [7]
2020-02-28 12:37:56,879 - INFO: Validating upgrade to \
enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2 [9]
2020-02-28 12:38:06,920 - INFO: Validating upgrade to \
enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2 [11]
2020-02-28 12:38:16,975 - INFO: Validating upgrade to \
enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2 [13]
2020-02-28 12:38:27,019 - INFO: Validating upgrade to \
enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2 [15]
2020-02-28 12:38:37,091 - INFO: Validating upgrade to \
enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2 [18]
2020-02-28 12:38:47,133 - INFO: Validating upgrade to \
enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2 [20]
2020-02-28 12:38:57,186 - INFO: Waiting for release to become active
2020-02-28 12:39:07,231 - INFO: Upgrade Request Complete
2020-02-28 12:39:17,242 - INFO: Installation completed!
2020-02-28 12:39:17,243 - INFO: Done
2020-02-28 12:39:17,294 - DEBUG: Logging out and exiting...</programlisting>
      </section>
    </section>

    <section id="clearing_info_upgrade">
      <title>Clearing information about completed upgrades of uCPE devices
      from the Enea uCPE Manager</title>

      <para>Steps and options on how to clear information about completed
      upgrades of uCPE devices from the Enea uCPE Manager are described
      below.</para>

      <section id="script_opts_clearinfo">
        <title>Script Options</title>

        <programlisting>$ python clearCompletedUpgradesInfo.py -h
Clear info about completed upgrades
Usage: clearCompletedUpgradesInfo.py [options]

Clear info about completed upgrades

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -u USERNAME, --username=USERNAME
                        Enea uCPE Manager login username
  -p PASSWORD, --password=PASSWORD
                        Enea uCPE Manager login password
  -H HOST, --host=HOST  Enea uCPE Manager host name or IP address

  Mandatory options:
    -H/--host </programlisting>
      </section>

      <section id="json_clear_info">
        <title>Configuring the JSON File</title>

        <para>No JSON configuration file is needed to clear information about
        completed upgrades of uCPE devices from the Enea uCPE Manager. The
        <filename>clearCompletedUpgradesInfo</filename> Python module can be
        run without a JSON file as a parameter.</para>
      </section>

      <section id="pymod_clear_info">
        <title>Running the Python Module</title>

        <para>The <filename>clearCompletedUpgradesInfo</filename> Python
        module can be executed individually by running the following command
        line:</para>

        <programlisting>$ python clearCompletedUpgradesInfo.py -u admin -p admin -H localhost
2020-02-28 12:51:55,861 - DEBUG: Started logging
2020-02-28 12:51:55,862 - INFO: Clear info about completed upgrades
2020-02-28 12:51:55,950 - DEBUG: Login successful on host 'localhost'
2020-02-28 12:51:55,951 - DEBUG: Session token is: b7eb83e0-5a20-11ea-a3de-5652b3ac1c30
2020-02-28 12:51:55,993 - INFO: Done
2020-02-28 12:51:56,025 - DEBUG: Logging out and exiting...</programlisting>
      </section>
    </section>

    <section id="upload_custom_script">
      <title>Uploading a Custom Script to the uCPE Manager</title>

      <para>Steps and options on how to upload a custom script to the uCPE
      Manager are described below.</para>

      <section id="script_opts_upload_custom_script">
        <title>Script Options</title>

        <programlisting>$ python customScripts/upload.py -h
2020-04-14 10:26:23,582 - INFO: Upload Custom Script
Usage: upload.py [options]

Add a Custom Script to Enea uCPE Manager

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -u USERNAME, --username=USERNAME
                        Enea uCPE Manager login username
  -p PASSWORD, --password=PASSWORD
                        Enea uCPE Manager login password
  -H HOST, --host=HOST  Enea uCPE Manager host name or IP address
  -f CUSTOMSCRIPT, --file=CUSTOMSCRIPT
                        Custom Script File
  -e PHASE, --phase=PHASE
                        Execution phase. Must be one of the following: once-
                        before-startup | always-before-startup | once-after-
                        startup | always-after-startup

  Mandatory options:
    -H/--host, -f/--file, -e/--phase</programlisting>
      </section>

      <section id="json_upload_custom_script">
        <title>Configuring the JSON File</title>

        <para>The JSON configuration file needed to upload a Custom Script to
        the uCPE Manager must contain a list of dictionaries. Each dictionary
        indicates the test case name and the test case arguments passed to the
        <filename>customScripts/upload</filename> Python module.</para>

        <para><emphasis role="bold">Sample unit-test JSON file
        format:</emphasis></para>

        <programlisting>[
 {
  "name": "Uploading a Custom Script to the uCPE Manager",
  "args": "-f ../../lab_config/customScripts/test_success_after_always \
  -e always-after-startup"
 }
]</programlisting>
      </section>

      <section id="pymod_upload_custom_script">
        <title>Running the Python Module</title>

        <para>The <filename>customScripts/upload</filename> Python module can
        be executed individually by running the following command line:</para>

        <programlisting>$ python automation_framework/customScripts/upload.py \
-f lab_config/customScripts/test_success_after_always -e always-after-startup
2020-04-14 14:08:02,824 - DEBUG: Started logging
2020-04-14 14:08:02,915 - INFO: Upload Custom Script
2020-04-14 14:08:02,994 - DEBUG: Login successful on host '172.24.3.109'
2020-04-14 14:08:02,995 - DEBUG: Session token is: 97544990-7e48-11ea-835c-02423a1c239f
2020-04-14 14:08:02,996 - DEBUG: Upload test_success_after_always to uCPE Manager. \
Content: #!/bin/bash
echo test_success_after_always
2020-04-14 14:08:03,138 - INFO: Done
2020-04-14 14:08:03,169 - DEBUG: Logging out and exiting...</programlisting>
      </section>
    </section>

    <section id="upload_custom_script_device">
      <title>Uploading a Custom Script from the uCPE Manager to a
      Device</title>

      <para>Steps and options on how to upload a custom script from the uCPE
      Manager to a Device are described below.</para>

      <section id="script_opts_upload_custom_script_device">
        <title>Script Options</title>

        <programlisting>$ python customScripts/uploadOnDevice.py -h
2020-04-14 10:27:05,614 - INFO: Upload Custom Script on Device
Usage: uploadOnDevice.py [options]

Add a Custom Script to a Device

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -u USERNAME, --username=USERNAME
                        Enea uCPE Manager login username
  -p PASSWORD, --password=PASSWORD
                        Enea uCPE Manager login password
  -H HOST, --host=HOST  Enea uCPE Manager host name or IP address
  -c CUSTOMSCRIPTNAME, --customScriptName=CUSTOMSCRIPTNAME
                        Custom Script Name that resides on Enea uCPE Manager
  -e PHASE, --phase=PHASE
                        Execution phase. Must be one of the following: once-
                        before-startup | always-before-startup | once-after-
                        startup | always-after-startup
  -n DEVICENAME, --device-name=DEVICENAME
                        Name of the device
  -r, --reboot          Reboot the device after uploading

  Mandatory options:
    -H/--host, -c/--customScriptName, -e/--phase, -n/--device-name</programlisting>
      </section>

      <section id="json_upload_custom_script_device">
        <title>Configuring the JSON File</title>

        <para>The JSON configuration file needed to upload a Custom Script
        from the uCPE Manager to a Device must contain a list of dictionaries.
        Each dictionary indicates the test case name and the test case
        arguments passed to the
        <filename>customScripts/uploadOnDevice</filename> Python
        module.</para>

        <para><emphasis role="bold">Sample unit-test JSON file
        format:</emphasis></para>

        <programlisting>[
{
"name": "Uploading a Custom Script from uCPE Manager to device",
"args": "-c test_success_after_always -e always-after-startup -n inteld1521-6"
}
]</programlisting>
      </section>

      <section id="pymod_upload_custom_script_device">
        <title>Running the Python Module</title>

        <para>The <filename>customScripts/uploadOnDevice</filename> Python
        module can be executed individually by running the following command
        line:</para>

        <programlisting>$ python automation_framework/customScripts/uploadOnDevice.py -c \
test_success_after_always -e always-after-startup -n inteld1521-6
2020-04-14 14:26:26,205 - DEBUG: Started logging
2020-04-14 14:26:26,206 - INFO: Upload Custom Script on Device
2020-04-14 14:26:26,251 - DEBUG: Login successful on host '172.24.3.109'
2020-04-14 14:26:26,252 - DEBUG: Session token is: 28ebcb10-7e4b-11ea-835c-02423a1c239f
2020-04-14 14:26:26,286 - DEBUG: Found device with name 'inteld1521-6'
2020-04-14 14:26:26,287 - DEBUG: Upload test_success_after_always to inteld1521-6
2020-04-14 14:26:26,314 - INFO: Done
2020-04-14 14:26:26,341 - DEBUG: Logging out and exiting...</programlisting>
      </section>
    </section>

    <section id="delete_custom_script">
      <title>Removing a Custom Script from the uCPE Manager</title>

      <para>Steps and options on how to remove a custom script from the uCPE
      Manager are described below.</para>

      <section id="script_opts_delete_custom_script">
        <title>Script Options</title>

        <programlisting>$ python customScripts/delete.py -h
2020-04-14 14:36:52,010 - INFO: Delete Custom Script on uCPE Manager
Usage: delete.py [options]

Delete a Custom Script from a Device

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -u USERNAME, --username=USERNAME
                        Enea uCPE Manager login username
  -p PASSWORD, --password=PASSWORD
                        Enea uCPE Manager login password
  -H HOST, --host=HOST  Enea uCPE Manager host name or IP address
  -c CUSTOMSCRIPTNAME, --customScriptName=CUSTOMSCRIPTNAME
                        Custom Script Name that resides on a Device
  -e PHASE, --phase=PHASE
                        Execution phase. Must be one of the following: once-
                        before-startup | always-before-startup | once-after-
                        startup | always-after-startup

  Mandatory options:
    -H/--host, -e/--phase</programlisting>
      </section>

      <section id="json_delete_custom_script">
        <title>Configuring the JSON File</title>

        <para>The JSON configuration file needed to remove a Custom Script
        from the uCPE Manager<remark>did you mean device or uCPE
        Manager?</remark> must contain a list of dictionaries. Each dictionary
        indicates the test case name and the test case arguments passed to the
        <filename>customScripts/delete</filename> Python module.</para>

        <para><emphasis role="bold">Sample unit-test JSON file
        format:</emphasis></para>

        <programlisting>[
{
"name": "Removing a Custom Script from uCPE Manager",
"args": "-c test_success_after_always -e always-after-startup"
}
]</programlisting>
      </section>

      <section id="pymod_delete_custom_script">
        <title>Running the Python Module</title>

        <para>The <filename>customScripts/delete</filename> Python module can
        be executed individually by running the following command line:</para>

        <programlisting>$ python automation_framework/customScripts/delete.py -c \
test_success_after_always -e always-after-startup
2020-04-14 14:39:22,042 - DEBUG: Started logging
2020-04-14 14:39:22,042 - INFO: Delete Custom Script on uCPE Manager
2020-04-14 14:39:22,081 - DEBUG: Login successful on host '172.24.3.109'
2020-04-14 14:39:22,082 - DEBUG: Session token is: f75a83a0-7e4c-11ea-835c-02423a1c239f
2020-04-14 14:39:22,099 - DEBUG: Found custom script: 'test_success_after_always'
2020-04-14 14:39:22,099 - DEBUG: Delete script test_success_after_always, \
phase always-after-startup from uCPE Manager
2020-04-14 14:39:22,118 - INFO: Done
2020-04-14 14:39:22,135 - DEBUG: Logging out and exiting...</programlisting>
      </section>
    </section>

    <section id="delete_custom_script_device">
      <title>Removing a Custom Script from a Device</title>

      <para>Steps and options on how to remove a custom script from a device
      are described below.</para>

      <section id="script_opts_delete_custom_script_device">
        <title>Script Options</title>

        <programlisting>$ python customScripts/deleteOnDevice.py -h
2020-04-14 10:27:23,536 - INFO: Delete Custom Script on Device
Usage: deleteOnDevice.py [options]

Delete a Custom Script from a Device

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -u USERNAME, --username=USERNAME
                        Enea uCPE Manager login username
  -p PASSWORD, --password=PASSWORD
                        Enea uCPE Manager login password
  -H HOST, --host=HOST  Enea uCPE Manager host name or IP address
  -c CUSTOMSCRIPTNAME, --customScriptName=CUSTOMSCRIPTNAME
                        Custom Script Name that resides on a Device
  -e PHASE, --phase=PHASE
                        Execution phase. Must be one of the following: once-
                        before-startup | always-before-startup | once-after-
                        startup | always-after-startup
  -n DEVICENAME, --device-name=DEVICENAME
                        Name of the device

  Mandatory options:
    -H/--host, -n/--device-name</programlisting>
      </section>

      <section id="json_delete_custom_script_device">
        <title>Configuring the JSON File</title>

        <para>The JSON configuration file needed to remove a Custom Script
        from a device must contain a list of dictionaries. Each dictionary
        indicates the test case name and the test case arguments passed to the
        <filename>customScripts/deleteOnDevice</filename> Python
        module.</para>

        <para><emphasis role="bold">Sample unit-test JSON file
        format:</emphasis></para>

        <programlisting>[
{
"name": "Removing a Custom Script from device",
"args": "-c test_success_after_always -e always-after-startup -n inteld1521-6"
}
]</programlisting>
      </section>

      <section id="pymod_delete_custom_script_delete">
        <title>Running the Python Module</title>

        <para>The <filename>customScripts/deleteOnDevice</filename> Python
        module can be executed individually by running the following command
        line:</para>

        <programlisting>$ python automation_framework/customScripts/deleteOnDevice.py -c \
test_success_after_always -e always-after-startup -n inteld1521-6
2020-04-14 14:33:52,288 - DEBUG: Started logging
2020-04-14 14:33:52,288 - INFO: Delete Custom Script on Device
2020-04-14 14:33:52,327 - DEBUG: Login successful on host '172.24.3.109'
2020-04-14 14:33:52,327 - DEBUG: Session token is: 32cde4f0-7e4c-11ea-835c-02423a1c239f
2020-04-14 14:33:52,349 - DEBUG: Found device with name 'inteld1521-6'
2020-04-14 14:33:52,349 - DEBUG: Delete test_success_after_always, \
phase always-after-startup from inteld1521-6
2020-04-14 14:33:52,373 - INFO: Done
2020-04-14 14:33:52,391 - DEBUG: Logging out and exiting...</programlisting>
      </section>
    </section>

    <section id="offline_config_store">
      <title>Setting up an Offline Configuration Store</title>

      <para>Steps and options on how to add and remove a Config Store in the
      Enea uCPE Manager are described below.</para>

      <section id="script_opts_config_store">
        <title>Script Options</title>

        <para>To add a config store in the Enea uCPE Manager use the
        <filename>addConfigStore.py</filename> script detailed below. Bear in
        mind a <filename>CONFIGSTORE</filename> json file is needed to
        successfully run the script in order to add an offline configuration
        store.</para>

        <para>Example of a <filename>CONFIGSTORE</filename> json file:</para>

        <programlisting>{
    "descr": "intelc3850-2",
    "version": "2.2.2",
    "deviceGroupingTags": "",
    "deviceId": "intelc3850-2",
    "name": "intelc3850-2"
}</programlisting>

        <para>Adding an offline config store in the Enea uCPE Manager using
        the command line:</para>

        <programlisting>$ python addConfigStore.py -h
Usage: addConfigStore.py [options]

Add a config store in Enea uCPE Manager.

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -u USERNAME, --username=USERNAME
                        Enea uCPE Manager login username
  -p PASSWORD, --password=PASSWORD
                        Enea uCPE Manager login password
  -H HOST, --host=HOST  Enea uCPE Manager host name or IP address
  -f CONFIGSTOREFILE, --file=CONFIGSTOREFILE
                        File containing Store Information in JSON format

  Mandatory options:
    -H/--host, -f/--file</programlisting>

        <para>Removing a config store in the Enea uCPE Manager using the
        command line:</para>

        <programlisting>python removeConfigStore.py -h
Usage: removeConfigStore.py [options]

Remove a config store from Enea uCPE Manager.

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -u USERNAME, --username=USERNAME
                        Enea uCPE Manager login username
  -p PASSWORD, --password=PASSWORD
                        Enea uCPE Manager login password
  -H HOST, --host=HOST  Enea uCPE Manager host name or IP address
  -o STORENAME, --store-name=STORENAME
                        Name of the Offline Config Store

  Mandatory options:
    -H/--host, -o/--store-name</programlisting>

        <para>Modifications of an Offline Configurations Store are not possible 
          post deployment in the uCPE Manager, as there is no option for
          changing script states (e.g. changing the DPDK state in the 
          <filename>configDPDK.py</filename> python script or unbinding interfaces). 
          The offline store must be deleted and the new state(s)/changes added in, 
          before being deployed anew. This was not deemed necessary
          for the current ZTP functionality.</para>
          
          <para>An action on a device is applied immediately, while 
          a configuration in an offline configuration store is something 
          prepared for the future (when the device is added to the
        uCPE Manager and the configuration is sent to it). The
        configuration is ideally created with the needed modifications from
          the start.</para>
      </section>
    </section>
  </section>

  <section id="test_harness">
    <title>Test Harness</title>

    <para>All Test Harness sources are under the
    <literal>&lt;AF-TH-install-dir&gt;</literal> directory and the host file
    is the Ansible inventory file. See the complete tree listing at the
    beginning of this chapter for details.</para>

    <para>The Ansible based Test Harness represents an example of how to
    structure all the files needed for creating automated test cases using the
    AF and provides a way to implement them. The
    <filename>ansible.cfg</filename> file contains an example of the Ansible
    default configuration. It offers the possibility to display the Ansible
    console output in different ways, by setting the
    <literal>stdout_callback</literal> option to <literal>selective</literal>
    or <literal>debug</literal>. The default value for this option is set to
    <literal>selective</literal> to print only certain tasks. It is
    recommended to switch to <literal>debug</literal> when a test fails. By
    setting the parameter <literal>any_errors_fatal</literal> to
    <literal>True</literal>, task failures will be considered fatal errors
    (the play execution will stop). <remark>and why would this stop of play
    execution help in this debugging scenario</remark></para>

    <para>All Playbooks that execute AF python modules run on
    <literal>localhost</literal>. New entries have to be created for direct
    communication over SSH with the boards, as done in the
    <literal>[fortigateFW]</literal> example.</para>

    <para>The <filename>setup_env.sh</filename> script sets up the
    <literal>testHarness</literal> test environment by creating
    <literal>testHarness-venv python virtualenv</literal>, executing requests
    needed by Automation Framework python modules and installing Ansible. The
    playbooks directory contains all the implemented Ansible Playbooks. For
    more details please refer to chapter "Sample Test Cases" from the Enea NFV
    Access System Test Specification document <remark>need an olink to that
    chapter here.</remark>.</para>

    <para>The <literal>uCPEM_config</literal> directory stores JSON
    configuration files needed for the setup of the uCPE Manager used by TH.
    One configuration file is needed per uCPE Manager installation, to be used
    in the TH. The <literal>vnf_image</literal> directory stores the VNF
    Images needed by the Ansible Playbooks (i.e. the sample test
    cases).</para>

    <para>The <literal>lab_config</literal> directory stores the JSON
    configuration files related to a device (devices<remark>clarify this
    please, what devices do you mean?</remark>, NICs and bridges). Each
    subfolder should be named exactly like the device name and should contain
    all the related configuration files needed for the test cases to be run on
    it.</para>

    <para>The <literal>vnf_config</literal> directory stores the configuration
    files related to a VNF Descriptor. Typically these include a VNF Image
    JSON, VNF Instance JSON, VNF license and any other files required by the
    type of the VNF. Each subfolder should be named exactly like the name of
    the VNF Descriptor and should contain all the related configuration files
    needed for test cases to be run using this VNF.</para>

    <para>The log directory is created when the
    <literal>setup_env.sh</literal> is run. When test cases are run, the
    Ansible and the Python logs are stored in the
    <filename>ansible.log</filename> and <filename>debug.log</filename> files,
    respectively.</para>
  </section>
</chapter>