Merge "Add kafka jobs to DMaaP Mediator Producer"
authorHenrik Andersson <henrik.b.andersson@est.tech>
Tue, 4 Jan 2022 10:11:21 +0000 (10:11 +0000)
committerGerrit Code Review <gerrit@o-ran-sc.org>
Tue, 4 Jan 2022 10:11:21 +0000 (10:11 +0000)
65 files changed:
a1-policy-management-service/pom.xml
dmaap-adaptor-java/pom.xml
information-coordinator-service/pom.xml
test/auto-test/FTC1.sh
test/auto-test/FTC10.sh
test/auto-test/FTC100.sh
test/auto-test/FTC110.sh
test/auto-test/FTC1100.sh
test/auto-test/FTC150.sh
test/auto-test/FTC1800.sh
test/auto-test/FTC2001.sh
test/auto-test/FTC2002.sh
test/auto-test/FTC2003.sh
test/auto-test/FTC300.sh
test/auto-test/FTC3000.sh
test/auto-test/FTC310.sh
test/auto-test/FTC350.sh
test/auto-test/FTC4000.sh [new file with mode: 0755]
test/auto-test/FTC800.sh
test/auto-test/FTC805.sh
test/auto-test/FTC810.sh
test/auto-test/FTC850.sh
test/auto-test/FTC900.sh
test/auto-test/ONAP_UC.sh
test/auto-test/PM_DEMO.sh
test/auto-test/PM_EI_DEMO.sh
test/auto-test/README.md
test/auto-test/startMR.sh
test/common/README.md
test/common/chartmus_api_functions.sh [new file with mode: 0644]
test/common/clean_kube.sh
test/common/consul_api_functions.sh
test/common/cp_api_functions.sh
test/common/cr_api_functions.sh
test/common/dmaapadp_api_functions.sh
test/common/dmaapmed_api_functions.sh
test/common/helmmanager_api_functions.sh [new file with mode: 0644]
test/common/httpproxy_api_functions.sh
test/common/ics_api_functions.sh
test/common/kafkapc_api_functions.sh
test/common/kubeproxy_api_functions.sh
test/common/localhelm_api_functions.sh [new file with mode: 0644]
test/common/mr_api_functions.sh
test/common/ngw_api_functions.sh
test/common/pa_api_functions.sh
test/common/prodstub_api_functions.sh
test/common/pvccleaner_api_functions.sh
test/common/rc_api_functions.sh
test/common/ricsim_api_functions.sh
test/common/sdnc_api_functions.sh
test/common/test_env-onap-istanbul.sh
test/common/test_env-onap-jakarta.sh [new file with mode: 0644]
test/common/test_env-oran-e-release.sh
test/common/test_env-oran-f-release.sh [new file with mode: 0755]
test/common/testcase_common.sh
test/common/testengine_config.sh
test/simulator-group/chartmuseum/.gitignore [new file with mode: 0644]
test/simulator-group/chartmuseum/app.yaml [new file with mode: 0644]
test/simulator-group/chartmuseum/docker-compose.yml [new file with mode: 0644]
test/simulator-group/chartmuseum/svc.yaml [new file with mode: 0644]
test/simulator-group/helmmanager/.gitignore [new file with mode: 0644]
test/simulator-group/helmmanager/app.yaml [new file with mode: 0644]
test/simulator-group/helmmanager/docker-compose.yml [new file with mode: 0644]
test/simulator-group/helmmanager/sa.yaml [new file with mode: 0644]
test/simulator-group/helmmanager/svc.yaml [new file with mode: 0644]

index f5957bc..8a6d584 100644 (file)
@@ -52,7 +52,6 @@
         <sdk.version>1.1.6</sdk.version>
         <swagger.version>2.1.6</swagger.version>
         <json.version>20190722</json.version>
-        <commons-net.version>3.6</commons-net.version>
         <maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
         <formatter-maven-plugin.version>2.12.2</formatter-maven-plugin.version>
         <spotless-maven-plugin.version>1.18.0</spotless-maven-plugin.version>
             <artifactId>json</artifactId>
             <version>${json.version}</version>
         </dependency>
-        <dependency>
-            <groupId>commons-net</groupId>
-            <artifactId>commons-net</artifactId>
-            <version>${commons-net.version}</version>
-        </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-configuration-processor</artifactId>
index 70ea32e..9c1dd44 100644 (file)
         <java.version>11</java.version>
         <springfox.version>3.0.0</springfox.version>
         <immutable.version>2.8.2</immutable.version>
-        <sdk.version>1.1.6</sdk.version>
         <swagger.version>2.1.6</swagger.version>
         <json.version>20190722</json.version>
-        <commons-net.version>3.6</commons-net.version>
         <maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
         <formatter-maven-plugin.version>2.12.2</formatter-maven-plugin.version>
         <spotless-maven-plugin.version>1.24.3</spotless-maven-plugin.version>
         <swagger-codegen-maven-plugin.version>3.0.11</swagger-codegen-maven-plugin.version>
         <docker-maven-plugin>0.30.0</docker-maven-plugin>
-        <version.dmaap>1.1.11</version.dmaap>
         <javax.ws.rs-api.version>2.1.1</javax.ws.rs-api.version>
         <sonar-maven-plugin.version>3.7.0.1746</sonar-maven-plugin.version>
         <jacoco-maven-plugin.version>0.8.5</jacoco-maven-plugin.version>
             <artifactId>swagger-jaxrs2-servlet-initializer</artifactId>
             <version>${swagger.version}</version>
         </dependency>
-        <dependency>
-            <groupId>javax.xml.bind</groupId>
-            <artifactId>jaxb-api</artifactId>
-        </dependency>
+     
         <dependency>
             <groupId>org.immutables</groupId>
             <artifactId>value</artifactId>
             <artifactId>json</artifactId>
             <version>${json.version}</version>
         </dependency>
-        <dependency>
-            <groupId>commons-net</groupId>
-            <artifactId>commons-net</artifactId>
-            <version>${commons-net.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
-            <artifactId>cbs-client</artifactId>
-            <version>${sdk.version}</version>
-        </dependency>
         <dependency>
             <groupId>org.projectlombok</groupId>
             <artifactId>lombok</artifactId>
             <scope>provided</scope>
         </dependency>
-        <dependency>
-            <groupId>javax.ws.rs</groupId>
-            <artifactId>javax.ws.rs-api</artifactId>
-            <version>${javax.ws.rs-api.version}</version>
-        </dependency>
-        <!-- https://mvnrepository.com/artifact/com.github.erosb/everit-json-schema -->
-        <dependency>
-            <groupId>com.github.erosb</groupId>
-            <artifactId>everit-json-schema</artifactId>
-            <version>1.12.1</version>
-        </dependency>
         <!-- Actuator dependencies -->
         <dependency>
             <groupId>org.springframework.boot</groupId>
index e22e73a..d66992d 100644 (file)
         <java.version>11</java.version>
         <springfox.version>3.0.0</springfox.version>
         <immutable.version>2.8.2</immutable.version>
-        <sdk.version>1.1.6</sdk.version>
         <swagger.version>2.1.6</swagger.version>
         <json.version>20190722</json.version>
-        <commons-net.version>3.6</commons-net.version>
         <maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
         <formatter-maven-plugin.version>2.12.2</formatter-maven-plugin.version>
         <spotless-maven-plugin.version>1.24.3</spotless-maven-plugin.version>
             <artifactId>swagger-jaxrs2-servlet-initializer</artifactId>
             <version>${swagger.version}</version>
         </dependency>
-        <dependency>
-            <groupId>javax.xml.bind</groupId>
-            <artifactId>jaxb-api</artifactId>
-        </dependency>
         <dependency>
             <groupId>org.immutables</groupId>
             <artifactId>value</artifactId>
             <artifactId>json</artifactId>
             <version>${json.version}</version>
         </dependency>
-        <dependency>
-            <groupId>commons-net</groupId>
-            <artifactId>commons-net</artifactId>
-            <version>${commons-net.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
-            <artifactId>cbs-client</artifactId>
-            <version>${sdk.version}</version>
-        </dependency>
         <dependency>
             <groupId>org.projectlombok</groupId>
             <artifactId>lombok</artifactId>
             <scope>provided</scope>
         </dependency>
-        <dependency>
-            <groupId>javax.ws.rs</groupId>
-            <artifactId>javax.ws.rs-api</artifactId>
-            <version>${javax.ws.rs-api.version}</version>
-        </dependency>
         <!-- https://mvnrepository.com/artifact/com.github.erosb/everit-json-schema -->
         <dependency>
             <groupId>com.github.erosb</groupId>
index 1e34405..fe02bf2 100755 (executable)
@@ -34,7 +34,7 @@ KUBE_PRESTARTED_IMAGES=""
 CONDITIONALLY_IGNORED_IMAGES="NGW"
 
 #Supported test environment profiles
-SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU ONAP-ISTANBUL ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE"
+SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU ONAP-ISTANBUL ONAP-JAKARTA ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE ORAN-F-RELEASE"
 #Supported run modes
 SUPPORTED_RUNMODES="DOCKER KUBE"
 
index a561cc6..50cf98f 100755 (executable)
@@ -33,7 +33,7 @@ KUBE_PRESTARTED_IMAGES=""
 CONDITIONALLY_IGNORED_IMAGES="NGW"
 
 #Supported test environment profiles
-SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU ONAP-ISTANBUL ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE"
+SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU ONAP-ISTANBUL ONAP-JAKARTA ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE ORAN-F-RELEASE"
 #Supported run modes
 SUPPORTED_RUNMODES="DOCKER KUBE"
 
index da623ce..670ea5e 100755 (executable)
@@ -34,7 +34,7 @@ KUBE_PRESTARTED_IMAGES=""
 CONDITIONALLY_IGNORED_IMAGES="NGW"
 
 #Supported test environment profiles
-SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU ONAP-ISTANBUL ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE"
+SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU ONAP-ISTANBUL ONAP-JAKARTA ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE ORAN-F-RELEASE"
 #Supported run modes
 SUPPORTED_RUNMODES="DOCKER KUBE"
 
index f855f6f..5b84084 100755 (executable)
@@ -34,7 +34,7 @@ KUBE_PRESTARTED_IMAGES=""
 CONDITIONALLY_IGNORED_IMAGES="NGW"
 
 #Supported test environment profiles
-SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU ONAP-ISTANBUL ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE"
+SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU ONAP-ISTANBUL ONAP-JAKARTA ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE ORAN-F-RELEASE"
 #Supported run modes
 SUPPORTED_RUNMODES="DOCKER KUBE"
 
index cf172a0..265db07 100755 (executable)
@@ -34,7 +34,7 @@ KUBE_PRESTARTED_IMAGES=""
 CONDITIONALLY_IGNORED_IMAGES="NGW"
 
 #Supported test environment profiles
-SUPPORTED_PROFILES="ONAP-HONOLULU ONAP-ISTANBUL ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE"
+SUPPORTED_PROFILES="ONAP-HONOLULU ONAP-ISTANBUL ONAP-JAKARTA ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE ORAN-F-RELEASE"
 #Supported run modes
 SUPPORTED_RUNMODES="DOCKER KUBE"
 
index 822f835..8df6f08 100755 (executable)
@@ -28,7 +28,7 @@ KUBE_INCLUDED_IMAGES=" RICSIM SDNC KUBEPROXY"
 KUBE_PRESTARTED_IMAGES=" "
 
 #Supported test environment profiles
-SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU ONAP-ISTANBUL ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE"
+SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU ONAP-ISTANBUL ONAP-JAKARTA ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE ORAN-F-RELEASE"
 #Supported run modes
 SUPPORTED_RUNMODES="DOCKER KUBE"
 
index 0948b65..749ba82 100755 (executable)
@@ -34,7 +34,7 @@ KUBE_PRESTARTED_IMAGES=""
 CONDITIONALLY_IGNORED_IMAGES="NGW"
 
 #Supported test environment profiles
-SUPPORTED_PROFILES="ONAP-HONOLULU ONAP-ISTANBUL ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE"
+SUPPORTED_PROFILES="ONAP-HONOLULU ONAP-ISTANBUL ONAP-JAKARTA ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE ORAN-F-RELEASE"
 #Supported run modes
 SUPPORTED_RUNMODES="DOCKER KUBE"
 
index fa1aea1..7c1202c 100755 (executable)
@@ -33,7 +33,7 @@ KUBE_PRESTARTED_IMAGES=""
 CONDITIONALLY_IGNORED_IMAGES="NGW"
 
 #Supported test environment profiles
-SUPPORTED_PROFILES="ONAP-HONOLULU ONAP-ISTANBUL ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE"
+SUPPORTED_PROFILES="ONAP-HONOLULU ONAP-ISTANBUL ONAP-JAKARTA ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE ORAN-F-RELEASE"
 #Supported run modes
 SUPPORTED_RUNMODES="DOCKER KUBE"
 
index 1b05763..37d3576 100755 (executable)
@@ -27,7 +27,7 @@ KUBE_INCLUDED_IMAGES=""
 KUBE_PRESTARTED_IMAGES=" "
 
 #Supported test environment profiles
-SUPPORTED_PROFILES="ONAP-ISTANBUL"
+SUPPORTED_PROFILES="ONAP-ISTANBUL ONAP-JAKARTA"
 #Supported run modes
 SUPPORTED_RUNMODES="DOCKER"
 
index 32412b7..824ff3e 100755 (executable)
@@ -33,7 +33,7 @@ KUBE_PRESTARTED_IMAGES=""
 CONDITIONALLY_IGNORED_IMAGES=""
 
 #Supported test environment profiles
-SUPPORTED_PROFILES="ORAN-E-RELEASE"
+SUPPORTED_PROFILES="ORAN-E-RELEASE ORAN-F-RELEASE"
 #Supported run modes
 SUPPORTED_RUNMODES="DOCKER KUBE"
 
index 232e5a8..a53dc36 100755 (executable)
@@ -33,7 +33,7 @@ KUBE_PRESTARTED_IMAGES=""
 CONDITIONALLY_IGNORED_IMAGES="NGW"
 
 #Supported test environment profiles
-SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU ONAP-ISTANBUL ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE"
+SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU ONAP-ISTANBUL ONAP-JAKARTA ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE ORAN-F-RELEASE"
 #Supported run modes
 SUPPORTED_RUNMODES="DOCKER KUBE"
 
index 5b8544a..2293919 100755 (executable)
@@ -34,7 +34,7 @@ KUBE_PRESTARTED_IMAGES=""
 CONDITIONALLY_IGNORED_IMAGES=""
 
 #Supported test environment profiles
-SUPPORTED_PROFILES="ORAN-E-RELEASE"
+SUPPORTED_PROFILES="ORAN-E-RELEASE ORAN-F-RELEASE"
 #Supported run modes
 SUPPORTED_RUNMODES="DOCKER KUBE"
 
index 53437e8..a7360d0 100755 (executable)
@@ -24,7 +24,7 @@ TC_ONELINE_DESCR="Resync of RIC via changes in the consul config or pushed confi
 DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR PA RICSIM NGW KUBEPROXY"
 
 #Supported test environment profiles
-SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU ONAP-ISTANBUL ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE"
+SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU ONAP-ISTANBUL ONAP-JAKARTA ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE ORAN-F-RELEASE"
 #Supported run modes
 SUPPORTED_RUNMODES="DOCKER"
 
index 31e40ab..d78be6c 100755 (executable)
@@ -28,7 +28,7 @@ KUBE_INCLUDED_IMAGES="CP CR MR PA RICSIM SDNC KUBEPROXY NGW"
 KUBE_PRESTARTED_IMAGES=""
 
 #Supported test environment profiles
-SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU ONAP-ISTANBUL ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE"
+SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU ONAP-ISTANBUL ONAP-JAKARTA ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE ORAN-F-RELEASE"
 #Supported run modes
 SUPPORTED_RUNMODES="DOCKER KUBE"
 
diff --git a/test/auto-test/FTC4000.sh b/test/auto-test/FTC4000.sh
new file mode 100755 (executable)
index 0000000..227c04f
--- /dev/null
@@ -0,0 +1,99 @@
+#!/bin/bash
+
+#  ============LICENSE_START===============================================
+#  Copyright (C) 2021 Nordix Foundation. All rights reserved.
+#  ========================================================================
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#  ============LICENSE_END=================================================
+#
+
+TC_ONELINE_DESCR="Test of Helm Manager"
+
+#App names to include in the test when running docker, space separated list
+DOCKER_INCLUDED_IMAGES="KUBEPROXY CHARTMUS LOCALHELM HELMMANAGER"
+
+#App names to include in the test when running kubernetes, space separated list
+KUBE_INCLUDED_IMAGES="KUBEPROXY CHARTMUS LOCALHELM HELMMANAGER"
+#Prestarted app (not started by script) to include in the test when running kubernetes, space separated list
+KUBE_PRESTARTED_IMAGES=""
+
+#Ignore image in DOCKER_INCLUDED_IMAGES, KUBE_INCLUDED_IMAGES if
+#the image is not configured in the supplied env_file
+#Used for images not applicable to all supported profile
+CONDITIONALLY_IGNORED_IMAGES=""
+
+#Supported test environment profiles
+SUPPORTED_PROFILES="ORAN-E-RELEASE ORAN-F-RELEASE"
+#Supported run modes
+SUPPORTED_RUNMODES="DOCKER KUBE"
+
+. ../common/testcase_common.sh $@
+
+setup_testenvironment
+
+#### TEST BEGIN ####
+
+clean_environment
+
+start_kube_proxy
+
+start_chart_museum
+
+localhelm_create_test_chart dummy
+
+localhelm_package_test_chart dummy
+
+chartmus_upload_test_chart dummy
+
+clean_and_create_namespace test-ns
+
+localhelm_installed_chart_release NOTINSTALLED test-release test-ns
+
+start_helm_manager
+
+helm_manager_api_get_charts 200 EMPTY
+
+helm_manager_api_exec_add_repo cm $CHART_MUS_SERVICE_PATH
+
+helm_manager_api_post_repo 201 cm $CHART_MUS_SERVICE_HTTPX $CHART_MUS_SERVICE_HOST $CHART_MUS_SERVICE_PORT
+
+helm_manager_api_post_onboard_chart 200 cm dummy DEFAULT-VERSION test-release test-ns
+
+helm_manager_api_get_charts 200 cm dummy DEFAULT-VERSION test-release test-ns
+
+helm_manager_api_post_install_chart 201 dummy DEFAULT-VERSION
+
+localhelm_installed_chart_release INSTALLED test-release test-ns
+
+helm_manager_api_get_charts 200 cm dummy DEFAULT-VERSION test-release test-ns
+
+helm_manager_api_uninstall_chart 204 dummy DEFAULT-VERSION
+
+helm_manager_api_get_charts 200 cm dummy DEFAULT-VERSION test-release test-ns
+
+helm_manager_api_delete_chart 204 dummy DEFAULT-VERSION
+
+helm_manager_api_get_charts 200 EMPTY
+
+localhelm_installed_chart_release NOTINSTALLED test-release test-ns
+
+#### TEST COMPLETE ####
+
+store_logs          END
+
+print_result
+
+auto_clean_environment
+
+
+
index e509f6c..931610b 100755 (executable)
@@ -33,7 +33,7 @@ KUBE_PRESTARTED_IMAGES=""
 CONDITIONALLY_IGNORED_IMAGES="NGW"
 
 #Supported test environment profiles
-SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU ONAP-ISTANBUL ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE"
+SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU ONAP-ISTANBUL ONAP-JAKARTA ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE ORAN-F-RELEASE"
 #Supported run modes
 SUPPORTED_RUNMODES="DOCKER KUBE"
 
index af46814..c7aecdd 100755 (executable)
@@ -33,7 +33,7 @@ KUBE_PRESTARTED_IMAGES=""
 CONDITIONALLY_IGNORED_IMAGES="NGW"
 
 #Supported test environment profiles
-SUPPORTED_PROFILES="ONAP-ISTANBUL ORAN-D-RELEASE ORAN-E-RELEASE"
+SUPPORTED_PROFILES="ONAP-ISTANBUL ONAP-JAKARTA ORAN-D-RELEASE ORAN-E-RELEASE ORAN-F-RELEASE"
 #Supported run modes
 SUPPORTED_RUNMODES="DOCKER KUBE"
 
index ad71f46..9fd1200 100755 (executable)
@@ -33,7 +33,7 @@ KUBE_PRESTARTED_IMAGES=""
 CONDITIONALLY_IGNORED_IMAGES="NGW"
 
 #Supported test environment profiles
-SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU ONAP-ISTANBUL ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE"
+SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU ONAP-ISTANBUL ONAP-JAKARTA ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE ORAN-F-RELEASE"
 #Supported run modes
 SUPPORTED_RUNMODES="DOCKER KUBE"
 
index bd61b3a..cb29618 100755 (executable)
@@ -33,7 +33,7 @@ KUBE_PRESTARTED_IMAGES=""
 CONDITIONALLY_IGNORED_IMAGES="NGW"
 
 #Supported test environment profiles
-SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU ONAP-ISTANBUL ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE"
+SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU ONAP-ISTANBUL ONAP-JAKARTA ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE ORAN-F-RELEASE"
 #Supported run modes
 SUPPORTED_RUNMODES="DOCKER KUBE"
 
index 886b664..a1ae6e4 100755 (executable)
@@ -33,7 +33,7 @@ KUBE_PRESTARTED_IMAGES=""
 CONDITIONALLY_IGNORED_IMAGES="NGW"
 
 #Supported test environment profiles
-SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU ONAP-ISTANBUL ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE"
+SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU ONAP-ISTANBUL ONAP-JAKARTA ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE ORAN-F-RELEASE"
 #Supported run modes
 SUPPORTED_RUNMODES="DOCKER KUBE"
 
index 5d23034..cce6993 100755 (executable)
@@ -33,7 +33,7 @@ KUBE_PRESTARTED_IMAGES=""
 CONDITIONALLY_IGNORED_IMAGES="NGW"
 
 #Supported test environment profiles
-SUPPORTED_PROFILES="ONAP-HONOLULU ONAP-ISTANBUL"
+SUPPORTED_PROFILES="ONAP-HONOLULU ONAP-ISTANBUL ONAP-JAKARTA"
 #Supported run modes
 SUPPORTED_RUNMODES="DOCKER KUBE"
 
index f3d5dd4..802f8f5 100755 (executable)
@@ -33,7 +33,7 @@ KUBE_PRESTARTED_IMAGES=""
 CONDITIONALLY_IGNORED_IMAGES="NGW"
 
 #Supported test environment profiles
-SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU ONAP-ISTANBUL ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE"
+SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU ONAP-ISTANBUL ONAP-JAKARTA ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE ORAN-F-RELEASE"
 #Supported run modes
 SUPPORTED_RUNMODES="DOCKER KUBE"
 
index 4e6b87c..0eb8946 100755 (executable)
@@ -33,7 +33,7 @@ KUBE_PRESTARTED_IMAGES=""
 CONDITIONALLY_IGNORED_IMAGES="NGW"
 
 #Supported test environment profiles
-SUPPORTED_PROFILES="ONAP-HONOLULU ONAP-ISTANBUL ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE"
+SUPPORTED_PROFILES="ONAP-HONOLULU ONAP-ISTANBUL ONAP-JAKARTA ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE ORAN-F-RELEASE"
 #Supported run modes
 SUPPORTED_RUNMODES="DOCKER KUBE"
 
index 76858fe..a6eab40 100644 (file)
@@ -1,7 +1,7 @@
 # Overview
 
 The bash scripts in this dir are intended for function test of the Non-RT RIC in different configurations, using simulators when needed for the external interfaces.
-A few of the bash scripts are so called 'suites', These suite scripts calls a sequence of the other bash scripts.
+A few of the bash scripts are so called 'suites', These suite scripts calls a sequence of the other bash test scripts.
 
 ## Automated test scripts
 
@@ -9,11 +9,12 @@ There are two types of scripts, filenames in the format FTCXXX.sh test one or mo
 FTC is short for Function Test Case. In addition, there are also other test scripts with other naming format used for demo setup etc (e.g PM_DEMO.sh).
 
 The requirements, in terms of the execution enviroment, to run a script or a suite is to have docker, docker-compose and python3 installed (the scripts warns if not installed). As an option, the scripts can also be executed in a Minikube or Kubernetes installation. The additional requirement is to have a clean minikube/kubernetes installation, perferably with the kube dashboard installed.
-The scripts have been tested to work on both MacOS and Ubuntu using docker. They should work also in git-bash on windows (for docker) but only partly verified. Running using minikube has only been verified on Ubuntu and running on kubernetes has only been verified on MacOS.
+The scripts have been tested to work on both MacOS and Ubuntu using docker. They should work also in git-bash on windows (for docker) but only partly verified. Running using minikube has only been verified on Ubuntu and running on kubernetes has been verified on MacOS and Ubuntu. Successful sample tests has been made on google cloud.
 
 ## Configuration
 
-The test scripts uses configuration from a single file, found in `../common/test_env.sh`, which contains all needed configuration in terms of image names, image tags, ports, file paths, passwords etc. This file can be modified if needed.  See the README.md in  `../common/` for all details of the config file.
+The test scripts uses configuration from a single profile file, found in `../common/test_env-*.sh`, which contains all needed configuration in terms of image names, image tags, ports, file paths, passwords etc. There is one profile file for system (ORAN/ONAP) and release.
+If temporary changes are needed to the settings in a profile file, use an override file containing only the variable to override.
 
 ## How to run
 
@@ -30,7 +31,7 @@ Each test script prints out the overall result of the tests in the end of the ex
 The test scripts produce quite a number of logs; all container logs, a log of all http/htps calls from the test scripts including the payload, some configuration created during test and also a test case log (same as what is printed on the screen during execution). All these logs are stored in `logs/FTCXXX/`. So each test script is using its own log directory.
 
 To test all components on a very basic level, run the demo test script(s) for the desired release.
-Note that oran tests only include components from oran.
+Note that oran tests only include components from oran (exception is the onap sdnc).
 Note that onap test uses components from onap combined with released oran components available at that onap release (e.g. Honolulu contains onap images from honolulu and oran images from cherry)
 
 
@@ -55,6 +56,12 @@ ORAN E-RELEASE
 ORAN E-RELEASE with nonrtric deployed with helm charts for the "dep" repo
 >```../FTC_HELM_E_RELEASE.sh remote-remove  kube  release --env-file ../common/test_env-oran-e-release.sh --override override_ftc_helm_e_release.sh```
 
+ORAN F-RELEASE
+=========
+>```./PM_EI_DEMO.sh remote-remove  docker  --env-file ../common/test_env-oran-f-release.sh```
+
+>```./PM_EI_DEMO.sh remote-remove  kube  --env-file ../common/test_env-oran-f-release.sh```
+
 ONAP GUILIN
 ===========
 >```./PM_DEMO.sh remote-remove  docker release   --env-file ../common/test_env-onap-guilin.sh```
@@ -81,24 +88,26 @@ ONAP ISTANBUL
 The test script are number using these basic categories where 0-999 are releated to the policy managment and 1000-1999 are related to information management. 2000-2999 are for southbound http proxy. There are also demo test cases that test more or less all components. These test scripts does not use the numbering scheme below.
 
 The numbering in each series corresponds to the following groupings
-1-99 - Basic sanity tests
+1-99 - Basic sanity tests, PMS
 
-100-199 - API tests
+100-199 - API tests, PMS
 
-300-399 - Config changes and sync
+300-399 - Config changes and sync, PMS
 
-800-899 - Stability and capacity test
+800-899 - Stability and capacity test, PMS
 
-900-999 - Misc test
+900-999 - Misc test, PMS
 
 11XX - ICS API Tests
 
 18XX - ICS Stability and capacity test
 
-2000 - Southbound http proxy tests
+20XX - Southbound http proxy tests
 
 30XX - rApp tests
 
+40XX - Helm Manager tests
+
 Suites
 
 To get an overview of the available test scripts, use the following command to print the test script description:
@@ -121,7 +130,7 @@ TC_ONELINE_DESCR="<test case description>"
 DOCKER_INCLUDED_IMAGES=<list of used apps in this test case - for docker>
 
 KUBE_INCLUDED_IMAGES=<list of used apps (started by the script) in this test case - for kube>
-KUBE_PRESTARTED_IMAGES=<list of used apps (prestartedd - i.e. not started by the script) in this test case - for kube>
+KUBE_PRESTARTED_IMAGES=<list of used apps (prestarte - i.e. not started by the script) in this test case - for kube>
 
 SUPPORTED_PROFILES=<list of supported profile names>
 
@@ -141,6 +150,8 @@ setup_testenvironment
 
 #### TEST COMPLETE ####
 
+print_result
+
 store_logs          END
 
 ```
index 2ae6781..fcc9599 100755 (executable)
@@ -33,7 +33,7 @@ KUBE_PRESTARTED_IMAGES=""
 CONDITIONALLY_IGNORED_IMAGES=""
 
 #Supported test environment profiles
-SUPPORTED_PROFILES="ORAN-E-RELEASE"
+SUPPORTED_PROFILES="ORAN-E-RELEASE ORAN-F-RELEASE"
 #Supported run modes
 SUPPORTED_RUNMODES="DOCKER KUBE"
 
index c52ee9c..5f806d6 100644 (file)
@@ -1,36 +1,42 @@
 # Introduction #
 
-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)
+This dir contains most scripts needed for the auto-test environment. There are scripts with functions to adapt to the apis of the components of the Non-RT RIC; Policy Managerment Service, Information Coordinator Service , A1 simulator as well as other components and simulators. The test environment supports both test with docker and kubernetes.
 Some of the scripts can also be used for other kinds of tests, for example basic tests.
 
 ## Overview for common test scripts and files ##
 
-`agent_api_functions.sh` \
-Contains functions for adapting towards the Policy Management Service (PMS) API, also via dmaap (using a message-router stub interface)
-
 `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.
 
+`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.
+
 `clean-kube.sh` \
 Cleans all services, deployments, pods, replica set etc started by the test environment in kubernetes.
 
 `compare_json.py` \
 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'.
 
-`consul_cbs_function.sh` \
-Contains functions for managing Consul and CBS as well as create the configuration for the PMS.
-
-`control_panel_api_function.sh` \
-Contains functions for managing Control Panel.
+`consul_api_function.sh` \
+Contains functions for managing Consul and CBS.
 
-`controller_api_functions.sh` \
-Contains functions for adaping towards the A1-controller API.
+`count_json_elements.py` \
+A python script calculate the length of json array or size of a json dictionary'.
 
 `count_json_elements.py` \
 A python script returning the number of items in a json array.
 
+`cp_api_function.sh` \
+Contains functions for managing the Control Panel.
+
 `cr_api_functions.sh` \
-Contains functions for adapting towards the Callback receiver for checking received callback event.
+Contains functions for adapting towards the Callback receiver for checking received callback events.
 
 `create_policies_process.py` \
 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.
@@ -41,36 +47,66 @@ A python script to create a json file from a formatted string of ric info. Helpe
 `delete_policies_process.py` \
 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.
+
+`dmaapmed_api_function.sh`
+Contains funnctions for managing the Dmaap Mediator Service.
+
+`dmaapmr_api_function.sh`
+All functions are implemented in `mr_api_functions.sh`.
+
 `do_curl_function.sh`
 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)
 
-`ics_api_functions.sh` \
-Contains functions for adapting towards the ICS API
-
 `extract_sdnc_reply.py` \
 A python script to extract the information from an sdnc (A1 Controller) reply json. Helper for the test environment.
 
-`gateway_api_functions.sh` \
-Contains functions for managing the Non-RT RIC Gateway
+`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
+Contains functions for managing the Http Proxy.
+
+`ics_api_functions.sh` \
+Contains functions for adapting towards the Information Coordinator Service API.
+
+`kafkapc_api_functions.sh` \
+Contains functions for managing the kafka producer/consumer. Kafka is started by the dmaap message router component.
 
 `kube_proxy_api_functions.sh` \
-Contains functions for managing the Kube Proxy - to gain access to all services pod inside a kube cluster.
+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)
+
 `prodstub_api_functions.sh` \
 Contains functions for adapting towards the Producer stub interface - simulates a producer.
 
-`rapp_catalogue_api_functions.sh` \
+`pvccleaner_api_functions.sh` \
+Contains functions for managing the PVC Cleaner (used for reset mounted volumes in kubernetes).
+
+`rc_api_functions.sh` \
 Contains functions for adapting towards the RAPP Catalogue.
 
-`ricsimulator_api_functions.sh` \
+`ricsim_api_functions.sh` \
 Contains functions for adapting towards the RIC (A1) simulator admin API.
 
+`sdnc_api_functions.sh` \
+Contains functions for adaping towards the SDNC (used as an A1 controller).
+
 `test_env*.sh` \
 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.
 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'.
@@ -79,6 +115,9 @@ Used by the auto test scripts/suites but could be used for other test script as
 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.
 The included functions are described in detail further below.
 
+`testengine_config.sh` \
+Configuration file to setup the applications (components and simulators) the test enviroment handles.
+
 `testsuite_common.sh` \
 Common functions for running two or more auto test scripts as a suite.
 
@@ -101,6 +140,10 @@ This file must implement the following functions used by the test engine. Note t
 | __<app-short_name>_kube_scale_zero |
 | __<app-short_name>_kube_scale_zero_and_wait |
 | __<app-short_name>_kube_delete_all |
+| __<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.
 
@@ -148,7 +191,7 @@ The script can be started with these arguments
 | `--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 |
 | `--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 on locally built images) or 'remote' (push locally built images and images from nexus repo). Default is 'local' |
