Merge "Integrated gateway and updated kube support"
[nonrtric.git] / test / common / README.md
1 # Introduction #
2 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 Agent, A1 Controller and Ric (A1) simulator. The test environment supports both test with docker and kubernetes(still experimental)
3 Some of the scripts can also be used for other kinds of tests, for example basic tests.
4
5 ## Overview for common test scripts and files ##
6
7 `agent_api_functions.sh` \
8 Contains functions for adapting towards the Policy Management Service (PMS) API, also via dmaap (using a message-router stub interface)
9
10 `api_curl.sh` \
11 A common curl based function for the agent and ecs apis. Also partly used for the Callback receiver and RAPP Catalogue apis.
12
13 `clean-kube.sh` \
14 Cleans all services, deployments, pods, replica set etc started by the test environment in kubernetes.
15
16 `compare_json.py` \
17 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'.
18
19 `consul_cbs_function.sh` \
20 Contains functions for managing Consul and CBS as well as create the configuration for the PMS.
21
22 `control_panel_api_function.sh` \
23 Contains functions for managing Control Panel.
24
25 `controller_api_functions.sh` \
26 Contains functions for adaping towards the A1-controller API.
27
28 `count_json_elements.py` \
29 A python script returning the number of items in a json array.
30
31 `cr_api_functions.sh` \
32 Contains functions for adapting towards the Callback receiver for checking received callback event.
33
34 `create_policies_process.py` \
35 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.
36
37 `create_rics_json.py` \
38 A python script to create a json file from a formatted string of ric info. Helper for the test enviroment.
39
40 `delete_policies_process.py` \
41 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.
42
43 `do_curl_function.sh`
44 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)
45
46 `ecs_api_functions.sh` \
47 Contains functions for adapting towards the ECS API
48
49 `extract_sdnc_reply.py` \
50 A python script to extract the information from an sdnc (A1 Controller) reply json. Helper for the test environment.
51
52 `gateway_api_functions.sh` \
53 Contains functions for managing the Non-RT RIC Gateway
54
55 `http_proxy_api_functions.sh` \
56 Contains functions for managing the Http Proxy
57
58 `kube_proxy_api_functions.sh` \
59 Contains functions for managing the Kube Proxy - to gain access to all services pod inside a kube cluster.
60
61 `mr_api_functions.sh` \
62 Contains functions for managing the MR Stub and the Dmaap Message Router
63
64 `prodstub_api_functions.sh` \
65 Contains functions for adapting towards the Producer stub interface - simulates a producer.
66
67 `rapp_catalogue_api_functions.sh` \
68 Contains functions for adapting towards the RAPP Catalogue.
69
70 `ricsimulator_api_functions.sh` \
71 Contains functions for adapting towards the RIC (A1) simulator admin API.
72
73 `test_env*.sh` \
74 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.
75 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'.
76
77 `testcase_common.sh` \
78 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.
79 The included functions are described in detail further below.
80
81 `testsuite_common.sh` \
82 Common functions for running two or more auto test scripts as a suite.
83
84 # Description of functions in testcase_common.sh #
85
86 ## Script args ##
87 The script can be started with these arguments
88
89 | arg list |
90 |--|
91 | `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>+]` |
92
93 | parameter | description |
94 |-|-|
95 | `remote` | Use images from remote repositories. Can be overridden for individual images using the '--use_xxx' flags |
96 | `remote-remove` | Same as 'remote' but will also try to pull fresh images from remote repositories |
97 | `docker` | Use docker environment for test |
98 | `kuber` | Use kubernetes environment for test. Requires a kubernetes minikube installation |
99 | `--env-file` | The script will use the supplied file to read environment variables from |
100 | `release` | If this flag is given the script will use release version of the images |
101 | `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 |
102 | `--stop-at-error` | The script will stop when the first failed test or configuration |
103 | `--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). |
104 | `--use-local-image` | The script will use local images for the supplied apps, space separated list of app short names |
105 | `--use-snapshot-image` | The script will use images from the nexus snapshot repo for the supplied apps, space separated list of app short names |
106 | `--use-staging-image` | The script will use images from the nexus staging repo for the supplied apps, space separated list of app short names |
107 | `--use-release-image` | The script will use images from the nexus release repo for the supplied apps, space separated list of app short names |
108 | `help` | Print this info along with the test script description and the list of app short names supported |
109
110 ## Function: setup_testenvironment
111 Main function to setup the test environment before any tests are started.
112 Must be called right after sourcing all component scripts.
113 | arg list |
114 |--|
115 | None |
116
117 ## Function: indent1 ##
118 Indent every line of a command output with one space char.
119 | arg list |
120 |--|
121 | None |
122
123 ## Function: indent2 ##
124 Indent every line of a command output with two space chars.
125 | arg list |
126 |--|
127 | None |
128
129 ## Function: print_result ##
130 Print a test report of an auto-test script.
131 | arg list |
132 |--|
133 | None |
134
135 ## Function: start_timer ##
136 Start a timer for time measurement. Only one timer can be running.
137 | arg list |
138 |--|
139 | None - but any args will be printed (It is good practice to use same args for this function as for the `print_timer`) |
140
141 ## Function: print_timer ##
142 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 args to the function will also be printed in the test report.
143 | arg list |
144 |--|
145 | `<timer-message-to-print>` |
146
147 | parameter | description |
148 | --------- | ----------- |
149 | `<timer-message-to-print>` | Any text message to be printed along with the timer result.(It is good practice to use same args for this function as for the `start_timer`) |
150
151 ## Function: print_and_reset_timer ##
152 Print the value of the timer (in seconds) previously started by 'start_timer'. Also reset the timer to 0. The result of the timer as well as the args to the function will also be printed in the test report.
153 | arg list |
154 |--|
155 | `<timer-message-to-print>` |
156
157 | parameter | description |
158 | --------- | ----------- |
159 | `<timer-message-to-print>` | Any text message to be printed along with the timer result.(It is good practice to use same args for this function as for the `start_timer`) |
160
161 ## Function: deviation ##
162 Mark a test as a deviation from the requirements. The list of deviations will be printed in the test report.
163 | arg list |
164 |--|
165 | `<deviation-message-to-print>` |
166
167 | parameter | description |
168 | --------- | ----------- |
169 | `<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 |
170
171 ## Function: clean_environment ##
172 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).
173 | arg list |
174 |--|
175 | None |
176
177 ## Function: auto_clean_containers ##
178 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.
179 | arg list |
180 |--|
181 | None |
182
183 ## Function: sleep_wait ##
184 Make the script sleep for a number of seconds.
185 | arg list |
186 |--|
187 | `<sleep-time-in-sec> [<any-text-in-quotes-to-be-printed>]` |
188
189 | parameter | description |
190 | --------- | ----------- |
191 | `<sleep-time-in-sec> ` | Number of seconds to sleep |
192 | `<any-text-in-quotes-to-be-printed>` | Optional. The text will be printed, if present |
193
194 ## Function: check_control_panel_logs ##
195 Check the Control Panel log for any warnings and errors and print the count of each.
196 | arg list |
197 |--|
198 | None |
199
200 ## Function: store_logs ##
201 Take a snap-shot of all logs for all running containers 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.
202 | arg list |
203 |--|
204 | `<logfile-prefix>` |
205
206 | parameter | description |
207 | --------- | ----------- |
208 | `<logfile-prefix>` | Log file prefix  |
209
210
211 # Description of functions in testsuite_common.sh #
212
213 ## Function: suite_setup ##
214 Sets up the test suite and prints out a heading.
215 | arg list |
216 |--|
217 | None |
218
219 ## suite_complete ##
220 Print out the overall result of the executed test cases.
221 | arg list |
222 |--|
223 | None |
224
225 # Description of functions in agent_api_functions.sh #
226
227 ## General ##
228 Both PMS version 1 and 2 are supported. The version is controlled by the env variable `$PMS_VERSION` set in the test env file.
229 For api function in version 2, an url prefix is added if configured.
230
231 ## Function: use_agent_rest_http ##
232 Use http for all API calls to the Policy Agent. This is the default.
233 | arg list |
234 |--|
235 | None |
236
237 ## Function: use_agent_rest_https ##
238 Use https for all API calls to the Policy Agent.
239 | arg list |
240 |--|
241 | None |
242
243 ## Function: use_agent_dmaap_http ##
244 Send and recieve all API calls to the Policy Agent over Dmaap via the MR over http.
245 | arg list |
246 |--|
247 | None |
248
249 ## Function: use_agent_dmaap_https ##
250 Send and recieve all API calls to the Policy Agent over Dmaap via the MR over https.
251 | arg list |
252 |--|
253 | None |
254
255 ## Function: start_policy_agent ##
256 Start the Policy Agent container or corresponding kube resources depending on docker/kube mode.
257 | arg list |
258 | `<logfile-prefix>` |
259 | (docker) `PROXY|NOPROXY <config-file>` |
260 | (kube) `PROXY|NOPROXY <config-file> [ <data-file> ]` |
261 | parameter | description |
262 | --------- | ----------- |
263 | `PROXY` | Configure with http proxy, if proxy is started  |
264 | `NOPROXY` | Configure without http proxy  |
265 | <config-file>` | Path to application.yaml  |
266 |  <data-file>` | Optional path to application_configuration.json  |
267
268 ## Function: agent_load_config ##
269 Load the config into a config map (kubernetes only).
270 | arg list |
271 |  <data-file> ]` |
272 | parameter | description |
273 | --------- | ----------- |
274 |  <data-file>` | Path to application_configuration.json  |
275
276 ## Function: set_agent_debug ##
277 Configure the Policy Agent log on debug level. The Policy Agent must be running.
278 | arg list |
279 |--|
280 | None |
281
282 ## Function: set_agent_trace ##
283 Configure the Policy Agent log on trace level. The Policy Agent must be running.
284 | arg list |
285 |--|
286 | None |
287
288 ## Function: use_agent_retries ##
289 Configure the Policy Agent to make upto 5 retries if an API calls return any of the specified http return codes.
290 | arg list |
291 |--|
292 | `[<response-code>]*` |
293
294
295 ## Function: check_policy_agent_logs ##
296 Check the Policy Agent log for any warnings and errors and print the count of each.
297 | arg list |
298 |--|
299 | None |
300
301 ## Function: api_equal() ##
302
303 Tests if the array length of a json array in the Policy Agent simulator is equal to a target value.
304 Without the timeout, the test sets pass or fail immediately depending on if the array length is equal to the target or not.
305 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.
306 See the 'cr' dir for more details.
307
308 | arg list |
309 |--|
310 | `<variable-name> <target-value> [ <timeout-in-sec> ]` |
311
312 | parameter | description |
313 | --------- | ----------- |
314 | `<variable-name>` | Relative url. Example 'json:policy_types' - checks the json array length of the url /policy_types  |
315 | `<target-value>` | Target value for the length  |
316 | `<timeout-in-sec>` | Max time to wait for the length to reach the target value  |
317
318 ## Function: api_get_policies() ##
319 Test of GET '/policies' or V2 GET '/v2/policy-instances' and optional check of the array of returned policies.
320 To test the response code only, provide the response code parameter as well as the following three parameters.
321 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.
322
323 | arg list |
324 |--|
325 | `<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>]*]` |
326
327 | arg list V2 |
328 |--|
329 | `<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>]*]` |
330
331 | parameter | description |
332 | --------- | ----------- |
333 | `<response-code>` | Expected http response code |
334 | `<ric-id>` | Id of the ric  |
335 | `NORIC` | Indicator that no ric is provided  |
336 | `<service-id>` | Id of the service  |
337 | `NOSERVICE` | Indicator that no service id is provided  |
338 | `<policy-type-id>` |  Id of the policy type |
339 | `NOTYPE` | Indicator that no type id is provided  |
340 | `NOID` |  Indicator that no policy id is provided - indicate empty list of policies|
341 | `<policy-id>` |  Id of the policy |
342 | `EMPTY` |  Indicate for the special empty policy type |
343 | `transient` |  Transient, true or false |
344 | `notification-url` |  Url for notifications |
345 | `<template-file>` |  Path to the template file for the policy (same template used when creating the policy) |
346
347
348 ## Function: api_get_policy() ##
349 Test of GET '/policy' or V2 GET '/v2/policies/{policy_id}' and optional check of the returned json payload.
350 To test the the response code only, provide the expected response code and policy id.
351 To test the contents of the returned json payload, add a path to the template file used when creating the policy.
352
353 | arg list |
354 |--|
355 | `<response-code>  <policy-id> [<template-file>]` |
356
357 | arg list V2|
358 |--|
359 | `<response-code> <policy-id> [ <template-file> <service-name> <ric-id> <policytype-id>|NOTYPE <transient> <notification-url>|NOURL ]` |
360
361 | parameter | description |
362 | --------- | ----------- |
363 | `<response-code>` | Expected http response code |
364 | `<policy-id>` |  Id of the policy |
365 | `<template-file>` |  Path to the template file for the policy (same template used when creating the policy) |
366 | `<service-id>` | Id of the service  |
367 | `<ric-id>` | Id of the ric  |
368 | `<policy-type-id>` |  Id of the policy type |
369 | `NOTYPE` | Indicator that no type id is provided  |
370 | `transient` |  Transient, true or false |
371 | `notification-url` |  Url for notifications |
372
373 ## Function: api_put_policy() ##
374 Test of PUT '/policy' or V2 PUT '/policies'.
375 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).
376
377 | arg list |
378 |--|
379 | `<response-code> <service-name> <ric-id> <policytype-id> <policy-id> <transient> <template-file> [<count>]` |
380
381 | arg list V2 |
382 |--|
383 | `<response-code> <service-name> <ric-id> <policytype-id>|NOTYPE <policy-id> <transient>|NOTRANSIENT <notification-url>|NOURL <template-file> [<count>]` |
384
385 | parameter | description |
386 | --------- | ----------- |
387 | `<response-code>` | Expected http response code |
388 | `<service-id>` | Id of the service  |
389 | `<ric-id>` | Id of the ric  |
390 | `<policy-type-id>` |  Id of the policy type |
391 | `<policy-id>` |  Id of the policy. This value shall be a numeric value if more than one policy shall be created |
392 | `transient>` |  Transient 'true' or 'false'. 'NOTRANSIENT' can be used to indicate using the default value (no transient value provided) |
393 | `notification-url` |  Url for notifications |
394 |`NOURL`| Indicator for no url |
395 | `<template-file>` |  Path to the template file for the policy |
396 | `<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 |
397
398 ## Function: api_put_policy_batch() ##
399 This tests the same as function 'api_put_policy' except that all put requests are sent to dmaap in one go and then the responses are polled one by one.
400 If the agent api is not configured to use dmaap (see 'use_agent_dmaap', 'use_agent_rest_http' and 'use_agent_rest_https'), an error message is printed.
401 For arg list and parameters, see 'api_put_policy'.
402
403 ## Function: api_put_policy_parallel() ##
404 This tests the same as function 'api_put_policy' except that the policy create is spread out over a number of processes and it only uses the agent 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.
405
406 | arg list |
407 |--|
408 | `<response-code> <service-name> <ric-id-base> <number-of-rics> <policytype-id> <policy-start-id> <transient> <template-file> <count-per-ric> <number-of-threads>`
409
410 | arg list |
411 |--|
412 | `<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>`
413
414 | parameter | description |
415 | --------- | ----------- |
416 | `<response-code>` | Expected http response code |
417 | `<service-id>` | Id of the service  |
418 | `<ric-id-base>` | The base id of the rics, ie ric id without the sequence number. The sequence number is added during processing  |
419 | `<number-of-rics>` | The number of rics, assuming the first index is '1'. The index is added to the 'ric-id-base' id  |
420 | `<policy-type-id>` |  Id of the policy type |
421 | `<policy-start-id>` |  Id of the policy. This value shall be a numeric value and will be the id of the first policy |
422 | `transient>` |  Transient 'true' or 'false'. 'NOTRANSIENT' can be used to indicate using the default value (no transient value provide) |
423 | `notification-url` |  Url for notifications |
424 | `<template-file>` |  Path to the template file for the policy |
425 | `<count-per-ric>` |  Number of policies per ric |
426 | `<number-of-threads>` |  Number of threads (processes) to run in parallel |
427
428 ## Function: api_delete_policy() ##
429 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.
430
431 | arg list |
432 |--|
433 | `<response-code> <policy-id> [<count>]`
434
435 | parameter | description |
436 | --------- | ----------- |
437 | `<response-code>` | Expected http response code |
438 | `<policy-id>` |  Id of the policy |
439 | `<count>` |  An optional count of policies to delete. The 'policy-id' will be the first id to be deleted. |
440
441 ## Function: api_delete_policy_batch() ##
442 This tests the same as function 'api_delete_policy' except that all delete requests are sent to dmaap in one go and then the responses are polled one by one.
443 If the agent api is not configured to used dmaap (see 'use_agent_dmaap', 'use_agent_rest_http' and 'use_agent_rest_https'), an error message is printed.
444 For arg list and parameters, see 'api_delete_policy'.
445
446 ## Function: api_delete_policy_parallel() ##
447 This tests the same as function 'api_delete_policy' except that the policy delete is spread out over a number of processes and it only uses the agent 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.
448
449 | arg list |
450 |--|
451 | `<response-code> <ric-id-base> <number-of-rics> <policy-start-id> <count-per-ric> <number-of-threads>`
452
453 | parameter | description |
454 | --------- | ----------- |
455 | `<response-code>` | Expected http response code |
456 | `<ric-id-base>` | The base id of the rics, ie ric id without the sequence number. The sequence number is added during processing  |
457 | `<number-of-rics>` | The number of rics, assuming the first index is '1'  |
458 | `<policy-start-id>` |  Id of the policy. This value shall be a numeric value and will be the id of the first policy |
459 | `<count-per-ric>` |  Number of policies per ric |
460 | `<number-of-threads>` |  Number of threads (processes) to run in parallel |
461
462
463 ## Function: api_get_policy_ids() ##
464
465 Test of GET '/policy_ids' or V2 GET '/v2/policies'.
466 To test response code only, provide the response code parameter as well as the following three parameters.
467 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.
468
469 | arg list |
470 |--|
471 | `<response-code> <ric-id>|NORIC <service-id>|NOSERVICE <type-id>|NOTYPE ([<policy-instance-id]*|NOID)` |
472
473 | parameter | description |
474 | --------- | ----------- |
475 | `<response-code>` | Expected http response code |
476 | `<ric-id>` | Id of the ric  |
477 | `NORIC` | Indicator that no ric is provided  |
478 | `<service-id>` | Id of the service  |
479 | `NOSERVICE` | Indicator that no service id is provided  |
480 | `type-id>` |  Id of the policy type |
481 | `NOTYPE` | Indicator that no type id is provided  |
482 | `NOID` |  Indicator that no policy id is provided - indicate empty list of policies|
483 | `<policy-instance-id>` |  Id of the policy |
484
485 ## Function: api_get_policy_schema() ##
486 Test of V2 GET '/v2/policy-types/{policyTypeId}' and optional check of the returned json schema.
487 To test the response code only, provide the expected response code and policy type id.
488 To test the contents of the returned json schema, add a path to a schema file to compare with.
489
490 | arg list |
491 |--|
492 | `<response-code> <policy-type-id> [<schema-file>]` |
493
494 | parameter | description |
495 | --------- | ----------- |
496 | `<response-code>` | Expected http response code |
497 | `<policy-type-id>` |  Id of the policy type |
498 | `<schema-file>` |  Path to the schema file for the policy type |
499
500 ## Function: api_get_policy_schema() ##
501 Test of GET '/policy_schema' and optional check of the returned json schema.
502 To test the response code only, provide the expected response code and policy type id.
503 To test the contents of the returned json schema, add a path to a schema file to compare with.
504
505 | arg list |
506 |--|
507 | `<response-code> <policy-type-id> [<schema-file>]` |
508
509 | parameter | description |
510 | --------- | ----------- |
511 | `<response-code>` | Expected http response code |
512 | `<policy-type-id>` |  Id of the policy type |
513 | `<schema-file>` |  Path to the schema file for the policy type |
514
515 ## Function: api_get_policy_schemas() ##
516 Test of GET '/policy_schemas' and optional check of the returned json schemas.
517 To test the response code only, provide the expected response code and ric id (or NORIC if no ric is given).
518 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)
519
520 | arg list |
521 |--|
522 | `<response-code>  <ric-id>|NORIC [<schema-file>|NOFILE]*` |
523
524 | parameter | description |
525 | --------- | ----------- |
526 | `<response-code>` | Expected http response code |
527 | `<ric-id>` |  Id of the ric |
528 | `NORIC` |  No ric id given |
529 | `<schema-file>` |  Path to the schema file for the policy type |
530 | `NOFILE` |  Indicate the template for an empty type |
531
532 ## Function: api_get_policy_status() ##
533 Test of GET '/policy_status' or V2 GET '/policies/{policy_id}/status'.
534
535 | arg list |
536 |--|
537 | `<response-code> <policy-id> (STD|STD2 <enforce-status>|EMPTY [<reason>|EMPTY])|(OSC <instance-status> <has-been-deleted>)` |
538
539 | parameter | description |
540 | --------- | ----------- |
541 | `<response-code>` | Expected http response code |
542 | `<policy-id>` |  Id of the policy |
543 | `STD` |  Indicator of status of Standarized A1 |
544 | `STD2` |  Indicator of status of Standarized A1 version 2 |
545 | `<enforce-status>` |  Enforcement status |
546 | `<reason>` |  Optional reason |
547 | `EMPTY` |  Indicator of empty string status or reason |
548 | `OSC` |  Indicator of status of Non-Standarized OSC A1 |
549 | `<instance-status>` |  Instance status |
550 | `<has-been-deleted>` |  Deleted status, true or false |
551
552 ## Function: api_get_policy_types() ##
553 Test of GET '/policy_types' or  V2 GET '/v2/policy-types' and optional check of the returned ids.
554 To test the response code only, provide the expected response code and ric id (or NORIC if no ric is given).
555 To test the contents of the returned json payload, add the list of expected policy type id (or 'EMPTY' for the '{}' type)
556
557 | arg list |
558 |--|
559 | `<response-code> [<ric-id>|NORIC [<policy-type-id>|EMPTY [<policy-type-id>]*]]` |
560
561 | parameter | description |
562 | --------- | ----------- |
563 | `<response-code>` | Expected http response code |
564 | `<ric-id>` |  Id of the ric |
565 | `NORIC` |  No ric id given |
566 | `<policy-type-id>` |  Id of the policy type |
567 | `EMPTY` |  Indicate the empty type |
568
569 ## Function: api_get_status() ##
570 Test of GET /status or V2 GET /status
571
572 | arg list |
573 |--|
574 | `<response-code>` |
575
576 | parameter | description |
577 | --------- | ----------- |
578 | `<response-code>` | Expected http response code |
579
580 ## Function: api_get_ric() ##
581 Test of GET '/ric' or V2 GET '/v2/rics/ric'
582 To test the response code only, provide the expected response code and managed element id.
583 To test the returned ric id, provide the expected ric id.
584
585 | arg list |
586 |--|
587 | `<reponse-code> <managed-element-id> [<ric-id>]` |
588
589 | arg list V2 |
590 |--|
591 | `<reponse-code> <management-element-id>|NOME <ric-id>|<NORIC> [<string-of-ricinfo>]` |
592
593 | parameter | description |
594 | --------- | ----------- |
595 | `<response-code>` | Expected http response code |
596 | `<managed-element-id>` |  Id of the managed element |
597 | `NOME` |  Indicator for no ME |
598 | `ric-id` |  Id of the ric |
599 | `NORIC` |  Indicator no RIC |
600 | `string-of-ricinfo` |  String of ric info |
601
602 ## Function: api_get_rics() ##
603 Test of GET '/rics' or V2 GET '/v2/rics' and optional check of the returned json payload (ricinfo).
604 To test the response code only, provide the expected response code and policy type id (or NOTYPE if no type is given).
605 To test also the returned payload, add the formatted string of info in the returned payload.
606 Format of ricinfo: '<ric-id>:<list-of-mes>:<list-of-policy-type-ids>'
607 Example `<space-separate-string-of-ricinfo> = "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2,4 ricsim_g1_1:me2_........."`
608
609 | arg list |
610 |--|
611 | `<reponse-code> <policy-type-id>|NOTYPE [<space-separate-string-of-ricinfo>]` |
612
613 | parameter | description |
614 | --------- | ----------- |
615 | `<response-code>` | Expected http response code |
616 | `<policy-type-id>` |  Policy type id of the ric |
617 | `NOTYPE>` |  No type given |
618 | `<space-separate-string-of-ricinfo>` |  A space separated string of ric info - needs to be quoted |
619
620 ## Function: api_put_service() ##
621 Test of PUT '/service' or V2 PUT '/service'.
622 | arg list |
623 |--|
624 | `<response-code>  <service-name> <keepalive-timeout> <callbackurl>` |
625
626 | parameter | description |
627 | --------- | ----------- |
628 | `<response-code>` | Expected http response code |
629 | `<service-name>` |  Service name |
630 | `<keepalive-timeout>` |  Timeout value |
631 | `<callbackurl>` |  Callback url |
632
633 ## Function: api_get_services() ##
634 Test of GET '/service' or V2 GET '/v2/services' and optional check of the returned json payload.
635 To test only the response code, omit all parameters except the expected response code.
636 To test the returned json, provide the parameters after the response code.
637
638 | arg list |
639 |--|
640 | `<response-code> [ (<query-service-name> <target-service-name> <keepalive-timeout> <callbackurl>) | (NOSERVICE <target-service-name> <keepalive-timeout> <callbackurl> [<target-service-name> <keepalive-timeout> <callbackurl>]* )]` |
641
642 | parameter | description |
643 | --------- | ----------- |
644 | `<response-code>` | Expected http response code |
645 | <query-service-name>` |  Service name for the query |
646 | <target-service-name>` |  Target service name|
647 | `<keepalive-timeout>` |  Timeout value |
648 | `<callbackurl>` |  Callback url |
649 | `NOSERVICE` |  Indicator of no target service name |
650
651 ## Function: api_get_service_ids() ##
652 Test of GET '/services' or V2 GET /'v2/services'. Only check of service ids.
653
654 | arg list |
655 |--|
656 | `<response-code> [<service-name>]*` |
657
658 | parameter | description |
659 | --------- | ----------- |
660 | `<response-code>` | Expected http response code |
661 | `<service-name>` |  Service name |
662
663 ## Function: api_delete_services() ##
664 Test of DELETE '/services' or V2 DELETE '/v2/services/{serviceId}'
665
666 | arg list |
667 |--|
668 | `<response-code> [<service-name>]*` |
669
670 | parameter | description |
671 | --------- | ----------- |
672 | `<response-code>` | Expected http response code |
673 | `<service-name>` |  Service name |
674
675 ## Function: api_put_services_keepalive() ##
676 Test of PUT '/services/keepalive' or V2 PUT '/v2/services/{service_id}/keepalive'
677
678 | arg list |
679 |--|
680 | <response-code> <service-name>` |
681
682 | parameter | description |
683 | --------- | ----------- |
684 | `<response-code>` | Expected http response code |
685 | `<service-name>` |  Service name |
686
687 ## Function: api_put_configuration() ##
688 Test of PUT '/v2/configuration'
689
690 | arg list |
691 |--|
692 | <response-code> <config-file>` |
693
694 | parameter | description |
695 | --------- | ----------- |
696 | `<response-code>` | Expected http response code |
697 | `<config-file>` |  Path json config file |
698
699 ## Function: api_get_configuration() ##
700 Test of GET '/v2/configuration'
701
702 | arg list |
703 |--|
704 | <response-code> [<config-file>]` |
705
706 | parameter | description |
707 | --------- | ----------- |
708 | `<response-code>` | Expected http response code |
709 | `<config-file>` |  Path json config file to compare the retrieved config with |
710 | parameter | description |
711 | --------- | ----------- |
712 | `[<response-code>]*` | A space separated list of http response codes, may be empty to reset to 'no codes'.  |
713
714
715 # Description of functions in consul_cbs_function.sh #
716
717
718 ## Function: consul_config_app ##
719 Function to load a json config from a file into consul for the Policy Agent
720
721 | arg list |
722 |--|
723 | `<json-config-file>` |
724
725 | parameter | description |
726 | --------- | ----------- |
727 | `<json-config-file>` | The path to the json file to be loaded to Consul/CBS |
728
729 ## Function: prepare_consul_config ##
730 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')
731 | arg list |
732 |--|
733 | `<deviation-message-to-print>` |
734
735 | parameter | description |
736 | --------- | ----------- |
737 | `SDNC|NOSDNC` | Configure based on a1-controller (SNDC) or without a controller/adapter (NOSDNC) |
738 | `<output-file>` | The path to the json output file containing the prepared config. This file is used in 'consul_config_app'  |
739
740 ## Function: start_consul_cbs ##
741 Start the Consul and CBS containers
742 | arg list |
743 |--|
744 | None |
745
746 # Description of functions in control_panel_api_function.sh #
747
748 ## Function: use_control_panel_http ##
749 Set http as the protocol to use for all communication to the Control Panel
750 | arg list |
751 |--|
752 | None |
753
754 ## Function: use_control_panel_https ##
755 Set https as the protocol to use for all communication to the Control Panel
756 | arg list |
757 |--|
758 | None |
759
760 ## Function: start_control_panel ##
761 Start the Control Panel container
762 | arg list |
763 |--|
764 | None |
765
766 # Description of functions in controller_api_functions.sh #
767 The file contains a selection of the possible API tests towards the a1-controller
768
769 ## Function: use_sdnc_http ##
770 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.
771 | arg list |
772 |--|
773 | None |
774
775 ## Function: use_sdnc_http ##
776 Use https for all API calls towards the SDNC A1 Controller. Note that this function shall be called before preparing the config for Consul.
777 | arg list |
778 |--|
779 | None |
780
781 ## Function: start_sdnc ##
782 Start the SDNC A1 Controller container and its database container
783 | arg list |
784 |--|
785 | None |
786
787 ## Function: check_sdnc_logs ##
788 Check the SDNC log for any warnings and errors and print the count of each.
789 | arg list |
790 |--|
791 | None |
792
793 ## Function: controller_api_get_A1_policy_ids ##
794 Test of GET policy ids towards OSC or STD type simulator.
795 To test response code only, provide the response code, 'OSC' + policy type or 'STD'
796 To test the response payload, include the ids of the expexted response.
797
798 | arg list |
799 |--|
800 | `<response-code> (OSC <ric-id> <policy-type-id> [ <policy-id> [<policy-id>]* ]) | ( STD <ric-id> [ <policy-id> [<policy-id>]* ]` |
801
802 | parameter | description |
803 | --------- | ----------- |
804 | `<response-code>` | Expected http response code |
805 | `OSC` |  Indicator of status of Non-Standarized OSC A1 |
806 | `<ric-id>` | Id of the ric  |
807 | `policy-type-id>` |  Id of the policy type |
808 | `<policy-id>` |  Id of the policy |
809 | `STD` |  Indicator of status of Standarized A1 |
810
811
812 ## Function: controller_api_get_A1_policy_type ##
813 Test of GET a policy type (OSC only)
814
815 | arg list |
816 |--|
817 | `<response-code> OSC <ric-id> <policy-type-id> [<policy-type-file>]` |
818
819 | parameter | description |
820 | --------- | ----------- |
821 | `<response-code>` | Expected http response code |
822 | `OSC` |  Indicator of status of Non-Standarized OSC A1 |
823 | `<ric-id>` | Id of the ric  |
824 | `policy-type-id>` |  Id of the policy type |
825 | `policy-type-file>` |  Optional schema file to compare the returned type with |
826
827 ## Function: controller_api_delete_A1_policy ##
828 Deletes a policy instance
829
830 | arg list |
831 |--|
832 | `(STD <ric-id> <policy-id>) | (OSC <ric-id> <policy-type-id> <policy-id>)` |
833
834 | parameter | description |
835 | --------- | ----------- |
836 | `<response-code>` | Expected http response code |
837 | `STD` |  Indicator of status of Standarized A1 |
838 | `<ric-id>` | Id of the ric  |
839 | `<policy-id>` |  Id of the policy |
840 | `policy-type-id>` |  Id of the policy type |
841 | `OSC` |  Indicator of status of Non-Standarized OSC A1 |
842 | `policy-type-file>` |  Optional schema file to compare the returned type with |
843
844 ## Function: controller_api_put_A1_policy ##
845 Creates a policy instance
846
847 | arg list |
848 |--|
849 | `<response-code> (STD <ric-id> <policy-id> <template-file> ) | (OSC <ric-id> <policy-type-id> <policy-id> <template-file>)` |
850
851 | parameter | description |
852 | --------- | ----------- |
853 | `<response-code>` | Expected http response code |
854 | `STD` |  Indicator of status of Standarized A1 |
855 | `<ric-id>` | Id of the ric  |
856 | `<policy-id>` |  Id of the policy |
857 | `<template-file>` |  Path to the template file of the policy|
858 | `OSC` |  Indicator of status of Non-Standarized OSC A1 |
859 | `<policy-type-id>` |  Id of the policy type |
860
861 ## Function: controller_api_get_A1_policy_status ##
862 Checks the status of a policy
863
864  arg list |
865 |--|
866 | `<response-code> (STD <ric-id> <policy-id> <enforce-status> [<reason>]) | (OSC <ric-id> <policy-type-id> <policy-id> <instance-status> <has-been-deleted>)` |
867
868 | parameter | description |
869 | --------- | ----------- |
870 | `<response-code>` | Expected http response code |
871 | `STD` |  Indicator of status of Standarized A1 |
872 | `<ric-id>` | Id of the ric  |
873 | `<policy-id>` |  Id of the policy |
874 | `<enforce-status>` |  Enforcement status |
875 | `<reason>` |  Optional reason |
876 | `OSC` |  Indicator of status of Non-Standarized OSC A1 |
877 | `<policy-type-id>` |  Id of the policy type |
878 | `<instance-status>` |  Instance status |
879 | `<has-been-deleted>` |  Deleted status, true or false |
880
881
882 # Description of functions in cr_api_functions.sh #
883
884 ## Function: use_cr_http ##
885 Use http for getting event from CR.  The admin API is not affected. This is the default.
886 | arg list |
887 |--|
888 | None |
889
890 ## Function: use_cr_https ##
891 Use https for getting event from CR. The admin API is not affected.
892 Note: Not yet used as callback event is not fully implemented/deciced.
893 | arg list |
894 |--|
895 | None |
896
897 ## Function: start_cr ##
898 Start the Callback Receiver container in docker or kube depending on start mode.
899 | arg list |
900 |--|
901 | None |
902
903 ## Function: cr_equal ##
904 Tests if a variable value in the Callback Receiver (CR) simulator is equal to a target value.
905 Without the timeout, the test sets pass or fail immediately depending on if the variable is equal to the target or not.
906 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.
907 See the 'cr' dir for more details.
908 | arg list |
909 |--|
910 | `<variable-name> <target-value> [ <timeout-in-sec> ]` |
911
912 | parameter | description |
913 | --------- | ----------- |
914 | `<variable-name>` | Variable name in the CR  |
915 | `<target-value>` | Target value for the variable  |
916 | `<timeout-in-sec>` | Max time to wait for the variable to reach the target value  |
917
918 ## Function: cr_api_check_all_sync_events() ##
919 Check the contents of all ric events received for a callback id.
920
921 | arg list |
922 |--|
923 | `<response-code> <id> [ EMPTY | ( <ric-id> )+ ]` |
924
925 | parameter | description |
926 | --------- | ----------- |
927 | `<response-code>` | Expected http response code |
928 | `<id>` | Id of the callback destination  |
929 | `EMPTY` | Indicator for an empty list  |
930 | `<ric-id>` | Id of the ric  |
931
932 # Description of functions in ecs_api_functions.sh #
933
934 ## Function: use_ecs_rest_http ##
935 Use http for all API calls to the ECS. This is the default protocol.
936 | arg list |
937 |--|
938 | None |
939
940 ## Function: use_ecs_rest_https ##
941 Use https for all API calls to the ECS.
942 | arg list |
943 |--|
944 | None |
945
946 ## Function: use_ecs_dmaap_http ##
947 Send and recieve all API calls to the ECS over Dmaap via the MR using http.
948 | arg list |
949 |--|
950 | None |
951
952 ## Function: use_ecs_dmaap_https ##
953 Send and recieve all API calls to the ECS over Dmaap via the MR using https.
954 | arg list |
955 |--|
956 | None |
957
958 ## Function: start_ecs ##
959 Start the ECS container in docker or kube depending on running mode.
960 | arg list |
961 |--|
962 | None |
963
964 ## Function: restart_ecs ##
965 Restart the ECS container.
966 | arg list |
967 |--|
968 | None |
969
970 ## Function: set_ecs_debug ##
971 Configure the ECS log on debug level. The ECS must be running.
972 | arg list |
973 |--|
974 | None |
975
976 ## Function: set_ecs_trace ##
977 Configure the ECS log on trace level. The ECS must be running.
978 | arg list |
979 |--|
980 | None |
981
982 ## Function: check_ecs_logs ##
983 Check the ECS log for any warnings and errors and print the count of each.
984 | arg list |
985 |--|
986 | None |
987
988 ## Function: ecs_equal ##
989 Tests if a variable value in the ECS is equal to a target value.
990 Without the timeout, the test sets pass or fail immediately depending on if the variable is equal to the target or not.
991 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.
992 See the 'a1-interface' repo for more details.
993
994 | arg list |
995 |--|
996 | `<variable-name> <target-value> [ <timeout-in-sec> ]` |
997
998 | parameter | description |
999 | --------- | ----------- |
1000 | `<variable-name>` | Variable name in ecs  |
1001 | `<target-value>` | Target value for the variable  |
1002 | `<timeout-in-sec>` | Max time to wait for the variable to reach the target value  |
1003
1004 ## Function: ecs_api_a1_get_job_ids() ##
1005 Test of GET '/A1-EI​/v1​/eitypes​/{eiTypeId}​/eijobs' and optional check of the array of returned job ids.
1006 To test the response code only, provide the response code parameter as well as a type id and an owner id.
1007 To also test the response payload add the 'EMPTY' for an expected empty array or repeat the last parameter for each expected job id.
1008
1009 | arg list |
1010 |--|
1011 | `<response-code> <type-id>  <owner-id>|NOOWNER [ EMPTY | <job-id>+ ]` |
1012
1013 | parameter | description |
1014 | --------- | ----------- |
1015 | `<response-code>` | Expected http response code |
1016 | `<type-id>` | Id of the EI type  |
1017 | `<owner-id>` | Id of the job owner  |
1018 | `NOOWNER` | No owner is given  |
1019 | `<job-id>` | Id of the expected job  |
1020 | `EMPTY` | The expected list of job id shall be empty  |
1021
1022 ## Function: ecs_api_a1_get_type() ##
1023 Test of GET '/A1-EI​/v1​/eitypes​/{eiTypeId}' and optional check of the returned schema.
1024 To test the response code only, provide the response code parameter as well as the type-id.
1025 To also test the response payload add a path to the expected schema file.
1026
1027 | arg list |
1028 |--|
1029 | `<response-code> <type-id> [<schema-file>]` |
1030
1031 | parameter | description |
1032 | --------- | ----------- |
1033 | `<response-code>` | Expected http response code |
1034 | `<type-id>` | Id of the EI type  |
1035 | `<schema-file>` | Path to a schema file to compare with the returned schema  |
1036
1037 ## Function: ecs_api_a1_get_type_ids() ##
1038 Test of GET '/A1-EI​/v1​/eitypes' and optional check of returned list of type ids.
1039 To test the response code only, provide the response only.
1040 To also test the response payload add the list of expected type ids (or EMPTY if the list is expected to be empty).
1041
1042 | arg list |
1043 |--|
1044 | `<response-code> [ (EMPTY | [<type-id>]+) ]` |
1045
1046 | parameter | description |
1047 | --------- | ----------- |
1048 | `<response-code>` | Expected http response code |
1049 | `EMPTY` | The expected list of type ids shall be empty  |
1050 | `<type-id>` | Id of the EI type  |
1051
1052 ## Function: ecs_api_a1_get_job_status() ##
1053 Test of GET '/A1-EI​/v1​/eitypes​/{eiTypeId}​/eijobs​/{eiJobId}​/status' and optional check of the returned status.
1054 To test the response code only, provide the response code, type id and job id.
1055 To also test the response payload add the expected status.
1056
1057 | arg list |
1058 |--|
1059 | `<response-code> <type-id> <job-id> [<status>]` |
1060
1061 | parameter | description |
1062 | --------- | ----------- |
1063 | `<response-code>` | Expected http response code |
1064 | `<type-id>` | Id of the EI type  |
1065 | `<job-id>` | Id of the job  |
1066 | `<status>` | Expected status  |
1067
1068 ## Function: ecs_api_a1_get_job() ##
1069 Test of GET '/A1-EI​/v1​/eitypes​/{eiTypeId}​/eijobs​/{eiJobId}' and optional check of the returned job.
1070 To test the response code only, provide the response code, type id and job id.
1071 To also test the response payload add the remaining parameters.
1072
1073 | arg list |
1074 |--|
1075 | `<response-code> <type-id> <job-id> [<target-url> <owner-id> <template-job-file>]` |
1076
1077 | parameter | description |
1078 | --------- | ----------- |
1079 | `<response-code>` | Expected http response code |
1080 | `<type-id>` | Id of the EI type  |
1081 | `<job-id>` | Id of the job  |
1082 | `<target-url>` | Expected target url for the job  |
1083 | `<owner-id>` | Expected owner for the job  |
1084 | `<template-job-file>` | Path to a job template for job parameters of the job  |
1085
1086 ## Function: ecs_api_a1_delete_job() ##
1087 Test of DELETE '/A1-EI​/v1​/eitypes​/{eiTypeId}​/eijobs​/{eiJobId}'.
1088 To test, provide all the specified parameters.
1089
1090 | arg list |
1091 |--|
1092 | `<response-code> <type-id> <job-id> |
1093
1094 | parameter | description |
1095 | --------- | ----------- |
1096 | `<response-code>` | Expected http response code |
1097 | `<type-id>` | Id of the EI type  |
1098 | `<job-id>` | Id of the job  |
1099
1100 ## Function: ecs_api_a1_put_job() ##
1101 Test of PUT '/A1-EI​/v1​/eitypes​/{eiTypeId}​/eijobs​/{eiJobId}'.
1102 To test, provide all the specified parameters.
1103
1104 | arg list |
1105 |--|
1106 | `<response-code> <type-id> <job-id> <target-url> <owner-id> <template-job-file>` |
1107
1108 | parameter | description |
1109 | --------- | ----------- |
1110 | `<response-code>` | Expected http response code |
1111 | `<type-id>` | Id of the EI type  |
1112 | `<job-id>` | Id of the job  |
1113 | `<target-url>` | Target url for the job  |
1114 | `<owner-id>` | Owner of the job  |
1115 | `<template-job-file>` | Path to a job template for job parameters of the job  |
1116
1117 ## Function: ecs_api_edp_get_type_ids() ##
1118 Test of GET '/ei-producer/v1/eitypes' and an optional check of the returned list of type ids.
1119 To test the response code only, provide the response code.
1120 To also test the response payload add list of expected type ids (or EMPTY if the list is expected to be empty).
1121
1122 | arg list |
1123 |--|
1124 | `<response-code> [ EMPTY | <type-id>+]` |
1125
1126 | parameter | description |
1127 | --------- | ----------- |
1128 | `<response-code>` | Expected http response code |
1129 | `<type-id>` | Id of the EI type  |
1130 | `EMPTY` | The expected list of type ids shall be empty  |
1131
1132 ## Function: ecs_api_edp_get_producer_status() ##
1133 Test of GET '/ei-producer/v1/eiproducers/{eiProducerId}/status' and optional check of the returned status.
1134 To test the response code only, provide the response code and producer id.
1135 To also test the response payload add the expected status.
1136
1137 | arg list |
1138 |--|
1139 | `<response-code> <producer-id> [<status>]` |
1140
1141 | parameter | description |
1142 | --------- | ----------- |
1143 | `<response-code>` | Expected http response code |
1144 | `<producer-id>` | Id of the producer  |
1145 | `<status>` | The expected status string  |
1146
1147 ## Function: ecs_api_edp_get_producer_ids() ##
1148 Test of GET '/ei-producer/v1/eiproducers' and optional check of the returned producer ids.
1149 To test the response code only, provide the response.
1150 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).
1151
1152 | arg list |
1153 |--|
1154 | `<response-code> [ EMPTY | <producer-id>+]` |
1155
1156 | parameter | description |
1157 | --------- | ----------- |
1158 | `<response-code>` | Expected http response code |
1159 | `<producer-id>` | Id of the producer  |
1160 | `EMPTY` | The expected list of type ids shall be empty  |
1161
1162 ## Function: ecs_api_edp_get_type() ##
1163 Test of GET '/ei-producer/v1/eitypes/{eiTypeId}' and optional check of the returned type.
1164 To test the response code only, provide the response and the type-id.
1165 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).
1166
1167 | arg list |
1168 |--|
1169 | `<response-code> <type-id> [<job-schema-file> (EMPTY | [<producer-id>]+)]` |
1170
1171 | parameter | description |
1172 | --------- | ----------- |
1173 | `<response-code>` | Expected http response code |
1174 | `<type-id>` | Id of the EI type  |
1175 | `<job-schema-file>` | Path to a job schema file  |
1176 | `<producer-id>` | Id of the producer  |
1177 | `EMPTY` | The expected list of type ids shall be empty  |
1178
1179 ## Function: ecs_api_edp_get_producer() ##
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 EI type  |
1196 | `<schema-file>` | Path to a schema file  |
1197 | `EMPTY` | The expected list of type schema pairs shall be empty  |
1198
1199 ## Function: ecs_api_edp_delete_producer() ##
1200 Test of DELETE '/ei-producer/v1/eiproducers/{eiProducerId}'.
1201 To test, provide all parameters.
1202
1203 | arg list |
1204 |--|
1205 | `<response-code> <producer-id>` |
1206
1207 | parameter | description |
1208 | --------- | ----------- |
1209 | `<response-code>` | Expected http response code |
1210 | `<producer-id>` | Id of the producer  |
1211
1212 ## Function: ecs_api_edp_put_producer() ##
1213 Test of PUT '/ei-producer/v1/eiproducers/{eiProducerId}'.
1214 To test, provide all parameters. The list of type/schema pair may be empty.
1215
1216 | arg list |
1217 |--|
1218 | `<response-code> <producer-id> <job-callback> <supervision-callback> (EMPTY | [<type-id> <schema-file>]+)` |
1219
1220 | parameter | description |
1221 | --------- | ----------- |
1222 | `<response-code>` | Expected http response code |
1223 | `<producer-id>` | Id of the producer  |
1224 | `<job-callback>` | Callback for create/delete job  |
1225 | `<supervision-callback>` | Callback for producer supervision  |
1226 | `<type-id>` | Id of the EI type  |
1227 | `<schema-file>` | Path to a schema file  |
1228 | `EMPTY` | The list of type/schema pairs is empty  |
1229
1230 ## Function: ecs_api_edp_get_producer_jobs() ##
1231 Test of GET '/ei-producer/v1/eiproducers/{eiProducerId}/eijobs' and optional check of the returned producer job.
1232 To test the response code only, provide the response and the producer-id.
1233 To also test the response payload add the remaining parameters.
1234
1235 | arg list |
1236 |--|
1237 | `<response-code> <producer-id> (EMPTY | [<job-id> <type-id> <target-url> <job-owner> <template-job-file>]+)` |
1238
1239 | parameter | description |
1240 | --------- | ----------- |
1241 | `<response-code>` | Expected http response code |
1242 | `<producer-id>` | Id of the producer  |
1243 | `<job-id>` | Id of the job  |
1244 | `<type-id>` | Id of the EI type  |
1245 | `<target-url>` | Target url for data delivery  |
1246 | `<job-owner>` | Id of the job owner  |
1247 | `<template-job-file>` | Path to a job template file  |
1248 | `EMPTY` | The list of job/type/target/job-file tuples is empty  |
1249
1250 ## Function: ecs_api_service_status() ##
1251 Test of GET '/status'.
1252
1253 | arg list |
1254 |--|
1255 | `<response-code>` |
1256
1257 | parameter | description |
1258 | --------- | ----------- |
1259 | `<response-code>` | Expected http response code |
1260
1261 ## Function: ecs_api_admin_reset() ##
1262 Test of GET '/status'.
1263
1264 | arg list |
1265 |--|
1266 | `<response-code> [ <type> ]` |
1267
1268 | parameter | description |
1269 | --------- | ----------- |
1270 | `<response-code>` | Expected http response code |
1271 | `<type>` | Type id, if the interface supports type in url |
1272
1273 # Description of functions in gateway_api_functions.sh #
1274
1275
1276 ## Function: use_gateway_http ##
1277 Use http for all calls to the gateway. This is set by default.
1278 | arg list |
1279 |--|
1280 | None |
1281
1282 ## Function: use_gateway_https ##
1283 Use https for all calls to the gateway.
1284 | arg list |
1285 |--|
1286 | None |
1287
1288 ## Function: set_gateway_debug ##
1289 Set debug level logging in the gateway
1290 | arg list |
1291 |--|
1292 | None |
1293
1294 ## Function: set_gateway_trace ##
1295 Set debug level logging in the trace
1296 | arg list |
1297 |--|
1298 | None |
1299
1300 ## Function: start_gateway ##
1301 Start the the gateway container in docker or kube depending on start mode
1302 | arg list |
1303 |--|
1304 | None |
1305
1306 ## Function: gateway_pms_get_status ##
1307 Sample test of pms api (status)
1308 | arg list |
1309 |--|
1310 | `<response-code> ` |
1311
1312 | parameter | description |
1313 | --------- | ----------- |
1314 | `<response-code>` | Expected http response code |
1315
1316 ## Function: gateway_ecs_get_types ##
1317 Sample test of ecs api (get ei type)
1318 Only response code tested - not payload
1319 | arg list |
1320 |--|
1321 | `<response-code> ` |
1322
1323 | parameter | description |
1324 | --------- | ----------- |
1325 | `<response-code>` | Expected http response code |
1326
1327 # Description of functions in http_proxy_api_functions.sh #
1328
1329 ## Function: start_http_proxy ##
1330 Start the http proxy container in docker or kube depending on running mode.
1331 | arg list |
1332 |--|
1333 | None |
1334
1335 # Description of functions in kube_proxy_api_functions.sh #
1336
1337 ## Function: start_kube_proxy ##
1338 Start the kube proxy container in kube. This proxy enabled the test env to access all services and pods in a kube cluster.
1339 No proxy is started if the function is called in docker mode.
1340 | arg list |
1341 |--|
1342 | None |
1343
1344 # Description of functions in mr_api_functions.sh #
1345
1346 ## Function: use_mr_http ##
1347 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.
1348 | arg list |
1349 |--|
1350 | None |
1351
1352 ## Function: use_mr_https ##
1353 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.
1354 | arg list |
1355 |--|
1356 | None |
1357
1358 ## Function: start_mr ##
1359 Start the Message Router stub interface container in docker or kube depending on start mode
1360 | arg list |
1361 |--|
1362 | None |
1363
1364
1365 ## Function: mr_equal ##
1366 Tests if a variable value in the Message Router (MR) simulator is equal to a target value.
1367 Without the timeout, the test sets pass or fail immediately depending on if the variable is equal to the target or not.
1368 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.
1369 See the 'mrstub' dir for more details.
1370 | arg list |
1371 |--|
1372 | `<variable-name> <target-value> [ <timeout-in-sec> ]` |
1373
1374 | parameter | description |
1375 | --------- | ----------- |
1376 | `<variable-name>` | Variable name in the MR  |
1377 | `<target-value>` | Target value for the variable  |
1378 | `<timeout-in-sec>` | Max time to wait for the variable to reach the target value  |
1379
1380 ## Function: mr_greater ##
1381 Tests if a variable value in the Message Router (MR) simulator is greater than a target value.
1382 Without the timeout, the test sets pass or fail immediately depending on if the variable is greater than the target or not.
1383 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.
1384 See the 'mrstub' dir for more details.
1385 | arg list |
1386 |--|
1387 | `<variable-name> <target-value> [ <timeout-in-sec> ]` |
1388
1389 | parameter | description |
1390 | --------- | ----------- |
1391 | `<variable-name>` | Variable name in the MR  |
1392 | `<target-value>` | Target value for the variable  |
1393 | `<timeout-in-sec>` | Max time to wait for the variable to become grater than the target value  |
1394
1395 ## Function: mr_read ##
1396 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.
1397 See the 'mrstub' dir for more details.
1398 | arg list |
1399 |--|
1400 | `<variable-name>` |
1401
1402 | parameter | description |
1403 | --------- | ----------- |
1404 | `<variable-name>` | Variable name in the MR  |
1405
1406 ## Function: mr_print ##
1407 Prints the value of a variable in the Message Router (MR) simulator.
1408 See the 'mrstub' dir for more details.
1409 | arg list |
1410 |--|
1411 | `<variable-name>` |
1412
1413 | parameter | description |
1414 | --------- | ----------- |
1415 | `<variable-name>` | Variable name in the MR  |
1416
1417
1418 # Description of functions in prodstub_api_functions.sh #
1419
1420 ## Function: use_prod_stub_http ##
1421 Use http for the API.  The admin API is not affected. This is the default protocol.
1422 | arg list |
1423 |--|
1424 | None |
1425
1426 ## Function: use_prod_stub_https ##
1427 Use https for the API. The admin API is not affected.
1428 | arg list |
1429 |--|
1430 | None |
1431
1432 ## Function: start_prod_stub ##
1433 Start the Producer stub container in docker or kube depending on start mode
1434 | arg list |
1435 |--|
1436 | None |
1437
1438 ## Function: prodstub_arm_producer() ##
1439 Preconfigure the prodstub with a producer. The producer supervision response code is optional, if not given the response code will be set to 200.
1440
1441 | arg list |
1442 |--|
1443 | `<response-code> <producer-id> [<forced_response_code>]` |
1444
1445 | parameter | description |
1446 | --------- | ----------- |
1447 | `<response-code>` | Expected http response code |
1448 | `<producer-id>` | Id of the producer  |
1449 | `<forced_response_code>` | Forced response code for the producer callback url |
1450
1451 ## Function: prodstub_arm_job_create() ##
1452 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.
1453
1454 | arg list |
1455 |--|
1456 | `<response-code> <job-id> [<forced_response_code>]` |
1457
1458 | parameter | description |
1459 | --------- | ----------- |
1460 | `<response-code>` | Expected http response code |
1461 | `<job-id>` | Id of the job  |
1462 | `<forced_response_code>` | Forced response code for the create callback url |
1463
1464 ## Function: prodstub_arm_job_delete() ##
1465 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.
1466
1467 | arg list |
1468 |--|
1469 | `<response-code> <job-id> [<forced_response_code>]` |
1470
1471 | parameter | description |
1472 | --------- | ----------- |
1473 | `<response-code>` | Expected http response code |
1474 | `<job-id>` | Id of the job  |
1475 | `<forced_response_code>` | Forced response code for the delete callback url |
1476
1477 ## Function: prodstub_arm_type() ##
1478 Preconfigure the prodstub with a type for a producer. Can be called multiple times to add more types.
1479
1480 | arg list |
1481 |--|
1482 | `<response-code> <producer-id> <type-id>` |
1483
1484 | parameter | description |
1485 | --------- | ----------- |
1486 | `<response-code>` | Expected http response code |
1487 | `<producer-id>` | Id of the producer  |
1488 | `<type-id>` | Id of the type  |
1489
1490 ## Function: prodstub_disarm_type() ##
1491 Remove a type for the producer in the rodstub. Can be called multiple times to remove more types.
1492
1493 | arg list |
1494 |--|
1495 | `<response-code> <producer-id> <type-id>` |
1496
1497 | parameter | description |
1498 | --------- | ----------- |
1499 | `<response-code>` | Expected http response code |
1500 | `<producer-id>` | Id of the producer  |
1501 | `<type-id>` | Id of the type  |
1502
1503 ## Function: prodstub_check_jobdata() ##
1504 Check a job in the prodstub towards the list of provided parameters.
1505
1506 | arg list |
1507 |--|
1508 | `<response-code> <producer-id> <job-id> <type-id> <target-url> <job-owner> <template-job-file>` |
1509
1510 | parameter | description |
1511 | --------- | ----------- |
1512 | `<response-code>` | Expected http response code |
1513 | `<producer-id>` | Id of the producer  |
1514 | `<job-id>` | Id of the job  |
1515 | `<type-id>` | Id of the type  |
1516 | `<target-url>` | Target url for data delivery  |
1517 | `<job-owner>` | Id of the job owner  |
1518 | `<template-job-file>` | Path to a job template file  |
1519
1520 ## Function: prodstub_delete_jobdata() ##
1521 Delete the job parameters, job data, for a job.
1522
1523 | arg list |
1524 |--|
1525 | `<response-code> <producer-id> <job-id>` |
1526
1527 | parameter | description |
1528 | --------- | ----------- |
1529 | `<response-code>` | Expected http response code |
1530 | `<producer-id>` | Id of the producer  |
1531 | `<job-id>` | Id of the job  |
1532
1533
1534 ## Function: prodstub_equal ##
1535 Tests if a variable value in the prodstub is equal to a target value.
1536 Without the timeout, the test sets pass or fail immediately depending on if the variable is equal to the target or not.
1537 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.
1538
1539 | arg list |
1540 |--|
1541 | `<variable-name> <target-value> [ <timeout-in-sec> ]` |
1542
1543 | parameter | description |
1544 | --------- | ----------- |
1545 | `<variable-name>` | Variable name in the prostub  |
1546 | `<target-value>` | Target value for the variable  |
1547 | `<timeout-in-sec>` | Max time to wait for the variable to reach the target value  |
1548
1549
1550 # Description of functions in rapp_catalogue_api_function.sh #
1551
1552 ## Function: use_rapp_catalogue_http ##
1553 Use http for the API. This is the default protocol.
1554 | arg list |
1555 |--|
1556 | None |
1557
1558 ## Function: use_rapp_catalogue_https ##
1559 Use https for the API.
1560 | arg list |
1561 |--|
1562 | None |
1563
1564 ## Function: start_rapp_catalogue ##
1565 Start the rapp catalogue container in docker or kube depending on start mode
1566 | arg list |
1567 |--|
1568 | None |
1569
1570 ## Function: rc_equal ##
1571 Tests if a variable value in the RAPP Catalogue is equal to a target value.
1572 Without the timeout, the test sets pass or fail immediately depending on if the variable is equal to the target or not.
1573 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.
1574 See the 'cr' dir for more details.
1575 | arg list |
1576 |--|
1577 | `<variable-name> <target-value> [ <timeout-in-sec> ]` |
1578
1579 | parameter | description |
1580 | --------- | ----------- |
1581 | `<variable-name>` | Variable name in the RC  |
1582 | `<target-value>` | Target value for the variable  |
1583 | `<timeout-in-sec>` | Max time to wait for the variable to reach the target value  |
1584
1585 ## Function: rapp_cat_api_get_services() ##
1586 Check all registered services.
1587
1588 | arg list |
1589 |--|
1590 | `<response-code> [(<service-id> <version> <display-name> <description>)+ | EMPTY ]` |
1591
1592 | parameter | description |
1593 | --------- | ----------- |
1594 | `<response-code>` | Expected http response code |
1595 | `<service-id>` | Id of the service  |
1596 | `<version>` | Version of the service  |
1597 | `<display-name>` | Dislay name of the service  |
1598 | `<description>` | Description of the service  |
1599 | `EMPTY` | Indicator for an empty list  |
1600
1601 ## Function: rapp_cat_api_put_service() ##
1602 Register a services.
1603
1604 | arg list |
1605 |--|
1606 | `<response-code> <service-id> <version> <display-name> <description>` |
1607
1608 | parameter | description |
1609 | --------- | ----------- |
1610 | `<response-code>` | Expected http response code |
1611 | `<service-id>` | Id of the service  |
1612 | `<version>` | Version of the service  |
1613 | `<display-name>` | Dislay name of the service  |
1614 | `<description>` | Description of the service  |
1615
1616 ## Function: rapp_cat_api_get_service() ##
1617 Check a registered service.
1618
1619 | arg list |
1620 |--|
1621 | `<response-code> <service-id> <version> <display-name> <description>` |
1622
1623 | parameter | description |
1624 | --------- | ----------- |
1625 | `<response-code>` | Expected http response code |
1626 | `<service-id>` | Id of the service  |
1627 | `<version>` | Version of the service  |
1628 | `<display-name>` | Dislay name of the service  |
1629 | `<description>` | Description of the service  |
1630
1631 ## Function: rapp_cat_api_delete_service() ##
1632 Check a registered service.
1633
1634 | arg list |
1635 |--|
1636 | `<response-code> <service-id>` |
1637
1638 | parameter | description |
1639 | --------- | ----------- |
1640 | `<response-code>` | Expected http response code |
1641 | `<service-id>` | Id of the service  |
1642
1643
1644 # Description of functions in ricsimulator_api_functions.sh #
1645 The functions below only use the admin interface of the simulator, no usage of the A1 interface.
1646
1647
1648 ## Function: use_simulator_http ##
1649 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.
1650 | arg list |
1651 |--|
1652 | None |
1653
1654 ## Function: use_simulator_https ##
1655 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.
1656 | arg list |
1657 |--|
1658 | None |
1659
1660 ## Function: start_ric_simulators ##
1661 Start a group of simulator where a group may contain 1 more simulators. Started in docker or kube depending on start mode
1662 | arg list |
1663 |--|
1664 | `ricsim_g1|ricsim_g2|ricsim_g3 <count> <interface-id>` |
1665
1666 | parameter | description |
1667 | --------- | ----------- |
1668 | `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  |
1669 |`<count>`| And integer, 1 or greater. Specifies the number of simulators to start|
1670 |`<interface-id>`| Shall be the interface id of the simulator. See the repo 'a1-interface' for the available ids. |
1671
1672 ## Function: get_kube_sim_host ##
1673 Translate ric name to kube host name.
1674 | arg list |
1675 |--|
1676 | `<ric-name>` |
1677
1678 | parameter | description |
1679 | --------- | ----------- |
1680 | `<ric-name>` | The name of the ric to translate into a host name (ip) |
1681
1682 ## Function: generate_policy_uuid ##
1683 Geneate a UUID prefix to use along with the policy instance number when creating/deleting policies. Sets the env var UUID.
1684 UUID is then automatically added to the policy id in GET/PUT/DELETE.
1685 | arg list |
1686 |--|
1687 | None |
1688
1689 ## Function: sim_equal ##
1690 Tests if a variable value in the RIC simulator is equal to a target value.
1691 Without the timeout, the test sets pass or fail immediately depending on if the variable is equal to the target or not.
1692 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.
1693 See the 'a1-interface' repo for more details.
1694
1695 | arg list |
1696 |--|
1697 | `<variable-name> <target-value> [ <timeout-in-sec> ]` |
1698
1699 | parameter | description |
1700 | --------- | ----------- |
1701 | `<variable-name>` | Variable name in the ric simulator  |
1702 | `<target-value>` | Target value for the variable  |
1703 | `<timeout-in-sec>` | Max time to wait for the variable to reach the target value  |
1704
1705 ## Function: sim_print ##
1706 Prints the value of a variable in the RIC simulator.
1707 See the 'a1-interface' repo for more details.
1708
1709 | arg list |
1710 |--|
1711 | `<variable-name>` |
1712
1713 | parameter | description |
1714 | --------- | ----------- |
1715 | `<variable-name>` | Variable name in the RIC simulator  |
1716
1717
1718 ## Function: sim_contains_str ##
1719 Tests if a variable value in the RIC simulator contains a target string.
1720 Without the timeout, the test sets pass or fail immediately depending on if the variable contains the target string or not.
1721 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.
1722 See the 'a1-interface' repo for more details.
1723
1724 | arg list |
1725 |--|
1726 | `<variable-name> <target-value> [ <timeout-in-sec> ]` |
1727
1728 | parameter | description |
1729 | --------- | ----------- |
1730 | `<variable-name>` | Variable name in the ric simulator  |
1731 | `<target-value>` | Target substring for the variable  |
1732 | `<timeout-in-sec>` | Max time to wait for the variable to reach the target value  |
1733
1734 ## Function: sim_put_policy_type ##
1735 Loads a policy type to the simulator
1736
1737 | arg list |
1738 |--|
1739 | `<response-code> <ric-id> <policy-type-id> <policy-type-file>` |
1740
1741 | parameter | description |
1742 | --------- | ----------- |
1743 | `<response-code>` | Expected http response code |
1744 | `<ric-id>` |  Id of the ric |
1745 | `<policy-type-id>` |  Id of the policy type |
1746 | `<policy-type-file>` |  Path to the schema file of the policy type |
1747
1748 ## Function: sim_delete_policy_type ##
1749 Deletes a policy type from the simulator
1750
1751 | arg list |
1752 |--|
1753 | `<response-code> <ric-id> <policy_type_id>` |
1754
1755 | parameter | description |
1756 | --------- | ----------- |
1757 | `<response-code>` | Expected http response code |
1758 | `<ric-id>` |  Id of the ric |
1759 | `<policy-type-id>` |  Id of the policy type |
1760
1761 ## Function: sim_post_delete_instances ##
1762 Deletes all instances (and status), for one ric
1763
1764 | arg list |
1765 |--|
1766 | `<response-code> <ric-id>` |
1767
1768 | parameter | description |
1769 | --------- | ----------- |
1770 | `<response-code>` | Expected http response code |
1771 | `<ric-id>` |  Id of the ric |
1772
1773
1774 ## Function: sim_post_delete_all ##
1775 Deletes all types, instances (and status), for one ric
1776
1777 | arg list |
1778 |--|
1779 | `<response-code> <ric-id>` |
1780
1781 | parameter | description |
1782 | --------- | ----------- |
1783 | `<response-code>` | Expected http response code |
1784 | `<ric-id>` |  Id of the ric |
1785
1786 ## Function: sim_post_forcedresponse ##
1787 Sets (or resets) response code for next (one) A1 message, for one ric.
1788 The intention is to simulate error response on the A1 interface.
1789
1790 | arg list |
1791 |--|
1792 | `<response-code> <ric-id> [<forced_response_code>]`|
1793
1794 | parameter | description |
1795 | --------- | ----------- |
1796 | `<response-code>` | Expected http response code |
1797 | `<ric-id>` |  Id of the ric |
1798 | `<forced_response_code>` |  Http response code to send |
1799
1800 ## Function: sim_post_forcedelay ##
1801 Sets (or resets) A1 response delay, for one ric
1802 The intention is to delay responses on the A1 interface. Setting remains until removed.
1803
1804 | arg list |
1805 |--|
1806 | `<response-code> <ric-id> [<delay-in-seconds>]`|
1807
1808 | parameter | description |
1809 | --------- | ----------- |
1810 | `<response-code>` | Expected http response code |
1811 | `<ric-id>` |  Id of the ric |
1812 | `<delay-in-seconds>` |  Delay in seconds. If omitted, the delay is removed |
1813
1814
1815 ## License
1816
1817 Copyright (C) 2020 Nordix Foundation. All rights reserved.
1818 Licensed under the Apache License, Version 2.0 (the "License");
1819 you may not use this file except in compliance with the License.
1820 You may obtain a copy of the License at
1821
1822      http://www.apache.org/licenses/LICENSE-2.0
1823
1824 Unless required by applicable law or agreed to in writing, software
1825 distributed under the License is distributed on an "AS IS" BASIS,
1826 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1827 See the License for the specific language governing permissions and
1828 limitations under the License.