Removal of older test profiles
[nonrtric.git] / test / common / README.md
index dc7b64d..ef65172 100644 (file)
@@ -6,11 +6,14 @@ Some of the scripts can also be used for other kinds of tests, for example basic
 ## Overview for common test scripts and files ##
 
 `api_curl.sh` \
-A common curl based function for the agent and ics apis. Also partly used for the Callback receiver and RAPP Catalogue apis.
+A common curl based function for the a1pms and ics apis. Also partly used for the Callback receiver and RAPP Catalogue apis.
 
 `cbs_api_function.sh` \
 All functions are implemented in `consul_api_function.sh`.
 
+`chartmus_api_functions.sh` \
+Contains functions for managing a Chartmuseum instance.
+
 `clean-docker.sh` \
 Cleans all containers started by the test environment in docker.
 
@@ -45,7 +48,7 @@ A python script to create a json file from a formatted string of ric info. Helpe
 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.
 
 `dmaapadp_api_function.sh`
-Contains funnctions for managing the Dmaap Adaptor Service.
+Contains funnctions for managing the Dmaap Adapter.
 
 `dmaapmed_api_function.sh`
 Contains funnctions for managing the Dmaap Mediator Service.
@@ -62,6 +65,9 @@ A python script to extract the information from an sdnc (A1 Controller) reply js
 `genstat.sh` \
 This script collects container statistics to a file. Works both in docker and kubernetes (only for docker runtime).
 
+`helmmanager_api_functions.sh` \
+Contains functions for managing and testing of the Helm Manager.
+
 `http_proxy_api_functions.sh` \
 Contains functions for managing the Http Proxy.
 
@@ -74,14 +80,17 @@ Contains functions for managing the kafka producer/consumer. Kafka is started by
 `kube_proxy_api_functions.sh` \
 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.
 
+`localhelm_api_functions.sh` \
+Contains functions for helm access on localhost.
+
 `mr_api_functions.sh` \
 Contains functions for managing the MR Stub and the Dmaap Message Router
 
 `ngw_api_functions.sh` \
 Contains functions for managing the Non-RT RIC Gateway
 
-`pa_api_functions.sh` \
-Contains functions for adapting towards the Policy Management Service (PMS) API, also via dmaap (using a message-router stub interface)
+`a1pms_api_functions.sh` \
+Contains functions for adapting towards the Policy Management Service (A1PMS) API, also via dmaap (using a message-router stub interface)
 
 `prodstub_api_functions.sh` \
 Contains functions for adapting towards the Producer stub interface - simulates a producer.
@@ -134,6 +143,7 @@ This file must implement the following functions used by the test engine. Note t
 | __<app-short_name>_store_docker_logs |
 | __<app-short_name>_initial_setup |
 | __<app-short_name>_statisics_setup |
+| __<app-short_name>_test_requirements |
 
 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.
 
@@ -163,7 +173,7 @@ The script can be started with these arguments
 
 | arg list |
 |--|
-| `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]` |
+| `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>+] [--use-external-image <app-nam>+] [--image-repo <repo-address>] [--repo-policy local\|remote] [--cluster-timeout <timeout-in-seconds>]  [--print-stats]` |
 
 | parameter | description |
 |-|-|
@@ -180,6 +190,7 @@ The script can be started with these arguments
 | `--use-snapshot-image` | The script will use images from the nexus snapshot repo for the supplied apps, space separated list of app short names |
 | `--use-staging-image` | The script will use images from the nexus staging repo for the supplied apps, space separated list of app short names |
 | `--use-release-image` | The script will use images from the nexus release repo for the supplied apps, space separated list of app short names |
