diff options
Diffstat (limited to 'doc/book-enea-edge-auto-fw-th-user-guide')
-rw-r--r-- | doc/book-enea-edge-auto-fw-th-user-guide/doc/automation_framework_test_harness.xml | 2822 | ||||
-rw-r--r-- | doc/book-enea-edge-auto-fw-th-user-guide/doc/book.xml | 32 | ||||
-rw-r--r-- | doc/book-enea-edge-auto-fw-th-user-guide/doc/components.xml | 141 | ||||
-rw-r--r-- | doc/book-enea-edge-auto-fw-th-user-guide/doc/getting_started.xml | 241 | ||||
-rwxr-xr-x | doc/book-enea-edge-auto-fw-th-user-guide/doc/images/ChainedVNFsService_setup.png | bin | 0 -> 83776 bytes | |||
-rwxr-xr-x | doc/book-enea-edge-auto-fw-th-user-guide/doc/images/autofw_testh_overview.png | bin | 0 -> 60150 bytes | |||
-rwxr-xr-x | doc/book-enea-edge-auto-fw-th-user-guide/doc/images/environment_basicsetup.png | bin | 0 -> 79325 bytes | |||
-rw-r--r-- | doc/book-enea-edge-auto-fw-th-user-guide/doc/overview.xml | 182 | ||||
-rw-r--r-- | doc/book-enea-edge-auto-fw-th-user-guide/doc/troubleshooting_guide.xml | 43 | ||||
-rwxr-xr-x | doc/book-enea-edge-auto-fw-th-user-guide/swcomp.mk | 10 |
10 files changed, 3471 insertions, 0 deletions
diff --git a/doc/book-enea-edge-auto-fw-th-user-guide/doc/automation_framework_test_harness.xml b/doc/book-enea-edge-auto-fw-th-user-guide/doc/automation_framework_test_harness.xml new file mode 100644 index 0000000..9f6e64f --- /dev/null +++ b/doc/book-enea-edge-auto-fw-th-user-guide/doc/automation_framework_test_harness.xml | |||
@@ -0,0 +1,2822 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <chapter id="auto_fw_test_harness"> | ||
3 | <title>Automation Framework and Test Harness</title> | ||
4 | |||
5 | <section id="auto_fw"> | ||
6 | <title>Automation Framework</title> | ||
7 | |||
8 | <para>All Automation Framework sources are under the | ||
9 | <literal><AF-TH-install-dir>/automation_framework</literal> | ||
10 | directory.</para> | ||
11 | |||
12 | <para>The <literal>/device</literal> folder contains Python scripts for | ||
13 | adding uCPE device(s), receiving uCPE events' reports, removing a uCPE | ||
14 | device, waiting for a uCPE device to connect to the Enea Edge Management | ||
15 | application, as well as scripts for adding and removing an offline | ||
16 | configuration store. This folder also contains scripts for uploading and | ||
17 | removing an NFVA image into the Enea Edge Management application, and for | ||
18 | installing and activating a NFVA image on a uCPE Device.</para> | ||
19 | |||
20 | <para>The <literal>/customScripts</literal> folder contains Python scripts | ||
21 | for uploading custom scripts onto the Enea Edge Management application and | ||
22 | uCPE device(s), for removing custom scripts from the Enea Edge Management | ||
23 | application and uCPE device(s).</para> | ||
24 | |||
25 | <para>The <literal>/network</literal> folder contains Python scripts for | ||
26 | binding or unbinding a network interface to and from a uCPE device (DPDK | ||
27 | or SR-IOV), creating or deleting an OVS network bridge, or dumping network | ||
28 | interface information about the available interfaces. Three of the scripts | ||
29 | mentioned here (binding, creating, deleting) are also applicable for an | ||
30 | Offline Configuration Store.</para> | ||
31 | |||
32 | <note> | ||
33 | <para>Commands within the network folder that include the option | ||
34 | <emphasis role="bold">-o</emphasis> allow the user to perform the action | ||
35 | in an offline configuration store alternative available for use at a | ||
36 | later setup time.</para> | ||
37 | |||
38 | <para>Commands that include the <emphasis role="bold">-n</emphasis> | ||
39 | option refer to a uCPE device, with the operation being performed on | ||
40 | uCPE device.</para> | ||
41 | |||
42 | <para>All options contain either <emphasis role="bold">-n</emphasis>, | ||
43 | <emphasis role="bold">-o</emphasis> or both. One of them must always be | ||
44 | provided, if both are provided, -o has priority, and -n is thus | ||
45 | ignored.</para> | ||
46 | |||
47 | <para>In the following script examples, <emphasis>Enea Edge Management | ||
48 | </emphasis> is reffered as <emphasis>Enea uCPE | ||
49 | Manager</emphasis>.</para> | ||
50 | </note> | ||
51 | |||
52 | <para>The <literal>/unittestSuite</literal> folder contains JSON files for | ||
53 | complex scenarios (multiple operations), as well as Python unit-test class | ||
54 | and loader scripts for generating specific test cases for the available | ||
55 | Python scripts. The generated test cases are injected into the Python | ||
56 | unit-test suite class to be run using the Python unit-test | ||
57 | framework.</para> | ||
58 | |||
59 | <para>The <literal>/unittestSuite/config</literal> folder contains | ||
60 | configuration files in JSON format that describe the list of test cases | ||
61 | for a particular Python script. Each defined test case is a dictionary | ||
62 | that must contain the test case name and arguments to be passed to the | ||
63 | Python script for running the test case.</para> | ||
64 | |||
65 | <para>The <literal>/unittestSuite/vnf_config</literal> directory contains | ||
66 | symlinks for the Fortigate license file and for the | ||
67 | <literal>/vnf_config/fortigateImage</literal> folder.</para> | ||
68 | |||
69 | <para>The <literal>/vnf</literal> folder contains Python scripts for | ||
70 | onboarding and offboarding a VNF image, instantiating a VNF, controlling a | ||
71 | VNF instance or destroying an existing one.</para> | ||
72 | |||
73 | <para>The <filename>eneaUcpeMgr.py</filename> file acts as a library for | ||
74 | the (Python) Automation Framework scripts. It contains common functions | ||
75 | and unit-test configuration options.</para> | ||
76 | |||
77 | <section id="python_testsuite"> | ||
78 | <title>Python Unit-Test Suite</title> | ||
79 | |||
80 | <para>The Python unit-test class defined in the | ||
81 | <filename>unittestSuite.py</filename> script provides a way to automate | ||
82 | the execution of specific test cases for each supported Python | ||
83 | script.</para> | ||
84 | |||
85 | <para>This class requires a test suite configuration JSON file that | ||
86 | contains a dictionary list of the Python scripts to be processed. Each | ||
87 | dictionary must contain the path of the Python script to be loaded and | ||
88 | the path to the file describing the test cases to be performed against | ||
89 | the designated script.</para> | ||
90 | |||
91 | <para>Steps for running the Python unit-test suite on the Enea Edge | ||
92 | Management application are provided below.</para> | ||
93 | |||
94 | <section id="script_opts"> | ||
95 | <title>Script Options</title> | ||
96 | |||
97 | <programlisting>$ python unittestSuite.py -h | ||
98 | Usage: unittestSuite.py [options] | ||
99 | |||
100 | Run selected unit-test suite against Enea uCPE Manager. | ||
101 | |||
102 | Options: | ||
103 | --version show program's version number and exit | ||
104 | -h, --help show this help message and exit | ||
105 | -u USERNAME, --username=USERNAME | ||
106 | Enea uCPE Manager login username | ||
107 | -p PASSWORD, --password=PASSWORD | ||
108 | Enea uCPE Manager login password | ||
109 | -H HOST, --host=HOST Enea uCPE Manager host name or IP address | ||
110 | -n DEVICENAME, --deviceName=DEVICENAME | ||
111 | Name of vCPE device (Virtual Infrastructure Manager) | ||
112 | -s SUITEFILE, --suite=SUITEFILE | ||
113 | Test suite configuration file in JSON format | ||
114 | -d DESCRIPTION, --description=DESCRIPTION | ||
115 | Test suite description | ||
116 | -o OFFLINE, --offline=OFFLINE | ||
117 | Offline Configuration(ZTP) | ||
118 | |||
119 | Mandatory options: | ||
120 | -H/--host, -n/--deviceName, -s/--suiteFile, -d/--description</programlisting> | ||
121 | </section> | ||
122 | |||
123 | <section id="config_ut_json"> | ||
124 | <title>Configuring Unit-Test JSON File</title> | ||
125 | |||
126 | <para>The Unit-Test suite JSON configuration file contains a list of | ||
127 | dictionaries. Each dictionary indicates the path of the Python module | ||
128 | to load and the test case's configuration file to be executed against | ||
129 | the loaded module.</para> | ||
130 | |||
131 | <para>Below is a sample unit-test configuration file, describing the | ||
132 | Fortigate <emphasis role="bold">deployment</emphasis> scenario | ||
133 | <filename>fortigateDeploy.json</filename>, found in | ||
134 | <literal><AF-TH-install-dir>/automation_framework/unittestSuite</literal>:</para> | ||
135 | |||
136 | <para><programlisting>[ | ||
137 | { | ||
138 | "config": "config/waitDeviceUp.json", | ||
139 | "module": "../device/waitDeviceUp.py" | ||
140 | }, | ||
141 | { | ||
142 | "config": "config/bindNetworkInterface.json", | ||
143 | "module": "../network/bindNetworkInterface.py" | ||
144 | }, | ||
145 | { | ||
146 | "config": "config/newNetworkBridge.json", | ||
147 | "module": "../network/newNetworkBridge.py" | ||
148 | }, | ||
149 | { | ||
150 | "config": "config/onboardVNFRaw.json", | ||
151 | "module": "../vnf/onboardVNFRaw.py" | ||
152 | }, | ||
153 | { | ||
154 | "config": "config/instantiateVNFI.json", | ||
155 | "module": "../vnf/instantiateVNFI.py" | ||
156 | }, | ||
157 | { | ||
158 | "config": "config/controlVNFI.json", | ||
159 | "module": "../vnf/controlVNFI.py" | ||
160 | } | ||
161 | ]</programlisting></para> | ||
162 | |||
163 | <para>Below is a sample unit-test configuration file, describing the | ||
164 | Fortigate <emphasis role="bold">cleanup</emphasis> scenario | ||
165 | <filename>fortigateCleanup.json</filename>:</para> | ||
166 | |||
167 | <programlisting>[ | ||
168 | { | ||
169 | "config": "config/destroyVNFI.json", | ||
170 | "module": "../vnf/destroyVNFI.py" | ||
171 | }, | ||
172 | { | ||
173 | "config": "config/delNetworkBridge.json", | ||
174 | "module": "../network/delNetworkBridge.py" | ||
175 | }, | ||
176 | { | ||
177 | "config": "config/unbindNetworkInterface.json", | ||
178 | "module": "../network/unbindNetworkInterface.py" | ||
179 | }, | ||
180 | { | ||
181 | "config": "config/offboardVNF.json", | ||
182 | "module": "../vnf/offboardVNF.py" | ||
183 | } | ||
184 | ]</programlisting> | ||
185 | |||
186 | <para>The <literal>config</literal> key contains the path to the test | ||
187 | case's configuration file.</para> | ||
188 | |||
189 | <para>The <literal>module</literal> key contains the path to the | ||
190 | Python script to be executed.</para> | ||
191 | </section> | ||
192 | |||
193 | <section id="ut_config_opts"> | ||
194 | <title>Unit-Test Configuration Options</title> | ||
195 | |||
196 | <para>Unit-test behavior can be tweaked through setting any of the | ||
197 | following options. This is done through the | ||
198 | <filename>eneaUcpeMgr.py</filename> file:</para> | ||
199 | |||
200 | <programlisting># Defaults for the framework | ||
201 | username = "admin" | ||
202 | password = "admin" | ||
203 | host = None | ||
204 | deviceName = None | ||
205 | directory = "." | ||
206 | ftpUsername = "ftp" | ||
207 | ftpPassword = "ftp" | ||
208 | ftpPort = "2021" | ||
209 | |||
210 | # Stop the test run on the first error or failure | ||
211 | failfast = True | ||
212 | |||
213 | # Logging levels ordered by the highest severity: | ||
214 | # CRITICAL 50 | ||
215 | # ERROR 40 | ||
216 | # WARNING 30 | ||
217 | # INFO 20 | ||
218 | # DEBUG 10 | ||
219 | # NOTSET 0 | ||
220 | fileLoggingLevel = logging.DEBUG | ||
221 | consoleLoggingLevel = logging.INFO | ||
222 | </programlisting> | ||
223 | |||
224 | <table> | ||
225 | <title>eneaUcpeMgr.py Options</title> | ||
226 | |||
227 | <tgroup cols="2"> | ||
228 | <colspec align="left" /> | ||
229 | |||
230 | <colspec colwidth="2*" /> | ||
231 | |||
232 | <colspec colwidth="5*" /> | ||
233 | |||
234 | <thead> | ||
235 | <row> | ||
236 | <entry align="center">Option</entry> | ||
237 | |||
238 | <entry align="center">Description</entry> | ||
239 | </row> | ||
240 | </thead> | ||
241 | |||
242 | <tbody> | ||
243 | <row> | ||
244 | <entry><literal>username</literal></entry> | ||
245 | |||
246 | <entry>The user authentication used to log into the Enea Edge | ||
247 | Management application. This can be overwritten by setting the | ||
248 | Python unit-test suite command line option | ||
249 | <literal>-u</literal>.</entry> | ||
250 | </row> | ||
251 | |||
252 | <row> | ||
253 | <entry><literal>password</literal></entry> | ||
254 | |||
255 | <entry>The password used to log into the Enea Edge Management | ||
256 | application. This can be overwritten by setting the Python | ||
257 | unit-test suite command line option | ||
258 | <literal>-p</literal>.</entry> | ||
259 | </row> | ||
260 | |||
261 | <row> | ||
262 | <entry><literal>host</literal></entry> | ||
263 | |||
264 | <entry>The IP address of the Enea Edge Management application | ||
265 | host. This can be overwritten by setting the Python unit-test | ||
266 | suite command line option <literal>-H</literal>.</entry> | ||
267 | </row> | ||
268 | |||
269 | <row> | ||
270 | <entry><literal>devicename</literal></entry> | ||
271 | |||
272 | <entry>The name of the vCPE agent against which tests will be | ||
273 | performed. This can be overwritten by setting the Python | ||
274 | unit-test suite command line option | ||
275 | <literal>-n</literal>.</entry> | ||
276 | </row> | ||
277 | |||
278 | <row> | ||
279 | <entry><literal>ftpUsername</literal></entry> | ||
280 | |||
281 | <entry>The user authentication used for the FTP connection | ||
282 | when onboarding a VNF image. This can be overwritten by | ||
283 | setting the Python script command line option | ||
284 | <literal>-f</literal>.</entry> | ||
285 | </row> | ||
286 | |||
287 | <row> | ||
288 | <entry><literal>ftpPassword</literal></entry> | ||
289 | |||
290 | <entry>The password used for the FTP connection when | ||
291 | onboarding a VNF image. This can be overwritten by setting the | ||
292 | Python script command line option | ||
293 | <literal><literal>-w</literal></literal>.</entry> | ||
294 | </row> | ||
295 | |||
296 | <row> | ||
297 | <entry><literal>ftpPort</literal></entry> | ||
298 | |||
299 | <entry>The port used for the FTP connection when onboarding a | ||
300 | VNF image. This can be overwritten by setting the Python | ||
301 | script command line option <literal>-P</literal>.</entry> | ||
302 | </row> | ||
303 | |||
304 | <row> | ||
305 | <entry><literal>failfast</literal></entry> | ||
306 | |||
307 | <entry>Describes the unit-test execution behavior on the first | ||
308 | error or failure encountered.</entry> | ||
309 | </row> | ||
310 | |||
311 | <row> | ||
312 | <entry><literal>fileLoggingLevel</literal></entry> | ||
313 | |||
314 | <entry>Sets the file logging level.</entry> | ||
315 | </row> | ||
316 | |||
317 | <row> | ||
318 | <entry><literal>consoleLoggingLevel</literal></entry> | ||
319 | |||
320 | <entry>Sets the console logging level.</entry> | ||
321 | </row> | ||
322 | </tbody> | ||
323 | </tgroup> | ||
324 | </table> | ||
325 | </section> | ||
326 | |||
327 | <section id="ut_suite_log"> | ||
328 | <title>Python Unit-Test Suite Logging</title> | ||
329 | |||
330 | <para>Logging messages are displayed in the console and also saved to | ||
331 | the specified log file. They are shown depending on the chosen logging | ||
332 | level.</para> | ||
333 | |||
334 | <para>Logging messages are ranked by their severity | ||
335 | level:<programlisting>CRITICAL 50 | ||
336 | ERROR 40 | ||
337 | WARNING 30 | ||
338 | INFO 20 | ||
339 | DEBUG 10 | ||
340 | NOTSET 0</programlisting></para> | ||
341 | |||
342 | <note> | ||
343 | <para>Logging messages less severe than the set logging level will | ||
344 | be ignored.</para> | ||
345 | </note> | ||
346 | |||
347 | <para>Setting the console logging level to INFO is done through the | ||
348 | <literal>consoleLoggingLevel</literal> option:<programlisting>consoleLoggingLevel = logging.INFO</programlisting>Setting | ||
349 | the file logging level to DEBUG is done through the | ||
350 | <literal>fileLoggingLevel</literal> option:<programlisting>fileLoggingLevel = logging.DEBUG</programlisting></para> | ||
351 | </section> | ||
352 | |||
353 | <section id="run_ut_suite"> | ||
354 | <title>Running Python Unit-Test Suite</title> | ||
355 | |||
356 | <note> | ||
357 | <para>Please update all JSON configuration files to use the name of | ||
358 | your vCPE agent device. In the following chapters, intelc3850-2 is | ||
359 | used as an example.</para> | ||
360 | </note> | ||
361 | |||
362 | <para>Below you'll find sample unit-test command line options for | ||
363 | running the Fortigate <emphasis role="bold">deployment</emphasis> | ||
364 | scenario:</para> | ||
365 | |||
366 | <programlisting>$ python unittestSuite.py -u admin -p admin -H localhost -n intelc3850-2 -s | ||
367 | fortigateDeploy.json -d "Fortigate deployment scenario"</programlisting> | ||
368 | |||
369 | <para>Setting the console logging level to DEBUG:</para> | ||
370 | |||
371 | <para><programlisting>consoleLoggingLevel = logging.DEBUG</programlisting> | ||
372 | <emphasis role="bold">Expected Output:</emphasis></para> | ||
373 | |||
374 | <programlisting>2020-04-15 07:58:40,668 - DEBUG: Started logging | ||
375 | |||
376 | Running Fortigate deployment scenario... | ||
377 | |||
378 | test 001: Wait VCPE Agent device be up (__main__.UnittestSuite) ... | ||
379 | 2020-04-15 07:58:40,681 - INFO: Wait uCPE device | ||
380 | 2020-04-15 07:58:40,722 - DEBUG: Login successful on host 'localhost' | ||
381 | 2020-04-15 07:58:40,723 - DEBUG: Session token is: 280028c0-7ede-11ea-a9a8-02429dc76bdd | ||
382 | 2020-04-15 07:58:40,746 - DEBUG: Found device with name 'intelc3850-2' | ||
383 | 2020-04-15 07:58:40,747 - DEBUG: Wait for device 'intelc3850-2' to connect | ||
384 | 2020-04-15 07:58:41,769 - DEBUG: HACK: sleep 30s more | ||
385 | 2020-04-15 07:59:11,791 - DEBUG: HACK: continue | ||
386 | 2020-04-15 07:59:11,792 - INFO: Status: Connected | ||
387 | 2020-04-15 07:59:11,793 - INFO: Done | ||
388 | 2020-04-15 07:59:11,827 - DEBUG: Logging out and exiting... | ||
389 | ok | ||
390 | test 002: Bind lan NIC to DPDK (__main__.UnittestSuite) ... | ||
391 | 2020-04-15 07:59:11,832 - INFO: Bind NIC | ||
392 | 2020-04-15 07:59:11,868 - DEBUG: Login successful on host 'localhost' | ||
393 | 2020-04-15 07:59:11,870 - DEBUG: Session token is: 3a90a960-7ede-11ea-a9a8-02429dc76bdd | ||
394 | 2020-04-15 07:59:11,897 - DEBUG: Found device with name 'intelc3850-2' | ||
395 | 2020-04-15 07:59:11,898 - DEBUG: Bind NIC 'eno6' to dpdk | ||
396 | 2020-04-15 07:59:12,952 - INFO: Done | ||
397 | 2020-04-15 07:59:12,983 - DEBUG: Logging out and exiting... | ||
398 | ok | ||
399 | test 003: Bind wan NIC to DPDK (__main__.UnittestSuite) ... | ||
400 | 2020-04-15 07:59:12,986 - INFO: Bind NIC | ||
401 | 2020-04-15 07:59:13,023 - DEBUG: Login successful on host 'localhost' | ||
402 | 2020-04-15 07:59:13,025 - DEBUG: Session token is: 3b410da0-7ede-11ea-a9a8-02429dc76bdd | ||
403 | 2020-04-15 07:59:13,048 - DEBUG: Found device with name 'intelc3850-2' | ||
404 | 2020-04-15 07:59:13,050 - DEBUG: Bind NIC 'eno8' to dpdk | ||
405 | 2020-04-15 07:59:14,365 - INFO: Done | ||
406 | 2020-04-15 07:59:14,392 - DEBUG: Logging out and exiting... | ||
407 | ok | ||
408 | test 004: Creating network bridge LAN (__main__.UnittestSuite) ... | ||
409 | 2020-04-15 07:59:14,395 - INFO: New OVS network bridge | ||
410 | 2020-04-15 07:59:14,428 - DEBUG: Login successful on host 'localhost' | ||
411 | 2020-04-15 07:59:14,429 - DEBUG: Session token is: 3c174961-7ede-11ea-a9a8-02429dc76bdd | ||
412 | 2020-04-15 07:59:14,452 - DEBUG: Found device with name 'intelc3850-2' | ||
413 | 2020-04-15 07:59:14,453 - DEBUG: Create new OVS network bridge 'lan_br' | ||
414 | 2020-04-15 07:59:14,454 - DEBUG: Attaching interface 'eno6' to bridge 'lan_br' | ||
415 | 2020-04-15 07:59:21,751 - INFO: Done | ||
416 | 2020-04-15 07:59:21,779 - DEBUG: Logging out and exiting... | ||
417 | ok | ||
418 | test 005: Creating network bridge WAN (__main__.UnittestSuite) ... | ||
419 | 2020-04-15 07:59:21,782 - INFO: New OVS network bridge | ||
420 | 2020-04-15 07:59:21,818 - DEBUG: Login successful on host 'localhost' | ||
421 | 2020-04-15 07:59:21,819 - DEBUG: Session token is: 407ec231-7ede-11ea-a9a8-02429dc76bdd | ||
422 | 2020-04-15 07:59:21,845 - DEBUG: Found device with name 'intelc3850-2' | ||
423 | 2020-04-15 07:59:21,846 - DEBUG: Create new OVS network bridge 'wan_br' | ||
424 | 2020-04-15 07:59:21,847 - DEBUG: Attaching interface 'eno8' to bridge 'wan_br' | ||
425 | 2020-04-15 07:59:22,813 - INFO: Done | ||
426 | 2020-04-15 07:59:22,845 - DEBUG: Logging out and exiting... | ||
427 | ok | ||
428 | test 006: Onboarding Fortigate VNF (wizard API) (__main__.UnittestSuite) ... | ||
429 | 2020-04-15 07:59:22,849 - INFO: Onboard wizard | ||
430 | 2020-04-15 07:59:22,885 - DEBUG: Login successful on host 'localhost' | ||
431 | 2020-04-15 07:59:22,886 - DEBUG: Session token is: 4121b8f1-7ede-11ea-a9a8-02429dc76bdd | ||
432 | 2020-04-15 07:59:22,890 - DEBUG: FTP file '../../vnf_image/fortios.qcow2' on host \ | ||
433 | 'localhost', port '2021' | ||
434 | 2020-04-15 07:59:23,127 - DEBUG: Onboard VNF raw: fortios.qcow2 | ||
435 | 2020-04-15 07:59:27,107 - INFO: Done | ||
436 | 2020-04-15 07:59:27,140 - DEBUG: Logging out and exiting... | ||
437 | ok | ||
438 | test 007: Instantiate Fortigate VNF (__main__.UnittestSuite) ... | ||
439 | 2020-04-15 07:59:27,144 - INFO: Instantiate VNF | ||
440 | 2020-04-15 07:59:27,182 - DEBUG: Login successful on host 'localhost' | ||
441 | 2020-04-15 07:59:27,184 - DEBUG: Session token is: 43b16480-7ede-11ea-a9a8-02429dc76bdd | ||
442 | 2020-04-15 07:59:27,207 - DEBUG: Found device with name 'intelc3850-2' | ||
443 | 2020-04-15 07:59:27,281 - DEBUG: Found VNF descriptor with name 'fortigateImage' | ||
444 | 2020-04-15 07:59:27,286 - DEBUG: Reading file content as text: \ | ||
445 | vnf_config/fortigateImage/fortigateFW.conf | ||
446 | 2020-04-15 07:59:27,359 - DEBUG: Encrypt file content: \ | ||
447 | vnf_config/fortigateImage/fortigateFW.conf | ||
448 | 2020-04-15 07:59:27,364 - DEBUG: Reading file content as text: \ | ||
449 | vnf_config/fortigateImage/fortigateLicense.lic | ||
450 | 2020-04-15 07:59:27,407 - DEBUG: Encrypt file content: \ | ||
451 | vnf_config/fortigateImage/fortigateLicense.lic | ||
452 | 2020-04-15 07:59:27,409 - DEBUG: Instantiate fortigateImage VNF on 'intelc3850-2' | ||
453 | 2020-04-15 07:59:32,720 - INFO: Done | ||
454 | 2020-04-15 07:59:32,747 - DEBUG: Logging out and exiting... | ||
455 | ok | ||
456 | test 008: Pause Fortigate VNF instance (__main__.UnittestSuite) ... | ||
457 | 2020-04-15 07:59:32,840 - INFO: Control VNF | ||
458 | 2020-04-15 07:59:32,877 - DEBUG: Login successful on host 'localhost' | ||
459 | 2020-04-15 07:59:32,880 - DEBUG: Session token is: 47166170-7ede-11ea-a9a8-02429dc76bdd | ||
460 | 2020-04-15 07:59:32,904 - DEBUG: Found device with name 'intelc3850-2' | ||
461 | 2020-04-15 07:59:32,954 - DEBUG: Found VNF instance with name 'fortigateFWInstance' | ||
462 | 2020-04-15 07:59:32,955 - DEBUG: Control VNF instance 'intelc3850-2', command: pause | ||
463 | 2020-04-15 07:59:33,114 - INFO: Done | ||
464 | 2020-04-15 07:59:33,138 - DEBUG: Logging out and exiting... | ||
465 | ok | ||
466 | test 009: Resume Fortigate VNF instance (__main__.UnittestSuite) ... | ||
467 | 2020-04-15 07:59:33,142 - INFO: Control VNF | ||
468 | 2020-04-15 07:59:33,174 - DEBUG: Login successful on host 'localhost' | ||
469 | 2020-04-15 07:59:33,177 - DEBUG: Session token is: 4743b300-7ede-11ea-a9a8-02429dc76bdd | ||
470 | 2020-04-15 07:59:33,209 - DEBUG: Found device with name 'intelc3850-2' | ||
471 | 2020-04-15 07:59:33,257 - DEBUG: Found VNF instance with name 'fortigateFWInstance' | ||
472 | 2020-04-15 07:59:33,258 - DEBUG: Control VNF instance 'intelc3850-2', command: resume | ||
473 | 2020-04-15 07:59:33,365 - INFO: Done | ||
474 | 2020-04-15 07:59:33,389 - DEBUG: Logging out and exiting... | ||
475 | ok | ||
476 | test 010: Stop Fortigate VNF instance (__main__.UnittestSuite) ... | ||
477 | 2020-04-15 07:59:33,393 - INFO: Control VNF | ||
478 | 2020-04-15 07:59:33,436 - DEBUG: Login successful on host 'localhost' | ||
479 | 2020-04-15 07:59:33,438 - DEBUG: Session token is: 476aea10-7ede-11ea-a9a8-02429dc76bdd | ||
480 | 2020-04-15 07:59:33,467 - DEBUG: Found device with name 'intelc3850-2' | ||
481 | 2020-04-15 07:59:33,511 - DEBUG: Found VNF instance with name 'fortigateFWInstance' | ||
482 | 2020-04-15 07:59:33,513 - DEBUG: Control VNF instance 'intelc3850-2', command: stop | ||
483 | 2020-04-15 07:59:33,865 - INFO: Done | ||
484 | 2020-04-15 07:59:33,891 - DEBUG: Logging out and exiting... | ||
485 | ok | ||
486 | test 011: Start Fortigate VNF instance (__main__.UnittestSuite) ... | ||
487 | 2020-04-15 07:59:33,895 - INFO: Control VNF | ||
488 | 2020-04-15 07:59:33,931 - DEBUG: Login successful on host 'localhost' | ||
489 | 2020-04-15 07:59:33,932 - DEBUG: Session token is: 47b70e41-7ede-11ea-a9a8-02429dc76bdd | ||
490 | 2020-04-15 07:59:33,956 - DEBUG: Found device with name 'intelc3850-2' | ||
491 | 2020-04-15 07:59:34,013 - DEBUG: Found VNF instance with name 'fortigateFWInstance' | ||
492 | 2020-04-15 07:59:34,015 - DEBUG: Control VNF instance 'intelc3850-2', command: start | ||
493 | 2020-04-15 07:59:36,599 - INFO: Done | ||
494 | 2020-04-15 07:59:36,623 - DEBUG: Logging out and exiting... | ||
495 | ok | ||
496 | |||
497 | ---------------------------------------------------------------------- | ||
498 | Ran 11 tests in 55.946s | ||
499 | |||
500 | OK</programlisting> | ||
501 | |||
502 | <para>Below you'll find sample unit-test command line options for | ||
503 | running the Fortigate <emphasis role="bold">cleanup</emphasis> | ||
504 | scenario:</para> | ||
505 | |||
506 | <programlisting>$ python unittestSuite.py -u admin -p admin -H localhost -n intelc3850-2 -s | ||
507 | fortigateCleanup.json -d "Fortigate cleanup scenario"</programlisting> | ||
508 | |||
509 | <para>Setting the console logging level to INFO:</para> | ||
510 | |||
511 | <programlisting>consoleLoggingLevel = logging.INFO</programlisting> | ||
512 | |||
513 | <para><emphasis role="bold">Expected Output:</emphasis></para> | ||
514 | |||
515 | <programlisting>Running Fortigate cleanup scenario... | ||
516 | |||
517 | test 001: Destroying Fortigate VNF (__main__.UnittestSuite) ... | ||
518 | 2020-04-15 08:03:40,756 - INFO: Destroy VNF | ||
519 | 2020-04-15 08:03:41,358 - INFO: Done | ||
520 | ok | ||
521 | test 002: Deleting network bridge LAN (__main__.UnittestSuite) ... | ||
522 | 2020-04-15 08:03:41,494 - INFO: Delete OVS network bridge | ||
523 | 2020-04-15 08:03:41,731 - INFO: Done | ||
524 | ok | ||
525 | test 003: Deleting network bridge WAN (__main__.UnittestSuite) ... | ||
526 | 2020-04-15 08:03:41,766 - INFO: Delete OVS network bridge | ||
527 | 2020-04-15 08:03:43,270 - INFO: Done | ||
528 | ok | ||
529 | test 004: Unbind lan NIC from DPDK (__main__.UnittestSuite) ... | ||
530 | 2020-04-15 08:03:43,375 - INFO: Unbind NIC | ||
531 | 2020-04-15 08:03:45,405 - INFO: Done | ||
532 | ok | ||
533 | test 005: Unbind wan NIC from DPDK (__main__.UnittestSuite) ... | ||
534 | 2020-04-15 08:03:45,434 - INFO: Unbind NIC | ||
535 | 2020-04-15 08:03:47,633 - INFO: Done | ||
536 | ok | ||
537 | test 006: Offboarding Fortigate VNF (__main__.UnittestSuite) ... | ||
538 | 2020-04-15 08:03:47,701 - INFO: Offboard VNF | ||
539 | 2020-04-15 08:03:47,919 - INFO: Done | ||
540 | ok | ||
541 | |||
542 | ---------------------------------------------------------------------- | ||
543 | Ran 6 tests in 7.192s | ||
544 | |||
545 | OK</programlisting> | ||
546 | </section> | ||
547 | </section> | ||
548 | |||
549 | <section id="add_ucpe_device"> | ||
550 | <title>Adding a uCPE Device</title> | ||
551 | |||
552 | <para>Steps for adding, configuring and running a uCPE device into the | ||
553 | Enea Edge Management application are described below .</para> | ||
554 | |||
555 | <section id="opts_add_device"> | ||
556 | <title>Script Options</title> | ||
557 | |||
558 | <programlisting>$ python addDevice.py -h | ||
559 | Usage: addDevice.py [options] | ||
560 | |||
561 | Add a uCPE device in Enea uCPE Manager. | ||
562 | |||
563 | Options: | ||
564 | --version show program's version number and exit | ||
565 | -h, --help show this help message and exit | ||
566 | -u USERNAME, --username=USERNAME | ||
567 | Enea uCPE Manager login username | ||
568 | -p PASSWORD, --password=PASSWORD | ||
569 | Enea uCPE Manager login password | ||
570 | -H HOST, --host=HOST Enea uCPE Manager host name or IP address | ||
571 | -f DEVICEFILE, --file=DEVICEFILE | ||
572 | File containing uCPE Information in JSON format | ||
573 | |||
574 | Mandatory options: | ||
575 | -H/--host, -f/--file</programlisting> | ||
576 | </section> | ||
577 | |||
578 | <section id="config_json_adddev"> | ||
579 | <title>Configuring the JSON File</title> | ||
580 | |||
581 | <para>The JSON configuration file needed for adding a uCPE device | ||
582 | should contain a list of dictionaries. Each dictionary indicates the | ||
583 | test case name and the arguments passed to the | ||
584 | <literal>addDevice</literal> Python module.</para> | ||
585 | |||
586 | <para><emphasis role="bold">Sample configuration file in JSON | ||
587 | format:</emphasis></para> | ||
588 | |||
589 | <programlisting>[ | ||
590 | { | ||
591 | "name": "Add VCPE Agent device ", | ||
592 | "args": "-f ../../lab_config/intelc3850-2/intelc3850-2.json" | ||
593 | } | ||
594 | ]</programlisting> | ||
595 | |||
596 | <para><emphasis role="bold">Sample | ||
597 | <filename>intelc3850-2.json</filename> configuration | ||
598 | file:</emphasis></para> | ||
599 | |||
600 | <programlisting>{ | ||
601 | "name": "intelc3850-2", | ||
602 | "deviceGroupingTags": " ", | ||
603 | "description": "", | ||
604 | "address": "172.24.12.114", | ||
605 | "version": "2.4.0", | ||
606 | "port": "22", | ||
607 | "username": "root", | ||
608 | "password": "root", | ||
609 | "certificate": null, | ||
610 | "passphrase": null, | ||
611 | "callHome": "false", | ||
612 | "maintMode": "false", | ||
613 | "deviceId": "intelc3850-2" | ||
614 | }</programlisting> | ||
615 | </section> | ||
616 | |||
617 | <section id="run_py_mod"> | ||
618 | <title>Running the Python Module</title> | ||
619 | |||
620 | <para>The <filename>addDevice</filename> Python module can be executed | ||
621 | independently by running the following command:</para> | ||
622 | |||
623 | <programlisting>$ python addDevice.py -u admin -p admin -H localhost -f config/device.json | ||
624 | 2019-03-07 17:33:10,755 - DEBUG: Started logging | ||
625 | 2019-03-07 17:33:10,756 - INFO: Add uCPE device | ||
626 | 2019-03-07 17:33:10,975 - DEBUG: Login successful on host 'localhost' | ||
627 | 2019-03-07 17:33:10,979 - DEBUG: Session token is: 508b6ea2-40ee-11e9-a81f525400d08e1d | ||
628 | 2019-03-07 17:33:11,049 - DEBUG: Add new device 'intelc3850-2' to uCPE Manager host | ||
629 | 2019-03-07 17:33:11,483 - INFO: Done | ||
630 | 2019-03-07 17:33:11,501 - DEBUG: Logging out and exiting....</programlisting> | ||
631 | </section> | ||
632 | </section> | ||
633 | |||
634 | <section id="remove_ucpe_device"> | ||
635 | <title>Removing a uCPE Device</title> | ||
636 | |||
637 | <para>Steps for removing a uCPE device from the Enea Edge Management | ||
638 | application are described below.</para> | ||
639 | |||
640 | <section id="rem_script_opts"> | ||
641 | <title>Script Options</title> | ||
642 | |||
643 | <programlisting>$ python removeDevice.py -h | ||
644 | Usage: removeDevice.py [options] | ||
645 | |||
646 | Remove a uCPE from Enea uCPE Manager. | ||
647 | |||
648 | Options: | ||
649 | --version show program's version number and exit | ||
650 | -h, --help show this help message and exit | ||
651 | -u USERNAME, --username=USERNAME | ||
652 | Enea uCPE Manager login username | ||
653 | -p PASSWORD, --password=PASSWORD | ||
654 | Enea uCPE Manager login password | ||
655 | -H HOST, --host=HOST Enea uCPE Manager host name or IP address | ||
656 | -f DEVICEFILE, --file=DEVICEFILE | ||
657 | File containing uCPE Information in JSON format | ||
658 | |||
659 | Mandatory options: | ||
660 | -H/--host, -f/--file</programlisting> | ||
661 | </section> | ||
662 | |||
663 | <section id="config_json_rem"> | ||
664 | <title>Configuring the JSON File</title> | ||
665 | |||
666 | <para>The JSON configuration file needed to remove a uCPE device | ||
667 | should contain a list of dictionaries. Each dictionary indicates the | ||
668 | test case name and the arguments passed to the | ||
669 | <filename>removeDevice</filename> Python module.</para> | ||
670 | |||
671 | <para><emphasis role="bold">Sample unit-test JSON file | ||
672 | format:</emphasis></para> | ||
673 | |||
674 | <programlisting>[ | ||
675 | { | ||
676 | "name": "Remove VCPE Agent device ", | ||
677 | "args": "-f ../../lab_config/intelc3850-2/intelc3850-2.json" | ||
678 | } | ||
679 | ]</programlisting> | ||
680 | |||
681 | <para><emphasis role="bold">Sample | ||
682 | <filename>intelc3850-2.json</filename> configuration | ||
683 | file:</emphasis></para> | ||
684 | |||
685 | <programlisting>{ | ||
686 | "name": "intelc3850-2" | ||
687 | }</programlisting> | ||
688 | </section> | ||
689 | |||
690 | <section id="Run_py_mod_rem"> | ||
691 | <title>Running the Python Module</title> | ||
692 | |||
693 | <para>The <filename>removeDevice</filename> Python module can be | ||
694 | executed individually by running the following command:</para> | ||
695 | |||
696 | <programlisting>$ python removeDevice.py -u admin -p admin -H localhost -f | ||
697 | ../../lab_config/intelc3850-2/intelc3850-2.json | ||
698 | 2019-03-07 17:33:56,834 - DEBUG: Started logging | ||
699 | 2019-03-07 17:33:56,835 - INFO: Remove uCPE device | ||
700 | 2019-03-07 17:33:56,856 - DEBUG: Login successful on host 'localhost' | ||
701 | 2019-03-07 17:33:56,856 - DEBUG: Session token is: 6bebcb43-40ee-11e9-a81f525400d08e1d | ||
702 | 2019-03-07 17:33:56,856 - DEBUG: Delete device 'intelc3850-2' from uCPE Manager | ||
703 | host | ||
704 | 2019-03-07 17:33:56,875 - DEBUG: Found device with name 'intelc3850-2' | ||
705 | 2019-03-07 17:33:57,159 - INFO: Done | ||
706 | 2019-03-07 17:33:57,171 - DEBUG: Logging out and exiting...</programlisting> | ||
707 | </section> | ||
708 | </section> | ||
709 | |||
710 | <section id="wait_ucpe_device"> | ||
711 | <title>Waiting a uCPE Device</title> | ||
712 | |||
713 | <para>Steps and details for how to Wait a uCPE device to connect to the | ||
714 | Enea Edge Management application after installation, are described | ||
715 | below.</para> | ||
716 | |||
717 | <section id="wait_script_opts"> | ||
718 | <title>Script Options</title> | ||
719 | |||
720 | <programlisting>$ python waitDeviceUp.py -h | ||
721 | Usage: waitDeviceUp.py [options] | ||
722 | |||
723 | Wait for uCPE to connect to the Enea uCPE Manager after installation. | ||
724 | |||
725 | Options: | ||
726 | --version show program's version number and exit | ||
727 | -h, --help show this help message and exit | ||
728 | -u USERNAME, --username=USERNAME | ||
729 | Enea uCPE Manager login username | ||
730 | -p PASSWORD, --password=PASSWORD | ||
731 | Enea uCPE Manager login password | ||
732 | -H HOST, --host=HOST Enea uCPE Manager host name or IP address | ||
733 | -f DEVICEFILE, --file=DEVICEFILE | ||
734 | File containing uCPE Information in JSON format | ||
735 | -t TIMEOUT, --timeout=TIMEOUT | ||
736 | Time in seconds for maximum wait period, default = | ||
737 | instant | ||
738 | |||
739 | Mandatory options: | ||
740 | -H/--host, -f/--file</programlisting> | ||
741 | </section> | ||
742 | |||
743 | <section id="config_json_wait"> | ||
744 | <title>Configuring the JSON File</title> | ||
745 | |||
746 | <para>The JSON configuration file needed to wait a uCPE device should | ||
747 | contain a list of dictionaries. Each dictionary indicates the test | ||
748 | case name and the test case arguments passed to the | ||
749 | <filename>waitDeviceUp</filename> Python module.</para> | ||
750 | |||
751 | <para><emphasis role="bold">Sample unit-test JSON file | ||
752 | format:</emphasis></para> | ||
753 | |||
754 | <programlisting>[ | ||
755 | { | ||
756 | "name": "Wait VCPE Agent device be up", | ||
757 | "args": "-f ../../lab_config/intelc3850-2/intelc3850-2.json -t 60" | ||
758 | } | ||
759 | ]</programlisting> | ||
760 | |||
761 | <para><emphasis role="bold">Sample | ||
762 | <filename>intelc3850-2.json</filename> configuration | ||
763 | file:</emphasis></para> | ||
764 | |||
765 | <programlisting>{ | ||
766 | "name": "intelc3850-2" | ||
767 | }</programlisting> | ||
768 | </section> | ||
769 | |||
770 | <section id="runpy_mod_wait"> | ||
771 | <title>Running the Python Module</title> | ||
772 | |||
773 | <para>The <filename>waitDeviceUp</filename> Python module can be | ||
774 | executed individually by running the following command | ||
775 | line:<programlisting>$ python waitDeviceUp.py -u admin -p admin -H localhost -t 60 -f | ||
776 | ../../lab_config/intelc3850-2/intelc3850-2.json | ||
777 | 2019-03-07 18:03:21,132 - DEBUG: Started logging | ||
778 | 2019-03-07 18:03:21,133 - INFO: Wait uCPE device | ||
779 | 2019-03-07 18:03:21,149 - DEBUG: Login successful on host 'localhost' | ||
780 | 2019-03-07 18:03:21,149 - DEBUG: Session token is: 8785b1a0-40f2-11e9-a81f525400d08e1d | ||
781 | 2019-03-07 18:03:21,157 - DEBUG: Found device with name 'intelc3850-2' | ||
782 | 2019-03-07 18:03:21,157 - DEBUG: Wait for device 'intelc3850-2' to connect | ||
783 | 2019-03-07 18:03:29,356 - DEBUG: Status: Connected | ||
784 | 2019-03-07 18:03:29,356 - INFO: Done | ||
785 | 2019-03-07 18:03:29,365 - DEBUG: Logging out and exiting...</programlisting></para> | ||
786 | </section> | ||
787 | </section> | ||
788 | |||
789 | <section id="print_ucpe_log"> | ||
790 | <title>Printing the uCPE Device Log</title> | ||
791 | |||
792 | <para>Steps and details on how to Print the events log for a specific | ||
793 | uCPE device installed in the Enea Edge Management application, are | ||
794 | explained below.</para> | ||
795 | |||
796 | <section id="print_script_opts"> | ||
797 | <title>Script Options</title> | ||
798 | |||
799 | <programlisting>$ python getEventsForUcpe.py -h | ||
800 | Usage: getEventsForUcpe.py [options] | ||
801 | |||
802 | Print the events log for a specific uCPE installed in Enea uCPE Manager. | ||
803 | |||
804 | Options: | ||
805 | --version show program's version number and exit | ||
806 | -h, --help show this help message and exit | ||
807 | -u USERNAME, --username=USERNAME Enea uCPE Manager login username | ||
808 | -p PASSWORD, --password=PASSWORD Enea uCPE Manager login password | ||
809 | -H HOST, --host=HOST Enea uCPE Manager host name or IP address | ||
810 | -f DEVICEFILE, --file=DEVICEFILE File containing uCPE Information in JSON format | ||
811 | -s SEVERITY, --severity=SEVERITY Event severity level (Critical|Major|Minor) | ||
812 | |||
813 | Mandatory options: | ||
814 | -H/--host, -f/--file </programlisting> | ||
815 | </section> | ||
816 | |||
817 | <section id="config_json_log"> | ||
818 | <title>Configuring the JSON File</title> | ||
819 | |||
820 | <para><emphasis role="bold">Sample | ||
821 | <filename>intelc3850-2.json</filename> configuration | ||
822 | file:</emphasis></para> | ||
823 | |||
824 | <programlisting>{ | ||
825 | "name": "intelc3850-2", | ||
826 | "deviceId": "intelc3850-2", | ||
827 | "deviceGroupingTags": " ", | ||
828 | "description": "", | ||
829 | "address": "172.24.12.114", | ||
830 | "port": "22", | ||
831 | "username": "root", | ||
832 | "password": "root", | ||
833 | "certificate": null, | ||
834 | "passphrase": null, | ||
835 | "callHome": "false", | ||
836 | "maintMode": "false" | ||
837 | } | ||
838 | </programlisting> | ||
839 | </section> | ||
840 | |||
841 | <section id="runpy_mod_log"> | ||
842 | <title>Running the Python Module</title> | ||
843 | |||
844 | <para>The <literal>getEventsForUcpe</literal> Python module can be | ||
845 | executed individually by running the following command:</para> | ||
846 | |||
847 | <programlisting>$ python getEventsForUcpe.py -H localhost -f \ | ||
848 | ../../lab_config/intelc3850-2/intelc3850-2.json | ||
849 | |||
850 | 2019-07-04 13:48:31,289 - DEBUG: Started logging | ||
851 | 2019-07-04 13:48:31,290 - INFO: Dump uCPE events | ||
852 | 2019-07-04 13:48:31,336 - DEBUG: Login successful on host '172.24.3.108' | ||
853 | 2019-07-04 13:48:31,336 - DEBUG: Session token is: a53c68d3-9e51-11e9-a715-5254007632e2 | ||
854 | 2019-07-04 13:48:31,356 - DEBUG: Found device with name 'intelc3850-2' | ||
855 | 2019-07-04 13:48:31,357 - DEBUG: | ||
856 | Events on device: intelc3850-2 and severity: 1000 | ||
857 | 2019-07-04 13:48:31,450 - DEBUG: Dumping 1 events | ||
858 | 2019-07-04 13:48:31,450 - DEBUG: Device Disconnected | Alarm | Device | None | \ | ||
859 | 2019-07-04 09:57:40.042 | ||
860 | 2019-07-04 13:48:31,469 - DEBUG: Dumping 0 events | ||
861 | 2019-07-04 13:48:31,469 - INFO: Done | ||
862 | 2019-07-04 13:48:31,488 - DEBUG: Logging out and exiting... </programlisting> | ||
863 | </section> | ||
864 | </section> | ||
865 | |||
866 | <section id="enable_disable_dpdk"> | ||
867 | <title>Enabling or Disabling the DPDK</title> | ||
868 | |||
869 | <para>Steps and details on how to enable or disable the DPDK are | ||
870 | explained below.</para> | ||
871 | |||
872 | <section id="script_dpdk"> | ||
873 | <title>Script Options</title> | ||
874 | |||
875 | <programlisting>$ python configDPDK.py -h | ||
876 | Usage: configDPDK.py [options] | ||
877 | |||
878 | Configure DPDK | ||
879 | |||
880 | Options: | ||
881 | --version show program's version number and exit | ||
882 | -h, --help show this help message and exit | ||
883 | -u USERNAME, --username=USERNAME | ||
884 | Enea uCPE Manager login username | ||
885 | -p PASSWORD, --password=PASSWORD | ||
886 | Enea uCPE Manager login password | ||
887 | -H HOST, --host=HOST Enea uCPE Manager host name or IP address | ||
888 | -s STATE, --state=STATE | ||
889 | Enable/Disable | ||
890 | -n DEVICENAME, --device-name=DEVICENAME | ||
891 | Name of the device | ||
892 | -o STORENAME, --store-name=STORENAME | ||
893 | Name of the store | ||
894 | |||
895 | Mandatory options: | ||
896 | -H/--host, -s/--state, -n/--device-name or -o/--store-name</programlisting> | ||
897 | </section> | ||
898 | |||
899 | <section id="run_pydpdk"> | ||
900 | <title>Running the Python Module</title> | ||
901 | |||
902 | <para>The <literal>configDPDK</literal> Python module can be executed | ||
903 | individually by running the following command lines:</para> | ||
904 | |||
905 | <para>To Enable DPDK:</para> | ||
906 | |||
907 | <programlisting>$ python configDPDK.py -s enable -n intelc3850-2 | ||
908 | |||
909 | 2020-01-06 08:35:16,820 - DEBUG: Started logging | ||
910 | 2020-01-06 08:35:16,821 - INFO: Configure DPDK | ||
911 | 2020-01-06 08:35:16,870 - DEBUG: Login successful on host '172.24.3.90' | ||
912 | 2020-01-06 08:35:16,871 - DEBUG: Session token is: 601149e0-3089-11ea-b0c7-525400b7889f | ||
913 | 2020-01-06 08:35:16,894 - DEBUG: Found device with name 'inteld1521-1' | ||
914 | 2020-01-06 08:35:16,895 - DEBUG: Set DPDK state to enable | ||
915 | 2020-01-06 08:35:16,936 - INFO: Done | ||
916 | 2020-01-06 08:35:16,961 - DEBUG: Logging out and exiting...</programlisting> | ||
917 | |||
918 | <para>To Disable DPDK:</para> | ||
919 | |||
920 | <programlisting>$ python configDPDK.py -s disable -n intelc3850-2 | ||
921 | |||
922 | 2020-01-06 08:33:57,157 - DEBUG: Started logging | ||
923 | 2020-01-06 08:33:57,158 - INFO: Configure DPDK | ||
924 | 2020-01-06 08:33:57,215 - DEBUG: Login successful on host '172.24.3.90' | ||
925 | 2020-01-06 08:33:57,216 - DEBUG: Session token is: 3096e670-3089-11ea-b0c7-525400b7889f | ||
926 | 2020-01-06 08:33:57,239 - DEBUG: Found device with name 'inteld1521-1' | ||
927 | 2020-01-06 08:33:57,241 - DEBUG: Set DPDK state to disable | ||
928 | 2020-01-06 08:33:57,284 - INFO: Done | ||
929 | 2020-01-06 08:33:57,310 - DEBUG: Logging out and exiting...</programlisting> | ||
930 | </section> | ||
931 | </section> | ||
932 | |||
933 | <section id="bind_ucpe_device"> | ||
934 | <title>Binding a Network Interface</title> | ||
935 | |||
936 | <para>How to Bind a physical network interface to a DPDK, Standard or | ||
937 | SR-IOV is detailed below.</para> | ||
938 | |||
939 | <section id="script_opts_bind"> | ||
940 | <title>Script Options</title> | ||
941 | |||
942 | <programlisting>$ python bindNetworkInterface.py -h | ||
943 | Usage: bindNetworkInterface.py [options] | ||
944 | |||
945 | Binds a physical network interface to a DPDK or SR-IOV. | ||
946 | |||
947 | Options: | ||
948 | --version show program's version number and exit | ||
949 | -h, --help show this help message and exit | ||
950 | -u USERNAME, --username=USERNAME | ||
951 | Enea uCPE Manager login username | ||
952 | -p PASSWORD, --password=PASSWORD | ||
953 | Enea uCPE Manager login password | ||
954 | -H HOST, --host=HOST Enea uCPE Manager host name or IP address | ||
955 | -f NICFILE, --file=NICFILE | ||
956 | File containing network interface Information in JSON | ||
957 | format | ||
958 | -n DEVICENAME, --device-name=DEVICENAME | ||
959 | Name of the device | ||
960 | -o STORENAME, --store-name=STORENAME | ||
961 | Name of the store | ||
962 | |||
963 | Mandatory options: | ||
964 | -H/--host, -f/--file, -n/--device-name or -o/--store-name</programlisting> | ||
965 | </section> | ||
966 | |||
967 | <section id="bind_config"> | ||
968 | <title>Configuring the JSON File</title> | ||
969 | |||
970 | <para>The JSON configuration file needed to bind a physical network | ||
971 | interface should contain a list of dictionaries. Each dictionary | ||
972 | indicates the test case name and the test case arguments passed to the | ||
973 | <filename>bindNetworkInterface</filename> Python module.</para> | ||
974 | |||
975 | <para><emphasis role="bold">Sample unit-test JSON file | ||
976 | format:</emphasis><programlisting>[ | ||
977 | { | ||
978 | "name": "Bind lan NIC to DPDK", | ||
979 | "args": "-f ../../lab_config/intelc3850-2/lan_nic.json" | ||
980 | }, | ||
981 | { | ||
982 | "name": "Bind wan NIC to DPDK", | ||
983 | "args": "-f ../../lab_config/intelc3850-2/wan_nic.json" | ||
984 | }, | ||
985 | { | ||
986 | "name": "Bind wan/lan NIC to SR-IOV", | ||
987 | "args": "-f ../../lab_config/intelc3850-2/sriov_nic.json" | ||
988 | }, | ||
989 | { | ||
990 | "name": "Bind wan/lan NIC to Standard", | ||
991 | "args": "-f ../../lab_config/intelc3850-2/std_nic.json" | ||
992 | } | ||
993 | ]</programlisting><emphasis role="bold">Sample | ||
994 | <filename>lan_nic.json</filename> configuration | ||
995 | file:</emphasis><programlisting>{ | ||
996 | "name": "enp4s0f0", | ||
997 | "type": "dpdk", | ||
998 | "subType": "vfio-pci" | ||
999 | }</programlisting><emphasis role="bold">Sample | ||
1000 | <filename>wan_nic.json</filename> configuration | ||
1001 | file:</emphasis><programlisting>{ | ||
1002 | "name": "enp4s0f1", | ||
1003 | "type": "dpdk", | ||
1004 | "subType": "vfio-pci" | ||
1005 | }</programlisting><emphasis role="bold">Sample | ||
1006 | <filename>sriov_nic.json</filename> configuration | ||
1007 | file:</emphasis><programlisting>{ | ||
1008 | "name": "enp4s0f1", | ||
1009 | "type": "sr-iov", | ||
1010 | "subType": "adapter-pool", | ||
1011 | "sriovNumVfs": "2" | ||
1012 | }</programlisting><emphasis role="bold">Sample | ||
1013 | <filename>std_nic.json</filename> configuration | ||
1014 | file:</emphasis><programlisting>{ | ||
1015 | "name": "eno2", | ||
1016 | "type": "standard" | ||
1017 | }</programlisting></para> | ||
1018 | </section> | ||
1019 | |||
1020 | <section id="runpy_bind"> | ||
1021 | <title>Running the Python Module</title> | ||
1022 | |||
1023 | <para>The <literal>bindNetworkInterface</literal> Python module can be | ||
1024 | executed individually by running the following command line:</para> | ||
1025 | |||
1026 | <programlisting>$ python bindNetworkInterface.py -u admin -p admin -H localhost -f | ||
1027 | ../../lab_config/intelc3850-2/lan_nic.json -n intelc3850-2 | ||
1028 | 2019-03-07 18:03:29,365 - DEBUG: Started logging | ||
1029 | 2019-03-07 18:03:29,366 - INFO: Bind NIC | ||
1030 | 2019-03-07 18:03:29,406 - DEBUG: Login successful on host 'localhost' | ||
1031 | 2019-03-07 18:03:29,406 - DEBUG: Session token is: 8c719cb0-40f2-11e9-a81f525400d08e1d | ||
1032 | 2019-03-07 18:03:29,415 - DEBUG: Found device with name 'intelc3850-2' | ||
1033 | 2019-03-07 18:03:29,415 - DEBUG: Bind NIC '0000:01:00.1' | ||
1034 | 2019-03-07 18:03:30,030 - INFO: Done | ||
1035 | 2019-03-07 18:03:30,067 - DEBUG: Logging out and exiting...</programlisting> | ||
1036 | </section> | ||
1037 | </section> | ||
1038 | |||
1039 | <section id="unbind_ucpe_device"> | ||
1040 | <title>Unbinding a Network Interface</title> | ||
1041 | |||
1042 | <para>How to Unbind a physical network interface from a DPDK or SR-IOV | ||
1043 | is described below.</para> | ||
1044 | |||
1045 | <section id="script_opts_unbind"> | ||
1046 | <title>Script Options</title> | ||
1047 | |||
1048 | <programlisting>$ python unbindNetworkInterface.py -h | ||
1049 | Usage: unbindNetworkInterface.py [options] | ||
1050 | |||
1051 | Unbinds a physical interface to the DPDK or SR-IOV. | ||
1052 | |||
1053 | Options: | ||
1054 | --version show program's version number and exit | ||
1055 | -h, --help show this help message and exit | ||
1056 | -u USERNAME, --username=USERNAME | ||
1057 | Enea uCPE Manager login username | ||
1058 | -p PASSWORD, --password=PASSWORD | ||
1059 | Enea uCPE Manager login password | ||
1060 | -H HOST, --host=HOST Enea uCPE Manager host name or IP address | ||
1061 | -f NICFILE, --file=NICFILE | ||
1062 | File containing network interface Information in JSON | ||
1063 | format | ||
1064 | -n DEVICENAME, --device-name=DEVICENAME | ||
1065 | Name of the device | ||
1066 | |||
1067 | Mandatory options: | ||
1068 | -H/--host, -f/--file, -n/--device-name</programlisting> | ||
1069 | </section> | ||
1070 | |||
1071 | <section id="json_unbind"> | ||
1072 | <title>Configuring the JSON File</title> | ||
1073 | |||
1074 | <para>The JSON configuration file needed to unbind a network interface | ||
1075 | should contain a list of dictionaries. Each dictionary indicates the | ||
1076 | test case name and the test case arguments passed to the | ||
1077 | <filename>unbindNetworkInterface</filename> Python module.</para> | ||
1078 | |||
1079 | <para><emphasis role="bold">Sample unit-test JSON file | ||
1080 | format:</emphasis><programlisting>[ | ||
1081 | { | ||
1082 | "name": "Unbind lan NIC from DPDK", | ||
1083 | "args": "-f ../../lab_config/intelc3850-2/lan_nic.json" | ||
1084 | }, | ||
1085 | { | ||
1086 | name": "Unbind wan NIC from DPDK", | ||
1087 | "args": "-f ../../lab_config/intelc3850-2/wan_nic.json" | ||
1088 | } | ||
1089 | ]</programlisting></para> | ||
1090 | |||
1091 | <para><emphasis role="bold">Sample <filename>lan_nic.json</filename> | ||
1092 | configuration file:</emphasis></para> | ||
1093 | |||
1094 | <programlisting>{ | ||
1095 | "name": "enp4s0f0", | ||
1096 | "type": "dpdk" | ||
1097 | }</programlisting> | ||
1098 | |||
1099 | <para><emphasis role="bold">Sample <filename>wan_nic.json</filename> | ||
1100 | configuration file:</emphasis></para> | ||
1101 | |||
1102 | <programlisting>{ | ||
1103 | "name": "enp4s0f1", | ||
1104 | "type": "dpdk", | ||
1105 | } | ||
1106 | </programlisting> | ||
1107 | </section> | ||
1108 | |||
1109 | <section id="pymod_unbind"> | ||
1110 | <title>Running the Python Module</title> | ||
1111 | |||
1112 | <para>The <filename>unbindNetworkInterface</filename> Python module | ||
1113 | can be executed individually by running the following command | ||
1114 | line:</para> | ||
1115 | |||
1116 | <programlisting>$ python unbindNetworkInterface.py -u admin -p admin -H localhost -f | ||
1117 | ../../lab_config/intelc3850-2/lan_nic.json -n intelc3850-2 | ||
1118 | 2019-03-07 17:33:54,377 - DEBUG: Started logging | ||
1119 | 2019-03-07 17:33:54,378 - INFO: Unbind NIC | ||
1120 | 2019-03-07 17:33:54,431 - DEBUG: Login successful on host 'localhost' | ||
1121 | 2019-03-07 17:33:54,432 - DEBUG: Session token is: 6a77a1d1-40ee-11e9-a81f525400d08e1d | ||
1122 | 2019-03-07 17:33:54,467 - DEBUG: Found device with name 'intelc3850-2' | ||
1123 | 2019-03-07 17:33:54,468 - DEBUG: Unbind NIC '0000:01:00.1' | ||
1124 | 2019-03-07 17:33:55,616 - INFO: Done | ||
1125 | 2019-03-07 17:33:55,659 - DEBUG: Logging out and exiting...</programlisting> | ||
1126 | </section> | ||
1127 | </section> | ||
1128 | |||
1129 | <section id="get_network_interface"> | ||
1130 | <title>Getting a Network Interface</title> | ||
1131 | |||
1132 | <para>Details and steps on how to List the network interfaces for a | ||
1133 | device, are described below.</para> | ||
1134 | |||
1135 | <section id="script_opts_interface"> | ||
1136 | <title>Script Options</title> | ||
1137 | |||
1138 | <programlisting>$ python getNetworkInterfaces.py -h | ||
1139 | 2019-07-04 16:35:50,496 - DEBUG: Started logging | ||
1140 | 2019-07-04 16:35:50,496 - INFO: Dump NICs | ||
1141 | Usage: getNetworkInterfaces.py [options] | ||
1142 | |||
1143 | Options: | ||
1144 | --version show program's version number and exit | ||
1145 | -h, --help show this help message and exit | ||
1146 | -u USERNAME, --username=USERNAME Enea uCPE Manager login username | ||
1147 | -p PASSWORD, --password=PASSWORD Enea uCPE Manager login password | ||
1148 | -H HOST, --host=HOST Enea uCPE Manager host name or IP address | ||
1149 | -n DEVICENAME, --device-name=DEVICENAME Name of the uCPE to get network / | ||
1150 | interfaces from | ||
1151 | |||
1152 | Mandatory options: | ||
1153 | -H/--host, -n/--device-name</programlisting> | ||
1154 | </section> | ||
1155 | |||
1156 | <section id="runpy_net_interface"> | ||
1157 | <title>Running the Python Module</title> | ||
1158 | |||
1159 | <para>The <literal>getNetworkInterfaces</literal> Python module can be | ||
1160 | executed individually by running the following command:</para> | ||
1161 | |||
1162 | <programlisting>$ python getNetworkInterfaces.py -H localhost -n intelc3850-2 | ||
1163 | 2020-01-07 05:58:03,630 - DEBUG: Started logging | ||
1164 | 2020-01-07 05:58:03,630 - INFO: Dump NICs | ||
1165 | 2020-01-07 05:58:03,687 - DEBUG: Login successful on host '172.24.3.90' | ||
1166 | 2020-01-07 05:58:03,688 - DEBUG: Session token is: 93dd3cd0-313c-11ea-b0c7-525400b7889f | ||
1167 | 2020-01-07 05:58:03,715 - DEBUG: Found device with name 'intelc3850-2' | ||
1168 | 2020-01-07 05:58:03,717 - DEBUG: | ||
1169 | ----------------External Network Interfaces for intelc3850-2---------------- | ||
1170 | 2020-01-07 05:58:07,622 - DEBUG: eno4 DpdkTypes: [u'igb_uio', u'vfio-pci'] \ | ||
1171 | MacAddress: 0c:c4:7a:fb:85:dfsriov(7) | ||
1172 | 2020-01-07 05:58:07,624 - DEBUG: | ||
1173 | 2020-01-07 05:58:07,656 - DEBUG: | ||
1174 | ----------------Configured External Network Interfaces for intelc3850-2---------------- | ||
1175 | 2020-01-07 05:58:07,657 - DEBUG: eno3 DpdkType: vfio-pci ID: \ | ||
1176 | 47556b22-b5c2-4acb-b3cb-09b1f024b3a7 | ||
1177 | 2020-01-07 05:58:07,658 - DEBUG: enp1s0f1 DpdkType: vfio-pci ID: \ | ||
1178 | 2c06b4f7-6814-4432-8765-a9d0cd5303c1 | ||
1179 | 2020-01-07 05:58:07,659 - DEBUG: enp1s0f0 DpdkTypes: [u'igb_uio', u'vfio-pci'] \ | ||
1180 | MacAddress: ac:1f:6b:2d:ee:58sriov(63) | ||
1181 | 2020-01-07 05:58:07,660 - DEBUG: | ||
1182 | 2020-01-07 05:58:07,690 - DEBUG: | ||
1183 | ----------------Configured External Network Interfaces for intelc3850-2---------------- | ||
1184 | 2020-01-07 05:58:07,691 - DEBUG: eno3 DpdkType: vfio-pci ID: \ | ||
1185 | 47556b22-b5c2-4acb-b3cb-09b1f024b3a7 | ||
1186 | 2020-01-07 05:58:07,692 - DEBUG: enp1s0f1 DpdkType: vfio-pci ID: \ | ||
1187 | 2c06b4f7-6814-4432-8765-a9d0cd5303c1 | ||
1188 | 2020-01-07 05:58:07,693 - DEBUG: eno2 DpdkTypes: [u'igb_uio', u'vfio-pci'] \ | ||
1189 | MacAddress: 0c:c4:7a:fb:85:ddsriov(7) | ||
1190 | 2020-01-07 05:58:07,695 - DEBUG: | ||
1191 | 2020-01-07 05:58:07,724 - DEBUG: | ||
1192 | ----------------Configured External Network Interfaces for intelc3850-2---------------- | ||
1193 | 2020-01-07 05:58:07,725 - DEBUG: eno3 DpdkType: vfio-pci ID: \ | ||
1194 | 47556b22-b5c2-4acb-b3cb-09b1f024b3a7 | ||
1195 | 2020-01-07 05:58:07,726 - DEBUG: enp1s0f1 DpdkType: vfio-pci ID: \ | ||
1196 | 2c06b4f7-6814-4432-8765-a9d0cd5303c1 | ||
1197 | 2020-01-07 05:58:07,727 - DEBUG: eno1 DpdkTypes: [u'igb_uio', u'vfio-pci'] \ | ||
1198 | MacAddress: 0c:c4:7a:fb:85:dcsriov(7) | ||
1199 | 2020-01-07 05:58:07,728 - DEBUG: | ||
1200 | 2020-01-07 05:58:07,760 - DEBUG: | ||
1201 | ----------------Configured External Network Interfaces for intelc3850-2---------------- | ||
1202 | 2020-01-07 05:58:07,761 - DEBUG: eno3 DpdkType: vfio-pci ID: \ | ||
1203 | 47556b22-b5c2-4acb-b3cb-09b1f024b3a7 | ||
1204 | 2020-01-07 05:58:07,761 - DEBUG: enp1s0f1 DpdkType: vfio-pci ID: \ | ||
1205 | 2c06b4f7-6814-4432-8765-a9d0cd5303c1 | ||
1206 | 2020-01-07 05:58:07,762 - DEBUG: | ||
1207 | 2020-01-07 05:58:07,763 - INFO: Done | ||
1208 | 2020-01-07 05:58:07,787 - DEBUG: Logging out and exiting...</programlisting> | ||
1209 | </section> | ||
1210 | </section> | ||
1211 | |||
1212 | <section id="create_ovs_net_bridge"> | ||
1213 | <title>Creating an OVS Network Bridge</title> | ||
1214 | |||
1215 | <para>Instructions on how to Create an OVS Bridge on a device are | ||
1216 | detailed below.</para> | ||
1217 | |||
1218 | <section id="script_opts_creovs"> | ||
1219 | <title>Script Options</title> | ||
1220 | |||
1221 | <programlisting>$ python newNetworkBridge.py -h | ||
1222 | Usage: newNetworkBridge.py [options] | ||
1223 | |||
1224 | Create an OVS Bridge on a device. | ||
1225 | |||
1226 | Options: | ||
1227 | --version show program's version number and exit | ||
1228 | -h, --help show this help message and exit | ||
1229 | -u USERNAME, --username=USERNAME | ||
1230 | Enea uCPE Manager login username | ||
1231 | -p PASSWORD, --password=PASSWORD | ||
1232 | Enea uCPE Manager login password | ||
1233 | -H HOST, --host=HOST Enea uCPE Manager host name or IP address | ||
1234 | -f OVSFILE, --file=OVSFILE | ||
1235 | File containing OVS bridge Information in JSON format | ||
1236 | -n DEVICENAME, --device-name=DEVICENAME | ||
1237 | Name of the device | ||
1238 | -o STORENAME, --store-name=STORENAME | ||
1239 | Name of the store | ||
1240 | |||
1241 | Mandatory options: | ||
1242 | -H/--host, -f/--file, -n/--device-name or -o/--store-name</programlisting> | ||
1243 | </section> | ||
1244 | |||
1245 | <section id="json_creovs"> | ||
1246 | <title>Configuring the JSON File</title> | ||
1247 | |||
1248 | <para>The JSON configuration file needed to create a new network | ||
1249 | bridge should contain a list of dictionaries. Each dictionary | ||
1250 | indicates the test case name and the test case arguments passed to the | ||
1251 | <literal>newNetworkBridge</literal> Python module.</para> | ||
1252 | |||
1253 | <para><emphasis role="bold">Sample unit-test JSON file | ||
1254 | format:</emphasis></para> | ||
1255 | |||
1256 | <programlisting>[ | ||
1257 | { | ||
1258 | "name": "Creating network bridge LAN ", | ||
1259 | "args": "-f ../../lab_config/intelc3850-2/lan_br.json" | ||
1260 | }, | ||
1261 | { | ||
1262 | "name": "Creating network bridge WAN ", | ||
1263 | "args": "-f ../../lab_config/intelc3850-2/wan_br.json" | ||
1264 | } | ||
1265 | ]</programlisting> | ||
1266 | |||
1267 | <para><emphasis role="bold">Sample <filename>lan_br.json</filename> | ||
1268 | configuration file:</emphasis></para> | ||
1269 | |||
1270 | <programlisting>{ | ||
1271 | "name": "lan_br", | ||
1272 | "interfaces": ["enp4s0f0"] | ||
1273 | }</programlisting> | ||
1274 | |||
1275 | <para><emphasis role="bold">Sample <filename>wan_br.json</filename> | ||
1276 | configuration file:</emphasis></para> | ||
1277 | |||
1278 | <programlisting>{ | ||
1279 | "name": "wan_br", | ||
1280 | "interfaces": ["enp4s0f1"] | ||
1281 | }</programlisting> | ||
1282 | </section> | ||
1283 | |||
1284 | <section id="pymod_creovs"> | ||
1285 | <title>Running the Python Module</title> | ||
1286 | |||
1287 | <para>The <filename>newNetworkBridge</filename> Python module can be | ||
1288 | executed individually by running the following command line:</para> | ||
1289 | |||
1290 | <programlisting>$ python newNetworkBridge.py -u admin -p admin -H localhost -f | ||
1291 | ../../lab_config/intelc3850-2/lan_br.json -n intelc3850-2 | ||
1292 | 2019-03-07 18:03:30,767 - DEBUG: Started logging | ||
1293 | 2019-03-07 18:03:30,768 - INFO: New OVS network bridge | ||
1294 | 2019-03-07 18:03:30,801 - DEBUG: Login successful on host 'localhost' | ||
1295 | 2019-03-07 18:03:30,801 - DEBUG: Session token is: 8d454061-40f2-11e9-a81f525400d08e1d | ||
1296 | 2019-03-07 18:03:30,811 - DEBUG: Found device with name 'intelc3850-2' | ||
1297 | 2019-03-07 18:03:30,812 - DEBUG: Create new OVS network bridge 'lan_br' | ||
1298 | 2019-03-07 18:03:37,358 - INFO: Done | ||
1299 | 2019-03-07 18:03:37,402 - DEBUG: Logging out and exiting...</programlisting> | ||
1300 | </section> | ||
1301 | </section> | ||
1302 | |||
1303 | <section id="delete_ovs_net_bridge"> | ||
1304 | <title>Deleting an OVS Network Bridge</title> | ||
1305 | |||
1306 | <para>How to Delete an OVS Bridge from a device is detailed in the | ||
1307 | following.</para> | ||
1308 | |||
1309 | <section id="script_opts_delovs"> | ||
1310 | <title>Script Options</title> | ||
1311 | |||
1312 | <programlisting>$ python delNetworkBridge.py -h | ||
1313 | Usage: delNetworkBridge.py [options] | ||
1314 | |||
1315 | Delete an OVS Bridge from a device. | ||
1316 | |||
1317 | Options: | ||
1318 | --version show program's version number and exit | ||
1319 | -h, --help show this help message and exit | ||
1320 | -u USERNAME, --username=USERNAME | ||
1321 | Enea uCPE Manager login username | ||
1322 | -p PASSWORD, --password=PASSWORD | ||
1323 | Enea uCPE Manager login password | ||
1324 | -H HOST, --host=HOST Enea uCPE Manager host name or IP address | ||
1325 | -f OVSFILE, --file=OVSFILE | ||
1326 | File containing OVS bridge Information in JSON format | ||
1327 | -n DEVICENAME, --device-name=DEVICENAME | ||
1328 | Name of the device | ||
1329 | -o STORENAME, --store-name=STORENAME | ||
1330 | Name of the store | ||
1331 | |||
1332 | Mandatory options: | ||
1333 | -H/--host, -f/--file, -n/--device-name or -o/--store-name</programlisting> | ||
1334 | </section> | ||
1335 | |||
1336 | <section id="json_delovs"> | ||
1337 | <title>Configuring the JSON File</title> | ||
1338 | |||
1339 | <para>The JSON configuration file needed to delete a network bridge | ||
1340 | should contain a list of dictionaries. Each dictionary indicates the | ||
1341 | test case name and the test case arguments passed to the | ||
1342 | <filename>delNetworkBridge</filename> Python module.</para> | ||
1343 | |||
1344 | <para><emphasis role="bold">Sample unit-test JSON file | ||
1345 | format:</emphasis></para> | ||
1346 | |||
1347 | <programlisting>[ | ||
1348 | { | ||
1349 | "name": "Deleting network bridge LAN ", | ||
1350 | "args": "-f ../../lab_config/intelc3850-2/lan_br.json" | ||
1351 | }, | ||
1352 | { | ||
1353 | "name": "Deleting network bridge WAN ", | ||
1354 | "args": "-f ../../lab_config/intelc3850-2/wan_br.json" | ||
1355 | } | ||
1356 | ]</programlisting> | ||
1357 | |||
1358 | <para><emphasis role="bold">Sample <filename>lan_br.json</filename> | ||
1359 | configuration file:</emphasis></para> | ||
1360 | |||
1361 | <programlisting>{ | ||
1362 | "name" : "lan_br" | ||
1363 | }</programlisting> | ||
1364 | |||
1365 | <para><emphasis role="bold">Sample <filename>wan_br.json</filename> | ||
1366 | configuration file:</emphasis></para> | ||
1367 | |||
1368 | <programlisting>{ | ||
1369 | "name" : "wan_br" | ||
1370 | }</programlisting> | ||
1371 | </section> | ||
1372 | |||
1373 | <section id="pymod_delovs"> | ||
1374 | <title>Running the Python Module</title> | ||
1375 | |||
1376 | <para>The <filename>delNetworkBridge</filename> Python module can be | ||
1377 | executed individually by running the following command line:</para> | ||
1378 | |||
1379 | <programlisting>$ python delNetworkBridge.py -u admin -p admin -H localhost -f | ||
1380 | ../../lab_config/intelc3850-2/lan_br.json -n intelc3850-2 | ||
1381 | 2019-03-07 17:33:51,712 - DEBUG: Started logging | ||
1382 | 2019-03-07 17:33:51,713 - INFO: Delete OVS network bridge | ||
1383 | 2019-03-07 17:33:51,751 - DEBUG: Login successful on host 'localhost' | ||
1384 | 2019-03-07 17:33:51,752 - DEBUG: Session token is: 68e08711-40ee-11e9-a81f525400d08e1d | ||
1385 | 2019-03-07 17:33:51,768 - DEBUG: Found device with name 'intelc3850-2' | ||
1386 | 2019-03-07 17:33:51,768 - DEBUG: Delete OVS network bridge 'lan_br' | ||
1387 | 2019-03-07 17:33:52,839 - INFO: Done | ||
1388 | 2019-03-07 17:33:52,872 - DEBUG: Logging out and exiting...</programlisting> | ||
1389 | </section> | ||
1390 | </section> | ||
1391 | |||
1392 | <section id="onboard_vnf_image"> | ||
1393 | <title>Onboarding a VNF Image Raw</title> | ||
1394 | |||
1395 | <para>How to Onboard a VNF image in the Enea Edge Management application | ||
1396 | based upon its raw constituents, is detailed in depth below.</para> | ||
1397 | |||
1398 | <section id="script_opts_image"> | ||
1399 | <title>Script Options</title> | ||
1400 | |||
1401 | <programlisting>$ python onboardVNFRaw.py -h | ||
1402 | Usage: onboardVNFRaw.py [options] | ||
1403 | |||
1404 | Onboard a VNF in Enea uCPE Manager based upon its raw constituents. | ||
1405 | |||
1406 | Options: | ||
1407 | --version show program's version number and exit | ||
1408 | -h, --help show this help message and exit | ||
1409 | -u USERNAME, --username=USERNAME | ||
1410 | Enea uCPE Manager login username | ||
1411 | -p PASSWORD, --password=PASSWORD | ||
1412 | Enea uCPE Manager login password | ||
1413 | -H HOST, --host=HOST Enea uCPE Manager host name or IP address | ||
1414 | -f FTPUSERNAME, --ftpUsername=FTPUSERNAME | ||
1415 | Username for FTP | ||
1416 | -w FTPPASSWORD, --ftpPassword=FTPPASSWORD | ||
1417 | FTP password | ||
1418 | -P FTPPORT, --ftpPort=FTPPORT | ||
1419 | FTP port | ||
1420 | -i IMAGEPATH, --imagePath=IMAGEPATH | ||
1421 | VNF image path | ||
1422 | -b IMAGEINFO, --imageInfo=IMAGEINFO | ||
1423 | File name of VNF image information in JSON format | ||
1424 | |||
1425 | Mandatory options: | ||
1426 | -H/--host, -b/--imageInfo, -i/--imagePath</programlisting> | ||
1427 | </section> | ||
1428 | |||
1429 | <section id="json_image"> | ||
1430 | <title>Configuring the JSON File</title> | ||
1431 | |||
1432 | <para>The JSON configuration file needed to onboard a VNF image Raw | ||
1433 | should contain a list of dictionaries. Each dictionary indicates the | ||
1434 | test case name and the test case arguments passed to the | ||
1435 | <filename>onboardVNFRaw</filename> Python module.</para> | ||
1436 | |||
1437 | <para><emphasis role="bold">Sample unit-test JSON file | ||
1438 | format:</emphasis></para> | ||
1439 | |||
1440 | <programlisting>[ | ||
1441 | { | ||
1442 | "name": "Onboarding Fortigate VNF (wizard API)", | ||
1443 | "args": "-b ../../vnf_config/fortigateImage/fortigateImage.json -i | ||
1444 | ../../vnf_images/fortios.qcow2" | ||
1445 | } | ||
1446 | ]</programlisting> | ||
1447 | |||
1448 | <para><emphasis role="bold">Sample | ||
1449 | <filename>fortigateImage.json</filename> configuration | ||
1450 | file:</emphasis><programlisting>{ | ||
1451 | "name" : "fortigateImage", | ||
1452 | "version" : "1.0", | ||
1453 | "description" : "Fortigate VNF Image", | ||
1454 | "provider" : "Fortinet, Inc", | ||
1455 | "numVcpus" : 1, | ||
1456 | "imageFormat" : "QCOW2", | ||
1457 | "memoryInMb" : 1024, | ||
1458 | "storageInGb" : 20, | ||
1459 | "image" : "fortios.qcow2", | ||
1460 | "interfaces" : [ | ||
1461 | { | ||
1462 | "name" : "external", | ||
1463 | "type" : "PhysicalPort", | ||
1464 | "description" : "External interface" | ||
1465 | }, | ||
1466 | { | ||
1467 | "name" : "in", | ||
1468 | "type" : "PhysicalPort", | ||
1469 | "description" : "Incoming interface" | ||
1470 | }, | ||
1471 | { | ||
1472 | "name" : "out", | ||
1473 | "type" : "PhysicalPort", | ||
1474 | "description" : "Outgoing interface" | ||
1475 | } | ||
1476 | ], | ||
1477 | "cloudInitDataSource" : "ConfigDrive", | ||
1478 | "cloudInitDriveType" : "cdrom", | ||
1479 | "cloudInitContentParams" : [ | ||
1480 | { | ||
1481 | "path" : "License", | ||
1482 | "description" : "Operational license" | ||
1483 | } | ||
1484 | ] | ||
1485 | }</programlisting></para> | ||
1486 | </section> | ||
1487 | |||
1488 | <section id="pymod_image"> | ||
1489 | <title>Running the Python Module</title> | ||
1490 | |||
1491 | <para>The <filename>onboardVNFRaw</filename> Python module can be | ||
1492 | executed individually by running the following command line:</para> | ||
1493 | |||
1494 | <programlisting>$ python onboardVNFRaw.py -u admin -p admin -f ftp -w ftp -H localhost -b b | ||
1495 | ../../vnf_config/fortigateImage/fortigateImage.json -i | ||
1496 | ../../vnf_images/fortios.qcow2 | ||
1497 | 2019-03-07 18:03:37,791 - DEBUG: Started logging | ||
1498 | 2019-03-07 18:03:37,792 - INFO: Onboard wizard | ||
1499 | 2019-03-07 18:03:37,859 - DEBUG: Login successful on host 'localhost' | ||
1500 | 2019-03-07 18:03:37,859 - DEBUG: Session token is: 91770330-40f2-11e9-a81f525400d08e1d | ||
1501 | 2019-03-07 18:03:37,860 - DEBUG: FTP file '../../vnf_images/fortios.qcow2' on host | ||
1502 | 'localhost', port '2021' | ||
1503 | 2019-03-07 18:03:38,027 - DEBUG: Onboard VNF raw: fortios.qcow2 | ||
1504 | 2019-03-07 18:03:41,701 - INFO: Done | ||
1505 | 2019-03-07 18:03:41,748 - DEBUG: Logging out and exiting...</programlisting> | ||
1506 | </section> | ||
1507 | </section> | ||
1508 | |||
1509 | <section id="offboard_vnf"> | ||
1510 | <title>Offboarding a VNF</title> | ||
1511 | |||
1512 | <para>Steps on how to Offboard a VNF from the Enea Edge Management | ||
1513 | application are detailed below.</para> | ||
1514 | |||
1515 | <section id="script_opts_offimage"> | ||
1516 | <title>Script Options</title> | ||
1517 | |||
1518 | <programlisting>$ python offboardVNF.py -h | ||
1519 | Usage: offboardVNF.py [options] | ||
1520 | |||
1521 | Offboard a VNF from Enea uCPE Manager. | ||
1522 | |||
1523 | Options: | ||
1524 | --version show program's version number and exit | ||
1525 | -h, --help show this help message and exit | ||
1526 | -u USERNAME, --username=USERNAME | ||
1527 | Enea uCPE Manager login username | ||
1528 | -p PASSWORD, --password=PASSWORD | ||
1529 | Enea uCPE Manager login password | ||
1530 | -H HOST, --host=HOST Enea uCPE Manager host name or IP address | ||
1531 | -n VNFDNAME, --vnfdName=VNFDNAME | ||
1532 | Name of VNF descriptor to offboard | ||
1533 | |||
1534 | Mandatory options: | ||
1535 | -H/--host, -n/--vnfdName</programlisting> | ||
1536 | </section> | ||
1537 | |||
1538 | <section id="json_offimage"> | ||
1539 | <title>Configuring the JSON File</title> | ||
1540 | |||
1541 | <para>The JSON configuration file needed to offboard a VNF should | ||
1542 | contain a list of dictionaries. Each dictionary indicates the test | ||
1543 | case name and the test case arguments passed to the | ||
1544 | <filename>offboardVNF</filename> Python module.</para> | ||
1545 | |||
1546 | <para><emphasis role="bold">Sample unit-test JSON file | ||
1547 | format:</emphasis></para> | ||
1548 | |||
1549 | <programlisting>[ | ||
1550 | { | ||
1551 | "name": "Offboarding Fortigate VNF ", | ||
1552 | "args": "-n fortigateImage" | ||
1553 | } | ||
1554 | ]</programlisting> | ||
1555 | </section> | ||
1556 | |||
1557 | <section id="pymod_offimage"> | ||
1558 | <title>Running the Python Module</title> | ||
1559 | |||
1560 | <para>The <filename>offboardVNF</filename> Python module can be | ||
1561 | executed individually by running the following command line:</para> | ||
1562 | |||
1563 | <programlisting>$ python offboardVNF.py -u admin -p admin -H localhost -n fortigateImage | ||
1564 | 2019-03-07 17:33:56,523 - DEBUG: Started logging | ||
1565 | 2019-03-07 17:33:56,524 - INFO: Offboard VNF | ||
1566 | 2019-03-07 17:33:56,557 - DEBUG: Login successful on host 'localhost' | ||
1567 | 2019-03-07 17:33:56,557 - DEBUG: Session token is: 6bbe2b90-40ee-11e9-a81f525400d08e1d | ||
1568 | 2019-03-07 17:33:56,682 - DEBUG: Found VNF descriptor with name 'fortigateImage' | ||
1569 | 2019-03-07 17:33:56,683 - DEBUG: Offboard VNF: fortigateImage | ||
1570 | 2019-03-07 17:33:56,811 - INFO: Done | ||
1571 | 2019-03-07 17:33:56,834 - DEBUG: Logging out and exiting...</programlisting> | ||
1572 | </section> | ||
1573 | </section> | ||
1574 | |||
1575 | <section id="instantiate_vnf"> | ||
1576 | <title>Instantiating a VNF</title> | ||
1577 | |||
1578 | <para>Instantiating a VNF via the Enea Edge Management application is | ||
1579 | detailed below.</para> | ||
1580 | |||
1581 | <section id="script_opts_inst"> | ||
1582 | <title>Script Options</title> | ||
1583 | |||
1584 | <programlisting>$ python instantiateVNFI.py -h | ||
1585 | Usage: instantiateVNFI.py [options] | ||
1586 | |||
1587 | Instantiate a VNF via Enea uCPE Manager. | ||
1588 | |||
1589 | Options: | ||
1590 | --version show program's version number and exit | ||
1591 | -h, --help show this help message and exit | ||
1592 | -u USERNAME, --username=USERNAME | ||
1593 | Enea uCPE Manager login username | ||
1594 | -p PASSWORD, --password=PASSWORD | ||
1595 | Enea uCPE Manager login password | ||
1596 | -H HOST, --host=HOST Enea uCPE Manager host name or IP address | ||
1597 | -t VNFTYPE, --vnfType=VNFTYPE | ||
1598 | VNF Type (Name of VNF descriptor) | ||
1599 | -n VIMDEVICENAME, --device-name=VIMDEVICENAME | ||
1600 | Name of the device | ||
1601 | -f PROPSFILE, --file=PROPSFILE | ||
1602 | File containing VNF instance properties in JSON format | ||
1603 | |||
1604 | Mandatory options: | ||
1605 | -H/--host, -t/--vnfType, -n/--device-name, -f/--file</programlisting> | ||
1606 | </section> | ||
1607 | |||
1608 | <section id="json_inst"> | ||
1609 | <title>Configuring the JSON File</title> | ||
1610 | |||
1611 | <para>The JSON configuration file needed to instantiate a VNF should | ||
1612 | contain a list of dictionaries. Each dictionary indicates the test | ||
1613 | case name and the test case arguments passed to the | ||
1614 | <filename>instantiateVNFI</filename> Python module.</para> | ||
1615 | |||
1616 | <para><emphasis role="bold">Sample unit-test JSON file | ||
1617 | format:</emphasis></para> | ||
1618 | |||
1619 | <programlisting>[ | ||
1620 | { | ||
1621 | "name": "Instantiate Fortigate VNF ", | ||
1622 | "args": "-t fortigateImage -f | ||
1623 | ../../vnf_config/fortigateImage/fortigateFWInstance.json" | ||
1624 | } | ||
1625 | ]</programlisting> | ||
1626 | |||
1627 | <para>The VNF instance JSON configuration file is specific to each | ||
1628 | VNF.</para> | ||
1629 | </section> | ||
1630 | |||
1631 | <section id="pymod_inst"> | ||
1632 | <title>Running the Python Module</title> | ||
1633 | |||
1634 | <para>The <filename>instantiateVNFI</filename> Python module can be | ||
1635 | executed individually by running the following command line:</para> | ||
1636 | |||
1637 | <programlisting>$ python instantiateVNFI.py -u admin -p admin -H localhost -n intelc3850-2 -t | ||
1638 | fortigateImage -f ../../vnf_config/fortigateImage/fortigateFWInstance.json | ||
1639 | 2019-03-07 18:03:41,777 - DEBUG: Started logging | ||
1640 | 2019-03-07 18:03:41,778 - INFO: Instantiate VNF | ||
1641 | 2019-03-07 18:03:41,813 - DEBUG: Login successful on host 'localhost' | ||
1642 | 2019-03-07 18:03:41,815 - DEBUG: Session token is: 93d69e10-40f2-11e9-a81f525400d08e1d | ||
1643 | 2019-03-07 18:03:41,834 - DEBUG: Found device with name 'intelc3850-2' | ||
1644 | 2019-03-07 18:03:41,878 - DEBUG: Found VNF descriptor with name 'fortigateImage' | ||
1645 | 2019-03-07 18:03:41,888 - DEBUG: Encrypt string content: | ||
1646 | cloudInit("vnf_config/fortigateImage/fortigateFW.conf") | ||
1647 | 2019-03-07 18:03:41,889 - DEBUG: Encrypt string content: | ||
1648 | License("vnf_config/fortigateImage/fortigateLicense.lic") | ||
1649 | 2019-03-07 18:03:41,889 - DEBUG: Instantiate fortigateImage VNF on 'intelc3850-2' | ||
1650 | 2019-03-07 18:03:49,887 - INFO: Done | ||
1651 | 2019-03-07 18:03:49,921 - DEBUG: Logging out and exiting...</programlisting> | ||
1652 | </section> | ||
1653 | </section> | ||
1654 | |||
1655 | <section id="control_vnf_inst"> | ||
1656 | <title>Controlling a VNF Instance</title> | ||
1657 | |||
1658 | <para>How to Control a VNF instance from the Enea Edge Management | ||
1659 | application is detailed below.</para> | ||
1660 | |||
1661 | <note> | ||
1662 | <para>If a sequence of commands aiming to change the state of the VNF | ||
1663 | (start/stop/suspend/shutdown) is issued rapidly, certain VNFs might | ||
1664 | become unresponsive. Depending on the actual VNF, the time required | ||
1665 | between life-cycle operations may vary from several seconds to half a | ||
1666 | minute or even more. If a VNF becomes unresponsive, the only possible | ||
1667 | action is to "Force Delete" the instance from the Enea Edge Management | ||
1668 | application.</para> | ||
1669 | </note> | ||
1670 | |||
1671 | <section id="script_opts_control"> | ||
1672 | <title>Script Options</title> | ||
1673 | |||
1674 | <programlisting>$ python controlVNFI.py -h | ||
1675 | Usage: controlVNFI.py [options] | ||
1676 | |||
1677 | Controls a VNF instance from Enea uCPE Manager. | ||
1678 | |||
1679 | Options: | ||
1680 | --version show program's version number and exit | ||
1681 | -h, --help show this help message and exit | ||
1682 | -u USERNAME, --username=USERNAME | ||
1683 | Enea uCPE Manager login username | ||
1684 | -p PASSWORD, --password=PASSWORD | ||
1685 | Enea uCPE Manager login password | ||
1686 | -H HOST, --host=HOST Enea uCPE Manager host name or IP address | ||
1687 | -i VNFINSTANCENAME, --vnfInstanceName=VNFINSTANCENAME | ||
1688 | Name of VNF instance | ||
1689 | -n VIMDEVICENAME, --device-name=VIMDEVICENAME | ||
1690 | Name of the device | ||
1691 | -c COMMAND, --command=COMMAND | ||
1692 | Control command (stop, start, pause or resume) | ||
1693 | |||
1694 | Mandatory options: | ||
1695 | -H/--host, -i/--vnfInstanceName, -n/--device-name, -c/--command</programlisting> | ||
1696 | </section> | ||
1697 | |||
1698 | <section id="json_control"> | ||
1699 | <title>Configuring the JSON File</title> | ||
1700 | |||
1701 | <para>The JSON configuration file needed to control a VNF instance | ||
1702 | should contain a list of dictionaries. Each dictionary indicates the | ||
1703 | test case name and the test case arguments passed to the | ||
1704 | <filename>controlVNFI</filename> Python module.</para> | ||
1705 | |||
1706 | <para><emphasis role="bold">Sample unit-test JSON file | ||
1707 | format:</emphasis></para> | ||
1708 | |||
1709 | <programlisting>[ | ||
1710 | { | ||
1711 | "name": "Pause Fortigate VNF instance", | ||
1712 | "args": "-i fortigateFWInstance -c pause" | ||
1713 | }, | ||
1714 | { | ||
1715 | "name": "Resume Fortigate VNF instance", | ||
1716 | "args": "-i fortigateFWInstance -c resume" | ||
1717 | }, | ||
1718 | { | ||
1719 | "name": "Stop Fortigate VNF instance ", | ||
1720 | "args": "-i fortigateFWInstance -c stop" | ||
1721 | }, | ||
1722 | { | ||
1723 | "name": "Start Fortigate VNF instance", | ||
1724 | "args": "-i fortigateFWInstance -c start" | ||
1725 | } | ||
1726 | ]</programlisting> | ||
1727 | </section> | ||
1728 | |||
1729 | <section id="pymod_control"> | ||
1730 | <title>Running the Python Module</title> | ||
1731 | |||
1732 | <para>The <filename>controlVNFI</filename> Python module can be | ||
1733 | executed individually by running the following command line:</para> | ||
1734 | |||
1735 | <programlisting>$ python controlVNFI.py -u admin -p admin -H localhost -n intelc3850-2 -i | ||
1736 | fortigateFWInstance -c stop | ||
1737 | 2019-03-07 18:03:51,991 - DEBUG: Started logging | ||
1738 | 2019-03-07 18:03:51,992 - INFO: Control VNF | ||
1739 | 2019-03-07 18:03:52,031 - DEBUG: Login successful on host 'localhost' | ||
1740 | 2019-03-07 18:03:52,031 - DEBUG: Session token is: 99ed9ba3-40f2-11e9-a81f525400d08e1d | ||
1741 | 2019-03-07 18:03:52,046 - DEBUG: Found device with name 'intelc3850-2' | ||
1742 | 2019-03-07 18:03:52,073 - DEBUG: Found VNF instance with name 'fortigateFWInstance' | ||
1743 | 2019-03-07 18:03:52,073 - DEBUG: Control VNF instance 'intelc3850-2', command: stop | ||
1744 | 2019-03-07 18:03:53,011 - INFO: Done | ||
1745 | 2019-03-07 18:03:53,047 - DEBUG: Logging out and exiting...</programlisting> | ||
1746 | </section> | ||
1747 | </section> | ||
1748 | |||
1749 | <section id="destroy_vnf_inst"> | ||
1750 | <title>Destroying a VNF Instance</title> | ||
1751 | |||
1752 | <para>Steps and options on how to Destroy a VNF instance from the Enea | ||
1753 | Edge Management are described below.</para> | ||
1754 | |||
1755 | <section id="script_opts_destroy"> | ||
1756 | <title>Script Options</title> | ||
1757 | |||
1758 | <programlisting>$ python destroyVNFI.py -h | ||
1759 | Usage: destroyVNFI.py [options] | ||
1760 | |||
1761 | Destroys a VNF instance from Enea uCPE Manager. | ||
1762 | |||
1763 | Options: | ||
1764 | --version show program's version number and exit | ||
1765 | -h, --help show this help message and exit | ||
1766 | -u USERNAME, --username=USERNAME | ||
1767 | Enea uCPE Manager login username | ||
1768 | -p PASSWORD, --password=PASSWORD | ||
1769 | Enea uCPE Manager login password | ||
1770 | -H HOST, --host=HOST Enea uCPE Manager host name or IP address | ||
1771 | -i VNFINSTANCENAME, --vnfInstanceName=VNFINSTANCENAME | ||
1772 | Name of VNF instance | ||
1773 | -n VIMDEVICENAME, --device-name=VIMDEVICENAME | ||
1774 | Name of the device | ||
1775 | |||
1776 | Mandatory options: | ||
1777 | -H/--host, -i/--vnfInstanceName, -n/--device-name</programlisting> | ||
1778 | </section> | ||
1779 | |||
1780 | <section id="json_destroy"> | ||
1781 | <title>Configuring the JSON File</title> | ||
1782 | |||
1783 | <para>The JSON configuration file needed to destroy a VNF instance | ||
1784 | should contain a list of dictionaries. Each dictionary indicates the | ||
1785 | test case name and the test case arguments passed to the | ||
1786 | <filename>destroyVNFI</filename> Python module.</para> | ||
1787 | |||
1788 | <para><emphasis role="bold">Sample unit-test JSON file | ||
1789 | format:</emphasis><programlisting>[ | ||
1790 | { | ||
1791 | "name": "Destroying Fortigate VNF ", | ||
1792 | "args": "-i fortigateFWInstance" | ||
1793 | } | ||
1794 | ]</programlisting></para> | ||
1795 | </section> | ||
1796 | |||
1797 | <section id="pymod_destory"> | ||
1798 | <title>Running the Python Module</title> | ||
1799 | |||
1800 | <para>The <filename>destroyVNFI</filename> Python module can be | ||
1801 | executed individually by running the following command line:</para> | ||
1802 | |||
1803 | <programlisting>$ python destroyVNFI.py -u admin -p admin -H localhost -n intelc3850-2 -i | ||
1804 | fortigateFWInstance | ||
1805 | 2019-03-07 17:33:51,025 - DEBUG: Started logging | ||
1806 | 2019-03-07 17:33:51,026 - INFO: Destroy VNF | ||
1807 | 2019-03-07 17:33:51,119 - DEBUG: Login successful on host 'localhost' | ||
1808 | 2019-03-07 17:33:51,119 - DEBUG: Session token is: 68803ea5-40ee-11e9-a81f525400d08e1d | ||
1809 | 2019-03-07 17:33:51,128 - DEBUG: Found device with name 'intelc3850-2' | ||
1810 | 2019-03-07 17:33:51,148 - DEBUG: Found VNF instance with name 'fortigateFWInstance' | ||
1811 | 2019-03-07 17:33:51,149 - DEBUG: Destroy VNF: fortigateFWInstance | ||
1812 | 2019-03-07 17:33:51,655 - INFO: Done | ||
1813 | 2019-03-07 17:33:51,712 - DEBUG: Logging out and exiting...</programlisting> | ||
1814 | </section> | ||
1815 | </section> | ||
1816 | |||
1817 | <section id="upload_vnf_image"> | ||
1818 | <title>Uploading an Enea Edge image onto the Enea Edge Management | ||
1819 | application</title> | ||
1820 | |||
1821 | <para>Steps and options on how to Upload an Enea Edge image onto the | ||
1822 | Enea Edge Management application are described below.</para> | ||
1823 | |||
1824 | <section id="script_opts_upload"> | ||
1825 | <title>Script Options</title> | ||
1826 | |||
1827 | <programlisting>$ python uploadImage.py -h | ||
1828 | Upload NFVA image on uCPE Manager | ||
1829 | Usage: uploadImage.py [options] | ||
1830 | |||
1831 | Upload NFVA image on uCPE Manager. | ||
1832 | |||
1833 | Options: | ||
1834 | --version show program's version number and exit | ||
1835 | -h, --help show this help message and exit | ||
1836 | -u USERNAME, --username=USERNAME | ||
1837 | Enea uCPE Manager login username | ||
1838 | -p PASSWORD, --password=PASSWORD | ||
1839 | Enea uCPE Manager login password | ||
1840 | -H HOST, --host=HOST Enea uCPE Manager host name or IP address | ||
1841 | -f FILENAME, --fileName=FILENAME | ||
1842 | Path to NFVA image file name | ||
1843 | -m MODULE, --module=MODULE | ||
1844 | Module name (default is: VcpeAgent) | ||
1845 | -t UPGRADETYPE, --upgradeType=UPGRADETYPE | ||
1846 | Upgrade Type depends on architecture: xeon_d or | ||
1847 | atom_c3000 | ||
1848 | |||
1849 | Mandatory options: | ||
1850 | -H/--host, -f/--fileName, -m/--module, -t/--upgradeType</programlisting> | ||
1851 | </section> | ||
1852 | |||
1853 | <section id="json_upload"> | ||
1854 | <title>Configuring the JSON File</title> | ||
1855 | |||
1856 | <para>The JSON configuration file needed to upload an Enea Edge image | ||
1857 | should contain a list of dictionaries. Each dictionary indicates the | ||
1858 | test case name and the test case arguments passed to the | ||
1859 | <filename>uploadImage</filename> Python module.</para> | ||
1860 | |||
1861 | <para><emphasis role="bold">Sample unit-test JSON file | ||
1862 | format:</emphasis><programlisting>[ | ||
1863 | { | ||
1864 | "name": "Upload NFVA image on uCPE Manager", | ||
1865 | "args": "-f /tmp/enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2 -t xeon_d" | ||
1866 | } | ||
1867 | ]</programlisting></para> | ||
1868 | </section> | ||
1869 | |||
1870 | <section id="pymod_upload"> | ||
1871 | <title>Running the Python Module</title> | ||
1872 | |||
1873 | <para>The <filename>uploadImage</filename> Python module can be | ||
1874 | executed individually by running the following command line:</para> | ||
1875 | |||
1876 | <programlisting>$ python uploadImage.py -u admin -p admin -H localhost \ | ||
1877 | -f /tmp/enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2 -t xeon_d | ||
1878 | 2020-02-28 11:38:42,754 - DEBUG: Started logging | ||
1879 | 2020-02-28 11:38:42,755 - INFO: Upload NFVA image on uCPE Manager | ||
1880 | 2020-02-28 11:38:43,307 - DEBUG: Login successful on host 'localhost' | ||
1881 | 2020-02-28 11:38:43,308 - DEBUG: Session token is: 7da3f960-5a16-11ea-a3de-5652b3ac1c30 | ||
1882 | 2020-02-28 11:41:29,148 - INFO: Verify image validation flag | ||
1883 | 2020-02-28 11:41:29,149 - INFO: Valid flag: True | ||
1884 | 2020-02-28 11:41:29,344 - INFO: The image \ | ||
1885 | 'enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2' was successfully uploaded | ||
1886 | 2020-02-28 11:41:29,344 - INFO: Done | ||
1887 | 2020-02-28 11:41:29,388 - DEBUG: Logging out and exiting...</programlisting> | ||
1888 | </section> | ||
1889 | </section> | ||
1890 | |||
1891 | <section id="delete_vnf_image"> | ||
1892 | <title>Deleting an Enea Edge image file from the Enea Edge Management | ||
1893 | application</title> | ||
1894 | |||
1895 | <para>Steps and options on how to Delete an Enea Edge image from the | ||
1896 | Enea Edge Management application are described below.</para> | ||
1897 | |||
1898 | <section id="script_opts_deleteupload"> | ||
1899 | <title>Script Options</title> | ||
1900 | |||
1901 | <programlisting>$ python deleteUpgradeFile.py -h | ||
1902 | Delete NFVA image from uCPE Manager | ||
1903 | Usage: deleteUpgradeFile.py [options] | ||
1904 | |||
1905 | Delete NFVA image from uCPE Manager. | ||
1906 | |||
1907 | Options: | ||
1908 | --version show program's version number and exit | ||
1909 | -h, --help show this help message and exit | ||
1910 | -u USERNAME, --username=USERNAME | ||
1911 | Enea uCPE Manager login username | ||
1912 | -p PASSWORD, --password=PASSWORD | ||
1913 | Enea uCPE Manager login password | ||
1914 | -H HOST, --host=HOST Enea uCPE Manager host name or IP address | ||
1915 | -i IMAGENAME, --imageName=IMAGENAME | ||
1916 | NFVA Image name | ||
1917 | -m MODULE, --module=MODULE | ||
1918 | Module name - default is VcpeAgent | ||
1919 | |||
1920 | Mandatory options: | ||
1921 | -H/--host, -i/--imageName, -m/--module.</programlisting> | ||
1922 | </section> | ||
1923 | |||
1924 | <section id="json_delete_upload"> | ||
1925 | <title>Configuring the JSON File</title> | ||
1926 | |||
1927 | <para>The JSON configuration file needed to delete an Enea Edge image | ||
1928 | should contain a list of dictionaries. Each dictionary indicates the | ||
1929 | test case name and the test case arguments passed to the | ||
1930 | <filename>deleteUpgradeFile</filename> Python module.</para> | ||
1931 | |||
1932 | <para><emphasis role="bold">Sample unit-test JSON file | ||
1933 | format:</emphasis><programlisting>[ | ||
1934 | { | ||
1935 | "name": "Delete NFVA image on uCPE Manager", | ||
1936 | "args": "-i enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2" | ||
1937 | } | ||
1938 | ]</programlisting></para> | ||
1939 | </section> | ||
1940 | |||
1941 | <section id="pymod_delete_upload"> | ||
1942 | <title>Running the Python Module</title> | ||
1943 | |||
1944 | <para>The <filename>deleteUpgradeFile</filename> Python module can be | ||
1945 | executed individually by running the following command line:</para> | ||
1946 | |||
1947 | <programlisting>$ python deleteUpgradeFile.py -u admin -p admin -H localhost -i \ | ||
1948 | enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2 | ||
1949 | 2020-02-28 12:06:20,111 - DEBUG: Started logging | ||
1950 | 2020-02-28 12:06:20,112 - INFO: Delete NFVA image from uCPE Manager | ||
1951 | 2020-02-28 12:06:20,210 - DEBUG: Login successful on host 'localhost' | ||
1952 | 2020-02-28 12:06:20,211 - DEBUG: Session token is: 594b2d50-5a1a-11ea-a3de-5652b3ac1c30 | ||
1953 | 2020-02-28 12:06:20,255 - INFO: The image \ | ||
1954 | 'enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2' was successfully found | ||
1955 | 2020-02-28 12:06:20,256 - INFO: The oid for \ | ||
1956 | 'enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2' image name is as follows: \ | ||
1957 | VcpeAgent/xeon_d/enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2 | ||
1958 | 2020-02-28 12:06:20,449 - INFO: The 'enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2' \ | ||
1959 | image was successfully removed | ||
1960 | 2020-02-28 12:06:20,479 - INFO: Done | ||
1961 | 2020-02-28 12:06:20,517 - DEBUG: Logging out and exiting...</programlisting> | ||
1962 | </section> | ||
1963 | </section> | ||
1964 | |||
1965 | <section id="install_activate_vnf_image"> | ||
1966 | <title>Installing and activating an Enea Edge image on an uCPE device | ||
1967 | from the Enea Edge Management application</title> | ||
1968 | |||
1969 | <para>Steps and options on how to Install and Activate an Enea Edge | ||
1970 | image on an uCPE device from the Enea Edge Management application are | ||
1971 | described below.</para> | ||
1972 | |||
1973 | <section id="script_opts_install_activate"> | ||
1974 | <title>Script Options</title> | ||
1975 | |||
1976 | <programlisting>$ python installAndActivate.py -h | ||
1977 | Install and activate NFVA image from uCPE Manager | ||
1978 | Usage: installAndActivate.py [options] | ||
1979 | |||
1980 | Install and activate NFVA image from uCPE Manager. | ||
1981 | |||
1982 | Options: | ||
1983 | --version show program's version number and exit | ||
1984 | -h, --help show this help message and exit | ||
1985 | -u USERNAME, --username=USERNAME | ||
1986 | Enea uCPE Manager login username | ||
1987 | -p PASSWORD, --password=PASSWORD | ||
1988 | Enea uCPE Manager login password | ||
1989 | -H HOST, --host=HOST Enea uCPE Manager host name or IP address | ||
1990 | -i IMAGENAME, --imageName=IMAGENAME | ||
1991 | Image name | ||
1992 | -m MODULE, --module=MODULE | ||
1993 | Module name -- VcpeAgent | ||
1994 | -t UPGRADETYPE, --upgradeType=UPGRADETYPE | ||
1995 | Upgrade Type -- xeon_d or atom_c3000 | ||
1996 | -d DEVICENAME, --deviceName=DEVICENAME | ||
1997 | Device Name | ||
1998 | |||
1999 | Mandatory options: | ||
2000 | -H/--host, -i/--imageName, -t/--upgradeType, -d/--deviceName, | ||
2001 | -m/--module</programlisting> | ||
2002 | </section> | ||
2003 | |||
2004 | <section id="json_install_activate"> | ||
2005 | <title>Configuring the JSON File</title> | ||
2006 | |||
2007 | <para>The JSON configuration file needed to install and activate an | ||
2008 | Enea Edge image on a uCPE device from the Enea Edge Management | ||
2009 | application should contain a list of dictionaries. Each dictionary | ||
2010 | indicates the test case name and the test case arguments passed to the | ||
2011 | <filename>installAndActivate</filename> Python module.</para> | ||
2012 | |||
2013 | <para><emphasis role="bold">Sample unit-test JSON file | ||
2014 | format:</emphasis></para> | ||
2015 | |||
2016 | <programlisting>[ | ||
2017 | { | ||
2018 | "name": "Install and activate NFVA image on uCPE device from uCPE Manager", | ||
2019 | "args": "-i enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2 -t xeon_d -d inteld1521-16" | ||
2020 | } | ||
2021 | ]</programlisting> | ||
2022 | </section> | ||
2023 | |||
2024 | <section id="pymod_install_activate"> | ||
2025 | <title>Running the Python Module</title> | ||
2026 | |||
2027 | <para>The <filename>installAndActivate</filename> Python module can be | ||
2028 | executed individually by running the following command line:</para> | ||
2029 | |||
2030 | <programlisting>$ python installAndActivate.py -u admin -p admin -H localhost -i \ | ||
2031 | enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2 -t xeon_d -d inteld1521-16 | ||
2032 | 2020-02-28 12:36:46,137 - DEBUG: Started logging | ||
2033 | 2020-02-28 12:36:46,138 - INFO: Install and activate NFVA image from uCPE Manager | ||
2034 | 2020-02-28 12:36:46,288 - DEBUG: Login successful on host 'localhost' | ||
2035 | 2020-02-28 12:36:46,288 - DEBUG: Session token is: 99b7cde0-5a1e-11ea-a3de-5652b3ac1c30 | ||
2036 | 2020-02-28 12:36:46,325 - DEBUG: Found device with name 'inteld1521-16' | ||
2037 | 2020-02-28 12:36:46,459 - INFO: Display info about NFVA installation \ | ||
2038 | [inteld1521-16:1001:172.24.12.152] Install Started | ||
2039 | 2020-02-28 12:36:46,492 - INFO: Transferring Image: \ | ||
2040 | enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2 | ||
2041 | 2020-02-28 12:36:56,552 - INFO: Verifying Release [1] | ||
2042 | 2020-02-28 12:37:06,599 - INFO: Verifying Release [2] | ||
2043 | 2020-02-28 12:37:16,652 - INFO: Validating Upgrade to \ | ||
2044 | enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2 | ||
2045 | 2020-02-28 12:37:26,713 - INFO: Validating upgrade to \ | ||
2046 | enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2 [3] | ||
2047 | 2020-02-28 12:37:36,770 - INFO: Validating upgrade to \ | ||
2048 | enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2 [5] | ||
2049 | 2020-02-28 12:37:46,819 - INFO: Validating upgrade to \ | ||
2050 | enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2 [7] | ||
2051 | 2020-02-28 12:37:56,879 - INFO: Validating upgrade to \ | ||
2052 | enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2 [9] | ||
2053 | 2020-02-28 12:38:06,920 - INFO: Validating upgrade to \ | ||
2054 | enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2 [11] | ||
2055 | 2020-02-28 12:38:16,975 - INFO: Validating upgrade to \ | ||
2056 | enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2 [13] | ||
2057 | 2020-02-28 12:38:27,019 - INFO: Validating upgrade to \ | ||
2058 | enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2 [15] | ||
2059 | 2020-02-28 12:38:37,091 - INFO: Validating upgrade to \ | ||
2060 | enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2 [18] | ||
2061 | 2020-02-28 12:38:47,133 - INFO: Validating upgrade to \ | ||
2062 | enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2 [20] | ||
2063 | 2020-02-28 12:38:57,186 - INFO: Waiting for release to become active | ||
2064 | 2020-02-28 12:39:07,231 - INFO: Upgrade Request Complete | ||
2065 | 2020-02-28 12:39:17,242 - INFO: Installation completed! | ||
2066 | 2020-02-28 12:39:17,243 - INFO: Done | ||
2067 | 2020-02-28 12:39:17,294 - DEBUG: Logging out and exiting...</programlisting> | ||
2068 | </section> | ||
2069 | </section> | ||
2070 | |||
2071 | <section id="clearing_info_upgrade"> | ||
2072 | <title>Clearing information about completed upgrades of uCPE devices | ||
2073 | from the Enea Edge Management application</title> | ||
2074 | |||
2075 | <para>Steps and options on how to clear information about completed | ||
2076 | upgrades of uCPE devices from the Enea Edge Management application are | ||
2077 | described below.</para> | ||
2078 | |||
2079 | <section id="script_opts_clearinfo"> | ||
2080 | <title>Script Options</title> | ||
2081 | |||
2082 | <programlisting>$ python clearCompletedUpgradesInfo.py -h | ||
2083 | Clear info about completed upgrades | ||
2084 | Usage: clearCompletedUpgradesInfo.py [options] | ||
2085 | |||
2086 | Clear info about completed upgrades | ||
2087 | |||
2088 | Options: | ||
2089 | --version show program's version number and exit | ||
2090 | -h, --help show this help message and exit | ||
2091 | -u USERNAME, --username=USERNAME | ||
2092 | Enea uCPE Manager login username | ||
2093 | -p PASSWORD, --password=PASSWORD | ||
2094 | Enea uCPE Manager login password | ||
2095 | -H HOST, --host=HOST Enea uCPE Manager host name or IP address | ||
2096 | |||
2097 | Mandatory options: | ||
2098 | -H/--host </programlisting> | ||
2099 | </section> | ||
2100 | |||
2101 | <section id="json_clear_info"> | ||
2102 | <title>Configuring the JSON File</title> | ||
2103 | |||
2104 | <para>No JSON configuration file is needed to clear information about | ||
2105 | completed upgrades of uCPE devices from the Enea Edge Management | ||
2106 | application. The <filename>clearCompletedUpgradesInfo</filename> | ||
2107 | Python module can be run without a JSON file as a parameter.</para> | ||
2108 | </section> | ||
2109 | |||
2110 | <section id="pymod_clear_info"> | ||
2111 | <title>Running the Python Module</title> | ||
2112 | |||
2113 | <para>The <filename>clearCompletedUpgradesInfo</filename> Python | ||
2114 | module can be executed individually by running the following command | ||
2115 | line:</para> | ||
2116 | |||
2117 | <programlisting>$ python clearCompletedUpgradesInfo.py -u admin -p admin -H localhost | ||
2118 | 2020-02-28 12:51:55,861 - DEBUG: Started logging | ||
2119 | 2020-02-28 12:51:55,862 - INFO: Clear info about completed upgrades | ||
2120 | 2020-02-28 12:51:55,950 - DEBUG: Login successful on host 'localhost' | ||
2121 | 2020-02-28 12:51:55,951 - DEBUG: Session token is: b7eb83e0-5a20-11ea-a3de-5652b3ac1c30 | ||
2122 | 2020-02-28 12:51:55,993 - INFO: Done | ||
2123 | 2020-02-28 12:51:56,025 - DEBUG: Logging out and exiting...</programlisting> | ||
2124 | </section> | ||
2125 | </section> | ||
2126 | |||
2127 | <section id="upload_custom_script"> | ||
2128 | <title>Uploading a Custom Script to the Enea Edge Management | ||
2129 | application</title> | ||
2130 | |||
2131 | <para>Steps and options on how to upload a custom script to the Enea | ||
2132 | Edge Management application are described below.</para> | ||
2133 | |||
2134 | <section id="script_opts_upload_custom_script"> | ||
2135 | <title>Script Options</title> | ||
2136 | |||
2137 | <programlisting>$ python customScripts/upload.py -h | ||
2138 | 2020-04-14 10:26:23,582 - INFO: Upload Custom Script | ||
2139 | Usage: upload.py [options] | ||
2140 | |||
2141 | Add a Custom Script to Enea uCPE Manager | ||
2142 | |||
2143 | Options: | ||
2144 | --version show program's version number and exit | ||
2145 | -h, --help show this help message and exit | ||
2146 | -u USERNAME, --username=USERNAME | ||
2147 | Enea uCPE Manager login username | ||
2148 | -p PASSWORD, --password=PASSWORD | ||
2149 | Enea uCPE Manager login password | ||
2150 | -H HOST, --host=HOST Enea uCPE Manager host name or IP address | ||
2151 | -f CUSTOMSCRIPT, --file=CUSTOMSCRIPT | ||
2152 | Custom Script File | ||
2153 | -e PHASE, --phase=PHASE | ||
2154 | Execution phase. Must be one of the following: once- | ||
2155 | before-startup | always-before-startup | once-after- | ||
2156 | startup | always-after-startup | ||
2157 | |||
2158 | Mandatory options: | ||
2159 | -H/--host, -f/--file, -e/--phase</programlisting> | ||
2160 | </section> | ||
2161 | |||
2162 | <section id="json_upload_custom_script"> | ||
2163 | <title>Configuring the JSON File</title> | ||
2164 | |||
2165 | <para>The JSON configuration file needed to upload a Custom Script to | ||
2166 | the Enea Edge Management application must contain a list of | ||
2167 | dictionaries. Each dictionary indicates the test case name and the | ||
2168 | test case arguments passed to the | ||
2169 | <filename>customScripts/upload</filename> Python module.</para> | ||
2170 | |||
2171 | <para><emphasis role="bold">Sample unit-test JSON file | ||
2172 | format:</emphasis></para> | ||
2173 | |||
2174 | <programlisting>[ | ||
2175 | { | ||
2176 | "name": "Uploading a Custom Script to the uCPE Manager", | ||
2177 | "args": "-f ../../lab_config/customScripts/test_success_after_always \ | ||
2178 | -e always-after-startup" | ||
2179 | } | ||
2180 | ]</programlisting> | ||
2181 | </section> | ||
2182 | |||
2183 | <section id="pymod_upload_custom_script"> | ||
2184 | <title>Running the Python Module</title> | ||
2185 | |||
2186 | <para>The <filename>customScripts/upload</filename> Python module can | ||
2187 | be executed individually by running the following command line:</para> | ||
2188 | |||
2189 | <programlisting>$ python automation_framework/customScripts/upload.py \ | ||
2190 | -f lab_config/customScripts/test_success_after_always -e always-after-startup | ||
2191 | 2020-04-14 14:08:02,824 - DEBUG: Started logging | ||
2192 | 2020-04-14 14:08:02,915 - INFO: Upload Custom Script | ||
2193 | 2020-04-14 14:08:02,994 - DEBUG: Login successful on host '172.24.3.109' | ||
2194 | 2020-04-14 14:08:02,995 - DEBUG: Session token is: 97544990-7e48-11ea-835c-02423a1c239f | ||
2195 | 2020-04-14 14:08:02,996 - DEBUG: Upload test_success_after_always to uCPE Manager. \ | ||
2196 | Content: #!/bin/bash | ||
2197 | echo test_success_after_always | ||
2198 | 2020-04-14 14:08:03,138 - INFO: Done | ||
2199 | 2020-04-14 14:08:03,169 - DEBUG: Logging out and exiting...</programlisting> | ||
2200 | </section> | ||
2201 | </section> | ||
2202 | |||
2203 | <section id="upload_custom_script_device"> | ||
2204 | <title>Uploading a Custom Script from the Enea Edge Management | ||
2205 | application to a Device</title> | ||
2206 | |||
2207 | <para>Steps and options on how to upload a custom script from the Enea | ||
2208 | Edge Management application to a Device are described below.</para> | ||
2209 | |||
2210 | <section id="script_opts_upload_custom_script_device"> | ||
2211 | <title>Script Options</title> | ||
2212 | |||
2213 | <programlisting>$ python customScripts/uploadOnDevice.py -h | ||
2214 | 2020-04-14 10:27:05,614 - INFO: Upload Custom Script on Device | ||
2215 | Usage: uploadOnDevice.py [options] | ||
2216 | |||
2217 | Add a Custom Script to a Device | ||
2218 | |||
2219 | Options: | ||
2220 | --version show program's version number and exit | ||
2221 | -h, --help show this help message and exit | ||
2222 | -u USERNAME, --username=USERNAME | ||
2223 | Enea uCPE Manager login username | ||
2224 | -p PASSWORD, --password=PASSWORD | ||
2225 | Enea uCPE Manager login password | ||
2226 | -H HOST, --host=HOST Enea uCPE Manager host name or IP address | ||
2227 | -c CUSTOMSCRIPTNAME, --customScriptName=CUSTOMSCRIPTNAME | ||
2228 | Custom Script Name that resides on Enea uCPE Manager | ||
2229 | -e PHASE, --phase=PHASE | ||
2230 | Execution phase. Must be one of the following: once- | ||
2231 | before-startup | always-before-startup | once-after- | ||
2232 | startup | always-after-startup | ||
2233 | -n DEVICENAME, --device-name=DEVICENAME | ||
2234 | Name of the device | ||
2235 | -r, --reboot Reboot the device after uploading | ||
2236 | |||
2237 | Mandatory options: | ||
2238 | -H/--host, -c/--customScriptName, -e/--phase, -n/--device-name</programlisting> | ||
2239 | </section> | ||
2240 | |||
2241 | <section id="json_upload_custom_script_device"> | ||
2242 | <title>Configuring the JSON File</title> | ||
2243 | |||
2244 | <para>The JSON configuration file needed to upload a Custom Script | ||
2245 | from the Enea Edge Management application to a Device must contain a | ||
2246 | list of dictionaries. Each dictionary indicates the test case name and | ||
2247 | the test case arguments passed to the | ||
2248 | <filename>customScripts/uploadOnDevice</filename> Python | ||
2249 | module.</para> | ||
2250 | |||
2251 | <para><emphasis role="bold">Sample unit-test JSON file | ||
2252 | format:</emphasis></para> | ||
2253 | |||
2254 | <programlisting>[ | ||
2255 | { | ||
2256 | "name": "Uploading a Custom Script from uCPE Manager to device", | ||
2257 | "args": "-c test_success_after_always -e always-after-startup -n inteld1521-6" | ||
2258 | } | ||
2259 | ]</programlisting> | ||
2260 | </section> | ||
2261 | |||
2262 | <section id="pymod_upload_custom_script_device"> | ||
2263 | <title>Running the Python Module</title> | ||
2264 | |||
2265 | <para>The <filename>customScripts/uploadOnDevice</filename> Python | ||
2266 | module can be executed individually by running the following command | ||
2267 | line:</para> | ||
2268 | |||
2269 | <programlisting>$ python automation_framework/customScripts/uploadOnDevice.py -c \ | ||
2270 | test_success_after_always -e always-after-startup -n inteld1521-6 | ||
2271 | 2020-04-14 14:26:26,205 - DEBUG: Started logging | ||
2272 | 2020-04-14 14:26:26,206 - INFO: Upload Custom Script on Device | ||
2273 | 2020-04-14 14:26:26,251 - DEBUG: Login successful on host '172.24.3.109' | ||
2274 | 2020-04-14 14:26:26,252 - DEBUG: Session token is: 28ebcb10-7e4b-11ea-835c-02423a1c239f | ||
2275 | 2020-04-14 14:26:26,286 - DEBUG: Found device with name 'inteld1521-6' | ||
2276 | 2020-04-14 14:26:26,287 - DEBUG: Upload test_success_after_always to inteld1521-6 | ||
2277 | 2020-04-14 14:26:26,314 - INFO: Done | ||
2278 | 2020-04-14 14:26:26,341 - DEBUG: Logging out and exiting...</programlisting> | ||
2279 | </section> | ||
2280 | </section> | ||
2281 | |||
2282 | <section id="delete_custom_script"> | ||
2283 | <title>Removing a Custom Script from the Enea Edge Management | ||
2284 | application</title> | ||
2285 | |||
2286 | <para>Steps and options on how to remove a custom script from the Enea | ||
2287 | Edge Management application are described below.</para> | ||
2288 | |||
2289 | <section id="script_opts_delete_custom_script"> | ||
2290 | <title>Script Options</title> | ||
2291 | |||
2292 | <programlisting>$ python customScripts/delete.py -h | ||
2293 | 2020-04-14 14:36:52,010 - INFO: Delete Custom Script on uCPE Manager | ||
2294 | Usage: delete.py [options] | ||
2295 | |||
2296 | Delete a Custom Script from a Device | ||
2297 | |||
2298 | Options: | ||
2299 | --version show program's version number and exit | ||
2300 | -h, --help show this help message and exit | ||
2301 | -u USERNAME, --username=USERNAME | ||
2302 | Enea uCPE Manager login username | ||
2303 | -p PASSWORD, --password=PASSWORD | ||
2304 | Enea uCPE Manager login password | ||
2305 | -H HOST, --host=HOST Enea uCPE Manager host name or IP address | ||
2306 | -c CUSTOMSCRIPTNAME, --customScriptName=CUSTOMSCRIPTNAME | ||
2307 | Custom Script Name that resides on a Device | ||
2308 | -e PHASE, --phase=PHASE | ||
2309 | Execution phase. Must be one of the following: once- | ||
2310 | before-startup | always-before-startup | once-after- | ||
2311 | startup | always-after-startup | ||
2312 | |||
2313 | Mandatory options: | ||
2314 | -H/--host, -e/--phase</programlisting> | ||
2315 | </section> | ||
2316 | |||
2317 | <section id="json_delete_custom_script"> | ||
2318 | <title>Configuring the JSON File</title> | ||
2319 | |||
2320 | <para>The JSON configuration file needed to remove a Custom Script | ||
2321 | from the Enea Edge Management application<remark>did you mean device | ||
2322 | or Enea Edge Management application?</remark> must contain a list of | ||
2323 | dictionaries. Each dictionary indicates the test case name and the | ||
2324 | test case arguments passed to the | ||
2325 | <filename>customScripts/delete</filename> Python module.</para> | ||
2326 | |||
2327 | <para><emphasis role="bold">Sample unit-test JSON file | ||
2328 | format:</emphasis></para> | ||
2329 | |||
2330 | <programlisting>[ | ||
2331 | { | ||
2332 | "name": "Removing a Custom Script from uCPE Manager", | ||
2333 | "args": "-c test_success_after_always -e always-after-startup" | ||
2334 | } | ||
2335 | ]</programlisting> | ||
2336 | </section> | ||
2337 | |||
2338 | <section id="pymod_delete_custom_script"> | ||
2339 | <title>Running the Python Module</title> | ||
2340 | |||
2341 | <para>The <filename>customScripts/delete</filename> Python module can | ||
2342 | be executed individually by running the following command line:</para> | ||
2343 | |||
2344 | <programlisting>$ python automation_framework/customScripts/delete.py -c \ | ||
2345 | test_success_after_always -e always-after-startup | ||
2346 | 2020-04-14 14:39:22,042 - DEBUG: Started logging | ||
2347 | 2020-04-14 14:39:22,042 - INFO: Delete Custom Script on uCPE Manager | ||
2348 | 2020-04-14 14:39:22,081 - DEBUG: Login successful on host '172.24.3.109' | ||
2349 | 2020-04-14 14:39:22,082 - DEBUG: Session token is: f75a83a0-7e4c-11ea-835c-02423a1c239f | ||
2350 | 2020-04-14 14:39:22,099 - DEBUG: Found custom script: 'test_success_after_always' | ||
2351 | 2020-04-14 14:39:22,099 - DEBUG: Delete script test_success_after_always, \ | ||
2352 | phase always-after-startup from uCPE Manager | ||
2353 | 2020-04-14 14:39:22,118 - INFO: Done | ||
2354 | 2020-04-14 14:39:22,135 - DEBUG: Logging out and exiting...</programlisting> | ||
2355 | </section> | ||
2356 | </section> | ||
2357 | |||
2358 | <section id="delete_custom_script_device"> | ||
2359 | <title>Removing a Custom Script from a Device</title> | ||
2360 | |||
2361 | <para>Steps and options on how to remove a custom script from a device | ||
2362 | are described below.</para> | ||
2363 | |||
2364 | <section id="script_opts_delete_custom_script_device"> | ||
2365 | <title>Script Options</title> | ||
2366 | |||
2367 | <programlisting>$ python customScripts/deleteOnDevice.py -h | ||
2368 | 2020-04-14 10:27:23,536 - INFO: Delete Custom Script on Device | ||
2369 | Usage: deleteOnDevice.py [options] | ||
2370 | |||
2371 | Delete a Custom Script from a Device | ||
2372 | |||
2373 | Options: | ||
2374 | --version show program's version number and exit | ||
2375 | -h, --help show this help message and exit | ||
2376 | -u USERNAME, --username=USERNAME | ||
2377 | Enea uCPE Manager login username | ||
2378 | -p PASSWORD, --password=PASSWORD | ||
2379 | Enea uCPE Manager login password | ||
2380 | -H HOST, --host=HOST Enea uCPE Manager host name or IP address | ||
2381 | -c CUSTOMSCRIPTNAME, --customScriptName=CUSTOMSCRIPTNAME | ||
2382 | Custom Script Name that resides on a Device | ||
2383 | -e PHASE, --phase=PHASE | ||
2384 | Execution phase. Must be one of the following: once- | ||
2385 | before-startup | always-before-startup | once-after- | ||
2386 | startup | always-after-startup | ||
2387 | -n DEVICENAME, --device-name=DEVICENAME | ||
2388 | Name of the device | ||
2389 | |||
2390 | Mandatory options: | ||
2391 | -H/--host, -n/--device-name</programlisting> | ||
2392 | </section> | ||
2393 | |||
2394 | <section id="json_delete_custom_script_device"> | ||
2395 | <title>Configuring the JSON File</title> | ||
2396 | |||
2397 | <para>The JSON configuration file needed to remove a Custom Script | ||
2398 | from a device must contain a list of dictionaries. Each dictionary | ||
2399 | indicates the test case name and the test case arguments passed to the | ||
2400 | <filename>customScripts/deleteOnDevice</filename> Python | ||
2401 | module.</para> | ||
2402 | |||
2403 | <para><emphasis role="bold">Sample unit-test JSON file | ||
2404 | format:</emphasis></para> | ||
2405 | |||
2406 | <programlisting>[ | ||
2407 | { | ||
2408 | "name": "Removing a Custom Script from device", | ||
2409 | "args": "-c test_success_after_always -e always-after-startup -n inteld1521-6" | ||
2410 | } | ||
2411 | ]</programlisting> | ||
2412 | </section> | ||
2413 | |||
2414 | <section id="pymod_delete_custom_script_delete"> | ||
2415 | <title>Running the Python Module</title> | ||
2416 | |||
2417 | <para>The <filename>customScripts/deleteOnDevice</filename> Python | ||
2418 | module can be executed individually by running the following command | ||
2419 | line:</para> | ||
2420 | |||
2421 | <programlisting>$ python automation_framework/customScripts/deleteOnDevice.py -c \ | ||
2422 | test_success_after_always -e always-after-startup -n inteld1521-6 | ||
2423 | 2020-04-14 14:33:52,288 - DEBUG: Started logging | ||
2424 | 2020-04-14 14:33:52,288 - INFO: Delete Custom Script on Device | ||
2425 | 2020-04-14 14:33:52,327 - DEBUG: Login successful on host '172.24.3.109' | ||
2426 | 2020-04-14 14:33:52,327 - DEBUG: Session token is: 32cde4f0-7e4c-11ea-835c-02423a1c239f | ||
2427 | 2020-04-14 14:33:52,349 - DEBUG: Found device with name 'inteld1521-6' | ||
2428 | 2020-04-14 14:33:52,349 - DEBUG: Delete test_success_after_always, \ | ||
2429 | phase always-after-startup from inteld1521-6 | ||
2430 | 2020-04-14 14:33:52,373 - INFO: Done | ||
2431 | 2020-04-14 14:33:52,391 - DEBUG: Logging out and exiting...</programlisting> | ||
2432 | </section> | ||
2433 | </section> | ||
2434 | |||
2435 | <section id="custom_script_eg"> | ||
2436 | <title>Custom Script - Full Example</title> | ||
2437 | |||
2438 | <para>All Python API used in this example are described in detail in the | ||
2439 | following sections.</para> | ||
2440 | |||
2441 | <para>The list of custom scripts can be found in | ||
2442 | <literal><AF-TH-install-dir>/lab_config/customScripts</literal>:</para> | ||
2443 | |||
2444 | <itemizedlist spacing="compact"> | ||
2445 | <listitem> | ||
2446 | <para><filename>test_fail_after_always</filename>. Phase: | ||
2447 | always-after-startup.</para> | ||
2448 | </listitem> | ||
2449 | |||
2450 | <listitem> | ||
2451 | <para><filename>test_fail_after_once</filename>. Phase: | ||
2452 | once-after-startup.</para> | ||
2453 | </listitem> | ||
2454 | |||
2455 | <listitem> | ||
2456 | <para><filename>test_fail_before_always</filename>. Phase: | ||
2457 | always-before-startup.</para> | ||
2458 | </listitem> | ||
2459 | |||
2460 | <listitem> | ||
2461 | <para><filename>test_fail_before_once</filename>. Phase: | ||
2462 | once-before-startup.</para> | ||
2463 | </listitem> | ||
2464 | |||
2465 | <listitem> | ||
2466 | <para><filename>test_success_after_always</filename>. Phase: | ||
2467 | always-after-startup.</para> | ||
2468 | </listitem> | ||
2469 | |||
2470 | <listitem> | ||
2471 | <para><filename>test_success_after_once</filename>. Phase: | ||
2472 | once-after-startup.</para> | ||
2473 | </listitem> | ||
2474 | |||
2475 | <listitem> | ||
2476 | <para><filename>test_success_before_always</filename>. Phase: | ||
2477 | always-before-startup.</para> | ||
2478 | </listitem> | ||
2479 | |||
2480 | <listitem> | ||
2481 | <para><filename>test_success_before_once</filename>. Phase: | ||
2482 | once-before-startup.</para> | ||
2483 | </listitem> | ||
2484 | </itemizedlist> | ||
2485 | |||
2486 | <note> | ||
2487 | <para>The following example uses the | ||
2488 | <filename>test_success_after_always</filename> custom script.</para> | ||
2489 | </note> | ||
2490 | |||
2491 | <section id="upload_customscrp_ucpemg"> | ||
2492 | <title>Uploading a Custom Script to the Enea Edge Management | ||
2493 | application</title> | ||
2494 | |||
2495 | <programlisting>$ python automation_framework/customScripts/upload.py \ | ||
2496 | -f lab_config/customScripts/test_success_after_always -e always-after-startup | ||
2497 | 2020-04-14 14:08:02,824 - DEBUG: Started logging | ||
2498 | 2020-04-14 14:08:02,915 - INFO: Upload Custom Script | ||
2499 | 2020-04-14 14:08:02,994 - DEBUG: Login successful on host '172.24.3.109' | ||
2500 | 2020-04-14 14:08:02,995 - DEBUG: Session token is: 97544990-7e48-11ea-835c-02423a1c239f | ||
2501 | 2020-04-14 14:08:02,996 - DEBUG: Upload test_success_after_always to uCPE Manager. \ | ||
2502 | Content: #!/bin/bash | ||
2503 | echo test_success_after_always | ||
2504 | 2020-04-14 14:08:03,138 - INFO: Done | ||
2505 | 2020-04-14 14:08:03,169 - DEBUG: Logging out and exiting...</programlisting> | ||
2506 | </section> | ||
2507 | |||
2508 | <section id="upload_customscrp_device"> | ||
2509 | <title>Uploading a Custom Script from the Enea Edge Management | ||
2510 | application to a Device</title> | ||
2511 | |||
2512 | <programlisting>$ python automation_framework/customScripts/uploadOnDevice.py -c \ | ||
2513 | test_success_after_always -e always-after-startup -n inteld1521-6 | ||
2514 | 2020-04-14 14:26:26,205 - DEBUG: Started logging | ||
2515 | 2020-04-14 14:26:26,206 - INFO: Upload Custom Script on Device | ||
2516 | 2020-04-14 14:26:26,251 - DEBUG: Login successful on host '172.24.3.109' | ||
2517 | 2020-04-14 14:26:26,252 - DEBUG: Session token is: 28ebcb10-7e4b-11ea-835c-02423a1c239f | ||
2518 | 2020-04-14 14:26:26,286 - DEBUG: Found device with name 'inteld1521-6' | ||
2519 | 2020-04-14 14:26:26,287 - DEBUG: Upload test_success_after_always to inteld1521-6 | ||
2520 | 2020-04-14 14:26:26,314 - INFO: Done | ||
2521 | 2020-04-14 14:26:26,341 - DEBUG: Logging out and exiting...</programlisting> | ||
2522 | </section> | ||
2523 | |||
2524 | <section id="removing_customscrp_device"> | ||
2525 | <title>Removing a Custom Script from a Device</title> | ||
2526 | |||
2527 | <programlisting>$ python automation_framework/customScripts/deleteOnDevice.py -c \ | ||
2528 | test_success_after_always -e always-after-startup -n inteld1521-6 | ||
2529 | 2020-04-14 14:33:52,288 - DEBUG: Started logging | ||
2530 | 2020-04-14 14:33:52,288 - INFO: Delete Custom Script on Device | ||
2531 | 2020-04-14 14:33:52,327 - DEBUG: Login successful on host '172.24.3.109' | ||
2532 | 2020-04-14 14:33:52,327 - DEBUG: Session token is: 32cde4f0-7e4c-11ea-835c-02423a1c239f | ||
2533 | 2020-04-14 14:33:52,349 - DEBUG: Found device with name 'inteld1521-6' | ||
2534 | 2020-04-14 14:33:52,349 - DEBUG: Delete test_success_after_always, \ | ||
2535 | phase always-after-startup from inteld1521-6 | ||
2536 | 2020-04-14 14:33:52,373 - INFO: Done | ||
2537 | 2020-04-14 14:33:52,391 - DEBUG: Logging out and exiting...</programlisting> | ||
2538 | </section> | ||
2539 | |||
2540 | <section id="remove_customscrp_ucpemg"> | ||
2541 | <title>Removing a Custom Script from the Enea Edge Management | ||
2542 | application</title> | ||
2543 | |||
2544 | <programlisting>$ python automation_framework/customScripts/delete.py -c \ | ||
2545 | test_success_after_always -e always-after-startup | ||
2546 | 2020-04-14 14:39:22,042 - DEBUG: Started logging | ||
2547 | 2020-04-14 14:39:22,042 - INFO: Delete Custom Script on uCPE Manager | ||
2548 | 2020-04-14 14:39:22,081 - DEBUG: Login successful on host '172.24.3.109' | ||
2549 | 2020-04-14 14:39:22,082 - DEBUG: Session token is: f75a83a0-7e4c-11ea-835c-02423a1c239f | ||
2550 | 2020-04-14 14:39:22,099 - DEBUG: Found custom script: 'test_success_after_always' | ||
2551 | 2020-04-14 14:39:22,099 - DEBUG: Delete script test_success_after_always, \ | ||
2552 | phase always-after-startup from uCPE Manager | ||
2553 | 2020-04-14 14:39:22,118 - INFO: Done | ||
2554 | 2020-04-14 14:39:22,135 - DEBUG: Logging out and exiting...</programlisting> | ||
2555 | </section> | ||
2556 | </section> | ||
2557 | |||
2558 | <section id="add_offline_config_store"> | ||
2559 | <title>Adding an Offline Configuration Store</title> | ||
2560 | |||
2561 | <para>Steps and options on how to add a Config Store in the Enea Edge | ||
2562 | Management application are described below.</para> | ||
2563 | |||
2564 | <section id="script_opts_add_config_store"> | ||
2565 | <title>Script Options</title> | ||
2566 | |||
2567 | <para>To add a config store in the Enea Edge Management application | ||
2568 | use the <filename>addConfigStore.py</filename> script detailed below. | ||
2569 | Bear in mind a <filename>CONFIGSTORE</filename> json file is needed to | ||
2570 | successfully run the script in order to add an offline configuration | ||
2571 | store.</para> | ||
2572 | </section> | ||
2573 | |||
2574 | <section id="json_add_config_store"> | ||
2575 | <title>Configuring the JSON file</title> | ||
2576 | |||
2577 | <para>Example of a <filename>CONFIGSTORE</filename> json file:</para> | ||
2578 | |||
2579 | <programlisting>{ | ||
2580 | "descr": "intelc3850-2", | ||
2581 | "version": "2.4.0", | ||
2582 | "deviceGroupingTags": "", | ||
2583 | "deviceId": "intelc3850-2", | ||
2584 | "name": "intelc3850-2" | ||
2585 | }</programlisting> | ||
2586 | </section> | ||
2587 | |||
2588 | <section id="runpy_add_config_store"> | ||
2589 | <title>Running the Python Module</title> | ||
2590 | |||
2591 | <para>Adding an offline config store in the Enea Edge Management | ||
2592 | application using the command line:</para> | ||
2593 | |||
2594 | <programlisting>python automation_framework/device/addConfigStore.py -f \ | ||
2595 | lab_config/inteld1521-16/store.json | ||
2596 | 2020-10-16 09:35:51,084 - INFO: Add offline config store | ||
2597 | 2020-10-16 09:35:51,160 - INFO: Done</programlisting> | ||
2598 | </section> | ||
2599 | </section> | ||
2600 | |||
2601 | <section id="upload_offline_config_store"> | ||
2602 | <title>Uploading an Offline Configuration Store to an uCPE | ||
2603 | Device</title> | ||
2604 | |||
2605 | <para>Steps and options on how to upload a config store to a device are | ||
2606 | described below.</para> | ||
2607 | |||
2608 | <section id="script_opts_upload_config_store"> | ||
2609 | <title>Script options</title> | ||
2610 | |||
2611 | <para>To upload a config store to a uCPE Device use the | ||
2612 | <filename>uploadConfigStore.py</filename> script detailed | ||
2613 | below.</para> | ||
2614 | |||
2615 | <programlisting>python uploadConfigStore.py -h | ||
2616 | Usage: uploadConfigStore.py [options] | ||
2617 | |||
2618 | Upload offline configuration to uCPE Device. | ||
2619 | |||
2620 | Options: | ||
2621 | --version show program's version number and exit | ||
2622 | -h, --help show this help message and exit | ||
2623 | -u USERNAME, --username=USERNAME | ||
2624 | Enea uCPE Manager login username | ||
2625 | -p PASSWORD, --password=PASSWORD | ||
2626 | Enea uCPE Manager login password | ||
2627 | -H HOST, --host=HOST Enea uCPE Manager host name or IP address | ||
2628 | -s STORE, --store=STORE | ||
2629 | Offline config store name | ||
2630 | -d DEVICE, --device=DEVICE | ||
2631 | Device Name | ||
2632 | |||
2633 | Mandatory options: | ||
2634 | -H/--host, -s/--store, -d/--device</programlisting> | ||
2635 | </section> | ||
2636 | |||
2637 | <section id="runpy_upload_config_store"> | ||
2638 | <title>Running the Python Modules</title> | ||
2639 | |||
2640 | <programlisting>python automation_framework/device/uploadConfigStore.py -s inteld1521-16 \ | ||
2641 | -d inteld1521-16 | ||
2642 | 2020-10-16 09:37:29,074 - INFO: Upload offline configuration to uCPE Device | ||
2643 | 2020-10-16 09:37:49,321 - INFO: The 'inteld1521-16' config store was successfully \ | ||
2644 | uploaded on device! | ||
2645 | 2020-10-16 09:37:49,322 - INFO: Done</programlisting> | ||
2646 | </section> | ||
2647 | </section> | ||
2648 | |||
2649 | <section id="check_upload_offline_config_store"> | ||
2650 | <title>Checking the Upload of an Offline Configuration Store</title> | ||
2651 | |||
2652 | <para>Steps and options on how to check an upload of a Config Store to a | ||
2653 | Device are described below.</para> | ||
2654 | |||
2655 | <section id="script_opts_check_upload_config_store"> | ||
2656 | <title>Script options</title> | ||
2657 | |||
2658 | <para>To check an upload a config store to a uCPE Device use the | ||
2659 | <filename>getUploadStatus.py</filename> script detailed below.</para> | ||
2660 | |||
2661 | <programlisting>python getUploadStatus.py -h | ||
2662 | Usage: getUploadStatus.py [options] | ||
2663 | |||
2664 | Get upload offline configure status on uCPE Device. | ||
2665 | |||
2666 | Options: | ||
2667 | --version show program's version number and exit | ||
2668 | -h, --help show this help message and exit | ||
2669 | -u USERNAME, --username=USERNAME | ||
2670 | Enea uCPE Manager login username | ||
2671 | -p PASSWORD, --password=PASSWORD | ||
2672 | Enea uCPE Manager login password | ||
2673 | -H HOST, --host=HOST Enea uCPE Manager host name or IP address | ||
2674 | -d DEVICE, --device=DEVICE | ||
2675 | Device Name | ||
2676 | |||
2677 | Mandatory options: | ||
2678 | -H/--host, -d/--device</programlisting> | ||
2679 | </section> | ||
2680 | |||
2681 | <section id="runpy_check_upload_config_store"> | ||
2682 | <title>Running the Python Modules</title> | ||
2683 | |||
2684 | <programlisting>python automation_framework/device/getUploadStatus.py -d inteld1521-16 | ||
2685 | 2020-10-16 09:38:33,388 - INFO: Get upload offline configure status on uCPE Device | ||
2686 | 2020-10-16 09:38:33,486 - INFO: Successful: True | ||
2687 | 2020-10-16 09:38:33,487 - INFO: Store name: inteld1521-16 | ||
2688 | 2020-10-16 09:38:33,488 - INFO: In progress: False | ||
2689 | 2020-10-16 09:38:33,489 - INFO: A config store was successfully uploaded on device! | ||
2690 | 2020-10-16 09:38:33,490 - INFO: Done</programlisting> | ||
2691 | </section> | ||
2692 | </section> | ||
2693 | |||
2694 | <section id="remove_offline_config_store"> | ||
2695 | <title>Removing an Offline Configuration Store in the Enea Edge | ||
2696 | Management application</title> | ||
2697 | |||
2698 | <para>Steps and options on how to remove an upload of a Config Store | ||
2699 | from the Enea Edge Management application are described below.</para> | ||
2700 | |||
2701 | <note> | ||
2702 | <para>Modifications of an Offline Configurations Store are not | ||
2703 | possible post deployment in the Enea Edge Management application, as | ||
2704 | there is no option for changing script states (e.g. changing the DPDK | ||
2705 | state in the <filename>configDPDK.py</filename> python script or | ||
2706 | unbinding interfaces). The offline store must be deleted and the new | ||
2707 | state(s)/changes added in, before being deployed anew. This was not | ||
2708 | deemed necessary for the current ZTP functionality.</para> | ||
2709 | </note> | ||
2710 | |||
2711 | <section id="script_opts_remove_config_store"> | ||
2712 | <title>Script options</title> | ||
2713 | |||
2714 | <para>To remove a config store from the Enea Edge Management | ||
2715 | application use the <filename>removeConfigStore.py</filename> script | ||
2716 | detailed below.</para> | ||
2717 | |||
2718 | <programlisting>python removeConfigStore.py -h | ||
2719 | Usage: removeConfigStore.py [options] | ||
2720 | |||
2721 | Remove a config store from Enea uCPE Manager. | ||
2722 | |||
2723 | Options: | ||
2724 | --version show program's version number and exit | ||
2725 | -h, --help show this help message and exit | ||
2726 | -u USERNAME, --username=USERNAME | ||
2727 | Enea uCPE Manager login username | ||
2728 | -p PASSWORD, --password=PASSWORD | ||
2729 | Enea uCPE Manager login password | ||
2730 | -H HOST, --host=HOST Enea uCPE Manager host name or IP address | ||
2731 | -o STORENAME, --store-name=STORENAME | ||
2732 | Name of the Offline Config Store | ||
2733 | |||
2734 | Mandatory options: | ||
2735 | -H/--host, -o/--store-name</programlisting> | ||
2736 | </section> | ||
2737 | |||
2738 | <section id="runpy_remove_config_store"> | ||
2739 | <title>Running the Python Modules</title> | ||
2740 | |||
2741 | <programlisting>python automation_framework/device/removeConfigStore.py -o inteld1521-16 | ||
2742 | 2020-10-16 09:39:39,127 - INFO: Remove offline config store | ||
2743 | 2020-10-16 09:39:39,289 - INFO: Done</programlisting> | ||
2744 | </section> | ||
2745 | </section> | ||
2746 | </section> | ||
2747 | |||
2748 | <section id="test_harness"> | ||
2749 | <title>Test Harness</title> | ||
2750 | |||
2751 | <para>All Test Harness sources are under the | ||
2752 | <literal><AF-TH-install-dir></literal> directory and the host file | ||
2753 | is the Ansible inventory file. See the complete tree listing at the | ||
2754 | beginning of this chapter for details.</para> | ||
2755 | |||
2756 | <para>The Ansible based Test Harness represents an example of how to | ||
2757 | structure all the files needed for creating automated test cases using the | ||
2758 | AF and provides a way to implement them. The | ||
2759 | <filename>ansible.cfg</filename> file contains an example of the Ansible | ||
2760 | default configuration. It offers the possibility to display the Ansible | ||
2761 | console output in different ways, by setting the | ||
2762 | <literal>stdout_callback</literal> option to <literal>selective</literal> | ||
2763 | or <literal>debug</literal>. The default value for this option is set to | ||
2764 | <literal>selective</literal> to print only certain tasks. It is | ||
2765 | recommended to switch to <literal>debug</literal> when a test fails. By | ||
2766 | setting the parameter <literal>any_errors_fatal</literal> to | ||
2767 | <literal>True</literal>, task failures will be considered fatal errors | ||
2768 | (the play execution will stop). <remark>and why would this stop of play | ||
2769 | execution help in this debugging scenario</remark></para> | ||
2770 | |||
2771 | <para>All Playbooks that execute AF python modules run on | ||
2772 | <literal>localhost</literal>. New entries have to be created for direct | ||
2773 | communication over SSH with the boards, as done in the | ||
2774 | <literal>[fortigateFW]</literal> example.</para> | ||
2775 | |||
2776 | <para>The <filename>setup_env.sh</filename> script sets up the | ||
2777 | <literal>testHarness</literal> test environment by creating | ||
2778 | <literal>testHarness-venv python virtualenv</literal>, executing requests | ||
2779 | needed by Automation Framework python modules and installing | ||
2780 | Ansible.</para> | ||
2781 | |||
2782 | <para>The Ansible package version installed in the test environment is | ||
2783 | 2.9.6. The playbooks are based on this version of Ansible.</para> | ||
2784 | |||
2785 | <para>The <literal>/playbooks</literal> directory contains all the | ||
2786 | implemented Ansible Playbooks. For more details please refer to the <olink | ||
2787 | targetdoc="book_enea_edge_system_test_specification" | ||
2788 | targetptr="sample_testcases">Sample Test Cases Chapter in the <xi:include | ||
2789 | href="../../s_docbuild/olinkdb/pardoc-names.xml" | ||
2790 | xmlns:xi="http://www.w3.org/2001/XInclude" | ||
2791 | xpointer="element(book_enea_edge_system_test_specification/1)" /></olink> | ||
2792 | Manual.</para> | ||
2793 | |||
2794 | <para>The /<literal>uCPEM_config</literal> directory stores JSON | ||
2795 | configuration files needed for the setup of the Enea Edge Management | ||
2796 | application used by TH. One configuration file is needed per Enea Edge | ||
2797 | Management installation, to be used in the TH.</para> | ||
2798 | |||
2799 | <para>The <literal>/vnf_image</literal> directory stores the VNF Images | ||
2800 | needed by the Ansible Playbooks (i.e. the sample test cases).</para> | ||
2801 | |||
2802 | <para>The <literal>/lab_config</literal> directory stores the JSON | ||
2803 | configuration files related to a device (devices, NICs and bridges) as | ||
2804 | well as sample custom scripts. Each subfolder should be named exactly like | ||
2805 | the device name and should contain all the related configuration files | ||
2806 | needed for the test cases to be run on it.</para> | ||
2807 | |||
2808 | <para>The <literal>/vnf_config</literal> directory stores the | ||
2809 | configuration files related to a VNF Descriptor and VNF instances. | ||
2810 | Typically these include a VNF Image JSON, VNF Instance JSON, VNF license | ||
2811 | and any other files required by the type of the VNF. Each subfolder should | ||
2812 | be named exactly like the name of the VNF Descriptor and should contain | ||
2813 | all the related configuration files needed for test cases to be run using | ||
2814 | this VNF.</para> | ||
2815 | |||
2816 | <para>The <literal>/log</literal> directory is created when the | ||
2817 | <literal>setup_env.sh</literal> is run. When test cases are run, the | ||
2818 | Ansible and the Python logs are stored in the | ||
2819 | <filename>ansible.log</filename> and <filename>debug.log</filename> files, | ||
2820 | respectively.</para> | ||
2821 | </section> | ||
2822 | </chapter> \ No newline at end of file | ||
diff --git a/doc/book-enea-edge-auto-fw-th-user-guide/doc/book.xml b/doc/book-enea-edge-auto-fw-th-user-guide/doc/book.xml new file mode 100644 index 0000000..d533a74 --- /dev/null +++ b/doc/book-enea-edge-auto-fw-th-user-guide/doc/book.xml | |||
@@ -0,0 +1,32 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" | ||
3 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ | ||
4 | <!ENTITY % local.common.attrib "xml:base CDATA #IMPLIED"> | ||
5 | ]> | ||
6 | <book id="book_enea_edge_auto_fw_th_user_guide"> | ||
7 | <title><trademark class="registered">Enea</trademark> Edge Automation | ||
8 | Framework and Test Harness User Guide</title> | ||
9 | |||
10 | <subtitle>Release Version <xi:include | ||
11 | href="../../s_doceneacommon/doc/eltf_params_updated.xml" | ||
12 | xmlns:xi="http://www.w3.org/2001/XInclude" | ||
13 | xpointer="element(EneaLinux_REL_VER/1)" /></subtitle> | ||
14 | |||
15 | <!-- OLINKDBPATH_USED_BY_XMLMIND ../../s_docbuild/olinkdb --> | ||
16 | |||
17 | <xi:include href="../../s_docbuild/template/docsrc_common/bookinfo_userdoc.xml" | ||
18 | xmlns:xi="http://www.w3.org/2001/XInclude" /> | ||
19 | |||
20 | <xi:include href="overview.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> | ||
21 | |||
22 | <xi:include href="getting_started.xml" | ||
23 | xmlns:xi="http://www.w3.org/2001/XInclude" /> | ||
24 | |||
25 | <xi:include href="components.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> | ||
26 | |||
27 | <xi:include href="automation_framework_test_harness.xml" | ||
28 | xmlns:xi="http://www.w3.org/2001/XInclude" /> | ||
29 | |||
30 | <xi:include href="troubleshooting_guide.xml" | ||
31 | xmlns:xi="http://www.w3.org/2001/XInclude" /> | ||
32 | </book> \ No newline at end of file | ||
diff --git a/doc/book-enea-edge-auto-fw-th-user-guide/doc/components.xml b/doc/book-enea-edge-auto-fw-th-user-guide/doc/components.xml new file mode 100644 index 0000000..94ee384 --- /dev/null +++ b/doc/book-enea-edge-auto-fw-th-user-guide/doc/components.xml | |||
@@ -0,0 +1,141 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <chapter id="components"> | ||
3 | <title>Components</title> | ||
4 | |||
5 | <para>An overview of the Enea Edge Runtime and the Edge Management in | ||
6 | cooperation with the Enea Edge Automation Framework and Test Harness, will | ||
7 | be presented in detail.</para> | ||
8 | |||
9 | <figure> | ||
10 | <title>Component Overview</title> | ||
11 | |||
12 | <mediaobject> | ||
13 | <imageobject> | ||
14 | <imagedata align="center" contentwidth="600" | ||
15 | fileref="images/autofw_testh_overview.png" /> | ||
16 | </imageobject> | ||
17 | </mediaobject> | ||
18 | </figure> | ||
19 | |||
20 | <section id="enfva_runtime_plt"> | ||
21 | <title>Enea Edge</title> | ||
22 | |||
23 | <para>Enea Edge is comprised of the Enea Edge Management application and | ||
24 | Enea Edge Runtime.</para> | ||
25 | |||
26 | <section id="eucpe_manager"> | ||
27 | <title>Enea Edge Management</title> | ||
28 | |||
29 | <para>The Enea Edge Management application needs to be installed on a | ||
30 | supported platform. Upon installation, the system will be set up to | ||
31 | manage Enea Edge Runtime "devices", these are the virtualized CPE | ||
32 | devices used in testing.</para> | ||
33 | |||
34 | <para>For more on Enea Edge Management installation instructions, please | ||
35 | refer to the section on how to <olink | ||
36 | targetdoc="book_enea_edge_getting_started" | ||
37 | targetptr="install_ucpe_mg">Installing the Enea Edge Management | ||
38 | application in the <xi:include | ||
39 | href="../../s_docbuild/olinkdb/pardoc-names.xml" | ||
40 | xmlns:xi="http://www.w3.org/2001/XInclude" | ||
41 | xpointer="element(book_enea_edge_getting_started/1)" /></olink> | ||
42 | Manual.</para> | ||
43 | </section> | ||
44 | |||
45 | <section id="ena_plat"> | ||
46 | <title>Enea Edge Runtime</title> | ||
47 | |||
48 | <para>One or more uCPE devices running the Enea Edge Runtime are | ||
49 | required as hosts to run the VNF(s). The uCPE device is known to the | ||
50 | Enea Edge Management application as the "VcpeAgent" device | ||
51 | module.</para> | ||
52 | |||
53 | <note> | ||
54 | <para>Before running any use case with the Enea Edge Automation | ||
55 | Framework and Test Harness, make sure the uCPE device(s) have been | ||
56 | added to the Enea Edge Management application.</para> | ||
57 | </note> | ||
58 | |||
59 | <para>Adding a VcpeAgent device can be done via two methods:</para> | ||
60 | |||
61 | <itemizedlist> | ||
62 | <listitem> | ||
63 | <para>Through the Enea Edge Management GUI. Add the device using the | ||
64 | appropriate parameters by launching the UI under | ||
65 | <literal>Devices</literal> -> <literal>Manage</literal> in the | ||
66 | main screen.</para> | ||
67 | </listitem> | ||
68 | |||
69 | <listitem> | ||
70 | <para>REST API. Invoke the Enea Edge Management REST API to add a | ||
71 | device.</para> | ||
72 | </listitem> | ||
73 | </itemizedlist> | ||
74 | |||
75 | <para>For more on Enea Edge installation instructions, please refer to | ||
76 | chapter <olink targetdoc="book_enea_edge_getting_started" | ||
77 | targetptr="prep_usb_ena">Preparing the USB stick for installation of the | ||
78 | Enea Edge Runtime in the <xi:include | ||
79 | href="../../s_docbuild/olinkdb/pardoc-names.xml" | ||
80 | xmlns:xi="http://www.w3.org/2001/XInclude" | ||
81 | xpointer="element(book_enea_edge_getting_started/1)" /></olink> | ||
82 | Manual.</para> | ||
83 | </section> | ||
84 | </section> | ||
85 | |||
86 | <section id="automation"> | ||
87 | <title>Automation Framework</title> | ||
88 | |||
89 | <para>Testing can be performed by running Automation Framework (AF) Python | ||
90 | scripts against the Enea Edge Management REST API (Python samples | ||
91 | supplied). This can be done by using the Python scripts individually or by | ||
92 | using the Python unit-test suite that is able to automatically run | ||
93 | test-cases defined for each available Python script.</para> | ||
94 | |||
95 | <para>In either case, it is desirable to use a different host (instead of | ||
96 | running the tests on the same system as the Enea Edge Management | ||
97 | application) in order to ensure that the Enea Edge Management application | ||
98 | is setup and installed correctly in terms of allowing external users to | ||
99 | access it and use it effectively.</para> | ||
100 | </section> | ||
101 | |||
102 | <section id="harness"> | ||
103 | <title>Test Harness</title> | ||
104 | |||
105 | <para>The Test Harness (TH) provides a way for driving configuration with | ||
106 | Ansible Playbooks, by running the python modules from the Automation | ||
107 | Framework and by direct connection over SSH to the boards that run Enea | ||
108 | Edge.</para> | ||
109 | |||
110 | <para>The Test Harness includes an automated test suite that | ||
111 | contains:</para> | ||
112 | |||
113 | <itemizedlist> | ||
114 | <listitem> | ||
115 | <para>VNF, Device and Network Smoke Test Cases. A sample test suite | ||
116 | that acts as basic smoke tests for Enea Edge and also as a | ||
117 | sanity-check test suite for the AF and TH.</para> | ||
118 | </listitem> | ||
119 | |||
120 | <listitem> | ||
121 | <para>VNF Deployment and Lifecycle. A sample test suite that verifies | ||
122 | the instantiation, lifecycle control and destruction of a VNF for Enea | ||
123 | Edge.</para> | ||
124 | </listitem> | ||
125 | |||
126 | <listitem> | ||
127 | <para>Service Creation and Lifecycle. A sample test suite that | ||
128 | contains complex test cases showcasing service creation and lifecycle | ||
129 | management.</para> | ||
130 | </listitem> | ||
131 | </itemizedlist> | ||
132 | |||
133 | <para>For details about the test suites or test cases please refer to | ||
134 | chapter <olink targetdoc="book_enea_edge_system_test_specification" | ||
135 | targetptr="sample_testcases">Sample Test Cases in the <xi:include | ||
136 | href="../../s_docbuild/olinkdb/pardoc-names.xml" | ||
137 | xmlns:xi="http://www.w3.org/2001/XInclude" | ||
138 | xpointer="element(book_enea_edge_system_test_specification/1)" /></olink> | ||
139 | Manual.</para> | ||
140 | </section> | ||
141 | </chapter> \ No newline at end of file | ||
diff --git a/doc/book-enea-edge-auto-fw-th-user-guide/doc/getting_started.xml b/doc/book-enea-edge-auto-fw-th-user-guide/doc/getting_started.xml new file mode 100644 index 0000000..255138b --- /dev/null +++ b/doc/book-enea-edge-auto-fw-th-user-guide/doc/getting_started.xml | |||
@@ -0,0 +1,241 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <chapter id="getting_started"> | ||
3 | <title>Getting Started with the Enea Edge Automation Framework and Test | ||
4 | Harness</title> | ||
5 | |||
6 | <section id="prerequisites"> | ||
7 | <title>Prerequisites</title> | ||
8 | |||
9 | <para>For installation of the Enea Edge Automation Framework and Test | ||
10 | Harness a CentOS 7 host machine is needed with support for:</para> | ||
11 | |||
12 | <itemizedlist> | ||
13 | <listitem> | ||
14 | <para>Python 2.7.</para> | ||
15 | </listitem> | ||
16 | |||
17 | <listitem> | ||
18 | <para>EPEL Repository:<programlisting>sudo yum install epel-release</programlisting></para> | ||
19 | </listitem> | ||
20 | |||
21 | <listitem> | ||
22 | <para>PIP package manager: <programlisting>sudo yum -y install python-pip</programlisting></para> | ||
23 | </listitem> | ||
24 | |||
25 | <listitem> | ||
26 | <para><literal>Virtualenv</literal> tool: <programlisting>sudo pip install virtualenv</programlisting></para> | ||
27 | </listitem> | ||
28 | </itemizedlist> | ||
29 | |||
30 | <note> | ||
31 | <para>The Enea Edge Automation Framework and Test Harness installation | ||
32 | may be done on the same machine used for the Enea Edge Management | ||
33 | installation, although this is not encouraged. For more details see | ||
34 | section <olink targetdoc="book_enea_edge_auto_fw_th_user_guide" | ||
35 | targetptr="automation">Automation Framework in the <xi:include | ||
36 | href="../../s_docbuild/olinkdb/pardoc-names.xml" | ||
37 | xmlns:xi="http://www.w3.org/2001/XInclude" | ||
38 | xpointer="element(book_enea_edge_auto_fw_th_user_guide/1)" /></olink>.</para> | ||
39 | </note> | ||
40 | </section> | ||
41 | |||
42 | <section id="envrion"> | ||
43 | <title>Environment</title> | ||
44 | |||
45 | <para><figure> | ||
46 | <title>Lab setup overview for Basic Setup</title> | ||
47 | |||
48 | <mediaobject> | ||
49 | <imageobject> | ||
50 | <imagedata align="center" contentwidth="600" | ||
51 | fileref="images/environment_basicsetup.png" /> | ||
52 | </imageobject> | ||
53 | </mediaobject> | ||
54 | </figure>The following enviroment setup is needed for running all tests | ||
55 | defined in the <xi:include | ||
56 | href="../../s_docbuild/olinkdb/pardoc-common.xml" | ||
57 | xmlns:xi="http://www.w3.org/2001/XInclude" | ||
58 | xpointer="element(book_enea_edge_system_test_specification/1)" /> | ||
59 | Manual:</para> | ||
60 | |||
61 | <para><emphasis role="bold">Lab Network | ||
62 | Requirements</emphasis><itemizedlist spacing="compact"> | ||
63 | <listitem> | ||
64 | <para>DHCP enabled.</para> | ||
65 | </listitem> | ||
66 | |||
67 | <listitem> | ||
68 | <para>Internet Connectivity.</para> | ||
69 | </listitem> | ||
70 | </itemizedlist></para> | ||
71 | |||
72 | <para><emphasis role="bold">Enea Edge Management Host | ||
73 | Requirements</emphasis></para> | ||
74 | |||
75 | <itemizedlist spacing="compact"> | ||
76 | <listitem> | ||
77 | <para>Running CentOS 7.</para> | ||
78 | </listitem> | ||
79 | |||
80 | <listitem> | ||
81 | <para>Connected to the Lab Network.</para> | ||
82 | </listitem> | ||
83 | |||
84 | <listitem> | ||
85 | <para>Enea Edge Management application installed.</para> | ||
86 | |||
87 | <note> | ||
88 | <para>For details on how to install the Enea Edge Management | ||
89 | application, see <olink targetdoc="book_enea_edge_getting_started" | ||
90 | targetptr="install_ucpe_mg">Installing the Enea Edge Management | ||
91 | application in the <xi:include | ||
92 | href="../../s_docbuild/olinkdb/pardoc-names.xml" | ||
93 | xmlns:xi="http://www.w3.org/2001/XInclude" | ||
94 | xpointer="element(book_enea_edge_getting_started/1)" /></olink> | ||
95 | Manual.</para> | ||
96 | </note> | ||
97 | </listitem> | ||
98 | </itemizedlist> | ||
99 | |||
100 | <para><emphasis role="bold">uCPE device | ||
101 | Requirements</emphasis><itemizedlist spacing="compact"> | ||
102 | <listitem> | ||
103 | <para>Minimum of 4 Physical Network Devices.</para> | ||
104 | </listitem> | ||
105 | |||
106 | <listitem> | ||
107 | <para>4GB RAM and 4 cores (Intel C3000 or Xeon D).</para> | ||
108 | </listitem> | ||
109 | |||
110 | <listitem> | ||
111 | <para>2 Physical connections to the Lab Network.</para> | ||
112 | </listitem> | ||
113 | |||
114 | <listitem> | ||
115 | <para>Enea Edge Runtime installed.</para> | ||
116 | |||
117 | <note> | ||
118 | <para>For information on how to install Enea Edge Runtime refer to | ||
119 | <olink targetdoc="book_enea_edge_getting_started" | ||
120 | targetptr="prep_usb_ena">Preparing the USB stick for installation | ||
121 | of the Enea Edge Runtime in the <xi:include | ||
122 | href="../../s_docbuild/olinkdb/pardoc-names.xml" | ||
123 | xmlns:xi="http://www.w3.org/2001/XInclude" | ||
124 | xpointer="element(book_enea_edge_getting_started/1)" /></olink> | ||
125 | Manual.</para> | ||
126 | </note> | ||
127 | </listitem> | ||
128 | </itemizedlist><figure> | ||
129 | <title>Lab Setup Overview for ChainedVNFsService</title> | ||
130 | |||
131 | <mediaobject> | ||
132 | <imageobject> | ||
133 | <imagedata align="center" contentwidth="600" | ||
134 | fileref="images/ChainedVNFsService_setup.png" /> | ||
135 | </imageobject> | ||
136 | </mediaobject> | ||
137 | </figure></para> | ||
138 | |||
139 | <para><emphasis role="bold">uCPE device 1 and 2 | ||
140 | Requirements</emphasis><itemizedlist spacing="compact"> | ||
141 | <listitem> | ||
142 | <para>Minimum of 4 Physical Network Devices.</para> | ||
143 | </listitem> | ||
144 | |||
145 | <listitem> | ||
146 | <para>16GB RAM and 8 cores (Intel C3000 or Xeon D).</para> | ||
147 | </listitem> | ||
148 | |||
149 | <listitem> | ||
150 | <para>2 Physical connections to the Lab Network.</para> | ||
151 | </listitem> | ||
152 | |||
153 | <listitem> | ||
154 | <para>1 Physical connection back to back between both uCPE | ||
155 | devices.</para> | ||
156 | </listitem> | ||
157 | |||
158 | <listitem> | ||
159 | <para>Enea Edge Runtime installed.</para> | ||
160 | </listitem> | ||
161 | </itemizedlist></para> | ||
162 | </section> | ||
163 | |||
164 | <section id="initial_setup"> | ||
165 | <title>Installation and Initial Setup</title> | ||
166 | |||
167 | <orderedlist> | ||
168 | <listitem> | ||
169 | <para>Unzip the | ||
170 | <filename>Enea_Edge_AF-TH_<version>-build<build_number>.zip</filename> | ||
171 | archive file, provided by Enea, on a supported host machine.</para> | ||
172 | |||
173 | <para>The directory in which the archive has been unpacked will be | ||
174 | denoted as <literal><AF-TH-installdir></literal>.</para> | ||
175 | </listitem> | ||
176 | |||
177 | <listitem> | ||
178 | <para>Enter the <literal><AF-TH-install-dir></literal> directory | ||
179 | and run the <filename>setup_env.sh</filename> script to do the initial | ||
180 | setup of the Test Harness environment: <programlisting>source setup_env.sh</programlisting></para> | ||
181 | </listitem> | ||
182 | |||
183 | <listitem> | ||
184 | <para>Set up the Enea Edge Management application which will be used | ||
185 | by the TH:</para> | ||
186 | |||
187 | <orderedlist spacing="compact"> | ||
188 | <listitem> | ||
189 | <para>Create the Enea Edge Management JSON config file in the | ||
190 | <literal><AF-TH-install-dir>/uCPEM_config/</literal> | ||
191 | directory:<programlisting>{ | ||
192 | "ucpe_usr":"uCPE Manager Username", | ||
193 | "ucpe_pass":"uCPE Manager Password", | ||
194 | "ucpe_host":"uCPE Manager IP/Hostname", | ||
195 | "ftp_usr":"FTP Username", | ||
196 | "ftp_pass":"FTP Password", | ||
197 | "ftp_port":"FTP Port" | ||
198 | }</programlisting>See the | ||
199 | <filename><AF-TH-install-dir>/uCPEM_config/ucpem01.json</filename> | ||
200 | file as an example.</para> | ||
201 | </listitem> | ||
202 | |||
203 | <listitem> | ||
204 | <para>Run the <filename>setupuCPEManager.yml</filename> Ansible | ||
205 | Playbook with the JSON config path as a parameter: | ||
206 | <programlisting>ansible-playbook playbooks/setupuCPEManager.yml -e\ | ||
207 | "@uCPEM_config/<config_name>.json"</programlisting></para> | ||
208 | |||
209 | <para><emphasis role="bold">Example</emphasis> <programlisting>ansible-playbook playbooks/setupuCPEManager.yml -e\ | ||
210 | "@uCPEM_config/ucpem01.json"</programlisting></para> | ||
211 | </listitem> | ||
212 | </orderedlist> | ||
213 | </listitem> | ||
214 | </orderedlist> | ||
215 | |||
216 | <note> | ||
217 | <para>The steps presented in this section are to be executed only once, | ||
218 | for the initial setup of the TH environment.</para> | ||
219 | </note> | ||
220 | |||
221 | <para>After the initial setup, each session ends by closing the Python | ||
222 | virtual environment through running <literal>deactivate</literal> from the | ||
223 | <literal><AF-THinstall-dir></literal> directory.</para> | ||
224 | |||
225 | <para>Subsequent use of the installation requires activating the Python | ||
226 | virtual enviroment before using the Enea Edge Automation Framework and | ||
227 | Test Harness: <literal>source | ||
228 | <AF-TH-install-dir>/testHarness-venv/bin/activate</literal>.</para> | ||
229 | |||
230 | <para>Furthermore, if a user wants to use a new Enea Edge Management | ||
231 | instance for a new session, the user also has to re-run the | ||
232 | <filename>setupuCPEManager.yml</filename> playbook with the corresponding | ||
233 | JSON config for the new Enea Edge Management instance.</para> | ||
234 | |||
235 | <note> | ||
236 | <para>Enea Edge Automation Framework and Test Harness History | ||
237 | Information can be found in the AF&TH CHANGELOG file available in: | ||
238 | <filename><AF-TH-install-dir>/CHANGELOG</filename></para> | ||
239 | </note> | ||
240 | </section> | ||
241 | </chapter> \ No newline at end of file | ||
diff --git a/doc/book-enea-edge-auto-fw-th-user-guide/doc/images/ChainedVNFsService_setup.png b/doc/book-enea-edge-auto-fw-th-user-guide/doc/images/ChainedVNFsService_setup.png new file mode 100755 index 0000000..0329450 --- /dev/null +++ b/doc/book-enea-edge-auto-fw-th-user-guide/doc/images/ChainedVNFsService_setup.png | |||
Binary files differ | |||
diff --git a/doc/book-enea-edge-auto-fw-th-user-guide/doc/images/autofw_testh_overview.png b/doc/book-enea-edge-auto-fw-th-user-guide/doc/images/autofw_testh_overview.png new file mode 100755 index 0000000..a384877 --- /dev/null +++ b/doc/book-enea-edge-auto-fw-th-user-guide/doc/images/autofw_testh_overview.png | |||
Binary files differ | |||
diff --git a/doc/book-enea-edge-auto-fw-th-user-guide/doc/images/environment_basicsetup.png b/doc/book-enea-edge-auto-fw-th-user-guide/doc/images/environment_basicsetup.png new file mode 100755 index 0000000..c30dcfd --- /dev/null +++ b/doc/book-enea-edge-auto-fw-th-user-guide/doc/images/environment_basicsetup.png | |||
Binary files differ | |||
diff --git a/doc/book-enea-edge-auto-fw-th-user-guide/doc/overview.xml b/doc/book-enea-edge-auto-fw-th-user-guide/doc/overview.xml new file mode 100644 index 0000000..1d07512 --- /dev/null +++ b/doc/book-enea-edge-auto-fw-th-user-guide/doc/overview.xml | |||
@@ -0,0 +1,182 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <chapter id="overview"> | ||
3 | <title>Overview</title> | ||
4 | |||
5 | <para>This document describes the Enea Edge Automation Framework and Test | ||
6 | Harness, along with instructions regarding the necessary steps to run these | ||
7 | software tools.</para> | ||
8 | |||
9 | <section id="descrip"> | ||
10 | <title>Description</title> | ||
11 | |||
12 | <para>The Automation Framework provides a way for driving configuration | ||
13 | with Python scripting. It complements the Enea Edge Management GUI and | ||
14 | uses the northbound REST APIs, given to provide full usability of the Enea | ||
15 | Management features.</para> | ||
16 | |||
17 | <para>The Test Harness is based on running Ansible Playbooks to complete | ||
18 | different test cases, which make use of the Automation Framework Python | ||
19 | modules and/or direct commands on the uCPE devices running the Enea Edge | ||
20 | Runtime.</para> | ||
21 | </section> | ||
22 | |||
23 | <section id="def_acro"> | ||
24 | <title>Definitions and Acronyms</title> | ||
25 | |||
26 | <table> | ||
27 | <title>Definitions</title> | ||
28 | |||
29 | <tgroup cols="2"> | ||
30 | <colspec align="left" /> | ||
31 | |||
32 | <thead> | ||
33 | <row> | ||
34 | <entry align="center">Component</entry> | ||
35 | |||
36 | <entry align="center">Description</entry> | ||
37 | </row> | ||
38 | </thead> | ||
39 | |||
40 | <tbody> | ||
41 | <row> | ||
42 | <entry>Enea Edge</entry> | ||
43 | |||
44 | <entry>The Enea Edge Runtime and the Enea Edge Management.</entry> | ||
45 | </row> | ||
46 | </tbody> | ||
47 | </tgroup> | ||
48 | </table> | ||
49 | |||
50 | <table> | ||
51 | <title>Acronyms</title> | ||
52 | |||
53 | <tgroup cols="2"> | ||
54 | <colspec align="left" /> | ||
55 | |||
56 | <thead> | ||
57 | <row> | ||
58 | <entry align="center">Component</entry> | ||
59 | |||
60 | <entry align="center">Description</entry> | ||
61 | </row> | ||
62 | </thead> | ||
63 | |||
64 | <tbody> | ||
65 | <row> | ||
66 | <entry>AF</entry> | ||
67 | |||
68 | <entry>Automation Framework for Enea Edge.</entry> | ||
69 | </row> | ||
70 | |||
71 | <row> | ||
72 | <entry>API</entry> | ||
73 | |||
74 | <entry>Application Programming Interface.</entry> | ||
75 | </row> | ||
76 | |||
77 | <row> | ||
78 | <entry>DHCP</entry> | ||
79 | |||
80 | <entry>Dynamic Host Configuration Protocol.</entry> | ||
81 | </row> | ||
82 | |||
83 | <row> | ||
84 | <entry>DPDK</entry> | ||
85 | |||
86 | <entry>Data Plane Development Kit.</entry> | ||
87 | </row> | ||
88 | |||
89 | <row> | ||
90 | <entry>FTP</entry> | ||
91 | |||
92 | <entry>File Transfer Protocol.</entry> | ||
93 | </row> | ||
94 | |||
95 | <row> | ||
96 | <entry>GUI</entry> | ||
97 | |||
98 | <entry>Graphical User Interface.</entry> | ||
99 | </row> | ||
100 | |||
101 | <row> | ||
102 | <entry>IP</entry> | ||
103 | |||
104 | <entry>Internet Protocol.</entry> | ||
105 | </row> | ||
106 | |||
107 | <row> | ||
108 | <entry>JSON</entry> | ||
109 | |||
110 | <entry>JavaScript Object Notation.</entry> | ||
111 | </row> | ||
112 | |||
113 | <row> | ||
114 | <entry>NIC</entry> | ||
115 | |||
116 | <entry>Network Interface Card.</entry> | ||
117 | </row> | ||
118 | |||
119 | <row> | ||
120 | <entry>NETCONF</entry> | ||
121 | |||
122 | <entry>Network Configuration Protocol.</entry> | ||
123 | </row> | ||
124 | |||
125 | <row> | ||
126 | <entry>NFV</entry> | ||
127 | |||
128 | <entry>Network Functions Virtualization.</entry> | ||
129 | </row> | ||
130 | |||
131 | <row> | ||
132 | <entry>OVS</entry> | ||
133 | |||
134 | <entry>Open vSwitch.</entry> | ||
135 | </row> | ||
136 | |||
137 | <row> | ||
138 | <entry>REST</entry> | ||
139 | |||
140 | <entry>Representational State Transfer.</entry> | ||
141 | </row> | ||
142 | |||
143 | <row> | ||
144 | <entry>SR-IOV</entry> | ||
145 | |||
146 | <entry>Single Root Input/Output Virtualization.</entry> | ||
147 | </row> | ||
148 | |||
149 | <row> | ||
150 | <entry>SSH</entry> | ||
151 | |||
152 | <entry>Secure Shell.</entry> | ||
153 | </row> | ||
154 | |||
155 | <row> | ||
156 | <entry>TH</entry> | ||
157 | |||
158 | <entry>Test Harness for Enea Edge.</entry> | ||
159 | </row> | ||
160 | |||
161 | <row> | ||
162 | <entry>Enea Edge Management</entry> | ||
163 | |||
164 | <entry>Enea Universal Customer Premises Equipment Manager.</entry> | ||
165 | </row> | ||
166 | |||
167 | <row> | ||
168 | <entry>VCPE</entry> | ||
169 | |||
170 | <entry>Virtual Customer Premises Equipment.</entry> | ||
171 | </row> | ||
172 | |||
173 | <row> | ||
174 | <entry>VNF</entry> | ||
175 | |||
176 | <entry>Virtualized Network Function.</entry> | ||
177 | </row> | ||
178 | </tbody> | ||
179 | </tgroup> | ||
180 | </table> | ||
181 | </section> | ||
182 | </chapter> \ No newline at end of file | ||
diff --git a/doc/book-enea-edge-auto-fw-th-user-guide/doc/troubleshooting_guide.xml b/doc/book-enea-edge-auto-fw-th-user-guide/doc/troubleshooting_guide.xml new file mode 100644 index 0000000..1ed4d92 --- /dev/null +++ b/doc/book-enea-edge-auto-fw-th-user-guide/doc/troubleshooting_guide.xml | |||
@@ -0,0 +1,43 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <chapter id="troubleshooting_guide"> | ||
3 | <title>Troubleshooting Guide</title> | ||
4 | |||
5 | <para>The following are best practices and possible solutions to problems | ||
6 | that may occur during operation:</para> | ||
7 | |||
8 | <itemizedlist> | ||
9 | <listitem> | ||
10 | <para>All the Playbooks have to be run from the root directory of the | ||
11 | Test Harness (TH) to avoid failures such as "File not found!", since the | ||
12 | paths to the required configuration files are hardcoded into the | ||
13 | Playbooks.</para> | ||
14 | </listitem> | ||
15 | |||
16 | <listitem> | ||
17 | <para>If the <literal>setup_env.sh</literal> fails, for debugging remove | ||
18 | <literal>&> /dev/null</literal> from the failed command. The | ||
19 | output of the command will be printed, and will not be redirected to | ||
20 | <literal>/dev/null</literal> anymore.</para> | ||
21 | </listitem> | ||
22 | |||
23 | <listitem> | ||
24 | <para>When setting up the Enea Edge Management application to be used by | ||
25 | the TH through the <literal>setupuCPEManager.yml</literal> Playbook, if | ||
26 | the uCPE username/password/host are incorrect or are missing, all the | ||
27 | Sample test cases will fail. If the FTP username/password/port are wrong | ||
28 | or are missing, the tests that require file transfer to the Enea Edge | ||
29 | Management application will fail.</para> | ||
30 | </listitem> | ||
31 | |||
32 | <listitem> | ||
33 | <para>Ansible logs are not written into the | ||
34 | <literal>log/ansible.log</literal> file when the | ||
35 | <literal>stdout_callback</literal> is set to | ||
36 | <literal>selective</literal> in the <literal>ansible.cfg</literal> file. | ||
37 | For debugging, check the python logs from the | ||
38 | <literal>log/debug.log</literal> file or change the | ||
39 | <literal>stdout_callback</literal> to <literal>debug</literal> and rerun | ||
40 | the test.</para> | ||
41 | </listitem> | ||
42 | </itemizedlist> | ||
43 | </chapter> \ No newline at end of file | ||
diff --git a/doc/book-enea-edge-auto-fw-th-user-guide/swcomp.mk b/doc/book-enea-edge-auto-fw-th-user-guide/swcomp.mk new file mode 100755 index 0000000..d17c2b3 --- /dev/null +++ b/doc/book-enea-edge-auto-fw-th-user-guide/swcomp.mk | |||
@@ -0,0 +1,10 @@ | |||
1 | # Component build specification | ||
2 | |||
3 | # Version of THIS book | ||
4 | BOOK_VER ?= $(REL_VER)-dev | ||
5 | |||
6 | DOCBOOK_SRC := $(COMP)/swcomp.mk $(COMP)/doc/book.xml $(shell find $(COMP)/doc -type f \( -name "*.xml" -o -name "*.svg" -o -name "*.png" \) ! -name "book.xml" -print) | ||
7 | |||
8 | BOOKPACKAGES := book-enea-edge-auto-fw-th-user-guide | ||
9 | BOOKDESC_$(BOOKPACKAGES) := "Enea Enea Edge $(PROD_VER) Automation Framework and Test Harness User Guide" | ||
10 | BOOKDEFAULTCONDITION := $(DEFAULTCONDITIONS) | ||