Merge "Add description to parameters in the remaining controllers"
diff --git a/.gitignore b/.gitignore
index f459dca..e5a2f72 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,4 +9,7 @@
 .sts4-cache
 .project
 .settings
-.pydevproject
\ No newline at end of file
+.pydevproject
+infer-out/
+
+.vscode
\ No newline at end of file
diff --git a/LICENSE.txt b/LICENSE.txt
index f49a4e1..96589bf 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -198,4 +198,4 @@
    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.
\ No newline at end of file
+   limitations under the License. 
diff --git a/docker-compose/README.md b/docker-compose/README.md
new file mode 100644
index 0000000..7573398
--- /dev/null
+++ b/docker-compose/README.md
@@ -0,0 +1,54 @@
+# O-RAN-SC docker-compose files
+
+The docker-compose.yml file will create an entire nonrtric system with one command:
+docker-compose up
+
+Two docker-compose files are provided in this folder:
+
+nosdnc/docker-compose.yml
+This file is to create nonrtric system without sdnc a1-controller
+
+sdnc/docker-compose.yml
+This file is to create nonrtric system with sdnc a1-controller
+
+Howto:
+cd nosdnc/
+docker-compose up
+
+or
+
+cd sdnc/
+docker-compose up
+
+The scripts in data/ will generate some dummy data in the running system.
+It will create:
+one policy type in a1-sim-OSC
+one service in policy agent
+one policy in a1-sim-OSC
+one policy in a1-sim-STD
+
+Run command:
+cd data/
+./fill_data.sh [policy-agent-port] [a1-sim-OSC-port] [a1-sim-STD-port] [http/https]
+
+Open link:
+http://localhost:[control-panel-port]/
+
+All the generated data is shown on the web page
+
+## License
+
+Copyright (C) 2020 Nordix Foundation.
+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.
+
+For more information about license please see the [LICENSE](LICENSE.txt) file for details.
diff --git a/docker-compose/data/fill_data.sh b/docker-compose/data/fill_data.sh
new file mode 100755
index 0000000..7b8f665
--- /dev/null
+++ b/docker-compose/data/fill_data.sh
@@ -0,0 +1,97 @@
+#!/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=================================================
+#
+
+# The scripts in data/ will generate some dummy data in the running system.
+# It will create:
+# one policy type in a1-sim-OSC
+# one service in policy agent
+# one policy in a1-sim-OSC
+# one policy in a1-sim-STD
+
+# Run command:
+# ./fill_data.sh [policy-agent port] [a1-sim-OSC port] [a1-sim-STD port] [http/https]
+
+policy_agent_port=${1:-8081}
+a1_sim_OSC_port=${2:-30001}
+a1_sim_STD_port=${3:-30003}
+httpx=${4:-"http"}
+
+echo "using policy_agent port: "$policy_agent_port
+echo "using a1-sim-OSC port: "$a1_sim_OSC_port
+echo "using a1-sim-STD port: "$a1_sim_STD_port
+echo "using protocol: "$httpx
+echo -e "\n"
+
+echo "policy agent status:"
+curl -skw " %{http_code}" $httpx://localhost:$policy_agent_port/status
+echo -e "\n"
+
+echo "ric1 version:"
+curl -skw " %{http_code}" $httpx://localhost:$a1_sim_OSC_port/counter/interface
+echo -e "\n"
+
+echo "ric2 version:"
+curl -skw " %{http_code}" $httpx://localhost:$a1_sim_STD_port/counter/interface
+echo -e "\n"
+
+echo "create policy type 1 to ric1:"
+curl -X PUT -skw " %{http_code}" $httpx://localhost:$a1_sim_OSC_port/policytype?id=1 -H Content-Type:application/json --data-binary @testdata/OSC/policy_type.json
+echo -e "\n"
+
+for i in {1..12}; do
+	echo "policy types from policy agent:"
+    curlString="curl -skw %{http_code} $httpx://localhost:$policy_agent_port/policy_types"
+    res=$($curlString)
+    echo "$res"
+    expect="[\"\",\"1\"]200"
+    if [ "$res" == "$expect" ]; then
+        echo -e "\n"
+        break;
+    else
+        sleep $i
+    fi
+done
+
+echo "create service 1 to policy agent:"
+curl -k -X PUT -sw " %{http_code}" -H accept:application/json -H Content-Type:application/json "$httpx://localhost:$policy_agent_port/service" --data-binary @testdata/service.json
+echo -e "\n"
+
+echo "create policy 2000 to ric1 with type1 and service1 via policy agent:"
+curl -k -X PUT -sw " %{http_code}" -H accept:application/json -H Content-Type:application/json "$httpx://localhost:$policy_agent_port/policy?id=2000&ric=ric1&service=service1&type=1" --data-binary @testdata/policy.json
+echo -e "\n"
+
+echo "policy numbers from ric1:"
+curl -skw " %{http_code}" $httpx://localhost:$a1_sim_OSC_port/counter/num_instances
+echo -e "\n"
+
+echo "create policy 2100 to ric2 with service1 via policy agent, no type:"
+curl -k -X PUT -sw " %{http_code}" -H accept:application/json -H Content-Type:application/json "$httpx://localhost:$policy_agent_port/policy?id=2100&ric=ric2&service=service1" --data-binary @testdata/policy.json
+echo -e "\n"
+
+echo "policy numbers from ric2:"
+curl -skw " %{http_code}" $httpx://localhost:$a1_sim_STD_port/counter/num_instances
+echo -e "\n"
+
+echo "policy id 2000 from policy agent:"
+curl -k -X GET -sw " %{http_code}" $httpx://localhost:$policy_agent_port/policy?id=2000
+echo -e "\n"
+
+echo "policy id 2100 from policy agent:"
+curl -k -X GET -sw " %{http_code}" $httpx://localhost:$policy_agent_port/policy?id=2100
+echo -e "\n"
\ No newline at end of file
diff --git a/docker-compose/data/testdata/OSC/policy_type.json b/docker-compose/data/testdata/OSC/policy_type.json
new file mode 100644
index 0000000..537d86f
--- /dev/null
+++ b/docker-compose/data/testdata/OSC/policy_type.json
@@ -0,0 +1,45 @@
+{
+  "name": "pt1",
+  "description": "pt1 policy type",
+  "policy_type_id": 1,
+  "create_schema": {
+    "$schema": "http://json-schema.org/draft-07/schema#",
+    "title": "OSC_Type1_1.0.0",
+    "description": "Type 1 policy type",
+    "type": "object",
+    "properties": {
+      "scope": {
+        "type": "object",
+        "properties": {
+          "ueId": {
+            "type": "string"
+          },
+          "qosId": {
+            "type": "string"
+          }
+        },
+        "additionalProperties": false,
+        "required": [
+          "ueId",
+          "qosId"
+        ]
+      },
+      "qosObjective": {
+        "type": "object",
+        "properties": {
+          "priorityLevel": {
+            "type": "number"
+          }
+        },
+        "additionalProperties": false,
+        "required": [
+          "priorityLevel"
+        ]
+      }
+    },
+    "additionalProperties": false,
+    "required": [
+      "scope", "qosObjective"
+    ]
+  }
+}
diff --git a/docker-compose/data/testdata/policy.json b/docker-compose/data/testdata/policy.json
new file mode 100644
index 0000000..119ba8b
--- /dev/null
+++ b/docker-compose/data/testdata/policy.json
@@ -0,0 +1,9 @@
+{
+  "scope": {
+    "ueId": "ue3100",
+    "qosId": "qos3100"
+  },
+  "qosObjective": {
+    "priorityLevel": 3100
+  }
+}
diff --git a/docker-compose/data/testdata/service.json b/docker-compose/data/testdata/service.json
new file mode 100644
index 0000000..1b973fc
--- /dev/null
+++ b/docker-compose/data/testdata/service.json
@@ -0,0 +1 @@
+{"callbackUrl": "http://callback-receiver:8090/callbacks/1","keepAliveIntervalSeconds": "3600","serviceName": "service1"}
diff --git a/docker-compose/nosdnc/config/application.yaml b/docker-compose/nosdnc/config/application.yaml
new file mode 100755
index 0000000..c0ddfb5
--- /dev/null
+++ b/docker-compose/nosdnc/config/application.yaml
@@ -0,0 +1,37 @@
+spring:
+  profiles:
+    active: prod
+  main:
+    allow-bean-definition-overriding: true
+  aop:
+    auto: false
+management:
+  endpoints:
+    web:
+      exposure:
+        include: "loggers,logfile,health,info,metrics,threaddump,heapdump"
+
+logging:
+  level:
+    ROOT: ERROR
+    org.springframework: ERROR
+    org.springframework.data: ERROR
+    org.springframework.web.reactive.function.client.ExchangeFunctions: ERROR
+    org.oransc.policyagent: INFO
+  file: /var/log/policy-agent/application.log
+server:
+   port : 8433
+   http-port: 8081
+   ssl:
+      key-store-type: JKS
+      key-store-password: policy_agent
+      key-store: classpath:keystore.jks
+      key-password: policy_agent
+      key-alias: policy_agent
+app:
+  filepath: /opt/app/policy-agent/config/application_configuration.json
+  webclient:
+    trust-store-used: false
+    trust-store-password: policy_agent
+    trust-store: classpath:keystore.jks
+
diff --git a/docker-compose/nosdnc/config/application_configuration.json b/docker-compose/nosdnc/config/application_configuration.json
new file mode 100644
index 0000000..3a10acd
--- /dev/null
+++ b/docker-compose/nosdnc/config/application_configuration.json
@@ -0,0 +1,23 @@
+{
+   "config": {
+      "//description": "Application configuration",
+      "ric": [
+         {
+            "name": "ric1",
+            "baseUrl": "http://a1-sim-OSC:8085/",
+            "managedElementIds": [
+               "kista_1",
+               "kista_2"
+            ]
+         },
+         {
+            "name":"ric2",
+            "baseUrl":"http://a1-sim-STD:8085/",
+            "managedElementIds": [
+               "kista_1",
+               "kista_2"
+            ]
+         }
+      ]
+   }
+}
\ No newline at end of file
diff --git a/docker-compose/nosdnc/docker-compose.yml b/docker-compose/nosdnc/docker-compose.yml
new file mode 100644
index 0000000..043ecde
--- /dev/null
+++ b/docker-compose/nosdnc/docker-compose.yml
@@ -0,0 +1,64 @@
+#  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'
+services:
+  policy-agent:
+    image: nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-policy-agent:2.0.0
+    container_name: policy-agent
+    networks:
+      default:
+        aliases:
+          - policy-agent-container
+    ports:
+      - 8081:8081
+      - 8433:8433
+    volumes:
+      - ./config:/opt/app/policy-agent/config:ro
+
+  a1-sim-OSC:
+    image: nexus3.o-ran-sc.org:10004/o-ran-sc/a1-simulator:2.0.0
+    container_name: a1-sim-OSC
+    networks:
+      - default
+    ports:
+      - 30001:8085
+      - 30002:8185
+    environment:
+      - A1_VERSION=OSC_2.1.0
+      - REMOTE_HOSTS_LOGGING=1
+      - ALLOW_HTTP=true
+
+  a1-sim-STD:
+    image: nexus3.o-ran-sc.org:10004/o-ran-sc/a1-simulator:2.0.0
+    container_name: a1-sim-STD
+    networks:
+      - default
+    ports:
+      - 30003:8085
+      - 30004:8185
+    environment:
+      - A1_VERSION=STD_1.1.3
+      - REMOTE_HOSTS_LOGGING=1
+      - ALLOW_HTTP=true
+
+  policy-control-panel:
+    image: nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-controlpanel:2.0.0
+    container_name: policy-control-panel
+    networks:
+      - default
+    ports:
+      - 8080:8080
+      - 8082:8082
diff --git a/docker-compose/sdnc/config/application.yaml b/docker-compose/sdnc/config/application.yaml
new file mode 100755
index 0000000..c0ddfb5
--- /dev/null
+++ b/docker-compose/sdnc/config/application.yaml
@@ -0,0 +1,37 @@
+spring:
+  profiles:
+    active: prod
+  main:
+    allow-bean-definition-overriding: true
+  aop:
+    auto: false
+management:
+  endpoints:
+    web:
+      exposure:
+        include: "loggers,logfile,health,info,metrics,threaddump,heapdump"
+
+logging:
+  level:
+    ROOT: ERROR
+    org.springframework: ERROR
+    org.springframework.data: ERROR
+    org.springframework.web.reactive.function.client.ExchangeFunctions: ERROR
+    org.oransc.policyagent: INFO
+  file: /var/log/policy-agent/application.log
+server:
+   port : 8433
+   http-port: 8081
+   ssl:
+      key-store-type: JKS
+      key-store-password: policy_agent
+      key-store: classpath:keystore.jks
+      key-password: policy_agent
+      key-alias: policy_agent
+app:
+  filepath: /opt/app/policy-agent/config/application_configuration.json
+  webclient:
+    trust-store-used: false
+    trust-store-password: policy_agent
+    trust-store: classpath:keystore.jks
+
diff --git a/docker-compose/sdnc/config/application_configuration.json b/docker-compose/sdnc/config/application_configuration.json
new file mode 100644
index 0000000..31ec633
--- /dev/null
+++ b/docker-compose/sdnc/config/application_configuration.json
@@ -0,0 +1,33 @@
+{
+   "config": {
+      "//description": "Application configuration",
+      "controller": [
+         {
+            "name": "a1-controller",
+            "baseUrl": "http://a1-controller:8181",
+            "userName": "admin",
+            "password": "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U"
+         }
+      ],
+      "ric": [
+         {
+            "name": "ric1",
+            "baseUrl": "http://a1-sim-OSC:8085/",
+            "controller": "a1-controller",
+            "managedElementIds": [
+               "kista_1",
+               "kista_2"
+            ]
+         },
+         {
+            "name":"ric2",
+            "baseUrl":"http://a1-sim-STD:8085/",
+            "controller": "a1-controller",
+            "managedElementIds":[
+               "kista_1",
+               "kista_2"
+            ]
+         }
+      ]
+   }
+}
\ No newline at end of file
diff --git a/docker-compose/sdnc/docker-compose.yml b/docker-compose/sdnc/docker-compose.yml
new file mode 100644
index 0000000..f12f08c
--- /dev/null
+++ b/docker-compose/sdnc/docker-compose.yml
@@ -0,0 +1,104 @@
+#  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'
+services:
+  policy-agent:
+    image: nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-policy-agent:2.0.0
+    container_name: policy-agent
+    networks:
+      default:
+        aliases:
+          - policy-agent-container
+    ports:
+      - 8081:8081
+      - 8433:8433
+    volumes:
+      - ./config:/opt/app/policy-agent/config:ro
+
+  a1-sim-OSC:
+    image: nexus3.o-ran-sc.org:10004/o-ran-sc/a1-simulator:2.0.0
+    container_name: a1-sim-OSC
+    networks:
+      - default
+    ports:
+      - 30001:8085
+      - 30002:8185
+    environment:
+      - A1_VERSION=OSC_2.1.0
+      - REMOTE_HOSTS_LOGGING=1
+      - ALLOW_HTTP=true
+
+  a1-sim-STD:
+    image: nexus3.o-ran-sc.org:10004/o-ran-sc/a1-simulator:2.0.0
+    container_name: a1-sim-STD
+    networks:
+      - default
+    ports:
+      - 30003:8085
+      - 30004:8185
+    environment:
+      - A1_VERSION=STD_1.1.3
+      - REMOTE_HOSTS_LOGGING=1
+      - ALLOW_HTTP=true
+
+  policy-control-panel:
+    image: nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-controlpanel:2.0.0
+    container_name: policy-control-panel
+    networks:
+      - default
+    ports:
+      - 8080:8080
+      - 8082:8082
+
+  db:
+    image: mysql/mysql-server:5.6
+    container_name: sdnc-db
+    networks:
+      - default
+    ports:
+      - "3306"
+    environment:
+      - MYSQL_ROOT_PASSWORD=openECOMP1.0
+      - MYSQL_ROOT_HOST=%
+    logging:
+      driver:   "json-file"
+      options:
+        max-size: "30m"
+        max-file: "5"
+
+  a1-controller:
+    image: nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-a1-controller:2.0.0
+    depends_on :
+      - db
+    container_name: a1-controller
+    networks:
+      - default
+    entrypoint: ["/opt/onap/sdnc/bin/startODL.sh"]
+    ports:
+      - 8282:8181
+      - 8443:8443
+    links:
+      - db:dbhost
+      - db:sdnctldb01
+      - db:sdnctldb02
+    environment:
+      - MYSQL_ROOT_PASSWORD=openECOMP1.0
+      - SDNC_CONFIG_DIR=/opt/onap/sdnc/data/properties
+    logging:
+      driver:   "json-file"
+      options:
+        max-size: "30m"
+        max-file: "5"
diff --git a/docs/images/healtcheck.png b/docs/images/healtcheck.png
new file mode 100644
index 0000000..fc56e38
--- /dev/null
+++ b/docs/images/healtcheck.png
Binary files differ
diff --git a/docs/index.rst b/docs/index.rst
index d20c1ba..21469e7 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -15,6 +15,7 @@
    ./developer-guide.rst
    ./installation-guide.rst
    ./overview.rst
+   ./use-cases.rst
    ./release-notes.rst
 
 * :ref:`search`
diff --git a/docs/use-cases.rst b/docs/use-cases.rst
new file mode 100644
index 0000000..a6d9cc5
--- /dev/null
+++ b/docs/use-cases.rst
@@ -0,0 +1,19 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. Copyright (C) 2020 Nordix
+
+Use Cases
+=========
+
+To support the use cases defined for the Non-RT RIC, there are implementations provided in the nonrtric repo, see:
+  nonrtric/test/usecases
+
+Health Check
+------------
+The Health Check use case for the Non-RT RIC is a python script that regularly creates, reads, updates, and deletes a
+policy in all Near-RT RICs that support the type used by the script. A self refreshing web page provides a view of
+statistics for these regular checks.
+
+For more information about it, see the README file in the use case's folder.
+
+.. image:: ./images/healtcheck.png
diff --git a/policy-agent/Dockerfile b/policy-agent/Dockerfile
index 75da240..15f0502 100644
--- a/policy-agent/Dockerfile
+++ b/policy-agent/Dockerfile
@@ -28,7 +28,7 @@
 EXPOSE 8081 8433
 
 ADD /config/application.yaml /opt/app/policy-agent/config/application.yaml
-ADD /config/application_configuration.json /opt/app/policy-agent/data/application_configuration.json
+ADD /config/application_configuration.json /opt/app/policy-agent/data/application_configuration.json_example
 ADD target/${JAR} /opt/app/policy-agent/policy-agent.jar
 
 
diff --git a/policy-agent/pom.xml b/policy-agent/pom.xml
index ed1cbf1..9bf15b2 100644
--- a/policy-agent/pom.xml
+++ b/policy-agent/pom.xml
@@ -31,7 +31,7 @@
     </parent>
     <groupId>org.o-ran-sc.nonrtric</groupId>
     <artifactId>policy-agent</artifactId>
-    <version>1.0.0-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
     <licenses>
         <license>
             <name>The Apache Software License, Version 2.0</name>
@@ -53,7 +53,6 @@
         <swagger.version>2.0.0</swagger.version>
         <json.version>20190722</json.version>
         <commons-net.version>3.6</commons-net.version>
-        <awaitility.version>4.0.2</awaitility.version>
         <maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
         <formatter-maven-plugin.version>2.8.1</formatter-maven-plugin.version>
         <spotless-maven-plugin.version>1.18.0</spotless-maven-plugin.version>
@@ -62,6 +61,8 @@
         <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>
+        <exec-maven-plugin.version>1.6.0</exec-maven-plugin.version>
+        <exec.skip>true</exec.skip>
     </properties>
     <dependencies>
         <dependency>
@@ -124,17 +125,6 @@
             <artifactId>commons-net</artifactId>
             <version>${commons-net.version}</version>
         </dependency>
-        <!-- Actuator dependencies -->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-actuator</artifactId>
-        </dependency>
-        <!--TEST -->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-test</artifactId>
-            <scope>test</scope>
-        </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-configuration-processor</artifactId>
@@ -156,10 +146,26 @@
             <scope>provided</scope>
         </dependency>
         <dependency>
-            <groupId>com.squareup.okhttp3</groupId>
-            <artifactId>mockwebserver</artifactId>
-            <scope>test</scope>
+            <groupId>org.onap.dmaap.messagerouter.dmaapclient</groupId>
+            <artifactId>dmaapClient</artifactId>
+            <version>${version.dmaap}</version>
         </dependency>
