d46b4169c13667aa7d90999d790f9ab48fb28a36
[nonrtric.git] / test / common / README.md
1 # Introduction #
2
3 This dir contains most scripts needed for the auto-test environment. There are scripts with functions to adapt to the apis of the components of the Non-RT RIC; Policy Managerment Service, Information Coordinator Service , A1 simulator as well as other components and simulators. The test environment supports both test with docker and kubernetes.
4 Some of the scripts can also be used for other kinds of tests, for example basic tests.
5
6 ## Overview for common test scripts and files ##
7
8 `api_curl.sh` \
9 A common curl based function for the a1pms and ics apis. Also partly used for the Callback receiver and RAPP Catalogue apis.
10
11 `cbs_api_function.sh` \
12 All functions are implemented in `consul_api_function.sh`.
13
14 `chartmus_api_functions.sh` \
15 Contains functions for managing a Chartmuseum instance.
16
17 `clean-docker.sh` \
18 Cleans all containers started by the test environment in docker.
19
20 `clean-kube.sh` \
21 Cleans all services, deployments, pods, replica set etc started by the test environment in kubernetes.
22
23 `compare_json.py` \
24 A python script to compare two json obects for equality. Note that the comparsion always sort json-arrays before comparing (that is, it does not care about the order of items within the array). In addition, the target json object may specify individual parameter values where equality is 'dont care'.
25
26 `consul_api_function.sh` \
27 Contains functions for managing Consul and CBS.
28
29 `count_json_elements.py` \
30 A python script calculate the length of json array or size of a json dictionary'.
31
32 `count_json_elements.py` \
33 A python script returning the number of items in a json array.
34
35 `cp_api_function.sh` \
36 Contains functions for managing the Control Panel.
37
38 `cr_api_functions.sh` \
39 Contains functions for adapting towards the Callback receiver for checking received callback events.
40
41 `create_policies_process.py` \
42 A python script to create a batch of policies. The script is intended to run in a number of processes to create policies in parallel.
43
44 `create_rics_json.py` \
45 A python script to create a json file from a formatted string of ric info. Helper for the test enviroment.
46
47 `delete_policies_process.py` \
48 A python script to delete a batch of policies. The script is intended to run in a number of processes to delete policies in parallel.
49
50 `dmaapadp_api_function.sh`
51 Contains funnctions for managing the Dmaap Adapter.
52
53 `dmaapmed_api_function.sh`
54 Contains funnctions for managing the Dmaap Mediator Service.
55
56 `dmaapmr_api_function.sh`
57 All functions are implemented in `mr_api_functions.sh`.
58
59 `do_curl_function.sh`
60 A script for executing a curl call with a specific url and optional payload. It also compare the response with an expected result in terms of response code and optional returned payload. Intended to be used by test script (for example basic test scripts of other components)
61
62 `extract_sdnc_reply.py` \
63 A python script to extract the information from an sdnc (A1 Controller) reply json. Helper for the test environment.
64
65 `genstat.sh` \
66 This script collects container statistics to a file. Works both in docker and kubernetes (only for docker runtime).
67
68 `helmmanager_api_functions.sh` \
69 Contains functions for managing and testing of the Helm Manager.
70
71 `http_proxy_api_functions.sh` \
72 Contains functions for managing the Http Proxy.
73
74 `ics_api_functions.sh` \
75 Contains functions for adapting towards the Information Coordinator Service API.
76
77 `kafkapc_api_functions.sh` \
78 Contains functions for managing the kafka producer/consumer. Kafka is started by the dmaap message router component.
79
80 `kube_proxy_api_functions.sh` \
81 Contains functions for managing the Kube Proxy - to gain access to all services pod inside a kube cluster or all containers in a private docker network.
82
83 `localhelm_api_functions.sh` \
84 Contains functions for helm access on localhost.
85
86 `mr_api_functions.sh` \
87 Contains functions for managing the MR Stub and the Dmaap Message Router
88
89 `ngw_api_functions.sh` \
90 Contains functions for managing the Non-RT RIC Gateway
91
92 `a1pms_api_functions.sh` \
93 Contains functions for adapting towards the Policy Management Service (A1PMS) API, also via dmaap (using a message-router stub interface)
94
95 `prodstub_api_functions.sh` \
96 Contains functions for adapting towards the Producer stub interface - simulates a producer.
97
98 `pvccleaner_api_functions.sh` \
99 Contains functions for managing the PVC Cleaner (used for reset mounted volumes in kubernetes).
100
101 `rc_api_functions.sh` \
102 Contains functions for adapting towards the RAPP Catalogue.
103
104 `ricsim_api_functions.sh` \
105 Contains functions for adapting towards the RIC (A1) simulator admin API.
106
107 `sdnc_api_functions.sh` \
108 Contains functions for adaping towards the SDNC (used as an A1 controller).
109
110 `test_env*.sh` \
111 Common env variables for test in the auto-test dir. All configuration of port numbers, image names and version etc shall be made in this file.
112 Used by the auto test scripts/suites but could be used for other test script as well. The test cases shall be started with the file for the intended target using command line argument '--env-file'.
113
114 `testcase_common.sh` \
115 Common functions for auto test cases in the auto-test dir. This script is the foundation of test auto environment which sets up images and enviroment variables needed by this script as well as the script adapting to the APIs.
116 The included functions are described in detail further below.
117
118 `testengine_config.sh` \
119 Configuration file to setup the applications (components and simulators) the test enviroment handles.
120
121 `testsuite_common.sh` \
122 Common functions for running two or more auto test scripts as a suite.
123
124 ## Integration of a new applicaton ##
125
126 Integration a new application to the test environment involves the following steps.
127
128 * Choose a short name for the application. Should be a uppcase name. For example, the NonRTRIC Gateway has NGW as short name.
129 This short name shall be added to the testengine_config.sh. See that file for detailed instructions.
130
131 * Create a file in this directory using the pattern `<application-name>_api_functions.sh`.
132 This file must implement the following functions used by the test engine. Note that functions must include the application short name in the function name. If the application does not run in kubernetes, then the last three functions in the list can be omitted.
133
134 | Function |
135 |--|
136 | __<app-short_name>_imagesetup |
137 | __<app-short_name>_imagepull |
138 | __<app-short_name>_imagebuild |
139 | __<app-short_name>_image_data |
140 | __<app-short_name>_kube_scale_zero |
141 | __<app-short_name>_kube_scale_zero_and_wait |
142 | __<app-short_name>_kube_delete_all |
143 | __<app-short_name>_store_docker_logs |
144 | __<app-short_name>_initial_setup |
145 | __<app-short_name>_statisics_setup |
146 | __<app-short_name>_test_requirements |
147
148 In addition, all other functions used for testing of the application shall also be added to the file. For example functions to start the application, setting interface parameters as well as functions to send rest call towards the api of the application and validating the result.
149
150 * Add the application variables to api_curl.sh. This file contains a generic function to make rest calls to an api. It also supports switching betweeen direct rest calls or rest calls via messsage router.
151
152 * Create a directory beneath in the simulator-group dir. This new directory shall contain docker-compose files, config files (with or without variable substitutions) and kubernetes resource files.
153
154 All docker-compose files and all kubernetes resource files need to defined special lables. These lables are used by the test enginge to identify containers and resources started and used by the test engine.
155
156 | Label for docker compose | Description |
157 |--|--|
158 | nrttest_app | shall contain the application short name |
159 | nrttest_dp  | shall be set by a variable containing the display name, a short textual description of the applicaion |
160
161 | Label for kubernetes resource | Description |
162 |--|--|
163 | autotest | shall contain the application short name |
164
165 * Add mandatory image(s) and image tag(s) to the appropriate environment files for each release in the file(s) `test_env_<system>-<release-name>`.
166 In addition, all other needed environment shall also be defined in these file.
167
168 # Description of functions in testcase_common.sh #
169
170 ## Script args ##
171
172 The script can be started with these arguments
173
174 | arg list |
175 |--|
176 | `remote\|remote-remove docker\|kube --env-file <environment-filename> [release] [auto-clean] [--stop-at-error] [--ricsim-prefix <prefix> ] [--use-local-image <app-nam>+]  [--use-snapshot-image <app-nam>+] [--use-staging-image <app-nam>+] [--use-release-image <app-nam>+] [--image-repo <repo-address>] [--repo-policy local\|remote] [--cluster-timeout <timeout-in-seconds>]  [--print-stats]` |
177
178 | parameter | description |
179 |-|-|
180 | `remote` | Use images from remote repositories. Can be overridden for individual images using the '--use_xxx' flags |
181 | `remote-remove` | Same as 'remote' but will also try to pull fresh images from remote repositories |
182 | `docker` | Use docker environment for test |
183 | `kuber` | Use kubernetes environment for test. Requires a kubernetes minikube installation |
184 | `--env-file` | The script will use the supplied file to read environment variables from |
185 | `release` | If this flag is given the script will use release version of the images |
186 | `auto-clean` | If the function 'auto_clean_containers' is present in the end of the test script then all containers will be stopped and removed. If 'auto-clean' is not given then the function has no effect |
187 | `--stop-at-error` | The script will stop when the first failed test or configuration |
188 | `--ricsim-prefix <prefix>` | The a1 simulator will use the supplied string as container prefix instead of 'ricsim'. Note that the testscript has to read and use the env var `$RIC_SIM_PREFIX` instead of a hardcoded name of the ric(s). |
189 | `--use-local-image` | The script will use local images for the supplied apps, space separated list of app short names |
190 | `--use-snapshot-image` | The script will use images from the nexus snapshot repo for the supplied apps, space separated list of app short names |
191 | `--use-staging-image` | The script will use images from the nexus staging repo for the supplied apps, space separated list of app short names |
192 | `--use-release-image` | The script will use images from the nexus release repo for the supplied apps, space separated list of app short names |
193 | `--image-repo` |  Url to optional image repo. Only locally built images will be re-tagged and pushed to this repo |
194 | `-repo-policy` |  Policy controlling which images to re-tag and push to image repo in param --image-repo. Can be set to 'local' (push only locally built images) or 'remote' (push locally built images and images from nexus repo). Default is 'local' |
195 | `--cluster-timeout` |  Optional timeout for cluster where it takes time to obtain external ip/host-name. Timeout in seconds |
196 | `--print-stats` |  Prints the number of tests, failed tests, failed configuration and deviations after each individual test or config |
197 | `--override <file>` |  Override setting from the file supplied by --env-file |
198 | `--pre-clean` |  Clean kube resouces when running docker and vice versa |
199 | `--gen-stats`  | Collect container/pod runtime statistics |
200 | `--delete-namespaces`  | Delete kubernetes namespaces before starting tests - but only those created by the test scripts. Kube mode only. Ignored if running with prestarted apps. |
201 | `--delete-containers`  | Delete docker containers before starting tests - but only those created by the test scripts. Docker mode only. |
202 | `--endpoint-stats`  | Collect http endpoint statistics |
203 | `help` | Print this info along with the test script description and the list of app short names supported |
204
205 ## Function: setup_testenvironment ##
206
207 Main function to setup the test environment before any tests are started.
208 Must be called right after sourcing all component scripts.
209 | arg list |
210 |--|
211 | None |
212
213 ## Function: print_result ##
214
215 Print a test report of an auto-test script.
216 | arg list |
217 |--|
218 | None |
219
220 ## Function: start_timer ##
221
222 Start a timer for time measurement. Only one timer can be running.
223 | arg list |
224 |--|
225 | `<timer-message-to-print>` |
226 | None - but any args will be printed (It is good practice to use same args for this function as for the `print_timer`) |
227
228 ## Function: print_timer ##
229
230 Print the value of the timer (in seconds) previously started by 'start_timer'. (Note that timer is still running after this function). The result of the timer as well as the arg to 'start_timer' will also be printed in the test report.
231 | arg list |
232 |--|
233 | None |
234
235 ## Function: deviation ##
236
237 Mark a test as a deviation from the requirements. The list of deviations will be printed in the test report.
238 | arg list |
239 |--|
240 | `<deviation-message-to-print>` |
241
242 | parameter | description |
243 | --------- | ----------- |
244 | `<deviation-message-to-print>` | Any text message describing the deviation. The text will also be printed in the test report. The intention is to mark known deviations, compared to required functionality |
245
246 ## Function: clean_environment ##
247
248 Stop and remove all containers (docker) or resources (kubernetes). Containers not part of the test are not affected (docker only). Removes all resources started by previous kube tests (kube only).
249 | arg list |
250 |--|
251 | None |
252
253 ## Function: auto_clean_containers ##
254
255 Same function as 'clean_environment'. This function has effect only if the test script is started with arg `auto-clean`. This intention is to use this function as the last step in an auto-test script.
256 | arg list |
257 |--|
258 | None |
259
260 ## Function: sleep_wait ##
261
262 Make the script sleep for a number of seconds.
263 | arg list |
264 |--|
265 | `<sleep-time-in-sec> [<any-text-in-quotes-to-be-printed>]` |
266
267 | parameter | description |
268 | --------- | ----------- |
269 | `<sleep-time-in-sec>` | Number of seconds to sleep |
270 | `<any-text-in-quotes-to-be-printed>` | Optional. The text will be printed, if present |
271
272 ## Function: store_logs ##
273
274 Take a snap-shot of all logs for all running containers/pods and stores them in `./logs/<ATC-id>`. All logs will get the specified prefix in the file name. In general, one of the last steps in an auto-test script shall be to call this function. If logs shall be taken several times during a test script, different prefixes shall be used each time.
275 | arg list |
276 |--|
277 | `<logfile-prefix>` |
278
279 | parameter | description |
280 | --------- | ----------- |
281 | `<logfile-prefix>` | Log file prefix  |
282
283 # Description of functions in testsuite_common.sh #
284
285 ## Function: suite_setup ##
286
287 Sets up the test suite and prints out a heading.
288 | arg list |
289 |--|
290 | None |
291
292 ## suite_complete ##
293
294 Print out the overall result of the executed test cases.
295 | arg list |
296 |--|
297 | None |
298
299 # Description of functions in chartmus_api_function.sh #
300
301 ## Function: start_chart_museum ##
302
303 Start the Chart Museum
304 | arg list |
305 |--|
306 | None |
307
308 ## Function: chartmus_upload_test_chart ##
309
310 Upload a package chart to chartmusem
311 | arg list |
312 |--|
313 | `<chart-name>` |
314
315 | parameter | description |
316 | --------- | ----------- |
317 | `<chart-name>` | Name of the chart to upload |
318
319 ## Function: chartmus_delete_test_chart ##
320
321 Delete a chart in chartmusem
322 | arg list |
323 |--|
324 | `<chart-name> [<version>]` |
325
326 | parameter | description |
327 | --------- | ----------- |
328 | `<chart-name>` | Name of the chart to delete |
329 | `<version>` | Chart version, default is 0.1.0 |
330
331
332 # Description of functions in consul_api_function.sh #
333
334 ## Function: consul_config_app ##
335
336 Function to load a json config from a file into consul for the A1PMS
337
338 | arg list |
339 |--|
340 | `<json-config-file>` |
341
342 | parameter | description |
343 | --------- | ----------- |
344 | `<json-config-file>` | The path to the json file to be loaded to Consul/CBS |
345
346 ## Function: start_consul_cbs ##
347
348 Start the Consul and CBS containers
349 | arg list |
350 |--|
351 | None |
352
353 # Description of functions in cp_api_function.sh #
354
355 ## Function: use_control_panel_http ##
356
357 Set http as the protocol to use for all communication to the Control Panel
358 | arg list |
359 |--|
360 | None |
361
362 ## Function: use_control_panel_https ##
363
364 Set https as the protocol to use for all communication to the Control Panel
365 | arg list |
366 |--|
367 | None |
368
369 ## Function: start_control_panel ##
370
371 Start the Control Panel container
372 | arg list |
373 |--|
374 | None |
375
376 # Description of functions in cr_api_functions.sh #
377
378 ## Function: use_cr_http ##
379
380 Use http for getting event from CR.  The admin API is not affected. This is the default.
381 | arg list |
382 |--|
383 | None |
384
385 ## Function: use_cr_https ##
386
387 Use https for getting event from CR. The admin API is not affected.
388 Note: Not yet used as callback event is not fully implemented/deciced.
389 | arg list |
390 |--|
391 | None |
392
393 ## Function: start_cr ##
394
395 Start the Callback Receiver container in docker or kube depending on start mode.
396 | arg list |
397 |--|
398 | None |
399
400 ## Function: cr_equal ##
401
402 Tests if a variable value in the Callback Receiver (CR) simulator is equal to a target value.
403 Without the timeout, the test sets pass or fail immediately depending on if the variable is equal to the target or not.
404 With the timeout, the test waits up to the timeout seconds before setting pass or fail depending on if the variable value becomes equal to the target value or not.
405 See the 'cr' dir for more details.
406 | arg list |
407 |--|
408 | `<cr-path-id> <variable-name> <target-value> [ <timeout-in-sec> ]` |
409
410 | parameter | description |
411 | --------- | ----------- |
412 | `<cr-path-id>` |  Variable index to CR |
413 | `<variable-name>` | Variable name in the CR  |
414 | `<target-value>` | Target value for the variable  |
415 | `<timeout-in-sec>` | Max time to wait for the variable to reach the target value  |
416
417 ## Function: cr_greater_or_equal ##
418 Tests if a variable value in the Callback Receiver (CR) simulator is equal to or greater than a target value.
419 Without the timeout, the test sets pass or fail immediately depending on if the variable is equal to or greater than the target or not.
420 With the timeout, the test waits up to the timeout seconds before setting pass or fail depending on if the variable value becomes equal to the target value or not.
421 See the 'cr' dir for more details.
422 | arg list |
423 |--|
424 | `<cr-path-id>  <variable-name> <target-value> [ <timeout-in-sec> ]` |
425
426 | parameter | description |
427 | --------- | ----------- |
428 | `<cr-path-id>` |  Variable index to CR |
429 | `<variable-name>` | Variable name in the CR  |
430 | `<target-value>` | Target value for the variable  |
431 | `<timeout-in-sec>` | Max time to wait for the variable to reach the target value  |
432
433 ## Function: cr_contains_str ##
434
435 Tests if a variable value in the CR contains a target string.
436 Without the timeout, the test sets pass or fail immediately depending on if the variable contains the target string or not.
437 With the timeout, the test waits up to the timeout seconds before setting pass or fail depending on if the variable value contains the target string or not.
438 See the 'a1-interface' repo for more details.
439
440 | arg list |
441 |--|
442 | `<cr-path-id>  <variable-name> <target-value> [ <timeout-in-sec> ]` |
443
444
445 | parameter | description |
446 | --------- | ----------- |
447 | `<cr-path-id>` |  Variable index to CR |
448 | `<variable-name>` | Variable name in the CR  |
449 | `<target-value>` | Target substring for the variable  |
450 | `<timeout-in-sec>` | Max time to wait for the variable to reach the target value  |
451
452 ## Function: cr_read ##
453
454 Reads the value of a variable in the CR simulator. The value is intended to be passed to a env variable in the test script.
455 See the 'mrstub' dir for more details.
456 | arg list |
457 |--|
458 | `<cr-path-id> <variable-name>` |
459
460 | parameter | description |
461 | --------- | ----------- |
462 | `<cr-path-id>` |  Variable index to CR |
463 | `<variable-name>` | Variable name in the CR  |
464
465 ## Function: cr_delay_callback ##
466
467 Function to configure write delay on callbacks. Delay given in seconds. Setting remains until removed.
468
469 | arg list |
470 |--|
471 | `<response-code> <cr-path-id> [<delay-in-seconds>]`|
472
473 | parameter | description |
474 | --------- | ----------- |
475 | `<response-code>` | Expected http response code |
476 | `<cr-path-id>` |  Variable index to CR |
477 | `<delay-in-seconds>` |  Delay in seconds. If omitted, the delay is removed |
478
479 ## Function: cr_api_check_all_sync_events ##
480
481 Check the contents of all ric events received for a callback id.
482
483 | arg list |
484 |--|
485 | `<response-code> <cr-path-id>  <id> [ EMPTY \| ( <ric-id> )+ ]` |
486
487 | parameter | description |
488 | --------- | ----------- |
489 | `<response-code>` | Expected http response code |
490 | `<cr-path-id>` | Variable index for CR  |
491 | `<id>` | Id of the callback destination  |
492 | `EMPTY` | Indicator for an empty list  |
493 | `<ric-id>` | Id of the ric  |
494
495 ## Function: cr_api_check_all_ics_events ##
496
497 Check the contents of all current status events for one id from ICS
498
499 | arg list |
500 |--|
501 | `<response-code> <cr-path-id> <id> [ EMPTY \| ( <status> )+ ]` |
502
503 | parameter | description |
504 | --------- | ----------- |
505 | `<response-code>` | Expected http response code |
506 | `<cr-path-id>` | Variable index for CR  |
507 | `<id>` | Id of the callback destination  |
508 | `EMPTY` | Indicator for an empty list  |
509 | `<status>` | Status string  |
510
511 ## Function: cr_api_check_all_ics_subscription_events ##
512
513 Check the contents of all current subscription events for one id from ICS
514
515 | arg list |
516 |--|
517 | `<response-code> <cr-path-id>  <id> [ EMPTY | ( <type-id> <schema> <registration-status> )+ ]` |
518
519 | parameter | description |
520 | --------- | ----------- |
521 | `<response-code>` | Expected http response code |
522 | `<cr-path-id>` | Variable index for CR  |
523 | `<id>` | Id of the callback destination  |
524 | `EMPTY` | Indicator for an empty list  |
525 | `<type-id>` | Id of the data type  |
526 | `<schema>` | Path to typeschema file  |
527 | `<registration-status>` | Status string  |
528
529 ## Function: cr_api_reset ##
530
531 Reset the callback receiver
532
533 | arg list |
534 |--|
535 | `<cr-path-id>` |
536
537 | parameter | description |
538 | --------- | ----------- |
539 | `<cr-path-id>` | Variable index for CR  |
540
541 ## Function: cr_api_check_all_genric_json_events ##
542
543 Check the contents of all json events for path
544
545 | arg list |
546 |--|
547 | `<response-code> <cr-path-id>  <topic-url> (EMPTY | <json-msg>+ )` |
548
549 | parameter | description |
550 | --------- | ----------- |
551 | `<response-code>` | Expected http response code |
552 | `<cr-path-id>` | Variable index for CR  |
553 | `<topic-url>` | Topic url  |
554 | `EMPTY` | Indicator for an empty list  |
555 | `json-msg` | Json msg string to compare with  |
556
557 ## Function: cr_api_check_single_genric_json_event ##
558
559 Check a single (oldest) json event (or none if empty) for path
560
561 | arg list |
562 |--|
563 | `<response-code> <cr-path-id> <topic-url> (EMPTY | <json-msg> )` |
564
565 | parameter | description |
566 | --------- | ----------- |
567 | `<response-code>` | Expected http response code |
568 | `<cr-path-id>` | Variable index for CR  |
569 | `<topic-url>` | Topic url  |
570 | `EMPTY` | Indicator for no msg  |
571 | `json-msg` | Json msg string to compare with  |
572
573 ## Function: cr_api_check_single_genric_event_md5 ##
574
575 Check a single (oldest) json in md5 format (or none if empty) for path.
576 Note that if a json message is given, it shall be compact, no ws except inside string.
577 The MD5 will generate different hash if whitespace is present or not in otherwise equivalent json.
578
579 | arg list |
580 |--|
581 | `<response-code> <cr-path-id> <topic-url> (EMPTY | <data-msg> )` |
582
583 | parameter | description |
584 | --------- | ----------- |
585 | `<response-code>` | Expected http response code |
586 | `<cr-path-id>` | Variable index for CR  |
587 | `<topic-url>` | Topic url  |
588 | `EMPTY` | Indicator for no msg  |
589 | `data-msg` | msg string to compare with  |
590
591 ## Function: cr_api_check_single_genric_event_md5_file ##
592
593 Check a single (oldest) event in md5 format (or none if empty) for path.
594 Note that if a file with json message is given, the json shall be compact, no ws except inside string and not newlines.
595 The MD5 will generate different hash if ws/newlines is present or not in otherwise equivalent json
596
597 | arg list |
598 |--|
599 | `<response-code> <cr-path-id> <topic-url> (EMPTY | <data-file> )` |
600
601 | parameter | description |
602 | --------- | ----------- |
603 | `<response-code>` | Expected http response code |
604 | `<cr-path-id>` | Variable index for CR  |
605 | `<topic-url>` | Topic url  |
606 | `EMPTY` | Indicator for no msg  |
607 | `data-file` | path to file to compare with  |
608
609 # Description of functions in dmaapadp_api_functions.sh #
610
611 ## Function: use_dmaapadp_http ##
612
613 Use http for all proxy requests. Note that this only applicable to the actual proxy request, the proxied protocol can still be http and https.
614
615 | arg list |
616 |--|
617 | None |
618
619 ## Function: use_dmaapadp_https ##
620
621 Use https for all proxy requests. Note that this only applicable to the actual proxy request, the proxied protocol can still be http and https.
622
623 | arg list |
624 |--|
625 | None |
626
627 ## Function: start_dmaapadp ##
628
629 Start the dmaap adator service container in docker or kube depending on running mode.
630
631 | arg list |
632 |--|
633 | (kube) `PROXY\|NOPROXY <config-file> [ <data-file> ]` |
634
635 | parameter | description |
636 | --------- | ----------- |
637 | `PROXY` | Configure with http proxy, if proxy is started  |
638 | `NOPROXY` | Configure without http proxy  |
639 | `<config-file>`| Path to application.yaml  |
640 | `<data-file>` | Optional path to application_configuration.json  |
641
642 ## Function: set_dmaapadp_trace ##
643
644 Configure the dmaap adaptor service log on trace level. The app must be running.
645 | arg list |
646 |--|
647 | None |
648
649 # Description of functions in dmaapmed_api_functions.sh #
650
651 ## Function: use_dmaapmed_http ##
652
653 Use http for all proxy requests. Note that this only applicable to the actual proxy request, the proxied protocol can still be http and https.
654
655 | arg list |
656 |--|
657 | None |
658
659 ## Function: use_dmaapmed_https ##
660
661 Use https for all proxy requests. Note that this only applicable to the actual proxy request, the proxied protocol can still be http and https.
662
663 | arg list |
664 |--|
665 | None |
666
667 ## Function: start_dmaapmed ##
668
669 Start the dmaap mediator service container in docker or kube depending on running mode.
670
671 | arg list |
672 |--|
673 | None |
674
675 # Description of functions in httpproxy_api_functions.sh #
676
677 ## Function: use_http_proxy_http ##
678
679 Use http for all proxy requests. Note that this only applicable to the actual proxy request, the proxied protocol can still be http and https.
680 | arg list |
681 |--|
682 | None |
683
684 ## Function: use_http_proxy_https ##
685
686 Use https for all proxy requests. Note that this only applicable to the actual proxy request, the proxied protocol can still be http and https.
687 | arg list |
688 |--|
689 | None |
690
691 ## Function: start_http_proxy ##
692
693 Start the http proxy container in docker or kube depending on running mode.
694 | arg list |
695 |--|
696 | None |
697
698 # Description of functions in helmmanager_api_functions.sh #
699
700 ## Function: use_helm_manager_http ##
701
702 Use http for all API calls to the Helm Manager. This is the default protocol.
703 | arg list |
704 |--|
705 | None |
706
707 ## Function: use_helm_manager_https ##
708
709 Use https for all API calls to the Helm Manager.
710 | arg list |
711 |--|
712 | None |
713
714 ## Function: start_helm_manager ##
715
716 Start the Helm Manager container in docker or kube depending on running mode.
717 | arg list |
718 |--|
719 | None |
720
721 ## Function: helm_manager_api_get_charts ##
722
723 Get all charts and compare the expected contents.
724 | arg list |
725 |--|
726 | `<response-code> [ EMPTY | ( <chart> <version> <namespace> <release> <repo> )+ ]` |
727
728 | parameter | description |
729 | --------- | ----------- |
730 | `<response-code>` | Expected response code |
731 | `EMPTY` | Indicator for empty list  |
732 | `<chart>`| Name of the chart  |
733 | `<version>`| Version of the chart  |
734 | `<namespace>`| Namespace to of the chart  |
735 | `<release>`| Release name of the chart  |
736 | `<repo>`| Repository of the chart  |
737
738 ## Function: helm_manager_api_post_repo ##
739
740 Add repo to the helm manager.
741 | arg list |
742 |--|
743 | `<response-code> <repo-name> <repo-protocol> <repo-address> <repo-port>` |
744
745 | parameter | description |
746 | --------- | ----------- |
747 | `<response-code>` | Expected response code |
748 | `<repo-name>` | Name of the repo  |
749 | `<repo-protocol>`| Protocol http or https  |
750 | `<repo-address>`| Host name of the repo |
751 | `<repo-port>`| Host port of the repo  |
752
753 ## Function: helm_manager_api_post_onboard_chart ##
754
755 Onboard a chart to the helm manager.
756 | arg list |
757 |--|
758 | `<response-code> <repo> <chart> <version> <release> <namespace>` |
759
760 | parameter | description |
761 | --------- | ----------- |
762 | `<response-code>` | Expected response code |
763 | `<repo>`| Target repo of the chart  |
764 | `<chart>`| Name of the chart  |
765 | `<version>`| Version of the chart  |
766 | `<namespace>`| Namespace to of the chart  |
767 | `<release>`| Release name of the chart  |
768
769 ## Function: helm_manager_api_post_install_chart ##
770
771 Install an onboarded chart.
772 | arg list |
773 |--|
774 | `<response-code> <chart> <version>` |
775
776 | parameter | description |
777 | --------- | ----------- |
778 | `<response-code>` | Expected response code |
779 | `<chart>`| Name of the chart  |
780 | `<version>`| Version of the chart  |
781
782 ## Function: helm_manager_api_uninstall_chart ##
783
784 Uninstall a chart.
785 | arg list |
786 |--|
787 | `<response-code> <chart> <version>` |
788
789 | parameter | description |
790 | --------- | ----------- |
791 | `<response-code>` | Expected response code |
792 | `<chart>`| Name of the chart  |
793 | `<version>`| Version of the chart  |
794
795 ## Function: helm_manager_api_delete_chart ##
796
797 Delete a chart.
798 | arg list |
799 |--|
800 | `<response-code> <chart> <version>` |
801
802 | parameter | description |
803 | --------- | ----------- |
804 | `<response-code>` | Expected response code |
805 | `<chart>`| Name of the chart  |
806 | `<version>`| Version of the chart  |
807
808 ## Function: helm_manager_api_exec_add_repo ##
809
810 Add repo in helm manager by helm using exec.
811 | arg list |
812 |--|
813 | `<repo-name> <repo-url>` |
814
815 | parameter | description |
816 | --------- | ----------- |
817 | `<response-code>` | Expected response code |
818 | `<repo-name>`| Name of the repo  |
819 | `<repo-url>`| Full url to the repo. Url must be accessible by the container  |
820
821
822 # Description of functions in ics_api_functions.sh #
823
824 ## Function: use_ics_rest_http ##
825
826 Use http for all API calls to the ICS. This is the default protocol.
827 | arg list |
828 |--|
829 | None |
830
831 ## Function: use_ics_rest_https ##
832
833 Use https for all API calls to the ICS.
834 | arg list |
835 |--|
836 | None |
837
838 ## Function: use_ics_dmaap_http ##
839
840 Send and recieve all API calls to the ICS over Dmaap via the MR using http.
841 | arg list |
842 |--|
843 | None |
844
845 ## Function: use_ics_dmaap_https ##
846
847 Send and recieve all API calls to the ICS over Dmaap via the MR using https.
848 | arg list |
849 |--|
850 | None |
851
852 ## Function: start_ics ##
853
854 Start the ICS container in docker or kube depending on running mode.
855 | arg list |
856 |--|
857 | `PROXY|NOPROXY <config-file>` |
858
859 | parameter | description |
860 | --------- | ----------- |
861 | `PROXY` | Configure with http proxy, if proxy is started  |
862 | `NOPROXY` | Configure without http proxy  |
863 | `<config-file>`| Path to application.yaml  |
864
865 ## Function: stop_ics ##
866
867 Stop the ICS container.
868 | arg list |
869 |--|
870 | None |
871
872 ## Function: start_stopped_ics ##
873
874 Start a previously stopped ics.
875 | arg list |
876 |--|
877 | None |
878
879 ## Function: set_ics_debug ##
880
881 Configure the ICS log on debug level. The ICS must be running.
882 | arg list |
883 |--|
884 | None |
885
886 ## Function: set_ics_trace ##
887
888 Configure the ICS log on trace level. The ICS must be running.
889 | arg list |
890 |--|
891 | None |
892
893 ## Function: use_ics_retries ##
894
895 Perform curl retries when making direct call to ICS for the specified http response codes
896 Speace separated list of http response codes
897 | arg list |
898 |--|
899 | `[<response-code>]*` |
900
901 | parameter | description |
902 | --------- | ----------- |
903 | `<response-code>` | Http response code to make retry for  |
904
905 ## Function: check_ics_logs ##
906
907 Check the ICS log for any warnings and errors and print the count of each.
908 | arg list |
909 |--|
910 | None |
911
912 ## Function: ics_equal ##
913
914 Tests if a variable value in the ICS is equal to a target value.
915 Without the timeout, the test sets pass or fail immediately depending on if the variable is equal to the target or not.
916 With the timeout, the test waits up to the timeout seconds before setting pass or fail depending on if the variable value becomes equal to the target value or not.
917 See the 'a1-interface' repo for more details.
918
919 | arg list |
920 |--|
921 | `<variable-name> <target-value> [ <timeout-in-sec> ]` |
922
923 | parameter | description |
924 | --------- | ----------- |
925 | `<variable-name>` | Variable name in ics  |
926 | `<target-value>` | Target value for the variable  |
927 | `<timeout-in-sec>` | Max time to wait for the variable to reach the target value  |
928
929 ## Function: ics_api_a1_get_job_ids ##
930
931 Test of GET '/A1-EI/v1/eitypes/{eiTypeId}/eijobs' and optional check of the array of returned job ids.
932 To test the response code only, provide the response code parameter as well as a type id and an owner id.
933 To also test the response payload add the 'EMPTY' for an expected empty array or repeat the last parameter for each expected job id.
934
935 | arg list |
936 |--|
937 | `<response-code> <type-id>  <owner-id>\|NOOWNER [ EMPTY \| <job-id>+ ]` |
938
939 | parameter | description |
940 | --------- | ----------- |
941 | `<response-code>` | Expected http response code |
942 | `<type-id>` | Id of the EI type  |
943 | `<owner-id>` | Id of the job owner  |
944 | `NOOWNER` | No owner is given  |
945 | `<job-id>` | Id of the expected job  |
946 | `EMPTY` | The expected list of job id shall be empty  |
947
948 ## Function: ics_api_a1_get_type ##
949
950 Test of GET '/A1-EI/v1/eitypes/{eiTypeId}' and optional check of the returned schema.
951 To test the response code only, provide the response code parameter as well as the type-id.
952 To also test the response payload add a path to the expected schema file.
953
954 | arg list |
955 |--|
956 | `<response-code> <type-id> [<schema-file>]` |
957
958 | parameter | description |
959 | --------- | ----------- |
960 | `<response-code>` | Expected http response code |
961 | `<type-id>` | Id of the EI type  |
962 | `<schema-file>` | Path to a schema file to compare with the returned schema  |
963
964 ## Function: ics_api_a1_get_type_ids ##
965
966 Test of GET '/A1-EI/v1/eitypes' and optional check of returned list of type ids.
967 To test the response code only, provide the response only.
968 To also test the response payload add the list of expected type ids (or EMPTY if the list is expected to be empty).
969
970 | arg list |
971 |--|
972 | `<response-code> [ (EMPTY \| [<type-id>]+) ]` |
973
974 | parameter | description |
975 | --------- | ----------- |
976 | `<response-code>` | Expected http response code |
977 | `EMPTY` | The expected list of type ids shall be empty  |
978 | `<type-id>` | Id of the EI type  |
979
980 ## Function: ics_api_a1_get_job_status ##
981
982 Test of GET '/A1-EI/v1/eitypes/{eiTypeId}/eijobs/{eiJobId}/status' and optional check of the returned status.
983 To test the response code only, provide the response code, type id and job id.
984 To also test the response payload add the expected status.
985
986 | arg list |
987 |--|
988 | `<response-code> <type-id> <job-id> [<status>]` |
989
990 | parameter | description |
991 | --------- | ----------- |
992 | `<response-code>` | Expected http response code |
993 | `<type-id>` | Id of the EI type  |
994 | `<job-id>` | Id of the job  |
995 | `<status>` | Expected status  |
996
997 ## Function: ics_api_a1_get_job ##
998
999 Test of GET '/A1-EI/v1/eitypes/{eiTypeId}/eijobs/{eiJobId}' and optional check of the returned job.
1000 To test the response code only, provide the response code, type id and job id.
1001 To also test the response payload add the remaining parameters.
1002
1003 | arg list |
1004 |--|
1005 | `<response-code> <type-id> <job-id> [<target-url> <owner-id> <template-job-file>]` |
1006
1007 | parameter | description |
1008 | --------- | ----------- |
1009 | `<response-code>` | Expected http response code |
1010 | `<type-id>` | Id of the EI type  |
1011 | `<job-id>` | Id of the job  |
1012 | `<target-url>` | Expected target url for the job  |
1013 | `<owner-id>` | Expected owner for the job  |
1014 | `<template-job-file>` | Path to a job template for job parameters of the job  |
1015
1016 ## Function: ics_api_a1_delete_job ##
1017
1018 Test of DELETE '/A1-EI/v1/eitypes/{eiTypeId}/eijobs/{eiJobId}'.
1019 To test, provide all the specified parameters.
1020
1021 | arg list |
1022 |--|
1023 | `<response-code> <type-id> <job-id>` |
1024
1025 | parameter | description |
1026 | --------- | ----------- |
1027 | `<response-code>` | Expected http response code |
1028 | `<type-id>` | Id of the EI type  |
1029 | `<job-id>` | Id of the job  |
1030
1031 ## Function: ics_api_a1_put_job ##
1032
1033 Test of PUT '/A1-EI/v1/eitypes/{eiTypeId}/eijobs/{eiJobId}'.
1034 To test, provide all the specified parameters.
1035
1036 | arg list |
1037 |--|
1038 | `<response-code> <type-id> <job-id> <target-url> <owner-id> <template-job-file>` |
1039
1040 | parameter | description |
1041 | --------- | ----------- |
1042 | `<response-code>` | Expected http response code |
1043 | `<type-id>` | Id of the EI type  |
1044 | `<job-id>` | Id of the job  |
1045 | `<target-url>` | Target url for the job  |
1046 | `<owner-id>` | Owner of the job  |
1047 | `<template-job-file>` | Path to a job template for job parameters of the job  |
1048
1049 ## Function: ics_api_edp_get_type_ids ##
1050
1051 Test of GET '/ei-producer/v1/eitypes' or '/data-producer/v1/info-types' depending on ics version and an optional check of the returned list of type ids.
1052 To test the response code only, provide the response code.
1053 To also test the response payload add list of expected type ids (or EMPTY if the list is expected to be empty).
1054
1055 | arg list |
1056 |--|
1057 | `<response-code> [ EMPTY \| <type-id>+]` |
1058
1059 | parameter | description |
1060 | --------- | ----------- |
1061 | `<response-code>` | Expected http response code |
1062 | `<type-id>` | Id of the type  |
1063 | `EMPTY` | The expected list of type ids shall be empty  |
1064
1065 ## Function: ics_api_edp_get_producer_status ##
1066
1067 Test of GET '/ei-producer/v1/eiproducers/{eiProducerId}/status' or '/data-producer/v1/info-producers/{infoProducerId}/status' depending on ics version and optional check of the returned status.
1068 To test the response code only, provide the response code and producer id.
1069 To also test the response payload add the expected status.
1070
1071 | arg list |
1072 |--|
1073 | `<response-code> <producer-id> [<status>]` |
1074
1075 | parameter | description |
1076 | --------- | ----------- |
1077 | `<response-code>` | Expected http response code |
1078 | `<producer-id>` | Id of the producer  |
1079 | `<status>` | The expected status string  |
1080
1081 ## Function: ics_api_edp_get_producer_ids ##
1082
1083 Test of GET '/ei-producer/v1/eiproducers' and optional check of the returned producer ids.
1084 To test the response code only, provide the response.
1085 To also test the response payload add the list of expected producer-ids (or EMPTY if the list of ids is expected to be empty).
1086
1087 | arg list |
1088 |--|
1089 | `<response-code> [ EMPTY \| <producer-id>+]` |
1090
1091 | parameter | description |
1092 | --------- | ----------- |
1093 | `<response-code>` | Expected http response code |
1094 | `<producer-id>` | Id of the producer  |
1095 | `EMPTY` | The expected list of type ids shall be empty  |
1096
1097 ## Function: ics_api_edp_get_producer_ids_2 ##
1098
1099 Test of GET '/ei-producer/v1/eiproducers' or '/data-producer/v1/info-producers' depending on ics version and optional check of the returned producer ids.
1100 To test the response code only, provide the response.
1101 To also test the response payload add the type (if any) and a list of expected producer-ids (or EMPTY if the list of ids is expected to be empty).
1102
1103 | arg list |
1104 |--|
1105 | `<response-code> [ ( NOTYPE \| <type-id> ) [ EMPTY \| <producer-id>+]` |
1106
1107 | parameter | description |
1108 | --------- | ----------- |
1109 | `<response-code>` | Expected http response code |
1110 | `<type-id>` | Id of the type  |
1111 | `EMPTY` | No type given  |
1112 | `<producer-id>` | Id of the producer  |
1113 | `EMPTY` | The expected list of type ids shall be empty  |
1114
1115 ## Function: ics_api_edp_get_type ##
1116
1117 Test of GET '/ei-producer/v1/eitypes/{eiTypeId}' and optional check of the returned type.
1118 To test the response code only, provide the response and the type-id.
1119 To also test the response payload add a path to a job schema file and a list expected producer-id (or EMPTY if the list of ids is expected to be empty).
1120
1121 | arg list |
1122 |--|
1123 | `<response-code> <type-id> [<job-schema-file> (EMPTY \| [<producer-id>]+)]` |
1124
1125 | parameter | description |
1126 | --------- | ----------- |
1127 | `<response-code>` | Expected http response code |
1128 | `<type-id>` | Id of the type  |
1129 | `<job-schema-file>` | Path to a job schema file  |
1130 | `<producer-id>` | Id of the producer  |
1131 | `EMPTY` | The expected list of type ids shall be empty  |
1132
1133 ## Function: ics_api_edp_get_type_2 ##
1134
1135 Test of GET '/ei-producer/v1/eitypes/{eiTypeId}' or '/data-producer/v1/info-types/{infoTypeId}' depending on ics version and optional check of the returned type.
1136 To test the response code only, provide the response and the type-id.
1137 To also test the response payload add a path to a job schema file.
1138
1139 | arg list |
1140 |--|
1141 | `<response-code> <type-id> [<job-schema-file>]` |
1142
1143 | parameter | description |
1144 | --------- | ----------- |
1145 | `<response-code>` | Expected http response code |
1146 | `<type-id>` | Id of the type  |
1147 | `<job-schema-file>` | Path to a job schema file  |
1148 | `EMPTY` | The expected list of type ids shall be empty  |
1149
1150 ## Function: ics_api_edp_put_type_2 ##
1151
1152 Test of PUT '/ei-producer/v1/eitypes/{eiTypeId}' or '/data-producer/v1/info-types/{infoTypeId}' depending on ics version and optional check of the returned type.
1153
1154 | arg list |
1155 |--|
1156 | `<response-code> <type-id> [<job-schema-file>]` |
1157
1158 | parameter | description |
1159 | --------- | ----------- |
1160 | `<response-code>` | Expected http response code |
1161 | `<type-id>` | Id of the type  |
1162 | `<job-schema-file>` | Path to a job schema file  |
1163 | `EMPTY` | The expected list of type ids shall be empty  |
1164
1165 ## Function: ics_api_edp_delete_type_2 ##
1166
1167 Test of DELETE '/ei-producer/v1/eitypes/{eiTypeId}' or '/data-producer/v1/info-types/{infoTypeId}' depending on ics version and optional check of the returned type.
1168
1169 | arg list |
1170 |--|
1171 | `<response-code> <type-id>` |
1172
1173 | parameter | description |
1174 | --------- | ----------- |
1175 | `<response-code>` | Expected http response code |
1176 | `<type-id>` | Id of the type  |
1177
1178 ## Function: ics_api_edp_get_producer ##
1179
1180 Test of GET '/ei-producer/v1/eiproducers/{eiProducerId}' and optional check of the returned producer.
1181 To test the response code only, provide the response and the producer-id.
1182 To also test the response payload add the remaining parameters defining thee producer.
1183
1184 | arg list |
1185 |--|
1186 | `<response-code> <producer-id> [<create-callback> <delete-callback> <supervision-callback> (EMPTY\| [<type-id> <schema-file>]+) ]` |
1187
1188 | parameter | description |
1189 | --------- | ----------- |
1190 | `<response-code>` | Expected http response code |
1191 | `<producer-id>` | Id of the producer  |
1192 | `<create-callback>` | Callback for create job  |
1193 | `<delete-callback>` | Callback for delete job  |
1194 | `<supervision-callback>` | Callback for producer supervision  |
1195 | `<type-id>` | Id of the type  |
1196 | `<schema-file>` | Path to a schema file  |
1197 | `EMPTY` | The expected list of type schema pairs shall be empty  |
1198
1199 ## Function: ics_api_edp_get_producer_2 ##
1200
1201 Test of GET '/ei-producer/v1/eiproducers/{eiProducerId}' or '/data-producer/v1/info-producers/{infoProducerId}' depending on ics version and optional check of the returned producer.
1202 To test the response code only, provide the response and the producer-id.
1203 To also test the response payload add the remaining parameters defining thee producer.
1204
1205 | arg list |
1206 |--|
1207 | `<response-code> <producer-id> [<job-callback> <supervision-callback> (EMPTY \| <type-id>+) ]` |
1208
1209 | parameter | description |
1210 | --------- | ----------- |
1211 | `<response-code>` | Expected http response code |
1212 | `<producer-id>` | Id of the producer  |
1213 | `<job-callback>` | Callback for the url  |
1214 | `<supervision-callback>` | Callback for producer supervision  |
1215 | `<type-id>` | Id of the type  |
1216 | `EMPTY` | The expected list of types shall be empty  |
1217
1218 ## Function: ics_api_edp_delete_producer ##
1219
1220 Test of DELETE '/ei-producer/v1/eiproducers/{eiProducerId}' or '/data-producer/v1/info-producers/{infoProducerId}' depending on ics version.
1221 To test, provide all parameters.
1222
1223 | arg list |
1224 |--|
1225 | `<response-code> <producer-id>` |
1226
1227 | parameter | description |
1228 | --------- | ----------- |
1229 | `<response-code>` | Expected http response code |
1230 | `<producer-id>` | Id of the producer  |
1231
1232 ## Function: ics_api_edp_put_producer ##
1233
1234 Test of PUT '/ei-producer/v1/eiproducers/{eiProducerId}'.
1235 To test, provide all parameters. The list of type/schema pair may be empty.
1236
1237 | arg list |
1238 |--|
1239 | `<response-code> <producer-id> <job-callback> <supervision-callback> (EMPTY \| [<type-id> <schema-file>]+)` |
1240
1241 | parameter | description |
1242 | --------- | ----------- |
1243 | `<response-code>` | Expected http response code |
1244 | `<producer-id>` | Id of the producer  |
1245 | `<job-callback>` | Callback for create/delete job  |
1246 | `<supervision-callback>` | Callback for producer supervision  |
1247 | `<type-id>` | Id of the type  |
1248 | `<schema-file>` | Path to a schema file  |
1249 | `EMPTY` | The list of type/schema pairs is empty  |
1250
1251 ## Function: ics_api_edp_put_producer_2 ##
1252
1253 Test of PUT '/ei-producer/v1/eiproducers/{eiProducerId}' or '/data-producer/v1/info-producers/{infoProducerId}' depending on ics version.
1254 To test, provide all parameters. The list of type/schema pair may be empty.
1255
1256 | arg list |
1257 |--|
1258 | `<response-code> <producer-id> <job-callback> <supervision-callback> NOTYPE\|[<type-id>+]` |
1259
1260 | parameter | description |
1261 | --------- | ----------- |
1262 | `<response-code>` | Expected http response code |
1263 | `<producer-id>` | Id of the producer  |
1264 | `<job-callback>` | Callback for create/delete job  |
1265 | `<supervision-callback>` | Callback for producer supervision  |
1266 | `<type-id>` | Id of the type  |
1267 | `NOTYPE` | The list of types is empty  |
1268
1269 ## Function: ics_api_edp_get_producer_jobs ##
1270
1271 Test of GET '/ei-producer/v1/eiproducers/{eiProducerId}/eijobs' and optional check of the returned producer job.
1272 To test the response code only, provide the response and the producer-id.
1273 To also test the response payload add the remaining parameters.
1274
1275 | arg list |
1276 |--|
1277 | `<response-code> <producer-id> (EMPTY \| [<job-id> <type-id> <target-url> <job-owner> <template-job-file>]+)` |
1278
1279 | parameter | description |
1280 | --------- | ----------- |
1281 | `<response-code>` | Expected http response code |
1282 | `<producer-id>` | Id of the producer  |
1283 | `<job-id>` | Id of the job  |
1284 | `<type-id>` | Id of the EI type  |
1285 | `<target-url>` | Target url for data delivery  |
1286 | `<job-owner>` | Id of the job owner  |
1287 | `<template-job-file>` | Path to a job template file  |
1288 | `EMPTY` | The list of job/type/target/job-file tuples is empty  |
1289
1290 ## Function: ics_api_edp_get_producer_jobs_2 ##
1291
1292 Test of GET '/ei-producer/v1/eiproducers/{eiProducerId}/eijobs' or '/data-producer/v1/info-producers/{infoProducerId}/info-jobs' depending on ics version and optional check of the returned producer job.
1293 To test the response code only, provide the response and the producer-id.
1294 To also test the response payload add the remaining parameters.
1295
1296 | arg list |
1297 |--|
1298 | `<response-code> <producer-id> (EMPTY \| [<job-id> <type-id> <target-url> <job-owner> <template-job-file>]+)` |
1299
1300 | parameter | description |
1301 | --------- | ----------- |
1302 | `<response-code>` | Expected http response code |
1303 | `<producer-id>` | Id of the producer  |
1304 | `<job-id>` | Id of the job  |
1305 | `<type-id>` | Id of the type  |
1306 | `<target-url>` | Target url for data delivery  |
1307 | `<job-owner>` | Id of the job owner  |
1308 | `<template-job-file>` | Path to a job template file  |
1309 | `EMPTY` | The list of job/type/target/job-file tuples is empty  |
1310
1311 ## Function: ics_api_service_status ##
1312
1313 Test of GET '/status'.
1314
1315 | arg list |
1316 |--|
1317 | `<response-code>` |
1318
1319 | parameter | description |
1320 | --------- | ----------- |
1321 | `<response-code>` | Expected http response code |
1322
1323 ## Function: ics_api_idc_get_type_ids ##
1324
1325 Test of GET '/data-consumer/v1/info-types' and an optional check of the returned list of type ids.
1326 To test the response code only, provide the response code.
1327 To also test the response payload add list of expected type ids (or EMPTY if the list is expected to be empty).
1328
1329 | arg list |
1330 |--|
1331 | `<response-code> [ EMPTY \| <type-id>+]` |
1332
1333 | parameter | description |
1334 | --------- | ----------- |
1335 | `<response-code>` | Expected http response code |
1336 | `<type-id>` | Id of the Info type  |
1337 | `EMPTY` | The expected list of type ids shall be empty  |
1338
1339 ## Function: ics_api_idc_get_job_ids ##
1340
1341 Test of GET '/data-consumer/v1/info-jobs' and optional check of the array of returned job ids.
1342 To test the response code only, provide the response code parameter as well as a type id and an owner id.
1343 To also test the response payload add the 'EMPTY' for an expected empty array or repeat the last parameter for each expected job id.
1344
1345 | arg list |
1346 |--|
1347 | `<response-code> <type-id>  <owner-id>\|NOOWNER [ EMPTY \| <job-id>+ ]` |
1348
1349 | parameter | description |
1350 | --------- | ----------- |
1351 | `<response-code>` | Expected http response code |
1352 | `<type-id>` | Id of the Info type  |
1353 | `<owner-id>` | Id of the job owner  |
1354 | `NOOWNER` | No owner is given  |
1355 | `<job-id>` | Id of the expected job  |
1356 | `EMPTY` | The expected list of job id shall be empty  |
1357
1358 ## Function: ics_api_idc_get_job ##
1359
1360 Test of GET '/data-consumer/v1/info-jobs/{infoJobId}' and optional check of the returned job.
1361 To test the response code only, provide the response code, type id and job id.
1362 To also test the response payload add the remaining parameters.
1363
1364 | arg list |
1365 |--|
1366 | `<response-code> <type-id> <job-id> [<target-url> <owner-id> <template-job-file>]` |
1367
1368 | parameter | description |
1369 | --------- | ----------- |
1370 | `<response-code>` | Expected http response code |
1371 | `<type-id>` | Id of the Info type  |
1372 | `<job-id>` | Id of the job  |
1373 | `<target-url>` | Expected target url for the job  |
1374 | `<owner-id>` | Expected owner for the job  |
1375 | `<template-job-file>` | Path to a job template for job parameters of the job  |
1376
1377 ## Function: ics_api_idc_put_job ##
1378
1379 Test of PUT '/data-consumer/v1/info-jobs/{infoJobId}'.
1380 To test, provide all the specified parameters.
1381
1382 | arg list |
1383 |--|
1384 | `<response-code> <type-id> <job-id> <target-url> <owner-id> <template-job-file> [VALIDATE]` |
1385
1386 | parameter | description |
1387 | --------- | ----------- |
1388 | `<response-code>` | Expected http response code |
1389 | `<type-id>` | Id of the Info type  |
1390 | `<job-id>` | Id of the job  |
1391 | `<target-url>` | Target url for the job  |
1392 | `<owner-id>` | Owner of the job  |
1393 | `<template-job-file>` | Path to a job template for job parameters of the job  |
1394 | `VALIIDATE` | Indicator to preform type validation at creation  |
1395
1396 ## Function: ics_api_idc_delete_job ##
1397
1398 Test of DELETE '/A1-EI/v1/eitypes/{eiTypeId}/eijobs/{eiJobId}'.
1399 To test, provide all the specified parameters.
1400
1401 | arg list |
1402 |--|
1403 | `<response-code> <type-id> <job-id>` |
1404
1405 | parameter | description |
1406 | --------- | ----------- |
1407 | `<response-code>` | Expected http response code |
1408 | `<type-id>` | Id of the type  |
1409 | `<job-id>` | Id of the job  |
1410
1411 ## Function: ics_api_idc_get_type ##
1412
1413 Test of GET '/data-consumer/v1/info-types/{infoTypeId} and optional check of the returned schema.
1414 To test the response code only, provide the response code parameter as well as the type-id.
1415 To also test the response payload add a path to the expected schema file.
1416
1417 | arg list |
1418 |--|
1419 | `<response-code> <type-id> [<schema-file>]` |
1420
1421 | parameter | description |
1422 | --------- | ----------- |
1423 | `<response-code>` | Expected http response code |
1424 | `<type-id>` | Id of the Info type  |
1425 | `<schema-file>` | Path to a schema file to compare with the returned schema  |
1426
1427 ## Function: ics_api_idc_get_job_status ##
1428
1429 Test of GET '/data-consumer/v1/info-jobs/{infoJobId}/status' and optional check of the returned status and timeout.
1430 To test the response code only, provide the response code and job id.
1431 To also test the response payload add the expected status.
1432
1433 | arg list |
1434 |--|
1435 | `<response-code> <job-id> [<status> [ <timeout>]]` |
1436
1437 | parameter | description |
1438 | --------- | ----------- |
1439 | `<response-code>` | Expected http response code |
1440 | `<job-id>` | Id of the job  |
1441 | `<status>` | Expected status  |
1442 | `<timeout>` | Timeout |
1443
1444 ## Function: ics_api_idc_get_job_status2 ##
1445
1446 Test of GET '/data-consumer/v1/info-jobs/{infoJobId}/status' with returned producers and optional check of the returned status and timeout.
1447 To test the response code only, provide the response code and job id.
1448 To also test the response payload add the expected status.
1449
1450 | arg list |
1451 |--|
1452 | `<response-code> <job-id> [<status> EMPTYPROD|( <prod-count> <producer-id>+ ) [<timeout>]]` |
1453
1454 | parameter | description |
1455 | --------- | ----------- |
1456 | `<response-code>` | Expected http response code |
1457 | `<job-id>` | Id of the job  |
1458 | `<status>` | Expected status  |
1459 | `<EMPTYPROD>` | Indicated for empty list of producer  |
1460 | `<prod-count>` | Number of expected producer  |
1461 | `<producer-id>` |Id of the producer  |
1462 | `<timeout>` | Timeout |
1463
1464
1465 ## Function: ics_api_idc_get_subscription_ids ##
1466 Test of GET '/data-consumer/v1/info-type-subscription' with the returned list of subscription ids
1467
1468 | arg list |
1469 |--|
1470 | `<response-code>  <owner-id>|NOOWNER [ EMPTY | <subscription-id>+]` |
1471
1472 | parameter | description |
1473 | --------- | ----------- |
1474 | `<response-code>` | Expected http response code |
1475 | `<owner-id>` | Id of the owner  |
1476 | `<NOOWNER>` | Indicator for empty owner  |
1477 | `<EMPTY>` | Indicated for empty list of subscription ids  |
1478 | `<subscription-id>` |Id of the subscription  |
1479
1480 ## Function: ics_api_idc_get_subscription ##
1481 Test of GET '/data-consumer/v1/info-type-subscription/{subscriptionId}' with the subscription information
1482
1483 | arg list |
1484 |--|
1485 | `<response-code>  <subscription-id> [ <owner-id> <status-uri> ]` |
1486
1487 | parameter | description |
1488 | --------- | ----------- |
1489 | `<response-code>` | Expected http response code |
1490 | `<subscription-id>` |Id of the subscription  |
1491 | `<owner-id>` | Id of the owner  |
1492 | `<status-uri>` | Url for status notifications  |
1493
1494
1495 ## Function: ics_api_idc_put_subscription ##
1496 Test of PUT '/data-consumer/v1/info-type-subscription/{subscriptionId}' with the subscription information
1497
1498 | arg list |
1499 |--|
1500 | `<response-code>  <subscription-id> <owner-id> <status-uri>` |
1501
1502 | parameter | description |
1503 | --------- | ----------- |
1504 | `<response-code>` | Expected http response code |
1505 | `<subscription-id>` |Id of the subscription  |
1506 | `<owner-id>` | Id of the owner  |
1507 | `<status-uri>` | Url for status notifications  |
1508
1509 ## Function: ics_api_idc_delete_subscription ##
1510 Test of DELETE /data-consumer/v1/info-type-subscription/{subscriptionId}
1511
1512 | arg list |
1513 |--|
1514 | `<response-code>  <subscription-id>` |
1515
1516 | parameter | description |
1517 | --------- | ----------- |
1518 | `<response-code>` | Expected http response code |
1519 | `<subscription-id>` |Id of the subscription  |
1520
1521
1522 ## Function: ics_api_admin_reset ##
1523
1524 Test of GET '/status'.
1525
1526 | arg list |
1527 |--|
1528 | `<response-code> [ <type> ]` |
1529
1530 | parameter | description |
1531 | --------- | ----------- |
1532 | `<response-code>` | Expected http response code |
1533 | `<type>` | Type id, if the interface supports type in url |
1534
1535 ## Function: ics_kube_pvc_reset ##
1536
1537 Admin reset to remove all data in ics; jobs, producers etc
1538 NOTE - only works in kubernetes and the pod should not be running
1539
1540 | arg list |
1541 |--|
1542 | None |
1543
1544 # Description of functions in kafkapc_api_functions.sh #
1545
1546 ## Function: use_kafkapc_http ##
1547
1548 Use http for all calls to the KAFKAPC.
1549 | arg list |
1550 |--|
1551 | None |
1552
1553 ## Function: use_kafkapc_https ##
1554
1555 Use https for all calls to the KAFKAPC.
1556 | arg list |
1557 |--|
1558 | None |
1559
1560 ## Function: start_kafkapc ##
1561
1562 Start the KAFKAPC container in docker or kube depending on start mode
1563 | arg list |
1564 |--|
1565 | None |
1566
1567 ## Function: kafkapc_equal ##
1568
1569 Tests if a variable value in the KAFKAPC is equal to a target value.
1570 Without the timeout, the test sets pass or fail immediately depending on if the variable is equal to the target or not.
1571 With the timeout, the test waits up to the timeout seconds before setting pass or fail depending on if the variable value becomes equal to the target value or not.
1572 See the 'mrstub' dir for more details.
1573 | arg list |
1574 |--|
1575 | `<variable-name> <target-value> [ <timeout-in-sec> ]` |
1576
1577 | parameter | description |
1578 | --------- | ----------- |
1579 | `<variable-name>` | Variable name in the KAFKAPC  |
1580 | `<target-value>` | Target value for the variable  |
1581 | `<timeout-in-sec>` | Max time to wait for the variable to reach the target value  |
1582
1583 ## Function: kafkapc_api_reset ##
1584
1585 Deep reset of KAFKAPC. Note that kafka itself is not affected, i.e. created topic still exist in kafka.
1586 | arg list |
1587 |--|
1588 | None |
1589
1590 ## Function: kafkapc_api_create_topic ##
1591
1592 Create a topic in kafka via kafkapc.
1593 | `<response-code> <topic-name>  <mime-type>` |
1594
1595 | parameter | description |
1596 | --------- | ----------- |
1597 | `<response-code>` | Http response code  |
1598 | `<topic-name>` | Name of the topic  |
1599 | `<mime-type>` | Mime type of the data to send to the topic. Data on the topic is expected to be of this type  |
1600
1601 ## Function: kafkapc_api_get_topic ##
1602
1603 Create a from kafkapc.
1604 | `<response-code> <topic-name>  <mime-type>` |
1605
1606 | parameter | description |
1607 | --------- | ----------- |
1608 | `<response-code>` | Http response code  |
1609 | `<topic-name>` | Name of the topic  |
1610 | `<mime-type>` | Mime type of the topic  |
1611
1612 ## Function: kafkapc_api_start_sending ##
1613
1614 Start sending msg from the msg queue to kafka for a topic.
1615 | `<response-code> <topic-name>` |
1616
1617 | parameter | description |
1618 | --------- | ----------- |
1619 | `<response-code>` | Http response code  |
1620 | `<topic-name>` | Name of the topic  |
1621
1622 ## Function: kafkapc_api_start_receiving ##
1623
1624 Start receiving msg from a kafka topic to the msg queue in kafkapc.
1625 | `<response-code> <topic-name>` |
1626
1627 | parameter | description |
1628 | --------- | ----------- |
1629 | `<response-code>` | Http response code  |
1630 | `<topic-name>` | Name of the topic  |
1631
1632 ## Function: kafkapc_api_stop_sending ##
1633
1634 Stop sending msg from the msg queue to kafka for a topic.
1635 | `<response-code> <topic-name>` |
1636
1637 | parameter | description |
1638 | --------- | ----------- |
1639 | `<response-code>` | Http response code  |
1640 | `<topic-name>` | Name of the topic  |
1641
1642 ## Function: kafkapc_api_stop_receiving ##
1643
1644 Stop receiving msg from a kafka topic to the msg queue in kafkapc.
1645 | `<response-code> <topic-name>` |
1646
1647 | parameter | description |
1648 | --------- | ----------- |
1649 | `<response-code>` | Http response code  |
1650 | `<topic-name>` | Name of the topic  |
1651
1652 ## Function: kafkapc_api_post_msg ##
1653
1654 Send a message on a topic.
1655 | arg list |
1656 |--|
1657 | `<response-code> <topic> <mime-type> <msg>` |
1658
1659 | parameter | description |
1660 | --------- | ----------- |
1661 | `<response-code>` | Http response code  |
1662 | `<topic>` | Topic name  |
1663 | `<mime-type>` | Mime type of the msg  |
1664 | `<msg>` | String msg to send  |
1665
1666 ## Function: kafkapc_api_get_msg ##
1667
1668 Get a message on a topic.
1669 | arg list |
1670 |--|
1671 | `<response-code> <topic>  ([ <mime-type>  <msg> ] | NOMSG )` |
1672
1673 | parameter | description |
1674 | --------- | ----------- |
1675 | `<response-code>` | Http response code  |
1676 | `<topic>` | Topic name  |
1677 | `<mime-type>` | Mime type of the msg  |
1678 | `<msg>` | String msg to receive  |
1679 | `NOMSG` | Indicated for no msg  |
1680
1681 ## Function: kafkapc_api_post_msg_from_file ##
1682
1683 Send a message in a file on a topic.
1684 | arg list |
1685 |--|
1686 | `<response-code> <topic> <mime-type> <file>` |
1687
1688 | parameter | description |
1689 | --------- | ----------- |
1690 | `<response-code>` | Http response code  |
1691 | `<topic>` | Topic name  |
1692 | `<mime-type>` | Mime type of the msg  |
1693 | `<file>` | Filepath to the string msg to send  |
1694
1695 ## Function: kafkapc_api_get_msg_from_file ##
1696
1697 Get a message on a topic.
1698 | arg list |
1699 |--|
1700 | `<response-code> <topic>  <mime-type>  <file> ` |
1701
1702 | parameter | description |
1703 | --------- | ----------- |
1704 | `<response-code>` | Http response code  |
1705 | `<topic>` | Topic name  |
1706 | `<mime-type>` | Mime type of the msg  |
1707 | `<file>` | Filepath to the string msg to receive  |
1708
1709 ## Function: kafkapc_api_generate_json_payload_file ##
1710
1711 Create json file with dummy data for payload.
1712 | arg list |
1713 |--|
1714 | `<size-in-kb> <filename>` |
1715
1716 | parameter | description |
1717 | --------- | ----------- |
1718 | `<size-in-kb>` | Generated size in kb  |
1719 | `<filename>` | Path to output file  |
1720
1721 ## Function: kafkapc_api_generate_text_payload_file ##
1722
1723 Create file with dummy text data for payload.
1724 | arg list |
1725 |--|
1726 | `<size-in-kb> <filename>` |
1727
1728 | parameter | description |
1729 | --------- | ----------- |
1730 | `<size-in-kb>` | Generated size in kb  |
1731 | `<filename>` | Path to output file  |
1732
1733 # Description of functions in kubeproxy_api_functions.sh #
1734
1735 ## Function: use_kube_proxy_http ##
1736
1737 Use http for all proxy requests. Note that this only applicable to the actual proxy request, the proxied protocol can still be http and https.
1738 | arg list |
1739 |--|
1740 | None |
1741
1742 ## Function: use_kube_proxy_https ##
1743
1744 Use https for all proxy requests. Note that this only applicable to the actual proxy request, the proxied protocol can still be http and https.
1745 | arg list |
1746 |--|
1747 | None |
1748
1749 ## Function: start_kube_proxy ##
1750
1751 Start the kube proxy container in kube. This proxy enabled the test env to access all services and pods in a kube cluster.
1752 No proxy is started if the function is called in docker mode.
1753 | arg list |
1754 |--|
1755 | None |
1756
1757 # Description of functions in localhelm_api_functions.sh #
1758
1759 ## Function: localhelm_create_test_chart ##
1760
1761 Create a dummy chart using helm
1762 | arg list |
1763 |--|
1764 | `chart-name` |
1765
1766 | parameter | description |
1767 | --------- | ----------- |
1768 | `chart-name` | Name of the chart |
1769
1770 ## Function: localhelm_package_test_chart ##
1771
1772 Package a dummy chart using helm
1773 | arg list |
1774 |--|
1775 | `chart-name` |
1776
1777 | parameter | description |
1778 | --------- | ----------- |
1779 | `chart-name` | Name of the chart |
1780
1781 ## Function: localhelm_installed_chart_release ##
1782
1783 Check if a chart is installed or not using helm
1784 | arg list |
1785 |--|
1786 | `INSTALLED|NOTINSTALLED <release-name> <name-space> |
1787
1788 | parameter | description |
1789 | --------- | ----------- |
1790 | `INSTALLED` | Expecting installed chart |
1791 | `NOTINSTALLED` | Expecting a not installed chart |
1792 | `release-name` | Name of the release |
1793 | `name-space` | Expected namespace |
1794
1795 # Description of functions in mr_api_functions.sh #
1796
1797 ## Function: use_mr_http ##
1798
1799 Use http for all Dmaap calls to the MR. This is the default. The admin API is not affected. Note that this function shall be called before preparing the config for Consul.
1800 | arg list |
1801 |--|
1802 | None |
1803
1804 ## Function: use_mr_https ##
1805
1806 Use https for all Dmaap call to the MR. The admin API is not affected. Note that this function shall be called before preparing the config for Consul.
1807 | arg list |
1808 |--|
1809 | None |
1810
1811 ## Function: start_mr ##
1812
1813 Start the Message Router stub interface container in docker or kube depending on start mode
1814 | arg list |
1815 |--|
1816 | None |
1817
1818 ## Function: dmaap_api_print_topics ##
1819
1820 Prints the current list of topics in DMAAP MR
1821
1822 | arg list |
1823 |--|
1824 | None |
1825
1826 ## Function: mr_equal ##
1827
1828 Tests if a variable value in the Message Router (MR) simulator is equal to a target value.
1829 Without the timeout, the test sets pass or fail immediately depending on if the variable is equal to the target or not.
1830 With the timeout, the test waits up to the timeout seconds before setting pass or fail depending on if the variable value becomes equal to the target value or not.
1831 See the 'mrstub' dir for more details.
1832 | arg list |
1833 |--|
1834 | `<variable-name> <target-value> [ <timeout-in-sec> ]` |
1835
1836 | parameter | description |
1837 | --------- | ----------- |
1838 | `<variable-name>` | Variable name in the MR  |
1839 | `<target-value>` | Target value for the variable  |
1840 | `<timeout-in-sec>` | Max time to wait for the variable to reach the target value  |
1841
1842 ## Function: mr_greater ##
1843
1844 Tests if a variable value in the Message Router (MR) simulator is greater than a target value.
1845 Without the timeout, the test sets pass or fail immediately depending on if the variable is greater than the target or not.
1846 With the timeout, the test waits up to the timeout seconds before setting pass or fail depending on if the variable value becomes greater than the target value or not.
1847 See the 'mrstub' dir for more details.
1848 | arg list |
1849 |--|
1850 | `<variable-name> <target-value> [ <timeout-in-sec> ]` |
1851
1852 | parameter | description |
1853 | --------- | ----------- |
1854 | `<variable-name>` | Variable name in the MR  |
1855 | `<target-value>` | Target value for the variable  |
1856 | `<timeout-in-sec>` | Max time to wait for the variable to become grater than the target value  |
1857
1858 ## Function: mr_read ##
1859
1860 Reads the value of a variable in the Message Router (MR) simulator. The value is intended to be passed to a env variable in the test script.
1861 See the 'mrstub' dir for more details.
1862 | arg list |
1863 |--|
1864 | `<variable-name>` |
1865
1866 | parameter | description |
1867 | --------- | ----------- |
1868 | `<variable-name>` | Variable name in the MR  |
1869
1870 ## Function: mr_print ##
1871
1872 Prints the value of a variable in the Message Router (MR) simulator.
1873 See the 'mrstub' dir for more details.
1874 | arg list |
1875 |--|
1876 | `<variable-name>` |
1877
1878 | parameter | description |
1879 | --------- | ----------- |
1880 | `<variable-name>` | Variable name in the MR  |
1881
1882 ## Function: mr_api_send_json ##
1883
1884 Send json to topic in mr-stub.
1885 | arg list |
1886 |--|
1887 | `<topic-url> <json-msg>` |
1888
1889 | parameter | description |
1890 | --------- | ----------- |
1891 | `<topic-url>` | Topic url  |
1892 | `<json-msg>` | Json msg as string  |
1893
1894 ## Function: mr_api_send_text ##
1895
1896 Send text to topic in mr-stub.
1897 | arg list |
1898 |--|
1899 | `<topic-url> <text-msg>` |
1900
1901 | parameter | description |
1902 | --------- | ----------- |
1903 | `<topic-url>` | Topic url  |
1904 | `<text-msg>` | Text (string) msg  |
1905
1906
1907
1908 ## Function: mr_api_send_json_file ##
1909
1910 Send json to topic in mr-stub.
1911 | arg list |
1912 |--|
1913 | `<topic-url> <json-file>` |
1914
1915 | parameter | description |
1916 | --------- | ----------- |
1917 | `<topic-url>` | Topic url  |
1918 | `<json-file>` | Path to file with json msg as string  |
1919
1920 ## Function: mr_api_send_text_file ##
1921
1922 Send text to topic in mr-stub.
1923 | arg list |
1924 |--|
1925 | `<topic-url> <text-file>` |
1926
1927 | parameter | description |
1928 | --------- | ----------- |
1929 | `<topic-url>` | Topic url  |
1930 | `<text-file>` | Path to file with text msg as string  |
1931
1932 ## Function: mr_api_generate_json_payload_file ##
1933
1934 Create json file with dummy data for payload.
1935 | arg list |
1936 |--|
1937 | `<size-in-kb> <filename>` |
1938
1939 | parameter | description |
1940 | --------- | ----------- |
1941 | `<size-in-kb>` | Generated size in kb  |
1942 | `<filename>` | Path to output file  |
1943
1944 ## Function: mr_api_generate_text_payload_file ##
1945
1946 Create file with dummy text data for payload.
1947 | arg list |
1948 |--|
1949 | `<size-in-kb> <filename>` |
1950
1951 | parameter | description |
1952 | --------- | ----------- |
1953 | `<size-in-kb>` | Generated size in kb  |
1954 | `<filename>` | Path to output file  |
1955
1956 # Description of functions in ngw_api_functions.sh #
1957
1958 ## Function: use_gateway_http ##
1959
1960 Use http for all calls to the gateway. This is set by default.
1961 | arg list |
1962 |--|
1963 | None |
1964
1965 ## Function: use_gateway_https ##
1966
1967 Use https for all calls to the gateway.
1968 | arg list |
1969 |--|
1970 | None |
1971
1972 ## Function: set_gateway_debug ##
1973
1974 Set debug level logging in the gateway
1975 | arg list |
1976 |--|
1977 | None |
1978
1979 ## Function: set_gateway_trace ##
1980
1981 Set debug level logging in the trace
1982 | arg list |
1983 |--|
1984 | None |
1985
1986 ## Function: start_gateway ##
1987
1988 Start the the gateway container in docker or kube depending on start mode
1989 | arg list |
1990 |--|
1991 | None |
1992
1993 ## Function: gateway_a1pms_get_status ##
1994
1995 Sample test of a1pms api (status)
1996 Only response code tested - not payload
1997 | arg list |
1998 |--|
1999 | `<response-code>` |
2000
2001 | parameter | description |
2002 | --------- | ----------- |
2003 | `<response-code>` | Expected http response code |
2004
2005 ## Function: gateway_ics_get_types ##
2006
2007 Sample test of ics api (get types)
2008 Only response code tested - not payload
2009 | arg list |
2010 |--|
2011 | `<response-code>` |
2012
2013 | parameter | description |
2014 | --------- | ----------- |
2015 | `<response-code>` | Expected http response code |
2016
2017 # Description of functions in a1pms_api_functions.sh #
2018
2019 ## General ##
2020
2021 Both A1PMS version 1 and 2 are supported. The version is controlled by the env variable `$A1PMS_VERSION` set in the test env file.
2022 For api function in version 2, an url prefix is added if configured.
2023
2024 ## Function: use_a1pms_rest_http ##
2025
2026 Use http for all API calls to the A1PMS. This is the default.
2027 | arg list |
2028 |--|
2029 | None |
2030
2031 ## Function: use_a1pms_rest_https ##
2032
2033 Use https for all API calls to the A1PMS.
2034 | arg list |
2035 |--|
2036 | None |
2037
2038 ## Function: use_a1pms_dmaap_http ##
2039
2040 Send and recieve all API calls to the A1PMS over Dmaap via the MR over http.
2041 | arg list |
2042 |--|
2043 | None |
2044
2045 ## Function: use_a1pms_dmaap_https ##
2046
2047 Send and recieve all API callss to the A1PMS over Dmaap via the MR over https.
2048 | arg list |
2049 |--|
2050 | None |
2051
2052 ## Function: start_a1pms ##
2053
2054 Start the A1PMS container or corresponding kube resources depending on docker/kube mode.
2055 | arg list |
2056 |--|
2057 | `<logfile-prefix>` |
2058 | (docker) `PROXY\|NOPROXY <config-file>` |
2059 | (kube) `PROXY\|NOPROXY <config-file> [ <data-file> ]` |
2060
2061 | parameter | description |
2062 | --------- | ----------- |
2063 | `PROXY` | Configure with http proxy, if proxy is started  |
2064 | `NOPROXY` | Configure without http proxy  |
2065 | `<config-file>`| Path to application.yaml  |
2066 | `<data-file>` | Optional path to application_configuration.json  |
2067
2068 ## Function: stop_a1pms ##
2069
2070 Stop the a1pms container (docker) or scale it to zero (kubernetes).
2071 | arg list |
2072 |--|
2073 |  None |
2074
2075 ## Function: start_stopped_a1pms ##
2076
2077 Start a previousely stopped a1pms container (docker) or scale it to 1 (kubernetes).
2078 | arg list |
2079 |--|
2080 |  None |
2081
2082 ## Function: prepare_consul_config ##
2083
2084 Function to prepare a Consul config based on the previously configured (and started simulators). Note that all simulator must be running and the test script has to configure if http or https shall be used for the components (this is done by the functions 'use_simulator_http', 'use_simulator_https', 'use_sdnc_http', 'use_sdnc_https', 'use_mr_http', 'use_mr_https')
2085 | arg list |
2086 |--|
2087 | `SDNC|NOSDNC <output-file>` |
2088
2089 | parameter | description |
2090 | --------- | ----------- |
2091 | `SDNC` | Configure with controller |
2092 | `NOSDNC` | Configure without controller |
2093 | `<output-file>` | The path to the json output file containing the prepared config. This file is used in 'consul_config_app'  |
2094
2095 ## Function: a1pms_load_config ##
2096
2097 Load the config into a config map (kubernetes only).
2098 | arg list |
2099 |--|
2100 |  `<data-file>` |
2101
2102 | parameter | description |
2103 | --------- | ----------- |
2104 |  `<data-file>` | Path to application_configuration.json  |
2105
2106 ## Function: set_a1pms_debug ##
2107
2108 Configure the A1PMS log on debug level. The A1PMS must be running.
2109 | arg list |
2110 |--|
2111 | None |
2112
2113 ## Function: set_a1pms_trace ##
2114
2115 Configure the A1PMS log on trace level. The A1PMS must be running.
2116 | arg list |
2117 |--|
2118 | None |
2119
2120 ## Function: use_a1pms_retries ##
2121
2122 Configure the A1PMS to make upto 5 retries if an API calls return any of the specified http return codes.
2123 | arg list |
2124 |--|
2125 | `[<response-code>]*` |
2126
2127 ## Function: check_a1pms_logs ##
2128
2129 Check the A1PMS log for any warnings and errors and print the count of each.
2130 | arg list |
2131 |--|
2132 | None |
2133
2134 ## Function: a1pms_equal ##
2135
2136 Tests if the array length of a json array in the A1PMS simulator is equal to a target value.
2137 Without the timeout, the test sets pass or fail immediately depending on if the array length is equal to the target or not.
2138 With the timeout, the test waits up to the timeout seconds before setting pass or fail depending on if the array length becomes equal to the target value or not.
2139 See the 'cr' dir for more details.
2140
2141 | arg list |
2142 |--|
2143 | `<variable-name> <target-value> [ <timeout-in-sec> ]` |
2144
2145 | parameter | description |
2146 | --------- | ----------- |
2147 | `<variable-name>` | Relative url. Example 'json:policy_types' - checks the json array length of the url /policy_types  |
2148 | `<target-value>` | Target value for the length  |
2149 | `<timeout-in-sec>` | Max time to wait for the length to reach the target value  |
2150
2151 ## Function: a1pms_api_get_policies ##
2152
2153 Test of GET '/policies' or V2 GET '/v2/policy-instances' and optional check of the array of returned policies.
2154 To test the response code only, provide the response code parameter as well as the following three parameters.
2155 To also test the response payload add the 'NOID' for an expected empty array or repeat the last five/seven parameters for each expected policy.
2156
2157 | arg list |
2158 |--|
2159 | `<response-code> <ric-id>\|NORIC <service-id>\|NOSERVICE <policy-type-id>\|NOTYPE [ NOID \| [<policy-id> <ric-id> <service-id> EMPTY\|<policy-type-id> <template-file>]*]` |
2160
2161 | arg list V2 |
2162 |--|
2163 | `<response-code> <ric-id>\|NORIC <service-id>\|NOSERVICE <policy-type-id>\|NOTYPE [ NOID \| [<policy-id> <ric-id> <service-id> EMPTY\|<policy-type-id> <transient> <notification-url> <template-file>]*]` |
2164
2165 | parameter | description |
2166 | --------- | ----------- |
2167 | `<response-code>` | Expected http response code |
2168 | `<ric-id>` | Id of the ric  |
2169 | `NORIC` | Indicator that no ric is provided  |
2170 | `<service-id>` | Id of the service  |
2171 | `NOSERVICE` | Indicator that no service id is provided  |
2172 | `<policy-type-id>` |  Id of the policy type |
2173 | `NOTYPE` | Indicator that no type id is provided  |
2174 | `NOID` |  Indicator that no policy id is provided - indicate empty list of policies|
2175 | `<policy-id>` |  Id of the policy |
2176 | `EMPTY` |  Indicate for the special empty policy type |
2177 | `transient` |  Transient, true or false |
2178 | `notification-url` |  Url for notifications |
2179 | `<template-file>` |  Path to the template file for the policy (same template used when creating the policy) |
2180
2181 ## Function: a1pms_api_get_policy ##
2182
2183 Test of GET '/policy' or V2 GET '/v2/policies/{policy_id}' and optional check of the returned json payload.
2184 To test the the response code only, provide the expected response code and policy id.
2185 To test the contents of the returned json payload, add a path to the template file used when creating the policy.
2186
2187 | arg list |
2188 |--|
2189 | `<response-code>  <policy-id> [<template-file>]` |
2190
2191 | arg list V2|
2192 |--|
2193 | `<response-code> <policy-id> [ <template-file> <service-name> <ric-id> <policytype-id>\|NOTYPE <transient> <notification-url>\|NOURL ]` |
2194
2195 | parameter | description |
2196 | --------- | ----------- |
2197 | `<response-code>` | Expected http response code |
2198 | `<policy-id>` |  Id of the policy |
2199 | `<template-file>` |  Path to the template file for the policy (same template used when creating the policy) |
2200 | `<service-id>` | Id of the service  |
2201 | `<ric-id>` | Id of the ric  |
2202 | `<policy-type-id>` |  Id of the policy type |
2203 | `NOTYPE` | Indicator that no type id is provided  |
2204 | `transient` |  Transient, true or false |
2205 | `notification-url` |  Url for notifications |
2206
2207 ## Function: a1pms_api_put_policy ##
2208
2209 Test of PUT '/policy' or V2 PUT '/policies'.
2210 If more than one policy shall be created, add a count value to indicate the number of policies to create. Note that if more than one policy shall be created the provided policy-id must be numerical (will be used as the starting id).
2211
2212 | arg list |
2213 |--|
2214 | `<response-code> <service-name> <ric-id> <policytype-id> <policy-id> <transient> <template-file> [<count>]` |
2215
2216 | arg list V2 |
2217 |--|
2218 | `<response-code> <service-name> <ric-id> <policytype-id>\|NOTYPE <policy-id> <transient>\|NOTRANSIENT <notification-url>\|NOURL <template-file> [<count>]` |
2219
2220 | parameter | description |
2221 | --------- | ----------- |
2222 | `<response-code>` | Expected http response code |
2223 | `<service-id>` | Id of the service  |
2224 | `<ric-id>` | Id of the ric  |
2225 | `<policy-type-id>` |  Id of the policy type |
2226 | `<policy-id>` |  Id of the policy. This value shall be a numeric value if more than one policy shall be created |
2227 | `transient>` |  Transient 'true' or 'false'. 'NOTRANSIENT' can be used to indicate using the default value (no transient value provided) |
2228 | `notification-url` |  Url for notifications |
2229 |`NOURL`| Indicator for no url |
2230 | `<template-file>` |  Path to the template file for the policy |
2231 | `<count>` |  An optional count (default is 1). If a value greater than 1 is given, the policy ids will use the given policy id as the first id and add 1 to that id for each new policy |
2232
2233 ## Function: a1pms_api_put_policy_batch ##
2234
2235 This tests the same as function 'a1pms_api_put_policy' except that all put requests are sent to dmaap in one go and then the responses are polled one by one.
2236 If the a1pms api is not configured to use dmaap (see 'use_a1pms_dmaap', 'use_a1pms_rest_http' and 'use_a1pms_rest_https'), an error message is printed.
2237 For arg list and parameters, see 'a1pms_api_put_policy'.
2238
2239 ## Function: a1pms_api_put_policy_parallel ##
2240
2241 This tests the same as function 'a1pms_api_put_policy' except that the policy create is spread out over a number of processes and it only uses the a1pms rest API. The total number of policies created is determined by the product of the parameters 'number-of-rics' and 'count'. The parameter 'number-of-threads' shall be selected to be not evenly divisible by the product of the parameters 'number-of-rics' and 'count' - this is to ensure that one process does not handle the creation of all the policies in one ric.
2242
2243 | arg list |
2244 |--|
2245 | `<response-code> <service-name> <ric-id-base> <number-of-rics> <policytype-id> <policy-start-id> <transient> <template-file> <count-per-ric> <number-of-threads>`
2246
2247 | arg list |
2248 |--|
2249 | `<response-code> <service-name> <ric-id-base> <number-of-rics> <policytype-id> <policy-start-id> <transient> <notification-url>\|NOURL <template-file> <count-per-ric> <number-of-threads>`
2250
2251 | parameter | description |
2252 | --------- | ----------- |
2253 | `<response-code>` | Expected http response code |
2254 | `<service-id>` | Id of the service  |
2255 | `<ric-id-base>` | The base id of the rics, ie ric id without the sequence number. The sequence number is added during processing  |
2256 | `<number-of-rics>` | The number of rics, assuming the first index is '1'. The index is added to the 'ric-id-base' id  |
2257 | `<policy-type-id>` |  Id of the policy type |
2258 | `<policy-start-id>` |  Id of the policy. This value shall be a numeric value and will be the id of the first policy |
2259 | `transient>` |  Transient 'true' or 'false'. 'NOTRANSIENT' can be used to indicate using the default value (no transient value provide) |
2260 | `notification-url` |  Url for notifications |
2261 | `<template-file>` |  Path to the template file for the policy |
2262 | `<count-per-ric>` |  Number of policies per ric |
2263 | `<number-of-threads>` |  Number of threads (processes) to run in parallel |
2264
2265 ## Function: a1pms_api_delete_policy ##
2266
2267 This tests the DELETE '/policy' or V2 DELETE '/v2/policies/{policy_id}'. Removes the indicated policy or a 'count' number of policies starting with 'policy-id' as the first id.
2268
2269 | arg list |
2270 |--|
2271 | `<response-code> <policy-id> [<count>]`
2272
2273 | parameter | description |
2274 | --------- | ----------- |
2275 | `<response-code>` | Expected http response code |
2276 | `<policy-id>` |  Id of the policy |
2277 | `<count>` |  An optional count of policies to delete. The 'policy-id' will be the first id to be deleted. |
2278
2279 ## Function: a1pms_api_delete_policy_batch ##
2280
2281 This tests the same as function 'a1pms_api_delete_policy' except that all delete requests are sent to dmaap in one go and then the responses are polled one by one.
2282 If the a1pms api is not configured to used dmaap (see 'use_a1pms_dmaap', 'use_a1pms_rest_http' and 'use_a1pms_rest_https'), an error message is printed.
2283 For arg list and parameters, see 'a1pms_api_delete_policy'.
2284
2285 ## Function: a1pms_api_delete_policy_parallel ##
2286
2287 This tests the same as function 'a1pms_api_delete_policy' except that the policy delete is spread out over a number of processes and it only uses the a1pms rest API. The total number of policies deleted is determined by the product of the parameters 'number-of-rics' and 'count'. The parameter 'number-of-threads' shall be selected to be not evenly divisible by the product of the parameters 'number-of-rics' and 'count' - this is to ensure that one process does not handle the deletion of all the policies in one ric.
2288
2289 | arg list |
2290 |--|
2291 | `<response-code> <ric-id-base> <number-of-rics> <policy-start-id> <count-per-ric> <number-of-threads>`
2292
2293 | parameter | description |
2294 | --------- | ----------- |
2295 | `<response-code>` | Expected http response code |
2296 | `<ric-id-base>` | The base id of the rics, ie ric id without the sequence number. The sequence number is added during processing  |
2297 | `<number-of-rics>` | The number of rics, assuming the first index is '1'  |
2298 | `<policy-start-id>` |  Id of the policy. This value shall be a numeric value and will be the id of the first policy |
2299 | `<count-per-ric>` |  Number of policies per ric |
2300 | `<number-of-threads>` |  Number of threads (processes) to run in parallel |
2301
2302 ## Function: a1pms_api_get_policy_ids ##
2303
2304 Test of GET '/policy_ids' or V2 GET '/v2/policies'.
2305 To test response code only, provide the response code parameter as well as the following three parameters.
2306 To also test the response payload add the 'NOID' for an expected empty array or repeat the 'policy-instance-id' for each expected policy id.
2307
2308 | arg list |
2309 |--|
2310 | `<response-code> <ric-id>\|NORIC <service-id>\|NOSERVICE <type-id>\|NOTYPE ([<policy-instance-id]*\|NOID)` |
2311
2312 | parameter | description |
2313 | --------- | ----------- |
2314 | `<response-code>` | Expected http response code |
2315 | `<ric-id>` | Id of the ric  |
2316 | `NORIC` | Indicator that no ric is provided  |
2317 | `<service-id>` | Id of the service  |
2318 | `NOSERVICE` | Indicator that no service id is provided  |
2319 | `type-id>` |  Id of the policy type |
2320 | `NOTYPE` | Indicator that no type id is provided  |
2321 | `NOID` |  Indicator that no policy id is provided - indicate empty list of policies|
2322 | `<policy-instance-id>` |  Id of the policy |
2323
2324 ## Function: a1pms_api_get_policy_schema ##
2325
2326 Test of V2 GET '/v2/policy-types/{policyTypeId}' and optional check of the returned json schema.
2327 To test the response code only, provide the expected response code and policy type id.
2328 To test the contents of the returned json schema, add a path to a schema file to compare with.
2329
2330 | arg list |
2331 |--|
2332 | `<response-code> <policy-type-id> [<schema-file>]` |
2333
2334 | parameter | description |
2335 | --------- | ----------- |
2336 | `<response-code>` | Expected http response code |
2337 | `<policy-type-id>` |  Id of the policy type |
2338 | `<schema-file>` |  Path to the schema file for the policy type |
2339
2340 ## Function: a1pms_api_get_policy_schema ##
2341
2342 Test of GET '/policy_schema' and optional check of the returned json schema.
2343 To test the response code only, provide the expected response code and policy type id.
2344 To test the contents of the returned json schema, add a path to a schema file to compare with.
2345
2346 | arg list |
2347 |--|
2348 | `<response-code> <policy-type-id> [<schema-file>]` |
2349
2350 | parameter | description |
2351 | --------- | ----------- |
2352 | `<response-code>` | Expected http response code |
2353 | `<policy-type-id>` |  Id of the policy type |
2354 | `<schema-file>` |  Path to the schema file for the policy type |
2355
2356 ## Function: a1pms_api_get_policy_schemas ##
2357
2358 Test of GET '/policy_schemas' and optional check of the returned json schemas.
2359 To test the response code only, provide the expected response code and ric id (or NORIC if no ric is given).
2360 To test the contents of the returned json schema, add a path to a schema file to compare with (or NOFILE to represent an empty '{}' type)
2361
2362 | arg list |
2363 |--|
2364 | `<response-code>  <ric-id>\|NORIC [<schema-file>\|NOFILE]*` |
2365
2366 | parameter | description |
2367 | --------- | ----------- |
2368 | `<response-code>` | Expected http response code |
2369 | `<ric-id>` |  Id of the ric |
2370 | `NORIC` |  No ric id given |
2371 | `<schema-file>` |  Path to the schema file for the policy type |
2372 | `NOFILE` |  Indicate the template for an empty type |
2373
2374 ## Function: a1pms_api_get_policy_status ##
2375
2376 Test of GET '/policy_status' or V2 GET '/policies/{policy_id}/status'.
2377
2378 | arg list |
2379 |--|
2380 | `<response-code> <policy-id> (STD\|STD2 <enforce-status>\|EMPTY [<reason>\|EMPTY])\|(OSC <instance-status> <has-been-deleted>)` |
2381
2382 | parameter | description |
2383 | --------- | ----------- |
2384 | `<response-code>` | Expected http response code |
2385 | `<policy-id>` |  Id of the policy |
2386 | `STD` |  Indicator of status of Standarized A1 |
2387 | `STD2` |  Indicator of status of Standarized A1 version 2 |
2388 | `<enforce-status>` |  Enforcement status |
2389 | `<reason>` |  Optional reason |
2390 | `EMPTY` |  Indicator of empty string status or reason |
2391 | `OSC` |  Indicator of status of Non-Standarized OSC A1 |
2392 | `<instance-status>` |  Instance status |
2393 | `<has-been-deleted>` |  Deleted status, true or false |
2394
2395 ## Function: a1pms_api_get_policy_types ##
2396
2397 Test of GET '/policy_types' or  V2 GET '/v2/policy-types' and optional check of the returned ids.
2398 To test the response code only, provide the expected response code and ric id (or NORIC if no ric is given).
2399 To test the contents of the returned json payload, add the list of expected policy type id (or 'EMPTY' for the '{}' type)
2400
2401 | arg list |
2402 |--|
2403 | `<response-code> [<ric-id>\|NORIC [<policy-type-id>\|EMPTY [<policy-type-id>]*]]` |
2404
2405 | parameter | description |
2406 | --------- | ----------- |
2407 | `<response-code>` | Expected http response code |
2408 | `<ric-id>` |  Id of the ric |
2409 | `NORIC` |  No ric id given |
2410 | `<policy-type-id>` |  Id of the policy type |
2411 | `EMPTY` |  Indicate the empty type |
2412
2413 ## Function: a1pms_api_get_status ##
2414
2415 Test of GET /status or V2 GET /status
2416
2417 | arg list |
2418 |--|
2419 | `<response-code>` |
2420
2421 | parameter | description |
2422 | --------- | ----------- |
2423 | `<response-code>` | Expected http response code |
2424
2425 ## Function: a1pms_api_get_ric ##
2426
2427 Test of GET '/ric' or V2 GET '/v2/rics/ric'
2428 To test the response code only, provide the expected response code and managed element id.
2429 To test the returned ric id, provide the expected ric id.
2430
2431 | arg list |
2432 |--|
2433 | `<reponse-code> <managed-element-id> [<ric-id>]` |
2434
2435 | arg list V2 |
2436 |--|
2437 | `<reponse-code> <management-element-id>\|NOME <ric-id>\|<NORIC> [<string-of-ricinfo>]` |
2438
2439 | parameter | description |
2440 | --------- | ----------- |
2441 | `<response-code>` | Expected http response code |
2442 | `<managed-element-id>` |  Id of the managed element |
2443 | `NOME` |  Indicator for no ME |
2444 | `ric-id` |  Id of the ric |
2445 | `NORIC` |  Indicator no RIC |
2446 | `string-of-ricinfo` |  String of ric info |
2447
2448 ## Function: a1pms_api_get_rics ##
2449
2450 Test of GET '/rics' or V2 GET '/v2/rics' and optional check of the returned json payload (ricinfo).
2451 To test the response code only, provide the expected response code and policy type id (or NOTYPE if no type is given).
2452 To test also the returned payload, add the formatted string of info in the returned payload.
2453 Format of ricinfo: <br>`<ric-id>:<list-of-mes>:<list-of-policy-type-ids>`<br>
2454 Example <br>`<space-separate-string-of-ricinfo> = "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2,4 ricsim_g1_1:me2_........."`
2455
2456 | arg list |
2457 |--|
2458 | `<reponse-code> <policy-type-id>\|NOTYPE [<space-separate-string-of-ricinfo>]` |
2459
2460 | parameter | description |
2461 | --------- | ----------- |
2462 | `<response-code>` | Expected http response code |
2463 | `<policy-type-id>` |  Policy type id of the ric |
2464 | `NOTYPE>` |  No type given |
2465 | `<space-separate-string-of-ricinfo>` |  A space separated string of ric info - needs to be quoted |
2466
2467 ## Function: a1pms_api_put_service ##
2468
2469 Test of PUT '/service' or V2 PUT '/service'.
2470 | arg list |
2471 |--|
2472 | `<response-code>  <service-name> <keepalive-timeout> <callbackurl>` |
2473
2474 | parameter | description |
2475 | --------- | ----------- |
2476 | `<response-code>` | Expected http response code |
2477 | `<service-name>` |  Service name |
2478 | `<keepalive-timeout>` |  Timeout value |
2479 | `<callbackurl>` |  Callback url |
2480
2481 ## Function: a1pms_api_get_services ##
2482
2483 Test of GET '/service' or V2 GET '/v2/services' and optional check of the returned json payload.
2484 To test only the response code, omit all parameters except the expected response code.
2485 To test the returned json, provide the parameters after the response code.
2486
2487 | arg list |
2488 |--|
2489 | `<response-code> [ (<query-service-name> <target-service-name> <keepalive-timeout> <callbackurl>) \| (NOSERVICE <target-service-name> <keepalive-timeout> <callbackurl> [<target-service-name> <keepalive-timeout> <callbackurl>]* )]` |
2490
2491 | parameter | description |
2492 | --------- | ----------- |
2493 | `<response-code>` | Expected http response code |
2494 | `<query-service-name>` |  Service name for the query |
2495 | `<target-service-name>` |  Target service name|
2496 | `<keepalive-timeout>` |  Timeout value |
2497 | `<callbackurl>` |  Callback url |
2498 | `NOSERVICE` |  Indicator of no target service name |
2499
2500 ## Function: a1pms_api_get_service_ids ##
2501
2502 Test of GET '/services' or V2 GET /'v2/services'. Only check of service ids.
2503
2504 | arg list |
2505 |--|
2506 | `<response-code> [<service-name>]*` |
2507
2508 | parameter | description |
2509 | --------- | ----------- |
2510 | `<response-code>` | Expected http response code |
2511 | `<service-name>` |  Service name |
2512
2513 ## Function: a1pms_api_delete_services ##
2514
2515 Test of DELETE '/services' or V2 DELETE '/v2/services/{serviceId}'
2516
2517 | arg list |
2518 |--|
2519 | `<response-code> [<service-name>]*` |
2520
2521 | parameter | description |
2522 | --------- | ----------- |
2523 | `<response-code>` | Expected http response code |
2524 | `<service-name>` |  Service name |
2525
2526 ## Function: a1pms_api_put_services_keepalive ##
2527
2528 Test of PUT '/services/keepalive' or V2 PUT '/v2/services/{service_id}/keepalive'
2529
2530 | arg list |
2531 |--|
2532 | `<response-code> <service-name>` |
2533
2534 | parameter | description |
2535 | --------- | ----------- |
2536 | `<response-code>` | Expected http response code |
2537 | `<service-name>` |  Service name |
2538
2539 ## Function: a1pms_api_put_configuration ##
2540
2541 Test of PUT '/v2/configuration'
2542
2543 | arg list |
2544 |--|
2545 | `<response-code> <config-file>` |
2546
2547 | parameter | description |
2548 | --------- | ----------- |
2549 | `<response-code>` | Expected http response code |
2550 | `<config-file>` |  Path json config file |
2551
2552 ## Function: a1pms_api_get_configuration ##
2553
2554 Test of GET '/v2/configuration'
2555
2556 | arg list |
2557 |--|
2558 | `<response-code> [<config-file>]` |
2559
2560 | parameter | description |
2561 | --------- | ----------- |
2562 | `<response-code>` | Expected http response code |
2563 | `<config-file>` |  Path json config file to compare the retrieved config with |
2564
2565 ## Function: a1pms_kube_pvc_reset ##
2566 Admin reset to remove all policies and services
2567 All types and instances etc are removed - types and instances in a1 sims need to be removed separately
2568 NOTE - only works in kubernetes and the pod should not be running
2569
2570 | arg list |
2571 |--|
2572 | None |
2573
2574
2575 # Description of functions in prodstub_api_functions.sh #
2576
2577 ## Function: use_prod_stub_http ##
2578
2579 Use http for the API.  The admin API is not affected. This is the default protocol.
2580 | arg list |
2581 |--|
2582 | None |
2583
2584 ## Function: use_prod_stub_https ##
2585
2586 Use https for the API. The admin API is not affected.
2587 | arg list |
2588 |--|
2589 | None |
2590
2591 ## Function: start_prod_stub ##
2592
2593 Start the Producer stub container in docker or kube depending on start mode
2594 | arg list |
2595 |--|
2596 | None |
2597
2598 ## Function: prodstub_arm_producer ##
2599
2600 Preconfigure the prodstub with a producer. The producer supervision response code is optional, if not given the response code will be set to 200.
2601
2602 | arg list |
2603 |--|
2604 | `<response-code> <producer-id> [<forced_response_code>]` |
2605
2606 | parameter | description |
2607 | --------- | ----------- |
2608 | `<response-code>` | Expected http response code |
2609 | `<producer-id>` | Id of the producer  |
2610 | `<forced_response_code>` | Forced response code for the producer callback url |
2611
2612 ## Function: prodstub_arm_job_create ##
2613
2614 Preconfigure the prodstub with a job or update an existing job. Optional create/update job response code, if not given the response code will be set to 200/201 depending on if the job has been previously created or not.
2615
2616 | arg list |
2617 |--|
2618 | `<response-code> <job-id> [<forced_response_code>]` |
2619
2620 | parameter | description |
2621 | --------- | ----------- |
2622 | `<response-code>` | Expected http response code |
2623 | `<job-id>` | Id of the job  |
2624 | `<forced_response_code>` | Forced response code for the create callback url |
2625
2626 ## Function: prodstub_arm_job_delete ##
2627
2628 Preconfigure the prodstub with a job. Optional delete job response code, if not given the response code will be set to 204/404 depending on if the job exists or not.
2629
2630 | arg list |
2631 |--|
2632 | `<response-code> <job-id> [<forced_response_code>]` |
2633
2634 | parameter | description |
2635 | --------- | ----------- |
2636 | `<response-code>` | Expected http response code |
2637 | `<job-id>` | Id of the job  |
2638 | `<forced_response_code>` | Forced response code for the delete callback url |
2639
2640 ## Function: prodstub_arm_type ##
2641
2642 Preconfigure the prodstub with a type for a producer. Can be called multiple times to add more types.
2643
2644 | arg list |
2645 |--|
2646 | `<response-code> <producer-id> <type-id>` |
2647
2648 | parameter | description |
2649 | --------- | ----------- |
2650 | `<response-code>` | Expected http response code |
2651 | `<producer-id>` | Id of the producer  |
2652 | `<type-id>` | Id of the type  |
2653
2654 ## Function: prodstub_disarm_type ##
2655
2656 Remove a type for the producer in the rodstub. Can be called multiple times to remove more types.
2657
2658 | arg list |
2659 |--|
2660 | `<response-code> <producer-id> <type-id>` |
2661
2662 | parameter | description |
2663 | --------- | ----------- |
2664 | `<response-code>` | Expected http response code |
2665 | `<producer-id>` | Id of the producer  |
2666 | `<type-id>` | Id of the type  |
2667
2668 ## Function: prodstub_check_jobdata ##
2669
2670 Check a job in the prodstub towards the list of provided parameters.
2671
2672 | arg list |
2673 |--|
2674 | `<response-code> <producer-id> <job-id> <type-id> <target-url> <job-owner> <template-job-file>` |
2675
2676 | parameter | description |
2677 | --------- | ----------- |
2678 | `<response-code>` | Expected http response code |
2679 | `<producer-id>` | Id of the producer  |
2680 | `<job-id>` | Id of the job  |
2681 | `<type-id>` | Id of the type  |
2682 | `<target-url>` | Target url for data delivery  |
2683 | `<job-owner>` | Id of the job owner  |
2684 | `<template-job-file>` | Path to a job template file  |
2685
2686 ## Function: prodstub_check_jobdata_2 ##
2687
2688 Check a job in the prodstub towards the list of provided parameters.
2689
2690 | arg list |
2691 |--|
2692 | `<response-code> <producer-id> <job-id> <type-id> <target-url> <job-owner> <template-job-file>` |
2693
2694 | parameter | description |
2695 | --------- | ----------- |
2696 | `<response-code>` | Expected http response code |
2697 | `<producer-id>` | Id of the producer  |
2698 | `<job-id>` | Id of the job  |
2699 | `<type-id>` | Id of the type  |
2700 | `<target-url>` | Target url for data delivery  |
2701 | `<job-owner>` | Id of the job owner  |
2702 | `<template-job-file>` | Path to a job template file  |
2703
2704 ## Function: prodstub_check_jobdata_3 ##
2705
2706 Check a job in the prodstub towards the list of provided parameters.
2707
2708 | arg list |
2709 |--|
2710 | `<response-code> <producer-id> <job-id> <type-id> <target-url> <job-owner> <template-job-file>` |
2711
2712 | parameter | description |
2713 | --------- | ----------- |
2714 | `<response-code>` | Expected http response code |
2715 | `<producer-id>` | Id of the producer  |
2716 | `<job-id>` | Id of the job  |
2717 | `<type-id>` | Id of the type  |
2718 | `<target-url>` | Target url for data delivery  |
2719 | `<job-owner>` | Id of the job owner  |
2720 | `<template-job-file>` | Path to a job template file  |
2721
2722 ## Function: prodstub_delete_jobdata ##
2723
2724 Delete the job parameters, job data, for a job.
2725
2726 | arg list |
2727 |--|
2728 | `<response-code> <producer-id> <job-id>` |
2729
2730 | parameter | description |
2731 | --------- | ----------- |
2732 | `<response-code>` | Expected http response code |
2733 | `<producer-id>` | Id of the producer  |
2734 | `<job-id>` | Id of the job  |
2735
2736 ## Function: prodstub_equal ##
2737
2738 Tests if a variable value in the prodstub is equal to a target value.
2739 Without the timeout, the test sets pass or fail immediately depending on if the variable is equal to the target or not.
2740 With the timeout, the test waits up to the timeout seconds before setting pass or fail depending on if the variable value becomes equal to the target value or not.
2741
2742 | arg list |
2743 |--|
2744 | `<variable-name> <target-value> [ <timeout-in-sec> ]` |
2745
2746 | parameter | description |
2747 | --------- | ----------- |
2748 | `<variable-name>` | Variable name in the prostub  |
2749 | `<target-value>` | Target value for the variable  |
2750 | `<timeout-in-sec>` | Max time to wait for the variable to reach the target value  |
2751
2752 # Description of functions in rc_api_function.sh #
2753
2754 ## Function: use_rapp_catalogue_http ##
2755
2756 Use http for the API. This is the default protocol.
2757 | arg list |
2758 |--|
2759 | None |
2760
2761 ## Function: use_rapp_catalogue_https ##
2762
2763 Use https for the API.
2764 | arg list |
2765 |--|
2766 | None |
2767
2768 ## Function: start_rapp_catalogue ##
2769
2770 Start the rapp catalogue container in docker or kube depending on start mode
2771 | arg list |
2772 |--|
2773 | None |
2774
2775 ## Function: rc_equal ##
2776
2777 Tests if a variable value in the RAPP Catalogue is equal to a target value.
2778 Without the timeout, the test sets pass or fail immediately depending on if the variable is equal to the target or not.
2779 With the timeout, the test waits up to the timeout seconds before setting pass or fail depending on if the variable value becomes equal to the target value or not.
2780 See the 'cr' dir for more details.
2781 | arg list |
2782 |--|
2783 | `<variable-name> <target-value> [ <timeout-in-sec> ]` |
2784
2785 | parameter | description |
2786 | --------- | ----------- |
2787 | `<variable-name>` | Variable name in the RC  |
2788 | `<target-value>` | Target value for the variable  |
2789 | `<timeout-in-sec>` | Max time to wait for the variable to reach the target value  |
2790
2791 ## Function: rapp_cat_api_get_services ##
2792
2793 Check all registered services.
2794
2795 | arg list |
2796 |--|
2797 | `<response-code> [(<service-id> <version> <display-name> <description>)+ \| EMPTY ]` |
2798
2799 | parameter | description |
2800 | --------- | ----------- |
2801 | `<response-code>` | Expected http response code |
2802 | `<service-id>` | Id of the service  |
2803 | `<version>` | Version of the service  |
2804 | `<display-name>` | Dislay name of the service  |
2805 | `<description>` | Description of the service  |
2806 | `EMPTY` | Indicator for an empty list  |
2807
2808 ## Function: rapp_cat_api_put_service ##
2809
2810 Register a services.
2811
2812 | arg list |
2813 |--|
2814 | `<response-code> <service-id> <version> <display-name> <description>` |
2815
2816 | parameter | description |
2817 | --------- | ----------- |
2818 | `<response-code>` | Expected http response code |
2819 | `<service-id>` | Id of the service  |
2820 | `<version>` | Version of the service  |
2821 | `<display-name>` | Dislay name of the service  |
2822 | `<description>` | Description of the service  |
2823
2824 ## Function: rapp_cat_api_get_service ##
2825
2826 Check a registered service.
2827
2828 | arg list |
2829 |--|
2830 | `<response-code> <service-id> <version> <display-name> <description>` |
2831
2832 | parameter | description |
2833 | --------- | ----------- |
2834 | `<response-code>` | Expected http response code |
2835 | `<service-id>` | Id of the service  |
2836 | `<version>` | Version of the service  |
2837 | `<display-name>` | Dislay name of the service  |
2838 | `<description>` | Description of the service  |
2839
2840 ## Function: rapp_cat_api_delete_service ##
2841
2842 Check a registered service.
2843
2844 | arg list |
2845 |--|
2846 | `<response-code> <service-id>` |
2847
2848 | parameter | description |
2849 | --------- | ----------- |
2850 | `<response-code>` | Expected http response code |
2851 | `<service-id>` | Id of the service  |
2852
2853 # Description of functions in ricsim_api_functions.sh #
2854
2855 The functions below only use the admin interface of the simulator, no usage of the A1 interface.
2856
2857 ## Function: use_simulator_http ##
2858
2859 Use http for all API calls (A1) toward the simulator. This is the default. Admin API calls to the simulator are not affected. Note that this function shall be called before preparing the config for Consul.
2860 | arg list |
2861 |--|
2862 | None |
2863
2864 ## Function: use_simulator_https ##
2865
2866 Use https for all API calls (A1) toward the simulator. Admin API calls to the simulator are not affected. Note that this function shall be called before preparing the config for Consul.
2867 | arg list |
2868 |--|
2869 | None |
2870
2871 ## Function: start_ric_simulators ##
2872
2873 Start a group of simulator where a group may contain 1 more simulators. Started in docker or kube depending on start mode
2874 | arg list |
2875 |--|
2876 | `ricsim_g1\|ricsim_g2\|ricsim_g3 <count> <interface-id>` |
2877
2878 | parameter | description |
2879 | --------- | ----------- |
2880 | `ricsim_g1\|ricsim_g2\|ricsim_g3` | Base name of the simulator. Each instance will have an postfix instance id added, starting on '1'. For examplle 'ricsim_g1_1', 'ricsim_g1_2' etc  |
2881 |`<count>`| And integer, 1 or greater. Specifies the number of simulators to start|
2882 |`<interface-id>`| Shall be the interface id of the simulator. See the repo 'a1-interface' for the available ids. |
2883
2884 ## Function: get_kube_sim_host ##
2885
2886 Translate ric name to kube host name.
2887 | arg list |
2888 |--|
2889 | `<ric-name>` |
2890
2891 | parameter | description |
2892 | --------- | ----------- |
2893 | `<ric-name>` | The name of the ric to translate into a host name (ip) |
2894
2895 ## Function: generate_policy_uuid ##
2896
2897 Geneate a UUID prefix to use along with the policy instance number when creating/deleting policies. Sets the env var UUID.
2898 UUID is then automatically added to the policy id in GET/PUT/DELETE.
2899 | arg list |
2900 |--|
2901 | None |
2902
2903 ## Function: sim_equal ##
2904
2905 Tests if a variable value in the RIC simulator is equal to a target value.
2906 Without the timeout, the test sets pass or fail immediately depending on if the variable is equal to the target or not.
2907 With the timeout, the test waits up to the timeout seconds before setting pass or fail depending on if the variable value becomes equal to the target value or not.
2908 See the 'a1-interface' repo for more details.
2909
2910 | arg list |
2911 |--|
2912 | `<variable-name> <target-value> [ <timeout-in-sec> ]` |
2913
2914 | parameter | description |
2915 | --------- | ----------- |
2916 | `<variable-name>` | Variable name in the ric simulator  |
2917 | `<target-value>` | Target value for the variable  |
2918 | `<timeout-in-sec>` | Max time to wait for the variable to reach the target value  |
2919
2920 ## Function: sim_print ##
2921
2922 Prints the value of a variable in the RIC simulator.
2923 See the 'a1-interface' repo for more details.
2924
2925 | arg list |
2926 |--|
2927 | `<variable-name>` |
2928
2929 | parameter | description |
2930 | --------- | ----------- |
2931 | `<variable-name>` | Variable name in the RIC simulator  |
2932
2933 ## Function: sim_contains_str ##
2934
2935 Tests if a variable value in the RIC simulator contains a target string.
2936 Without the timeout, the test sets pass or fail immediately depending on if the variable contains the target string or not.
2937 With the timeout, the test waits up to the timeout seconds before setting pass or fail depending on if the variable value contains the target string or not.
2938 See the 'a1-interface' repo for more details.
2939
2940 | arg list |
2941 |--|
2942 | `<variable-name> <target-value> [ <timeout-in-sec> ]` |
2943
2944 | parameter | description |
2945 | --------- | ----------- |
2946 | `<variable-name>` | Variable name in the ric simulator  |
2947 | `<target-value>` | Target substring for the variable  |
2948 | `<timeout-in-sec>` | Max time to wait for the variable to reach the target value  |
2949
2950 ## Function: sim_put_policy_type ##
2951
2952 Loads a policy type to the simulator
2953
2954 | arg list |
2955 |--|
2956 | `<response-code> <ric-id> <policy-type-id> <policy-type-file>` |
2957
2958 | parameter | description |
2959 | --------- | ----------- |
2960 | `<response-code>` | Expected http response code |
2961 | `<ric-id>` |  Id of the ric |
2962 | `<policy-type-id>` |  Id of the policy type |
2963 | `<policy-type-file>` |  Path to the schema file of the policy type |
2964
2965 ## Function: sim_delete_policy_type ##
2966
2967 Deletes a policy type from the simulator
2968
2969 | arg list |
2970 |--|
2971 | `<response-code> <ric-id> <policy_type_id>` |
2972
2973 | parameter | description |
2974 | --------- | ----------- |
2975 | `<response-code>` | Expected http response code |
2976 | `<ric-id>` |  Id of the ric |
2977 | `<policy-type-id>` |  Id of the policy type |
2978
2979 ## Function: sim_post_delete_instances ##
2980
2981 Deletes all instances (and status), for one ric
2982
2983 | arg list |
2984 |--|
2985 | `<response-code> <ric-id>` |
2986
2987 | parameter | description |
2988 | --------- | ----------- |
2989 | `<response-code>` | Expected http response code |
2990 | `<ric-id>` |  Id of the ric |
2991
2992 ## Function: sim_post_delete_all ##
2993
2994 Deletes all types, instances (and status), for one ric
2995
2996 | arg list |
2997 |--|
2998 | `<response-code> <ric-id>` |
2999
3000 | parameter | description |
3001 | --------- | ----------- |
3002 | `<response-code>` | Expected http response code |
3003 | `<ric-id>` |  Id of the ric |
3004
3005 ## Function: sim_post_forcedresponse ##
3006
3007 Sets (or resets) response code for next (one) A1 message, for one ric.
3008 The intention is to simulate error response on the A1 interface.
3009
3010 | arg list |
3011 |--|
3012 | `<response-code> <ric-id> [<forced_response_code>]`|
3013
3014 | parameter | description |
3015 | --------- | ----------- |
3016 | `<response-code>` | Expected http response code |
3017 | `<ric-id>` |  Id of the ric |
3018 | `<forced_response_code>` |  Http response code to send |
3019
3020 ## Function: sim_post_forcedelay ##
3021
3022 Sets (or resets) A1 response delay, for one ric
3023 The intention is to delay responses on the A1 interface. Setting remains until removed.
3024
3025 | arg list |
3026 |--|
3027 | `<response-code> <ric-id> [<delay-in-seconds>]`|
3028
3029 | parameter | description |
3030 | --------- | ----------- |
3031 | `<response-code>` | Expected http response code |
3032 | `<ric-id>` |  Id of the ric |
3033 | `<delay-in-seconds>` |  Delay in seconds. If omitted, the delay is removed |
3034
3035 # Description of functions in sdnc_api_functions.sh #
3036
3037 The file contains a selection of the possible API tests towards the SDNC (a1-controller)
3038
3039 ## Function: use_sdnc_http ##
3040
3041 Use http for all API calls towards the SDNC A1 Controller. This is the default. Note that this function shall be called before preparing the config for Consul.
3042 | arg list |
3043 |--|
3044 | None |
3045
3046 ## Function: use_sdnc_https ##
3047
3048 Use https for all API calls towards the SDNC A1 Controller. Note that this function shall be called before preparing the config for Consul.
3049 | arg list |
3050 |--|
3051 | None |
3052
3053 ## Function: start_sdnc ##
3054
3055 Start the SDNC A1 Controller container and its database container
3056 | arg list |
3057 |--|
3058 | None |
3059
3060 ## Function: stop_sdnc ##
3061
3062 Stop the SDNC A1 Controller container and its database container
3063 | arg list |
3064 |--|
3065 | None |
3066
3067 ## Function: start_stopped_sdnc ##
3068
3069 Start a previously stopped SDNC
3070 | arg list |
3071 |--|
3072 | None |
3073
3074 ## Function: check_sdnc_logs ##
3075
3076 Check the SDNC log for any warnings and errors and print the count of each.
3077 | arg list |
3078 |--|
3079 | None |
3080
3081 ## Function: controller_api_get_A1_policy_ids ##
3082
3083 Test of GET policy ids towards OSC or STD type simulator.
3084 To test response code only, provide the response code, 'OSC' + policy type or 'STD'
3085 To test the response payload, include the ids of the expexted response.
3086
3087 | arg list |
3088 |--|
3089 | `<response-code> (OSC <ric-id> <policy-type-id> [ <policy-id> [<policy-id>]* ]) \| ( STD <ric-id> [ <policy-id> [<policy-id>]* ]` |
3090
3091 | parameter | description |
3092 | --------- | ----------- |
3093 | `<response-code>` | Expected http response code |
3094 | `OSC` |  Indicator of status of Non-Standarized OSC A1 |
3095 | `<ric-id>` | Id of the ric  |
3096 | `policy-type-id>` |  Id of the policy type |
3097 | `<policy-id>` |  Id of the policy |
3098 | `STD` |  Indicator of status of Standarized A1 |
3099
3100 ## Function: controller_api_get_A1_policy_type ##
3101
3102 Test of GET a policy type (OSC only)
3103
3104 | arg list |
3105 |--|
3106 | `<response-code> OSC <ric-id> <policy-type-id> [<policy-type-file>]` |
3107
3108 | parameter | description |
3109 | --------- | ----------- |
3110 | `<response-code>` | Expected http response code |
3111 | `OSC` |  Indicator of status of Non-Standarized OSC A1 |
3112 | `<ric-id>` | Id of the ric  |
3113 | `policy-type-id>` |  Id of the policy type |
3114 | `policy-type-file>` |  Optional schema file to compare the returned type with |
3115
3116 ## Function: controller_api_delete_A1_policy ##
3117
3118 Deletes a policy instance
3119
3120 | arg list |
3121 |--|
3122 | `(STD <ric-id> <policy-id>) \| (OSC <ric-id> <policy-type-id> <policy-id>)` |
3123
3124 | parameter | description |
3125 | --------- | ----------- |
3126 | `<response-code>` | Expected http response code |
3127 | `STD` |  Indicator of status of Standarized A1 |
3128 | `<ric-id>` | Id of the ric  |
3129 | `<policy-id>` |  Id of the policy |
3130 | `policy-type-id>` |  Id of the policy type |
3131 | `OSC` |  Indicator of status of Non-Standarized OSC A1 |
3132 | `policy-type-file>` |  Optional schema file to compare the returned type with |
3133
3134 ## Function: controller_api_put_A1_policy ##
3135
3136 Creates a policy instance
3137
3138 | arg list |
3139 |--|
3140 | `<response-code> (STD <ric-id> <policy-id> <template-file> ) \| (OSC <ric-id> <policy-type-id> <policy-id> <template-file>)` |
3141
3142 | parameter | description |
3143 | --------- | ----------- |
3144 | `<response-code>` | Expected http response code |
3145 | `STD` |  Indicator of status of Standarized A1 |
3146 | `<ric-id>` | Id of the ric  |
3147 | `<policy-id>` |  Id of the policy |
3148 | `<template-file>` |  Path to the template file of the policy|
3149 | `OSC` |  Indicator of status of Non-Standarized OSC A1 |
3150 | `<policy-type-id>` |  Id of the policy type |
3151
3152 ## Function: controller_api_get_A1_policy_status ##
3153
3154 Checks the status of a policy
3155
3156  arg list |
3157 |--|
3158 | `<response-code> (STD <ric-id> <policy-id> <enforce-status> [<reason>]) \| (OSC <ric-id> <policy-type-id> <policy-id> <instance-status> <has-been-deleted>)` |
3159
3160 | parameter | description |
3161 | --------- | ----------- |
3162 | `<response-code>` | Expected http response code |
3163 | `STD` |  Indicator of status of Standarized A1 |
3164 | `<ric-id>` | Id of the ric  |
3165 | `<policy-id>` |  Id of the policy |
3166 | `<enforce-status>` |  Enforcement status |
3167 | `<reason>` |  Optional reason |
3168 | `OSC` |  Indicator of status of Non-Standarized OSC A1 |
3169 | `<policy-type-id>` |  Id of the policy type |
3170 | `<instance-status>` |  Instance status |
3171 | `<has-been-deleted>` |  Deleted status, true or false |
3172
3173
3174 ## License
3175
3176 Copyright (C) 2020 Nordix Foundation. All rights reserved.
3177 Licensed under the Apache License, Version 2.0 (the "License");
3178 you may not use this file except in compliance with the License.
3179 You may obtain a copy of the License at
3180
3181      http://www.apache.org/licenses/LICENSE-2.0
3182
3183 Unless required by applicable law or agreed to in writing, software
3184 distributed under the License is distributed on an "AS IS" BASIS,
3185 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3186 See the License for the specific language governing permissions and
3187 limitations under the License.