Merge "Refactored the docker compose This enables the one click deployment of all...
authorHenrik Andersson <henrik.b.andersson@est.tech>
Mon, 21 Dec 2020 07:36:14 +0000 (07:36 +0000)
committerGerrit Code Review <gerrit@o-ran-sc.org>
Mon, 21 Dec 2020 07:36:14 +0000 (07:36 +0000)
41 files changed:
.gitignore
docs/api-docs.rst
docs/conf.py
docs/developer-guide.rst
docs/release-notes.rst
enrichment-coordinator-service/api/ecs-api.json [moved from docs/offeredapis/swagger/ecs-api.json with 99% similarity]
enrichment-coordinator-service/api/ecs-api.yaml [new file with mode: 0644]
enrichment-coordinator-service/config/application.yaml
enrichment-coordinator-service/pom.xml
enrichment-coordinator-service/src/main/java/org/oransc/enrichment/clients/AsyncRestClient.java
enrichment-coordinator-service/src/main/java/org/oransc/enrichment/clients/AsyncRestClientFactory.java
enrichment-coordinator-service/src/main/java/org/oransc/enrichment/configuration/ApplicationConfig.java
enrichment-coordinator-service/src/main/java/org/oransc/enrichment/configuration/WebClientConfig.java
enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/consumer/ConsumerCallbacks.java
enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/producer/ProducerCallbacks.java
enrichment-coordinator-service/src/main/java/org/oransc/enrichment/tasks/ProducerSupervision.java
enrichment-coordinator-service/src/test/java/org/oransc/enrichment/ApplicationTest.java
enrichment-coordinator-service/src/test/java/org/oransc/enrichment/clients/AsyncRestClientTest.java
test/auto-test/FTC1.sh
test/auto-test/FTC10.sh
test/auto-test/FTC100.sh
test/auto-test/FTC110.sh
test/auto-test/FTC1100.sh
test/auto-test/FTC150.sh
test/auto-test/FTC1800.sh
test/auto-test/FTC300.sh
test/auto-test/FTC310.sh
test/auto-test/FTC350.sh
test/auto-test/FTC800.sh
test/auto-test/FTC810.sh
test/auto-test/FTC850.sh
test/auto-test/FTC900.sh
test/auto-test/PM_DEMO.sh
test/auto-test/PM_EI_DEMO.sh
test/auto-test/README.md
test/common/README.md
test/common/test_env-onap-guilin.sh
test/common/test_env-onap-honolulu.sh [moved from test/common/test_env-onap-master.sh with 67% similarity]
test/common/test_env-oran-cherry.sh
test/common/test_env-oran-dawn.sh [new file with mode: 0755]
test/common/testcase_common.sh

index 26c6731..02f4f98 100644 (file)
@@ -3,6 +3,8 @@
 .tox
 docs/_build/
 .DS_STORE
+.swagger*
+docs/offeredapis/swagger/README.md
 
 # Eclipse
 .checkstyle
index ed0cc79..9e438f6 100644 (file)
@@ -18,15 +18,15 @@ API-Docs
 This is the API-docs of Non-RT RIC.
 
 The Non-RT RIC consists of three parts, described in the sections below:
- * The Policy Agent
+ * The A1 Policy Management Service
  * The Enrichment Coordinator Service
  * The rAPP Catalogue
 
 
-Policy Agent
-============
+A1 Policy Management Service
+============================
 
-For information about the The Policy Agent that is implemented in ONAP, see `readthedocs`_ and `wiki`_.
+For information about the A1 Policy Management Service that is implemented in ONAP, see `readthedocs`_ and `wiki`_.
 
 .. _readthedocs: https://docs.onap.org/projects/onap-ccsdk-oran/en/latest/index.html
 .. _wiki: https://wiki.onap.org/pages/viewpage.action?pageId=84644984
@@ -37,10 +37,10 @@ Enrichment Coordinator Service
 See `ECS API <./ecs-api.html>`_ for how to use the API.
 
 .. csv-table::
-   :header: "API name", "|swagger-icon|"
-   :widths: 10,5
+   :header: "API name", "|swagger-icon|", "|yaml-icon|"
+   :widths: 10,5,5
 
-   "ECS API", ":download:`link <./offeredapis/swagger/ecs-api.json>`"
+   "ECS API", ":download:`link <../enrichment-coordinator-service/api/ecs-api.json>`", ":download:`link <../enrichment-coordinator-service/api/ecs-api.yaml>`"
 
 
 rAPP Catalogue
index 09eeb37..85721c6 100644 (file)
@@ -24,7 +24,7 @@ redoc = [
             {
                 'name': 'ECS API',
                 'page': 'ecs-api',
-                'spec': './offeredapis/swagger/ecs-api.json',
+                'spec': '../enrichment-coordinator-service/api/ecs-api.json',
                 'embed': True,
             }
         ]
index 576cf2d..5358fe3 100644 (file)
@@ -7,8 +7,8 @@ Developer Guide
 
 This document provides a quickstart for developers of the Non-RT RIC.
 
-Policy Agent
-------------
+A1 Policy Management Service
+----------------------------
 
 The Policy Management is implemented in ONAP. For documentation see `readthedocs`_ and `wiki`_.
 
index 1970ffa..b09dcfb 100644 (file)
@@ -14,51 +14,54 @@ This document provides the release notes for the release of the different parts
    :local:
 
 
-Version history Policy Agent
-============================
-
-+------------+----------+------------------+-------------------+
-| **Date**   | **Ver.** | **Author**       | **Comment**       |
-|            |          |                  |                   |
-+------------+----------+------------------+-------------------+
-| 2020-02-03 | 1.0.0    | Henrik Andersson | First version     |
-|            |          |                  | Amber Maintenance |
-|            |          |                  | Release           |
-+------------+----------+------------------+-------------------+
-| 2020-06-18 | 2.0.0    | Henrik Andersson | Bronze Release    |
-|            |          |                  |                   |
-+------------+----------+------------------+-------------------+
-| 2020-07-29 | 2.0.1    | Henrik Andersson | Bronze Maintenance|
-|            |          |                  | Release           |
-|            |          |                  |                   |
-+------------+----------+------------------+-------------------+
+Version history A1 Policy Management Service
+============================================
+
++------------+----------+------------------+--------------------+
+| **Date**   | **Ver.** | **Author**       | **Comment**        |
+|            |          |                  |                    |
++------------+----------+------------------+--------------------+
+| 2020-02-03 | 1.0.0    | Henrik Andersson | First version      |
+|            |          |                  | Amber Maintenance  |
+|            |          |                  | Release            |
++------------+----------+------------------+--------------------+
+| 2020-06-18 | 2.0.0    | Henrik Andersson | Bronze Release     |
+|            |          |                  |                    |
++------------+----------+------------------+--------------------+
+| 2020-07-29 | 2.0.1    | Henrik Andersson | Bronze Maintenance |
+|            |          |                  | Release            |
+|            |          |                  |                    |
++------------+----------+------------------+--------------------+
+| 2020-12-03 | 2.1.0    | Henrik Andersson | Cherry Release     |
+|            |          |                  |                    |
++------------+----------+------------------+--------------------+
 
 
 Summary
 -------
-Improved stability.
+Introduction of Enrichment Service Coordinator and rAPP Catalogue.
 
 
 Version history SDNC A1 Controller
 ==================================
 
-+------------+----------+------------------+-------------------+
-| **Date**   | **Ver.** | **Author**       | **Comment**       |
-|            |          |                  |                   |
-+------------+----------+------------------+-------------------+
-| 2019-11-12 | 1.7.3    | Maxime Bonneau   |                   |
-|            |          |                  |                   |
-+------------+----------+------------------+-------------------+
-| 2020-02-04 | 1.7.4    | Henrik Andersson | Amber Maintenance |
-|            |          |                  | Release           |
-+------------+----------+------------------+-------------------+
-| 2020-06-18 | 2.0.0    | Henrik Andersson | Bronze Release    |
-|            |          |                  |                   |
-+------------+----------+------------------+-------------------+
-| 2020-07-29 | 2.0.1    | Henrik Andersson | Bronze Maintenance|
-|            |          |                  | Release           |
-|            |          |                  |                   |
-+------------+----------+------------------+-------------------+
++------------+----------+------------------+--------------------+
+| **Date**   | **Ver.** | **Author**       | **Comment**        |
+|            |          |                  |                    |
++------------+----------+------------------+--------------------+
+| 2019-11-12 | 1.7.3    | Maxime Bonneau   |                    |
+|            |          |                  |                    |
++------------+----------+------------------+--------------------+
+| 2020-02-04 | 1.7.4    | Henrik Andersson | Amber Maintenance  |
+|            |          |                  | Release            |
++------------+----------+------------------+--------------------+
+| 2020-06-18 | 2.0.0    | Henrik Andersson | Bronze Release     |
+|            |          |                  |                    |
++------------+----------+------------------+--------------------+
+| 2020-07-29 | 2.0.1    | Henrik Andersson | Bronze Maintenance |
+|            |          |                  | Release            |
+|            |          |                  |                    |
++------------+----------+------------------+--------------------+
 
 
 Release Data
@@ -139,3 +142,23 @@ Bronze Maintenance
 | **Purpose of the delivery** | Introduce configuration of certificates           |
 |                             |                                                   |
 +-----------------------------+---------------------------------------------------+
+
+Cherry
+------
++-----------------------------+---------------------------------------------------+
+| **Project**                 | Non-RT RIC                                        |
+|                             |                                                   |
++-----------------------------+---------------------------------------------------+
+| **Repo/commit-ID**          | nonrtric/90ce16238dd6970153e1c0fbddb15e32c68c504f |
+|                             |                                                   |
++-----------------------------+---------------------------------------------------+
+| **Release designation**     | Cherry                                            |
+|                             |                                                   |
++-----------------------------+---------------------------------------------------+
+| **Release date**            | 2020-12-03                                        |
+|                             |                                                   |
++-----------------------------+---------------------------------------------------+
+| **Purpose of the delivery** | Introduction of Enrichment Service Coordinator    |
+|                             | and rAPP Catalogue                                |
+|                             |                                                   |
++-----------------------------+---------------------------------------------------+
similarity index 99%
rename from docs/offeredapis/swagger/ecs-api.json
rename to enrichment-coordinator-service/api/ecs-api.json
index 3684c0e..79ab5d3 100644 (file)
             "tags": ["A1-EI (enrichment information)"]
         }}
     },
-    "host": "localhost:34053",
     "definitions": {
         "producer_ei_job_request": {
             "description": "The body of the EI producer callbacks for EI job creation and deletion",
             "description": "Status Controller"
         }
     ]