+        <dependency>
+            <groupId>javax.ws.rs</groupId>
+            <artifactId>javax.ws.rs-api</artifactId>
+            <version>${javax.ws.rs-api.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.glassfish.jersey.inject</groupId>
+            <artifactId>jersey-hk2</artifactId>
+        </dependency>
+
+        <!-- Actuator dependencies -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+        </dependency>
+
         <!--REQUIRED TO GENERATE DOCUMENTATION -->
         <dependency>
             <groupId>io.springfox</groupId>
@@ -171,11 +177,16 @@
             <artifactId>springfox-swagger-ui</artifactId>
             <version>${springfox.version}</version>
         </dependency>
+
         <!-- TEST -->
         <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
             <groupId>org.awaitility</groupId>
             <artifactId>awaitility</artifactId>
-            <version>${awaitility.version}</version>
             <scope>test</scope>
         </dependency>
         <dependency>
@@ -199,18 +210,9 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>org.onap.dmaap.messagerouter.dmaapclient</groupId>
-            <artifactId>dmaapClient</artifactId>
-            <version>${version.dmaap}</version>
-        </dependency>
-        <dependency>
-            <groupId>javax.ws.rs</groupId>
-            <artifactId>javax.ws.rs-api</artifactId>
-            <version>${javax.ws.rs-api.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.glassfish.jersey.inject</groupId>
-            <artifactId>jersey-hk2</artifactId>
+            <groupId>com.squareup.okhttp3</groupId>
+            <artifactId>mockwebserver</artifactId>
+            <scope>test</scope>
         </dependency>
     </dependencies>
     <build>
@@ -226,7 +228,7 @@
                 <configuration>
                     <configFile>${project.basedir}/eclipse-formatter.xml</configFile>
                 </configuration>
-                <!-- https://code.revelc.net/formatter-maven-plugin/ use mvn formatter:format 
+                <!-- https://code.revelc.net/formatter-maven-plugin/ use mvn formatter:format
 					spotless:apply process-sources -->
             </plugin>
             <plugin>
@@ -241,8 +243,8 @@
                         </importOrder>
                     </java>
                 </configuration>
-                <!-- https://github.com/diffplug/spotless/tree/master/plugin-maven use 
-					mvn spotless:apply to rewrite source files use mvn spotless:check to validate 
+                <!-- https://github.com/diffplug/spotless/tree/master/plugin-maven use
+					mvn spotless:apply to rewrite source files use mvn spotless:check to validate
 					source files -->
             </plugin>
             <plugin>
@@ -360,6 +362,27 @@
                 <artifactId>sonar-maven-plugin</artifactId>
                 <version>${sonar-maven-plugin.version}</version>
             </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>exec-maven-plugin</artifactId>
+                <version>${exec-maven-plugin.version}</version>
+                <executions>
+                    <execution>
+                        <id>run-test-script</id>
+                        <phase>verify</phase>
+                        <goals>
+                            <goal>exec</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <executable>bash</executable>
+                    <arguments>
+                        <argument>run_test.sh</argument>
+                    </arguments>
+                    <workingDirectory>../test/jenkins/</workingDirectory>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
     <issueManagement>
diff --git a/policy-agent/src/main/java/org/oransc/policyagent/clients/AsyncRestClient.java b/policy-agent/src/main/java/org/oransc/policyagent/clients/AsyncRestClient.java
index 4ba58c7..b292c51 100644
--- a/policy-agent/src/main/java/org/oransc/policyagent/clients/AsyncRestClient.java
+++ b/policy-agent/src/main/java/org/oransc/policyagent/clients/AsyncRestClient.java
@@ -196,7 +196,7 @@
             logger.debug("{} HTTP error status = '{}', body '{}'", traceTag, exception.getStatusCode(),
                 exception.getResponseBodyAsString());
         } else {
-            logger.debug("{} HTTP error: {}", traceTag, t.getMessage());
+            logger.debug("{} HTTP error", traceTag, t);
         }
     }
 
diff --git a/policy-agent/src/main/java/org/oransc/policyagent/controllers/PolicyController.java b/policy-agent/src/main/java/org/oransc/policyagent/controllers/PolicyController.java
index 7cc042c..d2ae0e0 100644
--- a/policy-agent/src/main/java/org/oransc/policyagent/controllers/PolicyController.java
+++ b/policy-agent/src/main/java/org/oransc/policyagent/controllers/PolicyController.java
@@ -286,6 +286,7 @@
             RejectionException e = new RejectionException("Policy cannot change RIC, policyId: " + current.id() + //
                 ", RIC name: " + current.ric().name() + //
                 ", new name: " + policy.ric().name(), HttpStatus.CONFLICT);
+            logger.debug("Request rejected, {}", e.getMessage());
             return Mono.error(e);
         }
         return Mono.just("OK");
@@ -293,6 +294,7 @@
 
     private Mono<Object> checkSupportedType(Ric ric, PolicyType type) {
         if (!ric.isSupportingType(type.name())) {
+            logger.debug("Request rejected, type not supported, RIC: {}", ric);
             RejectionException e = new RejectionException(
                 "Type: " + type.name() + " not supported by RIC: " + ric.name(), HttpStatus.NOT_FOUND);
             return Mono.error(e);
@@ -304,6 +306,7 @@
         if (ric.getState() == Ric.RicState.AVAILABLE) {
             return Mono.just("OK");
         } else {
+            logger.debug("Request rejected RIC not IDLE, ric: {}", ric);
             RejectionException e = new RejectionException(
                 "Ric is not operational, RIC name: " + ric.name() + ", state: " + ric.getState(), HttpStatus.LOCKED);
             return Mono.error(e);
diff --git a/policy-agent/src/main/java/org/oransc/policyagent/dmaap/DmaapMessageHandler.java b/policy-agent/src/main/java/org/oransc/policyagent/dmaap/DmaapMessageHandler.java
index c50a46f..19d1564 100644
--- a/policy-agent/src/main/java/org/oransc/policyagent/dmaap/DmaapMessageHandler.java
+++ b/policy-agent/src/main/java/org/oransc/policyagent/dmaap/DmaapMessageHandler.java
@@ -35,6 +35,7 @@
 import org.slf4j.LoggerFactory;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
+import org.springframework.web.reactive.function.client.WebClientException;
 import org.springframework.web.reactive.function.client.WebClientResponseException;
 import reactor.core.publisher.Mono;
 
@@ -81,7 +82,7 @@
     private Mono<ResponseEntity<String>> handleAgentCallError(Throwable t, String originalMessage,
         DmaapRequestMessage dmaapRequestMessage) {
         logger.debug("Agent call failed: {}", t.getMessage());
-        HttpStatus status = HttpStatus.NOT_FOUND;
+        HttpStatus status = HttpStatus.INTERNAL_SERVER_ERROR;
         String errorMessage = t.getMessage();
         if (t instanceof WebClientResponseException) {
             WebClientResponseException exception = (WebClientResponseException) t;
@@ -90,7 +91,8 @@
         } else if (t instanceof ServiceException) {
             status = HttpStatus.BAD_REQUEST;
             errorMessage = prepareBadOperationErrorMessage(t, originalMessage);
-
+        } else if (!(t instanceof WebClientException)) {
+            logger.warn("Unexpected exception ", t);
         }
         return sendDmaapResponse(errorMessage, dmaapRequestMessage, status) //
             .flatMap(notUsed -> Mono.empty());
@@ -119,7 +121,6 @@
         } else {
             return Mono.error(new ServiceException("Not implemented operation: " + operation));
         }
-
     }
 
     private String payload(DmaapRequestMessage message) {
diff --git a/policy-agent/src/main/java/org/oransc/policyagent/repository/Lock.java b/policy-agent/src/main/java/org/oransc/policyagent/repository/Lock.java
index ed94492..716148f 100644
--- a/policy-agent/src/main/java/org/oransc/policyagent/repository/Lock.java
+++ b/policy-agent/src/main/java/org/oransc/policyagent/repository/Lock.java
@@ -44,6 +44,115 @@
     private final List<LockRequest> lockRequestQueue = new LinkedList<>();
     private static AsynchCallbackExecutor callbackProcessor = new AsynchCallbackExecutor();
 
+    public enum LockType {
+        EXCLUSIVE, SHARED
+    }
+
+    /** The caller thread will be blocked util the lock is granted. */
+    public synchronized void lockBlocking(LockType locktype) {
+        while (!tryLock(locktype)) {
+            this.waitForUnlock();
+        }
+    }
+
+    /** Reactive version. The Lock will be emitted when the lock is granted */
+    public synchronized Mono<Lock> lock(LockType lockType) {
+        if (tryLock(lockType)) {
+            return Mono.just(this);
+        } else {
+            return Mono.create(monoSink -> addToQueue(monoSink, lockType));
+        }
+    }
+
+    public Mono<Lock> unlock() {
+        return Mono.create(monoSink -> {
+            unlockBlocking();
+            monoSink.success(this);
+        });
+    }
+
+    public synchronized void unlockBlocking() {
+        if (lockCounter <= 0) {
+            lockCounter = -1; // Might as well stop, to make it easier to find the problem
+            logger.error("Number of unlocks must match the number of locks");
+        }
+        this.lockCounter--;
+        if (lockCounter == 0) {
+            isExclusive = false;
+        }
+        this.notifyAll();
+        this.processQueuedEntries();
+    }
+
+    @Override
+    public synchronized String toString() {
+        return "Lock cnt: " + this.lockCounter + " exclusive: " + this.isExclusive + " queued: "
+            + this.lockRequestQueue.size();
+    }
+
+    /** returns the current number of granted locks */
+    public synchronized int getLockCounter() {
+        return this.lockCounter;
+    }
+
+    private void processQueuedEntries() {
+        List<LockRequest> granted = new ArrayList<>();
+        for (Iterator<LockRequest> i = lockRequestQueue.iterator(); i.hasNext();) {
+            LockRequest request = i.next();
+            if (tryLock(request.lockType)) {
+                i.remove();
+                granted.add(request);
+            }
+        }
+        callbackProcessor.addAll(granted);
+    }
+
+    private synchronized void addToQueue(MonoSink<Lock> callback, LockType lockType) {
+        lockRequestQueue.add(new LockRequest(callback, lockType, this));
+        processQueuedEntries();
+    }
+
+    @SuppressWarnings("java:S2274") // Always invoke wait() and await() methods inside a loop
+    private synchronized void waitForUnlock() {
+        try {
+            this.wait();
+        } catch (InterruptedException e) {
+            logger.warn("waitForUnlock interrupted", e);
+            Thread.currentThread().interrupt();
+        }
+    }
+
+    private boolean tryLock(LockType lockType) {
+        if (this.isExclusive) {
+            return false;
+        }
+        if (lockType == LockType.EXCLUSIVE && lockCounter > 0) {
+            return false;
+        }
+        lockCounter++;
+        this.isExclusive = lockType == LockType.EXCLUSIVE;
+        return true;
+    }
+
+    /**
+     * Represents a queued lock request
+     */
+    private static class LockRequest {
+        final MonoSink<Lock> callback;
+        final LockType lockType;
+        final Lock lock;
+
+        LockRequest(MonoSink<Lock> callback, LockType lockType, Lock lock) {
+            this.callback = callback;
+            this.lockType = lockType;
+            this.lock = lock;
+        }
+    }
+
+    /**
+     * A separate thread that calls a MonoSink to continue. This is done after a
+     * queued lock is granted.
+     */
     private static class AsynchCallbackExecutor implements Runnable {
         private List<LockRequest> lockRequestQueue = new LinkedList<>();
 
@@ -85,110 +194,4 @@
             }
         }
     }
-
-    public enum LockType {
-        EXCLUSIVE, SHARED
-    }
-
-    /** The caller thread will be blocked util the lock is granted. */
-    public synchronized void lockBlocking(LockType locktype) {
-        while (!tryLock(locktype)) {
-            this.waitForUnlock();
-        }
-    }
-
-    /** Reactive version. The Lock will be emitted when the lock is granted */
-    public synchronized Mono<Lock> lock(LockType lockType) {
-        if (tryLock(lockType)) {
-            return Mono.just(this);
-        } else {
-            return Mono.create(monoSink -> addToQueue(monoSink, lockType));
-        }
-    }
-
-    public Mono<Lock> unlock() {
-        return Mono.create(monoSink -> {
-            unlockBlocking();
-            monoSink.success(this);
-        });
-    }
-
-    public void unlockBlocking() {
-        synchronized (this) {
-            if (lockCounter <= 0) {
-                lockCounter = -1; // Might as well stop, to make it easier to find the problem
-                logger.error("Number of unlocks must match the number of locks");
-            }
-            this.lockCounter--;
-            if (lockCounter == 0) {
-                isExclusive = false;
-            }
-            this.notifyAll();
-        }
-        this.processQueuedEntries();
-    }
-
-    @Override
-    public String toString() {
-        return "Lock cnt: " + this.lockCounter + " exclusive: " + this.isExclusive + " queued: "
-            + this.lockRequestQueue.size();
-    }
-
-    /** returns the current number of granted locks */
-    public synchronized int getLockCounter() {
-        return this.lockCounter;
-    }
-
-    private void processQueuedEntries() {
-        List<LockRequest> granted = new ArrayList<>();
-        synchronized (this) {
-            for (Iterator<LockRequest> i = lockRequestQueue.iterator(); i.hasNext();) {
-                LockRequest request = i.next();
-                if (tryLock(request.lockType)) {
-                    i.remove();
-                    granted.add(request);
-                }
-            }
-        }
-        callbackProcessor.addAll(granted);
-    }
-
-    private static class LockRequest {
-        final MonoSink<Lock> callback;
-        final LockType lockType;
-        final Lock lock;
-
-        LockRequest(MonoSink<Lock> callback, LockType lockType, Lock lock) {
-            this.callback = callback;
-            this.lockType = lockType;
-            this.lock = lock;
-        }
-    }
-
-    private synchronized void addToQueue(MonoSink<Lock> callback, LockType lockType) {
-        lockRequestQueue.add(new LockRequest(callback, lockType, this));
-    }
-
-    @SuppressWarnings("java:S2274") // Always invoke wait() and await() methods inside a loop
-    private synchronized void waitForUnlock() {
-        try {
-            this.wait();
-        } catch (InterruptedException e) {
-            logger.warn("waitForUnlock interrupted", e);
-            Thread.currentThread().interrupt();
-        }
-    }
-
-    private boolean tryLock(LockType lockType) {
-        if (this.isExclusive) {
-            return false;
-        }
-        if (lockType == LockType.EXCLUSIVE && lockCounter > 0) {
-            return false;
-        }
-        lockCounter++;
-        this.isExclusive = lockType == LockType.EXCLUSIVE;
-        return true;
-    }
-
 }
diff --git a/pom.xml b/pom.xml
index facc920..4cb5edf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@
 
     <groupId>org.o-ran-sc</groupId>
     <artifactId>nonrtric</artifactId>
-    <version>1.0.1-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <name>nonrtric</name>
diff --git a/sdnc-a1-controller/northbound/features/features-sdnc-a1-northbound/pom.xml b/sdnc-a1-controller/northbound/features/features-sdnc-a1-northbound/pom.xml
index c637817..042e481 100644
--- a/sdnc-a1-controller/northbound/features/features-sdnc-a1-northbound/pom.xml
+++ b/sdnc-a1-controller/northbound/features/features-sdnc-a1-northbound/pom.xml
@@ -38,7 +38,7 @@
 
     <groupId>org.o-ran-sc.nonrtric.sdnc-a1.northbound</groupId>
     <artifactId>features-sdnc-a1-northbound</artifactId>
-    <version>1.7.5-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>sdnc-a1-northbound :: features :: ${project.artifactId}</name>
diff --git a/sdnc-a1-controller/northbound/features/installer/pom.xml b/sdnc-a1-controller/northbound/features/installer/pom.xml
index 2366499..75e41f6 100755
--- a/sdnc-a1-controller/northbound/features/installer/pom.xml
+++ b/sdnc-a1-controller/northbound/features/installer/pom.xml
@@ -30,7 +30,7 @@
 
 	<groupId>org.o-ran-sc.nonrtric.sdnc-a1.northbound</groupId>
 	<artifactId>sdnc-a1-northbound-features-installer</artifactId>
-	<version>1.7.5-SNAPSHOT</version>
+	<version>2.0.0-SNAPSHOT</version>
 	<packaging>pom</packaging>
 
 	<name>sdnc-a1-northbound :: features :: ${project.artifactId}</name>
diff --git a/sdnc-a1-controller/northbound/features/pom.xml b/sdnc-a1-controller/northbound/features/pom.xml
index 96dfb7b..3986363 100755
--- a/sdnc-a1-controller/northbound/features/pom.xml
+++ b/sdnc-a1-controller/northbound/features/pom.xml
@@ -30,7 +30,7 @@
 
 	<groupId>org.o-ran-sc.nonrtric.sdnc-a1.northbound</groupId>
 	<artifactId>sdnc-northbound-feature-aggregator</artifactId>
-	<version>1.7.5-SNAPSHOT</version>
+	<version>2.0.0-SNAPSHOT</version>
 	<packaging>pom</packaging>
 
 	<name>sdnc-a1-northbound :: features</name>
diff --git a/sdnc-a1-controller/northbound/features/sdnc-a1-northbound-all/pom.xml b/sdnc-a1-controller/northbound/features/sdnc-a1-northbound-all/pom.xml
index 3490585..6365abe 100644
--- a/sdnc-a1-controller/northbound/features/sdnc-a1-northbound-all/pom.xml
+++ b/sdnc-a1-controller/northbound/features/sdnc-a1-northbound-all/pom.xml
@@ -38,7 +38,7 @@
 
 	<groupId>org.o-ran-sc.nonrtric.sdnc-a1.northbound</groupId>
 	<artifactId>sdnc-a1-northbound-all</artifactId>
-	<version>1.7.5-SNAPSHOT</version>
+	<version>2.0.0-SNAPSHOT</version>
 	<packaging>feature</packaging>
 
 	<name>sdnc-a1-northbound :: features :: ${project.artifactId}</name>
diff --git a/sdnc-a1-controller/northbound/nonrt-ric-api/features/features-nonrt-ric-api/pom.xml b/sdnc-a1-controller/northbound/nonrt-ric-api/features/features-nonrt-ric-api/pom.xml
index 74867cc..4ec9ab6 100644
--- a/sdnc-a1-controller/northbound/nonrt-ric-api/features/features-nonrt-ric-api/pom.xml
+++ b/sdnc-a1-controller/northbound/nonrt-ric-api/features/features-nonrt-ric-api/pom.xml
@@ -30,7 +30,7 @@
 
 	<groupId>org.o-ran-sc.nonrtric.sdnc-a1.northbound</groupId>
 	<artifactId>features-nonrt-ric-api</artifactId>
-	<version>1.7.5-SNAPSHOT</version>
+	<version>2.0.0-SNAPSHOT</version>
 	<packaging>feature</packaging>
 
 	<name>sdnc-a1-northbound :: nonrt-ric-api :: ${project.artifactId}</name>
diff --git a/sdnc-a1-controller/northbound/nonrt-ric-api/features/pom.xml b/sdnc-a1-controller/northbound/nonrt-ric-api/features/pom.xml
index 6547d33..09ce581 100644
--- a/sdnc-a1-controller/northbound/nonrt-ric-api/features/pom.xml
+++ b/sdnc-a1-controller/northbound/nonrt-ric-api/features/pom.xml
@@ -30,7 +30,7 @@
 
     <groupId>org.o-ran-sc.nonrtric.sdnc-a1.northbound</groupId>
     <artifactId>nonrt-ric-api-features</artifactId>
-    <version>1.7.5-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <name>sdnc-a1-northbound :: nonrt-ric-api :: ${project.artifactId}</name>
diff --git a/sdnc-a1-controller/northbound/nonrt-ric-api/features/sdnc-nonrt-ric-api/pom.xml b/sdnc-a1-controller/northbound/nonrt-ric-api/features/sdnc-nonrt-ric-api/pom.xml
index 4f4d223..83eb53e 100644
--- a/sdnc-a1-controller/northbound/nonrt-ric-api/features/sdnc-nonrt-ric-api/pom.xml
+++ b/sdnc-a1-controller/northbound/nonrt-ric-api/features/sdnc-nonrt-ric-api/pom.xml
@@ -30,7 +30,7 @@
 
     <groupId>org.o-ran-sc.nonrtric.sdnc-a1.northbound</groupId>
     <artifactId>sdnc-nonrt-ric-api</artifactId>