+| `-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 |
 | `--print-stats` |  Prints the number of tests, failed tests, failed configuration and deviations after each individual test or config |
 | `--override <file>` |  Override setting from the file supplied by --env-file |
@@ -164,20 +207,6 @@ Must be called right after sourcing all component scripts.
 |--|
 | None |
 
-## Function: indent1 ##
-
-Indent every line of a command output with one space char.
-| arg list |
-|--|
-| None |
-
-## Function: indent2 ##
-
-Indent every line of a command output with two space chars.
-| arg list |
-|--|
-| None |
-
 ## Function: print_result ##
 
 Print a test report of an auto-test script.
@@ -190,18 +219,15 @@ Print a test report of an auto-test script.
 Start a timer for time measurement. Only one timer can be running.
 | arg list |
 |--|
+| `<timer-message-to-print>` |
 | None - but any args will be printed (It is good practice to use same args for this function as for the `print_timer`) |
 
 ## Function: print_timer ##
 
-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.
+Print the value of the timer (in seconds) previously started by 'start_timer'. (Note that timer is still running after this function). The result of the timer as well as the arg to 'start_timer' will also be printed in the test report.
 | arg list |
 |--|
-| `<timer-message-to-print>` |
-
-| parameter | description |
-| --------- | ----------- |
-| `<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`) |
+| None |
 
 ## Function: deviation ##
 
@@ -240,16 +266,9 @@ Make the script sleep for a number of seconds.
 | `<sleep-time-in-sec>` | Number of seconds to sleep |
 | `<any-text-in-quotes-to-be-printed>` | Optional. The text will be printed, if present |
 
-## Function: check_control_panel_logs ##
-
-Check the Control Panel log for any warnings and errors and print the count of each.
-| arg list |
-|--|
-| None |
-
 ## Function: store_logs ##
 
-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.
+Take a snap-shot of all logs for all running containers/pods and stores them in `./logs/<ATC-id>`. All logs will get the specified prefix in the file name. In general, one of the last steps in an auto-test script shall be to call this function. If logs shall be taken several times during a test script, different prefixes shall be used each time.
 | arg list |
 |--|
 | `<logfile-prefix>` |
@@ -274,868 +293,585 @@ Print out the overall result of the executed test cases.
 |--|
 | None |
 
-# Description of functions in agent_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.
-For api function in version 2, an url prefix is added if configured.
+# Description of functions in chartmus_api_function.sh #
 
-## Function: use_agent_rest_http ##
+## Function: start_chart_museum ##
 
-Use http for all API calls to the Policy Agent. This is the default.
+Start the Chart Museum
 | arg list |
 |--|
 | None |
 
-## Function: use_agent_rest_https ##
+## Function: chartmus_upload_test_chart ##
 
-Use https for all API calls to the Policy Agent.
+Upload a package chart to chartmusem
 | arg list |
 |--|
-| None |
+| `<chart-name>` |
 
-## Function: use_agent_dmaap_http ##
+| parameter | description |
+| --------- | ----------- |
+| `<chart-name>` | Name of the chart to upload |
 
-Send and recieve all API calls to the Policy Agent over Dmaap via the MR over http.
+## Function: chartmus_delete_test_chart ##
+
+Delete a chart in chartmusem
 | arg list |
 |--|
-| None |
+| `<chart-name> [<version>]` |
 
-## Function: use_agent_dmaap_https ##
+| parameter | description |
+| --------- | ----------- |
+| `<chart-name>` | Name of the chart to delete |
+| `<version>` | Chart version, default is 0.1.0 |
 
-Send and recieve all API calls to the Policy Agent over Dmaap via the MR over https.
-| arg list |
-|--|
-| None |
 
-## Function: start_policy_agent ##
+# Description of functions in consul_api_function.sh #
+
+## Function: consul_config_app ##
+
+Function to load a json config from a file into consul for the Policy Agent
 
-Start the Policy Agent container or corresponding kube resources depending on docker/kube mode.
 | arg list |
 |--|
-| `<logfile-prefix>` |
-| (docker) `PROXY\|NOPROXY <config-file>` |
-| (kube) `PROXY\|NOPROXY <config-file> [ <data-file> ]` |
+| `<json-config-file>` |
 
 | parameter | description |
 | --------- | ----------- |
-| `PROXY` | Configure with http proxy, if proxy is started  |
-| `NOPROXY` | Configure without http proxy  |
-| `<config-file>`| Path to application.yaml  |
-| `<data-file>` | Optional path to application_configuration.json  |
+| `<json-config-file>` | The path to the json file to be loaded to Consul/CBS |
 
-## Function: agent_load_config ##
+## Function: start_consul_cbs ##
 
-Load the config into a config map (kubernetes only).
+Start the Consul and CBS containers
 | arg list |
 |--|
-|  `<data-file>` |
+| None |
 
-| parameter | description |
-| --------- | ----------- |
-|  `<data-file>` | Path to application_configuration.json  |
+# Description of functions in cp_api_function.sh #
 
-## Function: set_agent_debug ##
+## Function: use_control_panel_http ##
 
-Configure the Policy Agent log on debug level. The Policy Agent must be running.
+Set http as the protocol to use for all communication to the Control Panel
 | arg list |
 |--|
 | None |
 
-## Function: set_agent_trace ##
+## Function: use_control_panel_https ##
 
-Configure the Policy Agent log on trace level. The Policy Agent must be running.
+Set https as the protocol to use for all communication to the Control Panel
 | arg list |
 |--|
 | None |
 
-## Function: use_agent_retries ##
+## Function: start_control_panel ##
 
-Configure the Policy Agent to make upto 5 retries if an API calls return any of the specified http return codes.
+Start the Control Panel container
 | arg list |
 |--|
-| `[<response-code>]*` |
+| None |
 
-## Function: check_policy_agent_logs ##
+# Description of functions in cr_api_functions.sh #
 
-Check the Policy Agent log for any warnings and errors and print the count of each.
+## 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: api_equal() ##
+## Function: use_cr_https ##
 
-Tests if the array length of a json array in the Policy Agent 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.
+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 |
 |--|
 | `<variable-name> <target-value> [ <timeout-in-sec> ]` |
 
 | parameter | description |
 | --------- | ----------- |
-| `<variable-name>` | Relative url. Example 'json:policy_types' - checks the json array length of the url /policy_types  |
-| `<target-value>` | Target value for the length  |
-| `<timeout-in-sec>` | Max time to wait for the length to reach the target value  |
+| `<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: api_get_policies() ##
+## Function: cr_contains_str ##
 
-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.
-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.
+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 |
 |--|
-| `<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>]*]` |
+| `<variable-name> <target-value> [ <timeout-in-sec> ]` |
 
-| arg list V2 |
-|--|
-| `<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>]*]` |
 
 | parameter | description |
 | --------- | ----------- |
-| `<response-code>` | Expected http response code |
-| `<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  |
-| `<policy-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-id>` |  Id of the policy |
-| `EMPTY` |  Indicate for the special empty policy type |
-| `transient` |  Transient, true or false |
-| `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() ##
+| `<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  |
 
-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.
-To test the contents of the returned json payload, add a path to the template file used when creating the policy.
+## 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 |
 |--|
-| `<response-code>  <policy-id> [<template-file>]` |
-
-| arg list V2|
-|--|
-| `<response-code> <policy-id> [ <template-file> <service-name> <ric-id> <policytype-id>\|NOTYPE <transient> <notification-url>\|NOURL ]` |
+| `<variable-name>` |
 
 | parameter | description |
 | --------- | ----------- |
-| `<response-code>` | Expected http response code |
-| `<policy-id>` |  Id of the policy |
-| `<template-file>` |  Path to the template file for the policy (same template used when creating the policy) |
-| `<service-id>` | Id of the service  |
-| `<ric-id>` | Id of the ric  |
-| `<policy-type-id>` |  Id of the policy type |
-| `NOTYPE` | Indicator that no type id is provided  |
-| `transient` |  Transient, true or false |
-| `notification-url` |  Url for notifications |
+| `<variable-name>` | Variable name in the CR  |
 
-## Function: api_put_policy() ##
+## Function: cr_delay_callback ##
 
-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).
+Function to configure write delay on callbacks. Delay given in seconds. Setting remains until removed.
 
 | arg list |
 |--|
-| `<response-code> <service-name> <ric-id> <policytype-id> <policy-id> <transient> <template-file> [<count>]` |
-
-| arg list V2 |
-|--|
-| `<response-code> <service-name> <ric-id> <policytype-id>\|NOTYPE <policy-id> <transient>\|NOTRANSIENT <notification-url>\|NOURL <template-file> [<count>]` |
+| `<response-code> <cr-path-id> [<delay-in-seconds>]`|
 
 | parameter | description |
 | --------- | ----------- |
 | `<response-code>` | Expected http response code |
-| `<service-id>` | Id of the service  |
-| `<ric-id>` | Id of the ric  |
-| `<policy-type-id>` |  Id of the policy type |
-| `<policy-id>` |  Id of the policy. This value shall be a numeric value if more than one policy shall be created |
-| `transient>` |  Transient 'true' or 'false'. 'NOTRANSIENT' can be used to indicate using the default value (no transient value provided) |
-| `notification-url` |  Url for notifications |
-|`NOURL`| Indicator for no url |
-| `<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() ##
-
-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'.
-
-## Function: api_put_policy_parallel() ##
+| `<cr-path-id>` |  Variable index to CR |
+| `<delay-in-seconds>` |  Delay in seconds. If omitted, the delay is removed |
 
-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.
+## Function: cr_api_check_all_sync_events ##
 
-| arg list |
-|--|
-| `<response-code> <service-name> <ric-id-base> <number-of-rics> <policytype-id> <policy-start-id> <transient> <template-file> <count-per-ric> <number-of-threads>`
+Check the contents of all ric events received for a callback id.
 
 | arg list |
 |--|
-| `<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>`
+| `<response-code> <id> [ EMPTY \| ( <ric-id> )+ ]` |
 
 | parameter | description |
 | --------- | ----------- |
 | `<response-code>` | Expected http response code |
-| `<service-id>` | Id of the service  |
-| `<ric-id-base>` | The base id of the rics, ie ric id without the sequence number. The sequence number is added during processing  |
-| `<number-of-rics>` | The number of rics, assuming the first index is '1'. The index is added to the 'ric-id-base' id  |
-| `<policy-type-id>` |  Id of the policy type |
-| `<policy-start-id>` |  Id of the policy. This value shall be a numeric value and will be the id of the first policy |
-| `transient>` |  Transient 'true' or 'false'. 'NOTRANSIENT' can be used to indicate using the default value (no transient value provide) |
-| `notification-url` |  Url for notifications |
-| `<template-file>` |  Path to the template file for the policy |
-| `<count-per-ric>` |  Number of policies per ric |
-| `<number-of-threads>` |  Number of threads (processes) to run in parallel |
+| `<id>` | Id of the callback destination  |
+| `EMPTY` | Indicator for an empty list  |
+| `<ric-id>` | Id of the ric  |
 
-## Function: api_delete_policy() ##
+## Function: cr_api_check_all_ics_events ##
 
-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.
+Check the contents of all current status events for one id from ICS
 
 | arg list |
 |--|
-| `<response-code> <policy-id> [<count>]`
+| `<response-code> <id> [ EMPTY \| ( <status> )+ ]` |
 
 | parameter | description |
 | --------- | ----------- |
 | `<response-code>` | Expected http response code |
-| `<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() ##
-
-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'.
+| `<id>` | Id of the callback destination  |
+| `EMPTY` | Indicator for an empty list  |
+| `<status>` | Status string  |
 
-## Function: api_delete_policy_parallel() ##
+## Function: cr_api_check_all_ics_subscription_events ##
 
-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.
+Check the contents of all current subscription events for one id from ICS
 
 | arg list |
 |--|
-| `<response-code> <ric-id-base> <number-of-rics> <policy-start-id> <count-per-ric> <number-of-threads>`
+| `<response-code> <id> [ EMPTY | ( <type-id> <schema> <registration-status> )+ ]` |
 
 | parameter | description |
 | --------- | ----------- |
 | `<response-code>` | Expected http response code |
-| `<ric-id-base>` | The base id of the rics, ie ric id without the sequence number. The sequence number is added during processing  |
-| `<number-of-rics>` | The number of rics, assuming the first index is '1'  |
-| `<policy-start-id>` |  Id of the policy. This value shall be a numeric value and will be the id of the first policy |
-| `<count-per-ric>` |  Number of policies per ric |
-| `<number-of-threads>` |  Number of threads (processes) to run in parallel |
+| `<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: api_get_policy_ids() ##
+## Function: cr_api_reset ##
 
-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.
-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.
+Reset the callback receiver
 
 | arg list |
 |--|
-| `<response-code> <ric-id>\|NORIC <service-id>\|NOSERVICE <type-id>\|NOTYPE ([<policy-instance-id]*\|NOID)` |
-
-| parameter | description |
-| --------- | ----------- |
-| `<response-code>` | Expected http response code |
-| `<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: api_get_policy_schema() ##
+## Function: cr_api_check_all_genric_json_events ##
 
-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.
+Check the contents of all json events for path
 
 | arg list |
 |--|
-| `<response-code> <policy-type-id> [<schema-file>]` |
+| `<response-code> <cr-path-id>  <topic-url> (EMPTY | <json-msg>+ )` |
 
 | 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 |
+| `<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: api_get_policy_schema() ##
+## Function: cr_api_check_single_genric_json_event ##
 
-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.
+Check a single (oldest) json event (or none if empty) for path
 
 | arg list |
 |--|
-| `<response-code> <policy-type-id> [<schema-file>]` |
+| `<response-code> <cr-path-id> <topic-url> (EMPTY | <json-msg> )` |
 
 | 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 |
+| `<cr-path-id>` | Variable index for CR  |
+| `<topic-url>` | Topic url  |
+| `EMPTY` | Indicator for no msg  |
+| `json-msg` | Json msg string to compare with  |
 
-## Function: api_get_policy_schemas() ##
+## Function: cr_api_check_single_genric_event_md5 ##
 
-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)
+Check a single (oldest) json in md5 format (or none if empty) for path.
+Note that if a json message is given, it shall be compact, no ws except inside string.
+The MD5 will generate different hash if whitespace is present or not in otherwise equivalent json.
 
 | arg list |
 |--|
-| `<response-code>  <ric-id>\|NORIC [<schema-file>\|NOFILE]*` |
+| `<response-code> <cr-path-id> <topic-url> (EMPTY | <data-msg> )` |
 
 | 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 |
+| `<cr-path-id>` | Variable index for CR  |
+| `<topic-url>` | Topic url  |
+| `EMPTY` | Indicator for no msg  |
+| `data-msg` | msg string to compare with  |
 
-## Function: api_get_policy_status() ##
+## Function: cr_api_check_single_genric_event_md5_file ##
 
-Test of GET '/policy_status' or V2 GET '/policies/{policy_id}/status'.
+Check a single (oldest) event in md5 format (or none if empty) for path.
+Note that if a file with json message is given, the json shall be compact, no ws except inside string and not newlines.
+The MD5 will generate different hash if ws/newlines is present or not in otherwise equivalent json
 
 | arg list |
 |--|
-| `<response-code> <policy-id> (STD\|STD2 <enforce-status>\|EMPTY [<reason>\|EMPTY])\|(OSC <instance-status> <has-been-deleted>)` |
+| `<response-code> <cr-path-id> <topic-url> (EMPTY | <data-file> )` |
 
 | 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 |
+| `<cr-path-id>` | Variable index for CR  |
+| `<topic-url>` | Topic url  |
+| `EMPTY` | Indicator for no msg  |
+| `data-file` | path to file to compare with  |
 
-## Function: api_get_policy_types() ##
+# Description of functions in dmaapadp_api_functions.sh #
 
-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)
+## Function: use_dmaapadp_http ##
+
+Use http for all proxy requests. Note that this only applicable to the actual proxy request, the proxied protocol can still be http and https.
 
 | arg list |
 |--|
-| `<response-code> [<ric-id>\|NORIC [<policy-type-id>\|EMPTY [<policy-type-id>]*]]` |
+| None |
 
-| 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: use_dmaapadp_https ##
 
-## Function: api_get_status() ##
+Use https for all proxy requests. Note that this only applicable to the actual proxy request, the proxied protocol can still be http and https.
 
-Test of GET /status or V2 GET /status
+| arg list |
+|--|
+| None |
+
+## Function: start_dmaapadp ##
+
+Start the dmaap adator service container in docker or kube depending on running mode.
 
 | arg list |
 |--|
-| `<response-code>` |
+| (kube) `PROXY\|NOPROXY <config-file> [ <data-file> ]` |
 
 | parameter | description |
 | --------- | ----------- |
-| `<response-code>` | Expected http response code |
-
-## Function: api_get_ric() ##
+| `PROXY` | Configure with http proxy, if proxy is started  |
+| `NOPROXY` | Configure without http proxy  |
+| `<config-file>`| Path to application.yaml  |
+| `<data-file>` | Optional path to application_configuration.json  |
 
-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.
+## Function: set_dmaapadp_trace ##
 
+Configure the dmaap adaptor service log on trace level. The app must be running.
 | arg list |
 |--|
-| `<reponse-code> <managed-element-id> [<ric-id>]` |
+| None |
 
-| arg list V2 |
+# Description of functions in dmaapmed_api_functions.sh #
+
+## Function: use_dmaapmed_http ##
+
+Use http for all proxy requests. Note that this only applicable to the actual proxy request, the proxied protocol can still be http and https.
+
+| arg list |
 |--|
-| `<reponse-code> <management-element-id>\|NOME <ric-id>\|<NORIC> [<string-of-ricinfo>]` |
+| None |
 
-| 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: use_dmaapmed_https ##
 
-## Function: api_get_rics() ##
+Use https for all proxy requests. Note that this only applicable to the actual proxy request, the proxied protocol can still be http and https.
 
-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 |
+|--|
+| None |
+
+## Function: start_dmaapmed ##
+
+Start the dmaap mediator service container in docker or kube depending on running mode.
 
 | arg list |
 |--|
-| `<reponse-code> <policy-type-id>\|NOTYPE [<space-separate-string-of-ricinfo>]` |
+| None |
 
-| 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 |
+# Description of functions in httpproxy_api_functions.sh #
 
-## Function: api_put_service() ##
+## Function: use_http_proxy_http ##
 
-Test of PUT '/service' or V2 PUT '/service'.
+Use http for all proxy requests. Note that this only applicable to the actual proxy request, the proxied protocol can still be http and https.
 | arg list |
 |--|
-| `<response-code>  <service-name> <keepalive-timeout> <callbackurl>` |
+| None |
 
-| parameter | description |
-| --------- | ----------- |
-| `<response-code>` | Expected http response code |
-| `<service-name>` |  Service name |
-| `<keepalive-timeout>` |  Timeout value |
-| `<callbackurl>` |  Callback url |
+## Function: use_http_proxy_https ##
 
-## Function: api_get_services() ##
+Use https for all proxy requests. Note that this only applicable to the actual proxy request, the proxied protocol can still be http and https.
+| arg list |
+|--|
+| None |
 
-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.
+## Function: start_http_proxy ##
 
+Start the http proxy container in docker or kube depending on running mode.
 | 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>]* )]` |
+| None |
 
-| 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 |
+# Description of functions in helmmanager_api_functions.sh #
 
-## Function: api_get_service_ids() ##
+## Function: use_helm_manager_http ##
 
-Test of GET '/services' or V2 GET /'v2/services'. Only check of service ids.
+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 |
 |--|
-| `<response-code> [<service-name>]*` |
+| None |
 
-| parameter | description |
-| --------- | ----------- |
-| `<response-code>` | Expected http response code |
-| `<service-name>` |  Service name |
+## Function: start_helm_manager ##
 
-## Function: api_delete_services() ##
+Start the Helm Manager container in docker or kube depending on running mode.
+| arg list |
+|--|
+| None |
 
-Test of DELETE '/services' or V2 DELETE '/v2/services/{serviceId}'
+## Function: helm_manager_api_get_charts ##
 
+Get all charts and compare the expected contents.
 | arg list |
 |--|
-| `<response-code> [<service-name>]*` |
+| `<response-code> [ EMPTY | ( <chart> <version> <namespace> <release> <repo> )+ ]` |
 
 | parameter | description |
 | --------- | ----------- |
-| `<response-code>` | Expected http response code |
-| `<service-name>` |  Service name |
-
-## Function: api_put_services_keepalive() ##
+| `<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  |
 
-Test of PUT '/services/keepalive' or V2 PUT '/v2/services/{service_id}/keepalive'
+## Function: helm_manager_api_post_repo ##
 
+Add repo to the helm manager.
 | arg list |
 |--|
-| `<response-code> <service-name>` |
+| `<response-code> <repo-name> <repo-protocol> <repo-address> <repo-port>` |
 
 | parameter | description |
 | --------- | ----------- |
-| `<response-code>` | Expected http response code |
-| `<service-name>` |  Service name |
+| `<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: api_put_configuration() ##
-
-Test of PUT '/v2/configuration'
+## Function: helm_manager_api_post_onboard_chart ##
 
+Onboard a chart to the helm manager.
 | arg list |
 |--|
-| `<response-code> <config-file>` |
+| `<response-code> <repo> <chart> <version> <release> <namespace>` |
 
 | parameter | description |
 | --------- | ----------- |
-| `<response-code>` | Expected http response code |
-| `<config-file>` |  Path json config file |
-
-## Function: api_get_configuration() ##
+| `<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  |
 
-Test of GET '/v2/configuration'
+## Function: helm_manager_api_post_install_chart ##
 
+Install an onboarded chart.
 | arg list |
 |--|
-| `<response-code> [<config-file>]` |
+| `<response-code> <chart> <version>` |
 
 | parameter | description |
 | --------- | ----------- |
-| `<response-code>` | Expected http response code |
-| `<config-file>` |  Path json config file to compare the retrieved config with |
+| `<response-code>` | Expected response code |
+| `<chart>`| Name of the chart  |
+| `<version>`| Version of the chart  |
 
-# Description of functions in consul_cbs_function.sh #
+## Function: helm_manager_api_uninstall_chart ##
 
-## Function: consul_config_app ##
+Uninstall a chart.
+| arg list |
+|--|
+| `<response-code> <chart> <version>` |
 
-Function to load a json config from a file into consul for the Policy Agent
+| 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 |
 |--|
-| `<json-config-file>` |
+| `<response-code> <chart> <version>` |
 
 | parameter | description |
 | --------- | ----------- |
-| `<json-config-file>` | The path to the json file to be loaded to Consul/CBS |
+| `<response-code>` | Expected response code |
+| `<chart>`| Name of the chart  |
+| `<version>`| Version of the chart  |
 
-## Function: prepare_consul_config ##
+## Function: helm_manager_api_exec_add_repo ##
 
-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')
+Add repo in helm manager by helm using exec.
 | arg list |
 |--|
-| `<deviation-message-to-print>` |
+| `<repo-name> <repo-url>` |
 
 | parameter | description |
 | --------- | ----------- |
