+| `<ric-id>` | Id of the ric |
+| `NORIC` | Indicator that no ric is provided |
+| `<service-id>` | Id of the service |
+| `NOSERVICE` | Indicator that no service id is provided |
+| `type-id>` | Id of the policy type |
+| `NOTYPE` | Indicator that no type id is provided |
+| `NOID` | Indicator that no policy id is provided - indicate empty list of policies|
+| `<policy-instance-id>` | Id of the policy |
+
+## 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.
+To test the contents of the returned json schema, add a path to a schema file to compare with.
+
+| arg list |
+|--|
+| `<response-code> <policy-type-id> [<schema-file>]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<policy-type-id>` | Id of the policy type |
+| `<schema-file>` | Path to the schema file for the policy type |
+
+## 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.
+To test the contents of the returned json schema, add a path to a schema file to compare with.
+
+| arg list |
+|--|
+| `<response-code> <policy-type-id> [<schema-file>]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<policy-type-id>` | Id of the policy type |
+| `<schema-file>` | Path to the schema file for the policy type |
+
+## 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).
+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)
+
+| arg list |
+|--|
+| `<response-code> <ric-id>\|NORIC [<schema-file>\|NOFILE]*` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<ric-id>` | Id of the ric |
+| `NORIC` | No ric id given |
+| `<schema-file>` | Path to the schema file for the policy type |
+| `NOFILE` | Indicate the template for an empty type |
+
+## Function: a1pms_api_get_policy_status ##
+
+Test of GET '/policy_status' or V2 GET '/policies/{policy_id}/status'.
+
+| arg list |
+|--|
+| `<response-code> <policy-id> (STD\|STD2 <enforce-status>\|EMPTY [<reason>\|EMPTY])\|(OSC <instance-status> <has-been-deleted>)` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<policy-id>` | Id of the policy |
+| `STD` | Indicator of status of Standarized A1 |
+| `STD2` | Indicator of status of Standarized A1 version 2 |
+| `<enforce-status>` | Enforcement status |
+| `<reason>` | Optional reason |
+| `EMPTY` | Indicator of empty string status or reason |
+| `OSC` | Indicator of status of Non-Standarized OSC A1 |
+| `<instance-status>` | Instance status |
+| `<has-been-deleted>` | Deleted status, true or false |
+
+## 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).
+To test the contents of the returned json payload, add the list of expected policy type id (or 'EMPTY' for the '{}' type)
+
+| arg list |
+|--|
+| `<response-code> [<ric-id>\|NORIC [<policy-type-id>\|EMPTY [<policy-type-id>]*]]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<ric-id>` | Id of the ric |
+| `NORIC` | No ric id given |
+| `<policy-type-id>` | Id of the policy type |
+| `EMPTY` | Indicate the empty type |
+
+## Function: a1pms_api_get_status ##
+
+Test of GET /status or V2 GET /status
+
+| arg list |
+|--|
+| `<response-code>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+
+## 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.
+To test the returned ric id, provide the expected ric id.
+
+| arg list |
+|--|
+| `<reponse-code> <managed-element-id> [<ric-id>]` |
+
+| arg list V2 |
+|--|
+| `<reponse-code> <management-element-id>\|NOME <ric-id>\|<NORIC> [<string-of-ricinfo>]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<managed-element-id>` | Id of the managed element |
+| `NOME` | Indicator for no ME |
+| `ric-id` | Id of the ric |
+| `NORIC` | Indicator no RIC |
+| `string-of-ricinfo` | String of ric info |
+
+## 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).
+To test also the returned payload, add the formatted string of info in the returned payload.
+Format of ricinfo: <br>`<ric-id>:<list-of-mes>:<list-of-policy-type-ids>`<br>
+Example <br>`<space-separate-string-of-ricinfo> = "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2,4 ricsim_g1_1:me2_........."`
+
+| arg list |
+|--|
+| `<reponse-code> <policy-type-id>\|NOTYPE [<space-separate-string-of-ricinfo>]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<policy-type-id>` | Policy type id of the ric |
+| `NOTYPE>` | No type given |
+| `<space-separate-string-of-ricinfo>` | A space separated string of ric info - needs to be quoted |
+
+## Function: a1pms_api_put_service ##
+
+Test of PUT '/service' or V2 PUT '/service'.
+| arg list |
+|--|
+| `<response-code> <service-name> <keepalive-timeout> <callbackurl>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<service-name>` | Service name |
+| `<keepalive-timeout>` | Timeout value |
+| `<callbackurl>` | Callback url |
+
+## 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.
+To test the returned json, provide the parameters after the response code.
+
+| arg list |
+|--|
+| `<response-code> [ (<query-service-name> <target-service-name> <keepalive-timeout> <callbackurl>) \| (NOSERVICE <target-service-name> <keepalive-timeout> <callbackurl> [<target-service-name> <keepalive-timeout> <callbackurl>]* )]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<query-service-name>` | Service name for the query |
+| `<target-service-name>` | Target service name|
+| `<keepalive-timeout>` | Timeout value |
+| `<callbackurl>` | Callback url |
+| `NOSERVICE` | Indicator of no target service name |
+
+## Function: a1pms_api_get_service_ids ##
+
+Test of GET '/services' or V2 GET /'v2/services'. Only check of service ids.
+
+| arg list |
+|--|
+| `<response-code> [<service-name>]*` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<service-name>` | Service name |
+
+## Function: a1pms_api_delete_services ##
+
+Test of DELETE '/services' or V2 DELETE '/v2/services/{serviceId}'
+
+| arg list |
+|--|
+| `<response-code> [<service-name>]*` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<service-name>` | Service name |
+
+## Function: a1pms_api_put_services_keepalive ##
+
+Test of PUT '/services/keepalive' or V2 PUT '/v2/services/{service_id}/keepalive'
+
+| arg list |
+|--|
+| `<response-code> <service-name>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<service-name>` | Service name |
+
+## Function: a1pms_api_put_configuration ##
+
+Test of PUT '/v2/configuration'
+
+| arg list |
+|--|
+| `<response-code> <config-file>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<config-file>` | Path json config file |
+
+## Function: a1pms_api_get_configuration ##
+
+Test of GET '/v2/configuration'
+
+| arg list |
+|--|
+| `<response-code> [<config-file>]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<config-file>` | Path json config file to compare the retrieved config with |
+
+## 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
+
+| arg list |
+|--|
+| None |
+
+
+# Description of functions in authsidecar_api_function.sh #
+Only common API functions in this file.
+
+
+## Function: start_chart_museum ##
+
+Start the Chart Museum
+| arg list |
+|--|
+| None |
+
+## Function: chartmus_upload_test_chart ##
+
+Upload a package chart to chartmusem
+| arg list |
+|--|
+| `<chart-name>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<chart-name>` | Name of the chart to upload |
+
+## Function: chartmus_delete_test_chart ##
+
+Delete a chart in chartmusem
+| arg list |
+|--|
+| `<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 #
+
+## Function: use_control_panel_http ##
+
+Set http as the protocol to use for all communication to the Control Panel
+| arg list |
+|--|
+| None |
+
+## Function: use_control_panel_https ##
+
+Set https as the protocol to use for all communication to the Control Panel
+| arg list |
+|--|
+| None |
+
+## Function: start_control_panel ##
+
+Start the Control Panel container
+| arg list |
+|--|
+| None |
+
+# Description of functions in cr_api_functions.sh #
+
+## Function: use_cr_http ##
+
+Use http for getting event from CR. The admin API is not affected. This is the default.
+| arg list |
+|--|
+| None |
+
+## Function: use_cr_https ##
+
+Use https for getting event from CR. The admin API is not affected.
+Note: Not yet used as callback event is not fully implemented/deciced.
+| arg list |
+|--|
+| None |
+
+## Function: start_cr ##
+
+Start the Callback Receiver container in docker or kube depending on start mode.
+| arg list |
+|--|
+| None |
+
+## Function: cr_equal ##
+
+Tests if a variable value in the Callback Receiver (CR) simulator is equal to a target value.
+Without the timeout, the test sets pass or fail immediately depending on if the variable 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 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 |
+
+## 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 |
+
+## Function: cr_contains_str ##
+
+Tests if a variable value in the CR contains a target string.
+Without the timeout, the test sets pass or fail immediately depending on if the variable contains the target string or not.
+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.
+See the 'a1-interface' repo 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 substring for the variable |
+| `<timeout-in-sec>` | Max time to wait for the variable to reach the target value |
+
+## Function: cr_read ##
+
+Reads the value of a variable in the CR simulator. The value is intended to be passed to a env variable in the test script.
+See the 'mrstub' dir for more details.
+| arg list |
+|--|
+| `<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 ##
+
+Function to configure write delay on callbacks. Delay given in seconds. Setting remains until removed.
+
+| arg list |
+|--|
+| `<response-code> <cr-path-id> [<delay-in-seconds>]`|
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<cr-path-id>` | Variable index to CR |
+| `<delay-in-seconds>` | Delay in seconds. If omitted, the delay is removed |
+
+## Function: cr_api_check_all_sync_events ##
+
+Check the contents of all ric events received for a callback id.
+
+| arg list |
+|--|
+| `<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 |
+
+## Function: cr_api_check_all_ics_events ##
+
+Check the contents of all current status events for one id from ICS
+
+| arg list |
+|--|
+| `<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 |
+
+## Function: cr_api_check_all_ics_subscription_events ##
+
+Check the contents of all current subscription events for one id from ICS
+
+| arg list |
+|--|
+| `<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 |
+| `<schema>` | Path to typeschema file |
+| `<registration-status>` | Status string |
+
+## Function: cr_api_reset ##
+
+Reset the callback receiver
+
+| arg list |
+|--|
+| `<cr-path-id>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<cr-path-id>` | Variable index for CR |
+
+## Function: cr_api_check_all_generic_json_events ##
+
+Check the contents of all json events for path
+
+| arg list |
+|--|
+| `<response-code> <cr-path-id> <topic-url> (EMPTY | <json-msg>+ )` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<cr-path-id>` | Variable index for CR |
+| `<topic-url>` | Topic url |
+| `EMPTY` | Indicator for an empty list |
+| `json-msg` | Json msg string to compare with |
+
+## Function: cr_api_check_single_generic_json_event ##
+
+Check a single (oldest) json event (or none if empty) for path
+