+| `--use-external-image` | The script will use images from an external repo for the supplied apps, space separated list of app short names |
 | `--image-repo` |  Url to optional image repo. Only locally built images will be re-tagged and pushed to this repo |
 | `-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' |
 | `--cluster-timeout` |  Optional timeout for cluster where it takes time to obtain external ip/host-name. Timeout in seconds |
@@ -187,6 +198,9 @@ The script can be started with these arguments
 | `--override <file>` |  Override setting from the file supplied by --env-file |
 | `--pre-clean` |  Clean kube resouces when running docker and vice versa |
 | `--gen-stats`  | Collect container/pod runtime statistics |
+| `--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. |
+| `--delete-containers`  | Delete docker containers before starting tests - but only those created by the test scripts. Docker mode only. |
+| `--endpoint-stats`  | Collect http endpoint statistics |
 | `help` | Print this info along with the test script description and the list of app short names supported |
 
 ## Function: setup_testenvironment ##
@@ -283,26 +297,37 @@ Print out the overall result of the executed test cases.
 |--|
 | None |
 
-# Description of functions in consul_api_function.sh #
+# Description of functions in chartmus_api_function.sh #
+
+## Function: start_chart_museum ##
 
-## Function: consul_config_app ##
+Start the Chart Museum
+| arg list |
+|--|
+| None |
 
-Function to load a json config from a file into consul for the Policy Agent
+## Function: chartmus_upload_test_chart ##
 
+Upload a package chart to chartmusem
 | arg list |
 |--|
-| `<json-config-file>` |
+| `<chart-name>` |
 
 | parameter | description |
 | --------- | ----------- |
-| `<json-config-file>` | The path to the json file to be loaded to Consul/CBS |
+| `<chart-name>` | Name of the chart to upload |
 
-## Function: start_consul_cbs ##
+## Function: chartmus_delete_test_chart ##
 
-Start the Consul and CBS containers
+Delete a chart in chartmusem
 | arg list |
 |--|
-| None |
+| `<chart-name> [<version>]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<chart-name>` | Name of the chart to delete |
+| `<version>` | Chart version, default is 0.1.0 |
 
 # Description of functions in cp_api_function.sh #
 
@@ -359,10 +384,27 @@ With the timeout, the test waits up to the timeout seconds before setting pass o
 See the 'cr' dir for more details.
 | arg list |
 |--|
-| `<variable-name> <target-value> [ <timeout-in-sec> ]` |
+| `<cr-path-id> <variable-name> <target-value> [ <timeout-in-sec> ]` |
 
 | parameter | description |
 | --------- | ----------- |
+| `<cr-path-id>` |  Variable index to CR |
+| `<variable-name>` | Variable name in the CR  |
+| `<target-value>` | Target value for the variable  |
+| `<timeout-in-sec>` | Max time to wait for the variable to reach the target value  |
+
+## Function: cr_greater_or_equal ##
+Tests if a variable value in the Callback Receiver (CR) simulator is equal to or greater than a target value.
+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.
+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.
+See the 'cr' dir for more details.
+| arg list |
+|--|
+| `<cr-path-id>  <variable-name> <target-value> [ <timeout-in-sec> ]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<cr-path-id>` |  Variable index to CR |
 | `<variable-name>` | Variable name in the CR  |
 | `<target-value>` | Target value for the variable  |
 | `<timeout-in-sec>` | Max time to wait for the variable to reach the target value  |
@@ -376,11 +418,12 @@ See the 'a1-interface' repo for more details.
 
 | arg list |
 |--|
-| `<variable-name> <target-value> [ <timeout-in-sec> ]` |
+| `<cr-path-id>  <variable-name> <target-value> [ <timeout-in-sec> ]` |
 
 
 | parameter | description |
 | --------- | ----------- |
+| `<cr-path-id>` |  Variable index to CR |
 | `<variable-name>` | Variable name in the CR  |
 | `<target-value>` | Target substring for the variable  |
 | `<timeout-in-sec>` | Max time to wait for the variable to reach the target value  |
@@ -391,10 +434,11 @@ Reads the value of a variable in the CR simulator. The value is intended to be p
 See the 'mrstub' dir for more details.
 | arg list |
 |--|