-    <version>1.7.5-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>sdnc-a1-northbound :: nonrt-ric-api :: ${project.artifactId}</name>
diff --git a/sdnc-a1-controller/northbound/nonrt-ric-api/installer/pom.xml b/sdnc-a1-controller/northbound/nonrt-ric-api/installer/pom.xml
index aaa3517..3a70a34 100755
--- a/sdnc-a1-controller/northbound/nonrt-ric-api/installer/pom.xml
+++ b/sdnc-a1-controller/northbound/nonrt-ric-api/installer/pom.xml
@@ -30,7 +30,7 @@
 
 	<groupId>org.o-ran-sc.nonrtric.sdnc-a1.northbound</groupId>
 	<artifactId>nonrt-ric-api-installer</artifactId>
-	<version>1.7.5-SNAPSHOT</version>
+	<version>2.0.0-SNAPSHOT</version>
 	<packaging>pom</packaging>
 
 	<name>sdnc-a1-northbound :: nonrt-ric-api :: ${project.artifactId}</name>
diff --git a/sdnc-a1-controller/northbound/nonrt-ric-api/model/pom.xml b/sdnc-a1-controller/northbound/nonrt-ric-api/model/pom.xml
index df2a5b0..08fd479 100644
--- a/sdnc-a1-controller/northbound/nonrt-ric-api/model/pom.xml
+++ b/sdnc-a1-controller/northbound/nonrt-ric-api/model/pom.xml
@@ -38,7 +38,7 @@
 
     <groupId>org.o-ran-sc.nonrtric.sdnc-a1.northbound</groupId>
     <artifactId>nonrt-ric-api-model</artifactId>
-    <version>1.7.5-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>sdnc-a1-northbound :: nonrt-ric-api :: ${project.artifactId}</name>
diff --git a/sdnc-a1-controller/northbound/nonrt-ric-api/pom.xml b/sdnc-a1-controller/northbound/nonrt-ric-api/pom.xml
index fbac7a5..c24857f 100644
--- a/sdnc-a1-controller/northbound/nonrt-ric-api/pom.xml
+++ b/sdnc-a1-controller/northbound/nonrt-ric-api/pom.xml
@@ -32,7 +32,7 @@
 
 	<groupId>org.o-ran-sc.nonrtric.sdnc-a1.northbound</groupId>
 	<artifactId>nonrt-ric-api</artifactId>
-	<version>1.7.5-SNAPSHOT</version>
+	<version>2.0.0-SNAPSHOT</version>
 	<packaging>pom</packaging>
 
 	<name>sdnc-a1-northbound :: nonrt-ric-api</name>
diff --git a/sdnc-a1-controller/northbound/nonrt-ric-api/provider/pom.xml b/sdnc-a1-controller/northbound/nonrt-ric-api/provider/pom.xml
index 4b4e081..7f38d5b 100644
--- a/sdnc-a1-controller/northbound/nonrt-ric-api/provider/pom.xml
+++ b/sdnc-a1-controller/northbound/nonrt-ric-api/provider/pom.xml
@@ -40,7 +40,7 @@
 
     <groupId>org.o-ran-sc.nonrtric.sdnc-a1.northbound</groupId>
     <artifactId>nonrt-ric-api-provider</artifactId>
-    <version>1.7.5-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>sdnc-a1-northbound :: nonrt-ric-api :: ${project.artifactId}</name>
diff --git a/sdnc-a1-controller/northbound/nonrt-ric-api/provider/src/main/java/org/o_ran_sc/nonrtric/sdnc_a1/northbound/restadapter/RestAdapterImpl.java b/sdnc-a1-controller/northbound/nonrt-ric-api/provider/src/main/java/org/o_ran_sc/nonrtric/sdnc_a1/northbound/restadapter/RestAdapterImpl.java
index d317e56..928b65f 100644
--- a/sdnc-a1-controller/northbound/nonrt-ric-api/provider/src/main/java/org/o_ran_sc/nonrtric/sdnc_a1/northbound/restadapter/RestAdapterImpl.java
+++ b/sdnc-a1-controller/northbound/nonrt-ric-api/provider/src/main/java/org/o_ran_sc/nonrtric/sdnc_a1/northbound/restadapter/RestAdapterImpl.java
@@ -34,7 +34,7 @@
 import org.apache.http.client.HttpClient;
 import org.apache.http.conn.ssl.NoopHostnameVerifier;
 import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
-import org.apache.http.conn.ssl.TrustSelfSignedStrategy;
+import org.apache.http.conn.ssl.TrustAllStrategy;
 import org.apache.http.impl.client.HttpClients;
 import org.apache.http.ssl.SSLContexts;
 import org.slf4j.Logger;
@@ -87,7 +87,7 @@
                   SSLContexts.custom()
                              .loadKeyMaterial(ResourceUtils.getFile(properties.getProperty("key-store")),
                                      keystorePassword.toCharArray(), keystorePassword.toCharArray())
-                             .loadTrustMaterial(null, new TrustSelfSignedStrategy())
+                             .loadTrustMaterial(null, new TrustAllStrategy())
                              .build(),
                   NoopHostnameVerifier.INSTANCE);
           HttpClient client = HttpClients.custom().setSSLSocketFactory(scsf).build();
diff --git a/sdnc-a1-controller/northbound/pom.xml b/sdnc-a1-controller/northbound/pom.xml
index fed4727..1f95097 100644
--- a/sdnc-a1-controller/northbound/pom.xml
+++ b/sdnc-a1-controller/northbound/pom.xml
@@ -38,7 +38,7 @@
 
 	<groupId>org.o-ran-sc.nonrtric.sdnc-a1.northbound</groupId>
 	<artifactId>sdnc-a1-northbound</artifactId>
-	<version>1.7.5-SNAPSHOT</version>
+	<version>2.0.0-SNAPSHOT</version>
 	<packaging>pom</packaging>
 
 	<properties>
diff --git a/sdnc-a1-controller/oam/installation/pom.xml b/sdnc-a1-controller/oam/installation/pom.xml
index 7ebda23..6cdf04f 100644
--- a/sdnc-a1-controller/oam/installation/pom.xml
+++ b/sdnc-a1-controller/oam/installation/pom.xml
@@ -30,7 +30,7 @@
     <packaging>pom</packaging>
     <groupId>org.o-ran-sc.nonrtric.sdnc-a1.oam</groupId>
     <artifactId>installation</artifactId>
-    <version>1.7.5-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
 
     <name>sdnc-a1-oam :: installation</name>
     <description>Installs SDN-C on local file system</description>
diff --git a/sdnc-a1-controller/oam/installation/sdnc-a1/pom.xml b/sdnc-a1-controller/oam/installation/sdnc-a1/pom.xml
index 9e1731a..cd58073 100644
--- a/sdnc-a1-controller/oam/installation/sdnc-a1/pom.xml
+++ b/sdnc-a1-controller/oam/installation/sdnc-a1/pom.xml
@@ -30,17 +30,17 @@
     <packaging>pom</packaging>
     <groupId>org.o-ran-sc.nonrtric.sdnc-a1.oam</groupId>
     <artifactId>installation-sdnc-a1</artifactId>
-    <version>1.7.5-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
 
     <name>sdnc-a1-oam :: installation :: ${project.artifactId}</name>
     <description>Creates SDN Controller Docker container</description>
 
     <properties>
      <standalone.image.name>o-ran-sc/nonrtric-a1-controller</standalone.image.name>
-     <standalone.image.version>1.7.5-SNAPSHOT</standalone.image.version>
+     <standalone.image.version>2.0.0-SNAPSHOT</standalone.image.version>
      <sdnc.project.version>${project.version}</sdnc.project.version>
      <sdnc.build.timestamp>${maven.build.timestamp}</sdnc.build.timestamp>
-     <sdnc.northbound.version>1.7.5-SNAPSHOT</sdnc.northbound.version>
+     <sdnc.northbound.version>2.0.0-SNAPSHOT</sdnc.northbound.version>
      <ccsdk.docker.version>0.7.0</ccsdk.docker.version>
      <docker.push.phase>deploy</docker.push.phase>
     </properties>
diff --git a/sdnc-a1-controller/oam/installation/src/main/yaml/docker-compose.yml b/sdnc-a1-controller/oam/installation/src/main/yaml/docker-compose.yml
index c7244f7..c2b9978 100644
--- a/sdnc-a1-controller/oam/installation/src/main/yaml/docker-compose.yml
+++ b/sdnc-a1-controller/oam/installation/src/main/yaml/docker-compose.yml
@@ -38,7 +38,7 @@
         max-file: "5"
 
   a1-controller:
-    image: o-ran-sc/nonrtric-a1-controller:1.7.5-SNAPSHOT
+    image: o-ran-sc/nonrtric-a1-controller:2.0.0-SNAPSHOT
     depends_on :
       - db
     container_name: a1-controller-container
diff --git a/sdnc-a1-controller/oam/platform-logic/installer/pom.xml b/sdnc-a1-controller/oam/platform-logic/installer/pom.xml
index fb55685..7e9030c 100644
--- a/sdnc-a1-controller/oam/platform-logic/installer/pom.xml
+++ b/sdnc-a1-controller/oam/platform-logic/installer/pom.xml
@@ -30,7 +30,7 @@
 
 	<groupId>org.o-ran-sc.nonrtric.sdnc-a1.oam</groupId>
 	<artifactId>platform-logic-installer</artifactId>
-	<version>1.7.5-SNAPSHOT</version>
+	<version>2.0.0-SNAPSHOT</version>
 	<packaging>pom</packaging>
 
 	<name>sdnc-a1-oam :: platform-logic :: ${project.artifactId}</name>
diff --git a/sdnc-a1-controller/oam/platform-logic/pom.xml b/sdnc-a1-controller/oam/platform-logic/pom.xml
index f796613..a9d8ca9 100644
--- a/sdnc-a1-controller/oam/platform-logic/pom.xml
+++ b/sdnc-a1-controller/oam/platform-logic/pom.xml
@@ -30,7 +30,7 @@
 
     <groupId>org.o-ran-sc.nonrtric.sdnc-a1.oam</groupId>
     <artifactId>platform-logic</artifactId>
-    <version>1.7.5-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <name>sdnc-a1-oam :: platform-logic</name>
diff --git a/sdnc-a1-controller/oam/platform-logic/setup/pom.xml b/sdnc-a1-controller/oam/platform-logic/setup/pom.xml
index 6f6cc71..f4c62c5 100644
--- a/sdnc-a1-controller/oam/platform-logic/setup/pom.xml
+++ b/sdnc-a1-controller/oam/platform-logic/setup/pom.xml
@@ -30,7 +30,7 @@
 
     <groupId>org.o-ran-sc.nonrtric.sdnc-a1.oam</groupId>
 	<artifactId>platform-logic-setup</artifactId>
-	<version>1.7.5-SNAPSHOT</version>
+	<version>2.0.0-SNAPSHOT</version>
 	<packaging>pom</packaging>
 
     <name>sdnc-a1-oam :: platform-logic :: ${project.artifactId}</name>
diff --git a/sdnc-a1-controller/oam/pom.xml b/sdnc-a1-controller/oam/pom.xml
index eb8a720..45105e6 100755
--- a/sdnc-a1-controller/oam/pom.xml
+++ b/sdnc-a1-controller/oam/pom.xml
@@ -29,7 +29,7 @@
 
 	<groupId>org.o-ran-sc.nonrtric.sdnc-a1.oam</groupId>
 	<artifactId>sdnc-a1-oam</artifactId>
-	<version>1.7.5-SNAPSHOT</version>
+	<version>2.0.0-SNAPSHOT</version>
 	<packaging>pom</packaging>
 
 	<name>sdnc-a1-oam</name>
diff --git a/sdnc-a1-controller/pom.xml b/sdnc-a1-controller/pom.xml
index daca84c..e15d7ef 100644
--- a/sdnc-a1-controller/pom.xml
+++ b/sdnc-a1-controller/pom.xml
@@ -25,7 +25,7 @@
 
 	<groupId>org.o-ran-sc.nonrtric.sdnc-a1</groupId>
 	<artifactId>sdnc-a1</artifactId>
-	<version>1.7.5-SNAPSHOT</version>
+	<version>2.0.0-SNAPSHOT</version>
 	<packaging>pom</packaging>
 
 	<name>sdnc-a1</name>
diff --git a/test/auto-test/.gitignore b/test/auto-test/.gitignore
index c5c4261..89e22de 100644
--- a/test/auto-test/.gitignore
+++ b/test/auto-test/.gitignore
@@ -13,3 +13,4 @@
 .sdnc*
 .timer*
 .pid*
+.result*
diff --git a/test/auto-test/FTC1.sh b/test/auto-test/FTC1.sh
index 877a209..d9a88b1 100755
--- a/test/auto-test/FTC1.sh
+++ b/test/auto-test/FTC1.sh
@@ -35,6 +35,8 @@
 # Path to callback receiver
 CR_PATH="http://$CR_APP_NAME:$CR_EXTERNAL_PORT/callbacks"
 
+generate_uuid
+
 # Tested variants of REST/DMAAP/SDNC config
 TESTED_VARIANTS="REST   DMAAP   REST+SDNC   DMAAP+SDNC"
 #Test agent and simulator protocol versions (others are http only)
diff --git a/test/auto-test/FTC10.sh b/test/auto-test/FTC10.sh
index 771ee55..45e7bdd 100755
--- a/test/auto-test/FTC10.sh
+++ b/test/auto-test/FTC10.sh
@@ -28,6 +28,8 @@
 
 #### TEST BEGIN ####
 
+generate_uuid
+
 #Local vars in test script
 ##########################
 # Path to callback receiver
@@ -151,8 +153,8 @@
 
 # Check remote host access to simulator
 
-sim_contains_ste ricsim_g1_1 hosts "policy-agent"
-sim_contains_ste ricsim_g2_1 hosts "policy-agent"
+sim_contains_str ricsim_g1_1 remote_hosts "policy-agent"
+sim_contains_str ricsim_g2_1 remote_hosts "policy-agent"
 
 # Check policy removal
 use_agent_rest_http
diff --git a/test/auto-test/FTC100.sh b/test/auto-test/FTC100.sh
index 8ee7e37..6f90437 100755
--- a/test/auto-test/FTC100.sh
+++ b/test/auto-test/FTC100.sh
@@ -29,6 +29,8 @@
 
 #### TEST BEGIN ####
 
+generate_uuid
+
 #Local vars in test script
 ##########################
 
diff --git a/test/auto-test/FTC110.sh b/test/auto-test/FTC110.sh
index 1efce99..8427ad1 100755
--- a/test/auto-test/FTC110.sh
+++ b/test/auto-test/FTC110.sh
@@ -27,6 +27,7 @@
 . ../common/agent_api_functions.sh
 . ../common/ricsimulator_api_functions.sh
 
+generate_uuid
 
 #Local vars in test script
 ##########################
diff --git a/test/auto-test/FTC150.sh b/test/auto-test/FTC150.sh
index 9320302..1cd2a33 100755
--- a/test/auto-test/FTC150.sh
+++ b/test/auto-test/FTC150.sh
@@ -29,6 +29,8 @@
 
 #### TEST BEGIN ####
 
+generate_uuid
+
 #Test agent and simulator protocol versions (others are http only)
 TESTED_PROTOCOLS="HTTP HTTPS"
 
diff --git a/test/auto-test/FTC300.sh b/test/auto-test/FTC300.sh
index 9320606..2ab4385 100755
--- a/test/auto-test/FTC300.sh
+++ b/test/auto-test/FTC300.sh
@@ -28,6 +28,8 @@
 
 #### TEST BEGIN ####
 
+generate_uuid
+
 #Local vars in test script
 ##########################
 # Path to callback receiver
diff --git a/test/auto-test/FTC310.sh b/test/auto-test/FTC310.sh
index 18d6816..7eb3c19 100755
--- a/test/auto-test/FTC310.sh
+++ b/test/auto-test/FTC310.sh
@@ -30,6 +30,7 @@
 
 #### TEST BEGIN ####
 
+generate_uuid
 
 # Clean container and start all needed containers #
 clean_containers
diff --git a/test/auto-test/FTC350.sh b/test/auto-test/FTC350.sh
index 0fe253f..416a77d 100755
--- a/test/auto-test/FTC350.sh
+++ b/test/auto-test/FTC350.sh
@@ -28,6 +28,8 @@
 
 #### TEST BEGIN ####
 
+generate_uuid
+
 #Local vars in test script
 ##########################
 # Path to callback receiver
diff --git a/test/auto-test/FTC800.sh b/test/auto-test/FTC800.sh
index 6bab06b..e97f3ff 100755
--- a/test/auto-test/FTC800.sh
+++ b/test/auto-test/FTC800.sh
@@ -28,6 +28,8 @@
 
 #### TEST BEGIN ####
 
+generate_uuid
+
 #Local vars in test script
 ##########################
 # Path to callback receiver
diff --git a/test/auto-test/FTC810.sh b/test/auto-test/FTC810.sh
index 2dae7e7..e9f19f8 100755
--- a/test/auto-test/FTC810.sh
+++ b/test/auto-test/FTC810.sh
@@ -28,6 +28,8 @@
 
 #### TEST BEGIN ####
 
+generate_uuid
+
 #Local vars in test script
 ##########################
 # Path to callback receiver
diff --git a/test/auto-test/FTC850.sh b/test/auto-test/FTC850.sh
index f45246d..32e450f 100755
--- a/test/auto-test/FTC850.sh
+++ b/test/auto-test/FTC850.sh
@@ -42,6 +42,8 @@
 NUM_RICS=20
 NUM_POLICIES_PER_RIC=500
 
+generate_uuid
+
 for __httpx in $TESTED_PROTOCOLS ; do
     for interface in $TESTED_VARIANTS ; do
 
@@ -80,6 +82,8 @@
 
         start_mr # Not used, but removes error messages from the agent log
 
+        start_control_panel
+
         start_policy_agent
 
         set_agent_debug
diff --git a/test/auto-test/FTC900.sh b/test/auto-test/FTC900.sh
index 5515a77..05b6ff6 100755
--- a/test/auto-test/FTC900.sh
+++ b/test/auto-test/FTC900.sh
@@ -17,10 +17,10 @@
 #  ============LICENSE_END=================================================
 #
 
-TC_ONELINE_DESCR="Testing of the health check app"
+TC_ONELINE_DESCR="Preparation for test of the Control Panel and the Health Check app - populating a number of ric simulators with types and instances"
 
 #App names to exclude checking pulling images for, space separated list
-EXCLUDED_IMAGES="SDNC_ONAP"
+EXCLUDED_IMAGES="SDNC SDNC_ONAP"
 
 . ../common/testcase_common.sh $@
 . ../common/agent_api_functions.sh
@@ -35,80 +35,105 @@
 
 clean_containers
 
-start_ric_simulators  ricsim_g1 6 OSC_2.1.0
+OSC_NUM_RICS=6
+STD_NUM_RICS=5
 
-start_ric_simulators  ricsim_g2 5 STD_1.1.3
+start_ric_simulators  $RIC_SIM_PREFIX"_g1" $OSC_NUM_RICS OSC_2.1.0
 
+start_ric_simulators  $RIC_SIM_PREFIX"_g2" $STD_NUM_RICS STD_1.1.3
 
+start_mr #Just to prevent errors in the agent log...
+
+start_control_panel
 
 start_consul_cbs
 
 prepare_consul_config      NOSDNC  ".consul_config.json"
 consul_config_app                  ".consul_config.json"
 
-
 start_policy_agent
 
-
 use_agent_rest_http
 
 api_get_status 200
 
-sim_print ricsim_g1_1 interface
-sim_print ricsim_g1_2 interface
-sim_print ricsim_g1_3 interface
-sim_print ricsim_g1_4 interface
-sim_print ricsim_g1_5 interface
-sim_print ricsim_g1_6 interface
+# Print the A1 version for OSC
+for ((i=1; i<=$OSC_NUM_RICS; i++))
+do
+    sim_print $RIC_SIM_PREFIX"_g1_"$i interface
+done
 
-sim_print ricsim_g2_1 interface
-sim_print ricsim_g2_2 interface
-sim_print ricsim_g2_3 interface
-sim_print ricsim_g2_4 interface
-sim_print ricsim_g2_5 interface
 
