Merge "Update helm yaml file to adapt the changes of mrstub"
diff --git a/dmaap-adaptor-java/README.md b/dmaap-adaptor-java/README.md
index 9b35fe5..162bfb2 100644
--- a/dmaap-adaptor-java/README.md
+++ b/dmaap-adaptor-java/README.md
@@ -1,9 +1,9 @@
# O-RAN-SC Non-RealTime RIC DMaaP Information Producer
-This product is a generic information producer (as defined by the Information Coordinator Service (ICS)). It can produce any information that can be retrieved from DMaaP. Its main tasks is to register information types and itself as a producer using the ICS Data Producer API.
+This product is a generic information producer (as defined by the Information Coordinator Service (ICS)). It can produce any information that can be retrieved from DMaaP or Kafka. Its main tasks is to register information types and itself as a producer using the ICS Data Producer API.
A data consumer may create information jobs through the ICS Data Producer API.
-This service will retrieve data from the DMaaP Message Router (MR) and distribute it further to the data consumers (information job owners).
+This service will retrieve data from the DMaaP Message Router (MR) or from the Kafka streaming platform and will distribute it further to the data consumers (information job owners).
The component is a springboot service and is configured as any springboot service through the file `config/application.yaml`. The component log can be retrieved and logging can be controled by means of REST call. See the API documentation (api/api.yaml).
@@ -14,20 +14,91 @@
"types":
[
{
- "id": "STD_Fault_Messages",
- "dmaapTopicUrl": events/unauthenticated.SEC_FAULT_OUTPUT/dmaapmediatorproducer/STD-Fault-Messages_1.0.0",
+ "id": "ExampleInformationType1_1.0.0",
+ "dmaapTopicUrl": "events/unauthenticated.SEC_FAULT_OUTPUT/dmaapmediatorproducer/STD-Fault-Messages_1.0.0",
+ "useHttpProxy": true
+ },
+ {
+ "id": "ExampleInformationType2_2.0.0",
+ "kafkaInputTopic": "KafkaInputTopic",
"useHttpProxy": false
}
]
}
```
-Each information has the following properties:
+Each information type has the following properties:
- id the information type identity as exposed in the Information Coordination Service data consumer API
- dmaapTopicUrl the URL to for fetching information from DMaaP
+ - kafkaInputTopic a Kafka topic to get input from
- useHttpProxy if true, the received information will be delivered using a HTTP proxy (provided that one is setup in the application.yaml file). This might for instance be needed if the data consumer is in the RAN or outside the cluster.
-The service producer will constantly poll MR for all configured job types. When receiving messages for a type, it will distribute these messages to all jobs registered for the type. If no jobs for that type are registered, the messages will be discarded. If a consumer is unavailable for distribution, the messages will be discarded for that consumer.
+The service producer will poll MR and/or listen to Kafka topics for all configured job types. When receiving messages for a type, it will distribute these messages to all jobs registered for the type. If a consumer is unavailable for distribution, the messages will be discarded for that consumer.
+
+When an Information Job is created in the Information Coordinator Service Consumer API, it is possible to define a number of job specific properties. For an Information type that has a Kafka topic defined, the following Json schema defines the properties that can be used:
+
+
+```sh
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "type": "object",
+ "properties": {
+ "filter": {
+ "type": "string"
+ },
+ "maxConcurrency": {
+ "type": "integer"
+ },
+ "bufferTimeout": {
+ "type": "object",
+ "properties": {
+ "maxSize": {
+ "type": "integer"
+ },
+ "maxTimeMiliseconds": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "maxSize",
+ "maxTimeMiliseconds"
+ ]
+ }
+ },
+ "additionalProperties": false
+}
+```
+-filter is a regular expression. Only strings that matches the expression will be pushed further to the consumer.
+-maxConcurrency the maximum number of concurrent REST session for the data delivery to the consumer.
+ The default is 1 and that is the number that must be used to guarantee that the object sequence is maintained.
+ A higher number will give higher throughtput.
+-bufferTimeout, can be used to reduce the number of REST calls to the consumer. If defined, a number of objects will be
+ buffered and sent in one REST call to the consumer.
+ The buffered objects will be put in a Json array and quoted. Example;
+ Object1 and Object2 may be posted in one call --> ["Object1", "Object2"]
+ The bufferTimeout is a Json object and the parameters in the object are:
+ - maxSize the maximum number of buffered objects before posting
+ - maxTimeMiliseconds the maximum delay time to buffer before posting
+ If no bufferTimeout is specified, each object will be posted as received in separate calls (not quoted and put in a Json array).
+
+
+For an information type that only has a DMaaP topic, the following Json schema defines the possible parameters to use when creating an information job:
+
+```sh
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "type": "object",
+ "properties": {
+ "filter": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+}
+```
+-filter is a regular expression. Only strings that matches the expression will be pushed furter to the consumer. This
+ has a similar meaning as in jobs that receives data from Kafka.
## License
diff --git a/dmaap-adaptor-java/api/api.json b/dmaap-adaptor-java/api/api.json
index 6cd3525..04c4ab0 100644
--- a/dmaap-adaptor-java/api/api.json
+++ b/dmaap-adaptor-java/api/api.json
@@ -107,7 +107,53 @@
}},
"openapi": "3.0.1",
"paths": {
- "/dmaap_dataproducer/info_job": {
+ "/actuator/threaddump": {"get": {
+ "summary": "Actuator web endpoint 'threaddump'",
+ "operationId": "handle_2_1_3",
+ "responses": {"200": {
+ "description": "OK",
+ "content": {"*/*": {"schema": {"type": "object"}}}
+ }},
+ "tags": ["Actuator"]
+ }},
+ "/actuator/info": {"get": {
+ "summary": "Actuator web endpoint 'info'",
+ "operationId": "handle_9",
+ "responses": {"200": {
+ "description": "OK",
+ "content": {"*/*": {"schema": {"type": "object"}}}
+ }},
+ "tags": ["Actuator"]
+ }},
+ "/data-producer/v1/info-types/{infoTypeId}": {"put": {
+ "requestBody": {
+ "content": {"application/json": {"schema": {"$ref": "#/components/schemas/producer_info_type_info"}}},
+ "required": true
+ },
+ "operationId": "putInfoType",
+ "responses": {"200": {
+ "description": "OK",
+ "content": {"application/json": {"schema": {"type": "object"}}}
+ }},
+ "parameters": [{
+ "schema": {"type": "string"},
+ "in": "path",
+ "name": "infoTypeId",
+ "required": true
+ }],
+ "tags": ["Information Coordinator Service Simulator (exists only in test)"]
+ }},
+ "/generic_dataproducer/health_check": {"get": {
+ "summary": "Producer supervision",
+ "description": "The endpoint is provided by the Information Producer and is used for supervision of the producer.",
+ "operationId": "producerSupervision",
+ "responses": {"200": {
+ "description": "The producer is OK",
+ "content": {"application/json": {"schema": {"type": "string"}}}
+ }},
+ "tags": ["Producer job control API"]
+ }},
+ "/generic_dataproducer/info_job": {
"post": {
"summary": "Callback for Information Job creation/modification",
"requestBody": {
@@ -146,52 +192,6 @@
"tags": ["Producer job control API"]
}
},
- "/dmaap_dataproducer/health_check": {"get": {
- "summary": "Producer supervision",
- "description": "The endpoint is provided by the Information Producer and is used for supervision of the producer.",
- "operationId": "producerSupervision",
- "responses": {"200": {
- "description": "The producer is OK",
- "content": {"application/json": {"schema": {"type": "string"}}}
- }},
- "tags": ["Producer job control API"]
- }},
- "/actuator/threaddump": {"get": {
- "summary": "Actuator web endpoint 'threaddump'",
- "operationId": "handle_2_1_3",
- "responses": {"200": {
- "description": "OK",
- "content": {"*/*": {"schema": {"type": "object"}}}
- }},
- "tags": ["Actuator"]
- }},
- "/actuator/info": {"get": {
- "summary": "Actuator web endpoint 'info'",
- "operationId": "handle_9",
- "responses": {"200": {
- "description": "OK",
- "content": {"*/*": {"schema": {"type": "object"}}}
- }},
- "tags": ["Actuator"]
- }},
- "/data-producer/v1/info-types/{infoTypeId}": {"put": {
- "requestBody": {
- "content": {"application/json": {"schema": {"$ref": "#/components/schemas/producer_info_type_info"}}},
- "required": true
- },
- "operationId": "putInfoType",
- "responses": {"200": {
- "description": "OK",
- "content": {"application/json": {"schema": {"type": "object"}}}
- }},
- "parameters": [{
- "schema": {"type": "string"},
- "in": "path",
- "name": "infoTypeId",
- "required": true
- }],
- "tags": ["Information Coordinator Service Simulator (exists only in test)"]
- }},
"/actuator/loggers": {"get": {
"summary": "Actuator web endpoint 'loggers'",
"operationId": "handle_6",
@@ -244,6 +244,22 @@
"tags": ["Information Coordinator Service Simulator (exists only in test)"]
}
},
+ "/generic_dataproducer/info_job/{infoJobId}": {"delete": {
+ "summary": "Callback for Information Job deletion",
+ "description": "The call is invoked to terminate a data subscription. The endpoint is provided by the Information Producer.",
+ "operationId": "jobDeletedCallback",
+ "responses": {"200": {
+ "description": "OK",
+ "content": {"application/json": {"schema": {"$ref": "#/components/schemas/void"}}}
+ }},
+ "parameters": [{
+ "schema": {"type": "string"},
+ "in": "path",
+ "name": "infoJobId",
+ "required": true
+ }],
+ "tags": ["Producer job control API"]
+ }},
"/actuator/metrics/{requiredMetricName}": {"get": {
"summary": "Actuator web endpoint 'metrics-requiredMetricName'",
"operationId": "handle_5",
@@ -315,22 +331,6 @@
"tags": ["Actuator"]
}
},
- "/dmaap_dataproducer/info_job/{infoJobId}": {"delete": {
- "summary": "Callback for Information Job deletion",
- "description": "The call is invoked to terminate a data subscription. The endpoint is provided by the Information Producer.",
- "operationId": "jobDeletedCallback",
- "responses": {"200": {
- "description": "OK",
- "content": {"application/json": {"schema": {"$ref": "#/components/schemas/void"}}}
- }},
- "parameters": [{
- "schema": {"type": "string"},
- "in": "path",
- "name": "infoJobId",
- "required": true
- }],
- "tags": ["Producer job control API"]
- }},
"/actuator/health": {"get": {
"summary": "Actuator web endpoint 'health'",
"operationId": "handle_11",
@@ -388,8 +388,8 @@
"name": "Copyright (C) 2021 Nordix Foundation. Licensed under the Apache License.",
"url": "http://www.apache.org/licenses/LICENSE-2.0"
},
- "description": "Reads data from DMAAP and sends it further to information consumers",
- "title": "Generic Dmaap Information Producer",
+ "description": "Reads data from DMaaP and Kafka and posts it further to information consumers",
+ "title": "Generic Dmaap and Kafka Information Producer",
"version": "1.0"
},
"tags": [{
diff --git a/dmaap-adaptor-java/api/api.yaml b/dmaap-adaptor-java/api/api.yaml
index b3acfda..1fb78fa 100644
--- a/dmaap-adaptor-java/api/api.yaml
+++ b/dmaap-adaptor-java/api/api.yaml
@@ -1,7 +1,8 @@
openapi: 3.0.1
info:
- title: Generic Dmaap Information Producer
- description: Reads data from DMAAP and sends it further to information consumers
+ title: Generic Dmaap and Kafka Information Producer
+ description: Reads data from DMaaP and Kafka and posts it further to information
+ consumers
license:
name: Copyright (C) 2021 Nordix Foundation. Licensed under the Apache License.
url: http://www.apache.org/licenses/LICENSE-2.0
@@ -15,69 +16,6 @@
description: Spring Boot Actuator Web API Documentation
url: https://docs.spring.io/spring-boot/docs/current/actuator-api/html/
paths:
- /dmaap_dataproducer/info_job:
- get:
- tags:
- - Producer job control API
- summary: Get all jobs
- description: Returns all info jobs, can be used for trouble shooting
- operationId: getJobs
- responses:
- 200:
- description: Information jobs
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/producer_info_job_request'
- post:
- tags:
- - Producer job control API
- summary: Callback for Information Job creation/modification
- description: The call is invoked to activate or to modify a data subscription.
- The endpoint is provided by the Information Producer.
- operationId: jobCreatedCallback
- requestBody:
- content:
- application/json:
- schema:
- type: string
- required: true
- responses:
- 200:
- description: OK
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/void'
- 400:
- description: Other error in the request
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/error_information'
- 404:
- description: Information type is not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/error_information'
- /dmaap_dataproducer/health_check:
- get:
- tags:
- - Producer job control API
- summary: Producer supervision
- description: The endpoint is provided by the Information Producer and is used
- for supervision of the producer.
- operationId: producerSupervision
- responses:
- 200:
- description: The producer is OK
- content:
- application/json:
- schema:
- type: string
/actuator/threaddump:
get:
tags:
@@ -130,6 +68,69 @@
application/json:
schema:
type: object
+ /generic_dataproducer/health_check:
+ get:
+ tags:
+ - Producer job control API
+ summary: Producer supervision
+ description: The endpoint is provided by the Information Producer and is used
+ for supervision of the producer.
+ operationId: producerSupervision
+ responses:
+ 200:
+ description: The producer is OK
+ content:
+ application/json:
+ schema:
+ type: string
+ /generic_dataproducer/info_job:
+ get:
+ tags:
+ - Producer job control API
+ summary: Get all jobs
+ description: Returns all info jobs, can be used for trouble shooting
+ operationId: getJobs
+ responses:
+ 200:
+ description: Information jobs
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/producer_info_job_request'
+ post:
+ tags:
+ - Producer job control API
+ summary: Callback for Information Job creation/modification
+ description: The call is invoked to activate or to modify a data subscription.
+ The endpoint is provided by the Information Producer.
+ operationId: jobCreatedCallback
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: string
+ required: true
+ responses:
+ 200:
+ description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/void'
+ 400:
+ description: Other error in the request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/error_information'
+ 404:
+ description: Information type is not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/error_information'
/actuator/loggers:
get:
tags:
@@ -201,6 +202,29 @@
application/json:
schema:
type: object
+ /generic_dataproducer/info_job/{infoJobId}:
+ delete:
+ tags:
+ - Producer job control API
+ summary: Callback for Information Job deletion
+ description: The call is invoked to terminate a data subscription. The endpoint
+ is provided by the Information Producer.
+ operationId: jobDeletedCallback
+ parameters:
+ - name: infoJobId
+ in: path
+ required: true
+ style: simple
+ explode: false
+ schema:
+ type: string
+ responses:
+ 200:
+ description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/void'
/actuator/metrics/{requiredMetricName}:
get:
tags:
@@ -293,29 +317,6 @@
'*/*':
schema:
type: object
- /dmaap_dataproducer/info_job/{infoJobId}:
- delete:
- tags:
- - Producer job control API
- summary: Callback for Information Job deletion
- description: The call is invoked to terminate a data subscription. The endpoint
- is provided by the Information Producer.
- operationId: jobDeletedCallback
- parameters:
- - name: infoJobId
- in: path
- required: true
- style: simple
- explode: false
- schema:
- type: string
- responses:
- 200:
- description: OK
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/void'
/actuator/health:
get:
tags:
diff --git a/dmaap-adaptor-java/config/application.yaml b/dmaap-adaptor-java/config/application.yaml
index 6a2d68a..c3476ac 100644
--- a/dmaap-adaptor-java/config/application.yaml
+++ b/dmaap-adaptor-java/config/application.yaml
@@ -46,14 +46,15 @@
# The HTTP proxy (if configured) will only be used for accessing NearRT RIC:s
http.proxy-host:
http.proxy-port: 0
- ecs-base-url: https://localhost:8434
+ ics-base-url: https://localhost:8434
# Location of the component configuration file. The file will only be used if the Consul database is not used;
# configuration from the Consul will override the file.
configuration-filepath: /opt/app/dmaap-adaptor-service/data/application_configuration.json
dmaap-base-url: http://dradmin:dradmin@localhost:2222
# The url used to adress this component. This is used as a callback url sent to other components.
dmaap-adapter-base-url: https://localhost:8435
- # KAFKA boostrap server. This is only needed if there are Information Types that uses a kafkaInputTopic
+ # KAFKA boostrap servers. This is only needed if there are Information Types that uses a kafkaInputTopic
+ # several redundant boostrap servers can be specified, separated by a comma ','.
kafka:
bootstrap-servers: localhost:9092
diff --git a/dmaap-adaptor-java/config/application_configuration.json b/dmaap-adaptor-java/config/application_configuration.json
index ae34c56..6aaffd1 100644
--- a/dmaap-adaptor-java/config/application_configuration.json
+++ b/dmaap-adaptor-java/config/application_configuration.json
@@ -1,9 +1,15 @@
{
"types": [
{
- "id": "ExampleInformationType",
+ "id": "ExampleInformationType1",
"dmaapTopicUrl": "/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12",
"useHttpProxy": true
+ },
+ {
+ "id": "ExampleInformationType2",
+ "kafkaInputTopic": "TutorialTopic",
+ "useHttpProxy": false
}
+
]
-}
\ No newline at end of file
+}
diff --git a/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/SwaggerConfig.java b/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/SwaggerConfig.java
index 8f33377..6128d2e 100644
--- a/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/SwaggerConfig.java
+++ b/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/SwaggerConfig.java
@@ -38,6 +38,6 @@
public class SwaggerConfig {
private SwaggerConfig() {}
- static final String API_TITLE = "Generic Dmaap Information Producer";
- static final String DESCRIPTION = "Reads data from DMAAP and sends it further to information consumers";
+ static final String API_TITLE = "Generic Dmaap and Kafka Information Producer";
+ static final String DESCRIPTION = "Reads data from DMaaP and Kafka and posts it further to information consumers";
}
diff --git a/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/configuration/ApplicationConfig.java b/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/configuration/ApplicationConfig.java
index f17a9c0..3ea64e7 100644
--- a/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/configuration/ApplicationConfig.java
+++ b/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/configuration/ApplicationConfig.java
@@ -28,6 +28,7 @@
import java.util.Collections;
import lombok.Getter;
+import lombok.Setter;
import org.oran.dmaapadapter.configuration.WebClientConfig.HttpProxyConfig;
import org.oran.dmaapadapter.repository.InfoType;
@@ -73,12 +74,13 @@
private int httpProxyPort = 0;
@Getter
+ @Setter
@Value("${server.port}")
private int localServerHttpPort;
@Getter
- @Value("${app.ecs-base-url}")
- private String ecsBaseUrl;
+ @Value("${app.ics-base-url}")
+ private String icsBaseUrl;
@Getter
@Value("${app.dmaap-adapter-base-url}")
diff --git a/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/controllers/ProducerCallbacksController.java b/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/controllers/ProducerCallbacksController.java
index 094ead7..94f9f8d 100644
--- a/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/controllers/ProducerCallbacksController.java
+++ b/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/controllers/ProducerCallbacksController.java
@@ -59,8 +59,8 @@
public static final String API_NAME = "Producer job control API";
public static final String API_DESCRIPTION = "";
- public static final String JOB_URL = "/dmaap_dataproducer/info_job";
- public static final String SUPERVISION_URL = "/dmaap_dataproducer/health_check";
+ public static final String JOB_URL = "/generic_dataproducer/info_job";
+ public static final String SUPERVISION_URL = "/generic_dataproducer/health_check";
private static Gson gson = new GsonBuilder().create();
private final Jobs jobs;
private final InfoTypes types;
@@ -91,7 +91,7 @@
return new ResponseEntity<>(HttpStatus.OK);
} catch (ServiceException e) {
logger.warn("jobCreatedCallback failed: {}", e.getMessage());
- return ErrorResponse.create(e, HttpStatus.NOT_FOUND);
+ return ErrorResponse.create(e, e.getHttpStatus());
} catch (Exception e) {
logger.warn("jobCreatedCallback failed: {}", e.getMessage());
return ErrorResponse.create(e, HttpStatus.BAD_REQUEST);
diff --git a/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/r1/ConsumerJobInfo.java b/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/r1/ConsumerJobInfo.java
index ce4a3b7..c1737db 100644
--- a/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/r1/ConsumerJobInfo.java
+++ b/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/r1/ConsumerJobInfo.java
@@ -28,7 +28,7 @@
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(name = "info_type_id", description = "Information type Idenitifier of the subscription job",
diff --git a/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/repository/InfoTypes.java b/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/repository/InfoTypes.java
index 558fc46..baa998b 100644
--- a/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/repository/InfoTypes.java
+++ b/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/repository/InfoTypes.java
@@ -28,6 +28,7 @@
import org.oran.dmaapadapter.exceptions.ServiceException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.springframework.http.HttpStatus;
public class InfoTypes {
private static final Logger logger = LoggerFactory.getLogger(InfoTypes.class);
@@ -47,7 +48,7 @@
public synchronized InfoType getType(String id) throws ServiceException {
InfoType type = allTypes.get(id);
if (type == null) {
- throw new ServiceException("Could not find type: " + id);
+ throw new ServiceException("Could not find type: " + id, HttpStatus.NOT_FOUND);
}
return type;
}
diff --git a/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/repository/MultiMap.java b/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/repository/MultiMap.java
index e2538af..f7cc14e 100644
--- a/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/repository/MultiMap.java
+++ b/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/repository/MultiMap.java
@@ -51,6 +51,14 @@
return null;
}
+ public T get(String key1, String key2) {
+ Map<String, T> innerMap = this.map.get(key1);
+ if (innerMap == null) {
+ return null;
+ }
+ return innerMap.get(key2);
+ }
+
public Collection<T> get(String key) {
Map<String, T> innerMap = this.map.get(key);
if (innerMap == null) {
diff --git a/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/tasks/KafkaJobDataConsumer.java b/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/tasks/KafkaJobDataConsumer.java
index f677502..2a16f47 100644
--- a/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/tasks/KafkaJobDataConsumer.java
+++ b/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/tasks/KafkaJobDataConsumer.java
@@ -31,7 +31,6 @@
import reactor.core.Disposable;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
-import reactor.core.publisher.Sinks.Many;
/**
* The class streams data from a multi cast sink and sends the data to the Job
@@ -75,7 +74,7 @@
this.job = job;
}
- public synchronized void start(Many<String> input) {
+ public synchronized void start(Flux<String> input) {
stop();
this.errorStats.resetKafkaErrors();
this.subscription = getMessagesFromKafka(input, job) //
@@ -99,8 +98,8 @@
public synchronized void stop() {
if (this.subscription != null) {
- subscription.dispose();
- subscription = null;
+ this.subscription.dispose();
+ this.subscription = null;
}
}
@@ -108,9 +107,8 @@
return this.subscription != null;
}
- private Flux<String> getMessagesFromKafka(Many<String> input, Job job) {
- Flux<String> result = input.asFlux() //
- .filter(job::isFilterMatch);
+ private Flux<String> getMessagesFromKafka(Flux<String> input, Job job) {
+ Flux<String> result = input.filter(job::isFilterMatch);
if (job.isBuffered()) {
result = result.map(this::quote) //
diff --git a/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/tasks/KafkaTopicConsumers.java b/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/tasks/KafkaTopicConsumers.java
index 29ad8c7..4809017 100644
--- a/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/tasks/KafkaTopicConsumers.java
+++ b/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/tasks/KafkaTopicConsumers.java
@@ -71,7 +71,6 @@
public void onJobRemoved(Job job) {
removeJob(job);
}
-
});
}
@@ -84,7 +83,7 @@
topicConsumer.start();
}
KafkaJobDataConsumer subscription = new KafkaJobDataConsumer(job);
- subscription.start(topicConsumer.getOutput());
+ subscription.start(topicConsumer.getOutput().asFlux());
consumers.put(job.getType().getId(), job.getId(), subscription);
}
}
@@ -98,14 +97,12 @@
}
@Scheduled(fixedRate = CONSUMER_SUPERVISION_INTERVAL_MS)
- public synchronized void restartNonRunningTasks() {
- this.consumers.keySet().forEach(typeId -> {
- this.consumers.get(typeId).forEach(consumer -> {
- if (!consumer.isRunning()) {
- restartTopic(consumer);
- }
- });
- });
+ public synchronized void restartNonRunningTopics() {
+ for (String typeId : this.consumers.keySet()) {
+ for (KafkaJobDataConsumer consumer : this.consumers.get(typeId)) {
+ restartTopic(consumer);
+ }
+ }
}
private void restartTopic(KafkaJobDataConsumer consumer) {
@@ -116,8 +113,6 @@
}
private void restartConsumersOfType(KafkaTopicListener topic, InfoType type) {
- this.consumers.get(type.getId()).forEach((consumer) -> {
- consumer.start(topic.getOutput());
- });
+ this.consumers.get(type.getId()).forEach(consumer -> consumer.start(topic.getOutput().asFlux()));
}
}
diff --git a/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/tasks/ProducerRegstrationTask.java b/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/tasks/ProducerRegstrationTask.java
index 3a81f39..c9284b5 100644
--- a/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/tasks/ProducerRegstrationTask.java
+++ b/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/tasks/ProducerRegstrationTask.java
@@ -50,7 +50,8 @@
import reactor.core.publisher.Mono;
/**
- * Registers the types and this producer in ECS. This is done when needed.
+ * Registers the types and this producer in Innformation Coordinator Service.
+ * This is done when needed.
*/
@Component
@EnableScheduling
@@ -65,7 +66,7 @@
private static final String PRODUCER_ID = "DmaapGenericInfoProducer";
@Getter
- private boolean isRegisteredInEcs = false;
+ private boolean isRegisteredInIcs = false;
private static final int REGISTRATION_SUPERVISION_INTERVAL_MS = 1000 * 5;
public ProducerRegstrationTask(@Autowired ApplicationConfig applicationConfig, @Autowired InfoTypes types) {
@@ -78,7 +79,7 @@
@Scheduled(fixedRate = REGISTRATION_SUPERVISION_INTERVAL_MS)
public void supervisionTask() {
checkRegistration() //
- .filter(isRegistrationOk -> !isRegistrationOk || !this.isRegisteredInEcs) //
+ .filter(isRegistrationOk -> !isRegistrationOk || !this.isRegisteredInIcs) //
.flatMap(isRegisterred -> registerTypesAndProducer()) //
.subscribe( //
null, //
@@ -87,7 +88,7 @@
}
private void handleRegistrationCompleted() {
- isRegisteredInEcs = true;
+ isRegisteredInIcs = true;
}
private void handleRegistrationFailure(Throwable t) {
@@ -96,7 +97,7 @@
// Returns TRUE if registration is correct
private Mono<Boolean> checkRegistration() {
- final String url = applicationConfig.getEcsBaseUrl() + "/data-producer/v1/info-producers/" + PRODUCER_ID;
+ final String url = applicationConfig.getIcsBaseUrl() + "/data-producer/v1/info-producers/" + PRODUCER_ID;
return restClient.get(url) //
.flatMap(this::isRegisterredInfoCorrect) //
.onErrorResume(t -> Mono.just(Boolean.FALSE));
@@ -105,7 +106,7 @@
private Mono<Boolean> isRegisterredInfoCorrect(String registerredInfoStr) {
ProducerRegistrationInfo registerredInfo = gson.fromJson(registerredInfoStr, ProducerRegistrationInfo.class);
if (isEqual(producerRegistrationInfo(), registerredInfo)) {
- logger.trace("Already registered in ECS");
+ logger.trace("Already registered in ICS");
return Mono.just(Boolean.TRUE);
} else {
return Mono.just(Boolean.FALSE);
@@ -113,13 +114,13 @@
}
private String registerTypeUrl(InfoType type) {
- return applicationConfig.getEcsBaseUrl() + "/data-producer/v1/info-types/" + type.getId();
+ return applicationConfig.getIcsBaseUrl() + "/data-producer/v1/info-types/" + type.getId();
}
private Mono<String> registerTypesAndProducer() {
final int CONCURRENCY = 20;
final String producerUrl =
- applicationConfig.getEcsBaseUrl() + "/data-producer/v1/info-producers/" + PRODUCER_ID;
+ applicationConfig.getIcsBaseUrl() + "/data-producer/v1/info-producers/" + PRODUCER_ID;
return Flux.fromIterable(this.types.getAll()) //
.doOnNext(type -> logger.info("Registering type {}", type.getId())) //
@@ -144,25 +145,8 @@
}
private Object jsonSchemaObject(InfoType type) throws IOException, ServiceException {
-
- if (type.isKafkaTopicDefined()) {
- String schemaStrKafka = readSchemaFile("/typeSchemaKafka.json");
- return jsonObject(schemaStrKafka);
- } else {
- // An object with no properties
- String schemaStr = "{" //
- + "\"type\": \"object\"," //
- + "\"properties\": {" //
- + " \"filter\": { \"type\": \"string\" }" //
- + "}," //
- + "\"additionalProperties\": false" //
- + "}"; //
-
- return
-
- jsonObject(schemaStr);
- }
-
+ String schemaFile = type.isKafkaTopicDefined() ? "/typeSchemaKafka.json" : "/typeSchemaDmaap.json";
+ return jsonObject(readSchemaFile(schemaFile));
}
private String readSchemaFile(String filePath) throws IOException, ServiceException {
@@ -174,12 +158,13 @@
return CharStreams.toString(new InputStreamReader(in, StandardCharsets.UTF_8));
}
+ @SuppressWarnings("java:S2139") // Log exception
private Object jsonObject(String json) {
try {
return JsonParser.parseString(json).getAsJsonObject();
} catch (Exception e) {
- logger.error("Bug, error in JSON: {}", json);
- throw new NullPointerException(e.toString());
+ logger.error("Bug, error in JSON: {} {}", json, e.getMessage());
+ throw new NullPointerException(e.getMessage());
}
}
@@ -190,7 +175,6 @@
}
private ProducerRegistrationInfo producerRegistrationInfo() {
-
return ProducerRegistrationInfo.builder() //
.jobCallbackUrl(baseUrl() + ProducerCallbacksController.JOB_URL) //
.producerSupervisionCallbackUrl(baseUrl() + ProducerCallbacksController.SUPERVISION_URL) //
diff --git a/dmaap-adaptor-java/src/main/resources/typeSchemaDmaap.json b/dmaap-adaptor-java/src/main/resources/typeSchemaDmaap.json
new file mode 100644
index 0000000..a50b236
--- /dev/null
+++ b/dmaap-adaptor-java/src/main/resources/typeSchemaDmaap.json
@@ -0,0 +1,10 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "type": "object",
+ "properties": {
+ "filter": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+}
diff --git a/dmaap-adaptor-java/src/test/java/org/oran/dmaapadapter/ApplicationTest.java b/dmaap-adaptor-java/src/test/java/org/oran/dmaapadapter/ApplicationTest.java
index c4c9602..0ea0056 100644
--- a/dmaap-adaptor-java/src/test/java/org/oran/dmaapadapter/ApplicationTest.java
+++ b/dmaap-adaptor-java/src/test/java/org/oran/dmaapadapter/ApplicationTest.java
@@ -34,6 +34,7 @@
import org.json.JSONObject;
import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.oran.dmaapadapter.clients.AsyncRestClient;
@@ -49,6 +50,8 @@
import org.oran.dmaapadapter.repository.InfoTypes;
import org.oran.dmaapadapter.repository.Job;
import org.oran.dmaapadapter.repository.Jobs;
+import org.oran.dmaapadapter.tasks.KafkaJobDataConsumer;
+import org.oran.dmaapadapter.tasks.KafkaTopicConsumers;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
@@ -64,11 +67,12 @@
import org.springframework.test.context.junit.jupiter.SpringExtension;
import org.springframework.web.reactive.function.client.WebClientResponseException;
+import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.test.StepVerifier;
@ExtendWith(SpringExtension.class)
-@SpringBootTest(webEnvironment = WebEnvironment.DEFINED_PORT)
+@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
@TestPropertySource(properties = { //
"server.ssl.key-store=./config/keystore.jks", //
"app.webclient.trust-store=./config/truststore.jks", //
@@ -89,7 +93,10 @@
private ConsumerController consumerController;
@Autowired
- private EcsSimulatorController ecsSimulatorController;
+ private IcsSimulatorController icsSimulatorController;
+
+ @Autowired
+ KafkaTopicConsumers kafkaTopicConsumers;
private com.google.gson.Gson gson = new com.google.gson.GsonBuilder().create();
@@ -98,7 +105,7 @@
static class TestApplicationConfig extends ApplicationConfig {
@Override
- public String getEcsBaseUrl() {
+ public String getIcsBaseUrl() {
return thisProcessUrl();
}
@@ -138,10 +145,15 @@
}
}
+ @BeforeEach
+ void setPort() {
+ this.applicationConfig.setLocalServerHttpPort(this.localServerHttpPort);
+ }
+
@AfterEach
void reset() {
this.consumerController.testResults.reset();
- this.ecsSimulatorController.testResults.reset();
+ this.icsSimulatorController.testResults.reset();
this.jobs.clear();
}
@@ -231,15 +243,54 @@
}
@Test
- void testWholeChain() throws Exception {
+ void testReceiveAndPostDataFromKafka() {
+ final String JOB_ID = "ID";
+ final String TYPE_ID = "KafkaInformationType";
+ await().untilAsserted(() -> assertThat(icsSimulatorController.testResults.registrationInfo).isNotNull());
+ assertThat(icsSimulatorController.testResults.registrationInfo.supportedTypeIds).hasSize(this.types.size());
+
+ // Create a job
+ Job.Parameters param = new Job.Parameters("", new Job.BufferTimeout(123, 456), 1);
+ String targetUri = baseUrl() + ConsumerController.CONSUMER_TARGET_URL;
+ ConsumerJobInfo kafkaJobInfo =
+ new ConsumerJobInfo(TYPE_ID, jsonObject(gson.toJson(param)), "owner", targetUri, "");
+
+ this.icsSimulatorController.addJob(kafkaJobInfo, JOB_ID, restClient());
+ await().untilAsserted(() -> assertThat(this.jobs.size()).isEqualTo(1));
+
+ KafkaJobDataConsumer kafkaConsumer = this.kafkaTopicConsumers.getConsumers().get(TYPE_ID, JOB_ID);
+
+ // Handle received data from Kafka, check that it has been posted to the
+ // consumer
+ kafkaConsumer.start(Flux.just("data"));
+
+ ConsumerController.TestResults consumer = this.consumerController.testResults;
+ await().untilAsserted(() -> assertThat(consumer.receivedBodies.size()).isEqualTo(1));
+ assertThat(consumer.receivedBodies.get(0)).isEqualTo("[\"data\"]");
+
+ // Test send an exception
+ kafkaConsumer.start(Flux.error(new NullPointerException()));
+
+ // Test regular restart of stopped
+ kafkaConsumer.stop();
+ this.kafkaTopicConsumers.restartNonRunningTopics();
+ await().untilAsserted(() -> assertThat(kafkaConsumer.isRunning()).isTrue());
+
+ // Delete the job
+ this.icsSimulatorController.deleteJob(JOB_ID, restClient());
+ await().untilAsserted(() -> assertThat(this.jobs.size()).isZero());
+ }
+
+ @Test
+ void testReceiveAndPostDataFromDmaap() throws Exception {
final String JOB_ID = "ID";
// Register producer, Register types
- await().untilAsserted(() -> assertThat(ecsSimulatorController.testResults.registrationInfo).isNotNull());
- assertThat(ecsSimulatorController.testResults.registrationInfo.supportedTypeIds).hasSize(this.types.size());
+ await().untilAsserted(() -> assertThat(icsSimulatorController.testResults.registrationInfo).isNotNull());
+ assertThat(icsSimulatorController.testResults.registrationInfo.supportedTypeIds).hasSize(this.types.size());
// Create a job
- this.ecsSimulatorController.addJob(consumerJobInfo(), JOB_ID, restClient());
+ this.icsSimulatorController.addJob(consumerJobInfo(), JOB_ID, restClient());
await().untilAsserted(() -> assertThat(this.jobs.size()).isEqualTo(1));
// Return two messages from DMAAP and verify that these are sent to the owner of
@@ -255,45 +306,25 @@
assertThat(jobs).contains(JOB_ID);
// Delete the job
- this.ecsSimulatorController.deleteJob(JOB_ID, restClient());
+ this.icsSimulatorController.deleteJob(JOB_ID, restClient());
await().untilAsserted(() -> assertThat(this.jobs.size()).isZero());
}
@Test
void testReRegister() throws Exception {
// Wait foir register types and producer
- await().untilAsserted(() -> assertThat(ecsSimulatorController.testResults.registrationInfo).isNotNull());
- assertThat(ecsSimulatorController.testResults.registrationInfo.supportedTypeIds).hasSize(this.types.size());
+ await().untilAsserted(() -> assertThat(icsSimulatorController.testResults.registrationInfo).isNotNull());
+ assertThat(icsSimulatorController.testResults.registrationInfo.supportedTypeIds).hasSize(this.types.size());
// Clear the registration, should trigger a re-register
- ecsSimulatorController.testResults.reset();
- await().untilAsserted(() -> assertThat(ecsSimulatorController.testResults.registrationInfo).isNotNull());
- assertThat(ecsSimulatorController.testResults.registrationInfo.supportedTypeIds).hasSize(this.types.size());
+ icsSimulatorController.testResults.reset();
+ await().untilAsserted(() -> assertThat(icsSimulatorController.testResults.registrationInfo).isNotNull());
+ assertThat(icsSimulatorController.testResults.registrationInfo.supportedTypeIds).hasSize(this.types.size());
// Just clear the registerred types, should trigger a re-register
- ecsSimulatorController.testResults.types.clear();
+ icsSimulatorController.testResults.types.clear();
await().untilAsserted(
- () -> assertThat(ecsSimulatorController.testResults.registrationInfo.supportedTypeIds).hasSize(2));
- }
-
- @Test
- void testCreateKafkaJob() {
- await().untilAsserted(() -> assertThat(ecsSimulatorController.testResults.registrationInfo).isNotNull());
- assertThat(ecsSimulatorController.testResults.registrationInfo.supportedTypeIds).hasSize(this.types.size());
-
- final String TYPE_ID = "KafkaInformationType";
-
- Job.Parameters param = new Job.Parameters("filter", new Job.BufferTimeout(123, 456), 1);
- String targetUri = baseUrl() + ConsumerController.CONSUMER_TARGET_URL;
- ConsumerJobInfo jobInfo = new ConsumerJobInfo(TYPE_ID, jsonObject(gson.toJson(param)), "owner", targetUri, "");
-
- // Create a job
- this.ecsSimulatorController.addJob(jobInfo, "JOB_ID", restClient());
- await().untilAsserted(() -> assertThat(this.jobs.size()).isEqualTo(1));
-
- // Delete the job
- this.ecsSimulatorController.deleteJob("JOB_ID", restClient());
- await().untilAsserted(() -> assertThat(this.jobs.size()).isZero());
+ () -> assertThat(icsSimulatorController.testResults.registrationInfo.supportedTypeIds).hasSize(2));
}
private void testErrorCode(Mono<?> request, HttpStatus expStatus, String responseContains) {
diff --git a/dmaap-adaptor-java/src/test/java/org/oran/dmaapadapter/EcsSimulatorController.java b/dmaap-adaptor-java/src/test/java/org/oran/dmaapadapter/IcsSimulatorController.java
similarity index 99%
rename from dmaap-adaptor-java/src/test/java/org/oran/dmaapadapter/EcsSimulatorController.java
rename to dmaap-adaptor-java/src/test/java/org/oran/dmaapadapter/IcsSimulatorController.java
index 1cf8903..bff2634 100644
--- a/dmaap-adaptor-java/src/test/java/org/oran/dmaapadapter/EcsSimulatorController.java
+++ b/dmaap-adaptor-java/src/test/java/org/oran/dmaapadapter/IcsSimulatorController.java
@@ -47,7 +47,7 @@
@RestController("IcsSimulatorController")
@Tag(name = "Information Coordinator Service Simulator (exists only in test)")
-public class EcsSimulatorController {
+public class IcsSimulatorController {
private final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private final static Gson gson = new GsonBuilder().create();
diff --git a/dmaap-adaptor-java/src/test/java/org/oran/dmaapadapter/IntegrationWithEcs.java b/dmaap-adaptor-java/src/test/java/org/oran/dmaapadapter/IntegrationWithIcs.java
similarity index 97%
rename from dmaap-adaptor-java/src/test/java/org/oran/dmaapadapter/IntegrationWithEcs.java
rename to dmaap-adaptor-java/src/test/java/org/oran/dmaapadapter/IntegrationWithIcs.java
index c8fcb83..12696ed 100644
--- a/dmaap-adaptor-java/src/test/java/org/oran/dmaapadapter/IntegrationWithEcs.java
+++ b/dmaap-adaptor-java/src/test/java/org/oran/dmaapadapter/IntegrationWithIcs.java
@@ -86,7 +86,7 @@
static class TestApplicationConfig extends ApplicationConfig {
@Override
- public String getEcsBaseUrl() {
+ public String getIcsBaseUrl() {
return "https://localhost:8434";
}
@@ -161,7 +161,7 @@
}
private String ecsBaseUrl() {
- return applicationConfig.getEcsBaseUrl();
+ return applicationConfig.getIcsBaseUrl();
}
private String jobUrl(String jobId) {
@@ -214,7 +214,7 @@
@Test
void testCreateKafkaJob() {
- await().untilAsserted(() -> assertThat(producerRegstrationTask.isRegisteredInEcs()).isTrue());
+ await().untilAsserted(() -> assertThat(producerRegstrationTask.isRegisteredInIcs()).isTrue());
final String TYPE_ID = "KafkaInformationType";
Job.Parameters param = new Job.Parameters("filter", new Job.BufferTimeout(123, 456), 1);
@@ -233,7 +233,7 @@
@Test
void testWholeChain() throws Exception {
- await().untilAsserted(() -> assertThat(producerRegstrationTask.isRegisteredInEcs()).isTrue());
+ await().untilAsserted(() -> assertThat(producerRegstrationTask.isRegisteredInIcs()).isTrue());
createInformationJobInEcs(DMAAP_TYPE_ID, DMAAP_JOB_ID, ".*DmaapResponse.*");
diff --git a/dmaap-adaptor-java/src/test/java/org/oran/dmaapadapter/IntegrationWithKafka.java b/dmaap-adaptor-java/src/test/java/org/oran/dmaapadapter/IntegrationWithKafka.java
index 9cd4fdd..c38af8a 100644
--- a/dmaap-adaptor-java/src/test/java/org/oran/dmaapadapter/IntegrationWithKafka.java
+++ b/dmaap-adaptor-java/src/test/java/org/oran/dmaapadapter/IntegrationWithKafka.java
@@ -94,7 +94,7 @@
private ConsumerController consumerController;
@Autowired
- private EcsSimulatorController ecsSimulatorController;
+ private IcsSimulatorController icsSimulatorController;
@Autowired
private KafkaTopicConsumers kafkaTopicConsumers;
@@ -108,7 +108,7 @@
static class TestApplicationConfig extends ApplicationConfig {
@Override
- public String getEcsBaseUrl() {
+ public String getIcsBaseUrl() {
return thisProcessUrl();
}
@@ -151,7 +151,7 @@
@AfterEach
void reset() {
this.consumerController.testResults.reset();
- this.ecsSimulatorController.testResults.reset();
+ this.icsSimulatorController.testResults.reset();
this.jobs.clear();
}
@@ -252,13 +252,13 @@
final String JOB_ID2 = "ID2";
// Register producer, Register types
- await().untilAsserted(() -> assertThat(ecsSimulatorController.testResults.registrationInfo).isNotNull());
- assertThat(ecsSimulatorController.testResults.registrationInfo.supportedTypeIds).hasSize(this.types.size());
+ await().untilAsserted(() -> assertThat(icsSimulatorController.testResults.registrationInfo).isNotNull());
+ assertThat(icsSimulatorController.testResults.registrationInfo.supportedTypeIds).hasSize(this.types.size());
// Create two jobs. One buffering and one with a filter
- this.ecsSimulatorController.addJob(consumerJobInfo(null, Duration.ofMillis(400), 1000, 20), JOB_ID1,
+ this.icsSimulatorController.addJob(consumerJobInfo(null, Duration.ofMillis(400), 1000, 20), JOB_ID1,
restClient());
- this.ecsSimulatorController.addJob(consumerJobInfo("^Message_1$", Duration.ZERO, 0, 1), JOB_ID2, restClient());
+ this.icsSimulatorController.addJob(consumerJobInfo("^Message_1$", Duration.ZERO, 0, 1), JOB_ID2, restClient());
await().untilAsserted(() -> assertThat(this.jobs.size()).isEqualTo(2));
@@ -268,8 +268,8 @@
verifiedReceivedByConsumer("Message_1", "[\"Message_1\", \"Message_2\", \"Message_3\"]");
// Delete the jobs
- this.ecsSimulatorController.deleteJob(JOB_ID1, restClient());
- this.ecsSimulatorController.deleteJob(JOB_ID2, restClient());
+ this.icsSimulatorController.deleteJob(JOB_ID1, restClient());
+ this.icsSimulatorController.deleteJob(JOB_ID2, restClient());
await().untilAsserted(() -> assertThat(this.jobs.size()).isZero());
await().untilAsserted(() -> assertThat(this.kafkaTopicConsumers.getConsumers().keySet()).isEmpty());
@@ -281,13 +281,13 @@
final String JOB_ID2 = "ID2";
// Register producer, Register types
- await().untilAsserted(() -> assertThat(ecsSimulatorController.testResults.registrationInfo).isNotNull());
- assertThat(ecsSimulatorController.testResults.registrationInfo.supportedTypeIds).hasSize(this.types.size());
+ await().untilAsserted(() -> assertThat(icsSimulatorController.testResults.registrationInfo).isNotNull());
+ assertThat(icsSimulatorController.testResults.registrationInfo.supportedTypeIds).hasSize(this.types.size());
// Create two jobs.
- this.ecsSimulatorController.addJob(consumerJobInfo(null, Duration.ofMillis(400), 1000, 1), JOB_ID1,
+ this.icsSimulatorController.addJob(consumerJobInfo(null, Duration.ofMillis(400), 1000, 1), JOB_ID1,
restClient());
- this.ecsSimulatorController.addJob(consumerJobInfo(null, Duration.ZERO, 0, 1), JOB_ID2, restClient());
+ this.icsSimulatorController.addJob(consumerJobInfo(null, Duration.ZERO, 0, 1), JOB_ID2, restClient());
await().untilAsserted(() -> assertThat(this.jobs.size()).isEqualTo(2));
@@ -298,8 +298,8 @@
await().untilAsserted(() -> assertThat(consumer.isRunning()).isFalse());
this.consumerController.testResults.reset();
- this.ecsSimulatorController.deleteJob(JOB_ID2, restClient()); // Delete one job
- kafkaTopicConsumers.restartNonRunningTasks();
+ this.icsSimulatorController.deleteJob(JOB_ID2, restClient()); // Delete one job
+ kafkaTopicConsumers.restartNonRunningTopics();
Thread.sleep(1000); // Restarting the input seems to take some asynch time
dataToSend = Flux.just(senderRecord("Howdy\""));
@@ -308,8 +308,8 @@
verifiedReceivedByConsumer("[\"Howdy\\\"\"]");
// Delete the jobs
- this.ecsSimulatorController.deleteJob(JOB_ID1, restClient());
- this.ecsSimulatorController.deleteJob(JOB_ID2, restClient());
+ this.icsSimulatorController.deleteJob(JOB_ID1, restClient());
+ this.icsSimulatorController.deleteJob(JOB_ID2, restClient());
await().untilAsserted(() -> assertThat(this.jobs.size()).isZero());
await().untilAsserted(() -> assertThat(this.kafkaTopicConsumers.getConsumers().keySet()).isEmpty());
diff --git a/dmaap-mediator-producer/README.md b/dmaap-mediator-producer/README.md
index 2fd7194..9a0903b 100644
--- a/dmaap-mediator-producer/README.md
+++ b/dmaap-mediator-producer/README.md
@@ -38,19 +38,23 @@
Once the initial registration is done, the producer will constantly poll MR for all configured job types. When receiving messages for a type, it will distribute these messages to all jobs registered for the type. If no jobs for that type are registered, the messages will be discarded. If a consumer is unavailable for distribution, the messages will be discarded for that consumer until it is available again.
+The producer provides a REST API to control the log level. The available levels are the same as the ones used in the configuration above.
+
+ PUT https://mrproducer:8085/admin/log?level=<new level>
+
## Development
To make it easy to test during development of the producer, two stubs are provided in the `stub` folder.
-One, under the `dmaap` folder, called `dmaap` that stubs MR and respond with an array with one message with `eventSeverity` alternating between `NORMAL` and `CRITICAL`. The default port is `3905`, but this can be overridden by passing a `-port [PORT]` flag when starting the stub. To build and start the stub, do the following:
+One, under the `dmaap` folder, called `dmaap` that stubs MR and respond with an array with one message with `eventSeverity` alternating between `NORMAL` and `CRITICAL`. The default port is `3905`, but this can be overridden by passing a `-port <PORT>` flag when starting the stub. To build and start the stub, do the following:
>1. cd stub/dmaap
>2. go build
->3. ./dmaap
+>3. ./dmaap [-port \<PORT>]
-One, under the `consumer` folder, called `consumer` that at startup will register a job of type `STD_Fault_Messages` in ICS, and then listen for REST calls and print the body of them. By default, it listens to the port `40935`, but his can be overridden by passing a `-port [PORT]` flag when starting the stub. To build and start the stub, do the following:
+One, under the `consumer` folder, called `consumer` that at startup will register a job of type `STD_Fault_Messages` in ICS, and then listen for REST calls and print the body of them. By default, it listens to the port `40935`, but his can be overridden by passing a `-port <PORT>` flag when starting the stub. To build and start the stub, do the following:
>1. cd stub/consumer
>2. go build
->3. ./consumer
+>3. ./consumer [-port \<PORT>]
Mocks needed for unit tests have been generated using `github.com/stretchr/testify/mock` and are checked in under the `mocks` folder. **Note!** Keep in mind that if any of the mocked interfaces change, a new mock for that interface must be generated and checked in.
diff --git a/dmaap-mediator-producer/go.mod b/dmaap-mediator-producer/go.mod
index ffea6a2..eaaecf7 100644
--- a/dmaap-mediator-producer/go.mod
+++ b/dmaap-mediator-producer/go.mod
@@ -3,15 +3,15 @@
go 1.17
require (
+ github.com/gorilla/mux v1.8.0
+ github.com/hashicorp/go-retryablehttp v0.7.0
github.com/sirupsen/logrus v1.8.1
github.com/stretchr/testify v1.7.0
)
require (
github.com/davecgh/go-spew v1.1.1 // indirect
- github.com/gorilla/mux v1.8.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.1 // indirect
- github.com/hashicorp/go-retryablehttp v0.7.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/objx v0.1.0 // indirect
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037 // indirect
diff --git a/dmaap-mediator-producer/go.sum b/dmaap-mediator-producer/go.sum
index 8447fa0..4b3557b 100644
--- a/dmaap-mediator-producer/go.sum
+++ b/dmaap-mediator-producer/go.sum
@@ -5,6 +5,7 @@
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM=
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
+github.com/hashicorp/go-hclog v0.9.2 h1:CG6TE5H9/JXsFWJCfoIVpKFIkFe6ysEuHirp4DxCsHI=
github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
github.com/hashicorp/go-retryablehttp v0.7.0 h1:eu1EI/mbirUgP5C8hVsTNaGZreBDlYiwC1FZWkvQPQ4=
github.com/hashicorp/go-retryablehttp v0.7.0/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY=
diff --git a/dmaap-mediator-producer/internal/restclient/HTTPClient.go b/dmaap-mediator-producer/internal/restclient/HTTPClient.go
index 8ccd4b2..9a827e7 100644
--- a/dmaap-mediator-producer/internal/restclient/HTTPClient.go
+++ b/dmaap-mediator-producer/internal/restclient/HTTPClient.go
@@ -31,6 +31,7 @@
"time"
"github.com/hashicorp/go-retryablehttp"
+ log "github.com/sirupsen/logrus"
)
// HTTPClient interface
@@ -115,6 +116,7 @@
func CreateRetryClient(cert tls.Certificate) *http.Client {
rawRetryClient := retryablehttp.NewClient()
+ rawRetryClient.Logger = leveledLogger{}
rawRetryClient.RetryWaitMax = time.Minute
rawRetryClient.RetryMax = math.MaxInt
rawRetryClient.HTTPClient.Transport = getSecureTransportWithoutVerify(cert)
@@ -145,3 +147,28 @@
u, _ := url.Parse(configUrl)
return u.Scheme == "https"
}
+
+// Used to get leveled logging in the RetryClient
+type leveledLogger struct {
+}
+
+func (ll leveledLogger) Error(msg string, keysAndValues ...interface{}) {
+ log.WithFields(getFields(keysAndValues)).Error(msg)
+}
+func (ll leveledLogger) Info(msg string, keysAndValues ...interface{}) {
+ log.WithFields(getFields(keysAndValues)).Info(msg)
+}
+func (ll leveledLogger) Debug(msg string, keysAndValues ...interface{}) {
+ log.WithFields(getFields(keysAndValues)).Debug(msg)
+}
+func (ll leveledLogger) Warn(msg string, keysAndValues ...interface{}) {
+ log.WithFields(getFields(keysAndValues)).Warn(msg)
+}
+
+func getFields(keysAndValues []interface{}) log.Fields {
+ fields := log.Fields{}
+ for i := 0; i < len(keysAndValues); i = i + 2 {
+ fields[fmt.Sprint(keysAndValues[i])] = keysAndValues[i+1]
+ }
+ return fields
+}
diff --git a/dmaap-mediator-producer/internal/server/server.go b/dmaap-mediator-producer/internal/server/server.go
index 79646c2..8c5577d 100644
--- a/dmaap-mediator-producer/internal/server/server.go
+++ b/dmaap-mediator-producer/internal/server/server.go
@@ -27,6 +27,7 @@
"net/http"
"github.com/gorilla/mux"
+ log "github.com/sirupsen/logrus"
"oransc.org/nonrtric/dmaapmediatorproducer/internal/jobs"
)
@@ -34,6 +35,8 @@
const AddJobPath = "/jobs"
const jobIdToken = "infoJobId"
const deleteJobPath = AddJobPath + "/{" + jobIdToken + "}"
+const logLevelToken = "level"
+const logAdminPath = "/admin/log"
type ProducerCallbackHandler struct {
jobsManager jobs.JobsManager
@@ -51,6 +54,7 @@
r.HandleFunc(StatusPath, statusHandler).Methods(http.MethodGet).Name("status")
r.HandleFunc(AddJobPath, callbackHandler.addInfoJobHandler).Methods(http.MethodPost).Name("add")
r.HandleFunc(deleteJobPath, callbackHandler.deleteInfoJobHandler).Methods(http.MethodDelete).Name("delete")
+ r.HandleFunc(logAdminPath, callbackHandler.setLogLevel).Methods(http.MethodPut).Name("setLogLevel")
r.NotFoundHandler = ¬FoundHandler{}
r.MethodNotAllowedHandler = &methodNotAllowedHandler{}
return r
@@ -87,6 +91,17 @@
h.jobsManager.DeleteJobFromRESTCall(id)
}
+func (h *ProducerCallbackHandler) setLogLevel(w http.ResponseWriter, r *http.Request) {
+ query := r.URL.Query()
+ logLevelStr := query.Get(logLevelToken)
+ if loglevel, err := log.ParseLevel(logLevelStr); err == nil {
+ log.SetLevel(loglevel)
+ } else {
+ http.Error(w, fmt.Sprintf("Invalid log level: %v. Log level will not be changed!", logLevelStr), http.StatusBadRequest)
+ return
+ }
+}
+
type notFoundHandler struct{}
func (h *notFoundHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
diff --git a/dmaap-mediator-producer/internal/server/server_test.go b/dmaap-mediator-producer/internal/server/server_test.go
index 1d458c9..1db3644 100644
--- a/dmaap-mediator-producer/internal/server/server_test.go
+++ b/dmaap-mediator-producer/internal/server/server_test.go
@@ -78,6 +78,14 @@
handler.ServeHTTP(responseRecorder, newRequest(http.MethodPut, "/status", nil, t))
assertions.Equal(http.StatusMethodNotAllowed, responseRecorder.Code)
assertions.Contains(responseRecorder.Body.String(), "Method is not supported.")
+
+ setLogLevelRoute := r.Get("setLogLevel")
+ assertions.NotNil(setLogLevelRoute)
+ supportedMethods, err = setLogLevelRoute.GetMethods()
+ assertions.Equal([]string{http.MethodPut}, supportedMethods)
+ assertions.Nil(err)
+ path, _ = setLogLevelRoute.GetPathTemplate()
+ assertions.Equal("/admin/log", path)
}
func TestStatusHandler(t *testing.T) {
@@ -119,7 +127,6 @@
},
},
wantedStatus: http.StatusOK,
- wantedBody: "",
},
{
name: "AddInfoJobHandler with incorrect job info, should return BadRequest",
@@ -171,6 +178,50 @@
jobHandlerMock.AssertCalled(t, "DeleteJobFromRESTCall", "job1")
}
+func TestSetLogLevel(t *testing.T) {
+ assertions := require.New(t)
+
+ type args struct {
+ logLevel string
+ }
+ tests := []struct {
+ name string
+ args args
+ wantedStatus int
+ wantedBody string
+ }{
+ {
+ name: "Set to valid log level, should return OK",
+ args: args{
+ logLevel: "Debug",
+ },
+ wantedStatus: http.StatusOK,
+ },
+ {
+ name: "Set to invalid log level, should return BadRequest",
+ args: args{
+ logLevel: "bad",
+ },
+ wantedStatus: http.StatusBadRequest,
+ wantedBody: "Invalid log level: bad",
+ },
+ }
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ callbackHandlerUnderTest := NewProducerCallbackHandler(nil)
+
+ handler := http.HandlerFunc(callbackHandlerUnderTest.setLogLevel)
+ responseRecorder := httptest.NewRecorder()
+ r, _ := http.NewRequest(http.MethodPut, "/admin/log?level="+tt.args.logLevel, nil)
+
+ handler.ServeHTTP(responseRecorder, r)
+
+ assertions.Equal(tt.wantedStatus, responseRecorder.Code, tt.name)
+ assertions.Contains(responseRecorder.Body.String(), tt.wantedBody, tt.name)
+ })
+ }
+}
+
func newRequest(method string, url string, jobInfo *jobs.JobInfo, t *testing.T) *http.Request {
var body io.Reader
if jobInfo != nil {
diff --git a/dmaap-mediator-producer/main.go b/dmaap-mediator-producer/main.go
index 194ed75..3a4935a 100644
--- a/dmaap-mediator-producer/main.go
+++ b/dmaap-mediator-producer/main.go
@@ -56,7 +56,7 @@
}
retryClient := restclient.CreateRetryClient(cert)
- jobsManager := jobs.NewJobsManagerImpl("configs/type_config.json", retryClient, configuration.DMaaPMRAddress, restclient.CreateClientWithoutRetry(cert, 5*time.Second))
+ jobsManager := jobs.NewJobsManagerImpl("configs/type_config.json", retryClient, configuration.DMaaPMRAddress, restclient.CreateClientWithoutRetry(cert, 10*time.Second))
if err := registerTypesAndProducer(jobsManager, configuration.InfoCoordinatorAddress, callbackAddress, retryClient); err != nil {
log.Fatalf("Stopping producer due to: %v", err)
}
diff --git a/dmaap-mediator-producer/stub/consumer/consumerstub.go b/dmaap-mediator-producer/stub/consumer/consumerstub.go
index 5cbcaea..4260cae 100644
--- a/dmaap-mediator-producer/stub/consumer/consumerstub.go
+++ b/dmaap-mediator-producer/stub/consumer/consumerstub.go
@@ -43,7 +43,7 @@
registerJob(*port)
- fmt.Print("Starting consumer on port: ", *port)
+ fmt.Println("Starting consumer on port: ", *port)
fmt.Println(http.ListenAndServe(fmt.Sprintf(":%v", *port), nil))
}
@@ -59,11 +59,11 @@
InfoTypeId: "STD_Fault_Messages",
JobDefinition: "{}",
}
- fmt.Print("Registering consumer: ", jobInfo)
+ fmt.Println("Registering consumer: ", jobInfo)
body, _ := json.Marshal(jobInfo)
putErr := restclient.Put(fmt.Sprintf("http://localhost:8083/data-consumer/v1/info-jobs/job%v", port), body, &httpClient)
if putErr != nil {
- fmt.Printf("Unable to register consumer: %v", putErr)
+ fmt.Println("Unable to register consumer: ", putErr)
}
}
diff --git a/dmaap-mediator-producer/stub/dmaap/mrstub.go b/dmaap-mediator-producer/stub/dmaap/mrstub.go
index 36ffa39..451bc9a 100644
--- a/dmaap-mediator-producer/stub/dmaap/mrstub.go
+++ b/dmaap-mediator-producer/stub/dmaap/mrstub.go
@@ -71,12 +71,13 @@
var responseBody []byte
if critical {
responseBody = getFaultMessage("CRITICAL")
+ fmt.Println("Sending CRITICAL")
critical = false
} else {
responseBody = getFaultMessage("NORMAL")
+ fmt.Println("Sending NORMAL")
critical = true
}
- // w.Write(responseBody)
fmt.Fprint(w, string(responseBody))
}
diff --git a/docs/api-docs.rst b/docs/api-docs.rst
index ef234a5..51d18ee 100644
--- a/docs/api-docs.rst
+++ b/docs/api-docs.rst
@@ -20,7 +20,7 @@
The core Non-RT RIC consists of several parts, with available APIs described in the sections below:
* The A1 Policy Management Service
-* The Enrichment Coordinator Service
+* The Information Coordinator Service
* The Non-RT-RIC App Catalogue
* K8S Helm Chart LCM Manager (Initial) **<ToDo>**
@@ -29,10 +29,10 @@
For information about the A1 Policy Management Service that is implemented in ONAP, see `ONAP docs <https://docs.onap.org/projects/onap-ccsdk-oran/en/latest/index.html>`_ and `wiki <https://wiki.onap.org/pages/viewpage.action?pageId=84672221>`_.
-Enrichment Coordinator Service
-==============================
+Information Coordinator Service
+===============================
-See `A1 Enrichment Information Coordination Service API <./ecs-api.html>`_ for full details of the API.
+See `A1 Information Information Coordination Service API <./ics-api.html>`_ for full details of the API.
The API is also described in Swagger-JSON and YAML:
@@ -40,7 +40,7 @@
:header: "API name", "|swagger-icon|", "|yaml-icon|"
:widths: 10,5,5
- "A1 Enrichment Information Coordination Service API", ":download:`link <../enrichment-coordinator-service/api/ecs-api.json>`", ":download:`link <../enrichment-coordinator-service/api/ecs-api.yaml>`"
+ "A1 Enrichment Information Coordination Service API", ":download:`link <../information-coordinator-service/api/ics-api.json>`", ":download:`link <../information-coordinator-service/api/ics-api.yaml>`"
Non-RT-RIC App Catalogue (Initial)
==================================
diff --git a/docs/conf.py b/docs/conf.py
index 85721c6..ff5fcc9 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -24,7 +24,7 @@
{
'name': 'ECS API',
'page': 'ecs-api',
- 'spec': '../enrichment-coordinator-service/api/ecs-api.json',
+ 'spec': '../information-coordinator-service/api/ics-api.json',
'embed': True,
}
]
diff --git a/docs/developer-guide.rst b/docs/developer-guide.rst
index 43ac2d1..e0cb080 100644
--- a/docs/developer-guide.rst
+++ b/docs/developer-guide.rst
@@ -15,21 +15,21 @@
The A1 Policy Management Service is implemented in ONAP. For documentation see `ONAP CCSDK documentation <https://docs.onap.org/projects/onap-ccsdk-oran/en/latest/index.html>`_
and `wiki <https://wiki.onap.org/pages/viewpage.action?pageId=84672221>`_.
-Enrichment Coordinator Service
-------------------------------
-The Enrichment Coordinator Service is a Java 11 web application built using the Spring Framework. Using Spring Boot
+Information Coordinator Service
+-------------------------------
+The Information Coordinator Service is a Java 11 web application built using the Spring Framework. Using Spring Boot
dependencies, it runs as a standalone application.
Its main functionality is to act as a data subscription broker and to decouple data producer from data consumers.
-See the ./config/README file in the *enrichment-coordinator-service* directory Gerrit repo on how to create and setup
+See the ./config/README file in the *information-coordinator-service* directory Gerrit repo on how to create and setup
the certificates and private keys needed for HTTPS.
Start standalone
++++++++++++++++
-The project uses Maven. To start the Enrichment Coordinator Service as a freestanding application, run the following
-command in the *enrichment-coordinator-service* directory:
+The project uses Maven. To start the Information Coordinator Service as a freestanding application, run the following
+command in the *information-coordinator-service* directory:
+-----------------------------+
| mvn spring-boot:run |
@@ -38,7 +38,7 @@
Start in Docker
+++++++++++++++
-To build and deploy the Enrichment Coordinator Service, go to the "enrichment-coordinator-service" folder and run the
+To build and deploy the Information Coordinator Service, go to the "information-coordinator-service" folder and run the
following command:
+-----------------------------+
@@ -48,7 +48,7 @@
Then start the container by running the following command:
+--------------------------------------------------------------------+
- | docker run nonrtric-enrichment-coordinator-service |
+ | docker run nonrtric-information-coordinator-service |
+--------------------------------------------------------------------+
Initial Non-RT-RIC App Catalogue
diff --git a/docs/overview.rst b/docs/overview.rst
index 8645a18..e816975 100644
--- a/docs/overview.rst
+++ b/docs/overview.rst
@@ -24,7 +24,7 @@
* Non-RT-RIC Control Panel / Dashboard
* A1 Policy Management Service (developed in ONAP)
* A1/SDNC Controller & A1 Adapter (Controller plugin)
-* Enrichment Information Coordinator
+* Information Coordinator Service
* Non-RT-RIC (Spring Cloud) Service Gateway
* Non-RT-RIC (Kong) Service Exposure Prototyping
* Initial Non-RT-RIC App Catalogue
@@ -40,7 +40,7 @@
* View and Manage A1 policies in the RAN (near-RT-RICs)
* Interacts with the Policy agent’s NBI (REST API)
* Graphical A1 policy creation/editing is model-driven, based on policy type’s JSON schema
-* View and manage producers and jobs for the Enrichment coordinator service
+* View and manage producers and jobs for the Information coordinator service
* Configure A1 Policy Management Service (e.g. add/remove near-rt-rics)
* Interacts with the A1-PolicyManagementService & A1-EI-Coordinator (REST NBIs) via Service Exposure gateway
@@ -90,8 +90,8 @@
See also: `A1 Adapter/Controller Functions in ONAP <https://wiki.onap.org/pages/viewpage.action?pageId=84672221>`_
-Enrichment Information Job Coordination Service
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Information Job Coordination Service
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Coordinate/Register A1-EI Types, Producers, Consumers, and Jobs.
@@ -106,14 +106,14 @@
* Query status of A1-EI jobs
* Monitors all near-RT-RICs and recovers from inconsistencies
* After EI-type/Producer/Consumer/Job is successfully registered delivery/flow can happen directly between A1-EI Producers (in SMO/NONRTRIC domain) and A1-EI consumers (near-RT-RICs in RAN domain)
-* *Being extended to coordinate non-A1 Enrichment Information exchange between NONRTRIC Apps*
+* *Being extended to coordinate non-A1 Information exchange between NONRTRIC Apps*
Non-RT-RIC (Spring Cloud) Service Gateway
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Support Apps to use A1 Services
* `Spring Cloud Gateway <https://cloud.spring.io/spring-cloud-gateway>`_ provides the library to build a basic API gateway
-* Exposes A1 Policy Management Service & Enrichment Coordinator Service.
+* Exposes A1 Policy Management Service & Information Coordinator Service.
* Additional predicates can be added in code or preferably in the Gateway yaml configuration.
Implementation:
@@ -162,7 +162,7 @@
Stateful A1 test stub.
* Used to create multiple stateful A1 providers (simulated near-rt-rics)
-* Supports A1-Policy and A1-EnrichmentInformation
+* Supports A1-Policy and A1-Enrichment Information
* Swagger-based northbound interface, so easy to change the A1 profile exposed (e.g. A1 version, A1 Policy Types, A1-E1 consumers, etc)
* All A1-AP versions supported
diff --git a/enrichment-coordinator-service b/enrichment-coordinator-service
new file mode 120000
index 0000000..750df39
--- /dev/null
+++ b/enrichment-coordinator-service
@@ -0,0 +1 @@
+information-coordinator-service
\ No newline at end of file
diff --git a/enrichment-coordinator-service/Dockerfile b/enrichment-coordinator-service/Dockerfile
deleted file mode 100644
index 744a237..0000000
--- a/enrichment-coordinator-service/Dockerfile
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-# ============LICENSE_START=======================================================
-# Copyright (C) 2020 Nordix Foundation.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-#
-FROM openjdk:11-jre-slim
-
-ARG JAR
-
-WORKDIR /opt/app/enrichment-coordinator-service
-RUN mkdir -p /var/log/enrichment-coordinator-service
-RUN mkdir -p /opt/app/enrichment-coordinator-service/etc/cert/
-RUN mkdir -p /var/enrichment-coordinator-service
-RUN chmod -R 777 /var/enrichment-coordinator-service
-
-EXPOSE 8083 8434
-
-ADD /config/application.yaml /opt/app/enrichment-coordinator-service/config/application.yaml
-ADD target/${JAR} /opt/app/enrichment-coordinator-service/enrichment-coordinator-service.jar
-ADD /config/keystore.jks /opt/app/enrichment-coordinator-service/etc/cert/keystore.jks
-ADD /config/truststore.jks /opt/app/enrichment-coordinator-service/etc/cert/truststore.jks
-
-
-RUN chmod -R 777 /opt/app/enrichment-coordinator-service/config/
-
-CMD ["java", "-jar", "/opt/app/enrichment-coordinator-service/enrichment-coordinator-service.jar"]
-
-
-
-
diff --git a/enrichment-coordinator-service/.gitignore b/information-coordinator-service/.gitignore
similarity index 100%
rename from enrichment-coordinator-service/.gitignore
rename to information-coordinator-service/.gitignore
diff --git a/information-coordinator-service/Dockerfile b/information-coordinator-service/Dockerfile
new file mode 100644
index 0000000..e9d179d
--- /dev/null
+++ b/information-coordinator-service/Dockerfile
@@ -0,0 +1,44 @@
+#
+# ============LICENSE_START=======================================================
+# Copyright (C) 2020 Nordix Foundation.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+#
+FROM openjdk:11-jre-slim
+
+ARG JAR
+
+WORKDIR /opt/app/information-coordinator-service
+RUN mkdir -p /var/log/information-coordinator-service
+RUN mkdir -p /opt/app/information-coordinator-service/etc/cert/
+RUN mkdir -p /var/information-coordinator-service
+RUN chmod -R 777 /var/information-coordinator-service
+
+EXPOSE 8083 8434
+
+ADD /config/application.yaml /opt/app/information-coordinator-service/config/application.yaml
+ADD target/${JAR} /opt/app/information-coordinator-service/information-coordinator-service.jar
+ADD /config/keystore.jks /opt/app/information-coordinator-service/etc/cert/keystore.jks
+ADD /config/truststore.jks /opt/app/information-coordinator-service/etc/cert/truststore.jks
+
+
+RUN chmod -R 777 /opt/app/information-coordinator-service/config/
+
+CMD ["java", "-jar", "/opt/app/information-coordinator-service/information-coordinator-service.jar"]
+
+
+
+
diff --git a/enrichment-coordinator-service/api/ecs-api.json b/information-coordinator-service/api/ics-api.json
similarity index 100%
rename from enrichment-coordinator-service/api/ecs-api.json
rename to information-coordinator-service/api/ics-api.json
diff --git a/enrichment-coordinator-service/api/ecs-api.yaml b/information-coordinator-service/api/ics-api.yaml
similarity index 100%
rename from enrichment-coordinator-service/api/ecs-api.yaml
rename to information-coordinator-service/api/ics-api.yaml
diff --git a/enrichment-coordinator-service/config/README b/information-coordinator-service/config/README
similarity index 100%
rename from enrichment-coordinator-service/config/README
rename to information-coordinator-service/config/README
diff --git a/enrichment-coordinator-service/config/application.yaml b/information-coordinator-service/config/application.yaml
similarity index 81%
rename from enrichment-coordinator-service/config/application.yaml
rename to information-coordinator-service/config/application.yaml
index 5900d63..e1a417c 100644
--- a/enrichment-coordinator-service/config/application.yaml
+++ b/information-coordinator-service/config/application.yaml
@@ -19,9 +19,9 @@
org.springframework: ERROR
org.springframework.data: ERROR
org.springframework.web.reactive.function.client.ExchangeFunctions: ERROR
- org.oransc.enrichment: INFO
+ org.oransc.ics: INFO
file:
- name: /var/log/enrichment-coordinator-service/application.log
+ name: /var/log/information-coordinator-service/application.log
server:
# Configuration of the HTTP/REST server. The parameters are defined and handeled by the springboot framework.
# See springboot documentation.
@@ -30,7 +30,7 @@
ssl:
key-store-type: JKS
key-store-password: policy_agent
- key-store: /opt/app/enrichment-coordinator-service/etc/cert/keystore.jks
+ key-store: /opt/app/information-coordinator-service/etc/cert/keystore.jks
key-password: policy_agent
key-alias: policy_agent
app:
@@ -40,10 +40,10 @@
# 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
+ trust-store: /opt/app/information-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
+ vardata-directory: /var/information-coordinator-service
diff --git a/enrichment-coordinator-service/config/keystore.jks b/information-coordinator-service/config/keystore.jks
similarity index 100%
rename from enrichment-coordinator-service/config/keystore.jks
rename to information-coordinator-service/config/keystore.jks
Binary files differ
diff --git a/enrichment-coordinator-service/config/truststore.jks b/information-coordinator-service/config/truststore.jks
similarity index 100%
rename from enrichment-coordinator-service/config/truststore.jks
rename to information-coordinator-service/config/truststore.jks
Binary files differ
diff --git a/enrichment-coordinator-service/eclipse-formatter.xml b/information-coordinator-service/eclipse-formatter.xml
similarity index 100%
rename from enrichment-coordinator-service/eclipse-formatter.xml
rename to information-coordinator-service/eclipse-formatter.xml
diff --git a/enrichment-coordinator-service/pom.xml b/information-coordinator-service/pom.xml
similarity index 96%
rename from enrichment-coordinator-service/pom.xml
rename to information-coordinator-service/pom.xml
index 4edf4d4..2de2bf2 100644
--- a/enrichment-coordinator-service/pom.xml
+++ b/information-coordinator-service/pom.xml
@@ -30,7 +30,7 @@
<relativePath />
</parent>
<groupId>org.o-ran-sc.nonrtric</groupId>
- <artifactId>enrichment-coordinator-service</artifactId>
+ <artifactId>information-coordinator-service</artifactId>
<version>1.2.0-SNAPSHOT</version>
<licenses>
<license>
@@ -297,11 +297,11 @@
<goal>generate</goal>
</goals>
<configuration>
- <inputSpec>${project.basedir}/api/ecs-api.json</inputSpec>
+ <inputSpec>${project.basedir}/api/ics-api.json</inputSpec>
<language>openapi-yaml</language>
<output>${project.basedir}/api</output>
<configOptions>
- <outputFile>ecs-api.yaml</outputFile>
+ <outputFile>ics-api.yaml</outputFile>
</configOptions>
</configuration>
</execution>
@@ -314,7 +314,7 @@
<inherited>false</inherited>
<executions>
<execution>
- <id>generate-enrichment-coordinator-service-image</id>
+ <id>generate-information-coordinator-service-image</id>
<phase>package</phase>
<goals>
<goal>build</goal>
@@ -323,7 +323,7 @@
<pullRegistry>${env.CONTAINER_PULL_REGISTRY}</pullRegistry>
<images>
<image>
- <name>o-ran-sc/nonrtric-enrichment-coordinator-service:${project.version}</name>
+ <name>o-ran-sc/nonrtric-information-coordinator-service:${project.version}</name>
<build>
<cleanup>try</cleanup>
<contextDir>${basedir}</contextDir>
@@ -340,7 +340,7 @@
</configuration>
</execution>
<execution>
- <id>push-enrichment-coordinator-service-image</id>
+ <id>push-information-coordinator-service-image</id>
<goals>
<goal>build</goal>
<goal>push</goal>
@@ -350,7 +350,7 @@
<pushRegistry>${env.CONTAINER_PUSH_REGISTRY}</pushRegistry>
<images>
<image>
- <name>o-ran-sc/nonrtric-enrichment-coordinator-service:${project.version}</name>
+ <name>o-ran-sc/nonrtric-information-coordinator-service:${project.version}</name>
<build>
<contextDir>${basedir}</contextDir>
<dockerFile>Dockerfile</dockerFile>
@@ -380,4 +380,4 @@
<system>JIRA</system>
<url>https://jira.o-ran-sc.org/</url>
</issueManagement>
-</project>
+</project>
\ No newline at end of file
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/Application.java b/information-coordinator-service/src/main/java/org/oransc/ics/Application.java
similarity index 96%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/Application.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/Application.java
index 3c0156c..46caac1 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/Application.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/Application.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment;
+package org.oransc.ics;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/BeanFactory.java b/information-coordinator-service/src/main/java/org/oransc/ics/BeanFactory.java
similarity index 92%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/BeanFactory.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/BeanFactory.java
index 1d493bb..6adf8ad 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/BeanFactory.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/BeanFactory.java
@@ -18,17 +18,17 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment;
+package org.oransc.ics;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.lang.invoke.MethodHandles;
import org.apache.catalina.connector.Connector;
-import org.oransc.enrichment.configuration.ApplicationConfig;
-import org.oransc.enrichment.controllers.r1producer.ProducerCallbacks;
-import org.oransc.enrichment.repository.InfoJobs;
-import org.oransc.enrichment.repository.InfoTypes;
+import org.oransc.ics.configuration.ApplicationConfig;
+import org.oransc.ics.controllers.r1producer.ProducerCallbacks;
+import org.oransc.ics.repository.InfoJobs;
+import org.oransc.ics.repository.InfoTypes;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/SwaggerConfig.java b/information-coordinator-service/src/main/java/org/oransc/ics/SwaggerConfig.java
similarity index 93%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/SwaggerConfig.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/SwaggerConfig.java
index 5f61e31..42ffe83 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/SwaggerConfig.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/SwaggerConfig.java
@@ -18,17 +18,17 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment;
+package org.oransc.ics;
import io.swagger.v3.oas.annotations.OpenAPIDefinition;
import io.swagger.v3.oas.annotations.info.Info;
import io.swagger.v3.oas.annotations.info.License;
import io.swagger.v3.oas.annotations.tags.Tag;
-import org.oransc.enrichment.controllers.StatusController;
-import org.oransc.enrichment.controllers.a1e.A1eConsts;
-import org.oransc.enrichment.controllers.r1consumer.ConsumerConsts;
-import org.oransc.enrichment.controllers.r1producer.ProducerConsts;
+import org.oransc.ics.controllers.StatusController;
+import org.oransc.ics.controllers.a1e.A1eConsts;
+import org.oransc.ics.controllers.r1consumer.ConsumerConsts;
+import org.oransc.ics.controllers.r1producer.ProducerConsts;
/**
* Swagger configuration class that uses swagger documentation type and scans
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/clients/AsyncRestClient.java b/information-coordinator-service/src/main/java/org/oransc/ics/clients/AsyncRestClient.java
similarity index 98%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/clients/AsyncRestClient.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/clients/AsyncRestClient.java
index b7f23b1..1de7437 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/clients/AsyncRestClient.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/clients/AsyncRestClient.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.clients;
+package org.oransc.ics.clients;
import io.netty.channel.ChannelOption;
import io.netty.handler.ssl.SslContext;
@@ -28,7 +28,7 @@
import java.lang.invoke.MethodHandles;
import java.util.concurrent.atomic.AtomicInteger;
-import org.oransc.enrichment.configuration.WebClientConfig.HttpProxyConfig;
+import org.oransc.ics.configuration.WebClientConfig.HttpProxyConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.MediaType;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/clients/AsyncRestClientFactory.java b/information-coordinator-service/src/main/java/org/oransc/ics/clients/AsyncRestClientFactory.java
similarity index 97%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/clients/AsyncRestClientFactory.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/clients/AsyncRestClientFactory.java
index 4865df5..cfac5cf 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/clients/AsyncRestClientFactory.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/clients/AsyncRestClientFactory.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.clients;
+package org.oransc.ics.clients;
import io.netty.handler.ssl.SslContext;
import io.netty.handler.ssl.SslContextBuilder;
@@ -41,8 +41,8 @@
import javax.net.ssl.KeyManagerFactory;
-import org.oransc.enrichment.configuration.WebClientConfig;
-import org.oransc.enrichment.configuration.WebClientConfig.HttpProxyConfig;
+import org.oransc.ics.configuration.WebClientConfig;
+import org.oransc.ics.configuration.WebClientConfig.HttpProxyConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.ResourceUtils;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/configuration/ApplicationConfig.java b/information-coordinator-service/src/main/java/org/oransc/ics/configuration/ApplicationConfig.java
similarity index 96%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/configuration/ApplicationConfig.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/configuration/ApplicationConfig.java
index 5493fd8..0a63d42 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/configuration/ApplicationConfig.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/configuration/ApplicationConfig.java
@@ -18,11 +18,11 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.configuration;
+package org.oransc.ics.configuration;
import lombok.Getter;
-import org.oransc.enrichment.configuration.WebClientConfig.HttpProxyConfig;
+import org.oransc.ics.configuration.WebClientConfig.HttpProxyConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/configuration/WebClientConfig.java b/information-coordinator-service/src/main/java/org/oransc/ics/configuration/WebClientConfig.java
similarity index 96%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/configuration/WebClientConfig.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/configuration/WebClientConfig.java
index 0b68248..12e9cfd 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/configuration/WebClientConfig.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/configuration/WebClientConfig.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.configuration;
+package org.oransc.ics.configuration;
import org.immutables.value.Value;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/ErrorResponse.java b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/ErrorResponse.java
similarity index 96%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/ErrorResponse.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/controllers/ErrorResponse.java
index 1539d8c..25b0c16 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/ErrorResponse.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/ErrorResponse.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.controllers;
+package org.oransc.ics.controllers;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@@ -26,7 +26,7 @@
import io.swagger.v3.oas.annotations.media.Schema;
-import org.oransc.enrichment.exceptions.ServiceException;
+import org.oransc.ics.exceptions.ServiceException;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/StatusController.java b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/StatusController.java
similarity index 94%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/StatusController.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/controllers/StatusController.java
index 9e21548..1e9cc98 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/StatusController.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/StatusController.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.controllers;
+package org.oransc.ics.controllers;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
@@ -31,9 +31,9 @@
import io.swagger.v3.oas.annotations.tags.Tag;
import org.immutables.gson.Gson;
-import org.oransc.enrichment.repository.InfoJobs;
-import org.oransc.enrichment.repository.InfoProducers;
-import org.oransc.enrichment.repository.InfoTypes;
+import org.oransc.ics.repository.InfoJobs;
+import org.oransc.ics.repository.InfoProducers;
+import org.oransc.ics.repository.InfoTypes;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/VoidResponse.java b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/VoidResponse.java
similarity index 95%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/VoidResponse.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/controllers/VoidResponse.java
index b7c2673..8fb810d 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/VoidResponse.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/VoidResponse.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.controllers;
+package org.oransc.ics.controllers;
import io.swagger.v3.oas.annotations.media.Schema;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/a1e/A1eCallbacks.java b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/a1e/A1eCallbacks.java
similarity index 87%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/a1e/A1eCallbacks.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/controllers/a1e/A1eCallbacks.java
index 59ac892..d0fda94 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/a1e/A1eCallbacks.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/a1e/A1eCallbacks.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.controllers.a1e;
+package org.oransc.ics.controllers.a1e;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@@ -26,13 +26,13 @@
import java.lang.invoke.MethodHandles;
import java.util.Collection;
-import org.oransc.enrichment.clients.AsyncRestClient;
-import org.oransc.enrichment.clients.AsyncRestClientFactory;
-import org.oransc.enrichment.configuration.ApplicationConfig;
-import org.oransc.enrichment.repository.InfoJob;
-import org.oransc.enrichment.repository.InfoJobs;
-import org.oransc.enrichment.repository.InfoProducers;
-import org.oransc.enrichment.repository.InfoType;
+import org.oransc.ics.clients.AsyncRestClient;
+import org.oransc.ics.clients.AsyncRestClientFactory;
+import org.oransc.ics.configuration.ApplicationConfig;
+import org.oransc.ics.repository.InfoJob;
+import org.oransc.ics.repository.InfoJobs;
+import org.oransc.ics.repository.InfoProducers;
+import org.oransc.ics.repository.InfoType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/a1e/A1eConsts.java b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/a1e/A1eConsts.java
similarity index 96%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/a1e/A1eConsts.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/controllers/a1e/A1eConsts.java
index 4c1509f..03d8ce2 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/a1e/A1eConsts.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/a1e/A1eConsts.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.controllers.a1e;
+package org.oransc.ics.controllers.a1e;
public class A1eConsts {
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/a1e/A1eController.java b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/a1e/A1eController.java
similarity index 95%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/a1e/A1eController.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/controllers/a1e/A1eController.java
index 8c056fc..d6e7dc0 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/a1e/A1eController.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/a1e/A1eController.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.controllers.a1e;
+package org.oransc.ics.controllers.a1e;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.gson.Gson;
@@ -40,16 +40,16 @@
import java.util.List;
import org.json.JSONObject;
-import org.oransc.enrichment.configuration.ApplicationConfig;
-import org.oransc.enrichment.controllers.ErrorResponse;
-import org.oransc.enrichment.controllers.VoidResponse;
-import org.oransc.enrichment.controllers.r1producer.ProducerCallbacks;
-import org.oransc.enrichment.exceptions.ServiceException;
-import org.oransc.enrichment.repository.InfoJob;
-import org.oransc.enrichment.repository.InfoJobs;
-import org.oransc.enrichment.repository.InfoProducers;
-import org.oransc.enrichment.repository.InfoType;
-import org.oransc.enrichment.repository.InfoTypes;
+import org.oransc.ics.configuration.ApplicationConfig;
+import org.oransc.ics.controllers.ErrorResponse;
+import org.oransc.ics.controllers.VoidResponse;
+import org.oransc.ics.controllers.r1producer.ProducerCallbacks;
+import org.oransc.ics.exceptions.ServiceException;
+import org.oransc.ics.repository.InfoJob;
+import org.oransc.ics.repository.InfoJobs;
+import org.oransc.ics.repository.InfoProducers;
+import org.oransc.ics.repository.InfoType;
+import org.oransc.ics.repository.InfoTypes;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/a1e/A1eEiJobInfo.java b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/a1e/A1eEiJobInfo.java
similarity index 97%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/a1e/A1eEiJobInfo.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/controllers/a1e/A1eEiJobInfo.java
index 61038c3..e677496 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/a1e/A1eEiJobInfo.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/a1e/A1eEiJobInfo.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.controllers.a1e;
+package org.oransc.ics.controllers.a1e;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/a1e/A1eEiJobStatus.java b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/a1e/A1eEiJobStatus.java
similarity index 97%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/a1e/A1eEiJobStatus.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/controllers/a1e/A1eEiJobStatus.java
index dff0bf3..6593051 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/a1e/A1eEiJobStatus.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/a1e/A1eEiJobStatus.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.controllers.a1e;
+package org.oransc.ics.controllers.a1e;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/a1e/A1eEiTypeInfo.java b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/a1e/A1eEiTypeInfo.java
similarity index 95%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/a1e/A1eEiTypeInfo.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/controllers/a1e/A1eEiTypeInfo.java
index 6202d24..be5499f 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/a1e/A1eEiTypeInfo.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/a1e/A1eEiTypeInfo.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.controllers.a1e;
+package org.oransc.ics.controllers.a1e;
import io.swagger.v3.oas.annotations.media.Schema;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerCallbacks.java b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1consumer/ConsumerCallbacks.java
similarity index 88%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerCallbacks.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1consumer/ConsumerCallbacks.java
index a57eeeb..b96c160 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerCallbacks.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1consumer/ConsumerCallbacks.java
@@ -18,16 +18,16 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.controllers.r1consumer;
+package org.oransc.ics.controllers.r1consumer;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
-import org.oransc.enrichment.clients.AsyncRestClient;
-import org.oransc.enrichment.clients.AsyncRestClientFactory;
-import org.oransc.enrichment.configuration.ApplicationConfig;
-import org.oransc.enrichment.repository.InfoType;
-import org.oransc.enrichment.repository.InfoTypeSubscriptions;
+import org.oransc.ics.clients.AsyncRestClient;
+import org.oransc.ics.clients.AsyncRestClientFactory;
+import org.oransc.ics.configuration.ApplicationConfig;
+import org.oransc.ics.repository.InfoType;
+import org.oransc.ics.repository.InfoTypeSubscriptions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import reactor.core.publisher.Mono;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerConsts.java b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1consumer/ConsumerConsts.java
similarity index 97%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerConsts.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1consumer/ConsumerConsts.java
index 2fa00e1..3009579 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerConsts.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1consumer/ConsumerConsts.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.controllers.r1consumer;
+package org.oransc.ics.controllers.r1consumer;
public class ConsumerConsts {
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerController.java b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1consumer/ConsumerController.java
similarity index 96%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerController.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1consumer/ConsumerController.java
index b108380..1a19369 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerController.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1consumer/ConsumerController.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.controllers.r1consumer;
+package org.oransc.ics.controllers.r1consumer;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.gson.Gson;
@@ -41,17 +41,17 @@
import java.util.List;
import org.json.JSONObject;
-import org.oransc.enrichment.controllers.ErrorResponse;
-import org.oransc.enrichment.controllers.VoidResponse;
-import org.oransc.enrichment.controllers.r1producer.ProducerCallbacks;
-import org.oransc.enrichment.exceptions.ServiceException;
-import org.oransc.enrichment.repository.InfoJob;
-import org.oransc.enrichment.repository.InfoJobs;
-import org.oransc.enrichment.repository.InfoProducer;
-import org.oransc.enrichment.repository.InfoProducers;
-import org.oransc.enrichment.repository.InfoType;
-import org.oransc.enrichment.repository.InfoTypeSubscriptions;
-import org.oransc.enrichment.repository.InfoTypes;
+import org.oransc.ics.controllers.ErrorResponse;
+import org.oransc.ics.controllers.VoidResponse;
+import org.oransc.ics.controllers.r1producer.ProducerCallbacks;
+import org.oransc.ics.exceptions.ServiceException;
+import org.oransc.ics.repository.InfoJob;
+import org.oransc.ics.repository.InfoJobs;
+import org.oransc.ics.repository.InfoProducer;
+import org.oransc.ics.repository.InfoProducers;
+import org.oransc.ics.repository.InfoType;
+import org.oransc.ics.repository.InfoTypeSubscriptions;
+import org.oransc.ics.repository.InfoTypes;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerInfoTypeInfo.java b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1consumer/ConsumerInfoTypeInfo.java
similarity index 97%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerInfoTypeInfo.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1consumer/ConsumerInfoTypeInfo.java
index 92ee19b..682c62b 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerInfoTypeInfo.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1consumer/ConsumerInfoTypeInfo.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.controllers.r1consumer;
+package org.oransc.ics.controllers.r1consumer;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerJobInfo.java b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1consumer/ConsumerJobInfo.java
similarity index 97%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerJobInfo.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1consumer/ConsumerJobInfo.java
index 4f91d64..f90c0be 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerJobInfo.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1consumer/ConsumerJobInfo.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.controllers.r1consumer;
+package org.oransc.ics.controllers.r1consumer;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerJobStatus.java b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1consumer/ConsumerJobStatus.java
similarity index 97%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerJobStatus.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1consumer/ConsumerJobStatus.java
index 3e8bb88..12d05ed 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerJobStatus.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1consumer/ConsumerJobStatus.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.controllers.r1consumer;
+package org.oransc.ics.controllers.r1consumer;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerTypeRegistrationInfo.java b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1consumer/ConsumerTypeRegistrationInfo.java
similarity index 97%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerTypeRegistrationInfo.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1consumer/ConsumerTypeRegistrationInfo.java
index 3d1533f..73263ec 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerTypeRegistrationInfo.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1consumer/ConsumerTypeRegistrationInfo.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.controllers.r1consumer;
+package org.oransc.ics.controllers.r1consumer;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerTypeSubscriptionInfo.java b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1consumer/ConsumerTypeSubscriptionInfo.java
similarity index 96%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerTypeSubscriptionInfo.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1consumer/ConsumerTypeSubscriptionInfo.java
index a0c4722..d420c57 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerTypeSubscriptionInfo.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1consumer/ConsumerTypeSubscriptionInfo.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.controllers.r1consumer;
+package org.oransc.ics.controllers.r1consumer;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1producer/ProducerCallbacks.java b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1producer/ProducerCallbacks.java
similarity index 91%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1producer/ProducerCallbacks.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1producer/ProducerCallbacks.java
index 558ae79..c861d20 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1producer/ProducerCallbacks.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1producer/ProducerCallbacks.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.controllers.r1producer;
+package org.oransc.ics.controllers.r1producer;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@@ -27,13 +27,13 @@
import java.time.Duration;
import java.util.Collection;
-import org.oransc.enrichment.clients.AsyncRestClient;
-import org.oransc.enrichment.clients.AsyncRestClientFactory;
-import org.oransc.enrichment.configuration.ApplicationConfig;
-import org.oransc.enrichment.repository.InfoJob;
-import org.oransc.enrichment.repository.InfoJobs;
-import org.oransc.enrichment.repository.InfoProducer;
-import org.oransc.enrichment.repository.InfoProducers;
+import org.oransc.ics.clients.AsyncRestClient;
+import org.oransc.ics.clients.AsyncRestClientFactory;
+import org.oransc.ics.configuration.ApplicationConfig;
+import org.oransc.ics.repository.InfoJob;
+import org.oransc.ics.repository.InfoJobs;
+import org.oransc.ics.repository.InfoProducer;
+import org.oransc.ics.repository.InfoProducers;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1producer/ProducerConsts.java b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1producer/ProducerConsts.java
similarity index 95%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1producer/ProducerConsts.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1producer/ProducerConsts.java
index a1be7c6..fee05e3 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1producer/ProducerConsts.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1producer/ProducerConsts.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.controllers.r1producer;
+package org.oransc.ics.controllers.r1producer;
public class ProducerConsts {
public static final String PRODUCER_API_NAME = "Data producer (registration)";
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1producer/ProducerController.java b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1producer/ProducerController.java
similarity index 96%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1producer/ProducerController.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1producer/ProducerController.java
index cad6a04..5229176 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1producer/ProducerController.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1producer/ProducerController.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.controllers.r1producer;
+package org.oransc.ics.controllers.r1producer;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@@ -38,16 +38,16 @@
import java.util.Collection;
import java.util.List;
-import org.oransc.enrichment.controllers.ErrorResponse;
-import org.oransc.enrichment.controllers.VoidResponse;
-import org.oransc.enrichment.exceptions.ServiceException;
-import org.oransc.enrichment.repository.InfoJob;
-import org.oransc.enrichment.repository.InfoJobs;
-import org.oransc.enrichment.repository.InfoProducer;
-import org.oransc.enrichment.repository.InfoProducers;
-import org.oransc.enrichment.repository.InfoType;
-import org.oransc.enrichment.repository.InfoTypeSubscriptions;
-import org.oransc.enrichment.repository.InfoTypes;
+import org.oransc.ics.controllers.ErrorResponse;
+import org.oransc.ics.controllers.VoidResponse;
+import org.oransc.ics.exceptions.ServiceException;
+import org.oransc.ics.repository.InfoJob;
+import org.oransc.ics.repository.InfoJobs;
+import org.oransc.ics.repository.InfoProducer;
+import org.oransc.ics.repository.InfoProducers;
+import org.oransc.ics.repository.InfoType;
+import org.oransc.ics.repository.InfoTypeSubscriptions;
+import org.oransc.ics.repository.InfoTypes;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1producer/ProducerInfoTypeInfo.java b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1producer/ProducerInfoTypeInfo.java
similarity index 96%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1producer/ProducerInfoTypeInfo.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1producer/ProducerInfoTypeInfo.java
index 311b8a7..64f17f9 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1producer/ProducerInfoTypeInfo.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1producer/ProducerInfoTypeInfo.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.controllers.r1producer;
+package org.oransc.ics.controllers.r1producer;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1producer/ProducerJobInfo.java b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1producer/ProducerJobInfo.java
similarity index 96%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1producer/ProducerJobInfo.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1producer/ProducerJobInfo.java
index 1cd3734..8b42ea8 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1producer/ProducerJobInfo.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1producer/ProducerJobInfo.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.controllers.r1producer;
+package org.oransc.ics.controllers.r1producer;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
@@ -26,7 +26,7 @@
import io.swagger.v3.oas.annotations.media.Schema;
import org.immutables.gson.Gson;
-import org.oransc.enrichment.repository.InfoJob;
+import org.oransc.ics.repository.InfoJob;
@Gson.TypeAdapters
@Schema(
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1producer/ProducerRegistrationInfo.java b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1producer/ProducerRegistrationInfo.java
similarity index 97%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1producer/ProducerRegistrationInfo.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1producer/ProducerRegistrationInfo.java
index 28a8403..2e395dc 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1producer/ProducerRegistrationInfo.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1producer/ProducerRegistrationInfo.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.controllers.r1producer;
+package org.oransc.ics.controllers.r1producer;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1producer/ProducerStatusInfo.java b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1producer/ProducerStatusInfo.java
similarity index 96%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1producer/ProducerStatusInfo.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1producer/ProducerStatusInfo.java
index 3bb2a05..f4c49cd 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1producer/ProducerStatusInfo.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/controllers/r1producer/ProducerStatusInfo.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.controllers.r1producer;
+package org.oransc.ics.controllers.r1producer;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/exceptions/ServiceException.java b/information-coordinator-service/src/main/java/org/oransc/ics/exceptions/ServiceException.java
similarity index 96%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/exceptions/ServiceException.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/exceptions/ServiceException.java
index bce786f..e6b0cc8 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/exceptions/ServiceException.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/exceptions/ServiceException.java
@@ -16,7 +16,7 @@
* ============LICENSE_END========================================================================
*/
-package org.oransc.enrichment.exceptions;
+package org.oransc.ics.exceptions;
import lombok.Getter;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/InfoJob.java b/information-coordinator-service/src/main/java/org/oransc/ics/repository/InfoJob.java
similarity index 97%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/InfoJob.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/repository/InfoJob.java
index 9d679be..ffecdc9 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/InfoJob.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/repository/InfoJob.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.repository;
+package org.oransc.ics.repository;
import java.lang.invoke.MethodHandles;
import java.time.Instant;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/InfoJobs.java b/information-coordinator-service/src/main/java/org/oransc/ics/repository/InfoJobs.java
similarity index 95%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/InfoJobs.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/repository/InfoJobs.java
index 7469e08..1654e1f 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/InfoJobs.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/repository/InfoJobs.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.repository;
+package org.oransc.ics.repository;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@@ -38,9 +38,9 @@
import java.util.ServiceLoader;
import java.util.Vector;
-import org.oransc.enrichment.configuration.ApplicationConfig;
-import org.oransc.enrichment.controllers.r1producer.ProducerCallbacks;
-import org.oransc.enrichment.exceptions.ServiceException;
+import org.oransc.ics.configuration.ApplicationConfig;
+import org.oransc.ics.controllers.r1producer.ProducerCallbacks;
+import org.oransc.ics.exceptions.ServiceException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/InfoProducer.java b/information-coordinator-service/src/main/java/org/oransc/ics/repository/InfoProducer.java
similarity index 97%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/InfoProducer.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/repository/InfoProducer.java
index 41d1c0b..01ec263 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/InfoProducer.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/repository/InfoProducer.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.repository;
+package org.oransc.ics.repository;
import java.util.Collection;
import java.util.HashSet;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/InfoProducers.java b/information-coordinator-service/src/main/java/org/oransc/ics/repository/InfoProducers.java
similarity index 95%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/InfoProducers.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/repository/InfoProducers.java
index 1102e36..9d98eaa 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/InfoProducers.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/repository/InfoProducers.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.repository;
+package org.oransc.ics.repository;
import java.lang.invoke.MethodHandles;
import java.util.ArrayList;
@@ -30,9 +30,9 @@
import lombok.Builder;
import lombok.Getter;
-import org.oransc.enrichment.controllers.a1e.A1eCallbacks;
-import org.oransc.enrichment.controllers.r1producer.ProducerCallbacks;
-import org.oransc.enrichment.exceptions.ServiceException;
+import org.oransc.ics.controllers.a1e.A1eCallbacks;
+import org.oransc.ics.controllers.r1producer.ProducerCallbacks;
+import org.oransc.ics.exceptions.ServiceException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/InfoType.java b/information-coordinator-service/src/main/java/org/oransc/ics/repository/InfoType.java
similarity index 96%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/InfoType.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/repository/InfoType.java
index 3f8dd9c..69ae67c 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/InfoType.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/repository/InfoType.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.repository;
+package org.oransc.ics.repository;
import lombok.Getter;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/InfoTypeSubscriptions.java b/information-coordinator-service/src/main/java/org/oransc/ics/repository/InfoTypeSubscriptions.java
similarity index 97%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/InfoTypeSubscriptions.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/repository/InfoTypeSubscriptions.java
index 533199f..a72a259 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/InfoTypeSubscriptions.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/repository/InfoTypeSubscriptions.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.repository;
+package org.oransc.ics.repository;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@@ -41,8 +41,8 @@
import lombok.Builder;
import lombok.Getter;
-import org.oransc.enrichment.configuration.ApplicationConfig;
-import org.oransc.enrichment.exceptions.ServiceException;
+import org.oransc.ics.configuration.ApplicationConfig;
+import org.oransc.ics.exceptions.ServiceException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/InfoTypes.java b/information-coordinator-service/src/main/java/org/oransc/ics/repository/InfoTypes.java
similarity index 96%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/InfoTypes.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/repository/InfoTypes.java
index c23875b..9d2abc2 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/InfoTypes.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/repository/InfoTypes.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.repository;
+package org.oransc.ics.repository;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@@ -38,8 +38,8 @@
import java.util.ServiceLoader;
import java.util.Vector;
-import org.oransc.enrichment.configuration.ApplicationConfig;
-import org.oransc.enrichment.exceptions.ServiceException;
+import org.oransc.ics.configuration.ApplicationConfig;
+import org.oransc.ics.exceptions.ServiceException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/MultiMap.java b/information-coordinator-service/src/main/java/org/oransc/ics/repository/MultiMap.java
similarity index 97%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/MultiMap.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/repository/MultiMap.java
index 25e559c..0f3be0a 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/MultiMap.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/repository/MultiMap.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.repository;
+package org.oransc.ics.repository;
import java.util.Collection;
import java.util.Collections;
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/tasks/ProducerSupervision.java b/information-coordinator-service/src/main/java/org/oransc/ics/tasks/ProducerSupervision.java
similarity index 90%
rename from enrichment-coordinator-service/src/main/java/org/oransc/enrichment/tasks/ProducerSupervision.java
rename to information-coordinator-service/src/main/java/org/oransc/ics/tasks/ProducerSupervision.java
index 08c5fc8..690f47c 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/tasks/ProducerSupervision.java
+++ b/information-coordinator-service/src/main/java/org/oransc/ics/tasks/ProducerSupervision.java
@@ -18,15 +18,15 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.tasks;
+package org.oransc.ics.tasks;
-import org.oransc.enrichment.configuration.ApplicationConfig;
-import org.oransc.enrichment.controllers.a1e.A1eCallbacks;
-import org.oransc.enrichment.controllers.r1producer.ProducerCallbacks;
-import org.oransc.enrichment.repository.InfoJob;
-import org.oransc.enrichment.repository.InfoJobs;
-import org.oransc.enrichment.repository.InfoProducer;
-import org.oransc.enrichment.repository.InfoProducers;
+import org.oransc.ics.configuration.ApplicationConfig;
+import org.oransc.ics.controllers.a1e.A1eCallbacks;
+import org.oransc.ics.controllers.r1producer.ProducerCallbacks;
+import org.oransc.ics.repository.InfoJob;
+import org.oransc.ics.repository.InfoJobs;
+import org.oransc.ics.repository.InfoProducer;
+import org.oransc.ics.repository.InfoProducers;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
diff --git a/enrichment-coordinator-service/src/test/java/org/oransc/enrichment/ApplicationTest.java b/information-coordinator-service/src/test/java/org/oransc/ics/ApplicationTest.java
similarity index 95%
rename from enrichment-coordinator-service/src/test/java/org/oransc/enrichment/ApplicationTest.java
rename to information-coordinator-service/src/test/java/org/oransc/ics/ApplicationTest.java
index 8c8ce5f..1d53403 100644
--- a/enrichment-coordinator-service/src/test/java/org/oransc/enrichment/ApplicationTest.java
+++ b/information-coordinator-service/src/test/java/org/oransc/ics/ApplicationTest.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment;
+package org.oransc.ics;
import static org.assertj.core.api.Assertions.assertThat;
import static org.awaitility.Awaitility.await;
@@ -41,40 +41,40 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
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.a1e.A1eConsts;
-import org.oransc.enrichment.controllers.a1e.A1eEiJobInfo;
-import org.oransc.enrichment.controllers.a1e.A1eEiJobStatus;
-import org.oransc.enrichment.controllers.a1e.A1eEiTypeInfo;
-import org.oransc.enrichment.controllers.r1consumer.ConsumerConsts;
-import org.oransc.enrichment.controllers.r1consumer.ConsumerInfoTypeInfo;
-import org.oransc.enrichment.controllers.r1consumer.ConsumerJobInfo;
-import org.oransc.enrichment.controllers.r1consumer.ConsumerJobStatus;
-import org.oransc.enrichment.controllers.r1consumer.ConsumerTypeRegistrationInfo;
-import org.oransc.enrichment.controllers.r1consumer.ConsumerTypeSubscriptionInfo;
-import org.oransc.enrichment.controllers.r1producer.ProducerCallbacks;
-import org.oransc.enrichment.controllers.r1producer.ProducerConsts;
-import org.oransc.enrichment.controllers.r1producer.ProducerInfoTypeInfo;
-import org.oransc.enrichment.controllers.r1producer.ProducerJobInfo;
-import org.oransc.enrichment.controllers.r1producer.ProducerRegistrationInfo;
-import org.oransc.enrichment.controllers.r1producer.ProducerStatusInfo;
-import org.oransc.enrichment.exceptions.ServiceException;
-import org.oransc.enrichment.repository.InfoJob;
-import org.oransc.enrichment.repository.InfoJobs;
-import org.oransc.enrichment.repository.InfoProducer;
-import org.oransc.enrichment.repository.InfoProducers;
-import org.oransc.enrichment.repository.InfoType;
-import org.oransc.enrichment.repository.InfoTypeSubscriptions;
-import org.oransc.enrichment.repository.InfoTypes;
-import org.oransc.enrichment.tasks.ProducerSupervision;
+import org.oransc.ics.clients.AsyncRestClient;
+import org.oransc.ics.clients.AsyncRestClientFactory;
+import org.oransc.ics.configuration.ApplicationConfig;
+import org.oransc.ics.configuration.ImmutableHttpProxyConfig;
+import org.oransc.ics.configuration.ImmutableWebClientConfig;
+import org.oransc.ics.configuration.WebClientConfig;
+import org.oransc.ics.configuration.WebClientConfig.HttpProxyConfig;
+import org.oransc.ics.controller.ConsumerSimulatorController;
+import org.oransc.ics.controller.ProducerSimulatorController;
+import org.oransc.ics.controllers.a1e.A1eConsts;
+import org.oransc.ics.controllers.a1e.A1eEiJobInfo;
+import org.oransc.ics.controllers.a1e.A1eEiJobStatus;
+import org.oransc.ics.controllers.a1e.A1eEiTypeInfo;
+import org.oransc.ics.controllers.r1consumer.ConsumerConsts;
+import org.oransc.ics.controllers.r1consumer.ConsumerInfoTypeInfo;
+import org.oransc.ics.controllers.r1consumer.ConsumerJobInfo;
+import org.oransc.ics.controllers.r1consumer.ConsumerJobStatus;
+import org.oransc.ics.controllers.r1consumer.ConsumerTypeRegistrationInfo;
+import org.oransc.ics.controllers.r1consumer.ConsumerTypeSubscriptionInfo;
+import org.oransc.ics.controllers.r1producer.ProducerCallbacks;
+import org.oransc.ics.controllers.r1producer.ProducerConsts;
+import org.oransc.ics.controllers.r1producer.ProducerInfoTypeInfo;
+import org.oransc.ics.controllers.r1producer.ProducerJobInfo;
+import org.oransc.ics.controllers.r1producer.ProducerRegistrationInfo;
+import org.oransc.ics.controllers.r1producer.ProducerStatusInfo;
+import org.oransc.ics.exceptions.ServiceException;
+import org.oransc.ics.repository.InfoJob;
+import org.oransc.ics.repository.InfoJobs;
+import org.oransc.ics.repository.InfoProducer;
+import org.oransc.ics.repository.InfoProducers;
+import org.oransc.ics.repository.InfoType;
+import org.oransc.ics.repository.InfoTypeSubscriptions;
+import org.oransc.ics.repository.InfoTypes;
+import org.oransc.ics.tasks.ProducerSupervision;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -182,7 +182,7 @@
assertThat(jsonObj.remove("servers")).isNotNull();
String indented = jsonObj.toString(4);
- try (PrintStream out = new PrintStream(new FileOutputStream("api/ecs-api.json"))) {
+ try (PrintStream out = new PrintStream(new FileOutputStream("api/ics-api.json"))) {
out.print(indented);
}
}
diff --git a/enrichment-coordinator-service/src/test/java/org/oransc/enrichment/MockEnrichmentService.java b/information-coordinator-service/src/test/java/org/oransc/ics/MockEnrichmentService.java
similarity index 98%
rename from enrichment-coordinator-service/src/test/java/org/oransc/enrichment/MockEnrichmentService.java
rename to information-coordinator-service/src/test/java/org/oransc/ics/MockEnrichmentService.java
index 47df78a..7c296ec 100644
--- a/enrichment-coordinator-service/src/test/java/org/oransc/enrichment/MockEnrichmentService.java
+++ b/information-coordinator-service/src/test/java/org/oransc/ics/MockEnrichmentService.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment;
+package org.oransc.ics;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
diff --git a/enrichment-coordinator-service/src/test/java/org/oransc/enrichment/clients/AsyncRestClientTest.java b/information-coordinator-service/src/test/java/org/oransc/ics/clients/AsyncRestClientTest.java
similarity index 98%
rename from enrichment-coordinator-service/src/test/java/org/oransc/enrichment/clients/AsyncRestClientTest.java
rename to information-coordinator-service/src/test/java/org/oransc/ics/clients/AsyncRestClientTest.java
index 364203a..6735447 100644
--- a/enrichment-coordinator-service/src/test/java/org/oransc/enrichment/clients/AsyncRestClientTest.java
+++ b/information-coordinator-service/src/test/java/org/oransc/ics/clients/AsyncRestClientTest.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.clients;
+package org.oransc.ics.clients;
import io.netty.util.internal.logging.InternalLoggerFactory;
import io.netty.util.internal.logging.JdkLoggerFactory;
diff --git a/enrichment-coordinator-service/src/test/java/org/oransc/enrichment/controller/ConsumerSimulatorController.java b/information-coordinator-service/src/test/java/org/oransc/ics/controller/ConsumerSimulatorController.java
similarity index 92%
rename from enrichment-coordinator-service/src/test/java/org/oransc/enrichment/controller/ConsumerSimulatorController.java
rename to information-coordinator-service/src/test/java/org/oransc/ics/controller/ConsumerSimulatorController.java
index 27160f1..3d69ee6 100644
--- a/enrichment-coordinator-service/src/test/java/org/oransc/enrichment/controller/ConsumerSimulatorController.java
+++ b/information-coordinator-service/src/test/java/org/oransc/ics/controller/ConsumerSimulatorController.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.controller;
+package org.oransc.ics.controller;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
@@ -34,11 +34,11 @@
import lombok.Getter;
-import org.oransc.enrichment.controllers.VoidResponse;
-import org.oransc.enrichment.controllers.a1e.A1eConsts;
-import org.oransc.enrichment.controllers.a1e.A1eEiJobStatus;
-import org.oransc.enrichment.controllers.r1consumer.ConsumerConsts;
-import org.oransc.enrichment.controllers.r1consumer.ConsumerTypeRegistrationInfo;
+import org.oransc.ics.controllers.VoidResponse;
+import org.oransc.ics.controllers.a1e.A1eConsts;
+import org.oransc.ics.controllers.a1e.A1eEiJobStatus;
+import org.oransc.ics.controllers.r1consumer.ConsumerConsts;
+import org.oransc.ics.controllers.r1consumer.ConsumerTypeRegistrationInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
diff --git a/enrichment-coordinator-service/src/test/java/org/oransc/enrichment/controller/ProducerSimulatorController.java b/information-coordinator-service/src/test/java/org/oransc/ics/controller/ProducerSimulatorController.java
similarity index 96%
rename from enrichment-coordinator-service/src/test/java/org/oransc/enrichment/controller/ProducerSimulatorController.java
rename to information-coordinator-service/src/test/java/org/oransc/ics/controller/ProducerSimulatorController.java
index 66af67c..55d32b0 100644
--- a/enrichment-coordinator-service/src/test/java/org/oransc/enrichment/controller/ProducerSimulatorController.java
+++ b/information-coordinator-service/src/test/java/org/oransc/ics/controller/ProducerSimulatorController.java
@@ -18,7 +18,7 @@
* ========================LICENSE_END===================================
*/
-package org.oransc.enrichment.controller;
+package org.oransc.ics.controller;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
@@ -34,10 +34,10 @@
import lombok.Getter;
-import org.oransc.enrichment.controllers.ErrorResponse;
-import org.oransc.enrichment.controllers.VoidResponse;
-import org.oransc.enrichment.controllers.r1producer.ProducerConsts;
-import org.oransc.enrichment.controllers.r1producer.ProducerJobInfo;
+import org.oransc.ics.controllers.ErrorResponse;
+import org.oransc.ics.controllers.VoidResponse;
+import org.oransc.ics.controllers.r1producer.ProducerConsts;
+import org.oransc.ics.controllers.r1producer.ProducerJobInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
diff --git a/pom.xml b/pom.xml
index e0665a1..d4f5500 100644
--- a/pom.xml
+++ b/pom.xml
@@ -34,7 +34,7 @@
</properties>
<modules>
<module>policy-agent</module>
- <module>enrichment-coordinator-service</module>
+ <module>information-coordinator-service</module>
<module>r-app-catalogue</module>
<module>helm-manager</module>
<module>dmaap-adaptor-java</module>
diff --git a/test/common/cr_api_functions.sh b/test/common/cr_api_functions.sh
index a9acd6e..1b82ea0 100644
--- a/test/common/cr_api_functions.sh
+++ b/test/common/cr_api_functions.sh
@@ -122,7 +122,11 @@
CR_INSTANCE_KUBE=$(($CR_INSTANCE-1))
echo -n " CR-$CR_INSTANCE_KUBE $CR_APP_NAME-$CR_INSTANCE_KUBE $KUBE_SIM_NAMESPACE "
else
- echo -n " CR_$CR_INSTANCE ${CR_APP_NAME}_cr_$CR_INSTANCE "
+ if [ $DOCKER_COMPOSE_VERION == "V1" ]; then
+ echo -n " CR_$CR_INSTANCE ${CR_APP_NAME}_cr_$CR_INSTANCE "
+ else
+ echo -n " CR_$CR_INSTANCE ${CR_APP_NAME}-cr-$CR_INSTANCE "
+ fi
fi
done
}
@@ -161,7 +165,11 @@
for ((CR_INSTANCE=0; CR_INSTANCE<$MAX_CR_APP_COUNT; CR_INSTANCE++ )); do
CR_DOCKER_INSTANCE=$(($CR_INSTANCE+1))
# CR_SERVICE_PATH is the base path to cr
- __CR_SERVICE_PATH=$1"://"$CR_APP_NAME"_cr_"${CR_DOCKER_INSTANCE}":"$2 # docker access, container->container and script->container via proxy
+ if [ $DOCKER_COMPOSE_VERION == "V1" ]; then
+ __CR_SERVICE_PATH=$1"://"$CR_APP_NAME"_cr_"${CR_DOCKER_INSTANCE}":"$2 # docker access, container->container and script->container via proxy
+ else
+ __CR_SERVICE_PATH=$1"://"$CR_APP_NAME"-cr-"${CR_DOCKER_INSTANCE}":"$2 # docker access, container->container and script->container via proxy
+ fi
if [ $RUNMODE == "KUBE" ]; then
__CR_SERVICE_PATH=$1"://"$CR_APP_NAME"-"$CR_INSTANCE.$CR_APP_NAME"."$KUBE_SIM_NAMESPACE":"$3 # kube access, pod->svc and script->svc via proxy
fi
@@ -285,7 +293,11 @@
app_data=""
cntr=1
while [ $cntr -le $CR_APP_COUNT ]; do
- app=$CR_APP_NAME"_cr_"$cntr
+ if [ $DOCKER_COMPOSE_VERION == "V1" ]; then
+ app=$CR_APP_NAME"_cr_"$cntr
+ else
+ app=$CR_APP_NAME"-cr-"$cntr
+ fi
app_data="$app_data $app"
let cntr=cntr+1
done
@@ -297,7 +309,11 @@
cntr=1 #Counter for docker instance, starts on 1
cntr2=0 #Couter for env var name, starts with 0 to be compablible with kube
while [ $cntr -le $CR_APP_COUNT ]; do
- app=$CR_APP_NAME"_cr_"$cntr
+ if [ $DOCKER_COMPOSE_VERION == "V1" ]; then
+ app=$CR_APP_NAME"_cr_"$cntr
+ else
+ app=$CR_APP_NAME"-cr-"$cntr
+ fi
__dynvar="CR_SERVICE_PATH_"$cntr2
__check_service_start $app ${!__dynvar}$CR_ALIVE_URL
let cntr=cntr+1
diff --git a/test/common/genstat.sh b/test/common/genstat.sh
index 2adce1f..e186f09 100755
--- a/test/common/genstat.sh
+++ b/test/common/genstat.sh
@@ -31,7 +31,6 @@
echo "or"
echo "Usage: genstat.sh KUBE <start-time-seconds> <log-file> <app-short-name> <app-name> <namespace> [ <app-short-name> <app-name> <namespace> ]*"
}
-DD=$@
STARTTIME=-1
if [ $# -lt 4 ]; then
@@ -67,7 +66,6 @@
echo "Name;Time;PIDS;CPU perc;Mem perc" > $LOGFILE
-echo $DD >> $LOGFILE
if [ "$STARTTIME" -ne -1 ]; then
STARTTIME=$(($SECONDS-$STARTTIME))
diff --git a/test/common/mr_api_functions.sh b/test/common/mr_api_functions.sh
index 2002131..c6feb45 100755
--- a/test/common/mr_api_functions.sh
+++ b/test/common/mr_api_functions.sh
@@ -372,6 +372,9 @@
export MR_KAFKA_SERVICE_PATH
export MR_ZOOKEEPER_SERVICE_PATH
+
+ export MR_KAFKA_KUBE_NODE_PORT
+ export MR_KAFKA_DOCKER_LOCALHOST_PORT
}
# Export env vars for config files, docker compose and kube resources
@@ -509,6 +512,9 @@
__check_service_start $MR_DMAAP_APP_NAME $MR_DMAAP_PATH$MR_DMAAP_ALIVE_URL
+ echo " Kafka TCP node port $MR_KAFKA_KUBE_NODE_PORT"
+
+
if [ $# -gt 0 ]; then
if [ $(($#%3)) -eq 0 ]; then
while [ $# -gt 0 ]; do
@@ -608,6 +614,8 @@
__check_service_start $MR_DMAAP_APP_NAME $MR_DMAAP_PATH$MR_DMAAP_ALIVE_URL
+ echo " Kafka TCP node port $MR_KAFKA_DOCKER_LOCALHOST_PORT"
+
if [ $# -gt 0 ]; then
if [ $(($#%3)) -eq 0 ]; then
while [ $# -gt 0 ]; do
diff --git a/test/common/pa_api_functions.sh b/test/common/pa_api_functions.sh
index 5367060..219aedb 100644
--- a/test/common/pa_api_functions.sh
+++ b/test/common/pa_api_functions.sh
@@ -533,7 +533,11 @@
ric_id=${ric%.*.*} #extract pod id from full hosthame
ric_id=$(echo "$ric_id" | tr '-' '_')
else
- ric_id=$ric
+ if [ $DOCKER_COMPOSE_VERION == "V1" ]; then
+ ric_id=$ric
+ else
+ ric_id=$(echo "$ric" | tr '-' '_') #ric id still needs underscore as it is different from the container name
+ fi
fi
echo " Found a1 sim: "$ric_id
config_json=$config_json"\n \"name\": \"$ric_id\","
diff --git a/test/common/ricsim_api_functions.sh b/test/common/ricsim_api_functions.sh
index 0a1a8e3..435c208 100644
--- a/test/common/ricsim_api_functions.sh
+++ b/test/common/ricsim_api_functions.sh
@@ -103,9 +103,15 @@
echo -n " RICSIM_G2_$RICSIM_INSTANCE_KUBE ${RIC_SIM_PREFIX}-g2-$RICSIM_INSTANCE_KUBE $KUBE_A1SIM_NAMESPACE "
echo -n " RICSIM_G3_$RICSIM_INSTANCE_KUBE ${RIC_SIM_PREFIX}-g3-$RICSIM_INSTANCE_KUBE $KUBE_A1SIM_NAMESPACE "
else
- echo -n " RICSIM_G1_$RICSIM_INSTANCE ${RIC_SIM_PREFIX}_g1_$RICSIM_INSTANCE "
- echo -n " RICSIM_G2_$RICSIM_INSTANCE ${RIC_SIM_PREFIX}_g2_$RICSIM_INSTANCE "
- echo -n " RICSIM_G3_$RICSIM_INSTANCE ${RIC_SIM_PREFIX}_g3_$RICSIM_INSTANCE "
+ if [ $DOCKER_COMPOSE_VERION == "V1" ]; then
+ echo -n " RICSIM_G1_$RICSIM_INSTANCE ${RIC_SIM_PREFIX}_g1_$RICSIM_INSTANCE "
+ echo -n " RICSIM_G2_$RICSIM_INSTANCE ${RIC_SIM_PREFIX}_g2_$RICSIM_INSTANCE "
+ echo -n " RICSIM_G3_$RICSIM_INSTANCE ${RIC_SIM_PREFIX}_g3_$RICSIM_INSTANCE "
+ else
+ echo -n " RICSIM_G1_$RICSIM_INSTANCE ${RIC_SIM_PREFIX}-g1-$RICSIM_INSTANCE "
+ echo -n " RICSIM_G2_$RICSIM_INSTANCE ${RIC_SIM_PREFIX}-g2-$RICSIM_INSTANCE "
+ echo -n " RICSIM_G3_$RICSIM_INSTANCE ${RIC_SIM_PREFIX}-g3-$RICSIM_INSTANCE "
+ fi
fi
done
}
@@ -114,16 +120,10 @@
RIC_SIM_HTTPX="http"
-RIC_SIM_HOST=$RIC_SIM_HTTPX"://"$LOCALHOST_NAME
RIC_SIM_PORT=$RIC_SIM_INTERNAL_PORT
-#Vars for A1 interface version and container count
-G1_A1_VERSION=""
-G2_A1_VERSION=""
-G3_A1_VERSION=""
-G4_A1_VERSION=""
-G5_A1_VERSION=""
+#Vars for container count
G1_COUNT=0
G2_COUNT=0
G3_COUNT=0
@@ -139,7 +139,6 @@
echo -e $BOLD"RICSIM protocol setting"$EBOLD
echo -e " Using $BOLD http $EBOLD towards the simulators"
RIC_SIM_HTTPX="http"
- RIC_SIM_HOST=$RIC_SIM_HTTPX"://"$LOCALHOST_NAME
RIC_SIM_PORT=$RIC_SIM_INTERNAL_PORT
echo ""
}
@@ -148,7 +147,6 @@
echo -e $BOLD"RICSIM protocol setting"$EBOLD
echo -e " Using $BOLD https $EBOLD towards the simulators"
RIC_SIM_HTTPX="https"
- RIC_SIM_HOST=$RIC_SIM_HTTPX"://"$LOCALHOST_NAME
RIC_SIM_PORT=$RIC_SIM_INTERNAL_SECURE_PORT
echo ""
}
@@ -208,19 +206,14 @@
#Set env var for simulator count and A1 interface vesion for the given group
if [ $1 == "$RIC1" ]; then
G1_COUNT=$2
- G1_A1_VERSION=$3
elif [ $1 == "$RIC2" ]; then
G2_COUNT=$2
- G2_A1_VERSION=$3
elif [ $1 == "$RIC3" ]; then
G3_COUNT=$2
- G3_A1_VERSION=$3
elif [ $1 == "$RIC4" ]; then
G4_COUNT=$2
- G4_A1_VERSION=$3
elif [ $1 == "$RIC5" ]; then
G5_COUNT=$2
- G5_A1_VERSION=$3
else
((RES_CONF_FAIL++))
__print_err "need three args, $RIC1|$RIC2|$RIC3|$RIC4|$RIC5 <count> <interface-id>" $@
@@ -275,22 +268,34 @@
# Create .env file to compose project, all ric container will get this prefix
echo "COMPOSE_PROJECT_NAME="$RIC_SIM_PREFIX > $SIM_GROUP/$RIC_SIM_COMPOSE_DIR/.env
- export G1_A1_VERSION
- export G2_A1_VERSION
- export G3_A1_VERSION
- export G4_A1_VERSION
- export G5_A1_VERSION
+ #extract service name (group), g1, g2, g3, g4 or g5 from var $1
+ #E.g. ricsim_g1 -> g1 is the service name
+ TMP_GRP=$1
+ RICSIM_COMPOSE_SERVICE_NAME=$(echo "${TMP_GRP##*_}")
+
+ export RICSIM_COMPOSE_A1_VERSION=$3
+ export RICSIM_COMPOSE_SERVICE_NAME
export RIC_SIM_INTERNAL_PORT
export RIC_SIM_INTERNAL_SECURE_PORT
export RIC_SIM_CERT_MOUNT_DIR
export DOCKER_SIM_NWNAME
export RIC_SIM_DISPLAY_NAME
- docker_args="--scale g1=$G1_COUNT --scale g2=$G2_COUNT --scale g3=$G3_COUNT --scale g4=$G4_COUNT --scale g5=$G5_COUNT"
+ docker_args="--no-recreate --scale $RICSIM_COMPOSE_SERVICE_NAME=$2"
+
+ #Create a list of contsiner names
+ #Will be <ricsim-prefix>_<service-name>_<index>
+ # or
+ # <ricsim-prefix>-<service-name>-<index>
app_data=""
cntr=1
+ if [ $DOCKER_COMPOSE_VERION == "V1" ]; then
+ app_name_prefix=$RIC_SIM_PREFIX"_"$RICSIM_COMPOSE_SERVICE_NAME"_"
+ else
+ app_name_prefix=$RIC_SIM_PREFIX"-"$RICSIM_COMPOSE_SERVICE_NAME"-"
+ fi
while [ $cntr -le $2 ]; do
- app=$1"_"$cntr
+ app=$app_name_prefix$cntr
app_data="$app_data $app"
let cntr=cntr+1
done
@@ -299,7 +304,11 @@
cntr=1
while [ $cntr -le $2 ]; do
- app=$1"_"$cntr
+ if [ $DOCKER_COMPOSE_VERION == "V1" ]; then
+ app=$RIC_SIM_PREFIX"_"$RICSIM_COMPOSE_SERVICE_NAME"_"$cntr
+ else
+ app=$RIC_SIM_PREFIX"-"$RICSIM_COMPOSE_SERVICE_NAME"-"$cntr
+ fi
__check_service_start $app $RIC_SIM_HTTPX"://"$app:$RIC_SIM_PORT$RIC_SIM_ALIVE_URL
let cntr=cntr+1
done
@@ -329,7 +338,12 @@
ric_setname="${ricname%-*}" #Extract the stateful set name
echo $RIC_SIM_HTTPX"://"$ricname.$ric_setname.$KUBE_A1SIM_NAMESPACE":"$RIC_SIM_PORT
else
- echo $RIC_SIM_HTTPX"://"$1":"$RIC_SIM_PORT
+ if [ $DOCKER_COMPOSE_VERION == "V1" ]; then
+ echo $RIC_SIM_HTTPX"://"$1":"$RIC_SIM_PORT
+ else
+ ricname=$(echo "$1" | tr '_' '-')
+ echo $RIC_SIM_HTTPX"://"$ricname":"$RIC_SIM_PORT
+ fi
fi
}
diff --git a/test/common/test_env-onap-guilin.sh b/test/common/test_env-onap-guilin.sh
index 4ae753c..3254e06 100755
--- a/test/common/test_env-onap-guilin.sh
+++ b/test/common/test_env-onap-guilin.sh
@@ -212,6 +212,8 @@
MR_STUB_COMPOSE_DIR="mrstub" # Dir in simulator_group for mr stub for - docker-compose
MR_KAFKA_APP_NAME="message-router-kafka" # Kafka app name, if just named "kafka" the image will not start...
MR_KAFKA_PORT=9092 # Kafka port number
+MR_KAFKA_DOCKER_LOCALHOST_PORT=30098 # Kafka port number for docker localhost
+MR_KAFKA_KUBE_NODE_PORT=30099 # Kafka node port number for kube
MR_ZOOKEEPER_APP_NAME="zookeeper" # Zookeeper app name
MR_ZOOKEEPER_PORT="2181" # Zookeeper port number
MR_DMAAP_HOST_MNT_DIR="/mnt" # Basedir localhost for mounted files
diff --git a/test/common/test_env-onap-honolulu.sh b/test/common/test_env-onap-honolulu.sh
index 17d738f..f82d54f 100755
--- a/test/common/test_env-onap-honolulu.sh
+++ b/test/common/test_env-onap-honolulu.sh
@@ -256,6 +256,8 @@
MR_STUB_COMPOSE_DIR="mrstub" # Dir in simulator_group for mr stub for - docker-compose
MR_KAFKA_APP_NAME="message-router-kafka" # Kafka app name, if just named "kafka" the image will not start...
MR_KAFKA_PORT=9092 # Kafka port number
+MR_KAFKA_DOCKER_LOCALHOST_PORT=30098 # Kafka port number for docker localhost
+MR_KAFKA_KUBE_NODE_PORT=30099 # Kafka node port number for kube
MR_ZOOKEEPER_APP_NAME="zookeeper" # Zookeeper app name
MR_ZOOKEEPER_PORT="2181" # Zookeeper port number
MR_DMAAP_HOST_MNT_DIR="/mnt" # Basedir localhost for mounted files
diff --git a/test/common/test_env-onap-istanbul.sh b/test/common/test_env-onap-istanbul.sh
index 2a6268e..b2b0d2e 100644
--- a/test/common/test_env-onap-istanbul.sh
+++ b/test/common/test_env-onap-istanbul.sh
@@ -259,6 +259,8 @@
MR_STUB_COMPOSE_DIR="mrstub" # Dir in simulator_group for mr stub for - docker-compose
MR_KAFKA_APP_NAME="message-router-kafka" # Kafka app name, if just named "kafka" the image will not start...
MR_KAFKA_PORT=9092 # Kafka port number
+MR_KAFKA_DOCKER_LOCALHOST_PORT=30098 # Kafka port number for docker localhost
+MR_KAFKA_KUBE_NODE_PORT=30099 # Kafka node port number for kube
MR_ZOOKEEPER_APP_NAME="zookeeper" # Zookeeper app name
MR_ZOOKEEPER_PORT="2181" # Zookeeper port number
MR_DMAAP_HOST_MNT_DIR="/mnt" # Basedir localhost for mounted files
diff --git a/test/common/test_env-oran-cherry.sh b/test/common/test_env-oran-cherry.sh
index 513afaa..b1204cc 100755
--- a/test/common/test_env-oran-cherry.sh
+++ b/test/common/test_env-oran-cherry.sh
@@ -259,6 +259,8 @@
MR_STUB_COMPOSE_DIR="mrstub" # Dir in simulator_group for mr stub for - docker-compose
MR_KAFKA_APP_NAME="message-router-kafka" # Kafka app name, if just named "kafka" the image will not start...
MR_KAFKA_PORT=9092 # Kafka port number
+MR_KAFKA_DOCKER_LOCALHOST_PORT=30098 # Kafka port number for docker localhost
+MR_KAFKA_KUBE_NODE_PORT=30099 # Kafka node port number for kube
MR_ZOOKEEPER_APP_NAME="zookeeper" # Zookeeper app name
MR_ZOOKEEPER_PORT="2181" # Zookeeper port number
MR_DMAAP_HOST_MNT_DIR="/mnt" # Basedir localhost for mounted files
diff --git a/test/common/test_env-oran-d-release.sh b/test/common/test_env-oran-d-release.sh
index 7e495ee..cde9849 100755
--- a/test/common/test_env-oran-d-release.sh
+++ b/test/common/test_env-oran-d-release.sh
@@ -278,6 +278,8 @@
MR_STUB_COMPOSE_DIR="mrstub" # Dir in simulator_group for mr stub for - docker-compose
MR_KAFKA_APP_NAME="message-router-kafka" # Kafka app name, if just named "kafka" the image will not start...
MR_KAFKA_PORT=9092 # Kafka port number
+MR_KAFKA_DOCKER_LOCALHOST_PORT=30098 # Kafka port number for docker localhost
+MR_KAFKA_KUBE_NODE_PORT=30099 # Kafka node port number for kube
MR_ZOOKEEPER_APP_NAME="zookeeper" # Zookeeper app name
MR_ZOOKEEPER_PORT="2181" # Zookeeper port number
MR_DMAAP_HOST_MNT_DIR="/mnt" # Basedir localhost for mounted files
diff --git a/test/common/test_env-oran-e-release.sh b/test/common/test_env-oran-e-release.sh
index fc547fe..cd0d040 100755
--- a/test/common/test_env-oran-e-release.sh
+++ b/test/common/test_env-oran-e-release.sh
@@ -304,6 +304,8 @@
MR_STUB_COMPOSE_DIR="mrstub" # Dir in simulator_group for mr stub for - docker-compose
MR_KAFKA_APP_NAME="message-router-kafka" # Kafka app name, if just named "kafka" the image will not start...
MR_KAFKA_PORT=9092 # Kafka port number
+MR_KAFKA_DOCKER_LOCALHOST_PORT=30098 # Kafka port number for docker localhost
+MR_KAFKA_KUBE_NODE_PORT=30099 # Kafka node port number for kube
MR_ZOOKEEPER_APP_NAME="zookeeper" # Zookeeper app name
MR_ZOOKEEPER_PORT="2181" # Zookeeper port number
MR_DMAAP_HOST_MNT_DIR="/mnt" # Basedir localhost for mounted files
diff --git a/test/common/testcase_common.sh b/test/common/testcase_common.sh
index b47413a..e1c90d6 100755
--- a/test/common/testcase_common.sh
+++ b/test/common/testcase_common.sh
@@ -128,6 +128,11 @@
# Applies only to images defined in the test-env files with image names and tags defined as XXXX_RELEASE
IMAGE_CATEGORY="DEV"
+#Var to indicate docker-compose version, V1 or V2
+#V1 names replicated containers <proj-name>_<service-name>_<index>
+#V2 names replicated containers <proj-name>-<service-name>-<index>
+DOCKER_COMPOSE_VERION="V1"
+
# Function to indent cmd output with one space
indent1() { sed 's/^/ /'; }
@@ -783,34 +788,44 @@
done
echo ""
+echo -e $BOLD"Test environment info"$EBOLD
# Check needed installed sw
+
+tmp=$(which bash)
+if [ $? -ne 0 ] || [ -z "$tmp" ]; then
+ echo -e $RED"bash is required to run the test environment, pls install"$ERED
+ exit 1
+fi
+echo " bash is installed and using version:"
+echo "$(bash --version)" | indent2
+
tmp=$(which python3)
-if [ $? -ne 0 ] || [ -z tmp ]; then
+if [ $? -ne 0 ] || [ -z "$tmp" ]; then
echo -e $RED"python3 is required to run the test environment, pls install"$ERED
exit 1
fi
+echo " python3 is installed and using version: $(python3 --version)"
+
tmp=$(which docker)
-if [ $? -ne 0 ] || [ -z tmp ]; then
+if [ $? -ne 0 ] || [ -z "$tmp" ]; then
echo -e $RED"docker is required to run the test environment, pls install"$ERED
exit 1
fi
+echo " docker is installed and using versions:"
+echo " $(docker version --format 'Client version {{.Client.Version}} Server version {{.Server.Version}}')"
tmp=$(which docker-compose)
-if [ $? -ne 0 ] || [ -z tmp ]; then
+if [ $? -ne 0 ] || [ -z "$tmp" ]; then
if [ $RUNMODE == "DOCKER" ]; then
echo -e $RED"docker-compose is required to run the test environment, pls install"$ERED
exit 1
fi
fi
-if [ $RUNMODE == "DOCKER" ]; then
- tmp=$(docker-compose version | grep -i 'docker' | grep -i 'compose' | grep -i 'version')
- if [[ "$tmp" == *'v2'* ]]; then
- echo -e $RED"docker-compose is using docker-compose version 2"$ERED
- echo -e $RED"The test environment only support version 1"$ERED
- echo -e $RED"Disable version 2 by cmd 'docker-compose disable-v2' and re-run the script "$ERED
- exit 1
- fi
+tmp=$(docker-compose version --short)
+echo " docker-compose installed and using version $tmp"
+if [[ "$tmp" == *'v2'* ]]; then
+ DOCKER_COMPOSE_VERION="V2"
fi
tmp=$(which kubectl)
@@ -821,6 +836,8 @@
fi
else
if [ $RUNMODE == "KUBE" ]; then
+ echo " kubectl is installed and using versions:"
+ echo $(kubectl version --short=true) | indent2
res=$(kubectl cluster-info 2>&1)
if [ $? -ne 0 ]; then
echo -e "$BOLD$RED############################################# $ERED$EBOLD"
@@ -852,6 +869,8 @@
fi
fi
+echo ""
+
echo -e $BOLD"Checking configured image setting for this test case"$EBOLD
#Temp var to check for image variable name errors
@@ -1707,6 +1726,10 @@
for imagename in $APP_SHORT_NAMES; do
docker ps -a --filter "label=nrttest_app=$imagename" --filter "network=$DOCKER_SIM_NWNAME" --format ' {{.Label "nrttest_dp"}}\n{{.Label "nrttest_app"}}\n{{.Names}}' >> $running_contr_file
done
+ running_contr_file_empty="No docker containers running, started by previous test execution"
+ if [ -s $running_contr_file ]; then
+ running_contr_file_empty=""
+ fi
# Kill all containers started by the test env - to speed up shut down
docker kill $(docker ps -a --filter "label=nrttest_app" --format '{{.Names}}') &> /dev/null
@@ -1754,37 +1777,41 @@
tab_heading3="$tab_heading3"" "
done
- echo " $tab_heading1$tab_heading2$tab_heading3"" Actions"
- cntr=0
- while read p; do
- if (( $cntr % 3 == 0 ));then
- row=""
- heading=$p
- heading_len=$tab_heading1_len
- fi
- if (( $cntr % 3 == 1));then
- heading=$p
- heading_len=$tab_heading2_len
- fi
- if (( $cntr % 3 == 2));then
- contr=$p
- heading=$p
- heading_len=$tab_heading3_len
- fi
- while (( ${#heading} < $heading_len)); do
- heading="$heading"" "
- done
- row=$row$heading
- if (( $cntr % 3 == 2));then
- echo -ne $row$SAMELINE
- echo -ne " $row ${GREEN}stopping...${EGREEN}${SAMELINE}"
- docker stop $(docker ps -qa --filter name=${contr} --filter network=$DOCKER_SIM_NWNAME) &> /dev/null
- echo -ne " $row ${GREEN}stopped removing...${EGREEN}${SAMELINE}"
- docker rm --force $(docker ps -qa --filter name=${contr} --filter network=$DOCKER_SIM_NWNAME) &> /dev/null
- echo -e " $row ${GREEN}stopped removed ${EGREEN}"
- fi
- let cntr=cntr+1
- done <$running_contr_file
+ if [ ! -z "$running_contr_file_empty" ]; then
+ echo $running_contr_file_empty | indent1
+ else
+ echo " $tab_heading1$tab_heading2$tab_heading3"" Actions"
+ cntr=0
+ while read p; do
+ if (( $cntr % 3 == 0 ));then
+ row=""
+ heading=$p
+ heading_len=$tab_heading1_len
+ fi
+ if (( $cntr % 3 == 1));then
+ heading=$p
+ heading_len=$tab_heading2_len
+ fi
+ if (( $cntr % 3 == 2));then
+ contr=$p
+ heading=$p
+ heading_len=$tab_heading3_len
+ fi
+ while (( ${#heading} < $heading_len)); do
+ heading="$heading"" "
+ done
+ row=$row$heading
+ if (( $cntr % 3 == 2));then
+ echo -ne $row$SAMELINE
+ echo -ne " $row ${GREEN}stopping...${EGREEN}${SAMELINE}"
+ docker stop $(docker ps -qa --filter name=${contr} --filter network=$DOCKER_SIM_NWNAME) &> /dev/null
+ echo -ne " $row ${GREEN}stopped removing...${EGREEN}${SAMELINE}"
+ docker rm --force $(docker ps -qa --filter name=${contr} --filter network=$DOCKER_SIM_NWNAME) &> /dev/null
+ echo -e " $row ${GREEN}stopped removed ${EGREEN}"
+ fi
+ let cntr=cntr+1
+ done <$running_contr_file
+ fi
echo ""
diff --git a/test/simulator-group/consul_cbs/docker-compose.yml b/test/simulator-group/consul_cbs/docker-compose.yml
index 105c875..003dbfa 100644
--- a/test/simulator-group/consul_cbs/docker-compose.yml
+++ b/test/simulator-group/consul_cbs/docker-compose.yml
@@ -19,9 +19,8 @@
networks:
default:
- external:
- name: ${DOCKER_SIM_NWNAME}
-
+ external: true
+ name: ${DOCKER_SIM_NWNAME}
services:
consul-server:
diff --git a/test/simulator-group/control_panel/docker-compose.yml b/test/simulator-group/control_panel/docker-compose.yml
index 94628fa..b860a89 100644
--- a/test/simulator-group/control_panel/docker-compose.yml
+++ b/test/simulator-group/control_panel/docker-compose.yml
@@ -17,8 +17,8 @@
version: '3.0'
networks:
default:
- external:
- name: ${DOCKER_SIM_NWNAME}
+ external: true
+ name: ${DOCKER_SIM_NWNAME}
services:
control-panel:
image: ${CONTROL_PANEL_IMAGE}
diff --git a/test/simulator-group/cr/docker-compose.yml b/test/simulator-group/cr/docker-compose.yml
index 3b63451..047ec45 100644
--- a/test/simulator-group/cr/docker-compose.yml
+++ b/test/simulator-group/cr/docker-compose.yml
@@ -18,8 +18,8 @@
version: '3.0'
networks:
default:
- external:
- name: ${DOCKER_SIM_NWNAME}
+ external: true
+ name: ${DOCKER_SIM_NWNAME}
services:
cr:
scale: $CR_APP_COUNT
diff --git a/test/simulator-group/dmaapadp/docker-compose.yml b/test/simulator-group/dmaapadp/docker-compose.yml
index f9dee41..cea605a 100644
--- a/test/simulator-group/dmaapadp/docker-compose.yml
+++ b/test/simulator-group/dmaapadp/docker-compose.yml
@@ -17,8 +17,8 @@
version: '3.0'
networks:
default:
- external:
- name: ${DOCKER_SIM_NWNAME}
+ external: true
+ name: ${DOCKER_SIM_NWNAME}
services:
dmaap-adapter-service:
image: ${DMAAP_ADP_IMAGE}
diff --git a/test/simulator-group/dmaapmed/docker-compose.yml b/test/simulator-group/dmaapmed/docker-compose.yml
index d0672df..e4c9a00 100644
--- a/test/simulator-group/dmaapmed/docker-compose.yml
+++ b/test/simulator-group/dmaapmed/docker-compose.yml
@@ -17,8 +17,8 @@
version: '3.0'
networks:
default:
- external:
- name: ${DOCKER_SIM_NWNAME}
+ external: true
+ name: ${DOCKER_SIM_NWNAME}
services:
dmaap-mediator-service:
image: ${DMAAP_MED_IMAGE}
diff --git a/test/simulator-group/dmaapmr/app.yaml b/test/simulator-group/dmaapmr/app.yaml
index 01c9014..1a9d40a 100644
--- a/test/simulator-group/dmaapmr/app.yaml
+++ b/test/simulator-group/dmaapmr/app.yaml
@@ -80,6 +80,8 @@
ports:
- name: http
containerPort: $MR_KAFKA_PORT
+ - name: http-external
+ containerPort: $MR_KAFKA_KUBE_NODE_PORT
env:
- name: enableCadi
value: 'false'
@@ -90,11 +92,11 @@
- name: KAFKA_ZOOKEEPER_SESSION_TIMEOUT_MS
value: '40000'
- name: KAFKA_LISTENER_SECURITY_PROTOCOL_MAP
- value: 'INTERNAL_PLAINTEXT:PLAINTEXT,EXTERNAL_PLAINTEXT:PLAINTEXT'
+ value: 'INTERNAL_PLAINTEXT:PLAINTEXT,EXTERNAL_PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT'
- name: KAFKA_ADVERTISED_LISTENERS
- value: 'INTERNAL_PLAINTEXT://$MR_KAFKA_SERVICE_PATH'
+ value: 'INTERNAL_PLAINTEXT://$MR_KAFKA_SERVICE_PATH,PLAINTEXT_HOST://localhost:$MR_KAFKA_KUBE_NODE_PORT'
- name: KAFKA_LISTENERS
- value: 'INTERNAL_PLAINTEXT://0.0.0.0:$MR_KAFKA_PORT'
+ value: 'INTERNAL_PLAINTEXT://0.0.0.0:$MR_KAFKA_PORT,PLAINTEXT_HOST://0.0.0.0:$MR_KAFKA_KUBE_NODE_PORT'
- name: KAFKA_INTER_BROKER_LISTENER_NAME
value: INTERNAL_PLAINTEXT
- name: KAFKA_CONFLUENT_SUPPORT_METRICS_ENABLE
diff --git a/test/simulator-group/dmaapmr/docker-compose.yml b/test/simulator-group/dmaapmr/docker-compose.yml
index 2060ce7..492fab1 100644
--- a/test/simulator-group/dmaapmr/docker-compose.yml
+++ b/test/simulator-group/dmaapmr/docker-compose.yml
@@ -18,9 +18,8 @@
version: '3.0'
networks:
default:
- external:
- name: ${DOCKER_SIM_NWNAME}
-
+ external: true
+ name: ${DOCKER_SIM_NWNAME}
services:
zookeeper:
image: $ONAP_ZOOKEEPER_IMAGE
@@ -51,14 +50,15 @@
container_name: $MR_KAFKA_APP_NAME
ports:
- "$MR_KAFKA_PORT:$MR_KAFKA_PORT"
+ - "$MR_KAFKA_DOCKER_LOCALHOST_PORT:$MR_KAFKA_DOCKER_LOCALHOST_PORT"
environment:
enableCadi: 'false'
KAFKA_ZOOKEEPER_CONNECT: $MR_ZOOKEEPER_APP_NAME:$MR_ZOOKEEPER_PORT
KAFKA_ZOOKEEPER_CONNECTION_TIMEOUT_MS: 40000
KAFKA_ZOOKEEPER_SESSION_TIMEOUT_MS: 40000
- KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL_PLAINTEXT:PLAINTEXT,EXTERNAL_PLAINTEXT:PLAINTEXT
- KAFKA_ADVERTISED_LISTENERS: INTERNAL_PLAINTEXT://$MR_KAFKA_SERVICE_PATH
- KAFKA_LISTENERS: INTERNAL_PLAINTEXT://0.0.0.0:$MR_KAFKA_PORT
+ KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL_PLAINTEXT:PLAINTEXT,EXTERNAL_PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
+ KAFKA_ADVERTISED_LISTENERS: INTERNAL_PLAINTEXT://$MR_KAFKA_SERVICE_PATH,PLAINTEXT_HOST://localhost:$MR_KAFKA_DOCKER_LOCALHOST_PORT
+ KAFKA_LISTENERS: INTERNAL_PLAINTEXT://0.0.0.0:$MR_KAFKA_PORT,PLAINTEXT_HOST://0.0.0.0:$MR_KAFKA_DOCKER_LOCALHOST_PORT
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL_PLAINTEXT
KAFKA_CONFLUENT_SUPPORT_METRICS_ENABLE: 'false'
KAFKA_OPTS: -Djava.security.auth.login.config=/etc/kafka/secrets/jaas/zk_client_jaas.conf
diff --git a/test/simulator-group/dmaapmr/svc.yaml b/test/simulator-group/dmaapmr/svc.yaml
index 446c59d..913b13e 100644
--- a/test/simulator-group/dmaapmr/svc.yaml
+++ b/test/simulator-group/dmaapmr/svc.yaml
@@ -25,12 +25,17 @@
run: $MR_KAFKA_APP_NAME
autotest: DMAAPMR
spec:
- type: ClusterIP
+ type: NodePort
ports:
- port: $MR_KAFKA_PORT
targetPort: $MR_KAFKA_PORT
protocol: TCP
name: http
+ - port: $MR_KAFKA_KUBE_NODE_PORT
+ targetPort: $MR_KAFKA_KUBE_NODE_PORT
+ protocol: TCP
+ name: http-external
+ nodePort: $MR_KAFKA_KUBE_NODE_PORT
selector:
run: $MR_KAFKA_APP_NAME
---
diff --git a/test/simulator-group/ecs/docker-compose.yml b/test/simulator-group/ecs/docker-compose.yml
index b057753..588f8c3 100644
--- a/test/simulator-group/ecs/docker-compose.yml
+++ b/test/simulator-group/ecs/docker-compose.yml
@@ -16,8 +16,8 @@
version: '3.0'
networks:
default:
- external:
- name: ${DOCKER_SIM_NWNAME}
+ external: true
+ name: ${DOCKER_SIM_NWNAME}
services:
ecs:
image: ${ECS_IMAGE}
diff --git a/test/simulator-group/httpproxy/docker-compose.yml b/test/simulator-group/httpproxy/docker-compose.yml
index c27ba5e..2c8c61b 100644
--- a/test/simulator-group/httpproxy/docker-compose.yml
+++ b/test/simulator-group/httpproxy/docker-compose.yml
@@ -18,8 +18,8 @@
version: '3.0'
networks:
default:
- external:
- name: ${DOCKER_SIM_NWNAME}
+ external: true
+ name: ${DOCKER_SIM_NWNAME}
services:
httpproxy:
networks:
diff --git a/test/simulator-group/kubeproxy/docker-compose.yml b/test/simulator-group/kubeproxy/docker-compose.yml
index 7f0f349..2e644e0 100644
--- a/test/simulator-group/kubeproxy/docker-compose.yml
+++ b/test/simulator-group/kubeproxy/docker-compose.yml
@@ -17,8 +17,8 @@
version: '3.0'
networks:
default:
- external:
- name: ${DOCKER_SIM_NWNAME}
+ external: true
+ name: ${DOCKER_SIM_NWNAME}
services:
kubeproxy:
image: ${KUBE_PROXY_IMAGE}
diff --git a/test/simulator-group/mrstub/docker-compose.yml b/test/simulator-group/mrstub/docker-compose.yml
index a1c96c0..608f5c8 100644
--- a/test/simulator-group/mrstub/docker-compose.yml
+++ b/test/simulator-group/mrstub/docker-compose.yml
@@ -18,8 +18,8 @@
version: '3.0'
networks:
default:
- external:
- name: ${DOCKER_SIM_NWNAME}
+ external: true
+ name: ${DOCKER_SIM_NWNAME}
services:
mr-stub:
networks:
diff --git a/test/simulator-group/ngw/docker-compose.yml b/test/simulator-group/ngw/docker-compose.yml
index c897ba7..7002eaf 100644
--- a/test/simulator-group/ngw/docker-compose.yml
+++ b/test/simulator-group/ngw/docker-compose.yml
@@ -18,8 +18,8 @@
version: '3.0'
networks:
default:
- external:
- name: ${DOCKER_SIM_NWNAME}
+ external: true
+ name: ${DOCKER_SIM_NWNAME}
services:
nonrtric-gateway:
image: ${NRT_GATEWAY_IMAGE}
diff --git a/test/simulator-group/policy_agent/docker-compose.yml b/test/simulator-group/policy_agent/docker-compose.yml
index 2261151..4b42b42 100644
--- a/test/simulator-group/policy_agent/docker-compose.yml
+++ b/test/simulator-group/policy_agent/docker-compose.yml
@@ -17,8 +17,8 @@
version: '3.0'
networks:
default:
- external:
- name: ${DOCKER_SIM_NWNAME}
+ external: true
+ name: ${DOCKER_SIM_NWNAME}
services:
policy-agent:
image: ${POLICY_AGENT_IMAGE}
diff --git a/test/simulator-group/prodstub/docker-compose.yml b/test/simulator-group/prodstub/docker-compose.yml
index e46c546..e05d3ad 100644
--- a/test/simulator-group/prodstub/docker-compose.yml
+++ b/test/simulator-group/prodstub/docker-compose.yml
@@ -18,8 +18,8 @@
version: '3.0'
networks:
default:
- external:
- name: ${DOCKER_SIM_NWNAME}
+ external: true
+ name: ${DOCKER_SIM_NWNAME}
services:
producer-stub:
networks:
diff --git a/test/simulator-group/rapp_catalogue/docker-compose.yml b/test/simulator-group/rapp_catalogue/docker-compose.yml
index 3dbd45b..7c644b9 100644
--- a/test/simulator-group/rapp_catalogue/docker-compose.yml
+++ b/test/simulator-group/rapp_catalogue/docker-compose.yml
@@ -17,8 +17,8 @@
version: '3.0'
networks:
default:
- external:
- name: ${DOCKER_SIM_NWNAME}
+ external: true
+ name: ${DOCKER_SIM_NWNAME}
services:
rapp-catalogue:
image: ${RAPP_CAT_IMAGE}
diff --git a/test/simulator-group/ric/docker-compose.yml b/test/simulator-group/ric/docker-compose.yml
index a6358c7..3515973 100644
--- a/test/simulator-group/ric/docker-compose.yml
+++ b/test/simulator-group/ric/docker-compose.yml
@@ -21,11 +21,11 @@
networks:
default:
- external:
- name: ${DOCKER_SIM_NWNAME}
+ external: true
+ name: ${DOCKER_SIM_NWNAME}
services:
- g1:
+ ${RICSIM_COMPOSE_SERVICE_NAME}:
image: ${RIC_SIM_IMAGE}
networks:
- default
@@ -33,7 +33,7 @@
- ${RIC_SIM_INTERNAL_PORT}/tcp
- ${RIC_SIM_INTERNAL_SECURE_PORT}/tcp
environment:
- - A1_VERSION=${G1_A1_VERSION}
+ - A1_VERSION=${RICSIM_COMPOSE_A1_VERSION}
- REMOTE_HOSTS_LOGGING=1
- ALLOW_HTTP=true
- DUPLICATE_CHECK=1
@@ -42,75 +42,3 @@
labels:
- "nrttest_app=RICSIM"
- "nrttest_dp=${RIC_SIM_DISPLAY_NAME}"
-
- g2:
- image: ${RIC_SIM_IMAGE}
- networks:
- - default
- ports:
- - ${RIC_SIM_INTERNAL_PORT}/tcp
- - ${RIC_SIM_INTERNAL_SECURE_PORT}/tcp
- environment:
- - A1_VERSION=${G2_A1_VERSION}
- - REMOTE_HOSTS_LOGGING=1
- - ALLOW_HTTP=true
- - DUPLICATE_CHECK=1
- volumes:
- - ${RIC_SIM_CERT_MOUNT_DIR}:/usr/src/app/cert:ro
- labels:
- - "nrttest_app=RICSIM"
- - "nrttest_dp=${RIC_SIM_DISPLAY_NAME}"
-
- g3:
- image: ${RIC_SIM_IMAGE}
- networks:
- - default
- ports:
- - ${RIC_SIM_INTERNAL_PORT}/tcp
- - ${RIC_SIM_INTERNAL_SECURE_PORT}/tcp
- environment:
- - A1_VERSION=${G3_A1_VERSION}
- - REMOTE_HOSTS_LOGGING=1
- - ALLOW_HTTP=true
- - DUPLICATE_CHECK=1
- volumes:
- - ${RIC_SIM_CERT_MOUNT_DIR}:/usr/src/app/cert:ro
- labels:
- - "nrttest_app=RICSIM"
- - "nrttest_dp=${RIC_SIM_DISPLAY_NAME}"
-
- g4:
- image: ${RIC_SIM_IMAGE}
- networks:
- - default
- ports:
- - ${RIC_SIM_INTERNAL_PORT}/tcp
- - ${RIC_SIM_INTERNAL_SECURE_PORT}/tcp
- environment:
- - A1_VERSION=${G4_A1_VERSION}
- - REMOTE_HOSTS_LOGGING=1
- - ALLOW_HTTP=true
- - DUPLICATE_CHECK=1
- volumes:
- - ${RIC_SIM_CERT_MOUNT_DIR}:/usr/src/app/cert:ro
- labels:
- - "nrttest_app=RICSIM"
- - "nrttest_dp=${RIC_SIM_DISPLAY_NAME}"
-
- g5:
- image: ${RIC_SIM_IMAGE}
- networks:
- - default
- ports:
- - ${RIC_SIM_INTERNAL_PORT}/tcp
- - ${RIC_SIM_INTERNAL_SECURE_PORT}/tcp
- environment:
- - A1_VERSION=${G5_A1_VERSION}
- - REMOTE_HOSTS_LOGGING=1
- - ALLOW_HTTP=true
- - DUPLICATE_CHECK=1
- volumes:
- - ${RIC_SIM_CERT_MOUNT_DIR}:/usr/src/app/cert:ro
- labels:
- - "nrttest_app=RICSIM"
- - "nrttest_dp=${RIC_SIM_DISPLAY_NAME}"
\ No newline at end of file
diff --git a/test/simulator-group/sdnc/docker-compose-2.yml b/test/simulator-group/sdnc/docker-compose-2.yml
index 03483a0..37c99b6 100644
--- a/test/simulator-group/sdnc/docker-compose-2.yml
+++ b/test/simulator-group/sdnc/docker-compose-2.yml
@@ -17,9 +17,8 @@
networks:
default:
- external:
- name: ${DOCKER_SIM_NWNAME}
-
+ external: true
+ name: ${DOCKER_SIM_NWNAME}
services:
db:
image: ${SDNC_DB_IMAGE}
diff --git a/test/simulator-group/sdnc/docker-compose.yml b/test/simulator-group/sdnc/docker-compose.yml
index 0b6f357..505a54c 100644
--- a/test/simulator-group/sdnc/docker-compose.yml
+++ b/test/simulator-group/sdnc/docker-compose.yml
@@ -17,9 +17,8 @@
networks:
default:
- external:
- name: ${DOCKER_SIM_NWNAME}
-
+ external: true
+ name: ${DOCKER_SIM_NWNAME}
services:
db:
image: ${SDNC_DB_IMAGE}