-}
+}
\ No newline at end of file
diff --git a/enrichment-coordinator-service/api/ecs-api.yaml b/enrichment-coordinator-service/api/ecs-api.yaml
new file mode 100644 (file)
index 0000000..ac49e5a
--- /dev/null
@@ -0,0 +1,827 @@
+openapi: 3.0.1
+info:
+  title: Enrichment Data service
+  description: This page lists all the rest apis for the service.
+  version: "1.0"
+servers:
+- url: /
+tags:
+- name: A1-EI (enrichment information)
+  description: Consumer Controller
+- name: Consumer Callbacks
+  description: Consumer Simulator Controller
+- name: Enrichment Data Producer API
+  description: Producer Controller
+- name: Producer Callbacks
+  description: Producer Simulator Controller
+- name: Service status
+  description: Status Controller
+paths:
+  /producer_simulator/ei_job:
+    post:
+      tags:
+      - Producer Callbacks
+      summary: Callback for EI job creation
+      operationId: jobCreatedCallbackUsingPOST
+      requestBody:
+        description: request
+        content:
+          application/json:
+            schema:
+              $ref: '#/components/schemas/producer_ei_job_request'
+        required: true
+      responses:
+        200:
+          description: OK
+          content: {}
+        201:
+          description: Created
+          content: {}
+        401:
+          description: Unauthorized
+          content: {}
+        403:
+          description: Forbidden
+          content: {}
+        404:
+          description: Not Found
+          content: {}
+      deprecated: false
+  /A1-EI/v1/eitypes/{eiTypeId}:
+    get:
+      tags:
+      - A1-EI (enrichment information)
+      summary: Individual EI type
+      operationId: getEiTypeUsingGET
+      parameters:
+      - name: eiTypeId
+        in: path
+        description: eiTypeId
+        required: true
+        schema:
+          type: string
+      responses:
+        200:
+          description: EI type
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/EiTypeObject'
+        401:
+          description: Unauthorized
+          content: {}
+        403:
+          description: Forbidden
+          content: {}
+        404:
+          description: Enrichment Information type is not found
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ProblemDetails'
+      deprecated: false
+  /consumer_simulator/eijobs/{eiJobId}/status:
+    post:
+      tags:
+      - Consumer Callbacks
+      summary: Callback for EI job status
+      operationId: jobStatusCallbackUsingPOST
+      parameters:
+      - name: eiJobId
+        in: path
+        description: eiJobId
+        required: true
+        schema:
+          type: string
+      requestBody:
+        description: status
+        content:
+          application/json:
+            schema:
+              $ref: '#/components/schemas/EiJobStatusObject'
+        required: true
+      responses:
+        200:
+          description: OK
+          content: {}
+        201:
+          description: Created
+          content: {}
+        401:
+          description: Unauthorized
+          content: {}
+        403:
+          description: Forbidden
+          content: {}
+        404:
+          description: Not Found
+          content: {}
+      deprecated: false
+  /ei-producer/v1/eitypes:
+    get:
+      tags:
+      - Enrichment Data Producer API
+      summary: EI type identifiers
+      operationId: getEiTypeIdentifiersUsingGET_1
+      responses:
+        200:
+          description: EI type identifiers
+          content:
+            application/json:
+              schema:
+                type: array
+                items:
+                  type: string
+        401:
+          description: Unauthorized
+          content: {}
+        403:
+          description: Forbidden
+          content: {}
+        404:
+          description: Not Found
+          content: {}
+      deprecated: false
+  /A1-EI/v1/eitypes:
+    get:
+      tags:
+      - A1-EI (enrichment information)
+      summary: EI type identifiers
+      operationId: getEiTypeIdentifiersUsingGET
+      responses:
+        200:
+          description: EI type identifiers
+          content:
+            application/json:
+              schema:
+                type: array
+                items:
+                  type: string
+        401:
+          description: Unauthorized
+          content: {}
+        403:
+          description: Forbidden
+          content: {}
+        404:
+          description: Not Found
+          content: {}
+      deprecated: false
+  /ei-producer/v1/eiproducers/{eiProducerId}/status:
+    get:
+      tags:
+      - Enrichment Data Producer API
+      summary: EI producer status
+      operationId: getEiProducerStatusUsingGET
+      parameters:
+      - name: eiProducerId
+        in: path
+        description: eiProducerId
+        required: true
+        schema:
+          type: string
+      responses:
+        200:
+          description: EI jobs
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/producer_status'
+        401:
+          description: Unauthorized
+          content: {}
+        403:
+          description: Forbidden
+          content: {}
+        404:
+          description: Enrichment Information producer is not found
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ProblemDetails'
+      deprecated: false
+  /producer_simulator/ei_job/{eiJobId}:
+    delete:
+      tags:
+      - Producer Callbacks
+      summary: Callback for EI job deletion
+      operationId: jobDeletedCallbackUsingDELETE
+      parameters:
+      - name: eiJobId
+        in: path
+        description: eiJobId
+        required: true
+        schema:
+          type: string
+      responses:
+        200:
+          description: OK
+          content: {}
+        204:
+          description: No Content
+          content: {}
+        401:
+          description: Unauthorized
+          content: {}
+        403:
+          description: Forbidden
+          content: {}
+      deprecated: false
+  /ei-producer/v1/eiproducers:
+    get:
+      tags:
+      - Enrichment Data Producer API
+      summary: EI producer identifiers
+      operationId: getEiProducerIdentifiersUsingGET
+      responses:
+        200:
+          description: EI producer identifiers
+          content:
+            application/json:
+              schema:
+                type: array
+                items:
+                  type: string
+        401:
+          description: Unauthorized
+          content: {}
+        403:
+          description: Forbidden
+          content: {}
+        404:
+          description: Not Found
+          content: {}
+      deprecated: false
+  /ei-producer/v1/eitypes/{eiTypeId}:
+    get:
+      tags:
+      - Enrichment Data Producer API
+      summary: Individual EI type
+      operationId: getEiTypeUsingGET_1
+      parameters:
+      - name: eiTypeId
+        in: path
+        description: eiTypeId
+        required: true
+        schema:
+          type: string
+      responses:
+        200:
+          description: EI type
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/producer_ei_type_info'
+        401:
+          description: Unauthorized
+          content: {}
+        403:
+          description: Forbidden
+          content: {}
+        404:
+          description: Enrichment Information type is not found
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ProblemDetails'
+      deprecated: false
+  /status:
+    get:
+      tags:
+      - Service status
+      summary: Returns status and statistics of this service
+      operationId: getStatusUsingGET
+      responses:
+        200:
+          description: Service is living
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/status_info'
+        401:
+          description: Unauthorized
+          content: {}
+        403:
+          description: Forbidden
+          content: {}
+        404:
+          description: Not Found
+          content: {}
+      deprecated: false
+  /A1-EI/v1/eijobs/{eiJobId}:
+    get:
+      tags:
+      - A1-EI (enrichment information)
+      summary: Individual EI job
+      operationId: getIndividualEiJobUsingGET
+      parameters:
+      - name: eiJobId
+        in: path
+        description: eiJobId
+        required: true
+        schema:
+          type: string
+      responses:
+        200:
+          description: EI job
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/EiJobObject'
+        401:
+          description: Unauthorized
+          content: {}
+        403:
+          description: Forbidden
+          content: {}
+        404:
+          description: Enrichment Information job is not found
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ProblemDetails'
+      deprecated: false
+    put:
+      tags:
+      - A1-EI (enrichment information)
+      summary: Individual EI job
+      operationId: putIndividualEiJobUsingPUT
+      parameters:
+      - name: eiJobId
+        in: path
+        description: eiJobId
+        required: true
+        schema:
+          type: string
+      requestBody:
+        description: eiJobObject
+        content:
+          application/json:
+            schema:
+              $ref: '#/components/schemas/EiJobObject'
+        required: true
+      responses:
+        200:
+          description: Job updated
+          content: {}
+        201:
+          description: Job created
+          content: {}
+        401:
+          description: Unauthorized
+          content: {}
+        403:
+          description: Forbidden
+          content: {}
+        404:
+          description: Enrichment Information type is not found
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ProblemDetails'
+      deprecated: false
+    delete:
+      tags:
+      - A1-EI (enrichment information)
+      summary: Individual EI job
+      operationId: deleteIndividualEiJobUsingDELETE
+      parameters:
+      - name: eiJobId
+        in: path
+        description: eiJobId
+        required: true
+        schema:
+          type: string
+      responses:
+        200:
+          description: Not used
+          content: {}
+        204:
+          description: Job deleted
+          content: {}
+        401:
+          description: Unauthorized
+          content: {}
+        403:
+          description: Forbidden
+          content: {}
+        404:
+          description: Enrichment Information job is not found
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ProblemDetails'
+      deprecated: false
+  /ei-producer/v1/eiproducers/{eiProducerId}:
+    get:
+      tags:
+      - Enrichment Data Producer API
+      summary: Individual EI producer
+      operationId: getEiProducerUsingGET
+      parameters:
+      - name: eiProducerId
+        in: path
+        description: eiProducerId
+        required: true
+        schema:
+          type: string
+      responses:
+        200:
+          description: EI jobs
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/producer_registration_info'
+        401:
+          description: Unauthorized
+          content: {}
+        403:
+          description: Forbidden
+          content: {}
+        404:
+          description: Enrichment Information producer is not found
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ProblemDetails'
+      deprecated: false
+    put:
+      tags:
+      - Enrichment Data Producer API
+      summary: Individual EI producer
+      operationId: putEiProducerUsingPUT
+      parameters:
+      - name: eiProducerId
+        in: path
+        description: eiProducerId
+        required: true
+        schema:
+          type: string
+      requestBody:
+        description: registrationInfo
+        content:
+          application/json:
+            schema:
+              $ref: '#/components/schemas/producer_registration_info'
+        required: true
+      responses:
+        200:
+          description: Producer updated
+          content: {}
+        201:
+          description: Producer created
+          content: {}
+        401:
+          description: Unauthorized
+          content: {}
+        403:
+          description: Forbidden
+          content: {}
+        404:
+          description: Not Found
+          content: {}
+      deprecated: false
+    delete:
+      tags:
+      - Enrichment Data Producer API
+      summary: Individual EI producer
+      operationId: deleteEiProducerUsingDELETE
+      parameters:
+      - name: eiProducerId
+        in: path
+        description: eiProducerId
+        required: true
+        schema:
+          type: string
+      responses:
+        200:
+          description: Not used
+          content: {}
+        204:
+          description: Producer deleted
+          content: {}
+        401:
+          description: Unauthorized
+          content: {}
+        403:
+          description: Forbidden
+          content: {}
+        404:
+          description: Producer is not found
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ProblemDetails'
+      deprecated: false
+  /producer_simulator/health_check:
+    get:
+      tags:
+      - Producer Callbacks
+      summary: Producer supervision
+      operationId: producerSupervisionUsingGET
+      responses:
+        200:
+          description: OK
+          content:
+            application/json:
+              schema:
+                type: string
+        401:
+          description: Unauthorized
+          content: {}
+        403:
+          description: Forbidden
+          content: {}
+        404:
+          description: Not Found
+          content: {}
+      deprecated: false
+  /ei-producer/v1/eiproducers/{eiProducerId}/eijobs:
+    get:
+      tags:
+      - Enrichment Data Producer API
+      summary: EI job definitions
+      description: EI job definitions for one EI producer
+      operationId: getEiProducerJobsUsingGET
+      parameters:
+      - name: eiProducerId
+        in: path
+        description: eiProducerId
+        required: true
+        schema:
+          type: string
+      responses:
+        200:
+          description: EI jobs
+          content:
+            application/json:
+              schema:
+                type: array
+                items:
+                  $ref: '#/components/schemas/producer_ei_job_request'
+        401:
+          description: Unauthorized
+          content: {}
+        403:
+          description: Forbidden
+          content: {}
+        404:
+          description: Enrichment Information producer is not found
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ProblemDetails'
+      deprecated: false
+  /A1-EI/v1/eijobs:
+    get:
+      tags:
+      - A1-EI (enrichment information)
+      summary: EI job identifiers
+      description: query for EI job identifiers
+      operationId: getEiJobIdsUsingGET
+      parameters:
+      - name: eiTypeId
+        in: query
+        description: selects EI jobs of matching EI type
+        allowEmptyValue: false
+        schema:
+          type: string
+      - name: owner
+        in: query
+        description: selects EI jobs for one EI job owner
+        allowEmptyValue: false
+        schema:
+          type: string
+      responses:
+        200:
+          description: EI job identifiers
+          content:
+            application/json:
+              schema:
+                type: array
+                items:
+                  type: string
+        401:
+          description: Unauthorized
+          content: {}
+        403:
+          description: Forbidden
+          content: {}
+        404:
+          description: Enrichment Information type is not found
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ProblemDetails'
+      deprecated: false
+  /A1-EI/v1/eijobs/{eiJobId}/status:
+    get:
+      tags:
+      - A1-EI (enrichment information)
+      summary: EI job status
+      operationId: getEiJobStatusUsingGET
+      parameters:
+      - name: eiJobId
+        in: path
+        description: eiJobId
+        required: true
+        schema:
+          type: string
+      responses:
+        200:
+          description: EI job status
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/EiJobStatusObject'
+        401:
+          description: Unauthorized
+          content: {}
+        403:
+          description: Forbidden
+          content: {}
+        404:
+          description: Enrichment Information job is not found
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ProblemDetails'
+      deprecated: false
+components:
+  schemas:
+    producer_ei_job_request:
+      title: producer_ei_job_request
+      required:
+      - ei_job_identity
+      type: object
+      properties:
+        owner:
+          type: string
+          description: The owner of the job
+        ei_job_identity:
+          type: string
+          description: Idenitity of the EI job
+        ei_job_data:
+          type: object
+          properties: {}
+          description: Json for the job data
+        target_uri:
+          type: string
+          description: URI for the target of the EI
+        ei_type_identity:
+          type: string
+          description: Type idenitity for the job
+      description: The body of the EI producer callbacks for EI job creation and deletion
+    EiTypeObject:
+      title: EiTypeObject
+      type: object
+      description: Information for an EI type
+    producer_ei_type_registration_info:
+      title: producer_ei_type_registration_info
+      required:
+      - ei_type_identity
+      type: object
+      properties:
+        ei_type_identity:
+          type: string
+          description: EI type identity
+        ei_job_data_schema:
+          type: object
+          properties: {}
+          description: Json schema for the job data
+      description: Information for an EI type
+    status_info:
+      title: status_info
+      type: object
+      properties:
+        no_of_producers:
+          type: integer
+          description: Number of EI producers
+          format: int32
+        no_of_jobs:
+          type: integer
+          description: Number of EI jobs
+          format: int32
+        no_of_types:
+          type: integer
+          description: Number of EI types
+          format: int32
+        status:
+          type: string
+          description: status text
+    Mono«ResponseEntity«object»»:
+      title: Mono«ResponseEntity«object»»
+      type: object
+    producer_ei_type_info:
+      title: producer_ei_type_info
+      type: object
+      properties:
+        ei_producer_ids:
+          type: array
+          description: Registered producers
+          items:
+            type: string
+        ei_job_data_schema:
+          type: object
+          properties: {}
+          description: Json schema for the job data
+      description: Information for an EI type
+    producer_registration_info:
+      title: producer_registration_info
+      required:
+      - ei_job_callback_url
+      - ei_producer_supervision_callback_url
+      - supported_ei_types
+      type: object
+      properties:
+        supported_ei_types:
+          type: array
+          description: Supported EI types
+          items:
+            $ref: '#/components/schemas/producer_ei_type_registration_info'
+        ei_producer_supervision_callback_url:
+          type: string
+          description: callback for producer supervision
+        ei_job_callback_url:
+          type: string
+          description: callback for EI job
+      description: Information for an EI producer
+    producer_status:
+      title: producer_status
+      required:
+      - operational_state
+      type: object
+      properties:
+        operational_state:
+          type: string
+          description: |-
+            Operational state, values:
+            ENABLED: TBD
+            DISABLED: TBD.
+          enum:
+          - ENABLED
+          - DISABLED
+      description: Status for an EI Producer
+    ProblemDetails:
+      title: ProblemDetails
+      type: object
+      properties:
+        detail:
+          type: string
+          description: A human-readable explanation specific to this occurrence of
+            the problem.
+          example: EI job type not found
+        status:
+          type: integer
+          description: The HTTP status code generated by the origin server for this
+            occurrence of the problem.
+          format: int32
+          example: 404
+      description: A problem detail to carry details in a HTTP response according
+        to RFC 7807
+    Void:
+      title: Void
+      type: object
+      description: Void/empty
+    EiJobStatusObject:
+      title: EiJobStatusObject
+      required:
+      - eiJobStatus
+      type: object
+      properties:
+        eiJobStatus:
+          type: string
+          description: |-
+            values:
+            ENABLED: the A1-EI producer is able to deliver EI result for the EI job
+            DISABLED: the A1-EI producer is unable to deliver EI result for the EI job
+          enum:
+          - ENABLED
+          - DISABLED
+      description: Status for an EI job
+    EiJobObject:
+      title: EiJobObject
+      required:
+      - eiTypeId
+      - jobDefinition
+      - jobOwner
+      - jobResultUri
+      type: object
+      properties:
+        eiTypeId:
+          type: string
+          description: EI type Idenitifier of the EI job
+        jobResultUri:
+          type: string
+          description: The target URI of the EI data
+        jobOwner:
+          type: string
+          description: Identity of the owner of the job
+        jobStatusNotificationUri:
+          type: string
+          description: The target of EI job status notifications
+        jobDefinition:
+          type: object
+          properties: {}
+          description: EI type specific job data
+      description: Information for an Enrichment Information Job
index 850dc67..5900d63 100644 (file)
@@ -9,9 +9,11 @@ management:
   endpoints:
     web:
       exposure:
+        # Enabling of springboot actuator features. See springboot documentation.
         include: "loggers,logfile,health,info,metrics,threaddump,heapdump"
 
 logging:
+  # Configuration of logging
   level:
     ROOT: ERROR
     org.springframework: ERROR
@@ -21,6 +23,8 @@ logging:
   file:
     name: /var/log/enrichment-coordinator-service/application.log
 server:
+   # Configuration of the HTTP/REST server. The parameters are defined and handeled by the springboot framework.
+   # See springboot documentation.
    port : 8434
    http-port: 8083
    ssl:
@@ -30,10 +34,16 @@ server:
       key-password: policy_agent
       key-alias: policy_agent
 app:
-  filepath: /opt/app/enrichment-coordinator-service/data/application_configuration.json
   webclient:
+    # Configuration of the trust store used for the HTTP client (outgoing requests)
+    # The file location and the password for the truststore is only relevant if trust-store-used == true
+    # Note that the same keystore as for the server is used.
     trust-store-used: false
     trust-store-password: policy_agent
     trust-store: /opt/app/enrichment-coordinator-service/etc/cert/truststore.jks
+    # Configuration of usage of HTTP Proxy for the southbound accesses.
+    # The HTTP proxy (if configured) will only be used for accessing NearRT RIC:s
+    http.proxy-host:
+    http.proxy-port: 0
   vardata-directory: /var/enrichment-coordinator-service
 
index d34c9a6..2a65315 100644 (file)
@@ -56,6 +56,7 @@
         <maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
         <formatter-maven-plugin.version>2.12.2</formatter-maven-plugin.version>
         <spotless-maven-plugin.version>1.24.3</spotless-maven-plugin.version>
+        <swagger-codegen-maven-plugin.version>3.0.11</swagger-codegen-maven-plugin.version>
         <docker-maven-plugin>0.30.0</docker-maven-plugin>
         <version.dmaap>1.1.11</version.dmaap>
         <javax.ws.rs-api.version>2.1.1</javax.ws.rs-api.version>
                     </execution>
                 </executions>
             </plugin>
+            <plugin>
+                <groupId>io.swagger.codegen.v3</groupId>
+                <artifactId>swagger-codegen-maven-plugin</artifactId>
+                <version>${swagger-codegen-maven-plugin.version}</version>
+                <executions>
+                    <execution>
+                        <phase>test</phase>
+                        <goals>
+                            <goal>generate</goal>
+                        </goals>
+                        <configuration>
+                            <inputSpec>${project.basedir}/api/ecs-api.json</inputSpec>
+                            <language>openapi-yaml</language>
+                            <output>${project.basedir}/api</output>
+                            <configOptions>
+                                <outputFile>ecs-api.yaml</outputFile>
+                            </configOptions>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
             <plugin>
                 <groupId>io.fabric8</groupId>
                 <artifactId>docker-maven-plugin</artifactId>
index 76da624..f0f6c4b 100644 (file)
@@ -28,6 +28,7 @@ import io.netty.handler.timeout.WriteTimeoutHandler;
 import java.lang.invoke.MethodHandles;
 import java.util.concurrent.atomic.AtomicInteger;
 
+import org.oransc.enrichment.configuration.WebClientConfig.HttpProxyConfig;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.http.MediaType;
@@ -42,6 +43,7 @@ import org.springframework.web.reactive.function.client.WebClientResponseExcepti
 import reactor.core.publisher.Mono;
 import reactor.netty.http.client.HttpClient;
 import reactor.netty.resources.ConnectionProvider;
+import reactor.netty.tcp.ProxyProvider.Proxy;
 import reactor.netty.tcp.TcpClient;
 
 /**
@@ -54,19 +56,12 @@ public class AsyncRestClient {
     private final String baseUrl;
     private static final AtomicInteger sequenceNumber = new AtomicInteger();
     private final SslContext sslContext;
+    private final HttpProxyConfig httpProxyConfig;
 
-    /**
-     * Note that only http (not https) will work when this constructor is used.
-     * 
-     * @param baseUrl
-     */
-    public AsyncRestClient(String baseUrl) {
-        this(baseUrl, null);
-    }
-
-    public AsyncRestClient(String baseUrl, SslContext sslContext) {
+    public AsyncRestClient(String baseUrl, @Nullable SslContext sslContext, @Nullable HttpProxyConfig httpProxyConfig) {
         this.baseUrl = baseUrl;
         this.sslContext = sslContext;
+        this.httpProxyConfig = httpProxyConfig;
     }
 
     public Mono<ResponseEntity<String>> postForEntity(String uri, @Nullable String body) {
@@ -188,7 +183,7 @@ public class AsyncRestClient {
             logger.debug("{} HTTP error status = '{}', body '{}'", traceTag, exception.getStatusCode(),
                 exception.getResponseBodyAsString());
         } else {
-            logger.debug("{} HTTP error", traceTag, t);
+            logger.debug("{} HTTP error {}", traceTag, t.getMessage());
         }
     }
 
@@ -200,27 +195,31 @@ public class AsyncRestClient {
         }
     }
 
-    private TcpClient createTcpClientSecure(SslContext sslContext) {
-        return TcpClient.create(ConnectionProvider.newConnection()) //
-            .option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 10_000) //
-            .secure(c -> c.sslContext(sslContext)) //
-            .doOnConnected(connection -> {
-                connection.addHandlerLast(new ReadTimeoutHandler(30));
-                connection.addHandlerLast(new WriteTimeoutHandler(30));
-            });
+    private boolean isHttpProxyConfigured() {
+        return httpProxyConfig != null && httpProxyConfig.httpProxyPort() > 0
+            && !httpProxyConfig.httpProxyHost().isEmpty();
     }
 
