Rename enrichment coordinator service to information coordinator service 30/7130/1
authorPatrikBuhr <patrik.buhr@est.tech>
Fri, 26 Nov 2021 13:47:25 +0000 (14:47 +0100)
committerPatrikBuhr <patrik.buhr@est.tech>
Fri, 26 Nov 2021 13:52:50 +0000 (14:52 +0100)
Some more changes.

Signed-off-by: PatrikBuhr <patrik.buhr@est.tech>
Issue-ID: NONRTRIC-625
Change-Id: If2bfda7f019858f674e7b914af8da55691d07001

14 files changed:
dmaap-adaptor-java/src/test/java/org/oran/dmaapadapter/IcsSimulatorController.java
dmaap-adaptor-java/src/test/java/org/oran/dmaapadapter/IntegrationWithIcs.java
dmaap-mediator-producer/README.md
dmaap-mediator-producer/internal/config/config.go
dmaap-mediator-producer/internal/config/config_test.go
docker-compose/.env
docker-compose/README.md
docker-compose/dmaap-mediator-go/docker-compose.yaml
docker-compose/ecs/docker-compose.yaml
enrichment-coordinator-service [deleted symlink]
information-coordinator-service/api/ics-api.json
information-coordinator-service/api/ics-api.yaml
information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1consumer/ConsumerJobInfo.java
information-coordinator-service/src/test/java/org/oransc/ics/MockInformationService.java [moved from information-coordinator-service/src/test/java/org/oransc/ics/MockEnrichmentService.java with 98% similarity]

index bff2634..790aafb 100644 (file)
@@ -104,13 +104,13 @@ public class IcsSimulatorController {
         ProducerJobInfo request =
                 new ProducerJobInfo(job.jobDefinition, jobId, job.infoTypeId, job.jobResultUri, job.owner, "TIMESTAMP");
         String body = gson.toJson(request);
-        logger.info("ECS Simulator PUT job: {}", body);
+        logger.info("ICS Simulator PUT job: {}", body);
         restClient.post(url, body, MediaType.APPLICATION_JSON).block();
     }
 
     public void deleteJob(String jobId, AsyncRestClient restClient) {
         String url = this.testResults.registrationInfo.jobCallbackUrl + "/" + jobId;
-        logger.info("ECS Simulator DELETE job: {}", url);
+        logger.info("ICS Simulator DELETE job: {}", url);
         restClient.delete(url).block();
 
     }
index 12696ed..d1d7e91 100644 (file)
@@ -59,9 +59,9 @@ import org.springframework.test.context.junit.jupiter.SpringExtension;
         "server.ssl.key-store=./config/keystore.jks", //
         "app.webclient.trust-store=./config/truststore.jks", //
         "app.configuration-filepath=./src/test/resources/test_application_configuration.json", //
-        "app.ecs-base-url=https://localhost:8434" //
+        "app.ics-base-url=https://localhost:8434" //
 })