-| `SDNC\|NOSDNC` | Configure based on a1-controller (SNDC) or without a controller/adapter (NOSDNC) |
-| `<output-file>` | The path to the json output file containing the prepared config. This file is used in 'consul_config_app'  |
+| `<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  |
 
-## Function: start_consul_cbs ##
 
-Start the Consul and CBS containers
+# Description of functions in ics_api_functions.sh #
+
+## Function: use_ics_rest_http ##
+
+Use http for all API calls to the ICS. This is the default protocol.
 | arg list |
 |--|
 | None |
 
-# Description of functions in control_panel_api_function.sh #
-
-## Function: use_control_panel_http ##
+## Function: use_ics_rest_https ##
 
-Set http as the protocol to use for all communication to the Control Panel
+Use https for all API calls to the ICS.
 | arg list |
 |--|
 | None |
 
-## Function: use_control_panel_https ##
+## Function: use_ics_dmaap_http ##
 
-Set https as the protocol to use for all communication to the Control Panel
+Send and recieve all API calls to the ICS over Dmaap via the MR using http.
 | arg list |
 |--|
 | None |
 
-## Function: start_control_panel ##
+## Function: use_ics_dmaap_https ##
 
-Start the Control Panel container
+Send and recieve all API calls to the ICS over Dmaap via the MR using https.
 | arg list |
 |--|
 | None |
 
-# Description of functions in controller_api_functions.sh #
+## Function: start_ics ##
+
+Start the ICS container in docker or kube depending on running mode.
+| arg list |
+|--|
+| `PROXY|NOPROXY <config-file>` |
 
-The file contains a selection of the possible API tests towards the a1-controller
+| parameter | description |
+| --------- | ----------- |
+| `PROXY` | Configure with http proxy, if proxy is started  |
+| `NOPROXY` | Configure without http proxy  |
+| `<config-file>`| Path to application.yaml  |
 
-## Function: use_sdnc_http ##
+## Function: stop_ics ##
 
-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.
+Stop the ICS container.
 | arg list |
 |--|
 | None |
 
-## Function: use_sdnc_https ##
+## Function: start_stopped_ics ##
 
-Use https for all API calls towards the SDNC A1 Controller. Note that this function shall be called before preparing the config for Consul.
+Start a previously stopped ics.
 | arg list |
 |--|
 | None |
 
-## Function: start_sdnc ##
+## Function: set_ics_debug ##
 
-Start the SDNC A1 Controller container and its database container
+Configure the ICS log on debug level. The ICS must be running.
 | arg list |
 |--|
 | None |
 
-## Function: check_sdnc_logs ##
+## Function: set_ics_trace ##
 
-Check the SDNC log for any warnings and errors and print the count of each.
+Configure the ICS log on trace level. The ICS must be running.
 | arg list |
 |--|
 | None |
 
-## Function: controller_api_get_A1_policy_ids ##
-
-Test of GET policy ids towards OSC or STD type simulator.
-To test response code only, provide the response code, 'OSC' + policy type or 'STD'
-To test the response payload, include the ids of the expexted response.
+## Function: use_ics_retries ##
 
+Perform curl retries when making direct call to ICS for the specified http response codes
+Speace separated list of http response codes
 | arg list |
 |--|
-| `<response-code> (OSC <ric-id> <policy-type-id> [ <policy-id> [<policy-id>]* ]) \| ( STD <ric-id> [ <policy-id> [<policy-id>]* ]` |
+| `[<response-code>]*` |
 
 | parameter | description |
 | --------- | ----------- |
-| `<response-code>` | Expected http response code |
-| `OSC` |  Indicator of status of Non-Standarized OSC A1 |
-| `<ric-id>` | Id of the ric  |
-| `policy-type-id>` |  Id of the policy type |
-| `<policy-id>` |  Id of the policy |
-| `STD` |  Indicator of status of Standarized A1 |
-
-## Function: controller_api_get_A1_policy_type ##
-
-Test of GET a policy type (OSC only)
-
-| arg list |
-|--|
-| `<response-code> OSC <ric-id> <policy-type-id> [<policy-type-file>]` |
-
-| parameter | description |
-| --------- | ----------- |
-| `<response-code>` | Expected http response code |
-| `OSC` |  Indicator of status of Non-Standarized OSC A1 |
-| `<ric-id>` | Id of the ric  |
-| `policy-type-id>` |  Id of the policy type |
-| `policy-type-file>` |  Optional schema file to compare the returned type with |
-
-## Function: controller_api_delete_A1_policy ##
-
-Deletes a policy instance
-
-| arg list |
-|--|
-| `(STD <ric-id> <policy-id>) \| (OSC <ric-id> <policy-type-id> <policy-id>)` |
-
-| parameter | description |
-| --------- | ----------- |
-| `<response-code>` | Expected http response code |
-| `STD` |  Indicator of status of Standarized A1 |
-| `<ric-id>` | Id of the ric  |
-| `<policy-id>` |  Id of the policy |
-| `policy-type-id>` |  Id of the policy type |
-| `OSC` |  Indicator of status of Non-Standarized OSC A1 |
-| `policy-type-file>` |  Optional schema file to compare the returned type with |
-
-## Function: controller_api_put_A1_policy ##
-
-Creates a policy instance
-
-| arg list |
-|--|
-| `<response-code> (STD <ric-id> <policy-id> <template-file> ) \| (OSC <ric-id> <policy-type-id> <policy-id> <template-file>)` |
-
-| parameter | description |
-| --------- | ----------- |
-| `<response-code>` | Expected http response code |
-| `STD` |  Indicator of status of Standarized A1 |
-| `<ric-id>` | Id of the ric  |
-| `<policy-id>` |  Id of the policy |
-| `<template-file>` |  Path to the template file of the policy|
-| `OSC` |  Indicator of status of Non-Standarized OSC A1 |
-| `<policy-type-id>` |  Id of the policy type |
-
-## Function: controller_api_get_A1_policy_status ##
-
-Checks the status of a policy
-
- arg list |
-|--|
-| `<response-code> (STD <ric-id> <policy-id> <enforce-status> [<reason>]) \| (OSC <ric-id> <policy-type-id> <policy-id> <instance-status> <has-been-deleted>)` |
-
-| parameter | description |
-| --------- | ----------- |
-| `<response-code>` | Expected http response code |
-| `STD` |  Indicator of status of Standarized A1 |
-| `<ric-id>` | Id of the ric  |
-| `<policy-id>` |  Id of the policy |
-| `<enforce-status>` |  Enforcement status |
-| `<reason>` |  Optional reason |
-| `OSC` |  Indicator of status of Non-Standarized OSC A1 |
-| `<policy-type-id>` |  Id of the policy type |
-| `<instance-status>` |  Instance status |
-| `<has-been-deleted>` |  Deleted status, true or false |
-
-# 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 |
-|--|
-| `<variable-name> <target-value> [ <timeout-in-sec> ]` |
-
-| parameter | description |
-| --------- | ----------- |
-| `<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_api_check_all_sync_events() ##
-
-Check the contents of all ric events received for a callback id.
-
-| arg list |
-|--|
-| `<response-code> <id> [ EMPTY \| ( <ric-id> )+ ]` |
-
-| parameter | description |
-| --------- | ----------- |
-| `<response-code>` | Expected http response code |
-| `<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> <id> [ EMPTY \| ( <status> )+ ]` |
-
-| parameter | description |
-| --------- | ----------- |
-| `<response-code>` | Expected http response code |
-| `<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> <id> [ EMPTY | ( <type-id> <schema> <registration-status> )+ ]` |
-
-| parameter | description |
-| --------- | ----------- |
-| `<response-code>` | Expected http response code |
-| `<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 |
-|--|
-| - |
-
-
-# Description of functions in ics_api_functions.sh #
-
-## Function: use_ics_rest_http ##
-
-Use http for all API calls to the ICS. This is the default protocol.
-| arg list |
-|--|
-| None |
-
-## Function: use_ics_rest_https ##
-
-Use https for all API calls to the ICS.
-| arg list |
-|--|
-| None |
-
-## Function: use_ics_dmaap_http ##
-
-Send and recieve all API calls to the ICS over Dmaap via the MR using http.
-| arg list |
-|--|
-| None |
-
-## Function: use_ics_dmaap_https ##
-
-Send and recieve all API calls to the ICS over Dmaap via the MR using https.
-| arg list |
-|--|
-| None |
-
-## Function: start_ics ##
-
-Start the ICS container in docker or kube depending on running mode.
-| arg list |
-|--|
-| None |
-
-## Function: stop_ics ##
-
-Stop the ICS container.
-| arg list |
-|--|
-| None |
-
-## Function: start_stopped_ics ##
-
-Start a previously stopped ics.
-| arg list |
-|--|
-| None |
-
-## Function: set_ics_debug ##
-
-Configure the ICS log on debug level. The ICS must be running.
-| arg list |
-|--|
-| None |
-
-## Function: set_ics_trace ##
-
-Configure the ICS log on trace level. The ICS must be running.
-| arg list |
-|--|
-| None |
+| `<response-code>` | Http response code to make retry for  |
 
 ## Function: check_ics_logs ##
 
@@ -1161,9 +897,9 @@ See the 'a1-interface' repo for more details.
 | `<target-value>` | Target value for the variable  |
 | `<timeout-in-sec>` | Max time to wait for the variable to reach the target value  |
 
-## Function: ics_api_a1_get_job_ids() ##
+## Function: ics_api_a1_get_job_ids ##
 
-Test of GET '/A1-EI​/v1​/eitypes​/{eiTypeId}​/eijobs' and optional check of the array of returned job ids.
+Test of GET '/A1-EI/v1/eitypes/{eiTypeId}/eijobs' and optional check of the array of returned job ids.
 To test the response code only, provide the response code parameter as well as a type id and an owner id.
 To also test the response payload add the 'EMPTY' for an expected empty array or repeat the last parameter for each expected job id.
 
@@ -1180,9 +916,9 @@ To also test the response payload add the 'EMPTY' for an expected empty array or
 | `<job-id>` | Id of the expected job  |
 | `EMPTY` | The expected list of job id shall be empty  |
 
-## Function: ics_api_a1_get_type() ##
+## Function: ics_api_a1_get_type ##
 
-Test of GET '/A1-EI​/v1​/eitypes​/{eiTypeId}' and optional check of the returned schema.
+Test of GET '/A1-EI/v1/eitypes/{eiTypeId}' and optional check of the returned schema.
 To test the response code only, provide the response code parameter as well as the type-id.
 To also test the response payload add a path to the expected schema file.
 
@@ -1196,9 +932,9 @@ To also test the response payload add a path to the expected schema file.
 | `<type-id>` | Id of the EI type  |
 | `<schema-file>` | Path to a schema file to compare with the returned schema  |
 
-## Function: ics_api_a1_get_type_ids() ##
+## Function: ics_api_a1_get_type_ids ##
 
-Test of GET '/A1-EI​/v1​/eitypes' and optional check of returned list of type ids.
+Test of GET '/A1-EI/v1/eitypes' and optional check of returned list of type ids.
 To test the response code only, provide the response only.
 To also test the response payload add the list of expected type ids (or EMPTY if the list is expected to be empty).
 
@@ -1212,9 +948,9 @@ To also test the response payload add the list of expected type ids (or EMPTY if
 | `EMPTY` | The expected list of type ids shall be empty  |
 | `<type-id>` | Id of the EI type  |
 
-## Function: ics_api_a1_get_job_status() ##
+## Function: ics_api_a1_get_job_status ##
 
-Test of GET '/A1-EI​/v1​/eitypes​/{eiTypeId}​/eijobs​/{eiJobId}​/status' and optional check of the returned status.
+Test of GET '/A1-EI/v1/eitypes/{eiTypeId}/eijobs/{eiJobId}/status' and optional check of the returned status.
 To test the response code only, provide the response code, type id and job id.
 To also test the response payload add the expected status.
 
@@ -1229,9 +965,9 @@ To also test the response payload add the expected status.
 | `<job-id>` | Id of the job  |
 | `<status>` | Expected status  |
 
-## Function: ics_api_a1_get_job() ##
+## Function: ics_api_a1_get_job ##
 
-Test of GET '/A1-EI​/v1​/eitypes​/{eiTypeId}​/eijobs​/{eiJobId}' and optional check of the returned job.
+Test of GET '/A1-EI/v1/eitypes/{eiTypeId}/eijobs/{eiJobId}' and optional check of the returned job.
 To test the response code only, provide the response code, type id and job id.
 To also test the response payload add the remaining parameters.
 
@@ -1248,9 +984,9 @@ To also test the response payload add the remaining parameters.
 | `<owner-id>` | Expected owner for the job  |
 | `<template-job-file>` | Path to a job template for job parameters of the job  |
 
-## Function: ics_api_a1_delete_job() ##
+## Function: ics_api_a1_delete_job ##
 
-Test of DELETE '/A1-EI​/v1​/eitypes​/{eiTypeId}​/eijobs​/{eiJobId}'.
+Test of DELETE '/A1-EI/v1/eitypes/{eiTypeId}/eijobs/{eiJobId}'.
 To test, provide all the specified parameters.
 
 | arg list |
@@ -1263,9 +999,9 @@ To test, provide all the specified parameters.
 | `<type-id>` | Id of the EI type  |
 | `<job-id>` | Id of the job  |
 
-## Function: ics_api_a1_put_job() ##
+## Function: ics_api_a1_put_job ##
 
-Test of PUT '/A1-EI​/v1​/eitypes​/{eiTypeId}​/eijobs​/{eiJobId}'.
+Test of PUT '/A1-EI/v1/eitypes/{eiTypeId}/eijobs/{eiJobId}'.
 To test, provide all the specified parameters.
 
 | arg list |
@@ -1281,7 +1017,7 @@ To test, provide all the specified parameters.
 | `<owner-id>` | Owner of the job  |
 | `<template-job-file>` | Path to a job template for job parameters of the job  |
 
-## Function: ics_api_edp_get_type_ids() ##
+## Function: ics_api_edp_get_type_ids ##
 
 Test of GET '/ei-producer/v1/eitypes' or '/data-producer/v1/info-types' depending on ics version and an optional check of the returned list of type ids.
 To test the response code only, provide the response code.
@@ -1297,7 +1033,7 @@ To also test the response payload add list of expected type ids (or EMPTY if the
 | `<type-id>` | Id of the type  |
 | `EMPTY` | The expected list of type ids shall be empty  |
 
-## Function: ics_api_edp_get_producer_status() ##
+## Function: ics_api_edp_get_producer_status ##
 
 Test of GET '/ei-producer/v1/eiproducers/{eiProducerId}/status' or '/data-producer/v1/info-producers/{infoProducerId}/status' depending on ics version and optional check of the returned status.
 To test the response code only, provide the response code and producer id.
@@ -1313,7 +1049,7 @@ To also test the response payload add the expected status.
 | `<producer-id>` | Id of the producer  |
 | `<status>` | The expected status string  |
 
-## Function: ics_api_edp_get_producer_ids() ##
+## Function: ics_api_edp_get_producer_ids ##
 
 Test of GET '/ei-producer/v1/eiproducers' and optional check of the returned producer ids.
 To test the response code only, provide the response.
@@ -1329,7 +1065,7 @@ To also test the response payload add the list of expected producer-ids (or EMPT
 | `<producer-id>` | Id of the producer  |
 | `EMPTY` | The expected list of type ids shall be empty  |
 
-## Function: ics_api_edp_get_producer_ids_2() ##
+## Function: ics_api_edp_get_producer_ids_2 ##
 
 Test of GET '/ei-producer/v1/eiproducers' or '/data-producer/v1/info-producers' depending on ics version and optional check of the returned producer ids.
 To test the response code only, provide the response.
@@ -1347,7 +1083,7 @@ To also test the response payload add the type (if any) and a list of expected p
 | `<producer-id>` | Id of the producer  |
 | `EMPTY` | The expected list of type ids shall be empty  |
 
-## Function: ics_api_edp_get_type() ##
+## Function: ics_api_edp_get_type ##
 
 Test of GET '/ei-producer/v1/eitypes/{eiTypeId}' and optional check of the returned type.
 To test the response code only, provide the response and the type-id.
@@ -1365,7 +1101,7 @@ To also test the response payload add a path to a job schema file and a list exp
 | `<producer-id>` | Id of the producer  |
 | `EMPTY` | The expected list of type ids shall be empty  |
 
-## Function: ics_api_edp_get_type_2() ##
+## Function: ics_api_edp_get_type_2 ##
 
 Test of GET '/ei-producer/v1/eitypes/{eiTypeId}' or '/data-producer/v1/info-types/{infoTypeId}' depending on ics version and optional check of the returned type.
 To test the response code only, provide the response and the type-id.
@@ -1382,7 +1118,7 @@ To also test the response payload add a path to a job schema file.
 | `<job-schema-file>` | Path to a job schema file  |
 | `EMPTY` | The expected list of type ids shall be empty  |
 
-## Function: ics_api_edp_put_type_2() ##
+## Function: ics_api_edp_put_type_2 ##
 
 Test of PUT '/ei-producer/v1/eitypes/{eiTypeId}' or '/data-producer/v1/info-types/{infoTypeId}' depending on ics version and optional check of the returned type.
 
@@ -1397,7 +1133,7 @@ Test of PUT '/ei-producer/v1/eitypes/{eiTypeId}' or '/data-producer/v1/info-type
 | `<job-schema-file>` | Path to a job schema file  |
 | `EMPTY` | The expected list of type ids shall be empty  |
 
-## Function: ics_api_edp_delete_type_2() ##
+## Function: ics_api_edp_delete_type_2 ##
 
 Test of DELETE '/ei-producer/v1/eitypes/{eiTypeId}' or '/data-producer/v1/info-types/{infoTypeId}' depending on ics version and optional check of the returned type.
 
@@ -1410,7 +1146,7 @@ Test of DELETE '/ei-producer/v1/eitypes/{eiTypeId}' or '/data-producer/v1/info-t
 | `<response-code>` | Expected http response code |
 | `<type-id>` | Id of the type  |
 
-## Function: ics_api_edp_get_producer() ##
+## Function: ics_api_edp_get_producer ##
 
 Test of GET '/ei-producer/v1/eiproducers/{eiProducerId}' and optional check of the returned producer.
 To test the response code only, provide the response and the producer-id.
@@ -1431,7 +1167,7 @@ To also test the response payload add the remaining parameters defining thee pro
 | `<schema-file>` | Path to a schema file  |
 | `EMPTY` | The expected list of type schema pairs shall be empty  |
 
-## Function: ics_api_edp_get_producer_2() ##
+## Function: ics_api_edp_get_producer_2 ##
 
 Test of GET '/ei-producer/v1/eiproducers/{eiProducerId}' or '/data-producer/v1/info-producers/{infoProducerId}' depending on ics version and optional check of the returned producer.
 To test the response code only, provide the response and the producer-id.
@@ -1450,7 +1186,7 @@ To also test the response payload add the remaining parameters defining thee pro
 | `<type-id>` | Id of the type  |
 | `EMPTY` | The expected list of types shall be empty  |
 
-## Function: ics_api_edp_delete_producer() ##
+## Function: ics_api_edp_delete_producer ##
 
 Test of DELETE '/ei-producer/v1/eiproducers/{eiProducerId}' or '/data-producer/v1/info-producers/{infoProducerId}' depending on ics version.
 To test, provide all parameters.
@@ -1464,7 +1200,7 @@ To test, provide all parameters.
 | `<response-code>` | Expected http response code |
 | `<producer-id>` | Id of the producer  |
 
-## Function: ics_api_edp_put_producer() ##
+## Function: ics_api_edp_put_producer ##
 
 Test of PUT '/ei-producer/v1/eiproducers/{eiProducerId}'.
 To test, provide all parameters. The list of type/schema pair may be empty.
@@ -1483,7 +1219,7 @@ To test, provide all parameters. The list of type/schema pair may be empty.
 | `<schema-file>` | Path to a schema file  |
 | `EMPTY` | The list of type/schema pairs is empty  |
 
-## Function: ics_api_edp_put_producer_2() ##
+## Function: ics_api_edp_put_producer_2 ##
 
 Test of PUT '/ei-producer/v1/eiproducers/{eiProducerId}' or '/data-producer/v1/info-producers/{infoProducerId}' depending on ics version.
 To test, provide all parameters. The list of type/schema pair may be empty.
@@ -1501,7 +1237,7 @@ To test, provide all parameters. The list of type/schema pair may be empty.
 | `<type-id>` | Id of the type  |
 | `NOTYPE` | The list of types is empty  |
 
-## Function: ics_api_edp_get_producer_jobs() ##
+## Function: ics_api_edp_get_producer_jobs ##
 
 Test of GET '/ei-producer/v1/eiproducers/{eiProducerId}/eijobs' and optional check of the returned producer job.
 To test the response code only, provide the response and the producer-id.
@@ -1522,7 +1258,7 @@ To also test the response payload add the remaining parameters.
 | `<template-job-file>` | Path to a job template file  |
 | `EMPTY` | The list of job/type/target/job-file tuples is empty  |
 
-## Function: ics_api_edp_get_producer_jobs_2() ##
+## Function: ics_api_edp_get_producer_jobs_2 ##
 
 Test of GET '/ei-producer/v1/eiproducers/{eiProducerId}/eijobs' or '/data-producer/v1/info-producers/{infoProducerId}/info-jobs' depending on ics version and optional check of the returned producer job.
 To test the response code only, provide the response and the producer-id.
@@ -1543,7 +1279,7 @@ To also test the response payload add the remaining parameters.
 | `<template-job-file>` | Path to a job template file  |
 | `EMPTY` | The list of job/type/target/job-file tuples is empty  |
 
-## Function: ics_api_service_status() ##
+## Function: ics_api_service_status ##
 
 Test of GET '/status'.
 
@@ -1555,7 +1291,7 @@ Test of GET '/status'.
 | --------- | ----------- |
 | `<response-code>` | Expected http response code |
 
-## Function: ics_api_idc_get_type_ids() ##
+## Function: ics_api_idc_get_type_ids ##
 
 Test of GET '/data-consumer/v1/info-types' and an optional check of the returned list of type ids.
 To test the response code only, provide the response code.
@@ -1571,7 +1307,7 @@ To also test the response payload add list of expected type ids (or EMPTY if the
 | `<type-id>` | Id of the Info type  |
 | `EMPTY` | The expected list of type ids shall be empty  |
 
-## Function: ics_api_idc_get_job_ids() ##
+## Function: ics_api_idc_get_job_ids ##
 
 Test of GET '/data-consumer/v1/info-jobs' and optional check of the array of returned job ids.
 To test the response code only, provide the response code parameter as well as a type id and an owner id.
@@ -1590,7 +1326,7 @@ To also test the response payload add the 'EMPTY' for an expected empty array or
 | `<job-id>` | Id of the expected job  |
 | `EMPTY` | The expected list of job id shall be empty  |
 
-## Function: ics_api_idc_get_job() ##
+## Function: ics_api_idc_get_job ##
 
 Test of GET '/data-consumer/v1/info-jobs/{infoJobId}' and optional check of the returned job.
 To test the response code only, provide the response code, type id and job id.
@@ -1609,9 +1345,9 @@ To also test the response payload add the remaining parameters.
 | `<owner-id>` | Expected owner for the job  |
 | `<template-job-file>` | Path to a job template for job parameters of the job  |
 
-## Function: ics_api_idc_put_job() ##
+## Function: ics_api_idc_put_job ##
 
-Test of PUT '​/data-consumer/v1/info-jobs/{infoJobId}'.
+Test of PUT '/data-consumer/v1/info-jobs/{infoJobId}'.
 To test, provide all the specified parameters.
 
 | arg list |
@@ -1628,9 +1364,9 @@ To test, provide all the specified parameters.
 | `<template-job-file>` | Path to a job template for job parameters of the job  |
 | `VALIIDATE` | Indicator to preform type validation at creation  |
 
-## Function: ics_api_idc_delete_job() ##
+## Function: ics_api_idc_delete_job ##
 
-Test of DELETE '/A1-EI​/v1​/eitypes​/{eiTypeId}​/eijobs​/{eiJobId}'.
+Test of DELETE '/A1-EI/v1/eitypes/{eiTypeId}/eijobs/{eiJobId}'.
 To test, provide all the specified parameters.
 
 | arg list |
@@ -1643,7 +1379,7 @@ To test, provide all the specified parameters.
 | `<type-id>` | Id of the type  |
 | `<job-id>` | Id of the job  |
 
-## Function: ics_api_idc_get_type() ##
+## Function: ics_api_idc_get_type ##
 
 Test of GET '/data-consumer/v1/info-types/{infoTypeId} and optional check of the returned schema.
 To test the response code only, provide the response code parameter as well as the type-id.
@@ -1659,7 +1395,7 @@ To also test the response payload add a path to the expected schema file.
 | `<type-id>` | Id of the Info type  |
 | `<schema-file>` | Path to a schema file to compare with the returned schema  |
 
-## Function: ics_api_idc_get_job_status() ##
+## Function: ics_api_idc_get_job_status ##
 
 Test of GET '/data-consumer/v1/info-jobs/{infoJobId}/status' and optional check of the returned status and timeout.
 To test the response code only, provide the response code and job id.
@@ -1676,7 +1412,7 @@ To also test the response payload add the expected status.
 | `<status>` | Expected status  |
 | `<timeout>` | Timeout |
 
-## Function: ics_api_idc_get_job_status2() ##
+## Function: ics_api_idc_get_job_status2 ##
 
 Test of GET '/data-consumer/v1/info-jobs/{infoJobId}/status' with returned producers and optional check of the returned status and timeout.
 To test the response code only, provide the response code and job id.
@@ -1697,7 +1433,7 @@ To also test the response payload add the expected status.
 | `<timeout>` | Timeout |
 
 
-## Function: ics_api_idc_get_subscription_ids() ##
+## Function: ics_api_idc_get_subscription_ids ##
 Test of GET '/data-consumer/v1/info-type-subscription' with the returned list of subscription ids
 
 | arg list |
@@ -1712,7 +1448,7 @@ Test of GET '/data-consumer/v1/info-type-subscription' with the returned list of
 | `<EMPTY>` | Indicated for empty list of subscription ids  |
 | `<subscription-id>` |Id of the subscription  |
 
-## Function: ics_api_idc_get_subscription() ##
+## Function: ics_api_idc_get_subscription ##
 Test of GET '/data-consumer/v1/info-type-subscription/{subscriptionId}' with the subscription information
 
 | arg list |
@@ -1727,7 +1463,7 @@ Test of GET '/data-consumer/v1/info-type-subscription/{subscriptionId}' with the
 | `<status-uri>` | Url for status notifications  |
 
 
-## Function: ics_api_idc_put_subscription() ##
+## Function: ics_api_idc_put_subscription ##
 Test of PUT '/data-consumer/v1/info-type-subscription/{subscriptionId}' with the subscription information
 
 | arg list |
@@ -1741,7 +1477,7 @@ Test of PUT '/data-consumer/v1/info-type-subscription/{subscriptionId}' with the
 | `<owner-id>` | Id of the owner  |
 | `<status-uri>` | Url for status notifications  |
 
-## Function: ics_api_idc_delete_subscription() ##
+## Function: ics_api_idc_delete_subscription ##
 Test of DELETE /data-consumer/v1/info-type-subscription/{subscriptionId}
 
 | arg list |
@@ -1754,7 +1490,7 @@ Test of DELETE /data-consumer/v1/info-type-subscription/{subscriptionId}
 | `<subscription-id>` |Id of the subscription  |
 
 
-## Function: ics_api_admin_reset() ##
+## Function: ics_api_admin_reset ##
 
 Test of GET '/status'.
 
@@ -1767,58 +1503,888 @@ Test of GET '/status'.
 | `<response-code>` | Expected http response code |
 | `<type>` | Type id, if the interface supports type in url |
 
-# Description of functions in gateway_api_functions.sh #
+## Function: ics_kube_pvc_reset ##
 
-## Function: use_gateway_http ##
+Admin reset to remove all data in ics; jobs, producers etc
+NOTE - only works in kubernetes and the pod should not be running
 
-Use http for all calls to the gateway. This is set by default.
 | arg list |
 |--|
 | None |
 
-## Function: use_gateway_https ##
-
-Use https for all calls to the gateway.
-| arg list |
-|--|
-| None |
+# Description of functions in kafkapc_api_functions.sh #
 
-## Function: set_gateway_debug ##
+## Function: use_kafkapc_http ##
 
-Set debug level logging in the gateway
+Use http for all calls to the KAFKAPC.
 | arg list |
 |--|
 | None |
 
-## Function: set_gateway_trace ##
+## Function: use_kafkapc_https ##
 
-Set debug level logging in the trace
+Use https for all calls to the KAFKAPC.
 | arg list |
 |--|
 | None |
 
-## Function: start_gateway ##
+## Function: start_kafkapc ##
 
-Start the the gateway container in docker or kube depending on start mode
+Start the KAFKAPC container in docker or kube depending on start mode
 | arg list |
 |--|
 | None |
 
-## Function: gateway_pms_get_status ##
+## Function: kafkapc_equal ##
 
-Sample test of pms api (status)
+Tests if a variable value in the KAFKAPC 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 'mrstub' dir for more details.
 | arg list |
 |--|
-| `<response-code>` |
+| `<variable-name> <target-value> [ <timeout-in-sec> ]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<variable-name>` | Variable name in the KAFKAPC  |
+| `<target-value>` | Target value for the variable  |
+| `<timeout-in-sec>` | Max time to wait for the variable to reach the target value  |
+
+## Function: kafkapc_api_reset ##
+
+Deep reset of KAFKAPC. Note that kafka itself is not affected, i.e. created topic still exist in kafka.
+| arg list |
+|--|
+| None |
+
+## Function: kafkapc_api_create_topic ##
+
+Create a topic in kafka via kafkapc.
+| `<response-code> <topic-name>  <mime-type>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Http response code  |
+| `<topic-name>` | Name of the topic  |
+| `<mime-type>` | Mime type of the data to send to the topic. Data on the topic is expected to be of this type  |
+
+## Function: kafkapc_api_get_topic ##
+
+Create a from kafkapc.
+| `<response-code> <topic-name>  <mime-type>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Http response code  |
+| `<topic-name>` | Name of the topic  |
+| `<mime-type>` | Mime type of the topic  |
+
+## Function: kafkapc_api_start_sending ##
+
+Start sending msg from the msg queue to kafka for a topic.
+| `<response-code> <topic-name>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Http response code  |
+| `<topic-name>` | Name of the topic  |
+
+## Function: kafkapc_api_start_receiving ##
+
+Start receiving msg from a kafka topic to the msg queue in kafkapc.
+| `<response-code> <topic-name>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Http response code  |
+| `<topic-name>` | Name of the topic  |
+
+## Function: kafkapc_api_stop_sending ##
+
+Stop sending msg from the msg queue to kafka for a topic.
+| `<response-code> <topic-name>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Http response code  |
+| `<topic-name>` | Name of the topic  |
+
+## Function: kafkapc_api_stop_receiving ##
+
+Stop receiving msg from a kafka topic to the msg queue in kafkapc.
+| `<response-code> <topic-name>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Http response code  |
+| `<topic-name>` | Name of the topic  |
+
+## Function: kafkapc_api_post_msg ##
+
+Send a message on a topic.
+| arg list |
+|--|
+| `<response-code> <topic> <mime-type> <msg>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Http response code  |
+| `<topic>` | Topic name  |
+| `<mime-type>` | Mime type of the msg  |
+| `<msg>` | String msg to send  |
+
+## Function: kafkapc_api_get_msg ##
+
+Get a message on a topic.
+| arg list |
+|--|
+| `<response-code> <topic>  ([ <mime-type>  <msg> ] | NOMSG )` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Http response code  |
+| `<topic>` | Topic name  |
+| `<mime-type>` | Mime type of the msg  |
+| `<msg>` | String msg to receive  |
+| `NOMSG` | Indicated for no msg  |
+
+## Function: kafkapc_api_post_msg_from_file ##
+
+Send a message in a file on a topic.
+| arg list |
+|--|
+| `<response-code> <topic> <mime-type> <file>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Http response code  |
+| `<topic>` | Topic name  |
+| `<mime-type>` | Mime type of the msg  |
+| `<file>` | Filepath to the string msg to send  |
+
+## Function: kafkapc_api_get_msg_from_file ##
+
+Get a message on a topic.
+| arg list |
+|--|
+| `<response-code> <topic>  <mime-type>  <file> ` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Http response code  |
+| `<topic>` | Topic name  |
+| `<mime-type>` | Mime type of the msg  |
+| `<file>` | Filepath to the string msg to receive  |
+
+## Function: kafkapc_api_generate_json_payload_file ##
+
+Create json file with dummy data for payload.
+| arg list |
+|--|
+| `<size-in-kb> <filename>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<size-in-kb>` | Generated size in kb  |
+| `<filename>` | Path to output file  |
+
+## Function: kafkapc_api_generate_text_payload_file ##
+
+Create file with dummy text data for payload.
+| arg list |
+|--|
+| `<size-in-kb> <filename>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<size-in-kb>` | Generated size in kb  |
+| `<filename>` | Path to output file  |
+
+# Description of functions in kubeproxy_api_functions.sh #
+
+## Function: use_kube_proxy_http ##
+
+Use http for all proxy requests. Note that this only applicable to the actual proxy request, the proxied protocol can still be http and https.
+| arg list |
+|--|
+| None |
+
+## Function: use_kube_proxy_https ##
+
+Use https for all proxy requests. Note that this only applicable to the actual proxy request, the proxied protocol can still be http and https.
+| arg list |
+|--|
+| None |
+
+## Function: start_kube_proxy ##
+
+Start the kube proxy container in kube. This proxy enabled the test env to access all services and pods in a kube cluster.
+No proxy is started if the function is called in docker mode.
+| arg list |
+|--|
+| 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 ##
+
+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.
+| arg list |
+|--|
+| None |
+
+## Function: use_mr_https ##
+
+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.
+| arg list |
+|--|
+| None |
+
+## Function: start_mr ##
+
+Start the Message Router stub interface container in docker or kube depending on start mode
+| arg list |
+|--|
+| None |
+
+## Function: dmaap_api_print_topics ##
+
+Prints the current list of topics in DMAAP MR
+
+| arg list |
+|--|
+| None |
+
+## Function: mr_equal ##
+
+Tests if a variable value in the Message Router (MR) 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 'mrstub' dir for more details.
+| arg list |
+|--|
+| `<variable-name> <target-value> [ <timeout-in-sec> ]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<variable-name>` | Variable name in the MR  |
+| `<target-value>` | Target value for the variable  |
+| `<timeout-in-sec>` | Max time to wait for the variable to reach the target value  |
+
+## Function: mr_greater ##
+
+Tests if a variable value in the Message Router (MR) simulator is greater than a target value.
+Without the timeout, the test sets pass or fail immediately depending on if the variable is 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 greater than the target value or not.
+See the 'mrstub' dir for more details.
+| arg list |
+|--|
+| `<variable-name> <target-value> [ <timeout-in-sec> ]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<variable-name>` | Variable name in the MR  |
+| `<target-value>` | Target value for the variable  |
+| `<timeout-in-sec>` | Max time to wait for the variable to become grater than the target value  |
+
+## Function: mr_read ##
+
+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.
+See the 'mrstub' dir for more details.
+| arg list |
+|--|
+| `<variable-name>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<variable-name>` | Variable name in the MR  |
+
+## Function: mr_print ##
+
+Prints the value of a variable in the Message Router (MR) simulator.
+See the 'mrstub' dir for more details.
+| arg list |
+|--|
+| `<variable-name>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<variable-name>` | Variable name in the MR  |
+
+## Function: mr_api_send_json ##
+
+Send json to topic in mr-stub.
+| arg list |
+|--|
+| `<topic-url> <json-msg>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<topic-url>` | Topic url  |
+| `<json-msg>` | Json msg as string  |
+
+## Function: mr_api_send_text ##
+
+Send text to topic in mr-stub.
+| arg list |
+|--|
+| `<topic-url> <text-msg>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<topic-url>` | Topic url  |
+| `<text-msg>` | Text (string) msg  |
+
+
+
+## Function: mr_api_send_json_file ##
+
+Send json to topic in mr-stub.
+| arg list |
+|--|
+| `<topic-url> <json-file>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<topic-url>` | Topic url  |
+| `<json-file>` | Path to file with json msg as string  |
+
+## Function: mr_api_send_text_file ##
+
+Send text to topic in mr-stub.
+| arg list |
+|--|
+| `<topic-url> <text-file>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<topic-url>` | Topic url  |
+| `<text-file>` | Path to file with text msg as string  |
+
+## Function: mr_api_generate_json_payload_file ##
+
+Create json file with dummy data for payload.
+| arg list |
+|--|
+| `<size-in-kb> <filename>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<size-in-kb>` | Generated size in kb  |
+| `<filename>` | Path to output file  |
+
+## Function: mr_api_generate_text_payload_file ##
+
+Create file with dummy text data for payload.
+| arg list |
+|--|
+| `<size-in-kb> <filename>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<size-in-kb>` | Generated size in kb  |
+| `<filename>` | Path to output file  |
+
+# Description of functions in ngw_api_functions.sh #
+
+## Function: use_gateway_http ##
+
+Use http for all calls to the gateway. This is set by default.
+| arg list |
+|--|
+| None |
+
+## Function: use_gateway_https ##
+
+Use https for all calls to the gateway.
+| arg list |
+|--|
+| None |
+
+## Function: set_gateway_debug ##
+
+Set debug level logging in the gateway
+| arg list |
+|--|
+| None |
+
+## Function: set_gateway_trace ##
+
+Set debug level logging in the trace
+| arg list |
+|--|
+| None |
+
+## Function: start_gateway ##
+
+Start the the gateway container in docker or kube depending on start mode
+| arg list |
+|--|
+| None |
+
+## Function: gateway_pms_get_status ##
+
+Sample test of pms api (status)
+Only response code tested - not payload
+| arg list |
+|--|
+| `<response-code>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+
+## Function: gateway_ics_get_types ##
+
+Sample test of ics api (get types)
+Only response code tested - not payload
+| arg list |
+|--|
+| `<response-code>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+
+# Description of functions in pa_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.
+For api function in version 2, an url prefix is added if configured.
+
+## Function: use_agent_rest_http ##
+
+Use http for all API calls to the Policy Agent. This is the default.
+| arg list |
+|--|
+| None |
+
+## Function: use_agent_rest_https ##
+
+Use https for all API calls to the Policy Agent.
+| arg list |
+|--|
+| None |
+
+## Function: use_agent_dmaap_http ##
+
+Send and recieve all API calls to the Policy Agent over Dmaap via the MR over http.
+| arg list |
+|--|
+| None |
+
+## Function: use_agent_dmaap_https ##
+
+Send and recieve all API callss to the Policy Agent over Dmaap via the MR over https.
+| arg list |
+|--|
+| None |
+
+## Function: start_policy_agent ##
+
+Start the Policy Agent container or corresponding kube resources depending on docker/kube mode.
+| arg list |
+|--|
+| `<logfile-prefix>` |
+| (docker) `PROXY\|NOPROXY <config-file>` |
+| (kube) `PROXY\|NOPROXY <config-file> [ <data-file> ]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `PROXY` | Configure with http proxy, if proxy is started  |
+| `NOPROXY` | Configure without http proxy  |
+| `<config-file>`| Path to application.yaml  |
+| `<data-file>` | Optional path to application_configuration.json  |
+
+## Function: stop_policy_agent ##
+
+Stop the pms container (docker) or scale it to zero (kubernetes).
+| arg list |
+|--|
+|  None |
+
+## Function: start_stopped_policy_agent ##
+
+Start a previousely stopped pms container (docker) or scale it to 1 (kubernetes).
+| arg list |
+|--|
+|  None |
+
+## Function: prepare_consul_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')
+| arg list |
+|--|
+| `SDNC|NOSDNC <output-file>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `SDNC` | Configure with controller |
+| `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 ##
+
+Load the config into a config map (kubernetes only).
+| arg list |
+|--|
+|  `<data-file>` |
+
+| parameter | description |
+| --------- | ----------- |
+|  `<data-file>` | Path to application_configuration.json  |
+
+## Function: set_agent_debug ##
+
+Configure the Policy Agent log on debug level. The Policy Agent must be running.
+| arg list |
+|--|
+| None |
+
+## Function: set_agent_trace ##
+
+Configure the Policy Agent log on trace level. The Policy Agent must be running.
+| arg list |
+|--|
+| None |
+
+## Function: use_agent_retries ##
+
+Configure the Policy Agent 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 ##
+
+Check the Policy Agent log for any warnings and errors and print the count of each.
+| arg list |
+|--|
+| None |
+
+## Function: api_equal ##
+
+Tests if the array length of a json array in the Policy Agent 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.
+
+| arg list |
+|--|
+| `<variable-name> <target-value> [ <timeout-in-sec> ]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<variable-name>` | Relative url. Example 'json:policy_types' - checks the json array length of the url /policy_types  |
+| `<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 ##
+
+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.
+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.
+
+| arg list |
+|--|
+| `<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>]*]` |
+
+| arg list V2 |
+|--|
+| `<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>]*]` |
 
 | parameter | description |
 | --------- | ----------- |
 | `<response-code>` | Expected http response code |
+| `<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  |
+| `<policy-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-id>` |  Id of the policy |
+| `EMPTY` |  Indicate for the special empty policy type |
+| `transient` |  Transient, true or false |
+| `notification-url` |  Url for notifications |
+| `<template-file>` |  Path to the template file for the policy (same template used when creating the policy) |
 
-## Function: gateway_ics_get_types ##
+## Function: 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.
+To test the contents of the returned json payload, add a path to the template file used when creating the policy.
+
+| arg list |
+|--|
+| `<response-code>  <policy-id> [<template-file>]` |
+
+| arg list V2|
+|--|
+| `<response-code> <policy-id> [ <template-file> <service-name> <ric-id> <policytype-id>\|NOTYPE <transient> <notification-url>\|NOURL ]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<policy-id>` |  Id of the policy |
+| `<template-file>` |  Path to the template file for the policy (same template used when creating the policy) |
+| `<service-id>` | Id of the service  |
+| `<ric-id>` | Id of the ric  |
+| `<policy-type-id>` |  Id of the policy type |
+| `NOTYPE` | Indicator that no type id is provided  |
+| `transient` |  Transient, true or false |
+| `notification-url` |  Url for notifications |
+
+## Function: 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).
+
+| arg list |
+|--|
+| `<response-code> <service-name> <ric-id> <policytype-id> <policy-id> <transient> <template-file> [<count>]` |
+
+| arg list V2 |
+|--|
+| `<response-code> <service-name> <ric-id> <policytype-id>\|NOTYPE <policy-id> <transient>\|NOTRANSIENT <notification-url>\|NOURL <template-file> [<count>]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<service-id>` | Id of the service  |
+| `<ric-id>` | Id of the ric  |
+| `<policy-type-id>` |  Id of the policy type |
+| `<policy-id>` |  Id of the policy. This value shall be a numeric value if more than one policy shall be created |
+| `transient>` |  Transient 'true' or 'false'. 'NOTRANSIENT' can be used to indicate using the default value (no transient value provided) |
+| `notification-url` |  Url for notifications |
+|`NOURL`| Indicator for no url |
+| `<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 ##
+
+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'.
+
+## Function: 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.
+
+| arg list |
+|--|
+| `<response-code> <service-name> <ric-id-base> <number-of-rics> <policytype-id> <policy-start-id> <transient> <template-file> <count-per-ric> <number-of-threads>`
+
+| arg list |
+|--|
+| `<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>`
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<service-id>` | Id of the service  |
+| `<ric-id-base>` | The base id of the rics, ie ric id without the sequence number. The sequence number is added during processing  |
+| `<number-of-rics>` | The number of rics, assuming the first index is '1'. The index is added to the 'ric-id-base' id  |
+| `<policy-type-id>` |  Id of the policy type |
+| `<policy-start-id>` |  Id of the policy. This value shall be a numeric value and will be the id of the first policy |
+| `transient>` |  Transient 'true' or 'false'. 'NOTRANSIENT' can be used to indicate using the default value (no transient value provide) |
+| `notification-url` |  Url for notifications |
+| `<template-file>` |  Path to the template file for the policy |
+| `<count-per-ric>` |  Number of policies per ric |
+| `<number-of-threads>` |  Number of threads (processes) to run in parallel |
+
+## Function: 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.
+
+| arg list |
+|--|
+| `<response-code> <policy-id> [<count>]`
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<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 ##
+
+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'.
+
+## Function: 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.
+
+| arg list |
+|--|
+| `<response-code> <ric-id-base> <number-of-rics> <policy-start-id> <count-per-ric> <number-of-threads>`
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<ric-id-base>` | The base id of the rics, ie ric id without the sequence number. The sequence number is added during processing  |
+| `<number-of-rics>` | The number of rics, assuming the first index is '1'  |
+| `<policy-start-id>` |  Id of the policy. This value shall be a numeric value and will be the id of the first policy |
+| `<count-per-ric>` |  Number of policies per ric |
+| `<number-of-threads>` |  Number of threads (processes) to run in parallel |
+
+## Function: 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.
+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.
+
+| arg list |
+|--|
+| `<response-code> <ric-id>\|NORIC <service-id>\|NOSERVICE <type-id>\|NOTYPE ([<policy-instance-id]*\|NOID)` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<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: 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: 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: 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: 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: 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: api_get_status ##
+
+Test of GET /status or V2 GET /status
 
-Sample test of ics api (get types)
-Only response code tested - not payload
 | arg list |
 |--|
 | `<response-code>` |
@@ -1827,131 +2393,155 @@ Only response code tested - not payload
 | --------- | ----------- |
 | `<response-code>` | Expected http response code |
 
-# Description of functions in http_proxy_api_functions.sh #
+## Function: api_get_ric ##
 
-## Function: use_http_proxy_http ##
+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.
 
-Use http for all proxy requests. Note that this only applicable to the actual proxy request, the proxied protocol can still be http and https.
 | arg list |
 |--|
-| None |
+| `<reponse-code> <managed-element-id> [<ric-id>]` |
 
-## Function: use_http_proxy_https ##
+| 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 |
 
-Use https for all proxy requests. Note that this only applicable to the actual proxy request, the proxied protocol can still be http and https.
-| arg list |
-|--|
-| None |
+## Function: api_get_rics ##
 
-## Function: start_http_proxy ##
+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_........."`
 
