diff options
Diffstat (limited to 'doc/book-enea-nfv-access-auto-fw-th-user-guide/doc')
-rw-r--r-- | doc/book-enea-nfv-access-auto-fw-th-user-guide/doc/automation_framework_test_harness.xml | 310 |
1 files changed, 308 insertions, 2 deletions
diff --git a/doc/book-enea-nfv-access-auto-fw-th-user-guide/doc/automation_framework_test_harness.xml b/doc/book-enea-nfv-access-auto-fw-th-user-guide/doc/automation_framework_test_harness.xml index 888db4a..b7de1af 100644 --- a/doc/book-enea-nfv-access-auto-fw-th-user-guide/doc/automation_framework_test_harness.xml +++ b/doc/book-enea-nfv-access-auto-fw-th-user-guide/doc/automation_framework_test_harness.xml | |||
@@ -2007,12 +2007,14 @@ Options: | |||
2007 | <filename>installAndActivate</filename> Python module.</para> | 2007 | <filename>installAndActivate</filename> Python module.</para> |
2008 | 2008 | ||
2009 | <para><emphasis role="bold">Sample unit-test JSON file | 2009 | <para><emphasis role="bold">Sample unit-test JSON file |
2010 | format:</emphasis><programlisting>[ | 2010 | format:</emphasis></para> |
2011 | |||
2012 | <programlisting>[ | ||
2011 | { | 2013 | { |
2012 | "name": "Install and activate NFVA image on uCPE device from uCPE Manager", | 2014 | "name": "Install and activate NFVA image on uCPE device from uCPE Manager", |
2013 | "args": "-i enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2 -t xeon_d -d inteld1521-16" | 2015 | "args": "-i enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2 -t xeon_d -d inteld1521-16" |
2014 | } | 2016 | } |
2015 | ]</programlisting></para> | 2017 | ]</programlisting> |
2016 | </section> | 2018 | </section> |
2017 | 2019 | ||
2018 | <section id="pymod_install_activate"> | 2020 | <section id="pymod_install_activate"> |
@@ -2117,6 +2119,310 @@ Options: | |||
2117 | 2020-02-28 12:51:56,025 - DEBUG: Logging out and exiting...</programlisting> | 2119 | 2020-02-28 12:51:56,025 - DEBUG: Logging out and exiting...</programlisting> |
2118 | </section> | 2120 | </section> |
2119 | </section> | 2121 | </section> |
2122 | |||
2123 | <section id="upload_custom_script"> | ||
2124 | <title>Uploading a Custom Script to the uCPE Manager</title> | ||
2125 | |||
2126 | <para>Steps and options on how to upload a custom script to the uCPE | ||
2127 | Manager are described below.</para> | ||
2128 | |||
2129 | <section id="script_opts_upload_custom_script"> | ||
2130 | <title>Script Options</title> | ||
2131 | |||
2132 | <programlisting>$ python customScripts/upload.py -h | ||
2133 | 2020-04-14 10:26:23,582 - INFO: Upload Custom Script | ||
2134 | Usage: upload.py [options] | ||
2135 | |||
2136 | Add a Custom Script to Enea uCPE Manager | ||
2137 | |||
2138 | Options: | ||
2139 | --version show program's version number and exit | ||
2140 | -h, --help show this help message and exit | ||
2141 | -u USERNAME, --username=USERNAME | ||
2142 | Enea uCPE Manager login username | ||
2143 | -p PASSWORD, --password=PASSWORD | ||
2144 | Enea uCPE Manager login password | ||
2145 | -H HOST, --host=HOST Enea uCPE Manager host name or IP address | ||
2146 | -f CUSTOMSCRIPT, --file=CUSTOMSCRIPT | ||
2147 | Custom Script File | ||
2148 | -e PHASE, --phase=PHASE | ||
2149 | Execution phase. Must be one of the following: once- | ||
2150 | before-startup | always-before-startup | once-after- | ||
2151 | startup | always-after-startup | ||
2152 | |||
2153 | Mandatory options: | ||
2154 | -H/--host, -f/--file, -e/--phase</programlisting> | ||
2155 | </section> | ||
2156 | |||
2157 | <section id="json_upload_custom_script"> | ||
2158 | <title>Configuring the JSON File</title> | ||
2159 | |||
2160 | <para>The JSON configuration file needed to upload a Custom Script to | ||
2161 | the uCPE Manager must contain a list of dictionaries. Each dictionary | ||
2162 | indicates the test case name and the test case arguments passed to the | ||
2163 | <filename>customScripts/upload</filename> Python module.</para> | ||
2164 | |||
2165 | <para><emphasis role="bold">Sample unit-test JSON file | ||
2166 | format:</emphasis></para> | ||
2167 | |||
2168 | <programlisting>[ | ||
2169 | { | ||
2170 | "name": "Uploading a Custom Script to the uCPE Manager", | ||
2171 | "args": "-f ../../lab_config/customScripts/test_success_after_always \ | ||
2172 | -e always-after-startup" | ||
2173 | } | ||
2174 | ]</programlisting> | ||
2175 | </section> | ||
2176 | |||
2177 | <section id="pymod_upload_custom_script"> | ||
2178 | <title>Running the Python Module</title> | ||
2179 | |||
2180 | <para>The <filename>customScripts/upload</filename> Python module can | ||
2181 | be executed individually by running the following command line:</para> | ||
2182 | |||
2183 | <programlisting>$ python automation_framework/customScripts/upload.py \ | ||
2184 | -f lab_config/customScripts/test_success_after_always -e always-after-startup | ||
2185 | 2020-04-14 14:08:02,824 - DEBUG: Started logging | ||
2186 | 2020-04-14 14:08:02,915 - INFO: Upload Custom Script | ||
2187 | 2020-04-14 14:08:02,994 - DEBUG: Login successful on host '172.24.3.109' | ||
2188 | 2020-04-14 14:08:02,995 - DEBUG: Session token is: 97544990-7e48-11ea-835c-02423a1c239f | ||
2189 | 2020-04-14 14:08:02,996 - DEBUG: Upload test_success_after_always to uCPE Manager. \ | ||
2190 | Content: #!/bin/bash | ||
2191 | echo test_success_after_always | ||
2192 | 2020-04-14 14:08:03,138 - INFO: Done | ||
2193 | 2020-04-14 14:08:03,169 - DEBUG: Logging out and exiting...</programlisting> | ||
2194 | </section> | ||
2195 | </section> | ||
2196 | |||
2197 | <section id="upload_custom_script_device"> | ||
2198 | <title>Uploading a Custom Script from the uCPE Manager to a | ||
2199 | Device</title> | ||
2200 | |||
2201 | <para>Steps and options on how to upload a custom script from the uCPE | ||
2202 | Manager to a Device are described below.</para> | ||
2203 | |||
2204 | <section id="script_opts_upload_custom_script_device"> | ||
2205 | <title>Script Options</title> | ||
2206 | |||
2207 | <programlisting>$ python customScripts/uploadOnDevice.py -h | ||
2208 | 2020-04-14 10:27:05,614 - INFO: Upload Custom Script on Device | ||
2209 | Usage: uploadOnDevice.py [options] | ||
2210 | |||
2211 | Add a Custom Script to a Device | ||
2212 | |||
2213 | Options: | ||
2214 | --version show program's version number and exit | ||
2215 | -h, --help show this help message and exit | ||
2216 | -u USERNAME, --username=USERNAME | ||
2217 | Enea uCPE Manager login username | ||
2218 | -p PASSWORD, --password=PASSWORD | ||
2219 | Enea uCPE Manager login password | ||
2220 | -H HOST, --host=HOST Enea uCPE Manager host name or IP address | ||
2221 | -c CUSTOMSCRIPTNAME, --customScriptName=CUSTOMSCRIPTNAME | ||
2222 | Custom Script Name that resides on Enea uCPE Manager | ||
2223 | -e PHASE, --phase=PHASE | ||
2224 | Execution phase. Must be one of the following: once- | ||
2225 | before-startup | always-before-startup | once-after- | ||
2226 | startup | always-after-startup | ||
2227 | -n DEVICENAME, --device-name=DEVICENAME | ||
2228 | Name of the device | ||
2229 | -r, --reboot Reboot the device after uploading | ||
2230 | |||
2231 | Mandatory options: | ||
2232 | -H/--host, -c/--customScriptName, -e/--phase, -n/--device-name</programlisting> | ||
2233 | </section> | ||
2234 | |||
2235 | <section id="json_upload_custom_script_device"> | ||
2236 | <title>Configuring the JSON File</title> | ||
2237 | |||
2238 | <para>The JSON configuration file needed to upload a Custom Script | ||
2239 | from the uCPE Manager to a Device must contain a list of dictionaries. | ||
2240 | Each dictionary indicates the test case name and the test case | ||
2241 | arguments passed to the | ||
2242 | <filename>customScripts/uploadOnDevice</filename> Python | ||
2243 | module.</para> | ||
2244 | |||
2245 | <para><emphasis role="bold">Sample unit-test JSON file | ||
2246 | format:</emphasis></para> | ||
2247 | |||
2248 | <programlisting>[ | ||
2249 | { | ||
2250 | "name": "Uploading a Custom Script from uCPE Manager to device", | ||
2251 | "args": "-c test_success_after_always -e always-after-startup -n inteld1521-6" | ||
2252 | } | ||
2253 | ]</programlisting> | ||
2254 | </section> | ||
2255 | |||
2256 | <section id="pymod_upload_custom_script_device"> | ||
2257 | <title>Running the Python Module</title> | ||
2258 | |||
2259 | <para>The <filename>customScripts/uploadOnDevice</filename> Python | ||
2260 | module can be executed individually by running the following command | ||
2261 | line:</para> | ||
2262 | |||
2263 | <programlisting>$ python automation_framework/customScripts/uploadOnDevice.py -c \ | ||
2264 | test_success_after_always -e always-after-startup -n inteld1521-6 | ||
2265 | 2020-04-14 14:26:26,205 - DEBUG: Started logging | ||
2266 | 2020-04-14 14:26:26,206 - INFO: Upload Custom Script on Device | ||
2267 | 2020-04-14 14:26:26,251 - DEBUG: Login successful on host '172.24.3.109' | ||
2268 | 2020-04-14 14:26:26,252 - DEBUG: Session token is: 28ebcb10-7e4b-11ea-835c-02423a1c239f | ||
2269 | 2020-04-14 14:26:26,286 - DEBUG: Found device with name 'inteld1521-6' | ||
2270 | 2020-04-14 14:26:26,287 - DEBUG: Upload test_success_after_always to inteld1521-6 | ||
2271 | 2020-04-14 14:26:26,314 - INFO: Done | ||
2272 | 2020-04-14 14:26:26,341 - DEBUG: Logging out and exiting...</programlisting> | ||
2273 | </section> | ||
2274 | </section> | ||
2275 | |||
2276 | <section id="delete_custom_script"> | ||
2277 | <title>Removing a Custom Script from the uCPE Manager</title> | ||
2278 | |||
2279 | <para>Steps and options on how to remove a custom script from the uCPE | ||
2280 | Manager are described below.</para> | ||
2281 | |||
2282 | <section id="script_opts_delete_custom_script"> | ||
2283 | <title>Script Options</title> | ||
2284 | |||
2285 | <programlisting>$ python customScripts/delete.py -h | ||
2286 | 2020-04-14 14:36:52,010 - INFO: Delete Custom Script on uCPE Manager | ||
2287 | Usage: delete.py [options] | ||
2288 | |||
2289 | Delete a Custom Script from a Device | ||
2290 | |||
2291 | Options: | ||
2292 | --version show program's version number and exit | ||
2293 | -h, --help show this help message and exit | ||
2294 | -u USERNAME, --username=USERNAME | ||
2295 | Enea uCPE Manager login username | ||
2296 | -p PASSWORD, --password=PASSWORD | ||
2297 | Enea uCPE Manager login password | ||
2298 | -H HOST, --host=HOST Enea uCPE Manager host name or IP address | ||
2299 | -c CUSTOMSCRIPTNAME, --customScriptName=CUSTOMSCRIPTNAME | ||
2300 | Custom Script Name that resides on a Device | ||
2301 | -e PHASE, --phase=PHASE | ||
2302 | Execution phase. Must be one of the following: once- | ||
2303 | before-startup | always-before-startup | once-after- | ||
2304 | startup | always-after-startup | ||
2305 | |||
2306 | Mandatory options: | ||
2307 | -H/--host, -e/--phase</programlisting> | ||
2308 | </section> | ||
2309 | |||
2310 | <section id="json_delete_custom_script"> | ||
2311 | <title>Configuring the JSON File</title> | ||
2312 | |||
2313 | <para>The JSON configuration file needed to remove a Custom Script | ||
2314 | from the uCPE Manager<remark>did you mean device or uCPE | ||
2315 | Manager?</remark> must contain a list of dictionaries. Each dictionary | ||
2316 | indicates the test case name and the test case arguments passed to the | ||
2317 | <filename>customScripts/delete</filename> Python module.</para> | ||
2318 | |||
2319 | <para><emphasis role="bold">Sample unit-test JSON file | ||
2320 | format:</emphasis></para> | ||
2321 | |||
2322 | <programlisting>[ | ||
2323 | { | ||
2324 | "name": "Removing a Custom Script from uCPE Manager", | ||
2325 | "args": "-c test_success_after_always -e always-after-startup" | ||
2326 | } | ||
2327 | ]</programlisting> | ||
2328 | </section> | ||
2329 | |||
2330 | <section id="pymod_delete_custom_script"> | ||
2331 | <title>Running the Python Module</title> | ||
2332 | |||
2333 | <para>The <filename>customScripts/delete</filename> Python module can | ||
2334 | be executed individually by running the following command line:</para> | ||
2335 | |||
2336 | <programlisting>$ python automation_framework/customScripts/delete.py -c \ | ||
2337 | test_success_after_always -e always-after-startup | ||
2338 | 2020-04-14 14:39:22,042 - DEBUG: Started logging | ||
2339 | 2020-04-14 14:39:22,042 - INFO: Delete Custom Script on uCPE Manager | ||
2340 | 2020-04-14 14:39:22,081 - DEBUG: Login successful on host '172.24.3.109' | ||
2341 | 2020-04-14 14:39:22,082 - DEBUG: Session token is: f75a83a0-7e4c-11ea-835c-02423a1c239f | ||
2342 | 2020-04-14 14:39:22,099 - DEBUG: Found custom script: 'test_success_after_always' | ||
2343 | 2020-04-14 14:39:22,099 - DEBUG: Delete script test_success_after_always, \ | ||
2344 | phase always-after-startup from uCPE Manager | ||
2345 | 2020-04-14 14:39:22,118 - INFO: Done | ||
2346 | 2020-04-14 14:39:22,135 - DEBUG: Logging out and exiting...</programlisting> | ||
2347 | </section> | ||
2348 | </section> | ||
2349 | |||
2350 | <section id="delete_custom_script_device"> | ||
2351 | <title>Removing a Custom Script from a Device</title> | ||
2352 | |||
2353 | <para>Steps and options on how to remove a custom script from a device | ||
2354 | are described below.</para> | ||
2355 | |||
2356 | <section id="script_opts_delete_custom_script_device"> | ||
2357 | <title>Script Options</title> | ||
2358 | |||
2359 | <programlisting>$ python customScripts/deleteOnDevice.py -h | ||
2360 | 2020-04-14 10:27:23,536 - INFO: Delete Custom Script on Device | ||
2361 | Usage: deleteOnDevice.py [options] | ||
2362 | |||
2363 | Delete a Custom Script from a Device | ||
2364 | |||
2365 | Options: | ||
2366 | --version show program's version number and exit | ||
2367 | -h, --help show this help message and exit | ||
2368 | -u USERNAME, --username=USERNAME | ||
2369 | Enea uCPE Manager login username | ||
2370 | -p PASSWORD, --password=PASSWORD | ||
2371 | Enea uCPE Manager login password | ||
2372 | -H HOST, --host=HOST Enea uCPE Manager host name or IP address | ||
2373 | -c CUSTOMSCRIPTNAME, --customScriptName=CUSTOMSCRIPTNAME | ||
2374 | Custom Script Name that resides on a Device | ||
2375 | -e PHASE, --phase=PHASE | ||
2376 | Execution phase. Must be one of the following: once- | ||
2377 | before-startup | always-before-startup | once-after- | ||
2378 | startup | always-after-startup | ||
2379 | -n DEVICENAME, --device-name=DEVICENAME | ||
2380 | Name of the device | ||
2381 | |||
2382 | Mandatory options: | ||
2383 | -H/--host, -n/--device-name</programlisting> | ||
2384 | </section> | ||
2385 | |||
2386 | <section id="json_delete_custom_script_device"> | ||
2387 | <title>Configuring the JSON File</title> | ||
2388 | |||
2389 | <para>The JSON configuration file needed to remove a Custom Script | ||
2390 | from a device must contain a list of dictionaries. Each dictionary | ||
2391 | indicates the test case name and the test case arguments passed to the | ||
2392 | <filename>customScripts/deleteOnDevice</filename> Python | ||
2393 | module.</para> | ||
2394 | |||
2395 | <para><emphasis role="bold">Sample unit-test JSON file | ||
2396 | format:</emphasis></para> | ||
2397 | |||
2398 | <programlisting>[ | ||
2399 | { | ||
2400 | "name": "Removing a Custom Script from device", | ||
2401 | "args": "-c test_success_after_always -e always-after-startup -n inteld1521-6" | ||
2402 | } | ||
2403 | ]</programlisting> | ||
2404 | </section> | ||
2405 | |||
2406 | <section id="pymod_delete_custom_script_delete"> | ||
2407 | <title>Running the Python Module</title> | ||
2408 | |||
2409 | <para>The <filename>customScripts/deleteOnDevice</filename> Python | ||
2410 | module can be executed individually by running the following command | ||
2411 | line:</para> | ||
2412 | |||
2413 | <programlisting>$ python automation_framework/customScripts/deleteOnDevice.py -c \ | ||
2414 | test_success_after_always -e always-after-startup -n inteld1521-6 | ||
2415 | 2020-04-14 14:33:52,288 - DEBUG: Started logging | ||
2416 | 2020-04-14 14:33:52,288 - INFO: Delete Custom Script on Device | ||
2417 | 2020-04-14 14:33:52,327 - DEBUG: Login successful on host '172.24.3.109' | ||
2418 | 2020-04-14 14:33:52,327 - DEBUG: Session token is: 32cde4f0-7e4c-11ea-835c-02423a1c239f | ||
2419 | 2020-04-14 14:33:52,349 - DEBUG: Found device with name 'inteld1521-6' | ||
2420 | 2020-04-14 14:33:52,349 - DEBUG: Delete test_success_after_always, \ | ||
2421 | phase always-after-startup from inteld1521-6 | ||
2422 | 2020-04-14 14:33:52,373 - INFO: Done | ||
2423 | 2020-04-14 14:33:52,391 - DEBUG: Logging out and exiting...</programlisting> | ||
2424 | </section> | ||
2425 | </section> | ||
2120 | </section> | 2426 | </section> |
2121 | 2427 | ||
2122 | <section id="test_harness"> | 2428 | <section id="test_harness"> |