-class IntegrationWithEcs {
+class IntegrationWithIcs {
 
     private static final String DMAAP_JOB_ID = "DMAAP_JOB_ID";
     private static final String DMAAP_TYPE_ID = "DmaapInformationType";
@@ -160,25 +160,25 @@ class IntegrationWithEcs {
         return "https://localhost:" + this.applicationConfig.getLocalServerHttpPort();
     }
 
-    private String ecsBaseUrl() {
+    private String icsBaseUrl() {
         return applicationConfig.getIcsBaseUrl();
     }
 
     private String jobUrl(String jobId) {
-        return ecsBaseUrl() + "/data-consumer/v1/info-jobs/" + jobId + "?typeCheck=true";
+        return icsBaseUrl() + "/data-consumer/v1/info-jobs/" + jobId + "?typeCheck=true";
     }
 
-    private void createInformationJobInEcs(String typeId, String jobId, String filter) {
+    private void createInformationJobInIcs(String typeId, String jobId, String filter) {
         String body = gson.toJson(consumerJobInfo(typeId, filter));
         try {
             // Delete the job if it already exists
-            deleteInformationJobInEcs(jobId);
+            deleteInformationJobInIcs(jobId);
         } catch (Exception e) {
         }
         restClient().putForEntity(jobUrl(jobId), body).block();
     }
 
-    private void deleteInformationJobInEcs(String jobId) {
+    private void deleteInformationJobInIcs(String jobId) {
         restClient().delete(jobUrl(jobId)).block();
     }
 
@@ -227,7 +227,7 @@ class IntegrationWithEcs {
 
         await().untilAsserted(() -> assertThat(this.jobs.size()).isEqualTo(1));
 
-        deleteInformationJobInEcs("KAFKA_JOB_ID");
+        deleteInformationJobInIcs("KAFKA_JOB_ID");
         await().untilAsserted(() -> assertThat(this.jobs.size()).isZero());
     }
 
@@ -235,7 +235,7 @@ class IntegrationWithEcs {
     void testWholeChain() throws Exception {
         await().untilAsserted(() -> assertThat(producerRegstrationTask.isRegisteredInIcs()).isTrue());
 
-        createInformationJobInEcs(DMAAP_TYPE_ID, DMAAP_JOB_ID, ".*DmaapResponse.*");
+        createInformationJobInIcs(DMAAP_TYPE_ID, DMAAP_JOB_ID, ".*DmaapResponse.*");
 
         await().untilAsserted(() -> assertThat(this.jobs.size()).isEqualTo(1));
 
@@ -247,15 +247,10 @@ class IntegrationWithEcs {
         await().untilAsserted(() -> assertThat(results.receivedBodies.size()).isEqualTo(2));
         assertThat(results.receivedBodies.get(0)).isEqualTo("DmaapResponse1");
 
-        deleteInformationJobInEcs(DMAAP_JOB_ID);
+        deleteInformationJobInIcs(DMAAP_JOB_ID);
 
         await().untilAsserted(() -> assertThat(this.jobs.size()).isZero());
 
-        synchronized (this) {
-            // logger.warn("**************** Keeping server alive! " +
-            // this.applicationConfig.getLocalServerHttpPort());
-            // this.wait();
-        }
     }
 
 }
index 9a0903b..69a4626 100644 (file)
@@ -8,7 +8,7 @@ The producer takes a number of environment variables, described below, as config
 
 >- INFO_PRODUCER_HOST  **Required**. The host for the producer.                                   Example: `https://mrproducer`
 >- INFO_PRODUCER_PORT  Optional. The port for the product.                                        Defaults to `8085`.
->- INFO_COORD_ADDR     Optional. The address of the Information Coordinator.                      Defaults to `https://enrichmentservice:8434`.
+>- INFO_COORD_ADDR     Optional. The address of the Information Coordinator.                      Defaults to `https://informationservice:8434`.
 >- DMAAP_MR_ADDR       Optional. The address of the DMaaP Message Router.                         Defaults to `https://message-router.onap:3905`.
 >- PRODUCER_CERT_PATH  Optional. The path to the certificate to use for https.                    Defaults to `security/producer.crt`
 >- PRODUCER_KEY_PATH   Optional. The path to the key to the certificate to use for https.         Defaults to `security/producer.key`
index 34b056d..e03c40a 100644 (file)
@@ -43,7 +43,7 @@ func New() *Config {
        return &Config{
                InfoProducerHost:       getEnv("INFO_PRODUCER_HOST", ""),
                InfoProducerPort:       getEnvAsInt("INFO_PRODUCER_PORT", 8085),
-               InfoCoordinatorAddress: getEnv("INFO_COORD_ADDR", "https://enrichmentservice:8434"),
+               InfoCoordinatorAddress: getEnv("INFO_COORD_ADDR", "https://informationservice:8434"),
                DMaaPMRAddress:         getEnv("DMAAP_MR_ADDR", "https://message-router.onap:3905"),
                ProducerCertPath:       getEnv("PRODUCER_CERT_PATH", "security/producer.crt"),
                ProducerKeyPath:        getEnv("PRODUCER_KEY_PATH", "security/producer.key"),
index 293e0d0..faf5900 100644 (file)
@@ -70,7 +70,7 @@ func TestNew_faultyIntValueSetConfigContainDefaultValueAndWarnInLog(t *testing.T
                LogLevel:               log.InfoLevel,
                InfoProducerHost:       "",
                InfoProducerPort:       8085,
-               InfoCoordinatorAddress: "https://enrichmentservice:8434",
+               InfoCoordinatorAddress: "https://informationservice:8434",
                DMaaPMRAddress:         "https://message-router.onap:3905",
                ProducerCertPath:       "security/producer.crt",
                ProducerKeyPath:        "security/producer.key",
@@ -96,7 +96,7 @@ func TestNew_envFaultyLogLevelConfigContainDefaultValues(t *testing.T) {
                LogLevel:               log.InfoLevel,
                InfoProducerHost:       "",
                InfoProducerPort:       8085,
-               InfoCoordinatorAddress: "https://enrichmentservice:8434",
+               InfoCoordinatorAddress: "https://informationservice:8434",
                DMaaPMRAddress:         "https://message-router.onap:3905",
                ProducerCertPath:       "security/producer.crt",
                ProducerKeyPath:        "security/producer.key",
index 6fc3528..8c247be 100644 (file)
@@ -36,7 +36,7 @@ NONRTRIC_GATEWAY_IMAGE_BASE="nexus3.o-ran-sc.org:10002/o-ran-sc/nonrtric-gateway
 NONRTRIC_GATEWAY_IMAGE_TAG="1.0.0"
 
 #ECS
-ECS_IMAGE_BASE="nexus3.o-ran-sc.org:10002/o-ran-sc/nonrtric-enrichment-coordinator-service"
+ECS_IMAGE_BASE="nexus3.o-ran-sc.org:10002/o-ran-sc/nonrtric-information-coordinator-service"
 ECS_IMAGE_TAG="1.1.0"
 
 #CONSUMER
@@ -61,4 +61,4 @@ DMAAP_MEDIATOR_GO_TAG="1.0,0"
 
 #DMAAP_MEDIATOR_JAVA
 DMAAP_MEDIATOR_JAVA_BASE="nexus3.o-ran-sc.org:10003/o-ran-sc/nonrtric-dmaap-adaptor"
-DMAAP_MEDIATOR_JAVA_TAG="1.0.0-SNAPSHOT"
\ No newline at end of file
+DMAAP_MEDIATOR_JAVA_TAG="1.0.0-SNAPSHOT"
index d7a4f17..7b1eee5 100644 (file)
@@ -73,11 +73,11 @@ This is to generate some data into the Dmaap MR, so that PMS reads message from
 
 ## O-RAN-SC Control Panel
 
-The Non-RT RIC Control Panel is a graphical user interface that enables the user to view and manage the A1 policies in the RAN and also view producers and jobs for the Enrichement coordinator service.
+The Non-RT RIC Control Panel is a graphical user interface that enables the user to view and manage the A1 policies in the RAN and also view producers and jobs for the Information coordinator service.
 
 ### O-RAN-SC Control Panel Gateway:
 
-To view the policy or enrichment information in control panel gui along with Policy Management Service & Enrichment Coordinator Service you should also have nonrtric gateway because all the request from the gui is passed through this API gateway.
+To view the policy or information jobs and types in control panel gui along with Policy Management Service & Information Coordinator Service you should also have nonrtric gateway because all the request from the gui is passed through this API gateway.
 
 #### Prerequisite:
 
@@ -85,4 +85,4 @@ Make sure to follow the section regarding sample data so there is data available
 
 To start all the necessary components, run the following command:
 
-docker-compose -f docker-compose.yaml -f control-panel/docker-compose.yaml -f nonrtric-gateway/docker-compose.yaml -f policy-service/docker-compose.yaml -f ecs/docker-compose.yaml -f a1-sim/docker-compose.yaml up
\ No newline at end of file
+docker-compose -f docker-compose.yaml -f control-panel/docker-compose.yaml -f nonrtric-gateway/docker-compose.yaml -f policy-service/docker-compose.yaml -f ecs/docker-compose.yaml -f a1-sim/docker-compose.yaml up
index 4efdf57..7db4895 100644 (file)
@@ -27,10 +27,10 @@ services:
     environment:
       - INFO_PRODUCER_HOST=http://consumer
       - INFO_PRODUCER_PORT=8088
-      - INFO_COORD_ADDR=http://ecs:8083
+      - INFO_COORD_ADDR=http://ics:8083
       - DMAAP_MR_ADDR=http://dmaap-mr:3904
       - PRODUCER_CERT_PATH=security/producer.crt
       - PRODUCER_KEY_PATH=security/producer.key
       - LOG_LEVEL=Debug
     networks:
-      - default
\ No newline at end of file
+      - default
index 6de293f..5c9c65a 100644 (file)
@@ -21,13 +21,13 @@ networks:
     name: nonrtric-docker-net
 
 services:
-  ecs:
-    image: "${ECS_IMAGE_BASE}:${ECS_IMAGE_TAG}"
-    container_name: ecs
+  ics:
+    image: "${ICS_IMAGE_BASE}:${ICS_IMAGE_TAG}"
+    container_name: ics
     networks:
       default:
         aliases:
-          - enrichment-service-container
+          - information-service-container
     ports:
       - 8083:8083
       - 8434:8434
diff --git a/enrichment-coordinator-service b/enrichment-coordinator-service
deleted file mode 120000 (symlink)
index 750df39..0000000
+++ /dev/null
@@ -1 +0,0 @@
-information-coordinator-service
\ No newline at end of file
index 7da2270..226622c 100644 (file)
             }
         },
         "consumer_job": {
-            "description": "Information for an Enrichment Information Job",
+            "description": "Information for an Information Job",
             "type": "object",
             "required": [
                 "info_type_id",
index c4463b0..b048c1c 100644 (file)
@@ -1258,7 +1258,7 @@ components:
         status_notification_uri:
           type: string
           description: The target of Information subscription job status notifications
-      description: Information for an Enrichment Information Job
+      description: Information for an Information Job
     producer_status:
       required:
       - operational_state
index f90c0be..8dca3c7 100644 (file)
@@ -28,7 +28,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
 import org.immutables.gson.Gson;
 
 @Gson.TypeAdapters
-@Schema(name = "consumer_job", description = "Information for an Enrichment Information Job")
+@Schema(name = "consumer_job", description = "Information for an Information Job")
 public class ConsumerJobInfo {
 
     @Schema(
@@ -37,7 +37,7 @@ import org.springframework.test.context.junit.jupiter.SpringExtension;
         "server.ssl.key-store=./config/keystore.jks", //
         "app.webclient.trust-store=./config/truststore.jks", "app.vardata-directory=./target"})
 @SuppressWarnings("squid:S3577") // Not containing any tests since it is a mock.
-class MockEnrichmentService {
+class MockInformationService {
     private static final Logger logger = LoggerFactory.getLogger(ApplicationTest.class);
 
     @LocalServerPort