-Start the http proxy container in docker or kube depending on running mode.
 | arg list |
 |--|
-| None |
+| `<reponse-code> <policy-type-id>\|NOTYPE [<space-separate-string-of-ricinfo>]` |
 
-# Description of functions in kube_proxy_api_functions.sh #
+| 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: use_kube_proxy_http ##
+## Function: api_put_service ##
 
-Use http for all proxy requests. Note that this only applicable to the actual proxy request, the proxied protocol can still be http and https.
+Test of PUT '/service' or V2 PUT '/service'.
 | arg list |
 |--|
-| None |
+| `<response-code>  <service-name> <keepalive-timeout> <callbackurl>` |
 
-## Function: use_kube_proxy_https ##
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<service-name>` |  Service name |
+| `<keepalive-timeout>` |  Timeout value |
+| `<callbackurl>` |  Callback url |
 
-Use https for all proxy requests. Note that this only applicable to the actual proxy request, the proxied protocol can still be http and https.
-| arg list |
-|--|
-| None |
+## Function: api_get_services ##
 
-## Function: start_kube_proxy ##
+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.
 
-Start the kube proxy container in kube. This proxy enabled the test env to access all services and pods in a kube cluster.
-No proxy is started if the function is called in docker mode.
 | arg list |
 |--|
-| None |
+| `<response-code> [ (<query-service-name> <target-service-name> <keepalive-timeout> <callbackurl>) \| (NOSERVICE <target-service-name> <keepalive-timeout> <callbackurl> [<target-service-name> <keepalive-timeout> <callbackurl>]* )]` |
 
-# Description of functions in mr_api_functions.sh #
+| 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: use_mr_http ##
+## Function: api_get_service_ids ##
+
+Test of GET '/services' or V2 GET /'v2/services'. Only check of service ids.
 
-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.
 | arg list |
 |--|
-| None |
+| `<response-code> [<service-name>]*` |
 
-## Function: use_mr_https ##
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<service-name>` |  Service name |
 
-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.
-| arg list |
-|--|
-| None |
+## Function: api_delete_services ##
 
-## Function: start_mr ##
+Test of DELETE '/services' or V2 DELETE '/v2/services/{serviceId}'
 
-Start the Message Router stub interface container in docker or kube depending on start mode
 | arg list |
 |--|
-| None |
+| `<response-code> [<service-name>]*` |
 