-| `<variable-name>` |
+| `<cr-path-id> <variable-name>` |
 
 | parameter | description |
 | --------- | ----------- |
+| `<cr-path-id>` |  Variable index to CR |
 | `<variable-name>` | Variable name in the CR  |
 
 ## Function: cr_delay_callback ##
@@ -417,11 +461,12 @@ Check the contents of all ric events received for a callback id.
 
 | arg list |
 |--|
-| `<response-code> <id> [ EMPTY \| ( <ric-id> )+ ]` |
+| `<response-code> <cr-path-id>  <id> [ EMPTY \| ( <ric-id> )+ ]` |
 
 | parameter | description |
 | --------- | ----------- |
 | `<response-code>` | Expected http response code |
+| `<cr-path-id>` | Variable index for CR  |
 | `<id>` | Id of the callback destination  |
 | `EMPTY` | Indicator for an empty list  |
 | `<ric-id>` | Id of the ric  |
@@ -432,11 +477,12 @@ Check the contents of all current status events for one id from ICS
 
 | arg list |
 |--|
-| `<response-code> <id> [ EMPTY \| ( <status> )+ ]` |
+| `<response-code> <cr-path-id> <id> [ EMPTY \| ( <status> )+ ]` |
 
 | parameter | description |
 | --------- | ----------- |
 | `<response-code>` | Expected http response code |
+| `<cr-path-id>` | Variable index for CR  |
 | `<id>` | Id of the callback destination  |
 | `EMPTY` | Indicator for an empty list  |
 | `<status>` | Status string  |
@@ -447,11 +493,12 @@ Check the contents of all current subscription events for one id from ICS
 
 | arg list |
 |--|
-| `<response-code> <id> [ EMPTY | ( <type-id> <schema> <registration-status> )+ ]` |
+| `<response-code> <cr-path-id>  <id> [ EMPTY | ( <type-id> <schema> <registration-status> )+ ]` |
 
 | parameter | description |
 | --------- | ----------- |
 | `<response-code>` | Expected http response code |
+| `<cr-path-id>` | Variable index for CR  |
 | `<id>` | Id of the callback destination  |
 | `EMPTY` | Indicator for an empty list  |
 | `<type-id>` | Id of the data type  |
@@ -464,7 +511,11 @@ Reset the callback receiver
 
 | arg list |
 |--|
-| - |
+| `<cr-path-id>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<cr-path-id>` | Variable index for CR  |
 
 ## Function: cr_api_check_all_genric_json_events ##
 
@@ -623,6 +674,130 @@ Start the http proxy container in docker or kube depending on running mode.
 |--|
 | None |
 
