From: PatrikBuhr Date: Fri, 26 Nov 2021 13:47:25 +0000 (+0100) Subject: Rename enrichment coordinator service to information coordinator service X-Git-Tag: 1.2.0~23^2 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=118d82d7272ae93541bca8c982c44ed2a92cadd2;p=nonrtric.git Rename enrichment coordinator service to information coordinator service Some more changes. Signed-off-by: PatrikBuhr Issue-ID: NONRTRIC-625 Change-Id: If2bfda7f019858f674e7b914af8da55691d07001 --- diff --git a/dmaap-adaptor-java/src/test/java/org/oran/dmaapadapter/IcsSimulatorController.java b/dmaap-adaptor-java/src/test/java/org/oran/dmaapadapter/IcsSimulatorController.java index bff2634f..790aafbc 100644 --- a/dmaap-adaptor-java/src/test/java/org/oran/dmaapadapter/IcsSimulatorController.java +++ b/dmaap-adaptor-java/src/test/java/org/oran/dmaapadapter/IcsSimulatorController.java @@ -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(); } diff --git a/dmaap-adaptor-java/src/test/java/org/oran/dmaapadapter/IntegrationWithIcs.java b/dmaap-adaptor-java/src/test/java/org/oran/dmaapadapter/IntegrationWithIcs.java index 12696edc..d1d7e910 100644 --- a/dmaap-adaptor-java/src/test/java/org/oran/dmaapadapter/IntegrationWithIcs.java +++ b/dmaap-adaptor-java/src/test/java/org/oran/dmaapadapter/IntegrationWithIcs.java @@ -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(); - } } } diff --git a/dmaap-mediator-producer/README.md b/dmaap-mediator-producer/README.md index 9a0903bb..69a4626d 100644 --- a/dmaap-mediator-producer/README.md +++ b/dmaap-mediator-producer/README.md @@ -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` diff --git a/dmaap-mediator-producer/internal/config/config.go b/dmaap-mediator-producer/internal/config/config.go index 34b056d5..e03c40ac 100644 --- a/dmaap-mediator-producer/internal/config/config.go +++ b/dmaap-mediator-producer/internal/config/config.go @@ -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"), diff --git a/dmaap-mediator-producer/internal/config/config_test.go b/dmaap-mediator-producer/internal/config/config_test.go index 293e0d0b..faf5900d 100644 --- a/dmaap-mediator-producer/internal/config/config_test.go +++ b/dmaap-mediator-producer/internal/config/config_test.go @@ -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", diff --git a/docker-compose/.env b/docker-compose/.env index 6fc3528d..8c247bed 100644 --- a/docker-compose/.env +++ b/docker-compose/.env @@ -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" diff --git a/docker-compose/README.md b/docker-compose/README.md index d7a4f17a..7b1eee5a 100644 --- a/docker-compose/README.md +++ b/docker-compose/README.md @@ -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 diff --git a/docker-compose/dmaap-mediator-go/docker-compose.yaml b/docker-compose/dmaap-mediator-go/docker-compose.yaml index 4efdf57e..7db4895d 100644 --- a/docker-compose/dmaap-mediator-go/docker-compose.yaml +++ b/docker-compose/dmaap-mediator-go/docker-compose.yaml @@ -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 diff --git a/docker-compose/ecs/docker-compose.yaml b/docker-compose/ecs/docker-compose.yaml index 6de293f4..5c9c65a4 100644 --- a/docker-compose/ecs/docker-compose.yaml +++ b/docker-compose/ecs/docker-compose.yaml @@ -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 index 750df396..00000000 --- a/enrichment-coordinator-service +++ /dev/null @@ -1 +0,0 @@ -information-coordinator-service \ No newline at end of file diff --git a/information-coordinator-service/api/ics-api.json b/information-coordinator-service/api/ics-api.json index 7da2270b..226622c7 100644 --- a/information-coordinator-service/api/ics-api.json +++ b/information-coordinator-service/api/ics-api.json @@ -251,7 +251,7 @@ } }, "consumer_job": { - "description": "Information for an Enrichment Information Job", + "description": "Information for an Information Job", "type": "object", "required": [ "info_type_id", diff --git a/information-coordinator-service/api/ics-api.yaml b/information-coordinator-service/api/ics-api.yaml index c4463b02..b048c1cf 100644 --- a/information-coordinator-service/api/ics-api.yaml +++ b/information-coordinator-service/api/ics-api.yaml @@ -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 diff --git a/information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1consumer/ConsumerJobInfo.java b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1consumer/ConsumerJobInfo.java index f90c0be6..8dca3c71 100644 --- a/information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1consumer/ConsumerJobInfo.java +++ b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1consumer/ConsumerJobInfo.java @@ -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( diff --git a/information-coordinator-service/src/test/java/org/oransc/ics/MockEnrichmentService.java b/information-coordinator-service/src/test/java/org/oransc/ics/MockInformationService.java similarity index 98% rename from information-coordinator-service/src/test/java/org/oransc/ics/MockEnrichmentService.java rename to information-coordinator-service/src/test/java/org/oransc/ics/MockInformationService.java index 7c296ec0..65c19a87 100644 --- a/information-coordinator-service/src/test/java/org/oransc/ics/MockEnrichmentService.java +++ b/information-coordinator-service/src/test/java/org/oransc/ics/MockInformationService.java @@ -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