-sim_put_policy_type 201 ricsim_g1_1 1 testdata/OSC/sim_1.json
-sim_put_policy_type 201 ricsim_g1_2 1 testdata/OSC/sim_1.json
-sim_put_policy_type 201 ricsim_g1_3 1 testdata/OSC/sim_1.json
-sim_put_policy_type 201 ricsim_g1_4 1 testdata/OSC/sim_1.json
-sim_put_policy_type 201 ricsim_g1_5 1 testdata/OSC/sim_1.json
-sim_put_policy_type 201 ricsim_g1_6 1 testdata/OSC/sim_1.json
+# Print the A1 version for STD
+for ((i=1; i<=$STD_NUM_RICS; i++))
+do
+    sim_print $RIC_SIM_PREFIX"_g2_"$i interface
+done
 
-api_equal json:policy_types 2 120
 
-sleep_wait 30 "Give the agent some extra time...."
+# Load the polictypes in osc
+for ((i=1; i<=$OSC_NUM_RICS; i++))
+do
+    sim_put_policy_type 201 $RIC_SIM_PREFIX"_g1_"$i 2 testdata/OSC/sim_hw.json
+    sim_put_policy_type 201 $RIC_SIM_PREFIX"_g1_"$i 100 testdata/OSC/sim_qos.json
+    sim_put_policy_type 201 $RIC_SIM_PREFIX"_g1_"$i 20008 testdata/OSC/sim_tsa.json
+done
+
+
+#Check the number of schemas and the individual schemas in OSC
+api_equal json:policy_types 4 120
+
+for ((i=1; i<=$OSC_NUM_RICS; i++))
+do
+    api_equal json:policy_types?ric=$RIC_SIM_PREFIX"_g1_"$i 3 120
+done
+
+# Check the schemas in OSC
+for ((i=1; i<=$OSC_NUM_RICS; i++))
+do
+    api_get_policy_schema 200 2 testdata/OSC/hw-agent-modified.json
+    api_get_policy_schema 200 100 testdata/OSC/qos-agent-modified.json
+    api_get_policy_schema 200 20008 testdata/OSC/tsa-agent-modified.json
+done
+
 
 # Create policies
 use_agent_rest_http
 
-api_put_service 201 "rapp1" 3600 "$CR_PATH/1"
+api_put_service 201 "Emergency-response-app" 0 "$CR_PATH/1"
 
-api_put_policy 201 "rapp1" ricsim_g1_1 1 2010 NOTRANSIENT testdata/OSC/pi1_template.json 1
-api_put_policy 201 "rapp1" ricsim_g1_2 1 2020 NOTRANSIENT testdata/OSC/pi1_template.json 1
-api_put_policy 201 "rapp1" ricsim_g1_3 1 2030 NOTRANSIENT testdata/OSC/pi1_template.json 1
-api_put_policy 201 "rapp1" ricsim_g1_4 1 2040 NOTRANSIENT testdata/OSC/pi1_template.json 1
-api_put_policy 201 "rapp1" ricsim_g1_5 1 2050 NOTRANSIENT testdata/OSC/pi1_template.json 1
-api_put_policy 201 "rapp1" ricsim_g1_6 1 2060 NOTRANSIENT testdata/OSC/pi1_template.json 1
+# Create policies in OSC
+for ((i=1; i<=$OSC_NUM_RICS; i++))
+do
+    generate_uuid
+    api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g1_"$i 2 $((2000+$i)) NOTRANSIENT testdata/OSC/pihw_template.json 1
+    generate_uuid
+    api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g1_"$i 100 $((3000+$i)) NOTRANSIENT testdata/OSC/piqos_template.json 1
+    generate_uuid
+    api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g1_"$i 20008 $((4000+$i)) NOTRANSIENT testdata/OSC/pitsa_template.json 1
+done
 
-sim_equal ricsim_g1_1 num_instances 1
-sim_equal ricsim_g1_2 num_instances 1
-sim_equal ricsim_g1_3 num_instances 1
-sim_equal ricsim_g1_4 num_instances 1
-sim_equal ricsim_g1_5 num_instances 1
-sim_equal ricsim_g1_6 num_instances 1
 
-api_put_policy 201 "rapp1" ricsim_g2_1 NOTYPE 2110 NOTRANSIENT testdata/STD/pi1_template.json 1
-api_put_policy 201 "rapp1" ricsim_g2_2 NOTYPE 2120 NOTRANSIENT testdata/STD/pi1_template.json 1
-api_put_policy 201 "rapp1" ricsim_g2_3 NOTYPE 2130 NOTRANSIENT testdata/STD/pi1_template.json 1
-api_put_policy 201 "rapp1" ricsim_g2_4 NOTYPE 2140 NOTRANSIENT testdata/STD/pi1_template.json 1
-api_put_policy 201 "rapp1" ricsim_g2_5 NOTYPE 2150 NOTRANSIENT testdata/STD/pi1_template.json 1
+# Check the number of policies in OSC
+for ((i=1; i<=$OSC_NUM_RICS; i++))
+do
+    sim_equal $RIC_SIM_PREFIX"_g1_"$i num_instances 3
+done
 
-sim_equal ricsim_g2_1 num_instances 1
-sim_equal ricsim_g2_2 num_instances 1
-sim_equal ricsim_g2_3 num_instances 1
-sim_equal ricsim_g2_4 num_instances 1
-sim_equal ricsim_g2_5 num_instances 1
 
+# Create policies in STD
+for ((i=1; i<=$STD_NUM_RICS; i++))
+do
+    generate_uuid
+    api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g2_"$i NOTYPE $((2100+$i)) NOTRANSIENT testdata/STD/pi1_template.json 1
+done
+
+
+# Check the number of policies in STD
+for ((i=1; i<=$STD_NUM_RICS; i++))
+do
+    sim_equal $RIC_SIM_PREFIX"_g2_"$i num_instances 1
+done
 
 check_policy_agent_logs
 
diff --git a/test/auto-test/Suite-all.sh b/test/auto-test/Suite-all.sh
new file mode 100755
index 0000000..342596d
--- /dev/null
+++ b/test/auto-test/Suite-all.sh
@@ -0,0 +1,48 @@
+#!/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=================================================
+#
+
+TS_ONELINE_DESCR="Test suite - all test cases except the stab test(s)"
+
+. ../common/testsuite_common.sh
+
+suite_setup
+
+############# TEST CASES #################
+ARG1=$1
+
+./FTC1.sh $1
+
+if [ $ARG1 == "remote-remove" ]; then
+    #Prevent image removal for every test case
+    ARG1="remote"
+fi
+
+./FTC10.sh $1
+./FTC100.sh $1
+./FTC110.sh $1
+./FTC150.sh $1
+./FTC300.sh $1
+./FTC310.sh $1
+./FTC350.sh $1
+./FTC800.sh $1
+./FTC850.sh $1
+
+##########################################
+
+suite_complete
\ No newline at end of file
diff --git a/test/auto-test/Suite-interfaces.sh b/test/auto-test/Suite-interfaces.sh
index 1723555..7a21646 100755
--- a/test/auto-test/Suite-interfaces.sh
+++ b/test/auto-test/Suite-interfaces.sh
@@ -25,9 +25,17 @@
 
 ############# TEST CASES #################
 
-./FTC100.sh $1
-./FTC110.sh $1
-./FTC150.sh $1
+ARG1=$1
+
+./FTC100.sh $ARG1
+
+if [ $ARG1 == "remote-remove" ]; then
+    #Prevent image removal for every test case
+    ARG1="remote"
+fi
+
+./FTC110.sh $ARG1
+./FTC150.sh $ARG1
 
 ##########################################
 
diff --git a/test/auto-test/testdata/OSC/1-agent-modified.json b/test/auto-test/testdata/OSC/1-agent-modified.json
index 3b37214..a40aa88 100644
--- a/test/auto-test/testdata/OSC/1-agent-modified.json
+++ b/test/auto-test/testdata/OSC/1-agent-modified.json
@@ -20,7 +20,7 @@
           "qosId"
         ]
       },
-      "qosObjective": {
+      "qosObjectives": {
         "type": "object",
         "properties": {
           "priorityLevel": {
@@ -35,6 +35,6 @@
     },
     "additionalProperties": false,
     "required": [
-      "scope", "qosObjective"
+      "scope", "qosObjectives"
     ]
   }
diff --git a/test/auto-test/testdata/OSC/1.json b/test/auto-test/testdata/OSC/1.json
index 5fe68ce..c865bac 100644
--- a/test/auto-test/testdata/OSC/1.json
+++ b/test/auto-test/testdata/OSC/1.json
@@ -20,7 +20,7 @@
         "qosId"
       ]
     },
-    "qosObjective": {
+    "qosObjectives": {
       "type": "object",
       "properties": {
         "priorityLevel": {
@@ -35,6 +35,6 @@
   },
   "additionalProperties": false,
   "required": [
-    "scope", "qosObjective"
+    "scope", "qosObjectives"
   ]
 }
diff --git a/test/auto-test/testdata/OSC/3-agent-modified.json b/test/auto-test/testdata/OSC/3-agent-modified.json
index 303b36b..3bf9a47 100644
--- a/test/auto-test/testdata/OSC/3-agent-modified.json
+++ b/test/auto-test/testdata/OSC/3-agent-modified.json
@@ -16,7 +16,7 @@
           "groupId"
         ]
       },
-      "qosObjective": {
+      "qosObjectives": {
         "type": "object",
         "properties": {
           "priorityLevel": {
@@ -31,6 +31,6 @@
     },
     "additionalProperties": false,
     "required": [
-      "scope", "qosObjective"
+      "scope", "qosObjectives"
     ]
   }
diff --git a/test/auto-test/testdata/OSC/3.json b/test/auto-test/testdata/OSC/3.json
index ab0204d..4966dea 100644
--- a/test/auto-test/testdata/OSC/3.json
+++ b/test/auto-test/testdata/OSC/3.json
@@ -16,7 +16,7 @@
         "groupId"
       ]
     },
-    "qosObjective": {
+    "qosObjectives": {
       "type": "object",
       "properties": {
         "priorityLevel": {
@@ -31,6 +31,6 @@
   },
   "additionalProperties": false,
   "required": [
-    "scope", "qosObjective"
+    "scope", "qosObjectives"
   ]
 }
diff --git a/test/auto-test/testdata/OSC/4-agent-modified.json b/test/auto-test/testdata/OSC/4-agent-modified.json
index 868ceea..7fb71a6 100644
--- a/test/auto-test/testdata/OSC/4-agent-modified.json
+++ b/test/auto-test/testdata/OSC/4-agent-modified.json
@@ -16,7 +16,7 @@
           "cellId"
         ]
       },
-      "qosObjective": {
+      "qosObjectives": {
         "type": "object",
         "properties": {
           "priorityLevel": {
@@ -31,6 +31,6 @@
     },
     "additionalProperties": false,
     "required": [
-      "scope", "qosObjective"
+      "scope", "qosObjectives"
     ]
   }
diff --git a/test/auto-test/testdata/OSC/4.json b/test/auto-test/testdata/OSC/4.json
index c5e785c..3891b76 100644
--- a/test/auto-test/testdata/OSC/4.json
+++ b/test/auto-test/testdata/OSC/4.json
@@ -16,7 +16,7 @@
         "cellId"
       ]
     },
-    "qosObjective": {
+    "qosObjectives": {
       "type": "object",
       "properties": {
         "priorityLevel": {
@@ -31,6 +31,6 @@
   },
   "additionalProperties": false,
   "required": [
-    "scope", "qosObjective"
+    "scope", "qosObjectives"
   ]
 }
diff --git a/test/auto-test/testdata/OSC/5-agent-modified.json b/test/auto-test/testdata/OSC/5-agent-modified.json
index b5fd5bc..1b1c508 100644
--- a/test/auto-test/testdata/OSC/5-agent-modified.json
+++ b/test/auto-test/testdata/OSC/5-agent-modified.json
@@ -20,7 +20,7 @@
           "cellId"
         ]
       },
-      "qosObjective": {
+      "qosObjectives": {
         "type": "object",
         "properties": {
           "priorityLevel": {
@@ -35,6 +35,6 @@
     },
     "additionalProperties": false,
     "required": [
-      "scope", "qosObjective"
+      "scope", "qosObjectives"
     ]
   }
diff --git a/test/auto-test/testdata/OSC/5.json b/test/auto-test/testdata/OSC/5.json
index dee440a..1708a1e 100644
--- a/test/auto-test/testdata/OSC/5.json
+++ b/test/auto-test/testdata/OSC/5.json
@@ -20,7 +20,7 @@
         "cellId"
       ]
     },
-    "qosObjective": {
+    "qosObjectives": {
       "type": "object",
       "properties": {
         "priorityLevel": {
@@ -35,6 +35,6 @@
   },
   "additionalProperties": false,
   "required": [
-    "scope", "qosObjective"
+    "scope", "qosObjectives"
   ]
 }
diff --git a/test/auto-test/testdata/OSC/hw-agent-modified.json b/test/auto-test/testdata/OSC/hw-agent-modified.json
new file mode 100644
index 0000000..5ea5802
--- /dev/null
+++ b/test/auto-test/testdata/OSC/hw-agent-modified.json
@@ -0,0 +1,13 @@
+{
+    "$schema": "http://json-schema.org/draft-07/schema#",
+    "title": "2",
+    "description": "Hello World policy type",
+    "type": "object",
+    "properties": {
+      "threshold": {
+        "type": "integer",
+        "default": 0
+      }
+    },
+    "additionalProperties": false
+  }
\ No newline at end of file
diff --git a/test/auto-test/testdata/OSC/hw.json b/test/auto-test/testdata/OSC/hw.json
new file mode 100644
index 0000000..b15b93e
--- /dev/null
+++ b/test/auto-test/testdata/OSC/hw.json
@@ -0,0 +1,13 @@
+{
+    "$schema": "http://json-schema.org/draft-07/schema#",
+    "title": "Hello World Policy",
+    "description": "Hello World policy type",
+    "type": "object",
+    "properties": {
+      "threshold": {
+        "type": "integer",
+        "default": 0
+      }
+    },
+    "additionalProperties": false
+  }
\ No newline at end of file
diff --git a/test/auto-test/testdata/OSC/pi1_template.json b/test/auto-test/testdata/OSC/pi1_template.json
index 7795808..da25554 100644
--- a/test/auto-test/testdata/OSC/pi1_template.json
+++ b/test/auto-test/testdata/OSC/pi1_template.json
@@ -3,7 +3,7 @@
       "ueId": "ueXXX",
       "qosId": "qosXXX"
     },
-    "qosObjective": {
+    "qosObjectives": {
       "priorityLevel": XXX
     }
   }
\ No newline at end of file
diff --git a/test/auto-test/testdata/OSC/pi3_template.json b/test/auto-test/testdata/OSC/pi3_template.json
index a916fad..02d33bc 100644
--- a/test/auto-test/testdata/OSC/pi3_template.json
+++ b/test/auto-test/testdata/OSC/pi3_template.json
@@ -2,7 +2,7 @@
     "scope": {
       "groupId": "groupXXX"
     },
-    "qosObjective": {
+    "qosObjectives": {
       "priorityLevel": XXX
     }
   }
\ No newline at end of file
diff --git a/test/auto-test/testdata/OSC/pi4_template.json b/test/auto-test/testdata/OSC/pi4_template.json
index 0673dec..dff4b6b 100644
--- a/test/auto-test/testdata/OSC/pi4_template.json
+++ b/test/auto-test/testdata/OSC/pi4_template.json
@@ -2,7 +2,7 @@
     "scope": {
       "cellId": "cellXXX"
     },
-    "qosObjective": {
+    "qosObjectives": {
       "priorityLevel": XXX
     }
   }
\ No newline at end of file
diff --git a/test/auto-test/testdata/OSC/pi5_template.json b/test/auto-test/testdata/OSC/pi5_template.json
index e362c9e..af6be9d 100644
--- a/test/auto-test/testdata/OSC/pi5_template.json
+++ b/test/auto-test/testdata/OSC/pi5_template.json
@@ -3,7 +3,7 @@
       "sliceId": "sliceXXX",
       "cellId": "cellXXX"
     },
-    "qosObjective": {
+    "qosObjectives": {
       "priorityLevel": XXX
     }
   }
\ No newline at end of file
diff --git a/test/auto-test/testdata/OSC/pihw_template.json b/test/auto-test/testdata/OSC/pihw_template.json
new file mode 100644
index 0000000..7574995
--- /dev/null
+++ b/test/auto-test/testdata/OSC/pihw_template.json
@@ -0,0 +1,3 @@
+{
+    "threshold": XXX
+}
\ No newline at end of file
diff --git a/test/auto-test/testdata/OSC/piqos_template.json b/test/auto-test/testdata/OSC/piqos_template.json
new file mode 100644
index 0000000..da25554
--- /dev/null
+++ b/test/auto-test/testdata/OSC/piqos_template.json
@@ -0,0 +1,9 @@
+{
+    "scope": {
+      "ueId": "ueXXX",
+      "qosId": "qosXXX"
+    },
+    "qosObjectives": {
+      "priorityLevel": XXX
+    }
+  }
\ No newline at end of file
diff --git a/test/auto-test/testdata/OSC/pitsa_template.json b/test/auto-test/testdata/OSC/pitsa_template.json
new file mode 100644
index 0000000..7574995
--- /dev/null
+++ b/test/auto-test/testdata/OSC/pitsa_template.json
@@ -0,0 +1,3 @@
+{
+    "threshold": XXX
+}
\ No newline at end of file
diff --git a/test/auto-test/testdata/OSC/qos-agent-modified.json b/test/auto-test/testdata/OSC/qos-agent-modified.json
new file mode 100644
index 0000000..3a012cd
--- /dev/null
+++ b/test/auto-test/testdata/OSC/qos-agent-modified.json
@@ -0,0 +1,40 @@
+{
+    "$schema": "http://json-schema.org/draft-07/schema#",
+    "title": "100",
+    "description": "Quality of Service policy type",
+    "type": "object",
+    "properties": {
+      "scope": {
+        "type": "object",
+        "properties": {
+          "ueId": {
+            "type": "string"
+          },
+          "qosId": {
+            "type": "string"
+          }
+        },
+        "additionalProperties": false,
+        "required": [
+          "ueId",
+          "qosId"
+        ]
+      },
+      "qosObjectives": {
+        "type": "object",
+        "properties": {
+          "priorityLevel": {
+            "type": "number"
+          }
+        },
+        "additionalProperties": false,
+        "required": [
+          "priorityLevel"
+        ]
+      }
+    },
+    "additionalProperties": false,
+    "required": [
+      "scope", "qosObjectives"
+    ]
+  }
diff --git a/test/auto-test/testdata/OSC/qos.json b/test/auto-test/testdata/OSC/qos.json
new file mode 100644
index 0000000..070ebe4
--- /dev/null
+++ b/test/auto-test/testdata/OSC/qos.json
@@ -0,0 +1,40 @@
+{
+  "$schema": "http://json-schema.org/draft-07/schema#",
+  "title": "OSC_Type1_1.0.0",
+  "description": "Quality of Service policy type",
+  "type": "object",
+  "properties": {
+    "scope": {
+      "type": "object",
+      "properties": {
+        "ueId": {
+          "type": "string"
+        },
+        "qosId": {
+          "type": "string"
+        }
+      },
+      "additionalProperties": false,
+      "required": [
+        "ueId",
+        "qosId"
+      ]
+    },
+    "qosObjectives": {
+      "type": "object",
+      "properties": {
+        "priorityLevel": {
+          "type": "number"
+        }
+      },
+      "additionalProperties": false,
+      "required": [
+        "priorityLevel"
+      ]
+    }
+  },
+  "additionalProperties": false,
+  "required": [
+    "scope", "qosObjectives"
+  ]
+}
diff --git a/test/auto-test/testdata/OSC/sim_1.json b/test/auto-test/testdata/OSC/sim_1.json
index 537d86f..aeea773 100644
--- a/test/auto-test/testdata/OSC/sim_1.json
+++ b/test/auto-test/testdata/OSC/sim_1.json
@@ -24,7 +24,7 @@
           "qosId"
         ]
       },
-      "qosObjective": {
+      "qosObjectives": {
         "type": "object",
         "properties": {
           "priorityLevel": {
@@ -39,7 +39,7 @@
     },
     "additionalProperties": false,
     "required": [
-      "scope", "qosObjective"
+      "scope", "qosObjectives"
     ]
   }
 }
diff --git a/test/auto-test/testdata/OSC/sim_3.json b/test/auto-test/testdata/OSC/sim_3.json
index 1b97047..d21a9a9 100644
--- a/test/auto-test/testdata/OSC/sim_3.json
+++ b/test/auto-test/testdata/OSC/sim_3.json
@@ -20,7 +20,7 @@
           "groupId"
         ]
       },