+# Description of functions in helmmanager_api_functions.sh #
+
+## Function: use_helm_manager_http ##
+
+Use http for all API calls to the Helm Manager. This is the default protocol.
+| arg list |
+|--|
+| None |
+
+## Function: use_helm_manager_https ##
+
+Use https for all API calls to the Helm Manager.
+| arg list |
+|--|
+| None |
+
+## Function: start_helm_manager ##
+
+Start the Helm Manager container in docker or kube depending on running mode.
+| arg list |
+|--|
+| None |
+
+## Function: helm_manager_api_get_charts ##
+
+Get all charts and compare the expected contents.
+| arg list |
+|--|
+| `<response-code> [ EMPTY | ( <chart> <version> <namespace> <release> <repo> )+ ]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected response code |
+| `EMPTY` | Indicator for empty list  |
+| `<chart>`| Name of the chart  |
+| `<version>`| Version of the chart  |
+| `<namespace>`| Namespace to of the chart  |
+| `<release>`| Release name of the chart  |
+| `<repo>`| Repository of the chart  |
+
+## Function: helm_manager_api_post_repo ##
+
+Add repo to the helm manager.
+| arg list |
+|--|
+| `<response-code> <repo-name> <repo-protocol> <repo-address> <repo-port>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected response code |
+| `<repo-name>` | Name of the repo  |
+| `<repo-protocol>`| Protocol http or https  |
+| `<repo-address>`| Host name of the repo |
+| `<repo-port>`| Host port of the repo  |
+
+## Function: helm_manager_api_post_onboard_chart ##
+
+Onboard a chart to the helm manager.
+| arg list |
+|--|
+| `<response-code> <repo> <chart> <version> <release> <namespace>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected response code |
+| `<repo>`| Target repo of the chart  |
+| `<chart>`| Name of the chart  |
+| `<version>`| Version of the chart  |
+| `<namespace>`| Namespace to of the chart  |
+| `<release>`| Release name of the chart  |
+
+## Function: helm_manager_api_post_install_chart ##
+
+Install an onboarded chart.
+| arg list |
+|--|
+| `<response-code> <chart> <version>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected response code |
+| `<chart>`| Name of the chart  |
+| `<version>`| Version of the chart  |
+
+## Function: helm_manager_api_uninstall_chart ##
+
+Uninstall a chart.
+| arg list |
+|--|
+| `<response-code> <chart> <version>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected response code |
+| `<chart>`| Name of the chart  |
+| `<version>`| Version of the chart  |
+
+## Function: helm_manager_api_delete_chart ##
+
+Delete a chart.
+| arg list |
+|--|
+| `<response-code> <chart> <version>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected response code |
+| `<chart>`| Name of the chart  |
+| `<version>`| Version of the chart  |
+
+## Function: helm_manager_api_exec_add_repo ##
+
+Add repo in helm manager by helm using exec.
+| arg list |
+|--|
+| `<repo-name> <repo-url>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected response code |
+| `<repo-name>`| Name of the repo  |
+| `<repo-url>`| Full url to the repo. Url must be accessible by the container  |
+
+
 # Description of functions in ics_api_functions.sh #
 
 ## Function: use_ics_rest_http ##
@@ -1558,6 +1733,44 @@ No proxy is started if the function is called in docker mode.
 |--|
 | None |
 
+# Description of functions in localhelm_api_functions.sh #
+
+## Function: localhelm_create_test_chart ##
+
+Create a dummy chart using helm
+| arg list |
+|--|
+| `chart-name` |
+
+| parameter | description |
+| --------- | ----------- |
+| `chart-name` | Name of the chart |
+
+## Function: localhelm_package_test_chart ##
+
+Package a dummy chart using helm
+| arg list |
+|--|
+| `chart-name` |
+
+| parameter | description |
+| --------- | ----------- |
+| `chart-name` | Name of the chart |
+
+## Function: localhelm_installed_chart_release ##
+
+Check if a chart is installed or not using helm
+| arg list |
+|--|
+| `INSTALLED|NOTINSTALLED <release-name> <name-space> |
+
+| parameter | description |
+| --------- | ----------- |
+| `INSTALLED` | Expecting installed chart |
+| `NOTINSTALLED` | Expecting a not installed chart |
+| `release-name` | Name of the release |
+| `name-space` | Expected namespace |
+
 # Description of functions in mr_api_functions.sh #
 
 ## Function: use_mr_http ##
@@ -1756,9 +1969,9 @@ Start the the gateway container in docker or kube depending on start mode
 |--|
 | None |
 
-## Function: gateway_pms_get_status ##
+## Function: gateway_a1pms_get_status ##
 
-Sample test of pms api (status)
+Sample test of a1pms api (status)
 Only response code tested - not payload
 | arg list |
 |--|
@@ -1780,44 +1993,44 @@ Only response code tested - not payload
 | --------- | ----------- |
 | `<response-code>` | Expected http response code |
 
-# Description of functions in pa_api_functions.sh #
+# Description of functions in a1pms_api_functions.sh #
 
 ## General ##
 