-## Function: mr_equal ##
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<service-name>` |  Service name |
+
+## Function: api_put_services_keepalive ##
+
+Test of PUT '/services/keepalive' or V2 PUT '/v2/services/{service_id}/keepalive'
 
-Tests if a variable value in the Message Router (MR) 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 'mrstub' dir for more details.
 | arg list |
 |--|
-| `<variable-name> <target-value> [ <timeout-in-sec> ]` |
+| `<response-code> <service-name>` |
 
 | parameter | description |
 | --------- | ----------- |
-| `<variable-name>` | Variable name in the MR  |
-| `<target-value>` | Target value for the variable  |
-| `<timeout-in-sec>` | Max time to wait for the variable to reach the target value  |
+| `<response-code>` | Expected http response code |
+| `<service-name>` |  Service name |
 
-## Function: mr_greater ##
+## Function: api_put_configuration ##
+
+Test of PUT '/v2/configuration'
 
-Tests if a variable value in the Message Router (MR) simulator is greater than a target value.
-Without the timeout, the test sets pass or fail immediately depending on if the variable is 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 greater than the target value or not.
-See the 'mrstub' dir for more details.
 | arg list |
 |--|
-| `<variable-name> <target-value> [ <timeout-in-sec> ]` |
+| `<response-code> <config-file>` |
 
 | parameter | description |
 | --------- | ----------- |
-| `<variable-name>` | Variable name in the MR  |
-| `<target-value>` | Target value for the variable  |
-| `<timeout-in-sec>` | Max time to wait for the variable to become grater than the target value  |
+| `<response-code>` | Expected http response code |
+| `<config-file>` |  Path json config file |
 
-## Function: mr_read ##
+## Function: api_get_configuration ##
+
+Test of GET '/v2/configuration'
 
-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.
-See the 'mrstub' dir for more details.
 | arg list |
 |--|
-| `<variable-name>` |
+| `<response-code> [<config-file>]` |
 
 | parameter | description |
 | --------- | ----------- |
-| `<variable-name>` | Variable name in the MR  |
+| `<response-code>` | Expected http response code |
+| `<config-file>` |  Path json config file to compare the retrieved config with |
 
-## Function: mr_print ##
+## Function: pms_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
 
-Prints the value of a variable in the Message Router (MR) simulator.
-See the 'mrstub' dir for more details.
 | arg list |
 |--|
-| `<variable-name>` |
+| None |
 
-| parameter | description |
-| --------- | ----------- |
-| `<variable-name>` | Variable name in the MR  |
 
 # Description of functions in prodstub_api_functions.sh #
 
@@ -1976,7 +2566,7 @@ Start the Producer stub container in docker or kube depending on start mode
 |--|
 | None |
 
-## Function: prodstub_arm_producer() ##
+## Function: prodstub_arm_producer ##
 
 Preconfigure the prodstub with a producer. The producer supervision response code is optional, if not given the response code will be set to 200.
 
@@ -1990,7 +2580,7 @@ Preconfigure the prodstub with a producer. The producer supervision response cod
 | `<producer-id>` | Id of the producer  |
 | `<forced_response_code>` | Forced response code for the producer callback url |
 
-## Function: prodstub_arm_job_create() ##
+## Function: prodstub_arm_job_create ##
 
 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.
 
@@ -2004,7 +2594,7 @@ Preconfigure the prodstub with a job or update an existing job. Optional create/
 | `<job-id>` | Id of the job  |
 | `<forced_response_code>` | Forced response code for the create callback url |
 
-## Function: prodstub_arm_job_delete() ##
+## Function: prodstub_arm_job_delete ##
 
 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.
 
@@ -2018,7 +2608,7 @@ Preconfigure the prodstub with a job. Optional delete job response code, if not
 | `<job-id>` | Id of the job  |
 | `<forced_response_code>` | Forced response code for the delete callback url |
 
-## Function: prodstub_arm_type() ##
+## Function: prodstub_arm_type ##
 
 Preconfigure the prodstub with a type for a producer. Can be called multiple times to add more types.
 
@@ -2032,7 +2622,7 @@ Preconfigure the prodstub with a type for a producer. Can be called multiple tim
 | `<producer-id>` | Id of the producer  |
 | `<type-id>` | Id of the type  |
 
-## Function: prodstub_disarm_type() ##
+## Function: prodstub_disarm_type ##
 
 Remove a type for the producer in the rodstub. Can be called multiple times to remove more types.
 
@@ -2046,7 +2636,7 @@ Remove a type for the producer in the rodstub. Can be called multiple times to r
 | `<producer-id>` | Id of the producer  |
 | `<type-id>` | Id of the type  |
 
-## Function: prodstub_check_jobdata() ##
+## Function: prodstub_check_jobdata ##
 
 Check a job in the prodstub towards the list of provided parameters.
 
@@ -2064,7 +2654,7 @@ Check a job in the prodstub towards the list of provided parameters.
 | `<job-owner>` | Id of the job owner  |
 | `<template-job-file>` | Path to a job template file  |
 
-## Function: prodstub_check_jobdata_2() ##
+## Function: prodstub_check_jobdata_2 ##
 
 Check a job in the prodstub towards the list of provided parameters.
 
@@ -2082,7 +2672,7 @@ Check a job in the prodstub towards the list of provided parameters.
 | `<job-owner>` | Id of the job owner  |
 | `<template-job-file>` | Path to a job template file  |
 
-## Function: prodstub_check_jobdata_3() ##
+## Function: prodstub_check_jobdata_3 ##
 
 Check a job in the prodstub towards the list of provided parameters.
 
@@ -2100,7 +2690,7 @@ Check a job in the prodstub towards the list of provided parameters.
 | `<job-owner>` | Id of the job owner  |
 | `<template-job-file>` | Path to a job template file  |
 
-## Function: prodstub_delete_jobdata() ##
+## Function: prodstub_delete_jobdata ##
 
 Delete the job parameters, job data, for a job.
 
@@ -2130,7 +2720,7 @@ With the timeout, the test waits up to the timeout seconds before setting pass o
 | `<target-value>` | Target value for the variable  |
 | `<timeout-in-sec>` | Max time to wait for the variable to reach the target value  |
 
-# Description of functions in rapp_catalogue_api_function.sh #
+# Description of functions in rc_api_function.sh #
 
 ## Function: use_rapp_catalogue_http ##
 
@@ -2169,7 +2759,7 @@ See the 'cr' dir for more details.
 | `<target-value>` | Target value for the variable  |
 | `<timeout-in-sec>` | Max time to wait for the variable to reach the target value  |
 
-## Function: rapp_cat_api_get_services() ##
+## Function: rapp_cat_api_get_services ##
 
 Check all registered services.
 
@@ -2186,7 +2776,7 @@ Check all registered services.
 | `<description>` | Description of the service  |
 | `EMPTY` | Indicator for an empty list  |
 
-## Function: rapp_cat_api_put_service() ##
+## Function: rapp_cat_api_put_service ##
 
 Register a services.
 
@@ -2202,7 +2792,7 @@ Register a services.
 | `<display-name>` | Dislay name of the service  |
 | `<description>` | Description of the service  |
 
-## Function: rapp_cat_api_get_service() ##
+## Function: rapp_cat_api_get_service ##
 
 Check a registered service.
 
@@ -2218,7 +2808,7 @@ Check a registered service.
 | `<display-name>` | Dislay name of the service  |
 | `<description>` | Description of the service  |
 
-## Function: rapp_cat_api_delete_service() ##
+## Function: rapp_cat_api_delete_service ##
 
 Check a registered service.
 
@@ -2231,7 +2821,7 @@ Check a registered service.
 | `<response-code>` | Expected http response code |
 | `<service-id>` | Id of the service  |
 
-# Description of functions in ricsimulator_api_functions.sh #
+# Description of functions in ricsim_api_functions.sh #
 
 The functions below only use the admin interface of the simulator, no usage of the A1 interface.
 
@@ -2413,6 +3003,145 @@ The intention is to delay responses on the A1 interface. Setting remains until r
 | `<ric-id>` |  Id of the ric |
 | `<delay-in-seconds>` |  Delay in seconds. If omitted, the delay is removed |
 
+# Description of functions in sdnc_api_functions.sh #
+
+The file contains a selection of the possible API tests towards the SDNC (a1-controller)
+
+## Function: use_sdnc_http ##
+
+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.
+| arg list |
+|--|
+| None |
+
+## Function: use_sdnc_https ##
+
+Use https for all API calls towards the SDNC A1 Controller. Note that this function shall be called before preparing the config for Consul.
+| arg list |
+|--|
+| None |
+
+## Function: start_sdnc ##
+
+Start the SDNC A1 Controller container and its database container
+| arg list |
+|--|
+| None |
+
+## Function: stop_sdnc ##
+
+Stop the SDNC A1 Controller container and its database container
+| arg list |
+|--|
+| None |
+
+## Function: start_stopped_sdnc ##
+
+Start a previously stopped SDNC
+| arg list |
+|--|
+| None |
+
+## Function: check_sdnc_logs ##
+
+Check the SDNC log for any warnings and errors and print the count of each.
+| arg list |
+|--|
+| None |
+
+## Function: controller_api_get_A1_policy_ids ##
+
+Test of GET policy ids towards OSC or STD type simulator.
+To test response code only, provide the response code, 'OSC' + policy type or 'STD'
+To test the response payload, include the ids of the expexted response.
+
+| arg list |
+|--|
+| `<response-code> (OSC <ric-id> <policy-type-id> [ <policy-id> [<policy-id>]* ]) \| ( STD <ric-id> [ <policy-id> [<policy-id>]* ]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `OSC` |  Indicator of status of Non-Standarized OSC A1 |
+| `<ric-id>` | Id of the ric  |
+| `policy-type-id>` |  Id of the policy type |
+| `<policy-id>` |  Id of the policy |
+| `STD` |  Indicator of status of Standarized A1 |
+
+## Function: controller_api_get_A1_policy_type ##
+
+Test of GET a policy type (OSC only)
+
+| arg list |
+|--|
+| `<response-code> OSC <ric-id> <policy-type-id> [<policy-type-file>]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `OSC` |  Indicator of status of Non-Standarized OSC A1 |
+| `<ric-id>` | Id of the ric  |
+| `policy-type-id>` |  Id of the policy type |
+| `policy-type-file>` |  Optional schema file to compare the returned type with |
+
+## Function: controller_api_delete_A1_policy ##
+
+Deletes a policy instance
+
+| arg list |
+|--|
+| `(STD <ric-id> <policy-id>) \| (OSC <ric-id> <policy-type-id> <policy-id>)` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `STD` |  Indicator of status of Standarized A1 |
+| `<ric-id>` | Id of the ric  |
+| `<policy-id>` |  Id of the policy |
+| `policy-type-id>` |  Id of the policy type |
+| `OSC` |  Indicator of status of Non-Standarized OSC A1 |
+| `policy-type-file>` |  Optional schema file to compare the returned type with |
+
+## Function: controller_api_put_A1_policy ##
+
+Creates a policy instance
+
+| arg list |
+|--|
+| `<response-code> (STD <ric-id> <policy-id> <template-file> ) \| (OSC <ric-id> <policy-type-id> <policy-id> <template-file>)` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `STD` |  Indicator of status of Standarized A1 |
+| `<ric-id>` | Id of the ric  |
+| `<policy-id>` |  Id of the policy |
+| `<template-file>` |  Path to the template file of the policy|
+| `OSC` |  Indicator of status of Non-Standarized OSC A1 |
+| `<policy-type-id>` |  Id of the policy type |
+
+## Function: controller_api_get_A1_policy_status ##
+
+Checks the status of a policy
+
+ arg list |
+|--|
+| `<response-code> (STD <ric-id> <policy-id> <enforce-status> [<reason>]) \| (OSC <ric-id> <policy-type-id> <policy-id> <instance-status> <has-been-deleted>)` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `STD` |  Indicator of status of Standarized A1 |
+| `<ric-id>` | Id of the ric  |
+| `<policy-id>` |  Id of the policy |
+| `<enforce-status>` |  Enforcement status |
+| `<reason>` |  Optional reason |
+| `OSC` |  Indicator of status of Non-Standarized OSC A1 |
+| `<policy-type-id>` |  Id of the policy type |
+| `<instance-status>` |  Instance status |
+| `<has-been-deleted>` |  Deleted status, true or false |
+
+
 ## License
 
 Copyright (C) 2020 Nordix Foundation. All rights reserved.
diff --git a/test/common/chartmus_api_functions.sh b/test/common/chartmus_api_functions.sh
new file mode 100644 (file)
index 0000000..a9f09c0
--- /dev/null
@@ -0,0 +1,316 @@
+#!/bin/bash
+
+#  ============LICENSE_START===============================================
+#  Copyright (C) 2021 Nordix Foundation. All rights reserved.
+#  ========================================================================
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#  ============LICENSE_END=================================================
+#
+
+# This is a script that contains container/service management functions and test functions for Chartmuseum
+
+
+################ Test engine functions ################
+
+# Create the image var used during the test
+# arg: <image-tag-suffix> (selects staging, snapshot, release etc)
+# <image-tag-suffix> is present only for images with staging, snapshot,release tags
+__CHARTMUS_imagesetup() {
+       __check_and_create_image_var CHARTMUS "CHART_MUS_IMAGE" "CHART_MUS_IMAGE_BASE" "CHART_MUS_IMAGE_TAG" REMOTE_OTHER "$CHART_MUS_DISPLAY_NAME"
+}
+
+# Pull image from remote repo or use locally built image
+# arg: <pull-policy-override> <pull-policy-original>
+# <pull-policy-override> Shall be used for images allowing overriding. For example use a local image when test is started to use released images
+# <pull-policy-original> Shall be used for images that does not allow overriding
+# Both var may contain: 'remote', 'remote-remove' or 'local'
+__CHARTMUS_imagepull() {
+       __check_and_pull_image $2 "$CHART_MUS_DISPLAY_NAME" $CHART_MUS_APP_NAME CHART_MUS_IMAGE
+}
+
+# Build image (only for simulator or interfaces stubs owned by the test environment)
+# arg: <image-tag-suffix> (selects staging, snapshot, release etc)
+# <image-tag-suffix> is present only for images with staging, snapshot,release tags
+__CHARTMUS_imagebuild() {
+       echo -e $RED" Image for app CHARTMUS shall never be built"$ERED
+}
+
+# Generate a string for each included image using the app display name and a docker images format string
+# If a custom image repo is used then also the source image from the local repo is listed
+# arg: <docker-images-format-string> <file-to-append>
+__CHARTMUS_image_data() {
+       echo -e "$CHART_MUS_DISPLAY_NAME\t$(docker images --format $1 $CHART_MUS_IMAGE)" >>   $2
+       if [ ! -z "$CHART_MUS_IMAGE_SOURCE" ]; then
+               echo -e "-- source image --\t$(docker images --format $1 $CHART_MUS_IMAGE_SOURCE)" >>   $2
+       fi
+}
+
+# Scale kubernetes resources to zero
+# All resources shall be ordered to be scaled to 0, if relevant. If not relevant to scale, then do no action.
+# This function is called for apps fully managed by the test script
+__CHARTMUS_kube_scale_zero() {
+       __kube_scale_all_resources $KUBE_SIM_NAMESPACE autotest CHARTMUS
+}
+
+# Scale kubernetes resources to zero and wait until this has been accomplished, if relevant. If not relevant to scale, then do no action.
+# This function is called for prestarted apps not managed by the test script.
+__CHARTMUS_kube_scale_zero_and_wait() {
+       echo -e $RED" CHARTMUS app is not scaled in this state"$ERED
+}
+
+# Delete all kube resouces for the app
+# This function is called for apps managed by the test script.
+__CHARTMUS_kube_delete_all() {
+       __kube_delete_all_resources $KUBE_SIM_NAMESPACE autotest CHARTMUS
+}
+
+# Store docker logs
+# This function is called for apps managed by the test script.
+# args: <log-dir> <file-prexix>
+__CHARTMUS_store_docker_logs() {
+       if [ $RUNMODE == "KUBE" ]; then
+               kubectl  logs -l "autotest=CHARTMUS" -n $KUBE_SIM_NAMESPACE --tail=-1 > $1$2_chartmuseum.log 2>&1
+       else
+               docker logs $CHART_MUS_APP_NAME > $1$2_chartmuseum.log 2>&1
+       fi
+}
+
+# Initial setup of protocol, host and ports
+# This function is called for apps managed by the test script.
+# args: -
+__CHARTMUS_initial_setup() {
+       use_chart_mus_http
+}
+
+# Set app short-name, app name and namespace for logging runtime statistics of kubernets pods or docker containers
+# For docker, the namespace shall be excluded
+# This function is called for apps managed by the test script as well as for prestarted apps.
+# args: -
+__CHARTMUS_statisics_setup() {
+       if [ $RUNMODE == "KUBE" ]; then
+               echo "CHARTMUS $CHART_MUS_APP_NAME $KUBE_SIM_NAMESPACE"
+       else
+               echo "CHARTMUS $CHART_MUS_APP_NAME"
+       fi
+}
+
+# Check application requirements, e.g. helm, the the test needs. Exit 1 if req not satisfied
+# args: -
+__CHARTMUS_test_requirements() {
+       :
+}
+
+#######################################################
+
+# Set http as the protocol to use for all communication to the Chartmuseum
+# args: -
+# (Function for test scripts)
+use_chart_mus_http() {
+       __chart_mus_set_protocoll "http" $CHART_MUS_INTERNAL_PORT $CHART_MUS_EXTERNAL_PORT
+}
+
+# Set https as the protocol to use for all communication to the Chartmuseum
+# args: -
+# (Function for test scripts)
+use_chart_mus_https() {
+       __chart_mus_set_protocoll "https" $CHART_MUS_INTERNAL_SECURE_PORT $CHART_MUS_EXTERNAL_SECURE_PORT
+}
+
+# Setup paths to svc/container for internal and external access
+# args: <protocol> <internal-port> <external-port>
+__chart_mus_set_protocoll() {
+       echo -e $BOLD"$CHART_MUS_DISPLAY_NAME protocol setting"$EBOLD
+       echo -e " Using $BOLD $1 $EBOLD towards $CHART_MUS_DISPLAY_NAME"
+
+       ## Access to Chartmuseum
+
+       CHART_MUS_SERVICE_PATH=$1"://"$CHART_MUS_APP_NAME":"$2  # docker access, container->container and script->container via proxy
+       CHART_MUS_SERVICE_PORT=$2
+       CHART_MUS_SERVICE_HOST=$CHART_MUS_APP_NAME
+       if [ $RUNMODE == "KUBE" ]; then
+               CHART_MUS_SERVICE_PATH=$1"://"$CHART_MUS_APP_NAME.$KUBE_SIM_NAMESPACE":"$3 # kube access, pod->svc and script->svc via proxy
+               CHART_MUS_SERVICE_PORT=$3
+               CHART_MUS_SERVICE_HOST=$CHART_MUS_APP_NAME.$KUBE_SIM_NAMESPACE
+       fi
+       CHART_MUS_SERVICE_HTTPX=$1
+
+       echo ""
+}
+
+### Admin API functions Chartmuseum
+
+###########################
+### Chartmuseum functions
+###########################
+
+# Export env vars for config files, docker compose and kube resources
+# args:
+__chartmuseum_export_vars() {
+       export CHART_MUS_APP_NAME
+       export CHART_MUS_DISPLAY_NAME
+
+       export DOCKER_SIM_NWNAME
+       export KUBE_SIM_NAMESPACE
+
+       export CHART_MUS_IMAGE
+       export CHART_MUS_INTERNAL_PORT
+       export CHART_MUS_EXTERNAL_PORT
+
+       export CHART_MUS_CHART_CONTR_CHARTS
+
+}
+
+
+# Start the Chartmuseum in the simulator group
+# args: -
+# (Function for test scripts)
+start_chart_museum() {
+
+       echo -e $BOLD"Starting $CHART_MUS_DISPLAY_NAME"$EBOLD
+
+       if [ $RUNMODE == "KUBE" ]; then
+
+               # Check if app shall be fully managed by the test script
+               __check_included_image "CHARTMUS"
+               retcode_i=$?
+
+               # Check if app shall only be used by the testscipt
+               __check_prestarted_image "CHARTMUS"
+               retcode_p=$?
+
+               if [ $retcode_i -ne 0 ] && [ $retcode_p -ne 0 ]; then
+                       echo -e $RED"The $CHART_MUS_NAME app is not included as managed nor prestarted in this test script"$ERED
+                       echo -e $RED"The $CHART_MUS_APP_NAME will not be started"$ERED
+                       exit
+               fi
+               if [ $retcode_i -eq 0 ] && [ $retcode_p -eq 0 ]; then
+                       echo -e $RED"The $CHART_MUS_APP_NAME app is included both as managed and prestarted in this test script"$ERED
+                       echo -e $RED"The $CHART_MUS_APP_NAME will not be started"$ERED
+                       exit
+               fi
+
+               if [ $retcode_p -eq 0 ]; then
+                       echo -e " Using existing $CHART_MUS_APP_NAME deployment and service"
+                       echo " Setting RC replicas=1"
+                       __kube_scale deployment $CHART_MUS_APP_NAME $KUBE_SIM_NAMESPACE 1
+               fi
+
+               if [ $retcode_i -eq 0 ]; then
+                       echo -e " Creating $CHART_MUS_APP_NAME deployment and service"
+
+            __kube_create_namespace $KUBE_SIM_NAMESPACE
+
+                       __chartmuseum_export_vars
+
+                       # Create service
+                       input_yaml=$SIM_GROUP"/"$CHART_MUS_COMPOSE_DIR"/"svc.yaml
+                       output_yaml=$PWD/tmp/chartmus_svc.yaml
+                       __kube_create_instance service $CHART_MUS_APP_NAME $input_yaml $output_yaml
+
+                       # Create app
+                       input_yaml=$SIM_GROUP"/"$CHART_MUS_COMPOSE_DIR"/"app.yaml
+                       output_yaml=$PWD/tmp/chartmus_app.yaml
+                       __kube_create_instance app $CHART_MUS_APP_NAME $input_yaml $output_yaml
+               fi
+
+               __check_service_start $CHART_MUS_APP_NAME $CHART_MUS_SERVICE_PATH$CHART_MUS_ALIVE_URL
+       else
+
+               # Check if docker app shall be fully managed by the test script
+               __check_included_image 'CHARTMUS'
+               if [ $? -eq 1 ]; then
+                       echo -e $RED"The Chartmuseum app is not included as managed in this test script"$ERED
+                       echo -e $RED"The Chartmuseum will not be started"$ERED
+                       exit
+               fi
+
+               __chartmuseum_export_vars
+
+               __start_container $CHART_MUS_COMPOSE_DIR "" NODOCKERARGS 1 $CHART_MUS_APP_NAME
+
+        __check_service_start $CHART_MUS_APP_NAME $CHART_MUS_SERVICE_PATH$CHART_MUS_ALIVE_URL
+       fi
+    echo ""
+    return 0
+}
+
+# Excute a curl cmd towards the chartmuseum simulator and check the response code.
+# args: TEST|CONF <expected-response-code> <curl-cmd-string>
+__execute_curl_to_chartmuseum() {
+    TIMESTAMP=$(date "+%Y-%m-%d %H:%M:%S")
+    echo "(${BASH_LINENO[0]}) - ${TIMESTAMP}: ${FUNCNAME[0]}" $@ >> $HTTPLOG
+       proxyflag=""
+       if [ ! -z "$KUBE_PROXY_PATH" ]; then
+               if [ $KUBE_PROXY_HTTPX == "http" ]; then
+                       proxyflag=" --proxy $KUBE_PROXY_PATH"
+               else
+                       proxyflag=" --proxy-insecure --proxy $KUBE_PROXY_PATH"
+               fi
+       fi
+       echo " CMD: $3 -skw %{http_code} $proxyflag" >> $HTTPLOG
+       res="$($3 -skw %{http_code} $proxyflag)"
+       echo " RESP: $res" >> $HTTPLOG
+       retcode=$?
+    if [ $retcode -ne 0 ]; then
+        __log_conf_fail_general " Fatal error when executing curl, response: "$retcode
+        return 1
+    fi
+    status=${res:${#res}-3}
+    if [ $status -eq $2 ]; then
+        if [ $1 == "TEST" ]; then
+            __log_test_pass
+        else
+            __log_conf_ok
+        fi
+        return 0
+    fi
+    if [ $1 == "TEST" ]; then
+        __log_test_fail_status_code $2 $status
+        else
+        __log_conf_fail_status_code $2 $status
+    fi
+    return 1
+}
+
+# upload helmchart
+# arg: <chart-name>
+chartmus_upload_test_chart() {
+       __log_conf_start $@
+    if [ $# -ne 1 ]; then
+        __print_err "<chart-name>" $@
+        return 1
+    fi
+       chart_path=$TESTENV_TEMP_FILES/$1"-0.1.0.tgz"
+       if [ ! -f "$chart_path" ]; then
+               echo -e $RED" Cannot find package chart: $chart_path"$ERED
+               __log_conf_fail_general
+               return 1
+       fi
+       __execute_curl_to_chartmuseum CONF 201 "curl --data-binary @$chart_path $CHART_MUS_SERVICE_PATH/api/charts"
+}
+
+# delete helmchart
+# arg: <chart-name> [<version>]
+chartmus_delete_test_chart() {
+       __log_conf_start $@
+    if [ $# -gt 2 ]; then
+        __print_err "<chart-name> [<version>]" $@
+        return 1
+    fi
+       if [ $# -eq 1 ]; then
+               chart_path="/$1/0.1.0"
+       else
+               chart_path="/$1/$2"
+       fi
+       __execute_curl_to_chartmuseum CONF 200 "curl -X DELETE $CHART_MUS_SERVICE_PATH/api/charts"$chart_path
+}
\ No newline at end of file
index a3a3e5b..281f8ce 100755 (executable)
@@ -84,7 +84,7 @@ __kube_wait_for_zero_count() {
 __kube_delete_all_resources() {
        echo " Delete all in namespace $1 ..."
        namespace=$1
-       resources="deployments replicaset statefulset services pods configmaps pvc "
+       resources="deployments replicaset statefulset services pods configmaps pvc serviceaccounts"
        for restype in $resources; do
                result=$(kubectl get $restype -n $namespace -o jsonpath='{.items[?(@.metadata.labels.autotest)].metadata.name}')
                if [ $? -eq 0 ] && [ ! -z "$result" ]; then
@@ -97,8 +97,8 @@ __kube_delete_all_resources() {
 }
 
 __kube_delete_all_pv() {
-       echo " Delete pv ..."
-       resources="pv"
+       echo " Delete all non-namespaced resources ..."
+       resources="pv clusterrolebindings"
        for restype in $resources; do
                result=$(kubectl get $restype -o jsonpath='{.items[?(@.metadata.labels.autotest)].metadata.name}')
                if [ $? -eq 0 ] && [ ! -z "$result" ]; then
index af85ff3..5adb114 100644 (file)
@@ -180,6 +180,18 @@ __CONSUL_statisics_setup() {
 __CBS_statisics_setup() {
        echo ""
 }
+
+# Check application requirements, e.g. helm, the the test needs. Exit 1 if req not satisfied
+# args: -
+__CONSUL_test_requirements() {
+       :
+}
+
+# Check application requirements, e.g. helm, the the test needs. Exit 1 if req not satisfied
+# args: -
+__CBS_test_requirements() {
+       :
+}
 #######################################################
 
 
index 992fd68..803184a 100644 (file)
@@ -104,6 +104,12 @@ __CP_statisics_setup() {
        fi
 }
 
+# Check application requirements, e.g. helm, the the test needs. Exit 1 if req not satisfied
+# args: -
+__CP_test_requirements() {
+       :
+}
+
 #######################################################
 
 
index 5116273..40ef7ea 100644 (file)
@@ -131,6 +131,12 @@ __CR_statisics_setup() {
        done
 }
 
+# Check application requirements, e.g. helm, the the test needs. Exit 1 if req not satisfied
+# args: -
+__CR_test_requirements() {
+       :
+}
+
 #######################################################
 
 ################
index a9605ec..9f8dc5f 100644 (file)
@@ -104,6 +104,12 @@ __DMAAPADP_statisics_setup() {
        fi
 }
 
+# Check application requirements, e.g. helm, the the test needs. Exit 1 if req not satisfied
+# args: -
+__DMAAPADP_test_requirements() {
+       :
+}
+
 #######################################################
 
 # Set http as the protocol to use for all communication to the Dmaap adapter
index 35280a4..8ed0169 100644 (file)
@@ -104,6 +104,12 @@ __DMAAPMED_statisics_setup() {
        fi
 }
 
+# Check application requirements, e.g. helm, the the test needs. Exit 1 if req not satisfied
+# args: -
+__DMAAPMED_test_requirements() {
+       :
+}
+
 #######################################################
 
 # Set http as the protocol to use for all communication to the Dmaap mediator
diff --git a/test/common/helmmanager_api_functions.sh b/test/common/helmmanager_api_functions.sh
new file mode 100644 (file)
index 0000000..455387a
--- /dev/null
@@ -0,0 +1,530 @@
+#!/bin/bash
+
+#  ============LICENSE_START===============================================
+#  Copyright (C) 2021 Nordix Foundation. All rights reserved.
+#  ========================================================================
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#  ============LICENSE_END=================================================
+#
+
+# This is a script that contains container/service managemnt functions test functions for Helm Manager
+
+################ Test engine functions ################
+
+# Create the image var used during the test
+# arg: [<image-tag-suffix>] (selects staging, snapshot, release etc)
+# <image-tag-suffix> is present only for images with staging, snapshot,release tags
+__HELMMANAGER_imagesetup() {
+       __check_and_create_image_var HELMMANAGER "HELM_MANAGER_IMAGE" "HELM_MANAGER_IMAGE_BASE" "HELM_MANAGER_IMAGE_TAG" $1 "$HELM_MANAGER_DISPLAY_NAME"
+}
+
+# Pull image from remote repo or use locally built image
+# arg: <pull-policy-override> <pull-policy-original>
+# <pull-policy-override> Shall be used for images allowing overriding. For example use a local image when test is started to use released images
+# <pull-policy-original> Shall be used for images that does not allow overriding
+# Both arg var may contain: 'remote', 'remote-remove' or 'local'
+__HELMMANAGER_imagepull() {
+       __check_and_pull_image $1 "$HELM_MANAGER_DISPLAY_NAME" $HELM_MANAGER_APP_NAME HELM_MANAGER_IMAGE
+}
+
+# Generate a string for each included image using the app display name and a docker images format string
+# If a custom image repo is used then also the source image from the local repo is listed
+# arg: <docker-images-format-string> <file-to-append>
+__HELMMANAGER_image_data() {
+       echo -e "$HELM_MANAGER_DISPLAY_NAME\t$(docker images --format $1 $HELM_MANAGER_IMAGE)" >>   $2
+       if [ ! -z "$HELM_MANAGER_IMAGE_SOURCE" ]; then
+               echo -e "-- source image --\t$(docker images --format $1 $HELM_MANAGER_IMAGE_SOURCE)" >>   $2
+       fi
+}
+
+# Scale kubernetes resources to zero
+# All resources shall be ordered to be scaled to 0, if relevant. If not relevant to scale, then do no action.
+# This function is called for apps fully managed by the test script
+__HELMMANAGER_kube_scale_zero() {
+       __kube_scale_all_resources $KUBE_NONRTRIC_NAMESPACE autotest HELMMANAGER
+}
+
+# Scale kubernetes resources to zero and wait until this has been accomplished, if relevant. If not relevant to scale, then do no action.
+# This function is called for prestarted apps not managed by the test script.
+__HELMMANAGER_kube_scale_zero_and_wait() {
+       __kube_scale_and_wait_all_resources $KUBE_NONRTRIC_NAMESPACE app "$KUBE_NONRTRIC_NAMESPACE"-helmmanagerservice
+}
+
+# Delete all kube resouces for the app
+# This function is called for apps managed by the test script.
+__HELMMANAGER_kube_delete_all() {
+       __kube_delete_all_resources $KUBE_NONRTRIC_NAMESPACE autotest HELMMANAGER
+}
+
+# Store docker logs
+# This function is called for apps managed by the test script.
+# args: <log-dir> <file-prexix>
+__HELMMANAGER_store_docker_logs() {
+       if [ $RUNMODE == "KUBE" ]; then
+               kubectl  logs -l "autotest=HELMMANAGER" -n $KUBE_NONRTRIC_NAMESPACE --tail=-1 > $1$2_helmmanager.log 2>&1
+       else
+               docker logs $HELM_MANAGER_APP_NAME > $1$2_helmmanager.log 2>&1
+       fi
+}
+
+# Initial setup of protocol, host and ports
+# This function is called for apps managed by the test script.
+# args: -
+__HELMMANAGER_initial_setup() {
+       use_helm_manager_http
+}
+
+# Set app short-name, app name and namespace for logging runtime statistics of kubernets pods or docker containers
+# For docker, the namespace shall be excluded
+# This function is called for apps managed by the test script as well as for prestarted apps.
+# args: -
+__HELMMANAGER_statisics_setup() {
+       if [ $RUNMODE == "KUBE" ]; then
+               echo "HELMMANAGER $HELM_MANAGER_APP_NAME $KUBE_NONRTRIC_NAMESPACE"
+       else
+               echo "HELMMANAGER $HELM_MANAGER_APP_NAME"
+       fi
+}
+
+# Check application requirements, e.g. helm, the the test needs. Exit 1 if req not satisfied
+# args: -
+__HELMMANAGER_test_requirements() {
+       tmp=$(which helm)
+       if [ $? -ne 0 ]; then
+               echo $RED" Helm3 is required for running helm manager tests. Pls install helm3"
+               exit 1
+       fi
+       tmp_version=$(helm version | grep 'v3')
+       if [ -z "$tmp_version" ]; then
+               echo $RED" Helm3 is required for running helm manager tests. Pls install helm3"
+               exit 1
+       fi
+}
+
+#######################################################
+
+# Set http as the protocol to use for all communication to the Helm Manager
+# args: -
+# (Function for test scripts)
+use_helm_manager_http() {
+       __helm_manager_set_protocoll "http" $HELM_MANAGER_INTERNAL_PORT $HELM_MANAGER_EXTERNAL_PORT
+}
+
+# Set https as the protocol to use for all communication to the Helm Manager
+# args: -
+# (Function for test scripts)
+use_helm_manager_https() {
+       __helm_manager_set_protocoll "https" $HELM_MANAGER_INTERNAL_SECURE_PORT $HELM_MANAGER_EXTERNAL_SECURE_PORT
+}
+
+# Setup paths to svc/container for internal and external access
+# args: <protocol> <internal-port> <external-port>
+__helm_manager_set_protocoll() {
+       echo -e $BOLD"$HELM_MANAGER_DISPLAY_NAME protocol setting"$EBOLD
+       echo -e " Using $BOLD $1 $EBOLD towards $HELM_MANAGER_DISPLAY_NAME"
+
+       ## Access to Helm Manager
+
+       HELMMANAGER_SERVICE_PATH=$1"://$HELM_MANAGER_USER:$HELM_MANAGER_PWD@"$HELM_MANAGER_APP_NAME":"$2  # docker access, container->container and script->container via proxy
+       if [ $RUNMODE == "KUBE" ]; then
+               HELMMANAGER_SERVICE_PATH=$1"://$HELM_MANAGER_USER:$HELM_MANAGER_PWD@"$HELM_MANAGER_APP_NAME.$KUBE_NONRTRIC_NAMESPACE":"$3 # kube access, pod->svc and script->svc via proxy
+       fi
+
+       echo ""
+}
+
+# Export env vars for config files, docker compose and kube resources
+# args:
+__helm_manager_export_vars() {
+
+       export HELM_MANAGER_APP_NAME
+       export HELM_MANAGER_DISPLAY_NAME
+
+       export DOCKER_SIM_NWNAME
+       export KUBE_NONRTRIC_NAMESPACE
+
+       export HELM_MANAGER_EXTERNAL_PORT
+       export HELM_MANAGER_INTERNAL_PORT
+       export HELM_MANAGER_EXTERNAL_SECURE_PORT
+       export HELM_MANAGER_INTERNAL_SECURE_PORT
+       export HELM_MANAGER_CLUSTER_ROLE
+       export HELM_MANAGER_SA_NAME
+       export HELM_MANAGER_ALIVE_URL
+       export HELM_MANAGER_COMPOSE_DIR
+       export HELM_MANAGER_USER
+       export HELM_MANAGER_PWD
+}
+
+# Start the Helm Manager container
+# args: -
+# (Function for test scripts)
+start_helm_manager() {
+
+       echo -e $BOLD"Starting $HELM_MANAGER_DISPLAY_NAME"$EBOLD
+
+       if [ $RUNMODE == "KUBE" ]; then
+
+               # Check if app shall be fully managed by the test script
+               __check_included_image "HELMMANAGER"
+               retcode_i=$?
+
+               # Check if app shall only be used by the testscipt
+               __check_prestarted_image "HELMMANAGER"
+               retcode_p=$?
+
+               if [ $retcode_i -ne 0 ] && [ $retcode_p -ne 0 ]; then
+                       echo -e $RED"The $HELM_MANAGER_APP_NAME app is not included as managed nor prestarted in this test script"$ERED
+                       echo -e $RED"The $HELM_MANAGER_APP_NAME will not be started"$ERED
+                       exit
+               fi
+               if [ $retcode_i -eq 0 ] && [ $retcode_p -eq 0 ]; then
+                       echo -e $RED"The $HELM_MANAGER_APP_NAME app is included both as managed and prestarted in this test script"$ERED
+                       echo -e $RED"The $HELM_MANAGER_APP_NAME will not be started"$ERED
+                       exit
+               fi
+
+               if [ $retcode_p -eq 0 ]; then
+                       echo -e " Using existing $HELM_MANAGER_APP_NAME deployment and service"
+                       echo " Setting $HELM_MANAGER_APP_NAME replicas=1"
+                       __kube_scale deployment $HELM_MANAGER_APP_NAME $KUBE_NONRTRIC_NAMESPACE 1
+               fi
+
+               if [ $retcode_i -eq 0 ]; then
+
+                       echo -e " Creating $HELM_MANAGER_APP_NAME app and expose service"
+
+                       #Check if nonrtric namespace exists, if not create it
+                       __kube_create_namespace $KUBE_NONRTRIC_NAMESPACE
+
+                       __helm_manager_export_vars
+
+                       #Create sa
+                       input_yaml=$SIM_GROUP"/"$HELM_MANAGER_COMPOSE_DIR"/"sa.yaml
+                       output_yaml=$PWD/tmp/helmmanager_sa_svc.yaml
+                       __kube_create_instance sa $HELM_MANAGER_APP_NAME $input_yaml $output_yaml
+
+                       #Create service
+                       input_yaml=$SIM_GROUP"/"$HELM_MANAGER_COMPOSE_DIR"/"svc.yaml
+                       output_yaml=$PWD/tmp/helmmanager_svc.yaml
+                       __kube_create_instance service $HELM_MANAGER_APP_NAME $input_yaml $output_yaml
+
+                       #Create app
+                       input_yaml=$SIM_GROUP"/"$HELM_MANAGER_COMPOSE_DIR"/"app.yaml
+                       output_yaml=$PWD/tmp/helmmanager_app.yaml
+                       __kube_create_instance app $HELM_MANAGER_APP_NAME $input_yaml $output_yaml
+               fi
+
+               __check_service_start $HELM_MANAGER_APP_NAME $HELMMANAGER_SERVICE_PATH$HELM_MANAGER_ALIVE_URL
+
+       else
+               __check_included_image 'HELMMANAGER'
+               if [ $? -eq 1 ]; then
+                       echo -e $RED"The Helm Manager app is not included as managed in this test script"$ERED
+                       echo -e $RED"The Helm Manager will not be started"$ERED
+                       exit
+               fi
+
+               __helm_manager_export_vars
+
+               __start_container $HELM_MANAGER_COMPOSE_DIR "" NODOCKERARGS 1 $HELM_MANAGER_APP_NAME
+
+               __check_service_start $HELM_MANAGER_APP_NAME $HELMMANAGER_SERVICE_PATH$HELM_MANAGER_ALIVE_URL
+       fi
+       echo ""
+}
+
+# Excute a curl cmd towards the helm manager.
+# args: GET <path>
+# args: POST <path> <file-to-post>
+# args: POST3 <path> <name> <file-to-post> <name> <file-to-post> <name> <file-to-post>
+__execute_curl_to_helmmanger() {
+    TIMESTAMP=$(date "+%Y-%m-%d %H:%M:%S")
+    echo "(${BASH_LINENO[0]}) - ${TIMESTAMP}: ${FUNCNAME[0]}" $@ >> $HTTPLOG
+       proxyflag=""
+       if [ ! -z "$KUBE_PROXY_PATH" ]; then
+               if [ $KUBE_PROXY_HTTPX == "http" ]; then
+                       proxyflag=" --proxy $KUBE_PROXY_PATH"
+               else
+                       proxyflag=" --proxy-insecure --proxy $KUBE_PROXY_PATH"
+               fi
+       fi
+       if [ $1 == "GET" ]; then
+               curlstring="curl -skw %{http_code} $proxyflag $HELMMANAGER_SERVICE_PATH$2"
+       elif [ $1 == "POST" ]; then
+               curlstring="curl -skw %{http_code} $proxyflag $HELMMANAGER_SERVICE_PATH$2 -X POST --data-binary @$3 -H Content-Type:application/json"
+       elif [ $1 == "POST1_2" ]; then
+               curlstring="curl -skw %{http_code} $proxyflag $HELMMANAGER_SERVICE_PATH$2 -X POST -F $3=<$4 -F $5=@$6 -F $7=@$8 "
+       elif [ $1 == "DELETE" ]; then
+               curlstring="curl -skw %{http_code} $proxyflag $HELMMANAGER_SERVICE_PATH$2 -X DELETE"
+       else
+               echo " Unknown operation $1" >> $HTTPLOG
+               echo "000"
+               return 1
+       fi
+       echo " CMD: $curlstring" >> $HTTPLOG
+       res="$($curlstring)"
+       retcode=$?
+       echo " RESP: $res" >> $HTTPLOG
+    if [ $retcode -ne 0 ]; then
+        echo "000"
+               return 1
+    fi
+    echo $res
+       return 0
+}
+
+# API Test function: GET â€‹/helm/charts
+# args: <response-code> [ EMPTY | ( <chart> <version> <namespace> <release> <repo> )+ ]
+# (Function for test scripts)
+helm_manager_api_get_charts() {
+       __log_test_start $@
+
+       error_params=1
+       variablecount=$(($#-1))
+    if [ $# -eq 1 ]; then
+               error_params=0
+       elif [ $# -eq 2 ] && [ $2 == "EMPTY" ]; then
+               error_params=0
+       elif [ $(($variablecount%5)) -eq 0 ]; then
+               error_params=0
+       fi
+
+
+       if [ $error_params -eq 1 ]; then
+               __print_err "<response-code>" $@
+               return 1
+       fi
+
+       query="/helm/charts"
+    res="$(__execute_curl_to_helmmanger GET $query)"
+    status=${res:${#res}-3}
+
+       if [ $status -ne $1 ]; then
+               __log_test_fail_status_code $1 $status
+               return 1
+       fi
+
+       if [ $# -gt 1 ]; then
+               body=${res:0:${#res}-3}
+               shift
+               if [ $# -eq 1 ]; then
+                       targetJson='{"charts":[]}'
+               else
+                       targetJson='{"charts":['
+                       arr=(${@})
+                       for ((i=0; i<$#; i=i+5)); do
+                               if [ "$i" -gt 0 ]; then
+                                       targetJson=$targetJson","
+                               fi
+                               chart_version=${arr[$i+2]}
+                               if [ $chart_version == "DEFAULT-VERSION" ]; then
+                                       chart_version="0.1.0"
+                               fi
+                               targetJson=$targetJson'{"releaseName":"'${arr[$i+3]}'","chartId":{"name":"'${arr[$i+1]}'","version":"'0.1.0'"},"namespace":"'${arr[$i+4]}'","repository":{"repoName":"'${arr[$i+0]}'","protocol":null,"address":null,"port":null,"userName":null,"password":null},"overrideParams":null}'
+                       done
+                       targetJson=$targetJson']}'
+               fi
+               echo " TARGET JSON: $targetJson" >> $HTTPLOG
+               res=$(python3 ../common/compare_json.py "$targetJson" "$body")
+
+               if [ $res -ne 0 ]; then
+                       __log_test_fail_body
+                       return 1
+               fi
+       fi
+
+       __log_test_pass
+       return 0
+}
+
+# API Test function: POST â€‹/helm/repo - add repo
+# args: <response-code> <repo-name> <repo-protocol> <repo-address> <repo-port>
+# (Function for test scripts)
+helm_manager_api_post_repo() {
+       __log_test_start $@
+
+    if [ $# -ne 5 ]; then
+               __print_err "<response-code> <repo-name> <repo-protocol> <repo-address> <repo-port>" $@
+               return 1
+       fi
+
+       query="/helm/repo"
+       file="./tmp/cm-repo.json"
+       file_data='{"address" : "'$4'","repoName": "'$2'","protocol": "'$3'","port": "'$5'"}'
+       echo $file_data > $file
+       echo " FILE: $file_data" >> $HTTPLOG
+    res="$(__execute_curl_to_helmmanger POST $query $file)"
+    status=${res:${#res}-3}
+
+       if [ $status -ne $1 ]; then
+               __log_test_fail_status_code $1 $status
+               return 1
+       fi
+
+       __log_test_pass
+       return 0
+}
+
+# API Test function: POST /helm/onboard/chart - onboard chart
+# args: <response-code> <repo> <chart> <version> <release> <namespace>
+# (Function for test scripts)
+helm_manager_api_post_onboard_chart() {
+       __log_test_start $@
+
+    if [ $# -ne 6 ]; then
+               __print_err "<response-code> <repo> <chart> <version> <release> <namespace> " $@
+               return 1
+       fi
+
+       query="/helm/onboard/chart"
+       file="./tmp/chart.json"
+       chart_version=$4
+       if [ $chart_version == "DEFAULT-VERSION" ]; then
+               chart_version="0.1.0"
+       fi
+       file_data='{"chartId":{"name":"'$3'","version":"'$chart_version'"},"namespace":"'$6'","repository":{"repoName":"'$2'"},"releaseName":"'$5'"}'
+       echo $file_data > $file
+       echo " FILE - ($file): $file_data" >> $HTTPLOG
+       file2="./tmp/override.yaml"
+       echo "" >> $file2
+       file3="$TESTENV_TEMP_FILES/"$3"-"$chart_version".tgz"
+    res="$(__execute_curl_to_helmmanger POST1_2 $query info $file values $file2 chart $file3)"
+    status=${res:${#res}-3}
+
+       if [ $status -ne $1 ]; then
+               __log_test_fail_status_code $1 $status
+               return 1
+       fi
+
+       __log_test_pass
+       return 0
+}
+
+# API Test function: POST /helm/install - install chart
+# args: <response-code> <chart> <version>
+# (Function for test scripts)
+helm_manager_api_post_install_chart() {
+       __log_test_start $@
+
+    if [ $# -ne 3 ]; then
+               __print_err "<response-code> <chart> <version>" $@
+               return 1
+       fi
+
+       query="/helm/install"
+       file="./tmp/app-installation.json"
+       chart_version=$3
+       if [ $chart_version == "DEFAULT-VERSION" ]; then
+               chart_version="0.1.0"
+       fi
+       file_data='{"name": "'$2'","version": "'$chart_version'"}'
+       echo $file_data > $file
+       echo " FILE - ($file): $file_data" >> $HTTPLOG
+    res="$(__execute_curl_to_helmmanger POST $query $file)"
+    status=${res:${#res}-3}
+
+       if [ $status -ne $1 ]; then
+               __log_test_fail_status_code $1 $status
+               return 1
+       fi
+
+       __log_test_pass
+       return 0
+}
+
+# API Test function: DELETE /helm/uninstall - uninstall chart
+# args: <response-code> <chart> <version>
+# (Function for test scripts)
+helm_manager_api_uninstall_chart() {
+       __log_test_start $@
+
+    if [ $# -ne 3 ]; then
+               __print_err "<response-code> <chart> <version> " $@
+               return 1
+       fi
+
+       chart_version=$3
+       if [ $chart_version == "DEFAULT-VERSION" ]; then
+               chart_version="0.1.0"
+       fi
+       query="/helm/uninstall/$2/$chart_version"
+    res="$(__execute_curl_to_helmmanger DELETE $query)"
+    status=${res:${#res}-3}
+
+       if [ $status -ne $1 ]; then
+               __log_test_fail_status_code $1 $status
+               return 1
+       fi
+
+       __log_test_pass
+       return 0
+}
+
+# API Test function: DELETE /helm/chart - delete chart
+# args: <response-code> <chart> <version>
+# (Function for test scripts)
+helm_manager_api_delete_chart() {
+       __log_test_start $@
+
+    if [ $# -ne 3 ]; then
+               __print_err "<response-code> <chart> <version> " $@
+               return 1
+       fi
+
+       chart_version=$3
+       if [ $chart_version == "DEFAULT-VERSION" ]; then
+               chart_version="0.1.0"
+       fi
+       query="/helm/chart/$2/$chart_version"
+    res="$(__execute_curl_to_helmmanger DELETE $query)"
+    status=${res:${#res}-3}
+
+       if [ $status -ne $1 ]; then
+               __log_test_fail_status_code $1 $status
+               return 1
+       fi
+
+       __log_test_pass
+       return 0
+}
+
+# Config function: Add repo in helm manager by helm using exec
+# args: <repo-name> <repo-url>
+# (Function for test scripts)
+helm_manager_api_exec_add_repo() {
+       __log_conf_start $@
+
+    if [ $# -ne 2 ]; then
+               __print_err "<repo-name> <repo-url>" $@
+               return 1
+       fi
+
+       if [ $RUNMODE == "DOCKER" ]; then
+               retmsg=$(docker exec -it $HELM_MANAGER_APP_NAME helm repo add $1 $2)
+               retcode=$?
+               if [ $retcode -ne 0 ]; then
+                       __log_conf_fail_general " Cannot add repo to helm, return code: $retcode, msg: $retmsg"
+                       return 1
+               fi
+       else
+               retmsg=$(kubectl exec -it $HELM_MANAGER_APP_NAME -n $KUBE_NONRTRIC_NAMESPACE -- helm repo add $1 $2)
+               retcode=$?
+               if [ $retcode -ne 0 ]; then
+                       __log_conf_fail_general " Cannot add repo to helm, return code: $retcode, msg: $retmsg"
+                       return 1
+               fi
+       fi
+       __log_conf_ok
+       return 0
+}
+
index af11f14..c417d42 100644 (file)
@@ -118,6 +118,12 @@ __HTTPPROXY_statisics_setup() {
        fi
 }
 
+# Check application requirements, e.g. helm, the the test needs. Exit 1 if req not satisfied
+# args: -
+__HTTPPROXY_test_requirements() {
+       :
+}
+
 #######################################################
 
 # Set http as the protocol to use for all communication to the http proxy
index df2de4f..0e87517 100644 (file)
@@ -103,6 +103,12 @@ __ICS_statisics_setup() {
        fi
 }
 
+# Check application requirements, e.g. helm, the the test needs. Exit 1 if req not satisfied
+# args: -
+__ICS_test_requirements() {
+       :
+}
+
 #######################################################
 
 
index 002657c..4b15641 100644 (file)
@@ -119,6 +119,12 @@ __KAFKAPC_statisics_setup() {
        fi
 }
 
+# Check application requirements, e.g. helm, the the test needs. Exit 1 if req not satisfied
+# args: -
+__KAFKAPC_test_requirements() {
+       :
+}
+
 #######################################################
 
 #######################################################
index eb4600c..38aeb21 100644 (file)
@@ -119,6 +119,12 @@ __KUBEPROXY_statisics_setup() {
        fi
 }
 
+# Check application requirements, e.g. helm, the the test needs. Exit 1 if req not satisfied
+# args: -
+__KUBEPROXY_test_requirements() {
+       :
+}
+
 #######################################################
 
 ## Access to Kube http proxy
diff --git a/test/common/localhelm_api_functions.sh b/test/common/localhelm_api_functions.sh
new file mode 100644 (file)
index 0000000..c7a6d3d
--- /dev/null
@@ -0,0 +1,193 @@
+#!/bin/bash
+
+#  ============LICENSE_START===============================================
+#  Copyright (C) 2021 Nordix Foundation. All rights reserved.
+#  ========================================================================
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#  ============LICENSE_END=================================================
+#
+
+# This is a script that contains function to handle helm on localhost
+
+
+################ Test engine functions ################
+
+# Create the image var used during the test
+# arg: <image-tag-suffix> (selects staging, snapshot, release etc)
+# <image-tag-suffix> is present only for images with staging, snapshot,release tags
+__LOCALHELM_imagesetup() {
+       :
+}
+
+# Pull image from remote repo or use locally built image
+# arg: <pull-policy-override> <pull-policy-original>
+# <pull-policy-override> Shall be used for images allowing overriding. For example use a local image when test is started to use released images
+# <pull-policy-original> Shall be used for images that does not allow overriding
+# Both var may contain: 'remote', 'remote-remove' or 'local'
+__LOCALHELM_imagepull() {
+       :
+}
+
+# Build image (only for simulator or interfaces stubs owned by the test environment)
+# arg: <image-tag-suffix> (selects staging, snapshot, release etc)
+# <image-tag-suffix> is present only for images with staging, snapshot,release tags
+__LOCALHELM_imagebuild() {
+       :
+}
+
+# Generate a string for each included image using the app display name and a docker images format string
+# If a custom image repo is used then also the source image from the local repo is listed
+# arg: <docker-images-format-string> <file-to-append>
+__LOCALHELM_image_data() {
+       :
+}
+
+# Scale kubernetes resources to zero
+# All resources shall be ordered to be scaled to 0, if relevant. If not relevant to scale, then do no action.
+# This function is called for apps fully managed by the test script
+__LOCALHELM_kube_scale_zero() {
+       :
+}
+
+# Scale kubernetes resources to zero and wait until this has been accomplished, if relevant. If not relevant to scale, then do no action.
+# This function is called for prestarted apps not managed by the test script.
+__LOCALHELM_kube_scale_zero_and_wait() {
+       :
+}
+
+# Delete all kube resouces for the app
+# This function is called for apps managed by the test script.
+__LOCALHELM_kube_delete_all() {
+       :
+}
+
+# Store docker logs
+# This function is called for apps managed by the test script.
+# args: <log-dir> <file-prexix>
+__LOCALHELM_store_docker_logs() {
+       :
+}
+
+# Initial setup of protocol, host and ports
+# This function is called for apps managed by the test script.
+# args: -
+__LOCALHELM_initial_setup() {
+       :
+}
+
+# Set app short-name, app name and namespace for logging runtime statistics of kubernets pods or docker containers
+# For docker, the namespace shall be excluded
+# This function is called for apps managed by the test script as well as for prestarted apps.
+# args: -
+__LOCALHELM_statisics_setup() {
+       :
+}
+
+# Check application requirements, e.g. helm, the the test needs. Exit 1 if req not satisfied
+# args: -
+__LOCALHELM_test_requirements() {
+       tmp=$(which helm)
+       if [ $? -ne 0 ]; then
+               echo $RED" Helm3 is required for running this test. Pls install helm3"
+               exit 1
+       fi
+       tmp_version=$(helm version | grep 'v3')
+       if [ -z "$tmp_version" ]; then
+               echo $RED" Helm3 is required for running this test. Pls install helm3"
+               exit 1
+       fi
+}
+
+#######################################################
+
+
+# Create a dummy helmchart
+# arg: <chart-name>
+localhelm_create_test_chart() {
+       __log_conf_start $@
+    if [ $# -ne 1 ]; then
+        __print_err "<path-to-chart-dir>" $@
+        return 1
+    fi
+       if [[ "$1" == *"/"* ]]; then
+               echo -e $RED"Chart name cannot contain '/'"
+               __log_conf_fail_general
+               return 1
+       fi
+       helm create $TESTENV_TEMP_FILES/$1 | indent1
+       if [ $? -ne 0 ]; then
+               __log_conf_fail_general
+               return 1
+       fi
+       __log_conf_ok
+       return 0
+}
+
+# Package a created helmchart
+# arg: <chart-name>
+localhelm_package_test_chart() {
+       __log_conf_start $@
+    if [ $# -ne 1 ]; then
+        __print_err "<path-to-chart-dir>" $@
+        return 1
+    fi
+       if [[ "$1" == *"/"* ]]; then
+               echo -e $RED"Chart name cannot contain '/'"
+               __log_conf_fail_general
+               return 1
+       fi
+       helm package -d $TESTENV_TEMP_FILES $TESTENV_TEMP_FILES/$1 | indent1
+       if [ $? -ne 0 ]; then
+               __log_conf_fail_general
+               return 1
+       fi
+       __log_conf_ok
+       return 0
+}
+
+# Check if a release is installed
+# arg: INSTALLED|NOTINSTALLED <release-name> <name-space>
+localhelm_installed_chart_release() {
+       __log_test_start $@
+    if [ $# -ne 3 ]; then
+        __print_err "INSTALLED|NOTINSTALLED <release-name> <name-space>" $@
+        return 1
+    fi
+       if [ $1 != "INSTALLED" ] && [ $1 != "NOTINSTALLED" ]; then
+        __print_err "INSTALLED|NOTINSTALLED <release-name> <name-space>" $@
+        return 1
+       fi
+
+       filter="helm ls -n $3 --filter ^$2"
+       res=$($filter -q)
+       if [ $? -ne 0 ]; then
+               __log_test_fail_general "Failed to list helm releases"
+               return 1
+       fi
+       if [ $1 == "INSTALLED" ]; then
+               if [ "$res" != $2 ]; then
+                       echo -e "$RED Release $2 does not exists $ERED"
+                       __log_test_fail_general
+                       return 1
+               fi
+       elif [ $1 == "NOTINSTALLED" ]; then
+               if [ "$res" == $2 ]; then
+                       __log_test_fail_general "Release $2 exists"
+                       return 1
+               fi
+       fi
+       echo " Currently installed releases in namespace $3"
+       helm ls -n $3  | indent2
+       __log_test_pass
+       return 0
+}
index 3e00ec3..122b412 100755 (executable)
@@ -217,6 +217,18 @@ __DMAAPMR_statisics_setup() {
        fi
 }
 
+# Check application requirements, e.g. helm, the the test needs. Exit 1 if req not satisfied
+# args: -
+__MR_test_requirements() {
+       :
+}
+
+# Check application requirements, e.g. helm, the the test needs. Exit 1 if req not satisfied
+# args: -
+__DMAAPMR_test_requirements() {
+       :
+}
+
 #######################################################
 
 # Description of port mappings when running MR-STUB only or MR-STUB + MESSAGE-ROUTER
index 9e29278..bb37799 100644 (file)
@@ -104,6 +104,12 @@ __NGW_statisics_setup() {
        fi
 }
 
+# Check application requirements, e.g. helm, the the test needs. Exit 1 if req not satisfied
+# args: -
+__NGW_test_requirements() {
+       :
+}
+
 #######################################################
 
 
index 7c91705..9d4d1f1 100644 (file)
@@ -103,6 +103,12 @@ __PA_statisics_setup() {
        fi
 }
 
+# Check application requirements, e.g. helm, the the test needs. Exit 1 if req not satisfied
+# args: -
+__PA_test_requirements() {
+       :
+}
+
 
 #######################################################
 
index f792d69..b3e3dea 100644 (file)
@@ -119,6 +119,12 @@ __PRODSTUB_statisics_setup() {
        fi
 }
 
+# Check application requirements, e.g. helm, the the test needs. Exit 1 if req not satisfied
+# args: -
+__PRODSTUB_test_requirements() {
+       :
+}
+
 #######################################################
 
 # Set http as the protocol to use for all communication to the Prod stub sim
@@ -192,13 +198,13 @@ start_prod_stub() {
                retcode_p=$?
 
                if [ $retcode_i -ne 0 ] && [ $retcode_p -ne 0 ]; then
-                       echo -e $RED"The $ICS_APP_NAME app is not included as managed nor prestarted in this test script"$ERED
-                       echo -e $RED"The $ICS_APP_NAME will not be started"$ERED
+                       echo -e $RED"The $PROD_STUB_APP_NAME app is not included as managed nor prestarted in this test script"$ERED
+                       echo -e $RED"The $PROD_STUB_APP_NAME will not be started"$ERED
                        exit
                fi
                if [ $retcode_i -eq 0 ] && [ $retcode_p -eq 0 ]; then
-                       echo -e $RED"The $ICS_APP_NAME app is included both as managed and prestarted in this test script"$ERED
-                       echo -e $RED"The $ICS_APP_NAME will not be started"$ERED
+                       echo -e $RED"The $PROD_STUB_APP_NAME app is included both as managed and prestarted in this test script"$ERED
+                       echo -e $RED"The $PROD_STUB_APP_NAME will not be started"$ERED
                        exit
                fi
 
index 5d37bd0..feb4440 100644 (file)
@@ -98,6 +98,12 @@ __PVCCLEANER_statisics_setup() {
        echo ""
 }
 
+# Check application requirements, e.g. helm, the the test needs. Exit 1 if req not satisfied
+# args: -
+__PVCCLEANER_test_requirements() {
+       :
+}
+
 #######################################################
 
 # This is a system app, all usage in testcase_common.sh
\ No newline at end of file
index 3766d19..b17b6bf 100644 (file)
@@ -34,7 +34,7 @@ __RC_imagesetup() {
 # <pull-policy-original> Shall be used for images that does not allow overriding
 # Both arg var may contain: 'remote', 'remote-remove' or 'local'
 __RC_imagepull() {
-       __check_and_pull_image $1 "$c" $RAPP_CAT_APP_NAME RAPP_CAT_IMAGE
+       __check_and_pull_image $1 "$RAPP_CAT_DISPLAY_NAME" $RAPP_CAT_APP_NAME RAPP_CAT_IMAGE
 }
 
 # Generate a string for each included image using the app display name and a docker images format string
@@ -96,6 +96,12 @@ __RC_statisics_setup() {
        fi
 }
 
+# Check application requirements, e.g. helm, the the test needs. Exit 1 if req not satisfied
+# args: -
+__RC_test_requirements() {
+       :
+}
+
 #######################################################
 
 # Set http as the protocol to use for all communication to the Rapp catalogue
index bd52611..2953eb0 100644 (file)
@@ -116,6 +116,12 @@ __RICSIM_statisics_setup() {
        done
 }
 
+# Check application requirements, e.g. helm, the the test needs. Exit 1 if req not satisfied
+# args: -
+__RICSIM_test_requirements() {
+       :
+}
+
 #######################################################
 
 
@@ -257,7 +263,6 @@ start_ric_simulators() {
                        done
                fi
        else
-
                __check_included_image 'RICSIM'
                if [ $? -eq 1 ]; then
                        echo -e $RED"The Near-RT RIC Simulator app is not included as managed in this test script"$ERED
index 3ac0a6c..68cf976 100644 (file)
@@ -120,6 +120,12 @@ __SDNC_statisics_setup() {
        fi
 }
 
+# Check application requirements, e.g. helm, the the test needs. Exit 1 if req not satisfied
+# args: -
+__SDNC_test_requirements() {
+       :
+}
+
 #######################################################
 
 # Set http as the protocol to use for all communication to SDNC
index 9d13a81..c0f1491 100644 (file)
@@ -69,17 +69,17 @@ NEXUS_RELEASE_REPO_ONAP=$NEXUS_RELEASE_REPO
 
 # Policy Agent image and tags
 POLICY_AGENT_IMAGE_BASE="onap/ccsdk-oran-a1policymanagementservice"
-POLICY_AGENT_IMAGE_TAG_LOCAL="1.2.4-SNAPSHOT"
-POLICY_AGENT_IMAGE_TAG_REMOTE_SNAPSHOT="1.2.4-SNAPSHOT"
-POLICY_AGENT_IMAGE_TAG_REMOTE="1.2.4-STAGING-latest" #Will use snapshot repo
-POLICY_AGENT_IMAGE_TAG_REMOTE_RELEASE="1.2.3"
+POLICY_AGENT_IMAGE_TAG_LOCAL="1.2.6-SNAPSHOT"
+POLICY_AGENT_IMAGE_TAG_REMOTE_SNAPSHOT="1.2.6-SNAPSHOT"
+POLICY_AGENT_IMAGE_TAG_REMOTE="1.2.6-STAGING-latest" #Will use snapshot repo
+POLICY_AGENT_IMAGE_TAG_REMOTE_RELEASE="1.2.5"
 
 # SDNC A1 Controller remote image and tag
 SDNC_A1_CONTROLLER_IMAGE_BASE="onap/sdnc-image"
-SDNC_A1_CONTROLLER_IMAGE_TAG_LOCAL="2.2.1-SNAPSHOT" ###CHECK THIS
-SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_SNAPSHOT="2.2.1-STAGING-latest"
-SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE="2.2.1-STAGING-latest"  #Will use snapshot repo
-SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_RELEASE="2.2.1"
+SDNC_A1_CONTROLLER_IMAGE_TAG_LOCAL="2.2.5-SNAPSHOT" ###CHECK THIS
+SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_SNAPSHOT="2.2.5-STAGING-latest"
+SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE="2.2.5-STAGING-latest"  #Will use snapshot repo
+SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_RELEASE="2.2.4"
 
 #SDNC DB remote image and tag
 #The DB is part of SDNC so handled in the same way as SDNC
diff --git a/test/common/test_env-onap-jakarta.sh b/test/common/test_env-onap-jakarta.sh
new file mode 100644 (file)
index 0000000..386f168
--- /dev/null
@@ -0,0 +1,427 @@
+#!/bin/bash
+
+#  ============LICENSE_START===============================================
+#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  ========================================================================
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#  ============LICENSE_END=================================================
+#
+#Profile for ONAP honolulu release
+TEST_ENV_PROFILE="ONAP-JAKARTA"
+FLAVOUR="ONAP"
+
+########################################
+## Nexus repo settings
+########################################
+
+# Nexus repos for developed images
+NEXUS_PROXY_REPO="nexus3.onap.org:10001/"
+NEXUS_RELEASE_REPO="nexus3.onap.org:10002/"
+NEXUS_SNAPSHOT_REPO="nexus3.onap.org:10003/"
+NEXUS_STAGING_REPO=$NEXUS_SNAPSHOT_REPO  #staging repo not used in ONAP, using snapshot
+
+# Nexus repos for images used by test (not developed by the project)
+NEXUS_RELEASE_REPO_ORAN="nexus3.o-ran-sc.org:10002/" # Only for released ORAN images
+NEXUS_RELEASE_REPO_ONAP=$NEXUS_RELEASE_REPO
+
+########################################
+# Set up of image and tags for the test.
+########################################
+
+# NOTE: One environment variable containing the image name and tag is create by the test script
+# for each image from the env variables below.
+# The variable is created by removing the suffix "_BASE" from the base image variable name.
+# Example: POLICY_AGENT_IMAGE_BASE -> POLICY_AGENT_IMAGE
+# This var will point to the local or remote image depending on cmd line arguments.
+# In addition, the repo and the image tag version are selected from the list of image tags based on the cmd line argurment.
+# For images built by the script, only tag #1 shall be specified
+# For project images, only tag #1, #2, #3 and #4 shall be specified
+# For ORAN images (non project), only tag #5 shall be specified
+# For ONAP images (non project), only tag #6 shall be specified
+# For all other images, only tag #7 shall be specified
+# 1 XXX_LOCAL: local images: <image-name>:<local-tag>
+# 2 XXX_REMOTE_SNAPSHOT: snapshot images: <snapshot-nexus-repo><image-name>:<snapshot-tag>
+# 3 XXX_REMOTE: staging images: <staging-nexus-repo><image-name>:<staging-tag>
+# 4 XXX_REMOTE_RELEASE: release images: <release-nexus-repo><image-name>:<release-tag>
+# 5 XXX_REMOTE_RELEASE_ORAN: ORAN release images: <oran-release-nexus-repo><image-name>:<release-tag>
+# 6 XXX_REMOTE_RELEASE_ONAP: ONAP release images: <onap-release-nexus-repo><image-name>:<release-tag>
+# 7 XXX_PROXY: other images, not produced by the project: <proxy-nexus-repo><mage-name>:<proxy-tag>
+
+#############################################################################
+# Note:
+# The imgage tags for pms and sdnc are updated AFTER the release.
+# This means that the latest staging/snapshot images for these two components have
+# version one step (0.0.1 - bug-level) higher than the
+# latest release image version.
+
+# This is only applicable for ONAP images
+#############################################################################
+
+# Policy Agent image and tags
+POLICY_AGENT_IMAGE_BASE="onap/ccsdk-oran-a1policymanagementservice"
+POLICY_AGENT_IMAGE_TAG_LOCAL="1.3.0-SNAPSHOT"
+POLICY_AGENT_IMAGE_TAG_REMOTE_SNAPSHOT="1.3.0-SNAPSHOT"
+POLICY_AGENT_IMAGE_TAG_REMOTE="1.3.0-STAGING-latest" #Will use snapshot repo
+POLICY_AGENT_IMAGE_TAG_REMOTE_RELEASE="1.3.0"
+
+# SDNC A1 Controller remote image and tag
+SDNC_A1_CONTROLLER_IMAGE_BASE="onap/sdnc-image"
+SDNC_A1_CONTROLLER_IMAGE_TAG_LOCAL="2.3.0-SNAPSHOT" ###CHECK THIS
+SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_SNAPSHOT="2.3.0-STAGING-latest"
+SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE="2.3.0-STAGING-latest"  #Will use snapshot repo
+SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_RELEASE="2.3.0"
+
+#SDNC DB remote image and tag
+#The DB is part of SDNC so handled in the same way as SDNC
+SDNC_DB_IMAGE_BASE="mariadb"
+SDNC_DB_IMAGE_TAG_REMOTE_PROXY="10.5"
+
+# ICS image and tag - used e release
+ICS_IMAGE_BASE="o-ran-sc/nonrtric-information-coordinator-service"
+ICS_IMAGE_TAG_REMOTE_RELEASE_ORAN="1.2.0"
+#Note: Update var ICS_FEATURE_LEVEL if image version is changed
+
+# Control Panel image and tag - used e release
+CONTROL_PANEL_IMAGE_BASE="o-ran-sc/nonrtric-controlpanel"
+CONTROL_PANEL_IMAGE_TAG_REMOTE_RELEASE_ORAN="2.3.0"
+
+# Gateway image and tags - used e release
+NRT_GATEWAY_IMAGE_BASE="o-ran-sc/nonrtric-gateway"
+NRT_GATEWAY_IMAGE_TAG_REMOTE_RELEASE_ORAN="1.0.0"
+
+# RAPP Catalogue image and tags - used e release
+RAPP_CAT_IMAGE_BASE="o-ran-sc/nonrtric-r-app-catalogue"
+RAPP_CAT_IMAGE_TAG_REMOTE_RELEASE_ORAN="1.0.1"
+
+
+# Near RT RIC Simulator image and tags - used e release
+RIC_SIM_IMAGE_BASE="o-ran-sc/a1-simulator"
+RIC_SIM_IMAGE_TAG_REMOTE_RELEASE_ORAN="2.2.0"
+
+
+#Consul remote image and tag
+CONSUL_IMAGE_BASE="consul"
+CONSUL_IMAGE_TAG_REMOTE_PROXY="1.7.2"
+#No local image for Consul, remote image always used
+
+
+#CBS remote image and tag
+CBS_IMAGE_BASE="onap/org.onap.dcaegen2.platform.configbinding.app-app"
+CBS_IMAGE_TAG_REMOTE_RELEASE_ONAP="2.3.0"
+#No local image for CBS, remote image always used
+
+
+#MR stub image and tag
+MRSTUB_IMAGE_BASE="mrstub"
+MRSTUB_IMAGE_TAG_LOCAL="latest"
+#No remote image for MR stub, local image always used
+
+
+#Callback receiver image and tag
+CR_IMAGE_BASE="callback-receiver"
+CR_IMAGE_TAG_LOCAL="latest"
+#No remote image for CR, local image always used
+
+
+#Producer stub image and tag
+PROD_STUB_IMAGE_BASE="producer-stub"
+PROD_STUB_IMAGE_TAG_LOCAL="latest"
+#No remote image for producer stub, local image always used
+
+
+#Http proxy remote image and tag
+HTTP_PROXY_IMAGE_BASE="nodejs-http-proxy"
+HTTP_PROXY_IMAGE_TAG_LOCAL="latest"
+#No local image for http proxy, remote image always used
+
+#ONAP Zookeeper remote image and tag
+ONAP_ZOOKEEPER_IMAGE_BASE="onap/dmaap/zookeeper"
+ONAP_ZOOKEEPER_IMAGE_TAG_REMOTE_RELEASE_ONAP="6.1.0"
+#No local image for ONAP Zookeeper, remote image always used
+
+#ONAP Kafka remote image and tag
+ONAP_KAFKA_IMAGE_BASE="onap/dmaap/kafka111"
+ONAP_KAFKA_IMAGE_TAG_REMOTE_RELEASE_ONAP="1.1.1"
+#No local image for ONAP Kafka, remote image always used
+
+#ONAP DMAAP-MR remote image and tag
+ONAP_DMAAPMR_IMAGE_BASE="onap/dmaap/dmaap-mr"
+ONAP_DMAAPMR_IMAGE_TAG_REMOTE_RELEASE_ONAP="1.3.0"
+#No local image for ONAP DMAAP-MR, remote image always used
+
+#Kube proxy remote image and tag
+KUBE_PROXY_IMAGE_BASE="nodejs-kube-proxy"
+KUBE_PROXY_IMAGE_TAG_LOCAL="latest"
+#No remote image for kube proxy, local image always used
+
+#Kube proxy remote image and tag
+PVC_CLEANER_IMAGE_BASE="ubuntu"
+PVC_CLEANER_IMAGE_TAG_REMOTE_PROXY="20.10"
+#No local image for pvc cleaner, remote image always used
+
+# List of app short names produced by the project
+PROJECT_IMAGES_APP_NAMES="PA SDNC"
+
+# List of app short names which images pulled from ORAN
+ORAN_IMAGES_APP_NAMES="CP ICS RICSIM RC NGW"
+
+# List of app short names which images pulled from ONAP
+ONAP_IMAGES_APP_NAMES=""   # Not used
+
+
+########################################
+# Detailed settings per app
+########################################
+
+
+DOCKER_SIM_NWNAME="nonrtric-docker-net"                  # Name of docker private network
+
+KUBE_NONRTRIC_NAMESPACE="nonrtric"                       # Namespace for all nonrtric components
+KUBE_SIM_NAMESPACE="nonrtric-ft"                         # Namespace for simulators (except MR and RICSIM)
+KUBE_A1SIM_NAMESPACE="a1-sim"                            # Namespace for a1-p simulators (RICSIM)
+KUBE_ONAP_NAMESPACE="onap"                               # Namespace for onap (only message router)
+KUBE_SDNC_NAMESPACE="onap"                               # Namespace for sdnc
+
+POLICY_AGENT_EXTERNAL_PORT=8081                          # Policy Agent container external port (host -> container)
+POLICY_AGENT_INTERNAL_PORT=8081                          # Policy Agent container internal port (container -> container)
+POLICY_AGENT_EXTERNAL_SECURE_PORT=8433                   # Policy Agent container external secure port (host -> container)
+POLICY_AGENT_INTERNAL_SECURE_PORT=8433                   # Policy Agent container internal secure port (container -> container)
+POLICY_AGENT_APIS="V1 V2"                                # Supported northbound api versions
+PMS_VERSION="V2"                                         # Tested version of northbound API
+PMS_API_PREFIX="/a1-policy"                               # api url prefix, only for V2. Shall contain leading "/"
+
+POLICY_AGENT_APP_NAME="policymanagementservice"          # Name for Policy Agent container
+POLICY_AGENT_DISPLAY_NAME="Policy Management Service"
+POLICY_AGENT_HOST_MNT_DIR="./mnt"                        # Mounted dir, relative to compose file, on the host
+POLICY_AGENT_LOGPATH="/var/log/policy-agent/application.log" # Path the application log in the Policy Agent container
+POLICY_AGENT_APP_NAME_ALIAS="policy-agent-container"     # Alias name, name used by the control panel
+POLICY_AGENT_CONFIG_KEY="policy-agent"                   # Key for consul config
+POLICY_AGENT_PKG_NAME="org.onap.ccsdk.oran.a1policymanagementservice"  # Java base package name
+POLICY_AGENT_ACTUATOR="/actuator/loggers/$POLICY_AGENT_PKG_NAME" # Url for trace/debug
+POLICY_AGENT_ALIVE_URL="$PMS_API_PREFIX/v2/status"       # Base path for alive check
+POLICY_AGENT_COMPOSE_DIR="policy_agent"                  # Dir in simulator_group for docker-compose
+POLICY_AGENT_CONFIG_MOUNT_PATH="/opt/app/policy-agent/config" # Path in container for config file
+POLICY_AGENT_DATA_MOUNT_PATH="/opt/app/policy-agent/data" # Path in container for data file
+POLICY_AGENT_CONFIG_FILE="application.yaml"              # Container config file name
+POLICY_AGENT_DATA_FILE="application_configuration.json"  # Container data file name
+POLICY_AGENT_CONTAINER_MNT_DIR="/var/policy-management-service" # Mounted dir in the container
+
+ICS_APP_NAME="informationservice"                        # Name for ICS container
+ICS_DISPLAY_NAME="Enrichment Coordinator Service"        # Display name for ICS container
+ICS_EXTERNAL_PORT=8083                                   # ICS container external port (host -> container)
+ICS_INTERNAL_PORT=8083                                   # ICS container internal port (container -> container)
+ICS_EXTERNAL_SECURE_PORT=8434                            # ICS container external secure port (host -> container)
+ICS_INTERNAL_SECURE_PORT=8434                            # ICS container internal secure port (container -> container)
+
+ICS_LOGPATH="/var/log/information-coordinator-service/application.log" # Path the application log in the ICS container
+ICS_APP_NAME_ALIAS="information-service-container"       # Alias name, name used by the control panel
+ICS_HOST_MNT_DIR="./mnt"                                 # Mounted dir, relative to compose file, on the host
+ICS_CONTAINER_MNT_DIR="/var/information-coordinator-service" # Mounted dir in the container
+ICS_ACTUATOR="/actuator/loggers/org.oransc.information"  # Url for trace/debug
+ICS_CERT_MOUNT_DIR="./cert"
+ICS_ALIVE_URL="/status"                                  # Base path for alive check
+ICS_COMPOSE_DIR="ics"                                    # Dir in simulator_group for docker-compose
+ICS_CONFIG_MOUNT_PATH=/opt/app/information-coordinator-service/config # Internal container path for configuration
+ICS_CONFIG_FILE=application.yaml                         # Config file name
+ICS_VERSION="V1-2"                                       # Version where the types are added in the producer registration
+ICS_FEATURE_LEVEL="INFO-TYPES"                           # Space separated list of features
+
+MR_DMAAP_APP_NAME="message-router"                       # Name for the Dmaap MR
+MR_STUB_APP_NAME="mr-stub"                               # Name of the MR stub
+MR_DMAAP_DISPLAY_NAME="DMAAP Message Router"
+MR_STUB_DISPLAY_NAME="Message Router stub"
+MR_STUB_CERT_MOUNT_DIR="./cert"
+MR_EXTERNAL_PORT=3904                                    # MR dmaap/stub container external port
+MR_INTERNAL_PORT=3904                                    # MR dmaap/stub container internal port
+MR_EXTERNAL_SECURE_PORT=3905                             # MR dmaap/stub container external secure port
+MR_INTERNAL_SECURE_PORT=3905                             # MR dmaap/stub container internal secure port
+MR_DMAAP_LOCALHOST_PORT=3904                             # MR stub container external port (host -> container)
+MR_STUB_LOCALHOST_PORT=3908                              # MR stub container external port (host -> container)
+MR_DMAAP_LOCALHOST_SECURE_PORT=3905                      # MR stub container internal port (container -> container)
+MR_STUB_LOCALHOST_SECURE_PORT=3909                       # MR stub container external secure port (host -> container)
+MR_READ_TOPIC="A1-POLICY-AGENT-READ"                     # Read topic
+MR_WRITE_TOPIC="A1-POLICY-AGENT-WRITE"                   # Write topic
+MR_READ_URL="/events/$MR_READ_TOPIC/users/policy-agent?timeout=15000&limit=100" # Path to read messages from MR
+MR_WRITE_URL="/events/$MR_WRITE_TOPIC"                   # Path to write messages to MR
+MR_STUB_ALIVE_URL="/"                                    # Base path for mr stub alive check
+MR_DMAAP_ALIVE_URL="/topics"                             # Base path for dmaap-mr alive check
+MR_DMAAP_COMPOSE_DIR="dmaapmr"                           # Dir in simulator_group for dmaap mr for - docker-compose
+MR_STUB_COMPOSE_DIR="mrstub"                             # Dir in simulator_group for mr stub for - docker-compose
+MR_KAFKA_APP_NAME="message-router-kafka"                 # Kafka app name, if just named "kafka" the image will not start...
+MR_KAFKA_PORT=9092                                       # Kafka port number
+MR_KAFKA_DOCKER_LOCALHOST_PORT=30098                     # Kafka port number for docker localhost
+MR_KAFKA_KUBE_NODE_PORT=30099                            # Kafka node port number for kube
+MR_ZOOKEEPER_APP_NAME="zookeeper"                        # Zookeeper app name
+MR_ZOOKEEPER_PORT="2181"                                 # Zookeeper port number
+MR_DMAAP_HOST_MNT_DIR="/mnt"                             # Basedir localhost for mounted files
+MR_DMAAP_HOST_CONFIG_DIR="/configs1"                      # Config files dir on localhost
+
+CR_APP_NAME="callback-receiver"                          # Name for the Callback receiver
+CR_DISPLAY_NAME="Callback Reciever"
+CR_EXTERNAL_PORT=8090                                    # Callback receiver container external port (host -> container)
+CR_INTERNAL_PORT=8090                                    # Callback receiver container internal port (container -> container)
+CR_EXTERNAL_SECURE_PORT=8091                             # Callback receiver container external secure port (host -> container)
+CR_INTERNAL_SECURE_PORT=8091                             # Callback receiver container internal secure port (container -> container)
+CR_APP_NAME="callback-receiver"                          # Name for the Callback receiver
+CR_APP_CALLBACK="/callbacks"                             # Url for callbacks
+CR_APP_CALLBACK_MR="/callbacks-mr"                       # Url for callbacks (data from mr which contains string encoded jsons in a json arr)
+CR_APP_CALLBACK_TEXT="/callbacks-text"                   # Url for callbacks (data containing text data)
+CR_ALIVE_URL="/reset"                                    # Base path for alive check
+CR_COMPOSE_DIR="cr"                                      # Dir in simulator_group for docker-compose
+
+PROD_STUB_APP_NAME="producer-stub"                       # Name for the Producer stub
+PROD_STUB_DISPLAY_NAME="Producer Stub"
+PROD_STUB_EXTERNAL_PORT=8092                             # Producer stub container external port (host -> container)
+PROD_STUB_INTERNAL_PORT=8092                             # Producer stub container internal port (container -> container)
+PROD_STUB_EXTERNAL_SECURE_PORT=8093                      # Producer stub container external secure port (host -> container)
+PROD_STUB_INTERNAL_SECURE_PORT=8093                      # Producer stub container internal secure port (container -> container)
+PROD_STUB_JOB_CALLBACK="/callbacks/job"                  # Callback path for job create/update/delete
+PROD_STUB_SUPERVISION_CALLBACK="/callbacks/supervision"  # Callback path for producre supervision
+PROD_STUB_ALIVE_URL="/"                                  # Base path for alive check
+PROD_STUB_COMPOSE_DIR="prodstub"                         # Dir in simulator_group for docker-compose
+
+CONSUL_HOST="consul-server"                              # Host name of consul
+CONSUL_DISPLAY_NAME="Consul"
+CONSUL_EXTERNAL_PORT=8500                                # Consul container external port (host -> container)
+CONSUL_INTERNAL_PORT=8500                                # Consul container internal port (container -> container)
+CONSUL_APP_NAME="polman-consul"                          # Name for consul container
+CONSUL_ALIVE_URL="/ui/dc1/kv"                            # Base path for alive check
+CONSUL_CBS_COMPOSE_DIR="consul_cbs"                      # Dir in simulator group for docker compose
+
+CBS_APP_NAME="polman-cbs"                                # Name for CBS container
+CBS_DISPLAY_NAME="Config Binding Service"
+CBS_EXTERNAL_PORT=10000                                  # CBS container external port (host -> container)
+CBS_INTERNAL_PORT=10000                                  # CBS container internal port (container -> container)
+CONFIG_BINDING_SERVICE="config-binding-service"          # Host name of CBS
+CBS_ALIVE_URL="/healthcheck"                             # Base path for alive check
+
+RIC_SIM_DISPLAY_NAME="Near-RT RIC A1 Simulator"
+RIC_SIM_BASE="g"                                         # Base name of the RIC Simulator container, shall be the group code
+                                                         # Note, a prefix is added to each container name by the .env file in the 'ric' dir
+RIC_SIM_PREFIX="ricsim"                                  # Prefix added to ric container name, added in the .env file in the 'ric' dir
+                                                         # This prefix can be changed from the command line
+RIC_SIM_INTERNAL_PORT=8085                               # RIC Simulator container internal port (container -> container).
+                                                         # (external ports allocated by docker)
+RIC_SIM_INTERNAL_SECURE_PORT=8185                        # RIC Simulator container internal secure port (container -> container).
+                                                         # (external ports allocated by docker)
+RIC_SIM_CERT_MOUNT_DIR="./cert"
+RIC_SIM_COMPOSE_DIR="ric"                                # Dir in simulator group for docker compose
+RIC_SIM_ALIVE_URL="/"
+RIC_SIM_COMMON_SVC_NAME=""                               # Name of svc if one common svc is used for all ric sim groups (stateful sets)
+
+SDNC_APP_NAME="a1controller"                             # Name of the SNDC A1 Controller container
+SDNC_DISPLAY_NAME="SDNC A1 Controller"
+SDNC_EXTERNAL_PORT=8282                                  # SNDC A1 Controller container external port (host -> container)
+SDNC_INTERNAL_PORT=8181                                  # SNDC A1 Controller container internal port (container -> container)
+SDNC_EXTERNAL_SECURE_PORT=8443                           # SNDC A1 Controller container external securee port (host -> container)
+SDNC_INTERNAL_SECURE_PORT=8443                           # SNDC A1 Controller container internal secure port (container -> container)
+SDNC_DB_APP_NAME="sdncdb"                                # Name of the SDNC DB container
+SDNC_A1_TRUSTSTORE_PASSWORD="a1adapter"                  # SDNC truststore password
+SDNC_USER="admin"                                        # SDNC username
+SDNC_PWD="admin"                                         # SNDC PWD
+SDNC_PWD="Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U"   # SNDC PWD
+#SDNC_API_URL="/rests/operations/A1-ADAPTER-API:"         # Base url path for SNDC API (for upgraded sdnc)
+SDNC_API_URL="/restconf/operations/A1-ADAPTER-API:"      # Base url path for SNDC API
+SDNC_ALIVE_URL="/apidoc/explorer/"                       # Base url path for SNDC API docs (for alive check)
+SDNC_COMPOSE_DIR="sdnc"
+SDNC_COMPOSE_FILE="docker-compose-2.yml"
+SDNC_KUBE_APP_FILE="app2.yaml"
+SDNC_KARAF_LOG="/opt/opendaylight/data/log/karaf.log"    # Path to karaf log
+#SDNC_RESPONSE_JSON_KEY="A1-ADAPTER-API:output"           # Key name for output json in replies from sdnc (for upgraded sdnc)
+SDNC_RESPONSE_JSON_KEY="output"                          # Key name for output json in replies from sdnc
+SDNC_FEATURE_LEVEL="TRANS_RESP_CODE"                     # Space separated list of features
+                                                         # TRANS_RESP_CODE: SDNC return southbound response code
+
+RAPP_CAT_APP_NAME="rappcatalogueservice"                 # Name for the RAPP Catalogue
+RAPP_CAT_DISPLAY_NAME="RAPP Catalogue Service"
+RAPP_CAT_EXTERNAL_PORT=8680                              # RAPP Catalogue container external port (host -> container)
+RAPP_CAT_INTERNAL_PORT=8680                              # RAPP Catalogue container internal port (container -> container)
+RAPP_CAT_EXTERNAL_SECURE_PORT=8633                       # RAPP Catalogue container external secure port (host -> container)
+RAPP_CAT_INTERNAL_SECURE_PORT=8633                       # RAPP Catalogue container internal secure port (container -> container)
+RAPP_CAT_ALIVE_URL="/services"                           # Base path for alive check
+RAPP_CAT_COMPOSE_DIR="rapp_catalogue"                    # Dir in simulator_group for docker-compose
+
+CONTROL_PANEL_APP_NAME="controlpanel"                    # Name of the Control Panel container
+CONTROL_PANEL_DISPLAY_NAME="Non-RT RIC Control Panel"
+CONTROL_PANEL_EXTERNAL_PORT=8080                         # Control Panel container external port (host -> container)
+CONTROL_PANEL_INTERNAL_PORT=8080                         # Control Panel container internal port (container -> container)
+CONTROL_PANEL_EXTERNAL_SECURE_PORT=8880                  # Control Panel container external port (host -> container)
+CONTROL_PANEL_INTERNAL_SECURE_PORT=8082                  # Control Panel container intternal port (container -> container)
+CONTROL_PANEL_LOGPATH="/logs/nonrtric-controlpanel.log"  # Path the application log in the Control Panel container
+CONTROL_PANEL_ALIVE_URL="/"                              # Base path for alive check
+CONTROL_PANEL_COMPOSE_DIR="control_panel"                # Dir in simulator_group for docker-compose
+CONTROL_PANEL_CONFIG_MOUNT_PATH=/maven                   # Container internal path for config
+CONTROL_PANEL_CONFIG_FILE=application.properties         # Config file name
+CONTROL_PANEL_HOST_MNT_DIR="./mnt"                       # Mounted dir, relative to compose file, on the host
+
+NRT_GATEWAY_APP_NAME="nonrtricgateway"                   # Name of the Gateway container
+NRT_GATEWAY_DISPLAY_NAME="NonRT-RIC Gateway"
+NRT_GATEWAY_EXTERNAL_PORT=9090                           # Gateway container external port (host -> container)
+NRT_GATEWAY_INTERNAL_PORT=9090                           # Gateway container internal port (container -> container)
+NRT_GATEWAY_EXTERNAL_SECURE_PORT=9091                    # Gateway container external port (host -> container)
+NRT_GATEWAY_INTERNAL_SECURE_PORT=9091                    # Gateway container internal port (container -> container)
+NRT_GATEWAY_LOGPATH="/var/log/nonrtric-gateway/application.log" # Path the application log in the Gateway container
+NRT_GATEWAY_HOST_MNT_DIR="./mnt"                         # Mounted dir, relative to compose file, on the host
+NRT_GATEWAY_ALIVE_URL="/actuator/metrics"                # Base path for alive check
+NRT_GATEWAY_COMPOSE_DIR="ngw"                            # Dir in simulator_group for docker-compose
+NRT_GATEWAY_CONFIG_MOUNT_PATH=/opt/app/nonrtric-gateway/config  # Container internal path for config
+NRT_GATEWAY_CONFIG_FILE=application.yaml                 # Config file name
+NRT_GATEWAY_PKG_NAME="org.springframework.cloud.gateway" # Java base package name
+NRT_GATEWAY_ACTUATOR="/actuator/loggers/$NRT_GATEWAY_PKG_NAME" # Url for trace/debug
+
+HTTP_PROXY_APP_NAME="httpproxy"                          # Name of the Http Proxy container
+HTTP_PROXY_DISPLAY_NAME="Http Proxy"
+HTTP_PROXY_EXTERNAL_PORT=8740                            # Http Proxy container external port (host -> container)
+HTTP_PROXY_INTERNAL_PORT=8080                            # Http Proxy container internal port (container -> container)
+HTTP_PROXY_EXTERNAL_SECURE_PORT=8742                     # Http Proxy container external secure port (host -> container)
+HTTP_PROXY_INTERNAL_SECURE_PORT=8433                     # Http Proxy container internal secure port (container -> container)
+HTTP_PROXY_WEB_EXTERNAL_PORT=8741                        # Http Proxy container external port (host -> container)
+HTTP_PROXY_WEB_INTERNAL_PORT=8081                        # Http Proxy container internal port (container -> container)
+HTTP_PROXY_WEB_EXTERNAL_SECURE_PORT=8743                 # Http Proxy container external secure port (host -> container)
+HTTP_PROXY_WEB_INTERNAL_SECURE_PORT=8434                 # Http Proxy container internal secure port (container -> container
+HTTP_PROXY_CONFIG_PORT=0                                 # Port number for proxy config, will be set if proxy is started
+HTTP_PROXY_CONFIG_HOST_NAME=""                           # Proxy host, will be set if proxy is started
+HTTP_PROXY_ALIVE_URL="/"                                 # Base path for alive check
+HTTP_PROXY_COMPOSE_DIR="httpproxy"                       # Dir in simulator_group for docker-compose
+HTTP_PROXY_BUILD_DIR="http-https-proxy"                  # Dir in simulator_group for image build - note, reuses source from kubeproxy
+
+KUBE_PROXY_APP_NAME="kubeproxy"                          # Name of the Kube Http Proxy container
+KUBE_PROXY_DISPLAY_NAME="Kube Http Proxy"
+KUBE_PROXY_EXTERNAL_PORT=8730                            # Kube Http Proxy container external port (host -> container)
+KUBE_PROXY_INTERNAL_PORT=8080                            # Kube Http Proxy container internal port (container -> container)
+KUBE_PROXY_EXTERNAL_SECURE_PORT=8782                     # Kube Proxy container external secure port (host -> container)
+KUBE_PROXY_INTERNAL_SECURE_PORT=8433                     # Kube Proxy container internal secure port (container -> container)
+KUBE_PROXY_WEB_EXTERNAL_PORT=8731                        # Kube Http Proxy container external port (host -> container)
+KUBE_PROXY_WEB_INTERNAL_PORT=8081                        # Kube Http Proxy container internal port (container -> container)
+KUBE_PROXY_WEB_EXTERNAL_SECURE_PORT=8783                 # Kube Proxy container external secure port (host -> container)
+KUBE_PROXY_WEB_INTERNAL_SECURE_PORT=8434                 # Kube Proxy container internal secure port (container -> container
+
+KUBE_PROXY_DOCKER_EXTERNAL_PORT=8732                     # Kube Http Proxy container external port, doocker (host -> container)
+KUBE_PROXY_DOCKER_EXTERNAL_SECURE_PORT=8784              # Kube Proxy container external secure port, doocker (host -> container)
+KUBE_PROXY_WEB_DOCKER_EXTERNAL_PORT=8733                 # Kube Http Proxy container external port, doocker (host -> container)
+KUBE_PROXY_WEB_DOCKER_EXTERNAL_SECURE_PORT=8785          # Kube Proxy container external secure port, doocker (host -> container)
+
+KUBE_PROXY_PATH=""                                       # Proxy url path, will be set if proxy is started
+KUBE_PROXY_ALIVE_URL="/"                                 # Base path for alive check
+KUBE_PROXY_COMPOSE_DIR="kubeproxy"                       # Dir in simulator_group for docker-compose
+
+PVC_CLEANER_APP_NAME="pvc-cleaner"                      # Name for Persistent Volume Cleaner container
+PVC_CLEANER_DISPLAY_NAME="Persistent Volume Cleaner"    # Display name for Persistent Volume Cleaner
+PVC_CLEANER_COMPOSE_DIR="pvc-cleaner"                   # Dir in simulator_group for yamls
+
+########################################
+# Setting for common curl-base function
+########################################
+
+UUID=""                                                  # UUID used as prefix to the policy id to simulate a real UUID
+                                                         # Testscript need to set the UUID to use other this empty prefix is used
index 65dd0af..245dec8 100755 (executable)
@@ -59,7 +59,7 @@ NEXUS_RELEASE_REPO_ORAN=$NEXUS_RELEASE_REPO
 
 
 # Policy Agent base image and tags
-POLICY_AGENT_IMAGE_BASE="o-ran-sc/nonrtric-policy-agent"
+POLICY_AGENT_IMAGE_BASE="o-ran-sc/nonrtric-a1-policy-management-service"
 POLICY_AGENT_IMAGE_TAG_LOCAL="2.3.0-SNAPSHOT"
 POLICY_AGENT_IMAGE_TAG_REMOTE_SNAPSHOT="2.3.0-SNAPSHOT"
 POLICY_AGENT_IMAGE_TAG_REMOTE="2.3.0"
@@ -83,10 +83,10 @@ CONTROL_PANEL_IMAGE_TAG_REMOTE_RELEASE="2.3.0"
 
 # Gateway image and tags
 NRT_GATEWAY_IMAGE_BASE="o-ran-sc/nonrtric-gateway"
-NRT_GATEWAY_IMAGE_TAG_LOCAL="1.1.0-SNAPSHOT"
-NRT_GATEWAY_IMAGE_TAG_REMOTE_SNAPSHOT="1.1.0-SNAPSHOT"
-NRT_GATEWAY_IMAGE_TAG_REMOTE="1.1.0"
-NRT_GATEWAY_IMAGE_TAG_REMOTE_RELEASE="1.1.0"
+NRT_GATEWAY_IMAGE_TAG_LOCAL="1.0.0-SNAPSHOT"
+NRT_GATEWAY_IMAGE_TAG_REMOTE_SNAPSHOT="1.0.0-SNAPSHOT"
+NRT_GATEWAY_IMAGE_TAG_REMOTE="1.0.0"
+NRT_GATEWAY_IMAGE_TAG_REMOTE_RELEASE="1.0.0"
 
 
 # SDNC A1 Controller image and tags - Note using released honolulu ONAP image
@@ -116,10 +116,10 @@ SDNC_DB_IMAGE_TAG_REMOTE_PROXY="10.5"
 
 # RAPP Catalogue image and tags
 RAPP_CAT_IMAGE_BASE="o-ran-sc/nonrtric-r-app-catalogue"
-RAPP_CAT_IMAGE_TAG_LOCAL="1.1.0-SNAPSHOT"
-RAPP_CAT_IMAGE_TAG_REMOTE_SNAPSHOT="1.1.0-SNAPSHOT"
-RAPP_CAT_IMAGE_TAG_REMOTE="1.1.0"
-RAPP_CAT_IMAGE_TAG_REMOTE_RELEASE="1.1.0"
+RAPP_CAT_IMAGE_TAG_LOCAL="1.0.1-SNAPSHOT"
+RAPP_CAT_IMAGE_TAG_REMOTE_SNAPSHOT="1.0.1-SNAPSHOT"
+RAPP_CAT_IMAGE_TAG_REMOTE="1.0.1"
+RAPP_CAT_IMAGE_TAG_REMOTE_RELEASE="1.0.1"
 
 
 # Near RT RIC Simulator image and tags - same version as cherry
@@ -143,6 +143,13 @@ DMAAP_ADP_IMAGE_TAG_REMOTE_SNAPSHOT="1.0.0-SNAPSHOT"
 DMAAP_ADP_IMAGE_TAG_REMOTE="1.0.0"
 DMAAP_ADP_IMAGE_TAG_REMOTE_RELEASE="1.0.0"
 
+# Helm Manager
+HELM_MANAGER_IMAGE_BASE="o-ran-sc/nonrtric-helm-manager"
+HELM_MANAGER_IMAGE_TAG_LOCAL="1.1.0-SNAPSHOT"
+HELM_MANAGER_IMAGE_TAG_REMOTE_SNAPSHOT="1.1.0-SNAPSHOT"
+HELM_MANAGER_IMAGE_TAG_REMOTE="1.1.0"
+HELM_MANAGER_IMAGE_TAG_REMOTE_RELEASE="1.1.0"
+
 #Consul remote image and tag
 CONSUL_IMAGE_BASE="consul"
 CONSUL_IMAGE_TAG_REMOTE_PROXY="1.7.2"
@@ -207,8 +214,13 @@ KAFKAPC_IMAGE_BASE="kafka-procon"
 KAFKAPC_IMAGE_TAG_LOCAL="latest"
 #No local image for pvc cleaner, remote image always used
 
+#PVC Cleaner remote image and tag
+CHART_MUS_IMAGE_BASE="ghcr.io/helm/chartmuseum"
+CHART_MUS_IMAGE_TAG_REMOTE_OTHER="v0.13.1"
+#No local image for chart museum, remote image always used
+
 # List of app short names produced by the project
-PROJECT_IMAGES_APP_NAMES="PA ICS CP RC RICSIM NGW DMAAPADP DMAAPMED"  # Add SDNC here if oran image is used
+PROJECT_IMAGES_APP_NAMES="PA ICS CP RC RICSIM NGW DMAAPADP DMAAPMED HELMMANAGER"  # Add SDNC here if oran image is used
 
 # List of app short names which images pulled from ORAN
 ORAN_IMAGES_APP_NAMES=""  # Not used
@@ -538,6 +550,28 @@ KAFKAPC_INTERNAL_SECURE_PORT=8091                        # Kafka procon containe
 KAFKAPC_ALIVE_URL="/"                               # Base path for alive check
 KAFKAPC_COMPOSE_DIR="kafka-procon"                       # Dir in simulator_group for docker-compose
 KAFKAPC_BUILD_DIR="kafka-procon"                         # Build dir
+
+CHART_MUS_APP_NAME="chartmuseum"                         # Name for the chart museum app
+CHART_MUS_DISPLAY_NAME="Chart Museum"
+CHART_MUS_EXTERNAL_PORT=8201                             # chart museum container external port (host -> container)
+CHART_MUS_INTERNAL_PORT=8080                             # chart museum container internal port (container -> container)
+CHART_MUS_ALIVE_URL="/health"                            # Base path for alive check
+CHART_MUS_COMPOSE_DIR="chartmuseum"                      # Dir in simulator_group for docker-compose
+CHART_MUS_CHART_CONTR_CHARTS="/tmp/charts"               # Local dir container for charts
+
+HELM_MANAGER_APP_NAME="helmmanagerservice"               # Name for the helm manager app
+HELM_MANAGER_DISPLAY_NAME="Helm Manager"
+HELM_MANAGER_EXTERNAL_PORT=8211                          # helm manager container external port (host -> container)
+HELM_MANAGER_INTERNAL_PORT=8083                          # helm manager container internal port (container -> container)
+HELM_MANAGER_EXTERNAL_SECURE_PORT=8212                   # helm manager container external secure port (host -> container)
+HELM_MANAGER_INTERNAL_SECURE_PORT=8443                   # helm manager container internal secure port (container -> container)
+HELM_MANAGER_CLUSTER_ROLE=cluster-admin                  # Kubernetes cluster role for helm manager
+HELM_MANAGER_SA_NAME=helm-manager-sa                     # Service account name
+HELM_MANAGER_ALIVE_URL="/helm/charts"                    # Base path for alive check
+HELM_MANAGER_COMPOSE_DIR="helmmanager"                   # Dir in simulator_group for docker-compose
+HELM_MANAGER_USER="helmadmin"
+HELM_MANAGER_PWD="itisasecret"
+
 ########################################
 # Setting for common curl-base function
 ########################################
diff --git a/test/common/test_env-oran-f-release.sh b/test/common/test_env-oran-f-release.sh
new file mode 100755 (executable)
index 0000000..0ba821e
--- /dev/null
@@ -0,0 +1,579 @@
+#!/bin/bash
+
+#  ============LICENSE_START===============================================
+#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  ========================================================================
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#  ============LICENSE_END=================================================
+#
+#Profile for ORAN Cherry
+TEST_ENV_PROFILE="ORAN-F-RELEASE"
+FLAVOUR="ORAN"
+
+########################################
+## Nexus repo settings
+########################################
+
+# Nexus repos for developed images
+NEXUS_PROXY_REPO="nexus3.o-ran-sc.org:10001/"
+NEXUS_RELEASE_REPO="nexus3.o-ran-sc.org:10002/"
+NEXUS_SNAPSHOT_REPO="nexus3.o-ran-sc.org:10003/"
+NEXUS_STAGING_REPO="nexus3.o-ran-sc.org:10004/"
+
+# Nexus repos for images used by test (not developed by the project)
+NEXUS_RELEASE_REPO_ONAP="nexus3.onap.org:10002/"  # Only for released ONAP images
+NEXUS_RELEASE_REPO_ORAN=$NEXUS_RELEASE_REPO
+
+########################################
+# Set up of image and tags for the test.
+########################################
+
+# NOTE: One environment variable containing the image name and tag is create by the test script
+# for each image from the env variables below.
+# The variable is created by removing the suffix "_BASE" from the base image variable name.
+# Example: POLICY_AGENT_IMAGE_BASE -> POLICY_AGENT_IMAGE
+# This var will point to the local or remote image depending on cmd line arguments.
+# In addition, the repo and the image tag version are selected from the list of image tags based on the cmd line argurment.
+# For images built by the script, only tag #1 shall be specified
+# For project images, only tag #1, #2, #3 and #4 shall be specified
+# For ORAN images (non project), only tag #5 shall be specified
+# For ONAP images (non project), only tag #6 shall be specified
+# For all other images, only tag #7 shall be specified
+# 1 XXX_LOCAL: local images: <image-name>:<local-tag>
+# 2 XXX_REMOTE_SNAPSHOT: snapshot images: <snapshot-nexus-repo><image-name>:<snapshot-tag>
+# 3 XXX_REMOTE: staging images: <staging-nexus-repo><image-name>:<staging-tag>
+# 4 XXX_REMOTE_RELEASE: release images: <release-nexus-repo><image-name>:<release-tag>
+# 5 XXX_REMOTE_RELEASE_ORAN: ORAN release images: <oran-release-nexus-repo><image-name>:<release-tag>
+# 6 XXX_REMOTE_RELEASE_ONAP: ONAP release images: <onap-release-nexus-repo><image-name>:<release-tag>
+# 7 XXX_PROXY: other images, not produced by the project: <proxy-nexus-repo><mage-name>:<proxy-tag>
+
+
+# Policy Agent base image and tags
+POLICY_AGENT_IMAGE_BASE="o-ran-sc/nonrtric-a1-policy-management-service"
+POLICY_AGENT_IMAGE_TAG_LOCAL="2.3.0-SNAPSHOT"
+POLICY_AGENT_IMAGE_TAG_REMOTE_SNAPSHOT="2.3.0-SNAPSHOT"
+POLICY_AGENT_IMAGE_TAG_REMOTE="2.3.0"
+POLICY_AGENT_IMAGE_TAG_REMOTE_RELEASE="2.3.0"
+
+# ICS image and tags
+ICS_IMAGE_BASE="o-ran-sc/nonrtric-information-coordinator-service"
+ICS_IMAGE_TAG_LOCAL="1.2.0-SNAPSHOT"
+ICS_IMAGE_TAG_REMOTE_SNAPSHOT="1.2.0-SNAPSHOT"
+ICS_IMAGE_TAG_REMOTE="1.2.0"
+ICS_IMAGE_TAG_REMOTE_RELEASE="1.2.0"
+#Note: Update var ICS_FEATURE_LEVEL if image version is changed
+
+#Control Panel image and tags
+CONTROL_PANEL_IMAGE_BASE="o-ran-sc/nonrtric-controlpanel"
+CONTROL_PANEL_IMAGE_TAG_LOCAL="2.3.0-SNAPSHOT"
+CONTROL_PANEL_IMAGE_TAG_REMOTE_SNAPSHOT="2.3.0-SNAPSHOT"
+CONTROL_PANEL_IMAGE_TAG_REMOTE="2.3.0"
+CONTROL_PANEL_IMAGE_TAG_REMOTE_RELEASE="2.3.0"
+
+
+# Gateway image and tags
+NRT_GATEWAY_IMAGE_BASE="o-ran-sc/nonrtric-gateway"
+NRT_GATEWAY_IMAGE_TAG_LOCAL="1.0.0-SNAPSHOT"
+NRT_GATEWAY_IMAGE_TAG_REMOTE_SNAPSHOT="1.0.0-SNAPSHOT"
+NRT_GATEWAY_IMAGE_TAG_REMOTE="1.0.0"
+NRT_GATEWAY_IMAGE_TAG_REMOTE_RELEASE="1.0.0"
+
+
+# SDNC A1 Controller image and tags - Note using released honolulu ONAP image
+SDNC_A1_CONTROLLER_IMAGE_BASE="onap/sdnc-image"
+SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_RELEASE_ONAP="2.1.6"
+#No local image for ONAP SDNC, remote release image always used
+
+# ORAN SDNC adapter kept as reference
+# SDNC A1 Controller image and tags - still using cherry version, no new version for D-Release
+#SDNC_A1_CONTROLLER_IMAGE_BASE="o-ran-sc/nonrtric-a1-controller"
+#SDNC_A1_CONTROLLER_IMAGE_TAG_LOCAL="2.0.1-SNAPSHOT"
+#SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_SNAPSHOT="2.0.1-SNAPSHOT"
+#SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE="2.0.1"
+#SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_RELEASE="2.0.1"
+
+#SDNC DB remote image and tag
+#The DB is part of SDNC so handled in the same way as SDNC
+SDNC_DB_IMAGE_BASE="mariadb"
+SDNC_DB_IMAGE_TAG_REMOTE_PROXY="10.5"
+
+#Older SDNC db image kept for reference
+#SDNC DB remote image and tag
+#SDNC_DB_IMAGE_BASE="mysql/mysql-server"
+#SDNC_DB_IMAGE_TAG_REMOTE_PROXY="5.6"
+#No local image for SSDNC DB, remote image always used
+
+
+# RAPP Catalogue image and tags
+RAPP_CAT_IMAGE_BASE="o-ran-sc/nonrtric-r-app-catalogue"
+RAPP_CAT_IMAGE_TAG_LOCAL="1.0.1-SNAPSHOT"
+RAPP_CAT_IMAGE_TAG_REMOTE_SNAPSHOT="1.0.1-SNAPSHOT"
+RAPP_CAT_IMAGE_TAG_REMOTE="1.0.1"
+RAPP_CAT_IMAGE_TAG_REMOTE_RELEASE="1.0.1"
+
+
+# Near RT RIC Simulator image and tags - same version as cherry
+RIC_SIM_IMAGE_BASE="o-ran-sc/a1-simulator"
+RIC_SIM_IMAGE_TAG_LOCAL="latest"
+RIC_SIM_IMAGE_TAG_REMOTE_SNAPSHOT="2.2.0-SNAPSHOT"
+RIC_SIM_IMAGE_TAG_REMOTE="2.2.0"
+RIC_SIM_IMAGE_TAG_REMOTE_RELEASE="2.2.0"
+
+# DMAAP Mediator Service
+DMAAP_MED_IMAGE_BASE="o-ran-sc/nonrtric-dmaap-mediator-producer"
+DMAAP_MED_IMAGE_TAG_LOCAL="1.0.0-SNAPSHOT"
+DMAAP_MED_IMAGE_TAG_REMOTE_SNAPSHOT="1.0.0-SNAPSHOT"
+DMAAP_MED_IMAGE_TAG_REMOTE="1.0.0"
+DMAAP_MED_IMAGE_TAG_REMOTE_RELEASE="1.0.0"
+
+# DMAAP Adapter Service
+DMAAP_ADP_IMAGE_BASE="o-ran-sc/nonrtric-dmaap-adaptor"
+DMAAP_ADP_IMAGE_TAG_LOCAL="1.0.0-SNAPSHOT"
+DMAAP_ADP_IMAGE_TAG_REMOTE_SNAPSHOT="1.0.0-SNAPSHOT"
+DMAAP_ADP_IMAGE_TAG_REMOTE="1.0.0"
+DMAAP_ADP_IMAGE_TAG_REMOTE_RELEASE="1.0.0"
+
+# Helm Manager
+HELM_MANAGER_IMAGE_BASE="o-ran-sc/nonrtric-helm-manager"
+HELM_MANAGER_IMAGE_TAG_LOCAL="1.2.0-SNAPSHOT"
+HELM_MANAGER_IMAGE_TAG_REMOTE_SNAPSHOT="1.2.0-SNAPSHOT"
+HELM_MANAGER_IMAGE_TAG_REMOTE="1.2.0"
+HELM_MANAGER_IMAGE_TAG_REMOTE_RELEASE="1.2.0"
+
+#Consul remote image and tag
+CONSUL_IMAGE_BASE="consul"
+CONSUL_IMAGE_TAG_REMOTE_PROXY="1.7.2"
+#No local image for Consul, remote image always used
+
+
+#CBS remote image and tag
+CBS_IMAGE_BASE="onap/org.onap.dcaegen2.platform.configbinding.app-app"
+CBS_IMAGE_TAG_REMOTE_RELEASE_ONAP="2.3.0"
+#No local image for CBS, remote image always used
+
+
+#MR stub image and tag
+MRSTUB_IMAGE_BASE="mrstub"
+MRSTUB_IMAGE_TAG_LOCAL="latest"
+#No remote image for MR stub, local image always used
+
+
+#Callback receiver image and tag
+CR_IMAGE_BASE="callback-receiver"
+CR_IMAGE_TAG_LOCAL="latest"
+#No remote image for CR, local image always used
+
+
+#Producer stub image and tag
+PROD_STUB_IMAGE_BASE="producer-stub"
+PROD_STUB_IMAGE_TAG_LOCAL="latest"
+#No remote image for producer stub, local image always used
+
+#Http proxy remote image and tag
+HTTP_PROXY_IMAGE_BASE="nodejs-http-proxy"
+HTTP_PROXY_IMAGE_TAG_LOCAL="latest"
+#No local image for http proxy, remote image always used
+
+#ONAP Zookeeper remote image and tag
+ONAP_ZOOKEEPER_IMAGE_BASE="onap/dmaap/zookeeper"
+ONAP_ZOOKEEPER_IMAGE_TAG_REMOTE_RELEASE_ONAP="6.1.0"
+#No local image for ONAP Zookeeper, remote image always used
+
+#ONAP Kafka remote image and tag
+ONAP_KAFKA_IMAGE_BASE="onap/dmaap/kafka111"
+ONAP_KAFKA_IMAGE_TAG_REMOTE_RELEASE_ONAP="1.1.1"
+#No local image for ONAP Kafka, remote image always used
+
+#ONAP DMAAP-MR remote image and tag
+ONAP_DMAAPMR_IMAGE_BASE="onap/dmaap/dmaap-mr"
+ONAP_DMAAPMR_IMAGE_TAG_REMOTE_RELEASE_ONAP="1.3.0"
+#No local image for ONAP DMAAP-MR, remote image always used
+
+#Kube proxy remote image and tag
+KUBE_PROXY_IMAGE_BASE="nodejs-kube-proxy"
+KUBE_PROXY_IMAGE_TAG_LOCAL="latest"
+#No remote image for kube proxy, local image always used
+
+#PVC Cleaner remote image and tag
+PVC_CLEANER_IMAGE_BASE="ubuntu"
+PVC_CLEANER_IMAGE_TAG_REMOTE_PROXY="20.10"
+#No local image for pvc cleaner, remote image always used
+
+#Kafka Procon image and tag
+KAFKAPC_IMAGE_BASE="kafka-procon"
+KAFKAPC_IMAGE_TAG_LOCAL="latest"
+#No local image for pvc cleaner, remote image always used
+
+#PVC Cleaner remote image and tag
+CHART_MUS_IMAGE_BASE="ghcr.io/helm/chartmuseum"
+CHART_MUS_IMAGE_TAG_REMOTE_OTHER="v0.13.1"
+#No local image for chart museum, remote image always used
+
+# List of app short names produced by the project
+PROJECT_IMAGES_APP_NAMES="PA ICS CP RC RICSIM NGW DMAAPADP DMAAPMED HELMMANAGER"  # Add SDNC here if oran image is used
+
+# List of app short names which images pulled from ORAN
+ORAN_IMAGES_APP_NAMES=""  # Not used
+
+# List of app short names which images pulled from ONAP
+ONAP_IMAGES_APP_NAMES="CBS DMAAPMR SDNC"   # SDNC added as ONAP image
+
+
+########################################
+# Detailed settings per app
+########################################
+
+# Port number variables
+# =====================
+# Port number vars <name>_INTERNAL_PORT and <name>_INTERNAL_SECURE_PORT are set as pod/container port in kube and container port in docker
+#
+# Port number vars <name>_EXTERNAL_PORT and <name>_EXTERNAL_SECURE_PORT are set as svc port in kube and localhost port in docker
+#
+# For some components, eg. MR, can be represented as the MR-STUB and/or the DMAAP MR. For these components
+# special vars nameed <name>_LOSTHOST_PORT and <name>_LOCALHOST_SECURE_PORT are used as localhost ports instead of
+# name>_EXTERNAL_PORT and <name>_EXTERNAL_SECURE_PORT ports in docker in order to prevent overalapping ports on local host
+#
+# For KUBE PROXY there are special external port for docker as the proyx exposes also the kube svc port on localhost,
+# therefore a special set of external port are needed for docker <name>_DOCKER_EXTERNAL_PORT and <name>_DOCKER_EXTERNAL_SECURE_PORT
+
+DOCKER_SIM_NWNAME="nonrtric-docker-net"                  # Name of docker private network
+
+KUBE_NONRTRIC_NAMESPACE="nonrtric"                       # Namespace for all nonrtric components
+KUBE_SIM_NAMESPACE="nonrtric-ft"                         # Namespace for simulators (except MR and RICSIM)
+KUBE_A1SIM_NAMESPACE="a1-sim"                            # Namespace for a1-p simulators (RICSIM)
+KUBE_ONAP_NAMESPACE="onap"                               # Namespace for onap (only message router)
+KUBE_SDNC_NAMESPACE="onap"                               # Namespace for sdnc
+
+POLICY_AGENT_EXTERNAL_PORT=8081                          # Policy Agent container external port (host -> container)
+POLICY_AGENT_INTERNAL_PORT=8081                          # Policy Agent container internal port (container -> container)
+POLICY_AGENT_EXTERNAL_SECURE_PORT=8433                   # Policy Agent container external secure port (host -> container)
+POLICY_AGENT_INTERNAL_SECURE_PORT=8433                   # Policy Agent container internal secure port (container -> container)
+POLICY_AGENT_APIS="V1 V2"                                # Supported northbound api versions
+PMS_VERSION="V2"                                         # Tested version of northbound API
+PMS_API_PREFIX="/a1-policy"                              # api url prefix, only for V2
+
+POLICY_AGENT_APP_NAME="policymanagementservice"          # Name for Policy Agent container
+POLICY_AGENT_DISPLAY_NAME="Policy Management Service"
+POLICY_AGENT_HOST_MNT_DIR="./mnt"                        # Mounted dir, relative to compose file, on the host
+POLICY_AGENT_LOGPATH="/var/log/policy-agent/application.log" # Path the application log in the Policy Agent container
+POLICY_AGENT_APP_NAME_ALIAS="policy-agent-container"     # Alias name, name used by the control panel
+POLICY_AGENT_CONFIG_KEY="policy-agent"                   # Key for consul config
+POLICY_AGENT_PKG_NAME="org.onap.ccsdk.oran.a1policymanagementservice"  # Java base package name
+POLICY_AGENT_ACTUATOR="/actuator/loggers/$POLICY_AGENT_PKG_NAME" # Url for trace/debug
+POLICY_AGENT_ALIVE_URL="$PMS_API_PREFIX/v2/status"       # Base path for alive check
+POLICY_AGENT_COMPOSE_DIR="policy_agent"                  # Dir in simulator_group for docker-compose
+POLICY_AGENT_CONFIG_MOUNT_PATH="/opt/app/policy-agent/config" # Path in container for config file
+POLICY_AGENT_DATA_MOUNT_PATH="/opt/app/policy-agent/data" # Path in container for data file
+POLICY_AGENT_CONFIG_FILE="application.yaml"              # Container config file name
+POLICY_AGENT_DATA_FILE="application_configuration.json"  # Container data file name
+POLICY_AGENT_CONTAINER_MNT_DIR="/var/policy-management-service" # Mounted dir in the container
+
+ICS_APP_NAME="informationservice"                        # Name for ICS container
+ICS_DISPLAY_NAME="Information Coordinator Service"       # Display name for ICS container
+ICS_EXTERNAL_PORT=8083                                   # ICS container external port (host -> container)
+ICS_INTERNAL_PORT=8083                                   # ICS container internal port (container -> container)
+ICS_EXTERNAL_SECURE_PORT=8434                            # ICS container external secure port (host -> container)
+ICS_INTERNAL_SECURE_PORT=8434                            # ICS container internal secure port (container -> container)
+
+ICS_LOGPATH="/var/log/information-coordinator-service/application.log" # Path the application log in the ICS container
+ICS_APP_NAME_ALIAS="information-service-container"       # Alias name, name used by the control panel
+ICS_HOST_MNT_DIR="./mnt"                                 # Mounted db dir, relative to compose file, on the host
+ICS_CONTAINER_MNT_DIR="/var/information-coordinator-service" # Mounted dir in the container
+ICS_ACTUATOR="/actuator/loggers/org.oransc.information"  # Url for trace/debug
+ICS_CERT_MOUNT_DIR="./cert"
+ICS_ALIVE_URL="/status"                                  # Base path for alive check
+ICS_COMPOSE_DIR="ics"                                    # Dir in simulator_group for docker-compose
+ICS_CONFIG_MOUNT_PATH=/opt/app/information-coordinator-service/config # Internal container path for configuration
+ICS_CONFIG_FILE=application.yaml                         # Config file name
+ICS_VERSION="V1-2"                                       # Version where the types are decoupled from the producer registration
+ICS_FEATURE_LEVEL="INFO-TYPES TYPE-SUBSCRIPTIONS INFO-TYPE-INFO RESP_CODE_CHANGE_1"  # Space separated list of features
+
+MR_DMAAP_APP_NAME="message-router"                       # Name for the Dmaap MR
+MR_STUB_APP_NAME="mr-stub"                               # Name of the MR stub
+MR_DMAAP_DISPLAY_NAME="DMAAP Message Router"
+MR_STUB_DISPLAY_NAME="Message Router stub"
+MR_STUB_CERT_MOUNT_DIR="./cert"
+MR_EXTERNAL_PORT=3904                                    # MR dmaap/stub container external port
+MR_INTERNAL_PORT=3904                                    # MR dmaap/stub container internal port
+MR_EXTERNAL_SECURE_PORT=3905                             # MR dmaap/stub container external secure port
+MR_INTERNAL_SECURE_PORT=3905                             # MR dmaap/stub container internal secure port
+MR_DMAAP_LOCALHOST_PORT=3904                             # MR stub container external port (host -> container)
+MR_STUB_LOCALHOST_PORT=3908                              # MR stub container external port (host -> container)
+MR_DMAAP_LOCALHOST_SECURE_PORT=3905                      # MR stub container internal port (container -> container)
+MR_STUB_LOCALHOST_SECURE_PORT=3909                       # MR stub container external secure port (host -> container)
+MR_READ_TOPIC="A1-POLICY-AGENT-READ"                     # Read topic
+MR_WRITE_TOPIC="A1-POLICY-AGENT-WRITE"                   # Write topic
+MR_READ_URL="/events/$MR_READ_TOPIC/users/policy-agent?timeout=15000&limit=100" # Path to read messages from MR
+MR_WRITE_URL="/events/$MR_WRITE_TOPIC"                   # Path to write messages to MR
+MR_STUB_ALIVE_URL="/"                                    # Base path for mr stub alive check
+MR_DMAAP_ALIVE_URL="/topics"                             # Base path for dmaap-mr alive check
+MR_DMAAP_COMPOSE_DIR="dmaapmr"                           # Dir in simulator_group for dmaap mr for - docker-compose
+MR_STUB_COMPOSE_DIR="mrstub"                             # Dir in simulator_group for mr stub for - docker-compose
+MR_KAFKA_APP_NAME="message-router-kafka"                 # Kafka app name, if just named "kafka" the image will not start...
+MR_KAFKA_PORT=9092                                       # Kafka port number
+MR_KAFKA_DOCKER_LOCALHOST_PORT=30098                     # Kafka port number for docker localhost
+MR_KAFKA_KUBE_NODE_PORT=30099                            # Kafka node port number for kube
+MR_ZOOKEEPER_APP_NAME="zookeeper"                        # Zookeeper app name
+MR_ZOOKEEPER_PORT="2181"                                 # Zookeeper port number
+MR_DMAAP_HOST_MNT_DIR="/mnt"                             # Basedir localhost for mounted files
+MR_DMAAP_HOST_CONFIG_DIR="/configs1"                      # Config files dir on localhost
+
+CR_APP_NAME="callback-receiver"                          # Name for the Callback receiver
+CR_DISPLAY_NAME="Callback receiver"
+CR_EXTERNAL_PORT=8090                                    # Callback receiver container external port (host -> container)
+CR_INTERNAL_PORT=8090                                    # Callback receiver container internal port (container -> container)
+CR_EXTERNAL_SECURE_PORT=8091                             # Callback receiver container external secure port (host -> container)
+CR_INTERNAL_SECURE_PORT=8091                             # Callback receiver container internal secure port (container -> container)
+CR_APP_CALLBACK="/callbacks"                             # Url for callbacks
+CR_APP_CALLBACK_MR="/callbacks-mr"                       # Url for callbacks (data from mr which contains string encoded jsons in a json arr)
+CR_APP_CALLBACK_TEXT="/callbacks-text"                   # Url for callbacks (data containing text data)
+CR_ALIVE_URL="/reset"                                    # Base path for alive check
+CR_COMPOSE_DIR="cr"                                      # Dir in simulator_group for docker-compose
+
+PROD_STUB_APP_NAME="producer-stub"                       # Name for the Producer stub
+PROD_STUB_DISPLAY_NAME="Producer Stub"
+PROD_STUB_EXTERNAL_PORT=8092                             # Producer stub container external port (host -> container)
+PROD_STUB_INTERNAL_PORT=8092                             # Producer stub container internal port (container -> container)
+PROD_STUB_EXTERNAL_SECURE_PORT=8093                      # Producer stub container external secure port (host -> container)
+PROD_STUB_INTERNAL_SECURE_PORT=8093                      # Producer stub container internal secure port (container -> container)
+PROD_STUB_JOB_CALLBACK="/callbacks/job"                  # Callback path for job create/update/delete
+PROD_STUB_SUPERVISION_CALLBACK="/callbacks/supervision"  # Callback path for producre supervision
+PROD_STUB_ALIVE_URL="/"                                  # Base path for alive check
+PROD_STUB_COMPOSE_DIR="prodstub"                         # Dir in simulator_group for docker-compose
+
+CONSUL_HOST="consul-server"                              # Host name of consul
+CONSUL_DISPLAY_NAME="Consul"
+CONSUL_EXTERNAL_PORT=8500                                # Consul container external port (host -> container)
+CONSUL_INTERNAL_PORT=8500                                # Consul container internal port (container -> container)
+CONSUL_APP_NAME="polman-consul"                          # Name for consul container
+CONSUL_ALIVE_URL="/ui/dc1/kv"                            # Base path for alive check
+CONSUL_CBS_COMPOSE_DIR="consul_cbs"                      # Dir in simulator group for docker compose
+
+CBS_APP_NAME="polman-cbs"                                # Name for CBS container
+CBS_DISPLAY_NAME="Config Binding Service"
+CBS_EXTERNAL_PORT=10000                                  # CBS container external port (host -> container)
+CBS_INTERNAL_PORT=10000                                  # CBS container internal port (container -> container)
+CONFIG_BINDING_SERVICE="config-binding-service"          # Host name of CBS
+CBS_ALIVE_URL="/healthcheck"                             # Base path for alive check
+
+RIC_SIM_DISPLAY_NAME="Near-RT RIC A1 Simulator"
+RIC_SIM_BASE="g"                                         # Base name of the RIC Simulator container, shall be the group code
+                                                         # Note, a prefix is added to each container name by the .env file in the 'ric' dir
+RIC_SIM_PREFIX="ricsim"                                  # Prefix added to ric container name, added in the .env file in the 'ric' dir
+                                                         # This prefix can be changed from the command line
+RIC_SIM_INTERNAL_PORT=8085                               # RIC Simulator container internal port (container -> container).
+                                                         # (external ports allocated by docker)
+RIC_SIM_INTERNAL_SECURE_PORT=8185                        # RIC Simulator container internal secure port (container -> container).
+                                                         # (external ports allocated by docker)
+RIC_SIM_CERT_MOUNT_DIR="./cert"
+
+RIC_SIM_COMPOSE_DIR="ric"                                # Dir in simulator group for docker compose
+RIC_SIM_ALIVE_URL="/"                                    # Base path for alive check
+RIC_SIM_COMMON_SVC_NAME=""                               # Name of svc if one common svc is used for all ric sim groups (stateful sets)
+# Kept as reference for oran a1 adapter
+# SDNC_APP_NAME="a1controller"                             # Name of the SNDC A1 Controller container
+# SDNC_DISPLAY_NAME="SDNC A1 Controller"
+# SDNC_EXTERNAL_PORT=8282                                  # SNDC A1 Controller container external port (host -> container)
+# SDNC_INTERNAL_PORT=8181                                  # SNDC A1 Controller container internal port (container -> container)
+# SDNC_EXTERNAL_SECURE_PORT=8443                           # SNDC A1 Controller container external securee port (host -> container)
+# SDNC_INTERNAL_SECURE_PORT=8443                           # SNDC A1 Controller container internal secure port (container -> container)
+# SDNC_DB_APP_NAME="sdncdb"                                # Name of the SDNC DB container
+# SDNC_A1_TRUSTSTORE_PASSWORD=""                           # SDNC truststore password
+# SDNC_USER="admin"                                        # SDNC username
+# SDNC_PWD="Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U"   # SNDC PWD
+# SDNC_API_URL="/restconf/operations/A1-ADAPTER-API:"      # Base url path for SNDC API
+# SDNC_ALIVE_URL="/apidoc/explorer/"                       # Base url path for SNDC API docs (for alive check)
+# SDNC_COMPOSE_DIR="sdnc"                                  # Dir in simulator_group for docker-compose
+# SDNC_COMPOSE_FILE="docker-compose.yml"
+# SDNC_KUBE_APP_FILE="app.yaml"
+# SDNC_KARAF_LOG="/opt/opendaylight/data/log/karaf.log"    # Path to karaf log
+# SDNC_RESPONSE_JSON_KEY="output"                          # Key name for output json in replies from sdnc
+
+# For ONAP sdan
+SDNC_APP_NAME="a1controller"                             # Name of the SNDC A1 Controller container
+SDNC_DISPLAY_NAME="SDNC A1 Controller"
+SDNC_EXTERNAL_PORT=8282                                  # SNDC A1 Controller container external port (host -> container)
+SDNC_INTERNAL_PORT=8181                                  # SNDC A1 Controller container internal port (container -> container)
+SDNC_EXTERNAL_SECURE_PORT=8443                           # SNDC A1 Controller container external securee port (host -> container)
+SDNC_INTERNAL_SECURE_PORT=8443                           # SNDC A1 Controller container internal secure port (container -> container)
+SDNC_DB_APP_NAME="sdncdb"                                # Name of the SDNC DB container
+SDNC_A1_TRUSTSTORE_PASSWORD="a1adapter"                  # SDNC truststore password
+SDNC_USER="admin"                                        # SDNC username
+SDNC_PWD="admin"                                         # SNDC PWD
+SDNC_PWD="Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U"   # SNDC PWD
+#SDNC_API_URL="/rests/operations/A1-ADAPTER-API:"         # Base url path for SNDC API (for upgraded sdnc)
+SDNC_API_URL="/restconf/operations/A1-ADAPTER-API:"      # Base url path for SNDC API
+SDNC_ALIVE_URL="/apidoc/explorer/"                       # Base url path for SNDC API docs (for alive check)
+SDNC_COMPOSE_DIR="sdnc"
+SDNC_COMPOSE_FILE="docker-compose-2.yml"
+SDNC_KUBE_APP_FILE="app2.yaml"
+SDNC_KARAF_LOG="/opt/opendaylight/data/log/karaf.log"    # Path to karaf log
+#SDNC_RESPONSE_JSON_KEY="A1-ADAPTER-API:output"           # Key name for output json in replies from sdnc (for upgraded sdnc)
+SDNC_RESPONSE_JSON_KEY="output"                          # Key name for output json in replies from sdnc
+SDNC_FEATURE_LEVEL=""                                    # Space separated list of features
+
+RAPP_CAT_APP_NAME="rappcatalogueservice"                 # Name for the RAPP Catalogue
+RAPP_CAT_DISPLAY_NAME="RAPP Catalogue"
+RAPP_CAT_EXTERNAL_PORT=8680                              # RAPP Catalogue container external port (host -> container)
+RAPP_CAT_INTERNAL_PORT=8680                              # RAPP Catalogue container internal port (container -> container)
+RAPP_CAT_EXTERNAL_SECURE_PORT=8633                       # RAPP Catalogue container external secure port (host -> container)
+RAPP_CAT_INTERNAL_SECURE_PORT=8633                       # RAPP Catalogue container internal secure port (container -> container)
+RAPP_CAT_ALIVE_URL="/services"                           # Base path for alive check
+RAPP_CAT_COMPOSE_DIR="rapp_catalogue"                    # Dir in simulator_group for docker-compose
+
+CONTROL_PANEL_APP_NAME="controlpanel"                    # Name of the Control Panel container
+CONTROL_PANEL_DISPLAY_NAME="Control Panel"
+CONTROL_PANEL_EXTERNAL_PORT=8080                         # Control Panel container external port (host -> container)
+CONTROL_PANEL_INTERNAL_PORT=8080                         # Control Panel container internal port (container -> container)
+CONTROL_PANEL_EXTERNAL_SECURE_PORT=8880                  # Control Panel container external port (host -> container)
+CONTROL_PANEL_INTERNAL_SECURE_PORT=8082                  # Control Panel container internal port (container -> container)
+CONTROL_PANEL_LOGPATH="/var/log/nonrtric-gateway/application.log"  # Path the application log in the Control Panel container
+CONTROL_PANEL_ALIVE_URL="/"                              # Base path for alive check
+CONTROL_PANEL_COMPOSE_DIR="control_panel"                # Dir in simulator_group for docker-compose
+CONTROL_PANEL_CONFIG_FILE=nginx.conf                     # Config file name
+CONTROL_PANEL_HOST_MNT_DIR="./mnt"                       # Mounted dir, relative to compose file, on the host
+CONTROL_PANEL_CONFIG_MOUNT_PATH=/etc/nginx               # Container internal path for config
+CONTROL_PANEL_NGINX_KUBE_RESOLVER="kube-dns.kube-system.svc.cluster.local valid=5s"  #nginx resolver for kube
+CONTROL_PANEL_NGINX_DOCKER_RESOLVER="127.0.0.11"         # nginx resolver for docker
+CONTROL_PANEL_PATH_POLICY_PREFIX="/a1-policy/"           # Path prefix for forwarding policy calls to NGW
+CONTROL_PANEL_PATH_ICS_PREFIX="/data-producer/"          # Path prefix for forwarding ics calls to NGW
+CONTROL_PANEL_PATH_ICS_PREFIX2="/data-consumer/"         # Path prefix for forwarding ics calls to NGW
+
+NRT_GATEWAY_APP_NAME="nonrtricgateway"                   # Name of the Gateway container
+NRT_GATEWAY_DISPLAY_NAME="NonRT-RIC Gateway"
+NRT_GATEWAY_EXTERNAL_PORT=9090                           # Gateway container external port (host -> container)
+NRT_GATEWAY_INTERNAL_PORT=9090                           # Gateway container internal port (container -> container)
+NRT_GATEWAY_EXTERNAL_SECURE_PORT=9091                    # Gateway container external port (host -> container)
+NRT_GATEWAY_INTERNAL_SECURE_PORT=9091                    # Gateway container internal port (container -> container)
+NRT_GATEWAY_LOGPATH="/var/log/nonrtric-gateway/application.log" # Path the application log in the Gateway container
+NRT_GATEWAY_HOST_MNT_DIR="./mnt"                         # Mounted dir, relative to compose file, on the host
+NRT_GATEWAY_ALIVE_URL="/actuator/metrics"                # Base path for alive check
+NRT_GATEWAY_COMPOSE_DIR="ngw"                            # Dir in simulator_group for docker-compose
+NRT_GATEWAY_CONFIG_MOUNT_PATH=/opt/app/nonrtric-gateway/config  # Container internal path for config
+NRT_GATEWAY_CONFIG_FILE=application.yaml                 # Config file name
+NRT_GATEWAY_PKG_NAME="org.springframework.cloud.gateway" # Java base package name
+NRT_GATEWAY_ACTUATOR="/actuator/loggers/$NRT_GATEWAY_PKG_NAME" # Url for trace/debug
+
+HTTP_PROXY_APP_NAME="httpproxy"                          # Name of the Http Proxy container
+HTTP_PROXY_DISPLAY_NAME="Http Proxy"
+HTTP_PROXY_EXTERNAL_PORT=8740                            # Http Proxy container external port (host -> container)
+HTTP_PROXY_INTERNAL_PORT=8080                            # Http Proxy container internal port (container -> container)
+HTTP_PROXY_EXTERNAL_SECURE_PORT=8742                     # Http Proxy container external secure port (host -> container)
+HTTP_PROXY_INTERNAL_SECURE_PORT=8433                     # Http Proxy container internal secure port (container -> container)
+HTTP_PROXY_WEB_EXTERNAL_PORT=8741                        # Http Proxy container external port (host -> container)
+HTTP_PROXY_WEB_INTERNAL_PORT=8081                        # Http Proxy container internal port (container -> container)
+HTTP_PROXY_WEB_EXTERNAL_SECURE_PORT=8743                 # Http Proxy container external secure port (host -> container)
+HTTP_PROXY_WEB_INTERNAL_SECURE_PORT=8434                 # Http Proxy container internal secure port (container -> container
+HTTP_PROXY_CONFIG_PORT=0                                 # Port number for proxy config, will be set if proxy is started
+HTTP_PROXY_CONFIG_HOST_NAME=""                           # Proxy host, will be set if proxy is started
+HTTP_PROXY_ALIVE_URL="/"                                 # Base path for alive check
+HTTP_PROXY_COMPOSE_DIR="httpproxy"                       # Dir in simulator_group for docker-compose
+HTTP_PROXY_BUILD_DIR="http-https-proxy"                  # Dir in simulator_group for image build - note, reuses source from kubeproxy
+
+KUBE_PROXY_APP_NAME="kubeproxy"                          # Name of the Kube Http Proxy container
+KUBE_PROXY_DISPLAY_NAME="Kube Http Proxy"
+KUBE_PROXY_EXTERNAL_PORT=8730                            # Kube Http Proxy container external port (host -> container)
+KUBE_PROXY_INTERNAL_PORT=8080                            # Kube Http Proxy container internal port (container -> container)
+KUBE_PROXY_EXTERNAL_SECURE_PORT=8782                     # Kube Proxy container external secure port (host -> container)
+KUBE_PROXY_INTERNAL_SECURE_PORT=8433                     # Kube Proxy container internal secure port (container -> container)
+KUBE_PROXY_WEB_EXTERNAL_PORT=8731                        # Kube Http Proxy container external port (host -> container)
+KUBE_PROXY_WEB_INTERNAL_PORT=8081                        # Kube Http Proxy container internal port (container -> container)
+KUBE_PROXY_WEB_EXTERNAL_SECURE_PORT=8783                 # Kube Proxy container external secure port (host -> container)
+KUBE_PROXY_WEB_INTERNAL_SECURE_PORT=8434                 # Kube Proxy container internal secure port (container -> container
+
+KUBE_PROXY_DOCKER_EXTERNAL_PORT=8732                     # Kube Http Proxy container external port, doocker (host -> container)
+KUBE_PROXY_DOCKER_EXTERNAL_SECURE_PORT=8784              # Kube Proxy container external secure port, doocker (host -> container)
+KUBE_PROXY_WEB_DOCKER_EXTERNAL_PORT=8733                 # Kube Http Proxy container external port, doocker (host -> container)
+KUBE_PROXY_WEB_DOCKER_EXTERNAL_SECURE_PORT=8785          # Kube Proxy container external secure port, doocker (host -> container)
+
+KUBE_PROXY_PATH=""                                       # Proxy url path, will be set if proxy is started
+KUBE_PROXY_ALIVE_URL="/"                                 # Base path for alive check
+KUBE_PROXY_COMPOSE_DIR="kubeproxy"                       # Dir in simulator_group for docker-compose
+
+PVC_CLEANER_APP_NAME="pvc-cleaner"                      # Name for Persistent Volume Cleaner container
+PVC_CLEANER_DISPLAY_NAME="Persistent Volume Cleaner"    # Display name for Persistent Volume Cleaner
+PVC_CLEANER_COMPOSE_DIR="pvc-cleaner"                   # Dir in simulator_group for yamls
+
+DMAAP_ADP_APP_NAME="dmaapadapterservice"                 # Name for Dmaap Adapter container
+DMAAP_ADP_DISPLAY_NAME="Dmaap Adapter Service"           # Display name for Dmaap Adapter container
+DMAAP_ADP_EXTERNAL_PORT=9087                             # Dmaap Adapter container external port (host -> container)
+DMAAP_ADP_INTERNAL_PORT=8084                             # Dmaap Adapter container internal port (container -> container)
+DMAAP_ADP_EXTERNAL_SECURE_PORT=9088                      # Dmaap Adapter container external secure port (host -> container)
+DMAAP_ADP_INTERNAL_SECURE_PORT=8435                      # Dmaap Adapter container internal secure port (container -> container)
+
+#DMAAP_ADP_LOGPATH="/var/log/dmaap-adaptor-service/application.log" # Path the application log in the Dmaap Adapter container
+DMAAP_ADP_HOST_MNT_DIR="./mnt"                           # Mounted db dir, relative to compose file, on the host
+#MAAP_ADP_CONTAINER_MNT_DIR="/var/dmaap-adaptor-service" # Mounted dir in the container
+DMAAP_ADP_ACTUATOR="/actuator/loggers/org.oran.dmaapadapter"   # Url for trace/debug
+#DMAAP_ADP_CERT_MOUNT_DIR="./cert"
+DMAAP_ADP_ALIVE_URL="/actuator/info"                     # Base path for alive check
+DMAAP_ADP_COMPOSE_DIR="dmaapadp"                         # Dir in simulator_group for docker-compose
+DMAAP_ADP_CONFIG_MOUNT_PATH="/opt/app/dmaap-adaptor-service/config" # Internal container path for configuration
+DMAAP_ADP_DATA_MOUNT_PATH="/opt/app/dmaap-adaptor-service/data" # Path in container for data file
+DMAAP_ADP_DATA_FILE="application_configuration.json"  # Container data file name
+DMAAP_ADP_CONFIG_FILE=application.yaml                   # Config file name
+
+DMAAP_MED_APP_NAME="dmaapmediatorservice"                # Name for Dmaap Mediator container
+DMAAP_MED_DISPLAY_NAME="Dmaap Mediator Service"          # Display name for Dmaap Mediator container
+DMAAP_MED_EXTERNAL_PORT=8085                             # Dmaap Mediator container external port (host -> container)
+DMAAP_MED_INTERNAL_PORT=8085                             # Dmaap Mediator container internal port (container -> container)
+DMAAP_MED_EXTERNAL_SECURE_PORT=8185                      # Dmaap Mediator container external secure port (host -> container)
+DMAAP_MED_INTERNAL_SECURE_PORT=8185                      # Dmaap Mediator container internal secure port (container -> container)
+
+DMAAP_MED_LOGPATH="/var/log/dmaap-adaptor-service/application.log" # Path the application log in the Dmaap Mediator container
+DMAAP_MED_HOST_MNT_DIR="./mnt"                          # Mounted db dir, relative to compose file, on the host
+#MAAP_ADP_CONTAINER_MNT_DIR="/var/dmaap-adaptor-service" # Mounted dir in the container
+#DMAAP_MED_ACTUATOR="/actuator/loggers/org.oransc.information"   # Url for trace/debug
+#DMAAP_MED_CERT_MOUNT_DIR="./cert"
+DMAAP_MED_ALIVE_URL="/status"                            # Base path for alive check
+DMAAP_MED_COMPOSE_DIR="dmaapmed"                         # Dir in simulator_group for docker-compose
+#MAAP_MED_CONFIG_MOUNT_PATH="/app"                       # Internal container path for configuration
+DMAAP_MED_DATA_MOUNT_PATH="/configs"                     # Path in container for data file
+DMAAP_MED_DATA_FILE="type_config.json"                   # Container data file name
+
+KAFKAPC_APP_NAME="kafka-procon"                          # Name for the Kafka procon
+KAFKAPC_DISPLAY_NAME="Kafaka Producer/Consumer"
+KAFKAPC_EXTERNAL_PORT=8096                               # Kafka procon container external port (host -> container)
+KAFKAPC_INTERNAL_PORT=8090                               # Kafka procon container internal port (container -> container)
+KAFKAPC_EXTERNAL_SECURE_PORT=8097                        # Kafka procon container external secure port (host -> container)
+KAFKAPC_INTERNAL_SECURE_PORT=8091                        # Kafka procon container internal secure port (container -> container)
+KAFKAPC_ALIVE_URL="/"                                    # Base path for alive check
+KAFKAPC_COMPOSE_DIR="kafka-procon"                       # Dir in simulator_group for docker-compose
+KAFKAPC_BUILD_DIR="kafka-procon"                         # Build dir
+
+CHART_MUS_APP_NAME="chartmuseum"                         # Name for the chart museum app
+CHART_MUS_DISPLAY_NAME="Chart Museum"
+CHART_MUS_EXTERNAL_PORT=8201                             # chart museum container external port (host -> container)
+CHART_MUS_INTERNAL_PORT=8080                             # chart museum container internal port (container -> container)
+CHART_MUS_ALIVE_URL="/health"                            # Base path for alive check
+CHART_MUS_COMPOSE_DIR="chartmuseum"                      # Dir in simulator_group for docker-compose
+CHART_MUS_CHART_CONTR_CHARTS="/tmp/charts"               # Local dir container for charts
+
+HELM_MANAGER_APP_NAME="helmmanagerservice"               # Name for the helm manager app
+HELM_MANAGER_DISPLAY_NAME="Helm Manager"
+HELM_MANAGER_EXTERNAL_PORT=8211                          # helm manager container external port (host -> container)
+HELM_MANAGER_INTERNAL_PORT=8083                          # helm manager container internal port (container -> container)
+HELM_MANAGER_EXTERNAL_SECURE_PORT=8212                   # helm manager container external secure port (host -> container)
+HELM_MANAGER_INTERNAL_SECURE_PORT=8443                   # helm manager container internal secure port (container -> container)
+HELM_MANAGER_CLUSTER_ROLE=cluster-admin                  # Kubernetes cluster role for helm manager
+HELM_MANAGER_SA_NAME=helm-manager-sa                     # Service account name
+HELM_MANAGER_ALIVE_URL="/helm/charts"                    # Base path for alive check
+HELM_MANAGER_COMPOSE_DIR="helmmanager"                   # Dir in simulator_group for docker-compose
+HELM_MANAGER_USER="helmadmin"
+HELM_MANAGER_PWD="itisasecret"
+########################################
+# Setting for common curl-base function
+########################################
+
+UUID=""                                                  # UUID used as prefix to the policy id to simulate a real UUID
+                                                         # Testscript need to set the UUID otherwise this empty prefix is used
index 0a25391..d9b5e87 100755 (executable)
@@ -163,18 +163,51 @@ TESTLOGS=$PWD/logs
 # files in the ./tmp is moved to ./tmp/prev when a new test is started
 if [ ! -d "tmp" ]; then
     mkdir tmp
+       if [ $? -ne 0 ]; then
+               echo "Cannot create dir for temp files, $PWD/tmp"
+               echo "Exiting...."
+               exit 1
+       fi
 fi
 curdir=$PWD
 cd tmp
 if [ $? -ne 0 ]; then
        echo "Cannot cd to $PWD/tmp"
-       echo "Dir cannot be created. Exiting...."
+       echo "Exiting...."
+       exit 1
 fi
+
+TESTENV_TEMP_FILES=$PWD
+
 if [ ! -d "prev" ]; then
     mkdir prev
+       if [ $? -ne 0 ]; then
+               echo "Cannot create dir for previous temp files, $PWD/prev"
+               echo "Exiting...."
+               exit 1
+       fi
 fi
+
+TMPFILES=$(ls -A  | grep -vw prev)
+if [ ! -z "$TMPFILES" ]; then
+       cp -r $TMPFILES prev   #Move all temp files to prev dir
+       if [ $? -ne 0 ]; then
+               echo "Cannot move temp files in $PWD to previous temp files in, $PWD/prev"
+               echo "Exiting...."
+               exit 1
+       fi
+       if [ $(pwd | xargs basename) == "tmp" ]; then    #Check that current dir is tmp...for safety
+
+               rm -rf $TMPFILES # Remove all temp files
+       fi
+fi
+
 cd $curdir
-mv ./tmp/* ./tmp/prev 2> /dev/null
+if [ $? -ne 0 ]; then
+       echo "Cannot cd to $curdir"
+       echo "Exiting...."
+       exit 1
+fi
 
 # Create a http message log for this testcase
 HTTPLOG=$PWD"/.httplog_"$ATC".txt"
@@ -215,6 +248,7 @@ PRINT_CURRENT_STATS=0
 
 #Var to control if container/pod runtim statistics shall be collected
 COLLECT_RUNTIME_STATS=0
+COLLECT_RUNTIME_STATS_PID=0
 
 #File to keep deviation messages
 DEVIATION_FILE=".tmp_deviations"
@@ -231,8 +265,13 @@ trap_fnc() {
 }
 trap trap_fnc ERR
 
-# Trap to kill subprocesses
-trap "kill 0" EXIT
+# Trap to kill subprocess for stats collection (if running)
+trap_fnc2() {
+       if [ $COLLECT_RUNTIME_STATS_PID -ne 0 ]; then
+               kill $COLLECT_RUNTIME_STATS_PID
+       fi
+}
+trap trap_fnc2 EXIT
 
 # Counter for tests
 TEST_SEQUENCE_NR=1
@@ -775,6 +814,10 @@ if [ ! -z "$TMP_APPS" ]; then
                done
                echo " Auto-adding system app   $padded_iapp  Sourcing $file_pointer"
                . $file_pointer
+               if [ $? -ne 0 ]; then
+                       echo " Include file $file_pointer contain errors. Exiting..."
+                       exit 1
+               fi
                __added_apps=" $iapp "$__added_apps
        done
 else
@@ -797,11 +840,15 @@ echo -e $BOLD"Auto adding included apps"$EBOLD
                                padded_iapp=$padded_iapp" "
                        done
                        echo " Auto-adding included app $padded_iapp  Sourcing $file_pointer"
-                       . $file_pointer
                        if [ ! -f "$file_pointer" ]; then
                                echo " Include file $file_pointer for app $iapp does not exist"
                                exit 1
                        fi
+                       . $file_pointer
+                       if [ $? -ne 0 ]; then
+                               echo " Include file $file_pointer contain errors. Exiting..."
+                               exit 1
+                       fi
                fi
        done
 echo ""
@@ -884,6 +931,8 @@ else
 
                        exit 1
                fi
+               echo " Node(s) and container container runtime config"
+               kubectl get nodes -o wide | indent2
        fi
 fi
 
@@ -1297,6 +1346,9 @@ setup_testenvironment() {
                        # If the image suffix is none, then the component decides the suffix
                        function_pointer="__"$imagename"_imagesetup"
                        $function_pointer $IMAGE_SUFFIX
+
+                       function_pointer="__"$imagename"_test_requirements"
+                       $function_pointer
                fi
        done
 
@@ -1547,6 +1599,7 @@ setup_testenvironment() {
 
        if [ $COLLECT_RUNTIME_STATS -eq 1 ]; then
                ../common/genstat.sh $RUNMODE $SECONDS $TESTLOGS/$ATC/stat_data.csv $LOG_STAT_ARGS &
+               COLLECT_RUNTIME_STATS_PID=$!
        fi
 
 }
@@ -2014,7 +2067,7 @@ __kube_delete_all_resources() {
        namespace=$1
        labelname=$2
        labelid=$3
-       resources="deployments replicaset statefulset services pods configmaps persistentvolumeclaims persistentvolumes"
+       resources="deployments replicaset statefulset services pods configmaps persistentvolumeclaims persistentvolumes serviceaccounts clusterrolebindings"
        deleted_resourcetypes=""
        for restype in $resources; do
                ns_flag="-n $namespace"
@@ -2023,6 +2076,10 @@ __kube_delete_all_resources() {
                        ns_flag=""
                        ns_text=""
                fi
+               if [ $restype == "clusterrolebindings" ]; then
+                       ns_flag=""
+                       ns_text=""
+               fi
                result=$(kubectl get $restype $ns_flag -o jsonpath='{.items[?(@.metadata.labels.'$labelname'=="'$labelid'")].metadata.name}')
                if [ $? -eq 0 ] && [ ! -z "$result" ]; then
                        deleted_resourcetypes=$deleted_resourcetypes" "$restype
@@ -2101,6 +2158,51 @@ __kube_create_namespace() {
        return 0
 }
 
+# Removes a namespace if it exists
+# args: <namespace>
+# (Not for test scripts)
+__kube_delete_namespace() {
+
+       #Check if test namespace exists, if so remove it
+       kubectl get namespace $1 1> /dev/null 2> ./tmp/kubeerr
+       if [ $? -eq 0 ]; then
+               echo -ne " Removing namespace "$1 $SAMELINE
+               kubectl delete namespace $1 1> /dev/null 2> ./tmp/kubeerr
+               if [ $? -ne 0 ]; then
+                       echo -e " Removing namespace $1 $RED$BOLD FAILED $EBOLD$ERED"
+                       ((RES_CONF_FAIL++))
+                       echo "  Message: $(<./tmp/kubeerr)"
+                       return 1
+               else
+                       echo -e " Removing namespace $1 $GREEN$BOLD OK $EBOLD$EGREEN"
+               fi
+       else
+               echo -e " Namespace $1 $GREEN$BOLD does not exist, OK $EBOLD$EGREEN"
+       fi
+       return 0
+}
+
+# Removes a namespace
+# args: <namespace>
+# (Not for test scripts)
+clean_and_create_namespace() {
+       __log_conf_start $@
+
+    if [ $# -ne 1 ]; then
+               __print_err "<namespace>" $@
+               return 1
+       fi
+       __kube_delete_namespace $1
+       if [ $? -ne 0 ]; then
+               return 1
+       fi
+       __kube_create_namespace $1
+       if [ $? -ne 0 ]; then
+               return 1
+       fi
+
+}
+
 # Find the host ip of an app (using the service resource)
 # args: <app-name> <namespace>
 # (Not for test scripts)
@@ -2344,14 +2446,14 @@ clean_environment() {
                __clean_kube
                if [ $PRE_CLEAN -eq 1 ]; then
                        echo " Cleaning docker resouces to free up resources, may take time..."
-                       ../common/clean_docker.sh 2&>1 /dev/null
+                       ../common/clean_docker.sh 2>&1 /dev/null
                        echo ""
                fi
        else
                __clean_containers
                if [ $PRE_CLEAN -eq 1 ]; then
                        echo " Cleaning kubernetes resouces to free up resources, may take time..."
-                       ../common/clean_kube.sh 2&>1 /dev/null
+                       ../common/clean_kube.sh 2>&1 /dev/null
                        echo ""
                fi
        fi
@@ -2454,9 +2556,14 @@ __start_container() {
 
        envsubst < $compose_file > "gen_"$compose_file
        compose_file="gen_"$compose_file
+       if [ $DOCKER_COMPOSE_VERION == "V1" ]; then
+               docker_compose_cmd="docker-compose"
+       else
+               docker_compose_cmd="docker compose"
+       fi
 
        if [ "$compose_args" == "NODOCKERARGS" ]; then
-               docker-compose -f $compose_file up -d &> .dockererr
+               $docker_compose_cmd -f $compose_file up -d &> .dockererr
                if [ $? -ne 0 ]; then
                        echo -e $RED"Problem to launch container(s) with docker-compose"$ERED
                        cat .dockererr
@@ -2464,7 +2571,7 @@ __start_container() {
                        exit 1
                fi
        else
-               docker-compose -f $compose_file up -d $compose_args &> .dockererr
+               $docker_compose_cmd -f $compose_file up -d $compose_args &> .dockererr
                if [ $? -ne 0 ]; then
                        echo -e $RED"Problem to launch container(s) with docker-compose"$ERED
                        cat .dockererr
index 1048d76..aed9226 100644 (file)
 #
 
 # List of short names for all supported apps, including simulators etc
-APP_SHORT_NAMES="PA ICS SDNC CP NGW RC RICSIM HTTPPROXY CBS CONSUL DMAAPMR MR CR PRODSTUB KUBEPROXY DMAAPMED DMAAPADP PVCCLEANER KAFKAPC"
+APP_SHORT_NAMES="PA ICS SDNC CP NGW RC RICSIM HTTPPROXY CBS CONSUL DMAAPMR MR CR PRODSTUB KUBEPROXY DMAAPMED DMAAPADP PVCCLEANER KAFKAPC CHARTMUS HELMMANAGER LOCALHELM"
 
 # List of available apps that built and released of the project
-PROJECT_IMAGES="PA ICS SDNC CP NGW RICSIM RC DMAAPMED DMAAPADP"
+PROJECT_IMAGES="PA ICS SDNC CP NGW RICSIM RC DMAAPMED DMAAPADP HELMMANAGER"
 
 # List of available apps to override with local or remote staging/snapshot/release image
-AVAILABLE_IMAGES_OVERRIDE="PA ICS SDNC CP NGW RICSIM RC DMAAPMED DMAAPADP"
+AVAILABLE_IMAGES_OVERRIDE="PA ICS SDNC CP NGW RICSIM RC DMAAPMED DMAAPADP HELMMANAGER"
 
 # List of available apps where the image is built by the test environment
 LOCAL_IMAGE_BUILD="MR CR PRODSTUB KUBEPROXY HTTPPROXY KAFKAPC"
diff --git a/test/simulator-group/chartmuseum/.gitignore b/test/simulator-group/chartmuseum/.gitignore
new file mode 100644 (file)
index 0000000..7dc00c5
--- /dev/null
@@ -0,0 +1,3 @@
+.tmp.json
+.dockererr
+gen_docker-compose*
\ No newline at end of file
diff --git a/test/simulator-group/chartmuseum/app.yaml b/test/simulator-group/chartmuseum/app.yaml
new file mode 100644 (file)
index 0000000..3ce3a32
--- /dev/null
@@ -0,0 +1,53 @@
+#  ============LICENSE_START===============================================
+#  Copyright (C) 2021 Nordix Foundation. All rights reserved.
+#  ========================================================================
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#  ============LICENSE_END=================================================
+#
+
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: $CHART_MUS_APP_NAME
+  namespace: $KUBE_SIM_NAMESPACE
+  labels:
+    run: $CHART_MUS_APP_NAME
+    autotest: CHARTMUS
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      run: $CHART_MUS_APP_NAME
+  template:
+    metadata:
+      labels:
+        run: $CHART_MUS_APP_NAME
+        autotest: CHARTMUS
+    spec:
+      containers:
+      - name: $CHART_MUS_APP_NAME
+        image: $CHART_MUS_IMAGE
+        imagePullPolicy: $KUBE_IMAGE_PULL_POLICY
+        ports:
+        - name: http
+          containerPort: $CHART_MUS_INTERNAL_PORT
+        env:
+        - name: STORAGE
+          value: "local"
+        - name: STORAGE_LOCAL_ROOTDIR
+          value: ${CHART_MUS_CHART_CONTR_CHARTS}
+        - name: DEBUG
+          value: "1"
+# Selector will be set when pod is started first time
+      nodeSelector:
+
diff --git a/test/simulator-group/chartmuseum/docker-compose.yml b/test/simulator-group/chartmuseum/docker-compose.yml
new file mode 100644 (file)
index 0000000..a336f1d
--- /dev/null
@@ -0,0 +1,37 @@
+#  ============LICENSE_START===============================================
+#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  ========================================================================
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#  ============LICENSE_END=================================================
+#
+
+version: '3.0'
+networks:
+  default:
+    external: true
+    name: ${DOCKER_SIM_NWNAME}
+services:
+  chartmuseum:
+    networks:
+      - default
+    container_name: ${CHART_MUS_APP_NAME}
+    image: ${CHART_MUS_IMAGE}
+    ports:
+      - ${CHART_MUS_EXTERNAL_PORT}:${CHART_MUS_INTERNAL_PORT}
+    environment:
+      - STORAGE=local
+      - STORAGE_LOCAL_ROOTDIR=${CHART_MUS_CHART_CONTR_CHARTS}
+      - DEBUG=1
+    labels:
+      - "nrttest_app=CHARTMUS"
+      - "nrttest_dp=${CHART_MUS_DISPLAY_NAME}"
diff --git a/test/simulator-group/chartmuseum/svc.yaml b/test/simulator-group/chartmuseum/svc.yaml
new file mode 100644 (file)
index 0000000..a5301f4
--- /dev/null
@@ -0,0 +1,34 @@
+#  ============LICENSE_START===============================================
+#  Copyright (C) 2021 Nordix Foundation. All rights reserved.
+#  ========================================================================
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#  ============LICENSE_END=================================================
+#
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: $CHART_MUS_APP_NAME
+  namespace: $KUBE_SIM_NAMESPACE
+  labels:
+    run: $CHART_MUS_APP_NAME
+    autotest: CHARTMUS
+spec:
+  type: ClusterIP
+  ports:
+  - port: $CHART_MUS_EXTERNAL_PORT
+    targetPort: $CHART_MUS_INTERNAL_PORT
+    protocol: TCP
+    name: htt
+  selector:
+    run: $CHART_MUS_APP_NAME
\ No newline at end of file
diff --git a/test/simulator-group/helmmanager/.gitignore b/test/simulator-group/helmmanager/.gitignore
new file mode 100644 (file)
index 0000000..7dc00c5
--- /dev/null
@@ -0,0 +1,3 @@
+.tmp.json
+.dockererr
+gen_docker-compose*
\ No newline at end of file
diff --git a/test/simulator-group/helmmanager/app.yaml b/test/simulator-group/helmmanager/app.yaml
new file mode 100644 (file)
index 0000000..5c17169
--- /dev/null
@@ -0,0 +1,36 @@
+#  ============LICENSE_START===============================================
+#  Copyright (C) 2021 Nordix Foundation. All rights reserved.
+#  ========================================================================
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#  ============LICENSE_END=================================================
+#
+
+apiVersion: v1
+kind: Pod
+metadata:
+  name: helmmanagerservice
+  namespace: $KUBE_NONRTRIC_NAMESPACE
+  labels:
+    run: $HELM_MANAGER_APP_NAME
+    autotest: HELMMANAGER
+spec:
+  serviceAccountName: $HELM_MANAGER_SA_NAME
+  containers:
+  - name: $HELM_MANAGER_APP_NAME
+    image: $HELM_MANAGER_IMAGE
+    imagePullPolicy: $KUBE_IMAGE_PULL_POLICY
+    ports:
+    - name: http
+      containerPort: $HELM_MANAGER_INTERNAL_PORT
+    - name: https
+      containerPort: $HELM_MANAGER_INTERNAL_SECURE_PORT
diff --git a/test/simulator-group/helmmanager/docker-compose.yml b/test/simulator-group/helmmanager/docker-compose.yml
new file mode 100644 (file)
index 0000000..cc69ed0
--- /dev/null
@@ -0,0 +1,36 @@
+#  ============LICENSE_START===============================================
+#  Copyright (C) 2021 Nordix Foundation. All rights reserved.
+#  ========================================================================
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#  ============LICENSE_END=================================================
+#
+
+version: '3.0'
+networks:
+  default:
+    external: true
+    name: ${DOCKER_SIM_NWNAME}
+services:
+  chartmuseum:
+    networks:
+      - default
+    container_name: ${HELM_MANAGER_APP_NAME}
+    image: ${HELM_MANAGER_IMAGE}
+    ports:
+      - ${HELM_MANAGER_EXTERNAL_PORT}:${HELM_MANAGER_INTERNAL_PORT}
+      - ${HELM_MANAGER_EXTERNAL_SECURE_PORT}:${HELM_MANAGER_INTERNAL_SECURE_PORT}
+    volumes:
+      - ~/.kube:/root/.kube
+    labels:
+      - "nrttest_app=CHARTMUS"
+      - "nrttest_dp=${HELM_MANAGER_DISPLAY_NAME}"
diff --git a/test/simulator-group/helmmanager/sa.yaml b/test/simulator-group/helmmanager/sa.yaml
new file mode 100644 (file)
index 0000000..1769b7c
--- /dev/null
@@ -0,0 +1,42 @@
+#  ============LICENSE_START===============================================
+#  Copyright (C) 2021 Nordix Foundation. All rights reserved.
+#  ========================================================================
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#  ============LICENSE_END=================================================
+#
+
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ name: $HELM_MANAGER_SA_NAME
+ namespace: $KUBE_NONRTRIC_NAMESPACE
+ labels:
+  run: $HELM_MANAGER_APP_NAME
+  autotest: HELMMANAGER
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+ name: ${HELM_MANAGER_SA_NAME}-clusterrolebinding
+ namespace: $KUBE_NONRTRIC_NAMESPACE
+ labels:
+  run: $HELM_MANAGER_APP_NAME
+  autotest: HELMMANAGER
+subjects:
+- kind: ServiceAccount
+  name: $HELM_MANAGER_SA_NAME
+  namespace: $KUBE_NONRTRIC_NAMESPACE
+roleRef:
+ kind: ClusterRole
+ name: $HELM_MANAGER_CLUSTER_ROLE
+ apiGroup: rbac.authorization.k8s.io
\ No newline at end of file
diff --git a/test/simulator-group/helmmanager/svc.yaml b/test/simulator-group/helmmanager/svc.yaml
new file mode 100644 (file)
index 0000000..3703697
--- /dev/null
@@ -0,0 +1,37 @@
+#  ============LICENSE_START===============================================
+#  Copyright (C) 2021 Nordix Foundation. All rights reserved.
+#  ========================================================================
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#  ============LICENSE_END=================================================
+#
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: helmmanagerservice
+  namespace: $KUBE_NONRTRIC_NAMESPACE
+  labels:
+    run: $HELM_MANAGER_APP_NAME
+    autotest: HELMMANAGER
+spec:
+  ports:
+  - port: $HELM_MANAGER_EXTERNAL_PORT
+    targetPort: $HELM_MANAGER_INTERNAL_PORT
+    protocol: TCP
+    name: http
+  - port: $HELM_MANAGER_EXTERNAL_SECURE_PORT
+    targetPort: $HELM_MANAGER_INTERNAL_SECURE_PORT
+    protocol: TCP
+    name: https
+  selector:
+    run: $HELM_MANAGER_APP_NAME