-      "qosObjective": {
+      "qosObjectives": {
         "type": "object",
         "properties": {
           "priorityLevel": {
@@ -35,7 +35,7 @@
     },
     "additionalProperties": false,
     "required": [
-      "scope", "qosObjective"
+      "scope", "qosObjectives"
     ]
   }
 }
diff --git a/test/auto-test/testdata/OSC/sim_4.json b/test/auto-test/testdata/OSC/sim_4.json
index ac1fa2b..a55b34e 100644
--- a/test/auto-test/testdata/OSC/sim_4.json
+++ b/test/auto-test/testdata/OSC/sim_4.json
@@ -20,7 +20,7 @@
           "cellId"
         ]
       },
-      "qosObjective": {
+      "qosObjectives": {
         "type": "object",
         "properties": {
           "priorityLevel": {
@@ -35,7 +35,7 @@
     },
     "additionalProperties": false,
     "required": [
-      "scope", "qosObjective"
+      "scope", "qosObjectives"
     ]
   }
 }
diff --git a/test/auto-test/testdata/OSC/sim_5.json b/test/auto-test/testdata/OSC/sim_5.json
index 4d8f3c9..fd5290f 100644
--- a/test/auto-test/testdata/OSC/sim_5.json
+++ b/test/auto-test/testdata/OSC/sim_5.json
@@ -24,7 +24,7 @@
           "cellId"
         ]
       },
-      "qosObjective": {
+      "qosObjectives": {
         "type": "object",
         "properties": {
           "priorityLevel": {
@@ -39,7 +39,7 @@
     },
     "additionalProperties": false,
     "required": [
-      "scope", "qosObjective"
+      "scope", "qosObjectives"
     ]
   }
 }
diff --git a/test/auto-test/testdata/OSC/sim_hw.json b/test/auto-test/testdata/OSC/sim_hw.json
new file mode 100644
index 0000000..47e0ae0
--- /dev/null
+++ b/test/auto-test/testdata/OSC/sim_hw.json
@@ -0,0 +1,18 @@
+{
+    "name": "hwpolicy",
+    "description": "Hellow World policy type",
+    "policy_type_id": 2,
+    "create_schema": {
+      "$schema": "http://json-schema.org/draft-07/schema#",
+      "title": "HW Policy",
+      "description": "Hello World policy type",
+      "type": "object",
+      "properties": {
+        "threshold": {
+          "type": "integer",
+          "default": 0
+        }
+      },
+      "additionalProperties": false
+    }
+  }
\ No newline at end of file
diff --git a/test/auto-test/testdata/OSC/sim_qos.json b/test/auto-test/testdata/OSC/sim_qos.json
new file mode 100644
index 0000000..92eaa6f
--- /dev/null
+++ b/test/auto-test/testdata/OSC/sim_qos.json
@@ -0,0 +1,45 @@
+{
+  "name": "pt1",
+  "description": "pt1 policy type",
+  "policy_type_id": 100,
+  "create_schema": {
+    "$schema": "http://json-schema.org/draft-07/schema#",
+    "title": "OSC_Type1_1.0.0",
+    "description": "Quality of Service policy type",
+    "type": "object",
+    "properties": {
+      "scope": {
+        "type": "object",
+        "properties": {
+          "ueId": {
+            "type": "string"
+          },
+          "qosId": {
+            "type": "string"
+          }
+        },
+        "additionalProperties": false,
+        "required": [
+          "ueId",
+          "qosId"
+        ]
+      },
+      "qosObjectives": {
+        "type": "object",
+        "properties": {
+          "priorityLevel": {
+            "type": "number"
+          }
+        },
+        "additionalProperties": false,
+        "required": [
+          "priorityLevel"
+        ]
+      }
+    },
+    "additionalProperties": false,
+    "required": [
+      "scope", "qosObjectives"
+    ]
+  }
+}
diff --git a/test/auto-test/testdata/OSC/sim_tsa.json b/test/auto-test/testdata/OSC/sim_tsa.json
new file mode 100644
index 0000000..9227b5e
--- /dev/null
+++ b/test/auto-test/testdata/OSC/sim_tsa.json
@@ -0,0 +1,18 @@
+{
+  "name": "tsapolicy",
+  "description": "tsa parameters",
+  "policy_type_id": 20008,
+  "create_schema": {
+    "$schema": "http://json-schema.org/draft-07/schema#",
+    "title": "TS Policy",
+    "description": "Traffic Steering - High prio traffic - policy type",
+    "type": "object",
+    "properties": {
+      "threshold": {
+        "type": "integer",
+        "default": 0
+      }
+    },
+    "additionalProperties": false
+  }
+}
\ No newline at end of file
diff --git a/test/auto-test/testdata/OSC/tsa-agent-modified.json b/test/auto-test/testdata/OSC/tsa-agent-modified.json
new file mode 100644
index 0000000..d9426c7
--- /dev/null
+++ b/test/auto-test/testdata/OSC/tsa-agent-modified.json
@@ -0,0 +1,13 @@
+{
+    "$schema": "http://json-schema.org/draft-07/schema#",
+    "title": "20008",
+    "description": "Traffic Steering - High prio traffic - policy type",
+    "type": "object",
+    "properties": {
+      "threshold": {
+        "type": "integer",
+        "default": 0
+      }
+    },
+    "additionalProperties": false
+  }
\ No newline at end of file
diff --git a/test/auto-test/testdata/OSC/tsa.json b/test/auto-test/testdata/OSC/tsa.json
new file mode 100644
index 0000000..5f4d20d
--- /dev/null
+++ b/test/auto-test/testdata/OSC/tsa.json
@@ -0,0 +1,13 @@
+{
+    "$schema": "http://json-schema.org/draft-07/schema#",
+    "title": "TS Policy",
+    "description": "Traffic Steering - High prio traffic - policy type",
+    "type": "object",
+    "properties": {
+      "threshold": {
+        "type": "integer",
+        "default": 0
+      }
+    },
+    "additionalProperties": false
+  }
\ No newline at end of file
diff --git a/test/auto-test/testdata/STD/pi1_template.json b/test/auto-test/testdata/STD/pi1_template.json
index 2a87513..e06b031 100644
--- a/test/auto-test/testdata/STD/pi1_template.json
+++ b/test/auto-test/testdata/STD/pi1_template.json
@@ -3,7 +3,7 @@
     "ueId": "ueXXX",
     "qosId": "qosXXX"
   },
-  "qosObjective": {
+  "qosObjectives": {
     "priorityLevel": XXX
   }
 }
\ No newline at end of file
diff --git a/test/common/README.md b/test/common/README.md
index dd1ddf3..a048c64 100644
--- a/test/common/README.md
+++ b/test/common/README.md
@@ -1,35 +1,353 @@
-## Description for common test scripts
+## 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.
+Some of the scripts can also be used for other kinds of tests, for example basic tests.
+
+## Overview for common test scripts and files ##
 
 `test_env.sh` \
-Common env variables for test in the auto-test dir.
-Used by the auto test cases/suites but could be used for other test script as well.
+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.
 
 `testcase_common.sh` \
-Common functions for auto test cases in the auto-test dir.
-A subset of the functions could be used in other test scripts as well.
+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.
 
-###Descriptions of functions in testcase_common.sh
+`testsuite_common.sh` \
+Common functions for running two or more auto test scripts as a suite.
 
-`clean_containers` \
-Stop and remove all containers including Policy Agent apps and simulators
+`agent_api_functions.sh` \
+Contains functions for adapting towards the Policy Agent API, also via dmaap (using a message-router stub interface)
 
-`start_simulators` \
-Start all simulators in the simulator group
+`controller_api_functions.sh` \
+Contains functions for adaping towards the A1-controller API.
 
-`consul_config_app  ` \
-Configure consul with json file with app config for a Policy Agent instance using the Policy Agent
-instance id and the json file.
+`ricsimulator_api_functions.sh` \
+Contains functions for adapting towards the RIC (A1) simulator admin API.
 
-`start_policy_agent` \
-Start the Policy Agent application.
+`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'.
 
-`check_policy_agent_logs`
-Check the Policy Agent application log for WARN and ERR messages and print the count.
-`store_logs`
-Store all Policy Agent app and simulators log to the test case log dir. All logs get a prefix to
-separate logs stored at different steps in the test script.
-If logs need to be stored in several locations, use different prefix to easily identify the location
-when the logs where taken.
+`count_json_elements.py` \
+A python script returning the number of items in a json array.
+
+`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.
+
+`create_rics_json.py` \
+A python script to create a json file from a formatted string of ric info. Helper for the test enviroment.
+
+`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.
+
+`extract_sdnc_reply.py` \
+A python script to extract the information from an sdnc (A1 Controller) reply json. Helper for the test environment.
+
+`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)
+
+
+
+### Descriptions of functions in testcase_common.sh ###
+
+#### Script args ####
+The script can be started with these arguments
+
+| arg list |
+|--|
+| `local|remote|remote-remove [auto-clean] [--stop-at-error] [--use-local-image <app-nam> [<app-name>]*]` |
+
+| parameter | description |
+|-|-|
+| `local` | only locally built images (in local docker respository) will be used for the Non-RT RIC components. CBS, Consul, DB will still use remote nexus images |
+| `remote` | only remote images from nexus will be used. Images pulled if not present in local docker repository |
+| `remote-remove` | same as remote but all images are removed first so that fresh images are pulled when running |
+| `auto-clean` | all containers will be automatically stopped and removed when the test case is complete. Requires the function 'auto_clean_containers' to be included last in the applicable auto-test script |
+| `--stop-at-error` | intended for debugging and make the script stop at first 'FAIL' and save all logs with a prefix 'STOP_AT_ERROR' |
+| `--use-local-image <app-nam> [<app-name>]*` | nnly applicable when running as 'remote' or 'remote-remove'. Mainly for debugging when a locally built image shall be used together with other remote images from nexus.Accepts a space separated list of PA, CP, RICSIM, SDNC for Policy Agent, Control Panel, A1-controller and the Ric simulator |
+| `--ricsim-prefix <prefix>` | use another prefix for the ric simulator container name than the standard 'ricsim'. Note that the testscript has to read and use the env var `$RIC_SIM_PREFIX` instead of a hardcoded name of the ric(s). |
+
+#### Function: print_result ####
+Print a test report of an auto-test script.
+| arg list |
+|--|
+| None |
+
+#### Function: start_timer ####
+Start a timer for time measurement. Only one timer can be running.
+| arg list |
+|--|
+| 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.
+| 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`) |
+
+#### Function: print_and_reset_timer ####
+Print the value of the timer (in seconds) previously started by 'start_timer'. Also reset the timer to 0. The result of the timer as well as the args to the function will also be printed in the test report.
+| 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`) |
+
+#### Function: deviation ####
+Mark a test as a deviation from the requirements. The list of deviations will be printed in the test report.
+| arg list |
+|--|
+| `<deviation-message-to-print>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<deviation-message-to-print>` | Any text message describing the deviation. The text will also be printed in the test report. The intention is to mark known deviations, compared to required functionality |
+
+#### Function: clean_containers ####
+Stop and remove all containers. Containers not part of the test are not affected.
+| arg list |
+|--|
+| None |
+
+#### Function: auto_clean_containers ####
+Stop and remove all containers. Containers not part of the test are not affected. This function has effect only if the test script is started with arg `auto-clean`. This intention is to use this function as the last step in an auto-test script.
+| arg list |
+|--|
+| None |
+
+#### Function: sleep_wait ####
+Make the script sleep for a number of seconds.
+| arg list |
+|--|
+| `<sleep-time-in-sec> [<any-text-in-quotes-to-be-printed>]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<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: generate_uuid ####
+Geneate a UUID prefix to use along with the policy instance number when creating/deleting policies. Sets the env var UUID.
+UUID is then automatically added to the policy id in GET/PUT/DELETE.
+| arg list |
+|--|
+| None |
+
+#### Function: consul_config_app ####
+Function to load a json config from a file into consul for the Policy Agent
+
+| arg list |
+|--|
+| `<json-config-file>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<json-config-file>` | The path to the json file to be loaded to Consul/CBS |
+
+#### 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 |
+|--|
+| `<deviation-message-to-print>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `SDNC|SDNC_ONAP|NOSDNC` | Configure based on a1-controller (SNDC), a1-adapter (SDNC_ONAP) 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'  |
+
+#### Function: start_consul_cbs ####
+Start the Consul and CBS containers
+| arg list |
+|--|
+| None |
+
+#### Function: use_simulator_http ####
+Use http for all API calls (A1) toward the simulator. This is the default. Admin API calls to the simulator are not affected. Note that this function shall be called before preparing the config for Consul.
+| arg list |
+|--|
+| None |
+
+#### Function: use_simulator_https ####
+Use https for all API calls (A1) toward the simulator. Admin API calls to the simulator are not affected. Note that this function shall be called before preparing the config for Consul.
+| arg list |
+|--|
+| None |
+
+#### Function: start_ric_simulators ####
+Start a group of simulator where a group may contain 1 more simulators.
+| arg list |
+|--|
+| `ricsim_g1|ricsim_g2|ricsim_g3 <count> <interface-id>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `ricsim_g1|ricsim_g2|ricsim_g3` | Base name of the simulator. Each instance will have an postfix instance id added, starting on '1'. For examplle 'ricsim_g1_1', 'ricsim_g1_2' etc  |
+|`<count>`| And integer, 1 or greater. Specifies the number of simulators to start|
+|`<interface-id>`| Shall be the interface id of the simulator. See the repo 'a1-interface' for the available ids. |
+
+#### Function: start_control_panel ####
+Start the Control Panel container
+| arg list |
+|--|
+| None |
+
+#### Function: start_sdnc ####
+Start the SDNC A1 Controller container and its database container
+| arg list |
+|--|
+| None |
+
+#### 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_http ####
+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_onap ####
+Start the SDNC A1 Adapter container and its database container
+| arg list |
+|--|
+| None |
+
+#### Function: config_sdnc_onap ####
+Configure the SDNC A1 adapter - Not implemented
+| arg list |
+|--|
+| None |
+
+#### Function: start_mr ####
+Start the Message Router stub interface container
+| arg list |
+|--|
+| None |
+
+#### 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_cr ####
+Start the Callback Receiver container
+| arg list |
+|--|
+| None |
+
+#### Function: start_policy_agent ####
+Start the Policy Agent container. If the test script is configured to use a stand alone Policy Agent (for example other container or stand alone app) the script will prompt for starting the stand alone Policy Agent.
+| arg list |
+|--|
+| None |
+
+#### Function: use_agent_stand_alone ####
+Configure to run the Policy Agent as a stand alone container or app. See also 'start_policy_agent'
+| arg list |
+|--|
+| None |
+
+#### 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 ####
+Send and recieve all API calls to the Policy Agent over Dmaap via the MR.
+| arg list |
+|--|
+| None |
+
+#### 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>]*` |
+
+| parameter | description |
+| --------- | ----------- |
+| `[<response-code>]*` | A space separated list of http response codes, may be empty to reset to 'no codes'.  |
+
+#### 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: 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.
+| arg list |
+|--|
+| `<logfile-prefix>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<logfile-prefix>` | Log file prefix  |
+
+
+#### Function: cr_equal ####
+TBD
+
+#### Function: mr_equal ####
+TBD
+
+#### Function: mr_greater ####
+TBD
+
+#### Function: mr_read ####
+TBD
+
+#### Function: mr_print ####
+TBD
+
+### Descriptions of functions in testsuite_common.sh ###
+TBD
+### Descriptions of functions in agent_api_function.sh ###
+TBD
+### Descriptions of functions in ricsimulator_api_functions.sh ###
+TBD
+### Descriptions of functions in controller_api_functions.sh ###
+TBD
 
 ## License
 
diff --git a/test/common/agent_api_functions.sh b/test/common/agent_api_functions.sh
index 958f914..550ace0 100644
--- a/test/common/agent_api_functions.sh
+++ b/test/common/agent_api_functions.sh
@@ -251,7 +251,7 @@
 	fi
 
     if [ $paramError -ne 0 ]; then
-        __print_err "<response-code> <ric-id>|NORIC <service-id>|NOSERVICE <policy-ype-id>|NOTYPE [ NOID | [<policy-id> <ric-id> <service-id> EMPTY|<policy-type-id> <template-file>]*]" $@
+        __print_err "<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>]*]" $@
         return 1
     fi
 	queryparams=""
@@ -280,6 +280,7 @@
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -296,7 +297,7 @@
 				if [ "$targetJson" != "[" ]; then
 					targetJson=$targetJson","
 				fi
-				targetJson=$targetJson"{\"id\":\"${arr[$i]}\",\"lastModified\":\"????\",\"ric\":\"${arr[$i+1]}\",\"service\":\"${arr[$i+2]}\",\"type\":"
+				targetJson=$targetJson"{\"id\":\"$UUID${arr[$i]}\",\"lastModified\":\"????\",\"ric\":\"${arr[$i+1]}\",\"service\":\"${arr[$i+2]}\",\"type\":"
 				if [ "${arr[$i+3]}" == "EMPTY" ]; then
 					targetJson=$targetJson"\"\","
 				else
@@ -316,6 +317,7 @@
 		if [ $res -ne 0 ]; then
 			echo -e $RED" FAIL, returned body not correct"$ERED
 			((RES_FAIL++))
+			__check_stop_at_error
 			return 1
 		fi
 	fi
@@ -339,13 +341,14 @@
         return 1
     fi
 