-Both PMS version 1 and 2 are supported. The version is controlled by the env variable `$PMS_VERSION` set in the test env file.
+Both A1PMS version 1 and 2 are supported. The version is controlled by the env variable `$A1PMS_VERSION` set in the test env file.
 For api function in version 2, an url prefix is added if configured.
 
-## Function: use_agent_rest_http ##
+## Function: use_a1pms_rest_http ##
 
-Use http for all API calls to the Policy Agent. This is the default.
+Use http for all API calls to the A1PMS. This is the default.
 | arg list |
 |--|
 | None |
 
-## Function: use_agent_rest_https ##
+## Function: use_a1pms_rest_https ##
 
-Use https for all API calls to the Policy Agent.
+Use https for all API calls to the A1PMS.
 | arg list |
 |--|
 | None |
 
-## Function: use_agent_dmaap_http ##
+## Function: use_a1pms_dmaap_http ##
 
-Send and recieve all API calls to the Policy Agent over Dmaap via the MR over http.
+Send and recieve all API calls to the A1PMS over Dmaap via the MR over http.
 | arg list |
 |--|
 | None |
 
-## Function: use_agent_dmaap_https ##
+## Function: use_a1pms_dmaap_https ##
 
-Send and recieve all API callss to the Policy Agent over Dmaap via the MR over https.
+Send and recieve all API callss to the A1PMS over Dmaap via the MR over https.
 | arg list |
 |--|
 | None |
 
-## Function: start_policy_agent ##
+## Function: start_a1pms ##
 
-Start the Policy Agent container or corresponding kube resources depending on docker/kube mode.
+Start the A1PMS container or corresponding kube resources depending on docker/kube mode.
 | arg list |
 |--|
 | `<logfile-prefix>` |
@@ -1831,23 +2044,23 @@ Start the Policy Agent container or corresponding kube resources depending on do
 | `<config-file>`| Path to application.yaml  |
 | `<data-file>` | Optional path to application_configuration.json  |
 
-## Function: stop_policy_agent ##
+## Function: stop_a1pms ##
 
-Stop the pms container (docker) or scale it to zero (kubernetes).
+Stop the a1pms container (docker) or scale it to zero (kubernetes).
 | arg list |
 |--|
 |  None |
 
-## Function: start_stopped_policy_agent ##
+## Function: start_stopped_a1pms ##
 
-Start a previousely stopped pms container (docker) or scale it to 1 (kubernetes).
+Start a previousely stopped a1pms container (docker) or scale it to 1 (kubernetes).
 | arg list |
 |--|
 |  None |
 
-## Function: prepare_consul_config ##
+## Function: prepare_a1pms_config ##
 
-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')
+Function to prepare an a1pms 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')
 | arg list |
 |--|
 | `SDNC|NOSDNC <output-file>` |