-    private TcpClient createTcpClientInsecure() {
-        return TcpClient.create(ConnectionProvider.newConnection()) //
+    private TcpClient createTcpClient() {
+        TcpClient client = TcpClient.create(ConnectionProvider.newConnection()) //
             .option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 10_000) //
             .doOnConnected(connection -> {
                 connection.addHandlerLast(new ReadTimeoutHandler(30));
                 connection.addHandlerLast(new WriteTimeoutHandler(30));
             });
+        if (this.sslContext != null) {
+            client = client.secure(c -> c.sslContext(sslContext));
+        }
+        if (isHttpProxyConfigured()) {
+            client = client.proxy(proxy -> proxy.type(Proxy.HTTP).host(httpProxyConfig.httpProxyHost())
+                .port(httpProxyConfig.httpProxyPort()));
+        }
+        return client;
     }
 
     private WebClient createWebClient(String baseUrl, TcpClient tcpClient) {
         HttpClient httpClient = HttpClient.from(tcpClient);
+
         ReactorClientHttpConnector connector = new ReactorClientHttpConnector(httpClient);
         ExchangeStrategies exchangeStrategies = ExchangeStrategies.builder() //
             .codecs(configurer -> configurer.defaultCodecs().maxInMemorySize(-1)) //
@@ -235,13 +234,8 @@ public class AsyncRestClient {
     private Mono<WebClient> getWebClient() {
         if (this.webClient == null) {
             try {
-                if (this.sslContext != null) {
-                    TcpClient tcpClient = createTcpClientSecure(sslContext);
-                    this.webClient = createWebClient(this.baseUrl, tcpClient);
-                } else {
-                    TcpClient tcpClient = createTcpClientInsecure();
-                    this.webClient = createWebClient(this.baseUrl, tcpClient);
-                }
+                TcpClient tcpClient = createTcpClient();
+                this.webClient = createWebClient(this.baseUrl, tcpClient);
             } catch (Exception e) {
                 logger.error("Could not create WebClient {}", e.getMessage());
                 return Mono.error(e);
index 07f23e9..4865df5 100644 (file)
@@ -42,6 +42,7 @@ import java.util.stream.Collectors;
 import javax.net.ssl.KeyManagerFactory;
 
 import org.oransc.enrichment.configuration.WebClientConfig;
+import org.oransc.enrichment.configuration.WebClientConfig.HttpProxyConfig;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.util.ResourceUtils;
@@ -53,25 +54,38 @@ public class AsyncRestClientFactory {
     private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
     private final SslContextFactory sslContextFactory;
+    private final HttpProxyConfig httpProxyConfig;
 
     public AsyncRestClientFactory(WebClientConfig clientConfig) {
         if (clientConfig != null) {
             this.sslContextFactory = new CachingSslContextFactory(clientConfig);
+            this.httpProxyConfig = clientConfig.httpProxyConfig();
         } else {
+            logger.warn("No configuration for web client defined, HTTPS will not work");
             this.sslContextFactory = null;
+            this.httpProxyConfig = null;
         }
     }
 
-    public AsyncRestClient createRestClient(String baseUrl) {
+    public AsyncRestClient createRestClientNoHttpProxy(String baseUrl) {
+        return createRestClient(baseUrl, false);
+    }
+
+    public AsyncRestClient createRestClientUseHttpProxy(String baseUrl) {
+        return createRestClient(baseUrl, true);
+    }
+
+    private AsyncRestClient createRestClient(String baseUrl, boolean useHttpProxy) {
         if (this.sslContextFactory != null) {
             try {
-                return new AsyncRestClient(baseUrl, this.sslContextFactory.createSslContext());
+                return new AsyncRestClient(baseUrl, this.sslContextFactory.createSslContext(),
+                    useHttpProxy ? httpProxyConfig : null);
             } catch (Exception e) {
                 String exceptionString = e.toString();
                 logger.error("Could not init SSL context, reason: {}", exceptionString);
             }
         }
-        return new AsyncRestClient(baseUrl);
+        return new AsyncRestClient(baseUrl, null, httpProxyConfig);
     }
 
     private class SslContextFactory {
@@ -175,5 +189,4 @@ public class AsyncRestClientFactory {
 
         }
     }
-
 }
index 8937464..fce9e22 100644 (file)
 
 package org.oransc.enrichment.configuration;
 
-import javax.validation.constraints.NotEmpty;
-
 import lombok.Getter;
 
+import org.oransc.enrichment.configuration.WebClientConfig.HttpProxyConfig;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
@@ -31,10 +30,6 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
 @EnableConfigurationProperties
 @ConfigurationProperties()
 public class ApplicationConfig {
-    @NotEmpty
-    @Getter
-    @Value("${app.filepath}")
-    private String localConfigurationFilePath;
 
     @Getter
     @Value("${app.vardata-directory}")
@@ -61,7 +56,17 @@ public class ApplicationConfig {
     @Value("${app.webclient.trust-store}")
     private String sslTrustStore = "";
 
+    @Value("${app.webclient.http.proxy-host:\"\"}")
+    private String httpProxyHost = "";
+
+    @Value("${app.webclient.http.proxy-port:0}")
+    private int httpProxyPort = 0;
+
     public WebClientConfig getWebClientConfig() {
+        HttpProxyConfig httpProxyConfig = ImmutableHttpProxyConfig.builder() //
+            .httpProxyHost(this.httpProxyHost) //
+            .httpProxyPort(this.httpProxyPort) //
+            .build();
         return ImmutableWebClientConfig.builder() //
             .keyStoreType(this.sslKeyStoreType) //
             .keyStorePassword(this.sslKeyStorePassword) //
@@ -70,6 +75,7 @@ public class ApplicationConfig {
             .isTrustStoreUsed(this.sslTrustStoreUsed) //
             .trustStore(this.sslTrustStore) //
             .trustStorePassword(this.sslTrustStorePassword) //
+            .httpProxyConfig(httpProxyConfig) //
             .build();
     }
 
index 61d0f5a..0b68248 100644 (file)
@@ -42,4 +42,13 @@ public interface WebClientConfig {
 
     public String trustStore();
 
+    @Value.Immutable
+    public interface HttpProxyConfig {
+        public String httpProxyHost();
+
+        public int httpProxyPort();
+    }
+
+    public HttpProxyConfig httpProxyConfig();
+
 }
index 9087355..c222cfa 100644 (file)
@@ -55,7 +55,7 @@ public class ConsumerCallbacks {
     @Autowired
     public ConsumerCallbacks(ApplicationConfig config, EiTypes eiTypes, EiJobs eiJobs) {
         AsyncRestClientFactory restClientFactory = new AsyncRestClientFactory(config.getWebClientConfig());
-        this.restClient = restClientFactory.createRestClient("");
+        this.restClient = restClientFactory.createRestClientUseHttpProxy("");
         this.eiTypes = eiTypes;
         this.eiJobs = eiJobs;
     }
index dc732e1..00d9c14 100644 (file)
@@ -60,7 +60,7 @@ public class ProducerCallbacks {
     @Autowired
     public ProducerCallbacks(ApplicationConfig config, EiTypes eiTypes) {
         AsyncRestClientFactory restClientFactory = new AsyncRestClientFactory(config.getWebClientConfig());
-        this.restClient = restClientFactory.createRestClient("");
+        this.restClient = restClientFactory.createRestClientNoHttpProxy("");
         this.eiTypes = eiTypes;
     }
 
index e242166..b4c21d4 100644 (file)
@@ -57,7 +57,7 @@ public class ProducerSupervision {
     public ProducerSupervision(ApplicationConfig applicationConfig, EiProducers eiProducers, EiJobs eiJobs,
         EiTypes eiTypes, ConsumerCallbacks consumerCallbacks) {
         AsyncRestClientFactory restClientFactory = new AsyncRestClientFactory(applicationConfig.getWebClientConfig());
-        this.restClient = restClientFactory.createRestClient("");
+        this.restClient = restClientFactory.createRestClientNoHttpProxy("");
         this.eiJobs = eiJobs;
         this.eiProducers = eiProducers;
         this.eiTypes = eiTypes;
index c5ee82a..b62a965 100644 (file)
@@ -45,8 +45,10 @@ import org.junit.jupiter.api.extension.ExtendWith;
 import org.oransc.enrichment.clients.AsyncRestClient;
 import org.oransc.enrichment.clients.AsyncRestClientFactory;
 import org.oransc.enrichment.configuration.ApplicationConfig;
+import org.oransc.enrichment.configuration.ImmutableHttpProxyConfig;
 import org.oransc.enrichment.configuration.ImmutableWebClientConfig;
 import org.oransc.enrichment.configuration.WebClientConfig;
+import org.oransc.enrichment.configuration.WebClientConfig.HttpProxyConfig;
 import org.oransc.enrichment.controller.ConsumerSimulatorController;
 import org.oransc.enrichment.controller.ProducerSimulatorController;
 import org.oransc.enrichment.controllers.consumer.ConsumerConsts;
@@ -161,8 +163,10 @@ class ApplicationTest {
         ResponseEntity<String> resp = restClient().getForEntity(url).block();
         assertThat(resp.getStatusCode()).isEqualTo(HttpStatus.OK);
 
-        String indented = (new JSONObject(resp.getBody())).toString(4);
-        try (PrintStream out = new PrintStream(new FileOutputStream("../docs/offeredapis/swagger/ecs-api.json"))) {
+        JSONObject jsonObj = new JSONObject(resp.getBody());
+        jsonObj.remove("host");
+        String indented = jsonObj.toString(4);
+        try (PrintStream out = new PrintStream(new FileOutputStream("api/ecs-api.json"))) {
             out.print(indented);
         }
     }
@@ -711,6 +715,10 @@ class ApplicationTest {
 
     private AsyncRestClient restClient(boolean useTrustValidation) {
         WebClientConfig config = this.applicationConfig.getWebClientConfig();
+        HttpProxyConfig httpProxyConfig = ImmutableHttpProxyConfig.builder() //
+            .httpProxyHost("") //
+            .httpProxyPort(0) //
+            .build();
         config = ImmutableWebClientConfig.builder() //
             .keyStoreType(config.keyStoreType()) //
             .keyStorePassword(config.keyStorePassword()) //
@@ -719,10 +727,10 @@ class ApplicationTest {
             .isTrustStoreUsed(useTrustValidation) //
             .trustStore(config.trustStore()) //
             .trustStorePassword(config.trustStorePassword()) //
-            .build();
+            .httpProxyConfig(httpProxyConfig).build();
 
         AsyncRestClientFactory restClientFactory = new AsyncRestClientFactory(config);
-        return restClientFactory.createRestClient(baseUrl());
+        return restClientFactory.createRestClientNoHttpProxy(baseUrl());
     }
 
     private AsyncRestClient restClient() {
index f879c7b..364203a 100644 (file)
@@ -58,7 +58,7 @@ class AsyncRestClientTest {
         InternalLoggerFactory.setDefaultFactory(JdkLoggerFactory.INSTANCE);
         Loggers.useJdkLoggers();
         mockWebServer = new MockWebServer();
-        clientUnderTest = new AsyncRestClient(mockWebServer.url(BASE_URL).toString());
+        clientUnderTest = new AsyncRestClient(mockWebServer.url(BASE_URL).toString(), null, null);
     }
 
     @AfterAll
index 144ac36..9c0254f 100755 (executable)
@@ -24,7 +24,7 @@ TC_ONELINE_DESCR="Sanity test, create service and then create,update and delete
 INCLUDED_IMAGES="CBS CONSUL CP CR MR PA RICSIM SDNC"
 
 #SUPPORTED TEST ENV FILE
-SUPPORTED_PROFILES="ONAP-MASTER ONAP-GUILIN ORAN-CHERRY"
+SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU  ORAN-CHERRY ORAN-DAWN"
 
 . ../common/testcase_common.sh  $@
 . ../common/agent_api_functions.sh
index ca545b2..77a6c34 100755 (executable)
@@ -23,7 +23,7 @@ TC_ONELINE_DESCR="Basic use case, register service, create/update policy, delete
 INCLUDED_IMAGES="CBS CONSUL CP CR MR PA RICSIM"
 
 #SUPPORTED TEST ENV FILE
-SUPPORTED_PROFILES="ONAP-MASTER ONAP-GUILIN ORAN-CHERRY"
+SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU  ORAN-CHERRY ORAN-DAWN"
 
 . ../common/testcase_common.sh $@
 . ../common/agent_api_functions.sh
index 4b2e162..34705f4 100755 (executable)
@@ -23,9 +23,8 @@ TC_ONELINE_DESCR="Full agent API walkthrough using agent REST/DMAAP and with/wit
 #App names to include in the test, space separated list
 INCLUDED_IMAGES="CBS CONSUL CP CR MR PA RICSIM SDNC"
 
-
 #SUPPORTED TEST ENV FILE
-SUPPORTED_PROFILES="ONAP-MASTER ONAP-GUILIN ORAN-CHERRY"
+SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU  ORAN-CHERRY ORAN-DAWN"
 
 . ../common/testcase_common.sh  $@
 . ../common/agent_api_functions.sh
index 0406c40..50e3f37 100755 (executable)
@@ -24,7 +24,7 @@ TC_ONELINE_DESCR="Testing of service registration timeouts and keepalive"
 INCLUDED_IMAGES="CBS CONSUL CP CR MR PA RICSIM"
 
 #SUPPORTED TEST ENV FILE
-SUPPORTED_PROFILES="ONAP-MASTER ONAP-GUILIN ORAN-CHERRY"
+SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU  ORAN-CHERRY ORAN-DAWN"
 
 . ../common/testcase_common.sh  $@
 . ../common/agent_api_functions.sh
index 4672cb2..3ad18f3 100755 (executable)
@@ -24,7 +24,7 @@ TC_ONELINE_DESCR="ECS full intefaces walkthrough"
 INCLUDED_IMAGES="ECS PRODSTUB CR RICSIM CP"
 
 #SUPPORTED TEST ENV FILE
-SUPPORTED_PROFILES="ONAP-MASTER ORAN-CHERRY"
+SUPPORTED_PROFILES="ONAP-HONOLULU  ORAN-CHERRY ORAN-DAWN"
 
 . ../common/testcase_common.sh  $@
 . ../common/ecs_api_functions.sh
index daeb3c7..ab1e8a6 100755 (executable)
@@ -24,7 +24,7 @@ TC_ONELINE_DESCR="Sample tests of the SDNC A1 controller restconf API using http
 INCLUDED_IMAGES="RICSIM SDNC"
 
 #SUPPORTED TEST ENV FILE
-SUPPORTED_PROFILES="ONAP-MASTER ONAP-GUILIN ORAN-CHERRY"
+SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU  ORAN-CHERRY ORAN-DAWN"
 
 . ../common/testcase_common.sh  $@
 . ../common/controller_api_functions.sh
index caec939..f807967 100755 (executable)
@@ -24,7 +24,7 @@ TC_ONELINE_DESCR="ECS Create 10000 jobs and restart, test job persisency"
 INCLUDED_IMAGES="ECS PRODSTUB CR CP"
 
 #SUPPORTED TEST ENV FILE
-SUPPORTED_PROFILES="ONAP-MASTER ORAN-CHERRY"
+SUPPORTED_PROFILES="ONAP-HONOLULU  ORAN-CHERRY ORAN-DAWN"
 
 . ../common/testcase_common.sh  $@
 . ../common/ecs_api_functions.sh
index 3973282..713d330 100755 (executable)
@@ -23,7 +23,7 @@ TC_ONELINE_DESCR="Resync 10000 policies using OSC and STD interface"
 INCLUDED_IMAGES="CBS CONSUL CP CR MR PA RICSIM SDNC"
 
 #SUPPORTED TEST ENV FILE
-SUPPORTED_PROFILES="ONAP-MASTER ONAP-GUILIN ORAN-CHERRY"
+SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU  ORAN-CHERRY ORAN-DAWN"
 
 . ../common/testcase_common.sh  $@
 . ../common/agent_api_functions.sh
index eec4542..674df8c 100755 (executable)
@@ -24,7 +24,7 @@ TC_ONELINE_DESCR="Resync of RIC via changes in the consul config or pushed confi
 INCLUDED_IMAGES="CBS CONSUL CP CR MR PA RICSIM"
 
 #SUPPORTED TEST ENV FILE
-SUPPORTED_PROFILES="ONAP-MASTER ONAP-GUILIN ORAN-CHERRY"
+SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU  ORAN-CHERRY ORAN-DAWN"
 
 . ../common/testcase_common.sh  $@
 . ../common/agent_api_functions.sh
index 0605944..4df0a15 100755 (executable)
@@ -23,7 +23,7 @@ TC_ONELINE_DESCR="Change supported policy types and reconfigure rics"
 INCLUDED_IMAGES="CBS CONSUL CP CR MR PA RICSIM SDNC"
 
 #SUPPORTED TEST ENV FILE
-SUPPORTED_PROFILES="ONAP-MASTER ONAP-GUILIN ORAN-CHERRY"
+SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU  ORAN-CHERRY ORAN-DAWN"
 
 . ../common/testcase_common.sh  $@
 . ../common/agent_api_functions.sh
index c90940c..ceda58c 100755 (executable)
@@ -23,7 +23,7 @@ TC_ONELINE_DESCR="Create 10000 policies in sequence using http/https and Agent R
 INCLUDED_IMAGES="CBS CONSUL CP CR MR PA RICSIM SDNC"
 
 #SUPPORTED TEST ENV FILE
-SUPPORTED_PROFILES="ONAP-MASTER ONAP-GUILIN ORAN-CHERRY"
+SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU  ORAN-CHERRY ORAN-DAWN"
 
 . ../common/testcase_common.sh  $@
 . ../common/agent_api_functions.sh
index 7ac759c..c5d284a 100755 (executable)
@@ -23,7 +23,7 @@ TC_ONELINE_DESCR="Repeatedly create and delete policies in each RICs for 24h (or
 INCLUDED_IMAGES="CBS CONSUL CP CR MR PA RICSIM SDNC"
 
 #SUPPORTED TEST ENV FILE
-SUPPORTED_PROFILES="ONAP-MASTER ONAP-GUILIN ORAN-CHERRY"
+SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU  ORAN-CHERRY ORAN-DAWN"
 
 . ../common/testcase_common.sh  $@
 . ../common/agent_api_functions.sh
index 3b65b10..324044e 100755 (executable)
@@ -23,7 +23,7 @@ TC_ONELINE_DESCR="Create/delete policies in parallel over a number of rics using
 INCLUDED_IMAGES="CBS CONSUL CP CR MR PA RICSIM SDNC"
 
 #SUPPORTED TEST ENV FILE
-SUPPORTED_PROFILES="ONAP-MASTER ONAP-GUILIN ORAN-CHERRY"
+SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU  ORAN-CHERRY ORAN-DAWN"
 
 . ../common/testcase_common.sh  $@
 . ../common/agent_api_functions.sh
index 356301e..8a937ff 100755 (executable)
@@ -23,7 +23,7 @@ TC_ONELINE_DESCR="Preparation for test of the Control Panel and the Health Check
 INCLUDED_IMAGES="CBS CONSUL CP CR MR PA RICSIM"
 
 #SUPPORTED TEST ENV FILE
-SUPPORTED_PROFILES="ONAP-MASTER ONAP-GUILIN ORAN-CHERRY"
+SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU  ORAN-CHERRY ORAN-DAWN"
 
 . ../common/testcase_common.sh $@
 . ../common/agent_api_functions.sh
index c43ad3e..fe85372 100755 (executable)
@@ -23,7 +23,7 @@ TC_ONELINE_DESCR="Preparation demo setup  - populating a number of ric simulator
 INCLUDED_IMAGES="CBS CONSUL CP CR MR PA RICSIM SDNC"
 
 #SUPPORTED TEST ENV FILE
-SUPPORTED_PROFILES="ONAP-MASTER ONAP-GUILIN ORAN-CHERRY"
+SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU  ORAN-CHERRY ORAN-DAWN"
 
 . ../common/testcase_common.sh $@
 . ../common/agent_api_functions.sh
index 2915b02..3f9f8fd 100755 (executable)
@@ -23,7 +23,7 @@ TC_ONELINE_DESCR="Preparation demo setup  - policy management and enrichment inf
 INCLUDED_IMAGES="CBS CONSUL CP CR MR PA RICSIM SDNC ECS PRODSTUB RC"
 
 #SUPPORTED TEST ENV FILE
-SUPPORTED_PROFILES="ONAP-MASTER ORAN-CHERRY"
+SUPPORTED_PROFILES="ONAP-HONOLULU  ORAN-CHERRY ORAN-DAWN"
 
 . ../common/testcase_common.sh $@
 . ../common/agent_api_functions.sh
@@ -72,8 +72,6 @@ consul_config_app                  ".consul_config.json"
 
 start_policy_agent
 
-start_rapp_catalogue
-
 start_cr
 
 start_prod_stub
index 82ff47b..005ee0a 100644 (file)
@@ -15,7 +15,7 @@ The test scripts uses configuration from a single file, found in `../common/test
 ## How to run
 A test script, for example FTC1, is executed from the cmd line using the script filename and one or more parameters:
 
- ./FTC1.sh remote --env-file ../common/test_env-oran-cherry
+ ./FTC1.sh remote --env-file ../common/test_env-oran-cherry.sh
 
 See the README.md in  `../common/` for all details about available parameters and their meaning.
 
index 21475c0..b4754cd 100644 (file)
@@ -68,18 +68,22 @@ The script can be started with these arguments
 
 | arg list |
 |--|
-| `local|remote|remote-remove [auto-clean] [--stop-at-error] [--ricsim-prefix <prefix> ] [ --env-file <environment-filename> ]  [--use-local-image <app-nam> [<app-name>]*]` |
+| `remote|remote-remove --env-file <environment-filename> [release] [auto-clean] [--stop-at-error] [--ricsim-prefix <prefix> ] [--use-local-image <app-nam>+]  [--use-snapshot-image <app-nam>+] [--use-staging-image <app-nam>+] [--use-release-image <app-nam>+]` |
 
 | 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' |
-| `--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). |
-| `--env-file` | point to a file with environment variables (the previous default, test_env.sh, replaced with one env file for each branch in test/common) |
-| `--use-local-image <app-nam> [<app-name>]*` | only 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, RC for Policy Agent, Control Panel, A1-controller, Ric simulator, RAPP Catalogue |
+| `remote` | Use images from remote repositories. Can be overridden for individual images using the '--use_xxx' flags |
+| `remote-remove` | Same as 'remote' but will also try to pull fresh images from remote repositories |
+| `--env-file` | The script will use the supplied file to read environment variables from |
+| `release` | If this flag is given the script will use release version of the images |
+| `auto-clean` | If the function 'auto_clean_containers' is present in the end of the test script then all containers will be stopped and removed. If 'auto-clean' is not given then the function has no effect |
+| `--stop-at-error` | The script will stop when the first failed test or configuration |
+| `--ricsim-prefix <prefix>` | The a1 simulator will use the supplied string as container prefix instead of 'ricsim'. Note that the testscript has to read and use the env var `$RIC_SIM_PREFIX` instead of a hardcoded name of the ric(s). |
+| `--use-local-image` | The script will use local images for the supplied apps, space separated list of app short names |
+| `--use-snapshot-image` | The script will use images from the nexus snapshot repo for the supplied apps, space separated list of app short names |
+| `--use-staging-image` | The script will use images from the nexus staging repo for the supplied apps, space separated list of app short names |
+| `--use-release-image` | The script will use images from the nexus release repo for the supplied apps, space separated list of app short names |
+| `help` | Print this info along with the test script description and the list of app short names supported |
 
 
 ## Function: print_result ##
index 1dc2b36..9b85bf0 100644 (file)
 #
 #Profile for ONAP guilin release
 TEST_ENV_PROFILE="ONAP-GUILIN"
-NEXUS_PROXY_REPO="nexus3.onap.org:10001/"
-
-# Set up the image and tags for the test. Do not add the image tag to the image names.
 
-# NOTE: A env var for each container is created by the test script.
-# This var will point to the local or remote var depending on how
-# the test script is started. The name format is <container-name>_IMAGE, ie with 'LOCAL' or 'REMOTE'.
-
-# Tag for guilin branch
-# Remote Policy Agent image and tag
-POLICY_AGENT_REMOTE_IMAGE="nexus3.onap.org:10003/onap/ccsdk-oran-a1policymanagementservice"
-POLICY_AGENT_REMOTE_IMAGE_TAG="1.0.2-SNAPSHOT"
+########################################
+## Nexus repo settings
+########################################
 
+# Nexus repos for developed images
+NEXUS_PROXY_REPO="nexus3.onap.org:10001/"
+NEXUS_RELEASE_REPO="nexus3.onap.org:10002/"
+NEXUS_SNAPSHOT_REPO="nexus3.onap.org:10003/"
+NEXUS_STAGING_REPO=$NEXUS_SNAPSHOT_REPO  #staging repo not used in ONAP, using snapshot
+
+# Nexus repos for images used by test (not developed by the project)
+NEXUS_RELEASE_REPO_ORAN="nexus3.o-ran-sc.org:10002/" # Only for released ORAN images
+NEXUS_RELEASE_REPO_ONAP=$NEXUS_RELEASE_REPO
+
+########################################
+# Set up of image and tags for the test.
+########################################
+
+# NOTE: One environment variable containing the image name and tag is create by the test script
+# for each image from the env variables below.
+# The variable is created by removing the suffix "_BASE" from the base image variable name.
+# Example: POLICY_AGENT_IMAGE_BASE -> POLICY_AGENT_IMAGE
+# This var will point to the local or remote image depending on cmd line arguments.
+# In addition, the repo and the image tag version are selected from the list of image tags based on the cmd line argurment.
+# For images built by the script, only tag #1 shall be specified
+# For project images, only tag #1, #2, #3 and #4 shall be specified
+# For ORAN images (non project), only tag #5 shall be specified
+# For ONAP images (non project), only tag #6 shall be specified
+# For all other images, only tag #7 shall be specified
+# 1 XXX_LOCAL: local images: <image-name>:<local-tag>
+# 2 XXX_REMOTE_SNAPSHOT: snapshot images: <snapshot-nexus-repo><image-name>:<snapshot-tag>
+# 3 XXX_REMOTE: staging images: <staging-nexus-repo><image-name>:<staging-tag>
+# 4 XXX_REMOTE_RELEASE: release images: <release-nexus-repo><image-name>:<release-tag>
+# 5 XXX_REMOTE_RELEASE_ORAN: ORAN release images: <oran-release-nexus-repo><image-name>:<release-tag>
+# 6 XXX_REMOTE_RELEASE_ONAP: ONAP release images: <onap-release-nexus-repo><image-name>:<release-tag>
+# 7 XXX_PROXY: other images, not produced by the project: <proxy-nexus-repo><mage-name>:<proxy-tag>
+
+
+# Policy Agent image and tags
+POLICY_AGENT_IMAGE_BASE="onap/ccsdk-oran-a1policymanagementservice"
+POLICY_AGENT_IMAGE_TAG_LOCAL="1.0.2-SNAPSHOT"
+POLICY_AGENT_IMAGE_TAG_REMOTE_SNAPSHOT="1.0.2-SNAPSHOT"
+POLICY_AGENT_IMAGE_TAG_REMOTE="1.0.2-SNAPSHOT" #Will use snapshot repo
+POLICY_AGENT_IMAGE_TAG_REMOTE_RELEASE="1.0.1"
 
-# 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="2.0.0"
 
 # Tag for guilin branch
 # SDNC A1 Controller remote image and tag
-SDNC_A1_CONTROLLER_REMOTE_IMAGE="nexus3.onap.org:10003/onap/sdnc-image"
-SDNC_A1_CONTROLLER_REMOTE_IMAGE_TAG="2.0.2-STAGING-latest"
+SDNC_A1_CONTROLLER_IMAGE_BASE="onap/sdnc-image"
+SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_SNAPSHOT="2.0.5-STAGING-latest"
+SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE="2.0.5-STAGING-latest"
+SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_RELEASE="2.0.4"   #Will use snapshot repo
 
 
 #SDNC DB remote image and tag
-SDNC_DB_REMOTE_IMAGE=$NEXUS_PROXY_REPO"mysql/mysql-server"
-SDNC_DB_REMOTE_IMAGE_TAG="5.6"
-#No local image for DB, remote image always used
+#The DB is part of SDNC so handled in the same way as SDNC
+SDNC_DB_IMAGE_BASE="mysql/mysql-server"
+SDNC_DB_IMAGE_TAG_REMOTE_PROXY="5.6"
 
 
-# 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="2.0.0"
+# Control Panel image and tag - uses bronze release
+CONTROL_PANEL_IMAGE_BASE="o-ran-sc/nonrtric-controlpanel"
+CONTROL_PANEL_IMAGE_TAG_REMOTE_RELEASE_ORAN="2.0.0"
+
+
+# Near RT RIC Simulator image and tags - uses bronze release
+RIC_SIM_IMAGE_BASE="o-ran-sc/a1-simulator"
+RIC_SIM_IMAGE_TAG_REMOTE_RELEASE_ORAN="2.0.0"
 
 
 #Consul remote image and tag
-CONSUL_REMOTE_IMAGE=$NEXUS_PROXY_REPO"consul"
-CONSUL_REMOTE_IMAGE_TAG="1.7.2"
+CONSUL_IMAGE_BASE="consul"
+CONSUL_IMAGE_TAG_REMOTE_PROXY="1.7.2"
 #No local image for Consul, remote image always used
 
 
 #CBS remote image and tag
-CBS_REMOTE_IMAGE="nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.configbinding.app-app"
-CBS_REMOTE_IMAGE_TAG="2.3.0"
+CBS_IMAGE_BASE="onap/org.onap.dcaegen2.platform.configbinding.app-app"
+CBS_IMAGE_TAG_REMOTE_RELEASE_ONAP="2.3.0"
 #No local image for CBS, remote image always used
 
 
 #MR stub image and tag
-MRSTUB_LOCAL_IMAGE="mrstub"
-MRSTUB_LOCAL_IMAGE_TAG="latest"
+MRSTUB_IMAGE_BASE="mrstub"
+MRSTUB_IMAGE_TAG_LOCAL="latest"
 #No remote image for MR stub, local image always used
 
+
 #Callback receiver image and tag
-CR_LOCAL_IMAGE="callback-receiver"
-CR_LOCAL_IMAGE_TAG="latest"
+CR_IMAGE_BASE="callback-receiver"
+CR_IMAGE_TAG_LOCAL="latest"
 #No remote image for CR, local image always used
 
-# Common env var for auto-test. Vars used by docker-compose need to be exported
+
+#Producer stub image and tag
+PROD_STUB_IMAGE_BASE="producer-stub"
+PROD_STUB_IMAGE_TAG_LOCAL="latest"
+#No remote image for producer stub, local image always used
+
+
+# List of app short names produced by the project
+PROJECT_IMAGES_APP_NAMES="PA SDNC"
+
+# List of app short names which images pulled from ORAN
+ORAN_IMAGES_APP_NAMES="CP RICSIM"
+
+# List of app short names which images pulled from ONAP
+ONAP_IMAGES_APP_NAMES=""   # Not used
+
+########################################
+# Detailed settings per app
+########################################
+
+# Vars used by docker-compose need to be exported
+
+
 export DOCKER_SIM_NWNAME="nonrtric-docker-net"                  # Name of docker private network
 
 export POLICY_AGENT_EXTERNAL_PORT=8081                          # Policy Agent container external port (host -> container)
@@ -140,6 +199,12 @@ export CONTROL_PANEL_EXTERNAL_PORT=8080                         # Control Panel
 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
 
+
+########################################
+# Setting for common curl-base function
+########################################
+
+
 UUID=""                                                         # UUID used as prefix to the policy id to simulate a real UUID
                                                                 # Testscript need to set the UUID to use other this empty prefix is used
 
similarity index 67%
rename from test/common/test_env-onap-master.sh
rename to test/common/test_env-onap-honolulu.sh
index 29647bd..a8c852e 100644 (file)
 #  limitations under the License.
 #  ============LICENSE_END=================================================
 #
-#Profile for ONAP master
-TEST_ENV_PROFILE="ONAP-MASTER"
+#Profile for ONAP honolulu release
+TEST_ENV_PROFILE="ONAP-HONOLULU"
+
+########################################
+## Nexus repo settings
+########################################
+
+# Nexus repos for developed images
 NEXUS_PROXY_REPO="nexus3.onap.org:10001/"
+NEXUS_RELEASE_REPO="nexus3.onap.org:10002/"
+NEXUS_SNAPSHOT_REPO="nexus3.onap.org:10003/"
+NEXUS_STAGING_REPO=$NEXUS_SNAPSHOT_REPO  #staging repo not used in ONAP, using snapshot
+
+# Nexus repos for images used by test (not developed by the project)
+NEXUS_RELEASE_REPO_ORAN="nexus3.o-ran-sc.org:10002/" # Only for released ORAN images
+NEXUS_RELEASE_REPO_ONAP=$NEXUS_RELEASE_REPO
+
+########################################
+# Set up of image and tags for the test.
+########################################
+
+# NOTE: One environment variable containing the image name and tag is create by the test script
+# for each image from the env variables below.
+# The variable is created by removing the suffix "_BASE" from the base image variable name.
+# Example: POLICY_AGENT_IMAGE_BASE -> POLICY_AGENT_IMAGE
+# This var will point to the local or remote image depending on cmd line arguments.
+# In addition, the repo and the image tag version are selected from the list of image tags based on the cmd line argurment.
+# For images built by the script, only tag #1 shall be specified
+# For project images, only tag #1, #2, #3 and #4 shall be specified
+# For ORAN images (non project), only tag #5 shall be specified
+# For ONAP images (non project), only tag #6 shall be specified
+# For all other images, only tag #7 shall be specified
+# 1 XXX_LOCAL: local images: <image-name>:<local-tag>
+# 2 XXX_REMOTE_SNAPSHOT: snapshot images: <snapshot-nexus-repo><image-name>:<snapshot-tag>
+# 3 XXX_REMOTE: staging images: <staging-nexus-repo><image-name>:<staging-tag>
+# 4 XXX_REMOTE_RELEASE: release images: <release-nexus-repo><image-name>:<release-tag>
+# 5 XXX_REMOTE_RELEASE_ORAN: ORAN release images: <oran-release-nexus-repo><image-name>:<release-tag>
+# 6 XXX_REMOTE_RELEASE_ONAP: ONAP release images: <onap-release-nexus-repo><image-name>:<release-tag>
+# 7 XXX_PROXY: other images, not produced by the project: <proxy-nexus-repo><mage-name>:<proxy-tag>
+
+# Policy Agent image and tags
+POLICY_AGENT_IMAGE_BASE="onap/ccsdk-oran-a1policymanagementservice"
+POLICY_AGENT_IMAGE_TAG_LOCAL="1.1.1-SNAPSHOT"
+POLICY_AGENT_IMAGE_TAG_REMOTE_SNAPSHOT="1.1.1-SNAPSHOT"
+POLICY_AGENT_IMAGE_TAG_REMOTE="1.1.1-SNAPSHOT" #Will use snapshot repo
+POLICY_AGENT_IMAGE_TAG_REMOTE_RELEASE="1.1.1"
 
-# Set up the image and tags for the test. Do not add the image tag to the image names.
 
-# NOTE: A env var for each container is created by the test script.
-# This var will point to the local or remote var depending on how
-# the test script is started. The name format is <container-name>_IMAGE, ie with 'LOCAL' or 'REMOTE'.
+# SDNC A1 Controller remote image and tag
+SDNC_A1_CONTROLLER_IMAGE_BASE="onap/sdnc-image"
+SDNC_A1_CONTROLLER_IMAGE_TAG_LOCAL="2.1.1-SNAPSHOT" ###CHECK THIS
+SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_SNAPSHOT="2.1.1-STAGING-latest"
+SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE="2.1.1-STAGING-latest"  #Will use snapshot repo
+SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_RELEASE="2.1.1"
 
-# Local Policy Agent image and tag
-POLICY_AGENT_LOCAL_IMAGE="onap/ccsdk-oran-a1policymanagementservice"
-POLICY_AGENT_LOCAL_IMAGE_TAG="1.1.0-SNAPSHOT"
-# Remote Policy Agent image and tag
-POLICY_AGENT_REMOTE_IMAGE="nexus3.onap.org:10003/onap/ccsdk-oran-a1policymanagementservice"
-POLICY_AGENT_REMOTE_IMAGE_TAG="1.1.0-SNAPSHOT"
+#SDNC DB remote image and tag
+#The DB is part of SDNC so handled in the same way as SDNC
+SDNC_DB_IMAGE_BASE="mysql/mysql-server"
+SDNC_DB_IMAGE_TAG_REMOTE_PROXY="5.6"
 
-# Local ECS image and tag
-ECS_LOCAL_IMAGE="o-ran-sc/nonrtric-enrichment-coordinator-service"
-ECS_LOCAL_IMAGE_TAG="1.0.0-SNAPSHOT"
-# Remote ECS image and tag
-ECS_REMOTE_IMAGE="nexus3.o-ran-sc.org:10003/o-ran-sc/nonrtric-enrichment-coordinator-service"
-ECS_REMOTE_IMAGE_TAG="1.0.0-SNAPSHOT"
 
-# Control Panel local image and tag
-CONTROL_PANEL_LOCAL_IMAGE="o-ran-sc/nonrtric-controlpanel"
-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="2.0.0"
+# ECS image and tag - uses cherry release
+ECS_IMAGE_BASE="o-ran-sc/nonrtric-enrichment-coordinator-service"
+ECS_IMAGE_TAG_REMOTE_RELEASE_ORAN="1.0.0"
 
 
-# SDNC A1 Controller remote image and tag
-SDNC_A1_CONTROLLER_REMOTE_IMAGE="nexus3.onap.org:10003/onap/sdnc-image"
-SDNC_A1_CONTROLLER_REMOTE_IMAGE_TAG="2.1.0-STAGING-latest"
+# Control Panel image and tag - uses cherry release
+CONTROL_PANEL_IMAGE_BASE="o-ran-sc/nonrtric-controlpanel"
+CONTROL_PANEL_IMAGE_TAG_REMOTE_RELEASE_ORAN="2.1.0"
 
 
-#SDNC DB remote image and tag
-SDNC_DB_REMOTE_IMAGE=$NEXUS_PROXY_REPO"mysql/mysql-server"
-SDNC_DB_REMOTE_IMAGE_TAG="5.6"
-#No local image for DB, remote image always used
+# RAPP Catalogue image and tags - uses cherry release
+RAPP_CAT_IMAGE_BASE="o-ran-sc/nonrtric-r-app-catalogue"
+RAPP_CAT_IMAGE_TAG_REMOTE_RELEASE_ORAN="1.0.0"
 
-# Near RT RIC Simulator local image and tag
-RIC_SIM_LOCAL_IMAGE="o-ran-sc/a1-simulator"
-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="2.1.0"
+
+# Near RT RIC Simulator image and tags - uses cherry release
+RIC_SIM_IMAGE_BASE="o-ran-sc/a1-simulator"
+RIC_SIM_IMAGE_TAG_REMOTE_RELEASE_ORAN="2.1.0"
 
 
 #Consul remote image and tag
-CONSUL_REMOTE_IMAGE=$NEXUS_PROXY_REPO"consul"
-CONSUL_REMOTE_IMAGE_TAG="1.7.2"
+CONSUL_IMAGE_BASE="consul"
+CONSUL_IMAGE_TAG_REMOTE_PROXY="1.7.2"
 #No local image for Consul, remote image always used
 
 
 #CBS remote image and tag
-CBS_REMOTE_IMAGE="nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.configbinding.app-app"
-CBS_REMOTE_IMAGE_TAG="2.3.0"
+CBS_IMAGE_BASE="onap/org.onap.dcaegen2.platform.configbinding.app-app"
+CBS_IMAGE_TAG_REMOTE_RELEASE_ONAP="2.3.0"
 #No local image for CBS, remote image always used
 
 
 #MR stub image and tag
-MRSTUB_LOCAL_IMAGE="mrstub"
-MRSTUB_LOCAL_IMAGE_TAG="latest"
+MRSTUB_IMAGE_BASE="mrstub"
+MRSTUB_IMAGE_TAG_LOCAL="latest"
 #No remote image for MR stub, local image always used
 
+
 #Callback receiver image and tag
-CR_LOCAL_IMAGE="callback-receiver"
-CR_LOCAL_IMAGE_TAG="latest"
+CR_IMAGE_BASE="callback-receiver"
+CR_IMAGE_TAG_LOCAL="latest"
 #No remote image for CR, local image always used
 
+
 #Producer stub image and tag
-PROD_STUB_LOCAL_IMAGE="producer-stub"
-PROD_STUB_LOCAL_IMAGE_TAG="latest"
+PROD_STUB_IMAGE_BASE="producer-stub"
+PROD_STUB_IMAGE_TAG_LOCAL="latest"
 #No remote image for producer stub, local image always used
 
-# Common env var for auto-test. Vars used by docker-compose need to be exported
+
+# List of app short names produced by the project
+PROJECT_IMAGES_APP_NAMES="PA SDNC"
+
+# List of app short names which images pulled from ORAN
+ORAN_IMAGES_APP_NAMES="CP ECS RICSIM RC"
+
+# List of app short names which images pulled from ONAP
+ONAP_IMAGES_APP_NAMES=""   # Not used
+
+
+########################################
+# Detailed settings per app
+########################################
+
+# Vars used by docker-compose need to be exported
+
+
 export DOCKER_SIM_NWNAME="nonrtric-docker-net"                  # Name of docker private network
 
 export POLICY_AGENT_EXTERNAL_PORT=8081                          # Policy Agent container external port (host -> container)
@@ -171,12 +221,22 @@ SDNC_API_URL="/restconf/operations/A1-ADAPTER-API:"             # Base url path
 SDNC_ALIVE_URL="/apidoc/explorer/"                              # Base url path for SNDC API docs (for alive check)
 SDNC_KARAF_LOG="/opt/opendaylight/data/log/karaf.log"           # Path to karaf log
 
+export RAPP_CAT_APP_NAME="rapp-catalogue"                      # Name for the RAPP Catalogue
+export RAPP_CAT_EXTERNAL_PORT=8680                             # RAPP Catalogue container external port (host -> container)
+export RAPP_CAT_INTERNAL_PORT=8080                             # RAPP Catalogue container internal port (container -> container)
+export RAPP_CAT_EXTERNAL_SECURE_PORT=8633                      # RAPP Catalogue container external secure port (host -> container)
+export RAPP_CAT_INTERNAL_SECURE_PORT=8433                      # RAPP Catalogue container internal secure port (container -> container)
 
 export CONTROL_PANEL_APP_NAME="control-panel"                   # Name of the Control Panel container
 export CONTROL_PANEL_EXTERNAL_PORT=8080                         # Control Panel container external port (host -> container)
 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
 
+
+########################################
+# Setting for common curl-base function
+########################################
+
 UUID=""                                                         # UUID used as prefix to the policy id to simulate a real UUID
                                                                 # Testscript need to set the UUID to use other this empty prefix is used
 
@@ -198,4 +258,8 @@ ECS_ADAPTER=$ECS_RESTBASE                                       # Adapter holds
 CR_RESTBASE="http://localhost:"$CR_EXTERNAL_PORT                # Base url to the Callback receiver REST interface
 CR_RESTBASE_SECURE="https://localhost:"$CR_EXTERNAL_SECURE_PORT # Base url to the secure Callback receiver REST interface
 CR_ADAPTER=$CR_RESTBASE                                         # Adapter holds the address the CR admin interface (REST only)
-                                                                # The values of this var is swiched between the two base url when needed
\ No newline at end of file
+                                                                # The values of this var is swiched between the two base url when needed
+
+RC_RESTBASE="http://localhost:"$RAPP_CAT_EXTERNAL_PORT          # Base url to the RAPP Catalogue REST interface
+RC_RESTBASE_SECURE="https://localhost:"$RAPP_CAT_EXTERNAL_SECURE_PORT # Base url to the secure RAPP Catalogue REST interface
+RC_ADAPTER=$RC_RESTBASE                                         # Adapter holds the address the RAPP Catalogue interface
\ No newline at end of file
index 4650768..a0f8871 100755 (executable)
 #
 #Profile for ORAN Cherry
 TEST_ENV_PROFILE="ORAN-CHERRY"
-NEXUS_PROXY_REPO="nexus3.onap.org:10001/"
 
-# Set up the image and tags for the test. Do not add the image tag to the image names.
+########################################
+## Nexus repo settings
+########################################
+
+# Nexus repos for developed images
+NEXUS_PROXY_REPO="nexus3.o-ran-sc.org:10001/"
+NEXUS_RELEASE_REPO="nexus3.o-ran-sc.org:10002/"
+NEXUS_SNAPSHOT_REPO="nexus3.o-ran-sc.org:10003/"
+NEXUS_STAGING_REPO="nexus3.o-ran-sc.org:10004/"
+
+# Nexus repos for images used by test (not developed by the project)
+NEXUS_RELEASE_REPO_ONAP="nexus3.onap.org:10002/"  # Only for released ONAP images
+NEXUS_RELEASE_REPO_ORAN=$NEXUS_RELEASE_REPO
+
+########################################
+# Set up of image and tags for the test.
+########################################
+
+# NOTE: One environment variable containing the image name and tag is create by the test script
+# for each image from the env variables below.
+# The variable is created by removing the suffix "_BASE" from the base image variable name.
+# Example: POLICY_AGENT_IMAGE_BASE -> POLICY_AGENT_IMAGE
+# This var will point to the local or remote image depending on cmd line arguments.
+# In addition, the repo and the image tag version are selected from the list of image tags based on the cmd line argurment.
+# For images built by the script, only tag #1 shall be specified
+# For project images, only tag #1, #2, #3 and #4 shall be specified
+# For ORAN images (non project), only tag #5 shall be specified
+# For ONAP images (non project), only tag #6 shall be specified
+# For all other images, only tag #7 shall be specified
+# 1 XXX_LOCAL: local images: <image-name>:<local-tag>
+# 2 XXX_REMOTE_SNAPSHOT: snapshot images: <snapshot-nexus-repo><image-name>:<snapshot-tag>
+# 3 XXX_REMOTE: staging images: <staging-nexus-repo><image-name>:<staging-tag>
+# 4 XXX_REMOTE_RELEASE: release images: <release-nexus-repo><image-name>:<release-tag>
+# 5 XXX_REMOTE_RELEASE_ORAN: ORAN release images: <oran-release-nexus-repo><image-name>:<release-tag>
+# 6 XXX_REMOTE_RELEASE_ONAP: ONAP release images: <onap-release-nexus-repo><image-name>:<release-tag>
+# 7 XXX_PROXY: other images, not produced by the project: <proxy-nexus-repo><mage-name>:<proxy-tag>
+
+
+# Policy Agent base image and tags
+POLICY_AGENT_IMAGE_BASE="o-ran-sc/nonrtric-policy-agent"
+POLICY_AGENT_IMAGE_TAG_LOCAL="2.1.0-SNAPSHOT"
+POLICY_AGENT_IMAGE_TAG_REMOTE_SNAPSHOT="2.1.0-SNAPSHOT"
+POLICY_AGENT_IMAGE_TAG_REMOTE="2.1.0"
+POLICY_AGENT_IMAGE_TAG_REMOTE_RELEASE="2.1.0"
+
+# ECS image and tags
+ECS_IMAGE_BASE="o-ran-sc/nonrtric-enrichment-coordinator-service"
+ECS_IMAGE_TAG_LOCAL="1.0.0-SNAPSHOT"
+ECS_IMAGE_TAG_REMOTE_SNAPSHOT="1.0.0-SNAPSHOT"
+ECS_IMAGE_TAG_REMOTE="1.0.0"
+ECS_IMAGE_TAG_REMOTE_RELEASE="1.0.0"
+
+
+# Control Panel image and tags
+CONTROL_PANEL_IMAGE_BASE="o-ran-sc/nonrtric-controlpanel"
+CONTROL_PANEL_IMAGE_TAG_LOCAL="2.1.0-SNAPSHOT"
+CONTROL_PANEL_IMAGE_TAG_REMOTE_SNAPSHOT="2.1.0-SNAPSHOT"
+CONTROL_PANEL_IMAGE_TAG_REMOTE="2.1.0"
+CONTROL_PANEL_IMAGE_TAG_REMOTE_RELEASE="2.1.0"
+
+
+# SDNC A1 Controller image and tags
+SDNC_A1_CONTROLLER_IMAGE_BASE="o-ran-sc/nonrtric-a1-controller"
+SDNC_A1_CONTROLLER_IMAGE_TAG_LOCAL="2.0.1-SNAPSHOT"
+SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_SNAPSHOT="2.0.1-SNAPSHOT"
+SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE="2.0.1"
+SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_RELEASE="2.0.1"
 
-# NOTE: A env var for each container is created by the test script.
-# This var will point to the local or remote var depending on how
-# the test script is started. The name format is <container-name>_IMAGE, ie with 'LOCAL' or 'REMOTE'.
 
-# Local Policy Agent image and tag
-POLICY_AGENT_LOCAL_IMAGE="o-ran-sc/nonrtric-policy-agent"
-POLICY_AGENT_LOCAL_IMAGE_TAG="2.1.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="2.1.0"
-
-# Local ECS image and tag
-ECS_LOCAL_IMAGE="o-ran-sc/nonrtric-enrichment-coordinator-service"
-ECS_LOCAL_IMAGE_TAG="1.0.0-SNAPSHOT"
-# Remote ECS image and tag
-ECS_REMOTE_IMAGE="nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-enrichment-coordinator-service"
-ECS_REMOTE_IMAGE_TAG="1.0.0"
-
-# Control Panel local image and tag
-CONTROL_PANEL_LOCAL_IMAGE="o-ran-sc/nonrtric-controlpanel"
-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="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="2.1.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="2.1.0"
-
-
-# RAPP Catalogue local image and tag
-RAPP_CAT_LOCAL_IMAGE="o-ran-sc/nonrtric-r-app-catalogue"
-RAPP_CAT_LOCAL_IMAGE_TAG="1.0.0-SNAPSHOT"
-# RAPP Catalogue remote image and tag
-RAPP_CAT_REMOTE_IMAGE="nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-r-app-catalogue"
-RAPP_CAT_REMOTE_IMAGE_TAG="1.0.0"
+#SDNC DB remote image and tag
+SDNC_DB_IMAGE_BASE="mysql/mysql-server"
+SDNC_DB_IMAGE_TAG_REMOTE_PROXY="5.6"
+#No local image for SSDNC DB, remote image always used
 
 
-#SDNC DB remote image and tag
-SDNC_DB_REMOTE_IMAGE=$NEXUS_PROXY_REPO"mysql/mysql-server"
-SDNC_DB_REMOTE_IMAGE_TAG="5.6"
-#No local image for DB, remote image always used
+# RAPP Catalogue image and tags
+RAPP_CAT_IMAGE_BASE="o-ran-sc/nonrtric-r-app-catalogue"
+RAPP_CAT_IMAGE_TAG_LOCAL="1.0.0-SNAPSHOT"
+RAPP_CAT_IMAGE_TAG_REMOTE_SNAPSHOT="1.0.0-SNAPSHOT"
+RAPP_CAT_IMAGE_TAG_REMOTE="1.0.0"
+RAPP_CAT_IMAGE_TAG_REMOTE_RELEASE="1.0.0"
 
 
-# Near RT RIC Simulator local image and tag
-RIC_SIM_LOCAL_IMAGE="o-ran-sc/a1-simulator"
-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="2.1.0"
+# Near RT RIC Simulator image and tags
+RIC_SIM_IMAGE_BASE="o-ran-sc/a1-simulator"
+RIC_SIM_IMAGE_TAG_LOCAL="latest"
+RIC_SIM_IMAGE_TAG_REMOTE_SNAPSHOT="2.1.0-SNAPSHOT"
+RIC_SIM_IMAGE_TAG_REMOTE="2.1.0"
+RIC_SIM_IMAGE_TAG_REMOTE_RELEASE="2.1.0"
 
 
 #Consul remote image and tag
-CONSUL_REMOTE_IMAGE=$NEXUS_PROXY_REPO"consul"
-CONSUL_REMOTE_IMAGE_TAG="1.7.2"
+CONSUL_IMAGE_BASE="consul"
+CONSUL_IMAGE_TAG_REMOTE_PROXY="1.7.2"
 #No local image for Consul, remote image always used
 
 
 #CBS remote image and tag
-CBS_REMOTE_IMAGE="nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.configbinding.app-app"
-CBS_REMOTE_IMAGE_TAG="2.3.0"
+CBS_IMAGE_BASE="onap/org.onap.dcaegen2.platform.configbinding.app-app"
+CBS_IMAGE_TAG_REMOTE_RELEASE_ONAP="2.3.0"
 #No local image for CBS, remote image always used
 
 
 #MR stub image and tag
-MRSTUB_LOCAL_IMAGE="mrstub"
-MRSTUB_LOCAL_IMAGE_TAG="latest"
+MRSTUB_IMAGE_BASE="mrstub"
+MRSTUB_IMAGE_TAG_LOCAL="latest"
 #No remote image for MR stub, local image always used
 
+
 #Callback receiver image and tag
-CR_LOCAL_IMAGE="callback-receiver"
-CR_LOCAL_IMAGE_TAG="latest"
+CR_IMAGE_BASE="callback-receiver"
+CR_IMAGE_TAG_LOCAL="latest"
 #No remote image for CR, local image always used
 
+
 #Producer stub image and tag
-PROD_STUB_LOCAL_IMAGE="producer-stub"
-PROD_STUB_LOCAL_IMAGE_TAG="latest"
+PROD_STUB_IMAGE_BASE="producer-stub"
+PROD_STUB_IMAGE_TAG_LOCAL="latest"
 #No remote image for producer stub, local image always used
 
-# Common env var for auto-test. Vars used by docker-compose need to be exported
+
+# List of app short names produced by the project
+PROJECT_IMAGES_APP_NAMES="PA ECS CP SDNC RC RICSIM"
+
+# List of app short names which images pulled from ORAN
+ORAN_IMAGES_APP_NAMES=""  # Not used
+
+# List of app short names which images pulled from ONAP
+ONAP_IMAGES_APP_NAMES="CBS"
+
+
+########################################
+# Detailed settings per app
+########################################
+
+# Vars used by docker-compose need to be exported
+
 export DOCKER_SIM_NWNAME="nonrtric-docker-net"                  # Name of docker private network
 
 export POLICY_AGENT_EXTERNAL_PORT=8081                          # Policy Agent container external port (host -> container)
@@ -183,11 +233,11 @@ SDNC_API_URL="/restconf/operations/A1-ADAPTER-API:"             # Base url path
 SDNC_ALIVE_URL="/apidoc/explorer/"                              # Base url path for SNDC API docs (for alive check)
 SDNC_KARAF_LOG="/opt/opendaylight/data/log/karaf.log"           # Path to karaf log
 
+export RAPP_CAT_APP_NAME="rapp-catalogue"                      # Name for the RAPP Catalogue
 export RAPP_CAT_EXTERNAL_PORT=8680                             # RAPP Catalogue container external port (host -> container)
 export RAPP_CAT_INTERNAL_PORT=8080                             # RAPP Catalogue container internal port (container -> container)
 export RAPP_CAT_EXTERNAL_SECURE_PORT=8633                      # RAPP Catalogue container external secure port (host -> container)
 export RAPP_CAT_INTERNAL_SECURE_PORT=8433                      # RAPP Catalogue container internal secure port (container -> container)
-export RAPP_CAT_APP_NAME="rapp-catalogue"                      # Name for the RAPP Catalogue
 
 
 export CONTROL_PANEL_APP_NAME="control-panel"                   # Name of the Control Panel container
@@ -195,6 +245,11 @@ export CONTROL_PANEL_EXTERNAL_PORT=8080                         # Control Panel
 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
 
+
+########################################
+# Setting for common curl-base function
+########################################
+
 UUID=""                                                         # UUID used as prefix to the policy id to simulate a real UUID
                                                                 # Testscript need to set the UUID otherwise this empty prefix is used
 
diff --git a/test/common/test_env-oran-dawn.sh b/test/common/test_env-oran-dawn.sh
new file mode 100755 (executable)
index 0000000..637e5c1
--- /dev/null
@@ -0,0 +1,276 @@
+#!/bin/bash
+
+#  ============LICENSE_START===============================================
+#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  ========================================================================
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#  ============LICENSE_END=================================================
+#
+#Profile for ORAN Cherry
+TEST_ENV_PROFILE="ORAN-DAWN"
+
+########################################
+## Nexus repo settings
+########################################
+
+# Nexus repos for developed images
+NEXUS_PROXY_REPO="nexus3.o-ran-sc.org:10001/"
+NEXUS_RELEASE_REPO="nexus3.o-ran-sc.org:10002/"
+NEXUS_SNAPSHOT_REPO="nexus3.o-ran-sc.org:10003/"
+NEXUS_STAGING_REPO="nexus3.o-ran-sc.org:10004/"
+
+# Nexus repos for images used by test (not developed by the project)
+NEXUS_RELEASE_REPO_ONAP="nexus3.onap.org:10002/"  # Only for released ONAP images
+NEXUS_RELEASE_REPO_ORAN=$NEXUS_RELEASE_REPO
+
+########################################
+# Set up of image and tags for the test.
+########################################
+
+# NOTE: One environment variable containing the image name and tag is create by the test script
+# for each image from the env variables below.
+# The variable is created by removing the suffix "_BASE" from the base image variable name.
+# Example: POLICY_AGENT_IMAGE_BASE -> POLICY_AGENT_IMAGE
+# This var will point to the local or remote image depending on cmd line arguments.
+# In addition, the repo and the image tag version are selected from the list of image tags based on the cmd line argurment.
+# For images built by the script, only tag #1 shall be specified
+# For project images, only tag #1, #2, #3 and #4 shall be specified
+# For ORAN images (non project), only tag #5 shall be specified
+# For ONAP images (non project), only tag #6 shall be specified
+# For all other images, only tag #7 shall be specified
+# 1 XXX_LOCAL: local images: <image-name>:<local-tag>
+# 2 XXX_REMOTE_SNAPSHOT: snapshot images: <snapshot-nexus-repo><image-name>:<snapshot-tag>
+# 3 XXX_REMOTE: staging images: <staging-nexus-repo><image-name>:<staging-tag>
+# 4 XXX_REMOTE_RELEASE: release images: <release-nexus-repo><image-name>:<release-tag>
+# 5 XXX_REMOTE_RELEASE_ORAN: ORAN release images: <oran-release-nexus-repo><image-name>:<release-tag>
+# 6 XXX_REMOTE_RELEASE_ONAP: ONAP release images: <onap-release-nexus-repo><image-name>:<release-tag>
+# 7 XXX_PROXY: other images, not produced by the project: <proxy-nexus-repo><mage-name>:<proxy-tag>
+
+
+# Policy Agent base image and tags
+POLICY_AGENT_IMAGE_BASE="o-ran-sc/nonrtric-policy-agent"
+POLICY_AGENT_IMAGE_TAG_LOCAL="2.2.0-SNAPSHOT"
+POLICY_AGENT_IMAGE_TAG_REMOTE_SNAPSHOT="2.2.0-SNAPSHOT"
+POLICY_AGENT_IMAGE_TAG_REMOTE="2.2.0"
+POLICY_AGENT_IMAGE_TAG_REMOTE_RELEASE="2.2.0"
+
+# ECS image and tags
+ECS_IMAGE_BASE="o-ran-sc/nonrtric-enrichment-coordinator-service"
+ECS_IMAGE_TAG_LOCAL="1.1.0-SNAPSHOT"
+ECS_IMAGE_TAG_REMOTE_SNAPSHOT="1.1.0-SNAPSHOT"
+ECS_IMAGE_TAG_REMOTE="1.1.0"
+ECS_IMAGE_TAG_REMOTE_RELEASE="1.1.0"
+
+
+# Control Panel image and tags
+CONTROL_PANEL_IMAGE_BASE="o-ran-sc/nonrtric-controlpanel"
+CONTROL_PANEL_IMAGE_TAG_LOCAL="2.2.0-SNAPSHOT"
+CONTROL_PANEL_IMAGE_TAG_REMOTE_SNAPSHOT="2.2.0-SNAPSHOT"
+CONTROL_PANEL_IMAGE_TAG_REMOTE="2.2.0"
+CONTROL_PANEL_IMAGE_TAG_REMOTE_RELEASE="2.2.0"
+
+
+# SDNC A1 Controller image and tags
+SDNC_A1_CONTROLLER_IMAGE_BASE="o-ran-sc/nonrtric-a1-controller"
+SDNC_A1_CONTROLLER_IMAGE_TAG_LOCAL="2.1.0-SNAPSHOT"
+SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_SNAPSHOT="2.1.0-SNAPSHOT"
+SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE="2.1.0"
+SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_RELEASE="2.1.0"
+
+
+#SDNC DB remote image and tag
+SDNC_DB_IMAGE_BASE="mysql/mysql-server"
+SDNC_DB_IMAGE_TAG_REMOTE_PROXY="5.6"
+#No local image for SSDNC DB, remote image always used
+
+
+# RAPP Catalogue image and tags
+RAPP_CAT_IMAGE_BASE="o-ran-sc/nonrtric-r-app-catalogue"
+RAPP_CAT_IMAGE_TAG_LOCAL="1.1.0-SNAPSHOT"
+RAPP_CAT_IMAGE_TAG_REMOTE_SNAPSHOT="1.1.0-SNAPSHOT"
+RAPP_CAT_IMAGE_TAG_REMOTE="1.1.0"
+RAPP_CAT_IMAGE_TAG_REMOTE_RELEASE="1.1.0"
+
+
+# Near RT RIC Simulator image and tags
+RIC_SIM_IMAGE_BASE="o-ran-sc/a1-simulator"
+RIC_SIM_IMAGE_TAG_LOCAL="latest"
+RIC_SIM_IMAGE_TAG_REMOTE_SNAPSHOT="2.1.0-SNAPSHOT"
+RIC_SIM_IMAGE_TAG_REMOTE="2.1.0"
+RIC_SIM_IMAGE_TAG_REMOTE_RELEASE="2.1.0"
+
+
+#Consul remote image and tag
+CONSUL_IMAGE_BASE="consul"
+CONSUL_IMAGE_TAG_REMOTE_PROXY="1.7.2"
+#No local image for Consul, remote image always used
+
+
+#CBS remote image and tag
+CBS_IMAGE_BASE="onap/org.onap.dcaegen2.platform.configbinding.app-app"
+CBS_IMAGE_TAG_REMOTE_RELEASE_ONAP="2.3.0"
+#No local image for CBS, remote image always used
+
+
+#MR stub image and tag
+MRSTUB_IMAGE_BASE="mrstub"
+MRSTUB_IMAGE_TAG_LOCAL="latest"
+#No remote image for MR stub, local image always used
+
+
+#Callback receiver image and tag
+CR_IMAGE_BASE="callback-receiver"
+CR_IMAGE_TAG_LOCAL="latest"
+#No remote image for CR, local image always used
+
+
+#Producer stub image and tag
+PROD_STUB_IMAGE_BASE="producer-stub"
+PROD_STUB_IMAGE_TAG_LOCAL="latest"
+#No remote image for producer stub, local image always used
+
+
+# List of app short names produced by the project
+PROJECT_IMAGES_APP_NAMES="PA ECS CP SDNC RC RICSIM"
+
+# List of app short names which images pulled from ORAN
+ORAN_IMAGES_APP_NAMES=""  # Not used
+
+# List of app short names which images pulled from ONAP
+ONAP_IMAGES_APP_NAMES="CBS"
+
+
+########################################
+# Detailed settings per app
+########################################
+
+# Common env var for auto-test. Vars used by docker-compose need to be exported
+export DOCKER_SIM_NWNAME="nonrtric-docker-net"                  # Name of docker private network
+
+export POLICY_AGENT_EXTERNAL_PORT=8081                          # Policy Agent container external port (host -> container)
+export POLICY_AGENT_INTERNAL_PORT=8081                          # Policy Agent container internal port (container -> container)
+export POLICY_AGENT_EXTERNAL_SECURE_PORT=8433                   # Policy Agent container external secure port (host -> container)
+export POLICY_AGENT_INTERNAL_SECURE_PORT=8433                   # Policy Agent container internal secure port (container -> container)
+export POLICY_AGENT_APIS="V1 V2"                                # Supported northbound api versions
+export PMS_VERSION="V2"                                         # Tested version of northbound API
+
+export POLICY_AGENT_APP_NAME="policy-agent"                     # Name for Policy Agent container
+POLICY_AGENT_LOGPATH="/var/log/policy-agent/application.log"    # Path the application log in the Policy Agent container
+export POLICY_AGENT_APP_NAME_ALIAS="policy-agent-container"     # Alias name, name used by the control panel
+
+export ECS_EXTERNAL_PORT=8083                                   # ECS container external port (host -> container)
+export ECS_INTERNAL_PORT=8083                                   # ECS container internal port (container -> container)
+export ECS_EXTERNAL_SECURE_PORT=8434                            # ECS container external secure port (host -> container)
+export ECS_INTERNAL_SECURE_PORT=8434                            # ECS container internal secure port (container -> container)
+
+export ECS_APP_NAME="ecs"                                       # Name for ECS container
+ECS_LOGPATH="/var/log/enrichment-coordinator-service/application.log" # Path the application log in the ECS container
+export ECS_APP_NAME_ALIAS="enrichment-service-container"        # Alias name, name used by the control panel
+export ECS_HOST_MNT_DIR="./mnt"                                 # Mounted dir, relative to compose file, on the host
+export ECS_CONTAINER_MNT_DIR="/var/enrichment-coordinator-service" # Mounted dir in the container
+
+export MR_EXTERNAL_PORT=3905                                    # MR stub container external port (host -> container)
+export MR_INTERNAL_PORT=3905                                    # MR stub container internal port (container -> container)
+export MR_EXTERNAL_SECURE_PORT=3906                             # MR stub container external secure port (host -> container)
+export MR_INTERNAL_SECURE_PORT=3906                             # MR stub container internal secure port (container -> container)
+export MR_APP_NAME="message-router"                             # Name for the MR
+export MR_READ_URL="/events/A1-POLICY-AGENT-READ/users/policy-agent?timeout=15000&limit=100" # Path to read messages from MR
+export MR_WRITE_URL="/events/A1-POLICY-AGENT-WRITE"             # Path write messages to MR
+
+export CR_EXTERNAL_PORT=8090                                    # Callback receiver container external port (host -> container)
+export CR_INTERNAL_PORT=8090                                    # Callback receiver container internal port (container -> container)
+export CR_EXTERNAL_SECURE_PORT=8091                             # Callback receiver container external secure port (host -> container)
+export CR_INTERNAL_SECURE_PORT=8091                             # Callback receiver container internal secure port (container -> container)
+export CR_APP_NAME="callback-receiver"                          # Name for the Callback receiver
+export CR_APP_CALLBACK="/callbacks"                             # Url for callbacks
+
+export PROD_STUB_EXTERNAL_PORT=8092                             # Producer stub container external port (host -> container)
+export PROD_STUB_INTERNAL_PORT=8092                             # Producer stub container internal port (container -> container)
+export PROD_STUB_EXTERNAL_SECURE_PORT=8093                      # Producer stub container external secure port (host -> container)
+export PROD_STUB_INTERNAL_SECURE_PORT=8093                      # Producer stub container internal secure port (container -> container)
+export PROD_STUB_APP_NAME="producer-stub"                       # Name for the Producer stub
+
+export CONSUL_HOST="consul-server"                              # Host name of consul
+export CONSUL_EXTERNAL_PORT=8500                                # Consul container external port (host -> container)
+export CONSUL_INTERNAL_PORT=8500                                # Consul container internal port (container -> container)
+export CONSUL_APP_NAME="polman-consul"                          # Name for consul container
+
+export CBS_APP_NAME="polman-cbs"                                # Name for CBS container
+export CBS_EXTERNAL_PORT=10000                                  # CBS container external port (host -> container)
+export CBS_INTERNAL_PORT=10000                                  # CBS container internal port (container -> container)
+export CONFIG_BINDING_SERVICE="config-binding-service"          # Host name of CBS
+
+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).
+                                                                # (external ports allocated by docker)
+
+export SDNC_APP_NAME="a1-controller"                            # Name of the SNDC A1 Controller container
+export SDNC_EXTERNAL_PORT=8282                                  # SNDC A1 Controller container external port (host -> container)
+export SDNC_INTERNAL_PORT=8181                                  # SNDC A1 Controller container internal port (container -> container)
+export SDNC_EXTERNAL_SECURE_PORT=8443                           # SNDC A1 Controller container external securee port (host -> container)
+export SDNC_INTERNAL_SECURE_PORT=8443                           # SNDC A1 Controller container internal secure port (container -> container)
+export SDNC_DB_APP_NAME="sdnc-db"                               # Name of the SDNC DB container
+export SDNC_A1_TRUSTSTORE_PASSWORD=""                           # SDNC truststore password
+SDNC_USER="admin"                                               # SDNC username
+SDNC_PWD="Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U"          # SNDC PWD
+SDNC_API_URL="/restconf/operations/A1-ADAPTER-API:"             # Base url path for SNDC API
+SDNC_ALIVE_URL="/apidoc/explorer/"                              # Base url path for SNDC API docs (for alive check)
+SDNC_KARAF_LOG="/opt/opendaylight/data/log/karaf.log"           # Path to karaf log
+
+export RAPP_CAT_EXTERNAL_PORT=8680                             # RAPP Catalogue container external port (host -> container)
+export RAPP_CAT_INTERNAL_PORT=8080                             # RAPP Catalogue container internal port (container -> container)
+export RAPP_CAT_EXTERNAL_SECURE_PORT=8633                      # RAPP Catalogue container external secure port (host -> container)
+export RAPP_CAT_INTERNAL_SECURE_PORT=8433                      # RAPP Catalogue container internal secure port (container -> container)
+export RAPP_CAT_APP_NAME="rapp-catalogue"                      # Name for the RAPP Catalogue
+
+
+export CONTROL_PANEL_APP_NAME="control-panel"                   # Name of the Control Panel container
+export CONTROL_PANEL_EXTERNAL_PORT=8080                         # Control Panel container external port (host -> container)
+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
+
+
+########################################
+# Setting for common curl-base function
+########################################
+
+UUID=""                                                         # UUID used as prefix to the policy id to simulate a real UUID
+                                                                # Testscript need to set the UUID otherwise this empty prefix is used
+
+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, http
+DMAAPBASE_SECURE="https://localhost:"$MR_EXTERNAL_SECURE_PORT   # Base url to the Dmaap adapter, https
+ADAPTER=$RESTBASE                                               # Adapter holds the address the agent R-APP interface (REST OR DMAAP)
+                                                                # The values of this var is swiched between the four base url when needed
+
+ECS_RESTBASE="http://localhost:"$ECS_EXTERNAL_PORT              # Base url to the ECS NB REST interface
+ECS_RESTBASE_SECURE="https://localhost:"$ECS_EXTERNAL_SECURE_PORT # Base url to the secure ECS NB REST interface
+ECS_DMAAPBASE="http://localhost:"$MR_EXTERNAL_PORT              # Base url to the Dmaap adapter, http
+ECS_DMAAPBASE_SECURE="https://localhost:"$MR_EXTERNAL_SECURE_PORT   # Base url to the Dmaap adapter, https
+ECS_ADAPTER=$ECS_RESTBASE                                       # Adapter holds the address the ECS R-APP interface (REST OR DMAAP)
+                                                                # The values of this var is swiched between the four base url when needed
+
+CR_RESTBASE="http://localhost:"$CR_EXTERNAL_PORT                # Base url to the Callback receiver REST interface
+CR_RESTBASE_SECURE="https://localhost:"$CR_EXTERNAL_SECURE_PORT # Base url to the secure Callback receiver REST interface
+CR_ADAPTER=$CR_RESTBASE                                         # Adapter holds the address the CR admin interface (REST only)
+                                                                # The values of this var is swiched between the two base url when needed
+
+RC_RESTBASE="http://localhost:"$RAPP_CAT_EXTERNAL_PORT          # Base url to the RAPP Catalogue REST interface
+RC_RESTBASE_SECURE="https://localhost:"$RAPP_CAT_EXTERNAL_SECURE_PORT # Base url to the secure RAPP Catalogue REST interface
+RC_ADAPTER=$RC_RESTBASE                                         # Adapter holds the address the RAPP Catalogue interface
\ No newline at end of file
index f2783f3..cef8188 100755 (executable)
 #  ============LICENSE_END=================================================
 #
 
-# This is a script that contains all the functions needed for auto test
-# Arg: local|remote|remote-remove [auto-clean] [--stop-at-error] [--ricsim-prefix <prefix> ] [ --env-file <environment-filename> ] [--use-local-image <app-nam> [<app-name>]*]
+# This is a script that contains all the common functions needed for auto test.
+# Specific test function are defined in scripts  XXXX_functions.sh
+
+
+# List of short names for all supported apps, including simulators etc
+APP_SHORT_NAMES="PA RICSIM SDNC CP ECS RC CBS CONSUL RC MRSTUB CR PRODSTUB"
+
+__print_args() {
+       echo "Args: remote|remote-remove --env-file <environment-filename> [release] [auto-clean] [--stop-at-error] "
+       echo "      [--ricsim-prefix <prefix> ] [--use-local-image <app-nam>+]  [--use-snapshot-image <app-nam>+]"
+       echo "      [--use-staging-image <app-nam>+] [--use-release-image <app-nam>+]"
+}
+
+if [ $# -eq 1 ] && [ "$1" == "help" ]; then
+
+       if [ ! -z "$TC_ONELINE_DESCR" ]; then
+               echo "Test script description:"
+               echo $TC_ONELINE_DESCR
+               echo ""
+       fi
+       __print_args
+       echo ""
+       echo "remote                -  Use images from remote repositories. Can be overridden for individual images using the '--use_xxx' flags"
+       echo "remote-remove         -  Same as 'remote' but will also try to pull fresh images from remote repositories"
+       echo "--env-file            -  The script will use the supplied file to read environment variables from"
+       echo "release               -  If this flag is given the script will use release version of the images"
+       echo "auto-clean            -  If the function 'auto_clean_containers' is present in the end of the test script then all containers will be stopped and removed. If 'auto-clean' is not given then the function has no effect."
+    echo "--stop-at-error       -  The script will stop when the first failed test or configuration"
+       echo "--ricsim-prefix       -  The a1 simulator will use the supplied string as container prefix instead of 'ricsim'"
+       echo "--use-local-image     -  The script will use local images for the supplied apps, space separated list of app short names"
+       echo "--use-snapshot-image  -  The script will use images from the nexus snapshot repo for the supplied apps, space separated list of app short names"
+       echo "--use-staging-image   -  The script will use images from the nexus staging repo for the supplied apps, space separated list of app short names"
+       echo "--use-release-image   -  The script will use images from the nexus release repo for the supplied apps, space separated list of app short names"
+       echo ""
+       echo "List of app short names supported: "$APP_SHORT_NAMES
+       exit 0
+fi
+
 
 
 # Create a test case id, ATC (Auto Test Case), from the name of the test case script.
@@ -80,15 +116,29 @@ AGENT_STAND_ALONE=0
 # Var to hold 'auto' in case containers shall be stopped when test case ends
 AUTO_CLEAN=""
 
-# Var to hold the app names to use local image for when running 'remote' or 'remote-remove'
+# Var to hold the app names to use local images for
 USE_LOCAL_IMAGES=""
 
-# List of available apps to override with local image
-AVAILABLE_LOCAL_IMAGES_OVERRIDE="PA ECS CP SDNC RICSIM RC"
+# Var to hold the app names to use remote snapshot images for
+USE_SNAPSHOT_IMAGES=""
+
+# Var to hold the app names to use remote staging images for
+USE_STAGING_IMAGES=""
+
+# Var to hold the app names to use remote release images for
+USE_RELEASE_IMAGES=""
+
+# List of available apps to override with local or remote staging/snapshot/release image
+AVAILABLE_IMAGES_OVERRIDE="PA ECS CP SDNC RICSIM RC"
 
 # 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
 
+# The default value "DEV" indicate that development image tags (SNAPSHOT) and nexus repos (nexus port 10002) are used.
+# The value "RELEASE" indicate that relase image tag and nexus repos (nexus port) are used
+# Applies only to images defined in the test-env files with image names and tags defined as XXXX_RELEASE
+IMAGE_CATEGORY="DEV"
+
 # Function to indent cmd output with one space
 indent1() { sed 's/^/ /'; }
 
@@ -265,12 +315,16 @@ echo "-----------------------------------      Test case setup      ------------
 
 START_ARG=$1
 paramerror=0
+paramerror_str=""
 if [ $# -lt 1 ]; then
        paramerror=1
 fi
 if [ $paramerror -eq 0 ]; then
-       if [ "$1" != "remote" ] && [ "$1" != "remote-remove" ] && [ "$1" != "local" ]; then
+       if [ "$1" != "remote" ] && [ "$1" != "remote-remove" ]; then
                paramerror=1
+               if [ -z "$paramerror_str" ]; then
+                       paramerror_str="First arg shall be 'remote' or 'remote-remove'"
+               fi
        else
                shift;
        fi
@@ -278,6 +332,14 @@ fi
 foundparm=0
 while [ $paramerror -eq 0 ] && [ $foundparm -eq 0 ]; do
        foundparm=1
+       if [ $paramerror -eq 0 ]; then
+               if [ "$1" == "release" ]; then
+                       IMAGE_CATEGORY="RELEASE"
+                       echo "Option set - Release image tags used for applicable images "
+                       shift;
+                       foundparm=0
+               fi
+       fi
        if [ $paramerror -eq 0 ]; then
                if [ "$1" == "auto-clean" ]; then
                        AUTO_CLEAN="auto"
@@ -300,6 +362,9 @@ while [ $paramerror -eq 0 ] && [ $foundparm -eq 0 ]; do
                        RIC_SIM_PREFIX=$1
                        if [ -z "$1" ]; then
                                paramerror=1
+                               if [ -z "$paramerror_str" ]; then
+                                       paramerror_str="No prefix found for flag: '--ricsim-prefix'"
+                               fi
                        else
                                echo "Option set - Overriding RIC_SIM_PREFIX with: "$1
                                shift;
@@ -313,6 +378,9 @@ while [ $paramerror -eq 0 ] && [ $foundparm -eq 0 ]; do
                        TEST_ENV_VAR_FILE=$1
                        if [ -z "$1" ]; then
                                paramerror=1
+                               if [ -z "$paramerror_str" ]; then
+                                       paramerror_str="No env file found for flag: '--env-file'"
+                               fi
                        else
                                echo "Option set - Reading test env from: "$1
                                shift;
@@ -326,16 +394,97 @@ while [ $paramerror -eq 0 ] && [ $foundparm -eq 0 ]; do
                        shift
                        while [ $# -gt 0 ] && [[ "$1" != "--"* ]]; do
                                USE_LOCAL_IMAGES=$USE_LOCAL_IMAGES" "$1
-                               if [[ "$AVAILABLE_LOCAL_IMAGES_OVERRIDE" != *"$1"* ]]; then
+                               if [[ "$AVAILABLE_IMAGES_OVERRIDE" != *"$1"* ]]; then
                                        paramerror=1
+                                       if [ -z "$paramerror_str" ]; then
+                                               paramerror_str="App name $1 is not available for local override for flag: '--use-local-image'"
+                                       fi
                                fi
                                shift;
                        done
                        foundparm=0
                        if [ -z "$USE_LOCAL_IMAGES" ]; then
                                paramerror=1
+                               if [ -z "$paramerror_str" ]; then
+                                       paramerror_str="No app name found for flag: '--use-local-image'"
+                               fi
+                       else
+                               echo "Option set - Overriding with local images for app(s):"$USE_LOCAL_IMAGES
+                       fi
+               fi
+       fi
+       if [ $paramerror -eq 0 ]; then
+               if [ "$1" == "--use-snapshot-image" ]; then
+                       USE_SNAPSHOT_IMAGES=""
+                       shift
+                       while [ $# -gt 0 ] && [[ "$1" != "--"* ]]; do
+                               USE_SNAPSHOT_IMAGES=$USE_SNAPSHOT_IMAGES" "$1
+                               if [[ "$AVAILABLE_IMAGES_OVERRIDE" != *"$1"* ]]; then
+                                       paramerror=1
+                                       if [ -z "$paramerror_str" ]; then
+                                               paramerror_str="App name $1 is not available for snapshot override for flag: '--use-snapshot-image'"
+                                       fi
+                               fi
+                               shift;
+                       done
+                       foundparm=0
+                       if [ -z "$USE_SNAPSHOT_IMAGES" ]; then
+                               paramerror=1
+                               if [ -z "$paramerror_str" ]; then
+                                       paramerror_str="No app name found for flag: '--use-snapshot-image'"
+                               fi
                        else
-                               echo "Option set - Override remote images for app(s):"$USE_LOCAL_IMAGES
+                               echo "Option set - Overriding with snapshot images for app(s):"$USE_SNAPSHOT_IMAGES
+                       fi
+               fi
+       fi
+       if [ $paramerror -eq 0 ]; then
+               if [ "$1" == "--use-staging-image" ]; then
+                       USE_STAGING_IMAGES=""
+                       shift
+                       while [ $# -gt 0 ] && [[ "$1" != "--"* ]]; do
+                               USE_STAGING_IMAGES=$USE_STAGING_IMAGES" "$1
+                               if [[ "$AVAILABLE_IMAGES_OVERRIDE" != *"$1"* ]]; then
+                                       paramerror=1
+                                       if [ -z "$paramerror_str" ]; then
+                                               paramerror_str="App name $1 is not available for staging override for flag: '--use-staging-image'"
+                                       fi
+                               fi
+                               shift;
+                       done
+                       foundparm=0
+                       if [ -z "$USE_STAGING_IMAGES" ]; then
+                               paramerror=1
+                               if [ -z "$paramerror_str" ]; then
+                                       paramerror_str="No app name found for flag: '--use-staging-image'"
+                               fi
+                       else
+                               echo "Option set - Overriding with staging images for app(s):"$USE_STAGING_IMAGES
+                       fi
+               fi
+       fi
+       if [ $paramerror -eq 0 ]; then
+               if [ "$1" == "--use-release-image" ]; then
+                       USE_RELEASE_IMAGES=""
+                       shift
+                       while [ $# -gt 0 ] && [[ "$1" != "--"* ]]; do
+                               USE_RELEASE_IMAGES=$USE_RELEASE_IMAGES" "$1
+                               if [[ "$AVAILABLE_IMAGES_OVERRIDE" != *"$1"* ]]; then
+                                       paramerror=1
+                                       if [ -z "$paramerror_str" ]; then
+                                               paramerror_str="App name $1 is not available for release override for flag: '--use-release-image'"
+                                       fi
+                               fi
+                               shift;
+                       done
+                       foundparm=0
+                       if [ -z "$USE_RELEASE_IMAGES" ]; then
+                               paramerror=1
+                               if [ -z "$paramerror_str" ]; then
+                                       paramerror_str="No app name found for flag: '--use-release-image'"
+                               fi
+                       else
+                               echo "Option set - Overriding with release images for app(s):"$USE_RELEASE_IMAGES
                        fi
                fi
        fi
@@ -345,10 +494,14 @@ echo ""
 #Still params left?
 if [ $paramerror -eq 0 ] && [ $# -gt 0 ]; then
        paramerror=1
+       if [ -z "$paramerror_str" ]; then
+               paramerror_str="Unknown parameter(s): "$@
+       fi
 fi
 
 if [ $paramerror -eq 1 ]; then
-       echo -e $RED"Expected arg: local|remote|remote-remove [auto-clean] [--stop-at-error] [--ricsim-prefix <prefix> ] [ --env-file <environment-filename> ] [--use-local-image <app-nam> [<app-name>]*]"$ERED
+       echo -e $RED"Incorrect arg list: "$paramerror_str$ERED
+       __print_args
        exit 1
 fi
 
@@ -358,12 +511,13 @@ if [ -f "$TEST_ENV_VAR_FILE" ]; then
        . $TEST_ENV_VAR_FILE
 
        if [ -z "$TEST_ENV_PROFILE" ] || [ -z "$SUPPORTED_PROFILES" ]; then
-               echo -e $YELLOW"This test case may no work with selected test env file. TEST_ENV_PROFILE is missing in test_env file or SUPPORTED_PROFILES is missing in test case file"$EYELLOW
+               echo -e $YELLOW"This test case may not work with selected test env file. TEST_ENV_PROFILE is missing in test_env file or SUPPORTED_PROFILES is missing in test case file"$EYELLOW
        else
                if [[ "$SUPPORTED_PROFILES" == *"$TEST_ENV_PROFILE"* ]]; then
                        echo -e $GREEN"Test case support the selected test env file"$EGREEN
                else
                        echo -e $RED"Test case does not support the selected test env file"$ERED
+                       echo "Profile: "$TEST_ENV_PROFILE"     Supported profiles: "$SUPPORTED_PROFILES
                        echo -e $RED"Exiting...."$ERED
                        exit 1
                fi
@@ -376,6 +530,12 @@ else
        exit 1
 fi
 
+if [ -z "$PROJECT_IMAGES_APP_NAMES" ]; then
+       echo -e $RED"Var PROJECT_IMAGES_APP_NAMES must be defined in: "$TEST_ENV_VAR_FILE$ERED$ERED
+       exit 1
+fi
+
+
 #Vars for A1 interface version and container count
 G1_A1_VERSION=""
 G2_A1_VERSION=""
@@ -422,13 +582,13 @@ echo -e $BOLD"Checking configured image setting for this test case"$EBOLD
 IMAGE_ERR=0
 #Create a file with image info for later printing as a table
 image_list_file="./tmp/.image-list"
-echo -e " Container\tImage\ttag" > $image_list_file
+echo -e " Container\tImage\ttag\ttag-switch" > $image_list_file
 
 # Check if image env var is set and if so export the env var with image to use (used by docker compose files)
-# arg: <image name> <script start-arg> <target-variable-name> <image-variable-name> <image-tag-variable-name> <app-short-name>
-__check_image_var() {
+# arg: <image name> <target-variable-name> <image-variable-name> <image-tag-variable-name> <tag-suffix> <app-short-name>
+__check_and_create_image_var() {
        if [ $# -ne 6 ]; then
-               echo "Expected arg: <image name> <script start-arg> <target-variable-name> <image-variable-name> <image-tag-variable-name> <app-short-name>"
+               echo "Expected arg: <image name> <target-variable-name> <image-variable-name> <image-tag-variable-name> <tag-suffix> <app-short-name>"
                ((IMAGE_ERR++))
                return
        fi
@@ -440,42 +600,50 @@ __check_image_var() {
        fi
        tmp=${1}"\t"
        #Create var from the input var names
-       image="${!4}"
-       tag="${!5}"
+       image="${!3}"
+       tmptag=$4"_"$5
+       tag="${!tmptag}"
 
        if [ -z $image ]; then
-               echo -e $RED"\$"$4" not set in $TEST_ENV_VAR_FILE"$ERED
-               ((IMAGE_ERR++))
+               echo -e $RED"\$"$3" not set in $TEST_ENV_VAR_FILE"$ERED
+               ((IMAGE_ERR++))
                echo ""
                tmp=$tmp"<no-image>\t"
        else
+               #Add repo depending on image type
+               if [ "$5" == "REMOTE_RELEASE" ]; then
+                       image=$NEXUS_RELEASE_REPO$image
+               fi
+               if [ "$5" == "REMOTE" ]; then
+                       image=$NEXUS_STAGING_REPO$image
+               fi
+               if [ "$5" == "REMOTE_SNAPSHOT" ]; then
+                       image=$NEXUS_SNAPSHOT_REPO$image
+               fi
+               if [ "$5" == "REMOTE_PROXY" ]; then
+                       image=$NEXUS_PROXY_REPO$image
+               fi
+               if [ "$5" == "REMOTE_RELEASE_ONAP" ]; then
+                       image=$NEXUS_RELEASE_REPO_ONAP$image
+               fi
+               if [ "$5" == "REMOTE_RELEASE_ORAN" ]; then
+                       image=$NEXUS_RELEASE_REPO_ORAN$image
+               fi
+               #No nexus repo added for local images, tag: LOCAL
                tmp=$tmp$image"\t"
        fi
        if [ -z $tag ]; then
-               echo -e $RED"\$"$5" not set in $TEST_ENV_VAR_FILE"$ERED
-               ((IMAGE_ERR++))
+               echo -e $RED"\$"$tmptag" not set in $TEST_ENV_VAR_FILE"$ERED
+               ((IMAGE_ERR++))
                echo ""
                tmp=$tmp"<no-tag>\t"
        else
                tmp=$tmp$tag
        fi
+       tmp=$tmp"\t"$5
        echo -e "$tmp" >> $image_list_file
        #Export the env var
-       export "${3}"=$image":"$tag
-
-       #echo " Configured image for ${1} (script start arg=${2}): "$image":"$tag
-}
-
-
-#Check if app local image shall override remote image
-# Possible IDs for local image override: PA, CP, SDNC, RICSIM, ECS
-__check_image_local_override() {
-       for im in $USE_LOCAL_IMAGES; do
-               if [ "$1" == "$im" ]; then
-                       return 1
-               fi
-       done
-       return 0
+       export "${2}"=$image":"$tag
 }
 
 # Check if app uses image included in this test run
@@ -490,93 +658,142 @@ __check_included_image() {
        return 1
 }
 
-# Check that image env setting are available
-echo ""
-
-if [ $START_ARG == "local" ]; then
-
-       #Local agent image
-       __check_image_var " Policy Agent" $START_ARG "POLICY_AGENT_IMAGE" "POLICY_AGENT_LOCAL_IMAGE" "POLICY_AGENT_LOCAL_IMAGE_TAG" PA
+__check_image_local_override() {
+       for im in $USE_LOCAL_IMAGES; do
+               if [ "$1" == "$im" ]; then
+                       return 1
+               fi
+       done
+       return 0
+}
 
-       #Local Control Panel image
-       __check_image_var " Control Panel" $START_ARG "CONTROL_PANEL_IMAGE" "CONTROL_PANEL_LOCAL_IMAGE" "CONTROL_PANEL_LOCAL_IMAGE_TAG" CP
+# Check if app uses image override
+# Returns the image/tag suffix LOCAL for local image or REMOTE/REMOTE_RELEASE/REMOTE_SNAPSHOT for staging/release/snapshot image
+__check_image_override() {
 
-       #Local SNDC image
-       __check_image_var " SDNC A1 Controller" $START_ARG "SDNC_A1_CONTROLLER_IMAGE" "SDNC_A1_CONTROLLER_LOCAL_IMAGE" "SDNC_A1_CONTROLLER_LOCAL_IMAGE_TAG" SDNC
+       for im in $ORAN_IMAGES_APP_NAMES; do
+               if [ "$1" == "$im" ]; then
+                       echo "REMOTE_RELEASE_ORAN"
+                       return 0
+               fi
+       done
 
-       #Local ric sim image
-       __check_image_var " RIC Simulator" $START_ARG "RIC_SIM_IMAGE" "RIC_SIM_LOCAL_IMAGE" "RIC_SIM_LOCAL_IMAGE_TAG" RICSIM
+       for im in $ONAP_IMAGES_APP_NAMES; do
+               if [ "$1" == "$im" ]; then
+                       echo "REMOTE_RELEASE_ONAP"
+                       return 0
+               fi
+       done
 
-elif [ $START_ARG == "remote" ] || [ $START_ARG == "remote-remove" ]; then
+       found=0
+       for im in $PROJECT_IMAGES_APP_NAMES; do
+               if [ "$1" == "$im" ]; then
+                       found=1
+               fi
+       done
 
-       __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" PA
-       else
-               #Local agent image
-               __check_image_var " Policy Agent" $START_ARG "POLICY_AGENT_IMAGE" "POLICY_AGENT_LOCAL_IMAGE" "POLICY_AGENT_LOCAL_IMAGE_TAG" PA
+       if [ $found -eq 0 ]; then
+               echo "REMOTE_PROXY"
+               return 0
        fi
 
-       __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" CP
-       else
-               #Local Control Panel image
-               __check_image_var " Control Panel" $START_ARG "CONTROL_PANEL_IMAGE" "CONTROL_PANEL_LOCAL_IMAGE" "CONTROL_PANEL_LOCAL_IMAGE_TAG" CP
+       suffix=""
+       if [ $IMAGE_CATEGORY == "RELEASE" ]; then
+               suffix="REMOTE_RELEASE"
        fi
-
-       __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" SDNC
-       else
-               #Local SNDC image
-               __check_image_var " SDNC A1 Controller" $START_ARG "SDNC_A1_CONTROLLER_IMAGE" "SDNC_A1_CONTROLLER_LOCAL_IMAGE" "SDNC_A1_CONTROLLER_LOCAL_IMAGE_TAG" SDNC
+       if [ $IMAGE_CATEGORY == "DEV" ]; then
+               suffix="REMOTE"
        fi
-
-       __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" RICSIM
-       else
-               #Local ric sim image
-               __check_image_var " RIC Simulator" $START_ARG "RIC_SIM_IMAGE" "RIC_SIM_LOCAL_IMAGE" "RIC_SIM_LOCAL_IMAGE_TAG" RICSIM
+       CTR=0
+       for im in $USE_STAGING_IMAGES; do
+               if [ "$1" == "$im" ]; then
+                       suffix="REMOTE"
+                       ((CTR++))
+               fi
+       done
+       for im in $USE_RELEASE_IMAGES; do
+               if [ "$1" == "$im" ]; then
+                       suffix="REMOTE_RELEASE"
+                       ((CTR++))
+               fi
+       done
+       for im in $USE_SNAPSHOT_IMAGES; do
+               if [ "$1" == "$im" ]; then
+                       suffix="REMOTE_SNAPSHOT"
+                       ((CTR++))
+               fi
+       done
+       for im in $USE_LOCAL_IMAGES; do
+               if [ "$1" == "$im" ]; then
+                       suffix="LOCAL"
+                       ((CTR++))
+               fi
+       done
+       echo $suffix
+       if [ $CTR -gt 1 ]; then
+               exit 1
        fi
+       return 0
+}
 
-       __check_image_local_override 'ECS'
-       if [ $? -eq 0 ]; then
-               #Remote ecs image
-               __check_image_var " ECS" $START_ARG "ECS_IMAGE" "ECS_REMOTE_IMAGE" "ECS_REMOTE_IMAGE_TAG" ECS
-       else
-               #Local ecs image
-               __check_image_var " ECS" $START_ARG "ECS_IMAGE" "ECS_LOCAL_IMAGE" "ECS_LOCAL_IMAGE_TAG" ECS
-       fi
+# Check that image env setting are available
+echo ""
 
-               __check_image_local_override 'RC'
-       if [ $? -eq 0 ]; then
-               #Remote ecs image
-               __check_image_var " RC" $START_ARG "RAPP_CAT_IMAGE" "RAPP_CAT_REMOTE_IMAGE" "RAPP_CAT_REMOTE_IMAGE_TAG" RC
-       else
-               #Local ecs image
-               __check_image_var " RC" $START_ARG "RAPP_CAT_IMAGE" "RAPP_CAT_LOCAL_IMAGE" "RAPP_CAT_LOCAL_IMAGE_TAG" RC
-       fi
+#Agent image
+IMAGE_SUFFIX=$(__check_image_override 'PA')
+if [ $? -ne 0 ]; then
+       echo -e $RED"Image setting from cmd line not consistent for PA."$ERED
+       ((IMAGE_ERR++))
+fi
+__check_and_create_image_var " Policy Agent" "POLICY_AGENT_IMAGE" "POLICY_AGENT_IMAGE_BASE" "POLICY_AGENT_IMAGE_TAG" $IMAGE_SUFFIX PA
 
-else
-       #Should never get here....
-       echo "Unknow args: "$@
-       exit 1
+#Remote Control Panel image
+IMAGE_SUFFIX=$(__check_image_override 'CP')
+if [ $? -ne 0 ]; then
+       echo -e $RED"Image setting from cmd line not consistent for CP."$ERED
+       ((IMAGE_ERR++))
+fi
+__check_and_create_image_var " Control Panel" "CONTROL_PANEL_IMAGE" "CONTROL_PANEL_IMAGE_BASE" "CONTROL_PANEL_IMAGE_TAG" $IMAGE_SUFFIX CP
+
+#Remote SDNC image
+IMAGE_SUFFIX=$(__check_image_override 'SDNC')
+if [ $? -ne 0 ]; then
+       echo -e $RED"Image setting from cmd line not consistent for SDNC."$ERED
+       ((IMAGE_ERR++))
 fi
+__check_and_create_image_var " SDNC A1 Controller" "SDNC_A1_CONTROLLER_IMAGE" "SDNC_A1_CONTROLLER_IMAGE_BASE" "SDNC_A1_CONTROLLER_IMAGE_TAG" $IMAGE_SUFFIX SDNC
 
+#Remote ric sim image
+IMAGE_SUFFIX=$(__check_image_override 'RICSIM')
+if [ $? -ne 0 ]; then
+       echo -e $RED"Image setting from cmd line not consistent for RICSIM."$ERED
+       ((IMAGE_ERR++))
+fi
+__check_and_create_image_var " RIC Simulator" "RIC_SIM_IMAGE" "RIC_SIM_IMAGE_BASE" "RIC_SIM_IMAGE_TAG" $IMAGE_SUFFIX RICSIM
+
+#Remote ecs image
+IMAGE_SUFFIX=$(__check_image_override 'ECS')
+if [ $? -ne 0 ]; then
+       echo -e $RED"Image setting from cmd line not consistent for ECS."$EREDs
+       ((IMAGE_ERR++))
+fi
+__check_and_create_image_var " ECS" "ECS_IMAGE" "ECS_IMAGE_BASE" "ECS_IMAGE_TAG" $IMAGE_SUFFIX ECS
+
+#Remote rc image
+IMAGE_SUFFIX=$(__check_image_override 'RC')
+if [ $? -ne 0 ]; then
+       echo -e $RED"Image setting from cmd line not consistent for RC."$ERED
+       ((IMAGE_ERR++))
+fi
+__check_and_create_image_var " RC" "RAPP_CAT_IMAGE" "RAPP_CAT_IMAGE_BASE" "RAPP_CAT_IMAGE_TAG" $IMAGE_SUFFIX RC
 
 # These images are not built as part of this project official images, just check that env vars are set correctly
-__check_image_var " Message Router" $START_ARG "MRSTUB_IMAGE" "MRSTUB_LOCAL_IMAGE" "MRSTUB_LOCAL_IMAGE_TAG" MR
-__check_image_var " Callback Receiver" $START_ARG "CR_IMAGE" "CR_LOCAL_IMAGE" "CR_LOCAL_IMAGE_TAG" CR
-__check_image_var " Producer stub" $START_ARG "PROD_STUB_IMAGE" "PROD_STUB_LOCAL_IMAGE" "PROD_STUB_LOCAL_IMAGE_TAG" PRODSTUB
-__check_image_var " Consul" $START_ARG "CONSUL_IMAGE" "CONSUL_REMOTE_IMAGE" "CONSUL_REMOTE_IMAGE_TAG" CONSUL
-__check_image_var " CBS" $START_ARG "CBS_IMAGE" "CBS_REMOTE_IMAGE" "CBS_REMOTE_IMAGE_TAG" CBS
-__check_image_var " SDNC DB" $START_ARG "SDNC_DB_IMAGE" "SDNC_DB_REMOTE_IMAGE" "SDNC_DB_REMOTE_IMAGE_TAG" SDNC #Uses sdnc app name
+__check_and_create_image_var " Message Router"    "MRSTUB_IMAGE"    "MRSTUB_IMAGE_BASE"    "MRSTUB_IMAGE_TAG"    LOCAL               MR
+__check_and_create_image_var " Callback Receiver" "CR_IMAGE"        "CR_IMAGE_BASE"        "CR_IMAGE_TAG"        LOCAL               CR
+__check_and_create_image_var " Producer stub"     "PROD_STUB_IMAGE" "PROD_STUB_IMAGE_BASE" "PROD_STUB_IMAGE_TAG" LOCAL               PRODSTUB
+__check_and_create_image_var " Consul"            "CONSUL_IMAGE"    "CONSUL_IMAGE_BASE"    "CONSUL_IMAGE_TAG"    REMOTE_PROXY        CONSUL
+__check_and_create_image_var " CBS"               "CBS_IMAGE"       "CBS_IMAGE_BASE"       "CBS_IMAGE_TAG"       REMOTE_RELEASE_ONAP CBS
+__check_and_create_image_var " SDNC DB"           "SDNC_DB_IMAGE"   "SDNC_DB_IMAGE_BASE"   "SDNC_DB_IMAGE_TAG"   REMOTE_PROXY        SDNC #Uses sdnc app name
 
 #Errors in image setting - exit
 if [ $IMAGE_ERR -ne 0 ]; then
@@ -656,35 +873,52 @@ __check_and_pull_image() {
                                fi
                        fi
                        echo -e "  Attempt to stop and remove container(s), if running - "$GREEN"stopped removed"$EGREEN
-                       echo -ne "  Removing image - ${SAMELINE}"
-                       tmp="$(docker images -q ${4})" &> /dev/null
-                       if [ $? -eq 0 ] && [ ! -z "$tmp" ]; then
-                               docker rmi --force $4 &> ./tmp/.dockererr
-                               if [ $? -ne 0 ]; then
-                                       ((IMAGE_ERR++))
-                                       echo ""
-                                       echo -e $RED"  Image could not be removed - try manual removal of the image"$ERED
-                                       cat ./tmp/.dockererr
-                                       return 1
-                               fi
-                               echo -e "  Removing image - "$GREEN"removed"$EGREEN
-                       else
-                               echo -e "  Removing image - "$GREEN"image not in repository"$EGREEN
-                       fi
+                       echo -ne "  Removing image - ${SAMELINE}"
+                       tmp="$(docker images -q ${4})" &> /dev/null
+                       if [ $? -eq 0 ] && [ ! -z "$tmp" ]; then
+                       #       docker rmi --force $4 &> ./tmp/.dockererr
+                       #       if [ $? -ne 0 ]; then
+                       #               ((IMAGE_ERR++))
+                       #               echo ""
+                       #               echo -e $RED"  Image could not be removed - try manual removal of the image"$ERED
+                       #               cat ./tmp/.dockererr
+                       #               return 1
+                       #       fi
+                       #       echo -e "  Removing image - "$GREEN"removed"$EGREEN
+                       else
+                       #       echo -e "  Removing image - "$GREEN"image not in repository"$EGREEN
+                       fi
                        tmp_im=""
                fi
                if [ -z "$tmp_im" ]; then
                        echo -ne "  Pulling image${SAMELINE}"
-                       docker pull $4  &> ./tmp/.dockererr
-                       tmp_im=$(docker images ${4} | grep -v REPOSITORY)
-                       if [ -z "$tmp_im" ]; then
+                       # docker pull $4        &> ./tmp/.dockererr
+                       # tmp_im=$(docker images ${4} | grep -v REPOSITORY)
+                       # if [ -z "$tmp_im" ]; then
+                       #       echo ""
+                       #       echo -e "  Pulling image -$RED could not be pulled"$ERED
+                       #       ((IMAGE_ERR++))
+                       #       cat ./tmp/.dockererr
+                       #       return 1
+                       # fi
+                       # echo -e "  Pulling image -$GREEN Pulled $EGREEN"
+                       out=$(docker pull $4)
+                       if [ $? -ne 0 ]; then
                                echo ""
                                echo -e "  Pulling image -$RED could not be pulled"$ERED
                                ((IMAGE_ERR++))
-                               cat ./tmp/.dockererr
+                               echo $out > ./tmp/.dockererr
+                               echo $out
                                return 1
                        fi
-                       echo -e "  Pulling image -$GREEN Pulled $EGREEN"
+                       echo $out > ./tmp/.dockererr
+                       if [[ $out == *"up to date"* ]]; then
+                               echo -e "  Pulling image -$GREEN Image is up to date $EGREEN"
+                       elif [[ $out == *"Downloaded newer image"* ]]; then
+                               echo -e "  Pulling image -$GREEN Newer image pulled $EGREEN"
+                       else
+                               echo -e "  Pulling image -$GREEN Pulled $EGREEN"
+                       fi
                else
                        echo -e "  Pulling image -$GREEN OK $EGREEN(exists in local repository)"
                fi
@@ -789,6 +1023,10 @@ if [ $IMAGE_ERR -ne 0 ]; then
        echo "#################################################################################################"
        echo -e $RED"One or more images could not be pulled or containers using the images could not be stopped/removed"$ERED
        echo -e $RED"Or local image, overriding remote image, does not exist"$ERED
+       if [ $IMAGE_CATEGORY == "DEV" ]; then
+               echo -e $RED"Note that SNAPSHOT images may be purged from nexus after a certain period."$ERED
+               echo -e $RED"In that case, switch to use a released image instead."$ERED
+       fi
        echo "#################################################################################################"
        echo ""
        exit 1
@@ -803,8 +1041,8 @@ __check_included_image 'MR'
 if [ $? -eq 0 ]; then
        cd $curdir
        cd ../mrstub
-       echo " Building mrstub image: $MRSTUB_LOCAL_IMAGE:$MRSTUB_LOCAL_IMAGE_TAG"
-       docker build  --build-arg NEXUS_PROXY_REPO=$NEXUS_PROXY_REPO -t $MRSTUB_LOCAL_IMAGE . &> .dockererr
+       echo " Building mrstub image: $MRSTUB_IMAGE:$MRSTUB_IMAGE_TAG_LOCAL"
+       docker build  --build-arg NEXUS_PROXY_REPO=$NEXUS_PROXY_REPO -t $MRSTUB_IMAGE . &> .dockererr
        if [ $? -eq 0 ]; then
                echo -e  $GREEN" Build Ok"$EGREEN
        else
@@ -822,8 +1060,8 @@ fi
 __check_included_image 'CR'
 if [ $? -eq 0 ]; then
        cd ../cr
-       echo " Building Callback Receiver image: $CR_LOCAL_IMAGE:$CR_IMAGE_TAG"
-       docker build  --build-arg NEXUS_PROXY_REPO=$NEXUS_PROXY_REPO -t $CR_LOCAL_IMAGE . &> .dockererr
+       echo " Building Callback Receiver image: $CR_IMAGE:$CR_IMAGE_TAG_LOCAL"
+       docker build  --build-arg NEXUS_PROXY_REPO=$NEXUS_PROXY_REPO -t $CR_IMAGE . &> .dockererr
        if [ $? -eq 0 ]; then
                echo -e  $GREEN" Build Ok"$EGREEN
        else
@@ -841,8 +1079,8 @@ fi
 __check_included_image 'PRODSTUB'
 if [ $? -eq 0 ]; then
        cd ../prodstub
-       echo " Building Producer stub image: $PROD_STUB_LOCAL_IMAGE:$PROD_STUB_LOCAL_IMAGE_TAG"
-       docker build  --build-arg NEXUS_PROXY_REPO=$NEXUS_PROXY_REPO -t $PROD_STUB_LOCAL_IMAGE . &> .dockererr
+       echo " Building Producer stub image: $PROD_STUB_IMAGE:$PROD_STUB_IMAGE_TAG_LOCAL"
+       docker build  --build-arg NEXUS_PROXY_REPO=$NEXUS_PROXY_REPO -t $PROD_STUB_IMAGE . &> .dockererr
        if [ $? -eq 0 ]; then
                echo -e  $GREEN" Build Ok"$EGREEN
        else
@@ -895,7 +1133,7 @@ if [ $? -eq 0 ]; then
 fi
 __check_included_image 'PRODSTUB'
 if [ $? -eq 0 ]; then
-       echo -e " Produccer stub\t$(docker images --format $format_string $PROD_STUB_IMAGE)" >>   $docker_tmp_file
+       echo -e " Producer stub\t$(docker images --format $format_string $PROD_STUB_IMAGE)" >>   $docker_tmp_file
 fi
 __check_included_image 'CONSUL'
 if [ $? -eq 0 ]; then