-	query="/policy?id=$2"
+	query="/policy?id=$UUID$2"
 	res="$(__do_curl_to_agent GET $query)"
 	status=${res:${#res}-3}
 
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -360,6 +363,7 @@
 		if [ $res -ne 0 ]; then
 			echo -e $RED" FAIL, returned body not correct"$ERED
 			((RES_FAIL++))
+			__check_stop_at_error
 			return 1
 		fi
 	fi
@@ -394,7 +398,7 @@
 	file=$7
 
 	while [ $count -lt $max ]; do
-		query="/policy?id=$pid&ric=$ric&service=$2"
+		query="/policy?id=$UUID$pid&ric=$ric&service=$2"
 
 		if [ $4 != "NOTYPE" ]; then
 			query=$query"&type=$4"
@@ -410,10 +414,10 @@
     	status=${res:${#res}-3}
 		echo -ne " Creating "$count"("$max")${SAMELINE}"
 		if [ $status -ne $1 ]; then
-			let pid=$pid+1
 			echo " Created "$count"?("$max")"
 			echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 			((RES_FAIL++))
+			__check_stop_at_error
 			return 1
 		fi
 
@@ -453,7 +457,7 @@
 	file=$7
 	ARR=""
 	while [ $count -lt $max ]; do
-		query="/policy?id=$pid&ric=$ric&service=$2"
+		query="/policy?id=$UUID$pid&ric=$ric&service=$2"
 
 		if [ $4 != "NOTYPE" ]; then
 			query=$query"&type=$4"
@@ -470,10 +474,10 @@
 		echo -ne " Requested(batch) "$count"("$max")${SAMELINE}"
 
 		if [ $status -ne 200 ]; then
-			let pid=$pid+1
 			echo " Requested(batch) "$count"?("$max")"
 			echo -e $RED" FAIL. Exepected status 200 (in request), got "$status $ERED
 			((RES_FAIL++))
+			__check_stop_at_error
 			return 1
 		fi
 		cid=${res:0:${#res}-3}
@@ -492,10 +496,10 @@
 		echo -ne " Created(batch) "$count"("$max")${SAMELINE}"
 
 		if [ $status -ne $1 ]; then
-			let pid=$pid+1
 			echo " Created(batch) "$count"?("$max")"
 			echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 			((RES_FAIL++))
+			__check_stop_at_error
 			return 1
 		fi
 
@@ -555,8 +559,12 @@
 
 	for ((i=1; i<=$pids; i++))
 	do
+		uuid=$UUID
+		if [ -z "$uuid" ]; then
+			uuid="NOUUID"
+		fi
 		echo "" > ".pid${i}.res.txt"
-		echo $resp_code $urlbase $ric_base $num_rics $start_id $template $count $pids $i > ".pid${i}.txt"
+		echo $resp_code $urlbase $ric_base $num_rics $uuid $start_id $template $count $pids $i > ".pid${i}.txt"
 		echo $i
 	done  | xargs -n 1 -I{} -P $pids bash -c '{
 		arg=$(echo {})
@@ -591,6 +599,7 @@
 
 	echo -e $RED" FAIL. One of more processes failed to execute" $ERED
 	((RES_FAIL++))
+	__check_stop_at_error
 	return 1
 }
 
@@ -617,7 +626,7 @@
 	pid=$2
 
 	while [ $count -lt $max ]; do
-		query="/policy?id="$pid
+		query="/policy?id="$UUID$pid
 		res="$(__do_curl_to_agent DELETE $query)"
 		status=${res:${#res}-3}
 		echo -ne " Deleting "$count"("$max")${SAMELINE}"
@@ -626,6 +635,7 @@
 			echo " Deleted "$count"?("$max")"
 			echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 			((RES_FAIL++))
+			__check_stop_at_error
 			return 1
 		fi
 		let pid=$pid+1
@@ -662,16 +672,16 @@
 	pid=$2
 	ARR=""
 	while [ $count -lt $max ]; do
-		query="/policy?id="$pid
+		query="/policy?id="$UUID$pid
 		res="$(__do_curl_to_agent DELETE_BATCH $query)"
 		status=${res:${#res}-3}
 		echo -ne " Requested(batch) "$count"("$max")${SAMELINE}"
 
 		if [ $status -ne 200 ]; then
-			let pid=$pid+1
 			echo " Requested(batch) "$count"?("$max")"
 			echo -e $RED" FAIL. Exepected status 200 (in request), got "$status $ERED
 			((RES_FAIL++))
+			__check_stop_at_error
 			return 1
 		fi
 		cid=${res:0:${#res}-3}
@@ -691,10 +701,10 @@
 		echo -ne " Deleted(batch) "$count"("$max")${SAMELINE}"
 
 		if [ $status -ne $1 ]; then
-			let pid=$pid+1
 			echo " Deleted(batch) "$count"?("$max")"
 			echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 			((RES_FAIL++))
+			__check_stop_at_error
 			return 1
 		fi
 
@@ -736,8 +746,12 @@
 
 	for ((i=1; i<=$pids; i++))
 	do
+		uuid=$UUID
+		if [ -z "$uuid" ]; then
+			uuid="NOUUID"
+		fi
 		echo "" > ".pid${i}.del.res.txt"
-		echo $resp_code $urlbase $num_rics $start_id $count $pids $i > ".pid${i}.del.txt"
+		echo $resp_code $urlbase $num_rics $uuid $start_id $count $pids $i > ".pid${i}.del.txt"
 		echo $i
 	done  | xargs -n 1 -I{} -P $pids bash -c '{
 		arg=$(echo {})
@@ -772,6 +786,7 @@
 
 	echo -e $RED" FAIL. One of more processes failed to execute" $ERED
 	((RES_FAIL++))
+	__check_stop_at_error
 	return 1
 }
 
@@ -816,6 +831,7 @@
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -828,7 +844,7 @@
 				targetJson=$targetJson","
 			fi
 			if [ $pid != "NOID" ]; then
-				targetJson=$targetJson"\"$pid\""
+				targetJson=$targetJson"\"$UUID$pid\""
 			fi
 		done
 
@@ -839,6 +855,7 @@
 		if [ $res -ne 0 ]; then
 			echo -e $RED" FAIL, returned body not correct"$ERED
 			((RES_FAIL++))
+			__check_stop_at_error
 			return 1
 		fi
 	fi
@@ -868,6 +885,7 @@
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -882,6 +900,7 @@
 		if [ $res -ne 0 ]; then
 			echo -e $RED" FAIL, returned body not correct"$ERED
 			((RES_FAIL++))
+			__check_stop_at_error
 			return 1
 		fi
 	fi
@@ -915,6 +934,7 @@
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -940,6 +960,7 @@
 		if [ $res -ne 0 ]; then
 			echo -e $RED" FAIL, returned body not correct"$ERED
 			((RES_FAIL++))
+			__check_stop_at_error
 			return 1
 		fi
 	fi
@@ -980,7 +1001,7 @@
 		return 1
 	fi
 
-	query="/policy_status?id="$2
+	query="/policy_status?id="$UUID$2
 
 	res="$(__do_curl_to_agent GET $query)"
     status=${res:${#res}-3}
@@ -988,6 +1009,7 @@
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -998,6 +1020,7 @@
 	if [ $res -ne 0 ]; then
 		echo -e $RED" FAIL, returned body not correct"$ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -1033,6 +1056,7 @@
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -1057,6 +1081,7 @@
 		if [ $res -ne 0 ]; then
 			echo -e $RED" FAIL, returned body not correct"$ERED
 			((RES_FAIL++))
+			__check_stop_at_error
 			return 1
 		fi
 	fi
@@ -1088,6 +1113,7 @@
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -1120,6 +1146,7 @@
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -1128,6 +1155,7 @@
 		if [ "$body" != "$3" ]; then
 			echo -e $RED" FAIL, returned body not correct"$ERED
 			((RES_FAIL++))
+			__check_stop_at_error
 			return 1
 		fi
 	fi
@@ -1163,6 +1191,7 @@
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -1172,6 +1201,7 @@
 		if [ $res -ne 0 ]; then
 			echo -e $RED" FAIL, could not create target ric info json"$ERED
 			((RES_FAIL++))
+			__check_stop_at_error
 			return 1
 		fi
 
@@ -1181,6 +1211,7 @@
 		if [ $res -ne 0 ]; then
 			echo -e $RED" FAIL, returned body not correct"$ERED
 			((RES_FAIL++))
+			__check_stop_at_error
 			return 1
 		fi
 	fi
@@ -1217,6 +1248,7 @@
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -1264,6 +1296,7 @@
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -1290,6 +1323,7 @@
 		if [ $res -ne 0 ]; then
 			echo -e $RED" FAIL, returned body not correct"$ERED
 			((RES_FAIL++))
+			__check_stop_at_error
 			return 1
 		fi
 	fi
@@ -1319,6 +1353,7 @@
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -1338,6 +1373,7 @@
 	if [ $res -ne 0 ]; then
 		echo -e $RED" FAIL, returned body not correct"$ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -1366,6 +1402,7 @@
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -1394,6 +1431,7 @@
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
diff --git a/test/common/controller_api_functions.sh b/test/common/controller_api_functions.sh
index c4ba71c..e33c619 100644
--- a/test/common/controller_api_functions.sh
+++ b/test/common/controller_api_functions.sh
@@ -98,12 +98,14 @@
     if [ $? -ne 0 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status "(likely remote server error)"$ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
     body=${res:0:${#res}-3}
@@ -117,7 +119,7 @@
         if [ "$targetJson" != "[" ]; then
             targetJson=$targetJson","
         fi
-        targetJson=$targetJson"\"$pid\""
+        targetJson=$targetJson"\"$UUID$pid\""
     done
     targetJson=$targetJson"]"
 
@@ -128,6 +130,7 @@
 	if [ $res -ne 0 ]; then
 		echo -e $RED" FAIL, returned body not correct"$ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -163,12 +166,14 @@
     if [ $? -ne 0 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status "(likely remote server error)"$ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
     body=${res:0:${#res}-3}
@@ -184,6 +189,7 @@
 		if [ $res -ne 0 ]; then
 			echo -e $RED" FAIL, returned body not correct"$ERED
 			((RES_FAIL++))
+			__check_stop_at_error
 			return 1
 		fi
 	fi
@@ -203,10 +209,10 @@
 
     paramError=1
     if [ $# -eq 5 ] && [ $2 == "OSC" ]; then
-        url="http://$3:$RIC_SIM_INTERNAL_PORT/a1-p/policytypes/$4/policies/$5"
+        url="http://$3:$RIC_SIM_INTERNAL_PORT/a1-p/policytypes/$4/policies/$UUID$5"
 		paramError=0
     elif [ $# -eq 4 ] && [ $2 == "STD" ]; then
-        url="http://$3:$RIC_SIM_INTERNAL_PORT/A1-P/v1/policies/$4"
+        url="http://$3:$RIC_SIM_INTERNAL_PORT/A1-P/v1/policies/$UUID$4"
         paramError=0
 	fi
 
@@ -222,12 +228,14 @@
     if [ $? -ne 0 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status "(likely remote server error)"$ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -246,12 +254,12 @@
 
     paramError=1
     if [ $# -eq 6 ] && [ $2 == "OSC" ]; then
-        url="http://$3:$RIC_SIM_INTERNAL_PORT/a1-p/policytypes/$4/policies/$5"
+        url="http://$3:$RIC_SIM_INTERNAL_PORT/a1-p/policytypes/$4/policies/$UUID$5"
         body=$(sed 's/XXX/'${5}'/g' $6)
 
 		paramError=0
     elif [ $# -eq 5 ] && [ $2 == "STD" ]; then
-        url="http://$3:$RIC_SIM_INTERNAL_PORT/A1-P/v1/policies/$4"
+        url="http://$3:$RIC_SIM_INTERNAL_PORT/A1-P/v1/policies/$UUID$4"
         body=$(sed 's/XXX/'${4}'/g' $5)
         paramError=0
 	fi
@@ -268,12 +276,14 @@
     if [ $? -ne 0 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status "(likely remote server error)"$ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -294,7 +304,7 @@
     targetJson=""
     paramError=1
     if [ $# -ge 5 ] && [ $2 == "OSC" ]; then
-        url="http://$3:$RIC_SIM_INTERNAL_PORT/a1-p/policytypes/$4/policies/$5/status"
+        url="http://$3:$RIC_SIM_INTERNAL_PORT/a1-p/policytypes/$4/policies/$UUID$5/status"
         if [ $# -gt 5 ]; then
             targetJson="{\"instance_status\":\"$6\""
             targetJson=$targetJson",\"has_been_deleted\":\"$7\""
@@ -302,7 +312,7 @@
         fi
 		paramError=0
     elif [ $# -ge 4 ] && [ $2 == "STD" ]; then
-        url="http://$3:$RIC_SIM_INTERNAL_PORT/A1-P/v1/policies/$4/status"
+        url="http://$3:$RIC_SIM_INTERNAL_PORT/A1-P/v1/policies/$UUID$4/status"
         if [ $# -gt 4 ]; then
             targetJson="{\"enforceStatus\":\"$5\""
             if [ $# -eq 6 ]; then
@@ -325,12 +335,14 @@
     if [ $? -ne 0 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status "(likely remote server error)"$ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -343,6 +355,7 @@
 		if [ $res -ne 0 ]; then
 			echo -e $RED" FAIL, returned body not correct"$ERED
 			((RES_FAIL++))
+			__check_stop_at_error
 			return 1
 		fi
 	fi
diff --git a/test/common/create_policies_process.py b/test/common/create_policies_process.py
index b242db0..8d37678 100644
--- a/test/common/create_policies_process.py
+++ b/test/common/create_policies_process.py
@@ -23,27 +23,32 @@
 import json
 import sys
 import requests
+import traceback
 
 # disable warning about unverified https requests
 from requests.packages import urllib3
 
 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
 
-#arg responsecode baseurl ric_base num_rics startid templatepath count pids pid_id
+#arg responsecode baseurl ric_base num_rics uuid startid templatepath count pids pid_id
 try:
-    if len(sys.argv) != 10:
-        print("1Expected 9 args, got "+str(len(sys.argv)-1)+ ". Args: responsecode baseurl ric_base num_rics startid templatepath count pids pid_id")
+    if len(sys.argv) != 11:
+        print("1Expected 10 args, got "+str(len(sys.argv)-1)+ ". Args: responsecode baseurl ric_base num_rics uuid startid templatepath count pids pid_id")
         sys.exit()
 
     responsecode=int(sys.argv[1])
     baseurl=sys.argv[2]
     ric_base=sys.argv[3]
     num_rics=int(sys.argv[4])
-    start=int(sys.argv[5])
-    templatepath=sys.argv[6]
-    count=int(sys.argv[7])
-    pids=int(sys.argv[8])
-    pid_id=int(sys.argv[9])
+    uuid=sys.argv[5]
+    start=int(sys.argv[6])
+    templatepath=sys.argv[7]
+    count=int(sys.argv[8])
+    pids=int(sys.argv[9])
+    pid_id=int(sys.argv[10])
+
+    if uuid == "NOUUID":
+        uuid=""
 
     with open(templatepath, 'r') as file:
         template = file.read()
@@ -56,15 +61,18 @@
                 payload=template.replace("XXX",str(i))
                 ric_id=(i%num_rics)+1
                 ric=ric_base+str(ric_id)
-                url=baseurl+"&id="+str(i)+"&ric="+str(ric)
+                url=baseurl+"&id="+uuid+str(i)+"&ric="+str(ric)
                 try:
                     headers = {'Content-type': 'application/json'}
                     resp=requests.put(url, json.dumps(json.loads(payload)), headers=headers, verify=False, timeout=90)
                 except Exception as e1:
-                    print("1Put failed for id:"+str(i)+ ", "+str(e1))
+                    print("1Put failed for id:"+uuid+str(i)+ ", "+str(e1) + " "+traceback.format_exc())
+                    sys.exit()
+                if (resp.status_code == None):
+                    print("1Put failed for id:"+uuid+str(i)+ ", expected response code: "+responsecode+", got: None")
                     sys.exit()
                 if (resp.status_code != responsecode):
-                    print("1Put failed for id:"+str(i)+ ", expected response code: "+responsecode+", got: "+str(resp.status_code))
+                    print("1Put failed for id:"+uuid+str(i)+ ", expected response code: "+responsecode+", got: "+str(resp.status_code))
                     sys.exit()
 
     print("0")
diff --git a/test/common/delete_policies_process.py b/test/common/delete_policies_process.py
index be15e92..e647118 100644
--- a/test/common/delete_policies_process.py
+++ b/test/common/delete_policies_process.py
@@ -23,38 +23,46 @@
 import json
 import sys
 import requests
+import traceback
 
 # disable warning about unverified https requests
 from requests.packages import urllib3
 
 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
 
-#arg responsecode baseurl num_rics startid count pids pid_id
+#arg responsecode baseurl num_rics uuid startid count pids pid_id
 
 try:
-    if len(sys.argv) != 8:
-        print("1Expected 7 args, got "+str(len(sys.argv)-1)+ ". Args: responsecode baseurl num_rics startid count pids pid_id")
+    if len(sys.argv) != 9:
+        print("1Expected 8 args, got "+str(len(sys.argv)-1)+ ". Args: responsecode baseurl num_rics uuid startid count pids pid_id")
         sys.exit()
 
     responsecode=int(sys.argv[1])
     baseurl=sys.argv[2]
     num_rics=int(sys.argv[3])
-    start=int(sys.argv[4])
-    count=int(sys.argv[5])
-    pids=int(sys.argv[6])
-    pid_id=int(sys.argv[7])
+    uuid=sys.argv[4]
+    start=int(sys.argv[5])
+    count=int(sys.argv[6])
+    pids=int(sys.argv[7])
+    pid_id=int(sys.argv[8])
+
+    if uuid == "NOUUID":
+        uuid=""
 
     stop=count*num_rics+start
     for i in range(start,stop):
         if (i%pids == (pid_id-1)):
-            url=str(baseurl+"?id="+str(i))
+            url=str(baseurl+"?id="+uuid+str(i))
             try:
                 resp=requests.delete(url, verify=False, timeout=90)
             except Exception as e1:
-                print("1Delete failed for id:"+str(i)+ ", "+str(e1))
+                print("1Delete failed for id:"+uuid+str(i)+ ", "+str(e1) + " "+traceback.format_exc())
+                sys.exit()
+            if (resp.status_code == None):
+                print("1Delete failed for id:"+uuid+str(i)+ ", expected response code: "+responsecode+", got: None")
                 sys.exit()
             if (resp.status_code != responsecode):
-                print("1Delete failed for id:"+str(i)+ ", expected response code: "+responsecode+", got: "+str(resp.status_code))
+                print("1Delete failed for id:"+uuid+str(i)+ ", expected response code: "+responsecode+", got: "+str(resp.status_code))
                 sys.exit()
 
     print("0")
diff --git a/test/common/ricsimulator_api_functions.sh b/test/common/ricsimulator_api_functions.sh
index c30af1a..f003559 100644
--- a/test/common/ricsimulator_api_functions.sh
+++ b/test/common/ricsimulator_api_functions.sh
@@ -214,7 +214,7 @@
 	app=$2
 	res=$(__find_sim_port $app)
 
-    curlString="curl -X POST -skw %{http_code} $RIC_SIM_LOCALHOST$res/delay"
+    curlString="curl -X POST -skw %{http_code} $RIC_SIM_LOCALHOST$res/forcedelay"
 	if [ $# -eq 3 ]; then
 		curlString=$curlString"?delay="$3
 	fi
diff --git a/test/common/test_env.sh b/test/common/test_env.sh
index afe81c9..11c3b6d 100755
--- a/test/common/test_env.sh
+++ b/test/common/test_env.sh
@@ -25,26 +25,26 @@
 
 # Local Policy Agent image and tag
 POLICY_AGENT_LOCAL_IMAGE="o-ran-sc/nonrtric-policy-agent"
-POLICY_AGENT_LOCAL_IMAGE_TAG="1.0.0-SNAPSHOT"
+POLICY_AGENT_LOCAL_IMAGE_TAG="2.0.0-SNAPSHOT"
 # Remote Policy Agent image and tag
 POLICY_AGENT_REMOTE_IMAGE="nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-policy-agent"
-POLICY_AGENT_REMOTE_IMAGE_TAG="1.0.0"
+POLICY_AGENT_REMOTE_IMAGE_TAG="2.0.0"
 
 
 # Control Panel local image and tag
 CONTROL_PANEL_LOCAL_IMAGE="o-ran-sc/nonrtric-controlpanel"
-CONTROL_PANEL_LOCAL_IMAGE_TAG="1.0.0-SNAPSHOT"
+CONTROL_PANEL_LOCAL_IMAGE_TAG="2.0.0-SNAPSHOT"
 # Control Panel remote image and tag
 CONTROL_PANEL_REMOTE_IMAGE="nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-controlpanel"
-CONTROL_PANEL_REMOTE_IMAGE_TAG="1.0.0"
+CONTROL_PANEL_REMOTE_IMAGE_TAG="2.0.0"
 
 
 # SDNC A1 Controller local image and tag
 SDNC_A1_CONTROLLER_LOCAL_IMAGE="o-ran-sc/nonrtric-a1-controller"
-SDNC_A1_CONTROLLER_LOCAL_IMAGE_TAG="1.7.5-SNAPSHOT"
+SDNC_A1_CONTROLLER_LOCAL_IMAGE_TAG="2.0.0-SNAPSHOT"
 # SDNC A1 Controller remote image and tag
 SDNC_A1_CONTROLLER_REMOTE_IMAGE="nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-a1-controller"
-SDNC_A1_CONTROLLER_REMOTE_IMAGE_TAG="1.7.5"
+SDNC_A1_CONTROLLER_REMOTE_IMAGE_TAG="2.0.0"
 
 
 #SDNC DB remote image and tag
@@ -69,7 +69,7 @@
 RIC_SIM_LOCAL_IMAGE_TAG="latest"
 # Near RT RIC Simulator remote image and tag
 RIC_SIM_REMOTE_IMAGE="nexus3.o-ran-sc.org:10004/o-ran-sc/a1-simulator"
-RIC_SIM_REMOTE_IMAGE_TAG="1.0.1"
+RIC_SIM_REMOTE_IMAGE_TAG="2.0.0"
 
 
 #Consul remote image and tag
@@ -132,6 +132,7 @@
 export 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
 export RIC_SIM_INTERNAL_PORT=8085                               # RIC Simulator container internal port (container -> container).
                                                                 # (external ports allocated by docker)
 export RIC_SIM_INTERNAL_SECURE_PORT=8185                        # RIC Simulator container internal secure port (container -> container).
@@ -167,6 +168,9 @@
 export CONTROL_PANEL_INTERNAL_PORT=8080                         # Control Panel container external port (host -> container)
 CONTROL_PANEL_LOGPATH="/logs/nonrtric-controlpanel.log"         # Path the application log in the Control Panel container
 
+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
+
 RESTBASE="http://localhost:"$POLICY_AGENT_EXTERNAL_PORT         # Base url to the Agent NB REST interface
 RESTBASE_SECURE="https://localhost:"$POLICY_AGENT_EXTERNAL_SECURE_PORT # Base url to the secure Agent NB REST interface
 DMAAPBASE="http://localhost:"$MR_EXTERNAL_PORT                  # Base url to the Dmaap adapter
diff --git a/test/common/testcase_common.sh b/test/common/testcase_common.sh
index 4818bc0..d694ef1 100755
--- a/test/common/testcase_common.sh
+++ b/test/common/testcase_common.sh
@@ -18,7 +18,7 @@
 #
 
 # This is a script that contains all the functions needed for auto test
-# Arg: local|remote|remote-remove [auto-clean]
+# Arg: local|remote|remote-remove [auto-clean] [--stop-at-error] [--ricsim-prefix <prefix> ] [--use-local-image <app-nam> [<app-name>]*]
 
 
 #Formatting for 'echo' cmd
@@ -94,6 +94,12 @@
 # Var to hold the app names to use local image for when running 'remote' or 'remote-remove'
 USE_LOCAL_IMAGES=""
 
+# List of available apps to override with local image
+AVAILABLE_LOCAL_IMAGES_OVERRIDE="PA CP SDNC RICSIM"
+
+# Use this var (STOP_AT_ERROR=1 in the test script) for debugging/trouble shooting to take all logs and exit at first FAIL test case
+STOP_AT_ERROR=0
+
 # Set a description string for the test case
 if [ -z "$TC_ONELINE_DESCR" ]; then
 	TC_ONELINE_DESCR="<no-description>"
@@ -121,6 +127,11 @@
 HTTPLOG=$PWD"/.httplog_"$ATC".txt"
 echo "" > $HTTPLOG
 
+#Create result file (containing '1' for error) for this test case
+#Will be replaced with a file containing '0' if script is ok
+
+echo "1" > "$PWD/.result$ATC.txt"
+
 # Create a log dir for the test case
 mkdir -p $TESTLOGS/$ATC
 
@@ -172,27 +183,67 @@
 		shift;
 	fi
 fi
-if [ $paramerror -eq 0 ]; then
-	if [ "$1" == "auto-clean" ]; then
-		AUTO_CLEAN="auto"
-		shift;
-	fi
-fi
-if [ $paramerror -eq 0 ]; then
-	if [ "$1" == "-use-local-image" ]; then
-		USE_LOCAL_IMAGES=${@:2}
-		while [ $# -gt 0 ]; do
+foundparm=0
+while [ $paramerror -eq 0 ] && [ $foundparm -eq 0 ]; do
+	foundparm=1
+	if [ $paramerror -eq 0 ]; then
+		if [ "$1" == "auto-clean" ]; then
+			AUTO_CLEAN="auto"
+			echo "Option set - Auto clean at end of test script"
 			shift;
-		done
+			foundparm=0
+		fi
 	fi
-fi
+	if [ $paramerror -eq 0 ]; then
+		if [ "$1" == "--stop-at-error" ]; then
+			STOP_AT_ERROR=1
+			echo "Option set - Stop at first error"
+			shift;
+			foundparm=0
+		fi
+	fi
+	if [ $paramerror -eq 0 ]; then
+		if [ "$1" == "--ricsim-prefix" ]; then
+			shift;
+			RIC_SIM_PREFIX=$1
+			if [ -z "$1" ]; then
+				paramerror=1
+			else
+				echo "Option set - Overriding RIC_SIM_PREFIX with: "$1
+				shift;
+				foundparm=0
+			fi
+		fi
+	fi
+	if [ $paramerror -eq 0 ]; then
+		if [ "$1" == "--use-local-image" ]; then
+			USE_LOCAL_IMAGES=""
+			shift
+			while [ $# -gt 0 ] && [[ "$1" != "--"* ]]; do
+				USE_LOCAL_IMAGES=$USE_LOCAL_IMAGES" "$1
+				if [[ "$AVAILABLE_LOCAL_IMAGES_OVERRIDE" != *"$1"* ]]; then
+					paramerror=1
+				fi
+				shift;
+			done
+			foundparm=0
+			if [ -z "$USE_LOCAL_IMAGES" ]; then
+				paramerror=1
+			else
+				echo "Option set - Override remote images for app(s):"$USE_LOCAL_IMAGES
+			fi
+		fi
+	fi
+done
+echo ""
 
+#Still params left?
 if [ $paramerror -eq 0 ] && [ $# -gt 0 ]; then
 	paramerror=1
 fi
 
 if [ $paramerror -eq 1 ]; then
-	echo -e $RED"Expected arg: local|remote|remote-remove [auto-clean] [-use-local-image <app-nam> [<app-name>]]"$ERED
+	echo -e $RED"Expected arg: local|remote|remote-remove [auto-clean] [--stop-at-error] [--ricsim-prefix <prefix> ] [--use-local-image <app-nam> [<app-name>]*]"$ERED
 	exit 1
 fi
 
@@ -242,7 +293,7 @@
 
 
 #Check if app local image shall override remote image
-check_image_local_override() {
+__check_image_local_override() {
 	for im in $USE_LOCAL_IMAGES; do
 		if [ "$1" == "$im" ]; then
 			return 1
@@ -252,7 +303,7 @@
 }
 
 #Check if app uses image excluded from this test run
-check_excluded_image() {
+__check_excluded_image() {
 	for im in $EXCLUDED_IMAGES; do
 		if [ "$1" == "$im" ]; then
 			return 1
@@ -280,7 +331,7 @@
 
 elif [ $START_ARG == "remote" ] || [ $START_ARG == "remote-remove" ]; then
 
-	check_image_local_override 'PA'
+	__check_image_local_override 'PA'
 	if [ $? -eq 0 ]; then
 		#Remote agent image
 		__check_image_var " Policy Agent" $START_ARG "POLICY_AGENT_IMAGE" "POLICY_AGENT_REMOTE_IMAGE" "POLICY_AGENT_REMOTE_IMAGE_TAG"
@@ -289,7 +340,7 @@
 		__check_image_var " Policy Agent" $START_ARG "POLICY_AGENT_IMAGE" "POLICY_AGENT_LOCAL_IMAGE" "POLICY_AGENT_LOCAL_IMAGE_TAG"
 	fi
 
-	check_image_local_override 'CP'
+	__check_image_local_override 'CP'
 	if [ $? -eq 0 ]; then
 		#Remote Control Panel image
 		__check_image_var " Control Panel" $START_ARG "CONTROL_PANEL_IMAGE" "CONTROL_PANEL_REMOTE_IMAGE" "CONTROL_PANEL_REMOTE_IMAGE_TAG"
@@ -298,7 +349,7 @@
 		__check_image_var " Control Panel" $START_ARG "CONTROL_PANEL_IMAGE" "CONTROL_PANEL_LOCAL_IMAGE" "CONTROL_PANEL_LOCAL_IMAGE_TAG"
 	fi
 
-	check_image_local_override 'SDNC'
+	__check_image_local_override 'SDNC'
 	if [ $? -eq 0 ]; then
 		#Remote SDNC image
 		__check_image_var " SDNC A1 Controller" $START_ARG "SDNC_A1_CONTROLLER_IMAGE" "SDNC_A1_CONTROLLER_REMOTE_IMAGE" "SDNC_A1_CONTROLLER_REMOTE_IMAGE_TAG"
@@ -307,7 +358,7 @@
 		__check_image_var " SDNC A1 Controller" $START_ARG "SDNC_A1_CONTROLLER_IMAGE" "SDNC_A1_CONTROLLER_LOCAL_IMAGE" "SDNC_A1_CONTROLLER_LOCAL_IMAGE_TAG"
 	fi
 
-	check_image_local_override 'RICSIM'
+	__check_image_local_override 'RICSIM'
 	if [ $? -eq 0 ]; then
 		#Remote ric sim image
 		__check_image_var " RIC Simulator" $START_ARG "RIC_SIM_IMAGE" "RIC_SIM_REMOTE_IMAGE" "RIC_SIM_REMOTE_IMAGE_TAG"
@@ -329,7 +380,7 @@
 __check_image_var " Consul" $START_ARG "CONSUL_IMAGE" "CONSUL_REMOTE_IMAGE" "CONSUL_REMOTE_IMAGE_TAG"
 __check_image_var " CBS" $START_ARG "CBS_IMAGE" "CBS_REMOTE_IMAGE" "CBS_REMOTE_IMAGE_TAG"
 __check_image_var " SDNC DB" $START_ARG "SDNC_DB_IMAGE" "SDNC_DB_REMOTE_IMAGE" "SDNC_DB_REMOTE_IMAGE_TAG"
-check_excluded_image 'SDNC_ONAP'
+__check_excluded_image 'SDNC_ONAP'
 if [ $? -eq 0 ]; then
 	__check_image_var " SDNC ONAP A1 Adapter" $START_ARG "SDNC_ONAP_A1_ADAPTER_IMAGE" "SDNC_ONAP_A1_ADAPTER_REMOTE_IMAGE" "SDNC_ONAP_A1_ADAPTER_REMOTE_IMAGE_TAG"
 	__check_image_var " SDNC ONAP DB" $START_ARG "SDNC_ONAP_DB_IMAGE" "SDNC_ONAP_DB_REMOTE_IMAGE" "SDNC_ONAP_DB_REMOTE_IMAGE_TAG"
@@ -453,21 +504,21 @@
 echo -e $BOLD"Pulling configured images, if needed"$EBOLD
 
 START_ARG_MOD=$START_ARG
-check_image_local_override 'PA'
+__check_image_local_override 'PA'
 if [ $? -eq 1 ]; then
 	START_ARG_MOD="local"
 fi
 app="Policy Agent";             __check_and_pull_image $START_ARG_MOD "$app" $POLICY_AGENT_APP_NAME $POLICY_AGENT_IMAGE
 
 START_ARG_MOD=$START_ARG
-check_image_local_override 'CP'
+__check_image_local_override 'CP'
 if [ $? -eq 1 ]; then
 	START_ARG_MOD="local"
 fi
 app="Non-RT RIC Control Panel"; __check_and_pull_image $START_ARG_MOD "$app" $CONTROL_PANEL_APP_NAME $CONTROL_PANEL_IMAGE
 
 START_ARG_MOD=$START_ARG
-check_image_local_override 'RICSIM'
+__check_image_local_override 'RICSIM'
 if [ $? -eq 1 ]; then
 	START_ARG_MOD="local"
 fi
@@ -475,10 +526,10 @@
 
 app="Consul";                   __check_and_pull_image $START_ARG "$app" $CONSUL_APP_NAME $CONSUL_IMAGE
 app="CBS";                      __check_and_pull_image $START_ARG "$app" $CBS_APP_NAME $CBS_IMAGE
-check_excluded_image 'SDNC'
+__check_excluded_image 'SDNC'
 if [ $? -eq 0 ]; then
 	START_ARG_MOD=$START_ARG
-	check_image_local_override 'SDNC'
+	__check_image_local_override 'SDNC'
 	if [ $? -eq 1 ]; then
 		START_ARG_MOD="local"
 	fi
@@ -487,7 +538,7 @@
 else
 	echo -e $YELLOW" Excluding SDNC image and related DB image from image check/pull"$EYELLOW
 fi
-check_excluded_image 'SDNC_ONAP'
+__check_excluded_image 'SDNC_ONAP'
 if [ $? -eq 0 ]; then
 	app="SDNC ONAP A1 Adapter";     __check_and_pull_image $START_ARG "$app" $SDNC_ONAP_APP_NAME $SDNC_ONAP_A1_ADAPTER_IMAGE
 	app="SDNC ONAP DB";             __check_and_pull_image $START_ARG "$app" $SDNC_ONAP_APP_NAME $SDNC_ONAP_DB_IMAGE
@@ -554,12 +605,12 @@
 echo -e " Callback Receiver\t$(docker images --format $format_string $CR_IMAGE)" >>   $docker_tmp_file
 echo -e " Consul\t$(docker images --format $format_string $CONSUL_IMAGE)" >>   $docker_tmp_file
 echo -e " CBS\t$(docker images --format $format_string $CBS_IMAGE)" >>   $docker_tmp_file
-check_excluded_image 'SDNC'
+__check_excluded_image 'SDNC'
 if [ $? -eq 0 ]; then
 	echo -e " SDNC A1 Controller\t$(docker images --format $format_string $SDNC_A1_CONTROLLER_IMAGE)" >>   $docker_tmp_file
 	echo -e " SDNC DB\t$(docker images --format $format_string $SDNC_DB_IMAGE)" >>   $docker_tmp_file
 fi
-check_excluded_image 'SDNC_ONAP'
+__check_excluded_image 'SDNC_ONAP'
 if [ $? -eq 0 ]; then
 	echo -e " SDNC ONAP A1 Adapter\t$(docker images --format $format_string $SDNC_ONAP_A1_ADAPTER_IMAGE)" >>   $docker_tmp_file
 	echo -e " SDNC ONAP DB\t$(docker images --format $format_string $SDNC_ONAP_DB_IMAGE)" >>   $docker_tmp_file
@@ -640,6 +691,8 @@
 		if [ -f .tmp_tcsuite_pass ]; then
 			echo " - "$ATC " -- "$TC_ONELINE_DESCR"  Execution time: "$duration" seconds" >> .tmp_tcsuite_pass
 		fi
+		#Create file with OK exit code
+		echo "0" > "$PWD/.result$ATC.txt"
 	else
 		echo -e "One or more tests with status  \033[31m\033[1mFAIL\033[0m "
 		echo -e "\033[31m\033[1m  ___ _   ___ _    \033[0m"
@@ -743,6 +796,16 @@
 	echo ""
 }
 
+# Stop at first FAIL test case and take all logs - only for debugging/trouble shooting
+__check_stop_at_error() {
+	if [ $STOP_AT_ERROR -eq 1 ]; then
+		echo -e $RED"Test script configured to stop at first FAIL, taking all logs and stops"$ERED
+		store_logs "STOP_AT_ERROR"
+		exit 1
+	fi
+	return 0
+}
+
 # Stop and remove all containers
 # args: -
 # (Function for test scripts)
@@ -803,6 +866,14 @@
 	echo -e $BOLD" Removing all dangling/untagged docker images"$EBOLD
     docker rmi --force $(docker images -q -f dangling=true) &> /dev/null
 	echo ""
+
+	CONTRS=$(docker ps | awk '$1 != "CONTAINER" { n++ }; END { print n+0 }')
+	if [ $? -eq 0 ]; then
+		if [ $CONTRS -ne 0 ]; then
+			echo -e $RED"Containers running, may cause distubance to the test case"$ERED
+			docker ps -a
+		fi
+	fi
 }
 
 # Function stop and remove all container in the end of the test script, if the arg 'auto-clean' is given at test script start
@@ -817,7 +888,7 @@
 }
 
 # Function to sleep a test case for a numner of seconds. Prints the optional text args as info
-# args: <sleep-time-in-sec> [any-text-in-quoteds-to-printed]
+# args: <sleep-time-in-sec> [any-text-in-quotes-to-be-printed]
 # (Function for test scripts)
 sleep_wait() {
 
@@ -1022,6 +1093,13 @@
 	return 0
 }
 
+# Generate a UUID to use as prefix for policy ids
+generate_uuid() {
+	UUID=$(python3 -c 'import sys,uuid; sys.stdout.write(uuid.uuid4().hex)')
+	#Reduce length to make space for serial id, us 'a' as marker where the serial id is added
+	UUID=${UUID:0:${#UUID}-4}"a"
+}
+
 ####################
 ### Consul functions
 ####################
@@ -1156,7 +1234,7 @@
 
 	config_json=$config_json"\n   \"ric\": ["
 
-	rics=$(docker ps | grep ricsim | awk '{print $NF}')
+	rics=$(docker ps | grep $RIC_SIM_PREFIX | awk '{print $NF}')
 
 	if [ $? -ne 0 ] || [ -z "$rics" ]; then
 		echo -e $RED" FAIL - the names of the running RIC Simulator cannot be retrieved." $ERED
@@ -1231,31 +1309,36 @@
 }
 
 # Start one group (ricsim_g1, ricsim_g2 or ricsim_g3) with a number of RIC Simulators using a given A interface
+# 'ricsim' may be set on command line to other prefix
 # args:  ricsim_g1|ricsim_g2|ricsim_g3 <count> <interface-id>
 # (Function for test scripts)
 start_ric_simulators() {
 
 	echo -e $BOLD"Starting RIC Simulators"$EBOLD
 
+	RIC1=$RIC_SIM_PREFIX"_g1"
+	RIC2=$RIC_SIM_PREFIX"_g2"
+	RIC3=$RIC_SIM_PREFIX"_g3"
+
 	if [ $# != 3 ]; then
 		((RES_CONF_FAIL++))
-    	__print_err "need three args,  ricsim_g1|ricsim_g2|ricsim_g3 <count> <interface-id>" $@
+    	__print_err "need three args,  $RIC1|$RIC2|$RIC3 <count> <interface-id>" $@
 		exit 1
 	fi
 	echo " $2 simulators using basename: $1 on interface: $3"
 	#Set env var for simulator count and A1 interface vesion for the given group
-	if [ $1 == "ricsim_g1" ]; then
+	if [ $1 == "$RIC1" ]; then
 		G1_COUNT=$2
 		G1_A1_VERSION=$3
-	elif [ $1 == "ricsim_g2" ]; then
+	elif [ $1 == "$RIC2" ]; then
 		G2_COUNT=$2
 		G2_A1_VERSION=$3
-	elif [ $1 == "ricsim_g3" ]; then
+	elif [ $1 == "$RIC3" ]; then
 		G3_COUNT=$2
 		G3_A1_VERSION=$3
 	else
 		((RES_CONF_FAIL++))
-    	__print_err "need three args, gricsim_g1|ricsim_g2|ricsim_g3 <count> <interface-id>" $@
+    	__print_err "need three args, $RIC1|$RIC2|$RIC3 <count> <interface-id>" $@
 		exit 1
 	fi
 
@@ -1305,7 +1388,7 @@
 
 	echo -e $BOLD"Starting SDNC A1 Controller"$EBOLD
 
-	check_excluded_image 'SDNC'
+	__check_excluded_image 'SDNC'
 	if [ $? -eq 1 ]; then
 		echo -e $RED"The image for SDNC and the related DB has not been checked for this test run due to arg to the test script"$ERED
 		echo -e $RED"SDNC will not be started"$ERED
@@ -1343,7 +1426,7 @@
 
 	echo -e $BOLD"Starting SDNC ONAP A1 Adapter"$EBOLD
 
-	check_excluded_image 'SDNC_ONAP'
+	__check_excluded_image 'SDNC_ONAP'
 	if [ $? -eq 1 ]; then
 		echo -e $RED"The image for SDNC ONAP and the related DB has not been checked for this test run due to arg to the test script"$ERED
 		echo -e $RED"SDNC ONAP will not be started"$ERED
@@ -1509,6 +1592,20 @@
 	return 0
 }
 
+# Turn on trace level tracing in the agent
+# args: -
+# (Function for test scripts)
+set_agent_trace() {
+	echo -e $BOLD"Setting agent trace"$EBOLD
+	curl $LOCALHOST$POLICY_AGENT_EXTERNAL_PORT/actuator/loggers/org.oransc.policyagent -X POST  -H 'Content-Type: application/json' -d '{"configuredLevel":"trace"}' &> /dev/null
+	if [ $? -ne 0 ]; then
+		__print_err "could not set trace mode" $@
+		return 1
+	fi
+	echo ""
+	return 0
+}
+
 # Perform curl retries when making direct call to the agent for the specified http response codes
 # Speace separated list of http response codes
 # args: [<response-code>]*
@@ -1656,7 +1753,6 @@
 			checkjsonarraycount=1
 		fi
 
-		#echo -e "---- ${1} sim test criteria: \033[1m ${3} \033[0m ${4} ${5} within ${6} seconds ----"
 		echo -e $BOLD"TEST(${BASH_LINENO[1]}): ${1}, ${3} ${4} ${5} within ${6} seconds"$EBOLD
 		((RES_TEST++))
 		start=$SECONDS
@@ -1679,39 +1775,35 @@
 			if [ $retcode -ne 0 ]; then
 				if [ $duration -gt $6 ]; then
 					((RES_FAIL++))
-					#echo -e "----  \033[31m\033[1mFAIL\033[0m - Target ${3} ${4} ${5}  not reached in ${6} seconds, result = ${result} ----"
 					echo -e $RED" FAIL${ERED} - ${3} ${4} ${5} not reached in ${6} seconds, result = ${result}"
+					__check_stop_at_error
 					return
 				fi
 			elif [ $4 = "=" ] && [ "$result" -eq $5 ]; then
 				((RES_PASS++))
 				echo -e " Result=${result} after ${duration} seconds${SAMELINE}"
 				echo -e $GREEN" PASS${EGREEN} - Result=${result} after ${duration} seconds"
-				#echo -e "----  \033[32m\033[1mPASS\033[0m - Test criteria met in ${duration} seconds ----"
 				return
 			elif [ $4 = ">" ] && [ "$result" -gt $5 ]; then
 				((RES_PASS++))
 				echo -e " Result=${result} after ${duration} seconds${SAMELINE}"
 				echo -e $GREEN" PASS${EGREEN} - Result=${result} after ${duration} seconds"
-				#echo -e "----  \033[32m\033[1mPASS\033[0m - Test criteria met in ${duration} seconds, result = ${result}  ----"
 				return
 			elif [ $4 = "<" ] && [ "$result" -lt $5 ]; then
 				((RES_PASS++))
 				echo -e " Result=${result} after ${duration} seconds${SAMELINE}"
 				echo -e $GREEN" PASS${EGREEN} - Result=${result} after ${duration} seconds"
-				#echo -e "----  \033[32m\033[1mPASS\033[0m - Test criteria met in ${duration} seconds, result = ${result}  ----"
 				return
 			elif [ $4 = "contain_str" ] && [[ $result =~ $5 ]]; then
 				((RES_PASS++))
 				echo -e " Result=${result} after ${duration} seconds${SAMELINE}"
 				echo -e $GREEN" PASS${EGREEN} - Result=${result} after ${duration} seconds"
-				#echo -e "----  \033[32m\033[1mPASS\033[0m - Test criteria met in ${duration} seconds, result = ${result}  ----"
 				return
 			else
 				if [ $duration -gt $6 ]; then
 					((RES_FAIL++))
 					echo -e $RED" FAIL${ERED} - ${3} ${4} ${5} not reached in ${6} seconds, result = ${result}"
-					#echo -e "----  \033[31m\033[1mFAIL\033[0m - Target ${3} ${4} ${5}  not reached in ${6} seconds, result = ${result} ----"
+					__check_stop_at_error
 					return
 				fi
 			fi
@@ -1722,7 +1814,6 @@
 			checkjsonarraycount=1
 		fi
 
-		#echo -e "---- ${1} sim test criteria: \033[1m ${3} \033[0m ${4} ${5} ----"
 		echo -e $BOLD"TEST(${BASH_LINENO[1]}): ${1}, ${3} ${4} ${5}"$EBOLD
 		((RES_TEST++))
 		if [ $checkjsonarraycount -eq 0 ]; then
@@ -1738,28 +1829,24 @@
 		fi
 		if [ $retcode -ne 0 ]; then
 			((RES_FAIL++))
-			#echo -e "----  \033[31m\033[1mFAIL\033[0m - Target ${3} ${4} ${5} not reached, result = ${result} ----"
 			echo -e $RED" FAIL ${ERED}- ${3} ${4} ${5} not reached, result = ${result}"
+			__check_stop_at_error
 		elif [ $4 = "=" ] && [ "$result" -eq $5 ]; then
 			((RES_PASS++))
 			echo -e $GREEN" PASS${EGREEN} - Result=${result}"
-			#echo -e "----  \033[32m\033[1mPASS\033[0m - Test criteria met"
 		elif [ $4 = ">" ] && [ "$result" -gt $5 ]; then
 			((RES_PASS++))
 			echo -e $GREEN" PASS${EGREEN} - Result=${result}"
-			#echo -e "----  \033[32m\033[1mPASS\033[0m - Test criteria met, result = ${result} ----"
 		elif [ $4 = "<" ] && [ "$result" -lt $5 ]; then
 			((RES_PASS++))
 			echo -e $GREEN" PASS${EGREEN} - Result=${result}"
-			#echo -e "----  \033[32m\033[1mPASS\033[0m - Test criteria met, result = ${result} ----"
 		elif [ $4 = "contain_str" ] && [[ $result =~ $5 ]]; then
 			((RES_PASS++))
 			echo -e $GREEN" PASS${EGREEN} - Result=${result}"
-			#echo -e "----  \033[32m\033[1mPASS\033[0m - Test criteria met, result = ${result} ----"
 		else
 			((RES_FAIL++))
 			echo -e $RED" FAIL${ERED} - ${3} ${4} ${5} not reached, result = ${result}"
-			#echo -e "----  \033[31m\033[1mFAIL\033[0m - Target ${3} ${4} ${5} not reached, result = ${result} ----"
+			__check_stop_at_error
 		fi
 	else
 		echo "Wrong args to __var_test, needs five or six args: <simulator-name> <host> <variable-name> <condition-operator> <target-value> [ <timeout> ]"
diff --git a/test/jenkins/.gitignore b/test/jenkins/.gitignore
new file mode 100644
index 0000000..260a2eb
--- /dev/null
+++ b/test/jenkins/.gitignore
@@ -0,0 +1,9 @@
+.consul_config.json
+.docker-images-table
+.httplog*
+.image-list
+.output.consul_config.json
+.result*
+.timer_measurement.txt
+.tmp.curl.json
+logs/
diff --git a/test/jenkins/run_test.sh b/test/jenkins/run_test.sh
new file mode 100755
index 0000000..e7262e4
--- /dev/null
+++ b/test/jenkins/run_test.sh
@@ -0,0 +1,47 @@
+#!/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=================================================
+#
+
+# This script is to set up test env in jenkins vm
+
+echo "--> run_integration.sh"
+
+# Install docker-compose
+curl -L "https://github.com/docker/compose/releases/download/1.26.0/docker-compose-$(uname -s)-$(uname -m)" -o ./docker-compose
+chmod +x docker-compose
+export PATH=$PATH:`pwd`
+
+clean_docker(){
+    docker stop $(docker ps -aq)
+    docker system prune -f
+}
+# Run auto-test scripts
+cd ../auto-test/
+clean_docker
+bash FTC10.sh remote auto-clean --use-local-image PA SDNC
+
+echo "--> run_integration.sh END"
+
+FILE=.resultFTC10.txt
+if [[ -f "$FILE" ]]; then
+    res=$(cat .resultFTC10.txt)
+    clean_docker
+    exit $res
+fi
+clean_docker
+exit 1
diff --git a/test/mrstub/Dockerfile b/test/mrstub/Dockerfile
index 07101ad..513894c 100644
--- a/test/mrstub/Dockerfile
+++ b/test/mrstub/Dockerfile
@@ -28,9 +28,6 @@
 RUN apt-get update
 RUN apt-get install -y nginx=1.14.*
 
-#install curl
-RUN apt-get install -y curl
-
 #start mrstub
 RUN pip install -r requirements.txt
 
diff --git a/test/simulator-group/ric/docker-compose.yml b/test/simulator-group/ric/docker-compose.yml
index 701a7f5..70ec587 100644
--- a/test/simulator-group/ric/docker-compose.yml
+++ b/test/simulator-group/ric/docker-compose.yml
@@ -34,6 +34,7 @@
     environment:
       - A1_VERSION=${G1_A1_VERSION}
       - REMOTE_HOSTS_LOGGING=1
+      - ALLOW_HTTP=true
     volumes:
       - ${RIC_SIM_CERT_MOUNT_DIR}:/usr/src/app/cert:ro
   g2:
@@ -46,6 +47,7 @@
     environment:
       - A1_VERSION=${G2_A1_VERSION}
       - REMOTE_HOSTS_LOGGING=1
+      - ALLOW_HTTP=true
     volumes:
       - ${RIC_SIM_CERT_MOUNT_DIR}:/usr/src/app/cert:ro
   g3:
@@ -58,5 +60,6 @@
     environment:
       - A1_VERSION=${G3_A1_VERSION}
       - REMOTE_HOSTS_LOGGING=1
+      - ALLOW_HTTP=true
     volumes:
       - ${RIC_SIM_CERT_MOUNT_DIR}:/usr/src/app/cert:ro
\ No newline at end of file
diff --git a/test/simulator-group/sim-monitor.js b/test/simulator-group/sim-monitor.js
index d56ad7f..17d3205 100644
--- a/test/simulator-group/sim-monitor.js
+++ b/test/simulator-group/sim-monitor.js
@@ -41,7 +41,7 @@
 function getSimCtr(url, index, cb) {
     var data = '';
 
-    console.log("URL: "+ url + " - ")
+    //console.log("URL: "+ url + " - ")
     try {
         http.get(url, (resp) => {
             // A chunk of data has been recieved.
@@ -185,6 +185,8 @@
 
 var refreshInterval=4000
 
+var ricbasename="ricsim"
+
 function fetchAllMetrics() {
     setTimeout(() => {
 
@@ -195,7 +197,7 @@
         if (getCtr%3 == 0) {
             //Extract the port numbers from the running simulators, for every 3 calls
             const { exec } = require('child_process');
-            exec('docker ps --filter "name=ricsim" --format "{{.Names}} {{.Ports}}" | sed s/0.0.0.0:// | cut -d \'>\' -f1 | sed \'s/[[-]]*$//\'', (err, stdout, stderr) => {
+            exec('docker ps --filter "name='+ricbasename+'" --format "{{.Names}} {{.Ports}}" | sed s/0.0.0.0:// | cut -d \'>\' -f1 | sed \'s/[[-]]*$//\'', (err, stdout, stderr) => {
 
                 var simulators = ""
                 simulators=`${stdout}`.replace(/(\r\n|\n|\r)/gm," ");
@@ -377,6 +379,14 @@
 
 app.get("/mon",function(req, res){
 
+    var bn=req.query.basename
+
+    if (bn == undefined) {
+        getCtr=0
+        return res.redirect('/mon?basename=ricsim');
+    } else {
+        ricbasename=bn
+    }
 
     refreshInterval=2000
 
@@ -388,6 +398,9 @@
             "<title>Policy Agent and simulator monitor</title>"+
             "</head>" +
             "<body>" +
+            "<font size=\"-3\" face=\"monospace\">" +
+            "<p>Change basename in url if other ric sim prefix is used</p>" +
+            "</font>" +
             "<h3>Policy agent</h3>" +
             "<font face=\"monospace\">" +
             "Status:..............................." + formatDataRow(ag1) + "<br>" +
diff --git a/test/usecases/healthcheck/README.md b/test/usecases/healthcheck/README.md
new file mode 100644
index 0000000..a699e84
--- /dev/null
+++ b/test/usecases/healthcheck/README.md
@@ -0,0 +1,39 @@
+# Use case Health Check test
+# General
+
+The Health Check use case test provides a python script that regularly creates, reads, updates, and deletes a policy
+in all Near-RT RICs that support the type used by the script. A self refreshing web page provides a view of statistics
+for these regular checks.
+
+# Prerequisits
+To run this script Python3 needs to be installed. To install the script's dependencies, run the following command from
+the `src` folder: `pip install -r requirements.txt`
+
+# How to run
+Go to the `src/` folder and run `python3 main.py`. The script will start and run until stopped. Use the `-h` option to
+see the options available for the script.
+
+As default, the script uses the "Hello World" policy type with ID "2". To create the instances it uses the body file
+`nonrtric/test/autotest/testdata/OSC/pihw_template.json`. The body file contains the string "XXX" as a parameter value.
+This string vill be replaced with dynamic data during creation. It is possible to provide a custom policy type and
+body file to the script at startup.
+
+To see the web page, navigate to `localhost:9990/stats`. The page refreshes itself with the same interval as the script
+uses.
+
+## License
+
+Copyright (C) 2020 Nordix Foundation.
+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.
+
+For more information about license please see the [LICENSE](LICENSE.txt) file for details.
diff --git a/test/usecases/healthcheck/src/main.py b/test/usecases/healthcheck/src/main.py
index d3fed3a..fdf6d42 100644
--- a/test/usecases/healthcheck/src/main.py
+++ b/test/usecases/healthcheck/src/main.py
@@ -17,6 +17,10 @@
 
 import argparse
 from datetime import datetime
+from jinja2 import Template
+from flask import Flask, request
+import os.path
+from os import path
 from pygments.util import xrange
 from requests import ConnectionError
 import requests
@@ -32,6 +36,58 @@
 type_to_use = ''
 policy_body = ''
 
+app = Flask(__name__)
+
+# Server info
+HOST_IP = "::"
+HOST_PORT = 9990
+APP_URL = "/stats"
+
+stat_page_template = """
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta http-equiv=\"refresh\" content=\"{{refreshTime}}\">
+        <title>Non-RealTime RIC Health Check</title>
+    </head>
+    <body>
+        <h3>General</h3>
+        <font face=\"monospace\">
+            Policy type ID:...............................{{policyTypeId}}<br>
+            Policy body path:.............................{{policyBodyPath}}<br>
+            Time of last check:...........................{{time}}<br>
+            Duration of check:............................{{duration}}<br>
+            Number of checks:.............................{{noOfChecks}}<br>
+        </font>
+        <h3>Near-RT RICs</h3>
+        <font face=\"monospace\">
+            Number of unavailable Near-RT RICS:...........{{noOfUnavailableRics}}<br>
+            Number of Near-RT RICS not supporting type....{{noOfNotSupportingRics}}<br>
+            Number of Near-RT RICS supporting type:.......{{noOfSupportingRics}}<br>
+        </font>
+        <h3>Policies</h3>
+        <font face=\"monospace\">
+            Number of created policies:...................{{noOfCreatedPolicies}}<br>
+            Number of read policies:......................{{noOfReadPolicies}}<br>
+            Number of updated policies:...................{{noOfUpdatedPolicies}}<br>
+            Number of deleted policies:...................{{noOfDeletedPolicies}}<br>
+        </font>
+    </body>
+</html>
+"""
+type_to_use = "2"
+test_dir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
+policy_body_path = os.path.join(test_dir, 'auto-test','testdata','OSC','pihw_template.json')
+
+duration = 0
+no_of_checks = 0
+no_of_unavailable_rics = 0
+no_of_rics_not_supporting_type = 0
+no_of_rics_supporting_type = 0
+no_of_created_policies = 0
+no_of_read_policies = 0
+no_of_updated_policies = 0
+no_of_deleted_policies = 0
 
 class Ric:
 
@@ -79,6 +135,27 @@
                 self.ric.no_of_deleted_policies += 1
 
 
+class MonitorServer (threading.Thread):
+    def __init__(self):
+        threading.Thread.__init__(self)
+
+    def run(self):
+        verboseprint('Staring monitor server')
+        app.run(port=HOST_PORT, host=HOST_IP)
+
+
+@app.route(APP_URL,
+    methods=['GET'])
+def produceStatsPage():
+    t = Template(stat_page_template)
+    page = t.render(refreshTime=TIME_BETWEEN_CHECKS, policyTypeId=type_to_use, policyBodyPath=policy_body_path,
+    time=datetime.now().strftime("%Y-%m-%d %H:%M:%S"), duration=duration, noOfChecks=no_of_checks,
+    noOfUnavailableRics=no_of_unavailable_rics, noOfNotSupportingRics=no_of_rics_not_supporting_type,
+    noOfSupportingRics=no_of_rics_supporting_type, noOfCreatedPolicies=no_of_created_policies,
+    noOfReadPolicies=no_of_read_policies, noOfUpdatedPolicies=no_of_updated_policies,
+    noOfDeletedPolicies=no_of_deleted_policies)
+    return page,200
+
 def get_rics_from_agent():
     resp = requests.get(BASE_URL + '/rics')
     if not resp.ok:
@@ -146,14 +223,21 @@
     return True
 
 
-def statistics(duration):
+def statistics():
+    global duration
+    global no_of_checks
+    global no_of_unavailable_rics
+    global no_of_rics_not_supporting_type
+    global no_of_rics_supporting_type
+    global no_of_created_policies
+    global no_of_read_policies
+    global no_of_updated_policies
+    global no_of_deleted_policies
+
+    # Clear ric data between checks as it may have changed since last check.
     no_of_unavailable_rics = 0
     no_of_rics_not_supporting_type = 0
     no_of_rics_supporting_type = 0
-    no_of_created_policies = 0
-    no_of_read_policies = 0
-    no_of_updated_policies = 0
-    no_of_deleted_policies = 0
 
     for ric in rics.values():
         if not (ric.state == 'AVAILABLE' or ric.state == 'CONSISTENCY_CHECK'):
@@ -167,17 +251,17 @@
         else:
             no_of_rics_not_supporting_type += 1
 
-    print(f'*********** Statistics {datetime.now().strftime("%Y-%m-%d %H:%M:%S")} ***********')
-    print(f'Duration of check:                  {duration.total_seconds()} seconds')
-    print(f'Number of checks:                   {no_of_checks}')
-    print(f'Number of unavailable rics:         {no_of_unavailable_rics}')
-    print(f'Number of rics not supporting type: {no_of_rics_not_supporting_type}')
-    print(f'Number of rics supporting type:     {no_of_rics_supporting_type}')
-    print(f'Number of created policies:         {no_of_created_policies}')
-    print(f'Number of read policies:            {no_of_read_policies}')
-    print(f'Number of updated policies:         {no_of_updated_policies}')
-    print(f'Number of deleted policies:         {no_of_deleted_policies}')
-    print('******************************************************')
+    print(f'*********** Statistics {datetime.now().strftime("%Y-%m-%d %H:%M:%S")} *******************')
+    print(f'Duration of check:                          {duration.total_seconds()} seconds')
+    print(f'Number of checks:                           {no_of_checks}')
+    print(f'Number of unavailable Near-RT RICS:         {no_of_unavailable_rics}')
+    print(f'Number of Near-RT RICS not supporting type: {no_of_rics_not_supporting_type}')
+    print(f'Number of Near-RT RICS supporting type:     {no_of_rics_supporting_type}')
+    print(f'Number of created policies:                 {no_of_created_policies}')
+    print(f'Number of read policies:                    {no_of_read_policies}')
+    print(f'Number of updated policies:                 {no_of_updated_policies}')
+    print(f'Number of deleted policies:                 {no_of_deleted_policies}')
+    print('**************************************************************')
 
 
 def run_check_threads(rics):
@@ -197,6 +281,9 @@
 def split_rics_equally(chunks):
     # prep with empty dicts
     return_list = [dict() for _ in xrange(chunks)]
+    if len(rics) < RIC_CHUNK_SIZE:
+        return [rics]
+
     idx = 0
     for k,v in rics.items():
         return_list[idx][k] = v
@@ -214,8 +301,8 @@
 
 if __name__ == '__main__':
     parser = argparse.ArgumentParser(prog='PROG')
-    parser.add_argument('policyTypeId', help='The ID of the policy type to use')
-    parser.add_argument('policyBodyPath', help='The path to the JSON body of the policy to create')
+    parser.add_argument('--policyTypeId', help='The ID of the policy type to use')
+    parser.add_argument('--policyBodyPath', help='The path to the JSON body of the policy to create')
     parser.add_argument('-v', '--verbose', action='store_true', help='Turn on verbose printing')
     parser.add_argument('--version', action='version', version='%(prog)s 1.0')
     args = vars(parser.parse_args())
@@ -226,11 +313,19 @@
     else:
         verboseprint = lambda *a, **k: None # do-nothing function
 
-    verboseprint(f'Using policy type {args["policyTypeId"]}')
-    verboseprint(f'Using policy file {args["policyBodyPath"]}')
+    if args["policyTypeId"]:
+        type_to_use = args["policyTypeId"]
 
-    type_to_use = args["policyTypeId"]
-    with open(args["policyBodyPath"]) as json_file:
+    if args["policyBodyPath"]:
+        policy_body_path = args["policyBodyPath"]
+        if not os.path.exists(policy_body_path):
+            print(f'Policy body {policy_body_path} does not exist.')
+            sys.exit(1)
+
+    verboseprint(f'Using policy type {type_to_use}')
+    verboseprint(f'Using policy file {policy_body_path}')
+
+    with open(policy_body_path) as json_file:
         policy_body = json_file.read()
         verboseprint(f'Policy body: {policy_body}')
 
@@ -242,7 +337,9 @@
 
     rics = create_ric_dict(rics_from_agent)
 
-    no_of_checks = 0
+    monitor_server = MonitorServer()
+    monitor_server.start()
+
     while True:
         start_time = datetime.now()
         chunked_rics = split_rics_equally(get_no_of_chunks(RIC_CHUNK_SIZE, rics.__len__()))
@@ -252,7 +349,7 @@
         no_of_checks += 1
         finish_time = datetime.now()
         duration = finish_time - start_time
-        statistics(duration)
+        statistics()
         sleep_time = TIME_BETWEEN_CHECKS - duration.total_seconds()
         verboseprint(f'Sleeping {sleep_time} seconds')
         time.sleep(sleep_time)
diff --git a/test/usecases/healthcheck/src/requirements.txt b/test/usecases/healthcheck/src/requirements.txt
new file mode 100644
index 0000000..7018123
--- /dev/null
+++ b/test/usecases/healthcheck/src/requirements.txt
@@ -0,0 +1,3 @@
+Flask==1.1.1
+jinja2==2.11.2
+pygments==2.2.0