@@ -1858,7 +2071,7 @@ Function to prepare a Consul config based on the previously configured (and star
 | `NOSDNC` | Configure without controller |
 | `<output-file>` | The path to the json output file containing the prepared config. This file is used in 'consul_config_app'  |
 
-## Function: agent_load_config ##
+## Function: a1pms_load_config ##
 
 Load the config into a config map (kubernetes only).
 | arg list |
@@ -1869,37 +2082,37 @@ Load the config into a config map (kubernetes only).
 | --------- | ----------- |
 |  `<data-file>` | Path to application_configuration.json  |
 
-## Function: set_agent_debug ##
+## Function: set_a1pms_debug ##
 
-Configure the Policy Agent log on debug level. The Policy Agent must be running.
+Configure the A1PMS log on debug level. The A1PMS must be running.
 | arg list |
 |--|
 | None |
 
-## Function: set_agent_trace ##
+## Function: set_a1pms_trace ##
 
-Configure the Policy Agent log on trace level. The Policy Agent must be running.
+Configure the A1PMS log on trace level. The A1PMS must be running.
 | arg list |
 |--|
 | None |
 
-## Function: use_agent_retries ##
+## Function: use_a1pms_retries ##
 
-Configure the Policy Agent to make upto 5 retries if an API calls return any of the specified http return codes.
+Configure the A1PMS to make upto 5 retries if an API calls return any of the specified http return codes.
 | arg list |
 |--|
 | `[<response-code>]*` |
 
-## Function: check_policy_agent_logs ##
+## Function: check_a1pms_logs ##
 
-Check the Policy Agent log for any warnings and errors and print the count of each.
+Check the A1PMS log for any warnings and errors and print the count of each.
 | arg list |
 |--|
 | None |
 
-## Function: api_equal ##
+## Function: a1pms_equal ##
 
-Tests if the array length of a json array in the Policy Agent simulator is equal to a target value.
+Tests if the array length of a json array in the A1PMS simulator is equal to a target value.
 Without the timeout, the test sets pass or fail immediately depending on if the array length is equal to the target or not.
 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.
 See the 'cr' dir for more details.
@@ -1914,7 +2127,7 @@ See the 'cr' dir for more details.
 | `<target-value>` | Target value for the length  |
 | `<timeout-in-sec>` | Max time to wait for the length to reach the target value  |
 
-## Function: api_get_policies ##
+## Function: a1pms_api_get_policies ##
 
 Test of GET '/policies' or V2 GET '/v2/policy-instances' and optional check of the array of returned policies.
 To test the response code only, provide the response code parameter as well as the following three parameters.
@@ -1944,7 +2157,7 @@ To also test the response payload add the 'NOID' for an expected empty array or
 | `notification-url` |  Url for notifications |
 | `<template-file>` |  Path to the template file for the policy (same template used when creating the policy) |
 
-## Function: api_get_policy ##
+## Function: a1pms_api_get_policy ##
 
 Test of GET '/policy' or V2 GET '/v2/policies/{policy_id}' and optional check of the returned json payload.
 To test the the response code only, provide the expected response code and policy id.
@@ -1970,7 +2183,7 @@ To test the contents of the returned json payload, add a path to the template fi
 | `transient` |  Transient, true or false |
 | `notification-url` |  Url for notifications |
 
-## Function: api_put_policy ##
+## Function: a1pms_api_put_policy ##
 
 Test of PUT '/policy' or V2 PUT '/policies'.
 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).
@@ -1996,15 +2209,15 @@ If more than one policy shall be created, add a count value to indicate the numb
 | `<template-file>` |  Path to the template file for the policy |
 | `<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 |
 
-## Function: api_put_policy_batch ##
+## Function: a1pms_api_put_policy_batch ##
 
-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.
-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.
-For arg list and parameters, see 'api_put_policy'.
+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.
+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.
+For arg list and parameters, see 'a1pms_api_put_policy'.
 
-## Function: api_put_policy_parallel ##
+## Function: a1pms_api_put_policy_parallel ##
 
-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.
+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.
 
 | arg list |
 |--|
@@ -2028,7 +2241,7 @@ This tests the same as function 'api_put_policy' except that the policy create i
 | `<count-per-ric>` |  Number of policies per ric |
 | `<number-of-threads>` |  Number of threads (processes) to run in parallel |
 
-## Function: api_delete_policy ##
+## Function: a1pms_api_delete_policy ##
 
 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.
 
@@ -2042,15 +2255,15 @@ This tests the DELETE '/policy' or V2 DELETE '/v2/policies/{policy_id}'. Removes
 | `<policy-id>` |  Id of the policy |
 | `<count>` |  An optional count of policies to delete. The 'policy-id' will be the first id to be deleted. |
 
-## Function: api_delete_policy_batch ##
+## Function: a1pms_api_delete_policy_batch ##
 
-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.
-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.
-For arg list and parameters, see 'api_delete_policy'.
+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.
+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.
+For arg list and parameters, see 'a1pms_api_delete_policy'.
 
-## Function: api_delete_policy_parallel ##
+## Function: a1pms_api_delete_policy_parallel ##
 
-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.
+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.
 
 | arg list |
 |--|
@@ -2065,7 +2278,7 @@ This tests the same as function 'api_delete_policy' except that the policy delet
 | `<count-per-ric>` |  Number of policies per ric |
 | `<number-of-threads>` |  Number of threads (processes) to run in parallel |
 
-## Function: api_get_policy_ids ##
+## Function: a1pms_api_get_policy_ids ##
 
 Test of GET '/policy_ids' or V2 GET '/v2/policies'.
 To test response code only, provide the response code parameter as well as the following three parameters.
@@ -2087,7 +2300,7 @@ To also test the response payload add the 'NOID' for an expected empty array or
 | `NOID` |  Indicator that no policy id is provided - indicate empty list of policies|
 | `<policy-instance-id>` |  Id of the policy |
 
-## Function: api_get_policy_schema ##
+## Function: a1pms_api_get_policy_schema ##
 
 Test of V2 GET '/v2/policy-types/{policyTypeId}' and optional check of the returned json schema.
 To test the response code only, provide the expected response code and policy type id.
@@ -2103,7 +2316,7 @@ To test the contents of the returned json schema, add a path to a schema file to
 | `<policy-type-id>` |  Id of the policy type |
 | `<schema-file>` |  Path to the schema file for the policy type |
 
-## Function: api_get_policy_schema ##
+## Function: a1pms_api_get_policy_schema ##
 
 Test of GET '/policy_schema' and optional check of the returned json schema.
 To test the response code only, provide the expected response code and policy type id.
@@ -2119,7 +2332,7 @@ To test the contents of the returned json schema, add a path to a schema file to
 | `<policy-type-id>` |  Id of the policy type |
 | `<schema-file>` |  Path to the schema file for the policy type |
 
-## Function: api_get_policy_schemas ##
+## Function: a1pms_api_get_policy_schemas ##
 
 Test of GET '/policy_schemas' and optional check of the returned json schemas.
 To test the response code only, provide the expected response code and ric id (or NORIC if no ric is given).
@@ -2137,7 +2350,7 @@ To test the contents of the returned json schema, add a path to a schema file to
 | `<schema-file>` |  Path to the schema file for the policy type |
 | `NOFILE` |  Indicate the template for an empty type |
 
-## Function: api_get_policy_status ##
+## Function: a1pms_api_get_policy_status ##
 
 Test of GET '/policy_status' or V2 GET '/policies/{policy_id}/status'.
 
@@ -2158,7 +2371,7 @@ Test of GET '/policy_status' or V2 GET '/policies/{policy_id}/status'.
 | `<instance-status>` |  Instance status |
 | `<has-been-deleted>` |  Deleted status, true or false |
 
-## Function: api_get_policy_types ##
+## Function: a1pms_api_get_policy_types ##
 
 Test of GET '/policy_types' or  V2 GET '/v2/policy-types' and optional check of the returned ids.
 To test the response code only, provide the expected response code and ric id (or NORIC if no ric is given).
@@ -2176,7 +2389,7 @@ To test the contents of the returned json payload, add the list of expected poli
 | `<policy-type-id>` |  Id of the policy type |
 | `EMPTY` |  Indicate the empty type |
 
-## Function: api_get_status ##
+## Function: a1pms_api_get_status ##
 
 Test of GET /status or V2 GET /status
 
@@ -2188,7 +2401,7 @@ Test of GET /status or V2 GET /status
 | --------- | ----------- |
 | `<response-code>` | Expected http response code |
 
-## Function: api_get_ric ##
+## Function: a1pms_api_get_ric ##
 
 Test of GET '/ric' or V2 GET '/v2/rics/ric'
 To test the response code only, provide the expected response code and managed element id.
@@ -2211,7 +2424,7 @@ To test the returned ric id, provide the expected ric id.
 | `NORIC` |  Indicator no RIC |
 | `string-of-ricinfo` |  String of ric info |
 
-## Function: api_get_rics ##
+## Function: a1pms_api_get_rics ##
 
 Test of GET '/rics' or V2 GET '/v2/rics' and optional check of the returned json payload (ricinfo).
 To test the response code only, provide the expected response code and policy type id (or NOTYPE if no type is given).
@@ -2230,7 +2443,7 @@ Example <br>`<space-separate-string-of-ricinfo> = "ricsim_g1_1:me1_ricsim_g1_1,m
 | `NOTYPE>` |  No type given |
 | `<space-separate-string-of-ricinfo>` |  A space separated string of ric info - needs to be quoted |
 
-## Function: api_put_service ##
+## Function: a1pms_api_put_service ##
 
 Test of PUT '/service' or V2 PUT '/service'.
 | arg list |
@@ -2244,7 +2457,7 @@ Test of PUT '/service' or V2 PUT '/service'.
 | `<keepalive-timeout>` |  Timeout value |
 | `<callbackurl>` |  Callback url |
 
-## Function: api_get_services ##
+## Function: a1pms_api_get_services ##
 
 Test of GET '/service' or V2 GET '/v2/services' and optional check of the returned json payload.
 To test only the response code, omit all parameters except the expected response code.
@@ -2263,7 +2476,7 @@ To test the returned json, provide the parameters after the response code.
 | `<callbackurl>` |  Callback url |
 | `NOSERVICE` |  Indicator of no target service name |
 
-## Function: api_get_service_ids ##
+## Function: a1pms_api_get_service_ids ##
 
 Test of GET '/services' or V2 GET /'v2/services'. Only check of service ids.
 
@@ -2276,7 +2489,7 @@ Test of GET '/services' or V2 GET /'v2/services'. Only check of service ids.
 | `<response-code>` | Expected http response code |
 | `<service-name>` |  Service name |
 
-## Function: api_delete_services ##
+## Function: a1pms_api_delete_services ##
 
 Test of DELETE '/services' or V2 DELETE '/v2/services/{serviceId}'
 
@@ -2289,7 +2502,7 @@ Test of DELETE '/services' or V2 DELETE '/v2/services/{serviceId}'
 | `<response-code>` | Expected http response code |
 | `<service-name>` |  Service name |
 
-## Function: api_put_services_keepalive ##
+## Function: a1pms_api_put_services_keepalive ##
 
 Test of PUT '/services/keepalive' or V2 PUT '/v2/services/{service_id}/keepalive'
 
@@ -2302,7 +2515,7 @@ Test of PUT '/services/keepalive' or V2 PUT '/v2/services/{service_id}/keepalive
 | `<response-code>` | Expected http response code |
 | `<service-name>` |  Service name |
 
-## Function: api_put_configuration ##
+## Function: a1pms_api_put_configuration ##
 
 Test of PUT '/v2/configuration'
 
@@ -2315,7 +2528,7 @@ Test of PUT '/v2/configuration'
 | `<response-code>` | Expected http response code |
 | `<config-file>` |  Path json config file |
 
-## Function: api_get_configuration ##
+## Function: a1pms_api_get_configuration ##
 
 Test of GET '/v2/configuration'
 
@@ -2328,7 +2541,7 @@ Test of GET '/v2/configuration'
 | `<response-code>` | Expected http response code |
 | `<config-file>` |  Path json config file to compare the retrieved config with |
 
-## Function: pms_kube_pvc_reset ##
+## Function: a1pms_kube_pvc_reset ##
 Admin reset to remove all policies and services
 All types and instances etc are removed - types and instances in a1 sims need to be removed separately
 NOTE - only works in kubernetes and the pod should not be running