Some more changes.
Signed-off-by: PatrikBuhr <patrik.buhr@est.tech>
Issue-ID: NONRTRIC-625
Change-Id: If2bfda7f019858f674e7b914af8da55691d07001
ProducerJobInfo request =
new ProducerJobInfo(job.jobDefinition, jobId, job.infoTypeId, job.jobResultUri, job.owner, "TIMESTAMP");
String body = gson.toJson(request);
- logger.info("ECS Simulator PUT job: {}", body);
+ logger.info("ICS Simulator PUT job: {}", body);
restClient.post(url, body, MediaType.APPLICATION_JSON).block();
}
public void deleteJob(String jobId, AsyncRestClient restClient) {
String url = this.testResults.registrationInfo.jobCallbackUrl + "/" + jobId;
- logger.info("ECS Simulator DELETE job: {}", url);
+ logger.info("ICS Simulator DELETE job: {}", url);
restClient.delete(url).block();
}
"server.ssl.key-store=./config/keystore.jks", //
"app.webclient.trust-store=./config/truststore.jks", //
"app.configuration-filepath=./src/test/resources/test_application_configuration.json", //
- "app.ecs-base-url=https://localhost:8434" //
+ "app.ics-base-url=https://localhost:8434" //
})
-class IntegrationWithEcs {
+class IntegrationWithIcs {
private static final String DMAAP_JOB_ID = "DMAAP_JOB_ID";
private static final String DMAAP_TYPE_ID = "DmaapInformationType";
return "https://localhost:" + this.applicationConfig.getLocalServerHttpPort();
}
- private String ecsBaseUrl() {
+ private String icsBaseUrl() {
return applicationConfig.getIcsBaseUrl();
}
private String jobUrl(String jobId) {
- return ecsBaseUrl() + "/data-consumer/v1/info-jobs/" + jobId + "?typeCheck=true";
+ return icsBaseUrl() + "/data-consumer/v1/info-jobs/" + jobId + "?typeCheck=true";
}
- private void createInformationJobInEcs(String typeId, String jobId, String filter) {
+ private void createInformationJobInIcs(String typeId, String jobId, String filter) {
String body = gson.toJson(consumerJobInfo(typeId, filter));
try {
// Delete the job if it already exists
- deleteInformationJobInEcs(jobId);
+ deleteInformationJobInIcs(jobId);
} catch (Exception e) {
}
restClient().putForEntity(jobUrl(jobId), body).block();
}
- private void deleteInformationJobInEcs(String jobId) {
+ private void deleteInformationJobInIcs(String jobId) {
restClient().delete(jobUrl(jobId)).block();
}
await().untilAsserted(() -> assertThat(this.jobs.size()).isEqualTo(1));
- deleteInformationJobInEcs("KAFKA_JOB_ID");
+ deleteInformationJobInIcs("KAFKA_JOB_ID");
await().untilAsserted(() -> assertThat(this.jobs.size()).isZero());
}
void testWholeChain() throws Exception {
await().untilAsserted(() -> assertThat(producerRegstrationTask.isRegisteredInIcs()).isTrue());
- createInformationJobInEcs(DMAAP_TYPE_ID, DMAAP_JOB_ID, ".*DmaapResponse.*");
+ createInformationJobInIcs(DMAAP_TYPE_ID, DMAAP_JOB_ID, ".*DmaapResponse.*");
await().untilAsserted(() -> assertThat(this.jobs.size()).isEqualTo(1));
await().untilAsserted(() -> assertThat(results.receivedBodies.size()).isEqualTo(2));
assertThat(results.receivedBodies.get(0)).isEqualTo("DmaapResponse1");
- deleteInformationJobInEcs(DMAAP_JOB_ID);
+ deleteInformationJobInIcs(DMAAP_JOB_ID);
await().untilAsserted(() -> assertThat(this.jobs.size()).isZero());
- synchronized (this) {
- // logger.warn("**************** Keeping server alive! " +
- // this.applicationConfig.getLocalServerHttpPort());
- // this.wait();
- }
}
}
>- INFO_PRODUCER_HOST **Required**. The host for the producer. Example: `https://mrproducer`
>- INFO_PRODUCER_PORT Optional. The port for the product. Defaults to `8085`.
->- INFO_COORD_ADDR Optional. The address of the Information Coordinator. Defaults to `https://enrichmentservice:8434`.
+>- INFO_COORD_ADDR Optional. The address of the Information Coordinator. Defaults to `https://informationservice:8434`.
>- DMAAP_MR_ADDR Optional. The address of the DMaaP Message Router. Defaults to `https://message-router.onap:3905`.
>- PRODUCER_CERT_PATH Optional. The path to the certificate to use for https. Defaults to `security/producer.crt`
>- PRODUCER_KEY_PATH Optional. The path to the key to the certificate to use for https. Defaults to `security/producer.key`
return &Config{
InfoProducerHost: getEnv("INFO_PRODUCER_HOST", ""),
InfoProducerPort: getEnvAsInt("INFO_PRODUCER_PORT", 8085),
- InfoCoordinatorAddress: getEnv("INFO_COORD_ADDR", "https://enrichmentservice:8434"),
+ InfoCoordinatorAddress: getEnv("INFO_COORD_ADDR", "https://informationservice:8434"),
DMaaPMRAddress: getEnv("DMAAP_MR_ADDR", "https://message-router.onap:3905"),
ProducerCertPath: getEnv("PRODUCER_CERT_PATH", "security/producer.crt"),
ProducerKeyPath: getEnv("PRODUCER_KEY_PATH", "security/producer.key"),
LogLevel: log.InfoLevel,
InfoProducerHost: "",
InfoProducerPort: 8085,
- InfoCoordinatorAddress: "https://enrichmentservice:8434",
+ InfoCoordinatorAddress: "https://informationservice:8434",
DMaaPMRAddress: "https://message-router.onap:3905",
ProducerCertPath: "security/producer.crt",
ProducerKeyPath: "security/producer.key",
LogLevel: log.InfoLevel,
InfoProducerHost: "",
InfoProducerPort: 8085,
- InfoCoordinatorAddress: "https://enrichmentservice:8434",
+ InfoCoordinatorAddress: "https://informationservice:8434",
DMaaPMRAddress: "https://message-router.onap:3905",
ProducerCertPath: "security/producer.crt",
ProducerKeyPath: "security/producer.key",
NONRTRIC_GATEWAY_IMAGE_TAG="1.0.0"
#ECS
-ECS_IMAGE_BASE="nexus3.o-ran-sc.org:10002/o-ran-sc/nonrtric-enrichment-coordinator-service"
+ECS_IMAGE_BASE="nexus3.o-ran-sc.org:10002/o-ran-sc/nonrtric-information-coordinator-service"
ECS_IMAGE_TAG="1.1.0"
#CONSUMER
#DMAAP_MEDIATOR_JAVA
DMAAP_MEDIATOR_JAVA_BASE="nexus3.o-ran-sc.org:10003/o-ran-sc/nonrtric-dmaap-adaptor"
-DMAAP_MEDIATOR_JAVA_TAG="1.0.0-SNAPSHOT"
\ No newline at end of file
+DMAAP_MEDIATOR_JAVA_TAG="1.0.0-SNAPSHOT"
## O-RAN-SC Control Panel
-The Non-RT RIC Control Panel is a graphical user interface that enables the user to view and manage the A1 policies in the RAN and also view producers and jobs for the Enrichement coordinator service.
+The Non-RT RIC Control Panel is a graphical user interface that enables the user to view and manage the A1 policies in the RAN and also view producers and jobs for the Information coordinator service.
### O-RAN-SC Control Panel Gateway:
-To view the policy or enrichment information in control panel gui along with Policy Management Service & Enrichment Coordinator Service you should also have nonrtric gateway because all the request from the gui is passed through this API gateway.
+To view the policy or information jobs and types in control panel gui along with Policy Management Service & Information Coordinator Service you should also have nonrtric gateway because all the request from the gui is passed through this API gateway.
#### Prerequisite:
To start all the necessary components, run the following command:
-docker-compose -f docker-compose.yaml -f control-panel/docker-compose.yaml -f nonrtric-gateway/docker-compose.yaml -f policy-service/docker-compose.yaml -f ecs/docker-compose.yaml -f a1-sim/docker-compose.yaml up
\ No newline at end of file
+docker-compose -f docker-compose.yaml -f control-panel/docker-compose.yaml -f nonrtric-gateway/docker-compose.yaml -f policy-service/docker-compose.yaml -f ecs/docker-compose.yaml -f a1-sim/docker-compose.yaml up
environment:
- INFO_PRODUCER_HOST=http://consumer
- INFO_PRODUCER_PORT=8088
- - INFO_COORD_ADDR=http://ecs:8083
+ - INFO_COORD_ADDR=http://ics:8083
- DMAAP_MR_ADDR=http://dmaap-mr:3904
- PRODUCER_CERT_PATH=security/producer.crt
- PRODUCER_KEY_PATH=security/producer.key
- LOG_LEVEL=Debug
networks:
- - default
\ No newline at end of file
+ - default
name: nonrtric-docker-net
services:
- ecs:
- image: "${ECS_IMAGE_BASE}:${ECS_IMAGE_TAG}"
- container_name: ecs
+ ics:
+ image: "${ICS_IMAGE_BASE}:${ICS_IMAGE_TAG}"
+ container_name: ics
networks:
default:
aliases:
- - enrichment-service-container
+ - information-service-container
ports:
- 8083:8083
- 8434:8434
+++ /dev/null
-information-coordinator-service
\ No newline at end of file
}
},
"consumer_job": {
- "description": "Information for an Enrichment Information Job",
+ "description": "Information for an Information Job",
"type": "object",
"required": [
"info_type_id",
status_notification_uri:
type: string
description: The target of Information subscription job status notifications
- description: Information for an Enrichment Information Job
+ description: Information for an Information Job
producer_status:
required:
- operational_state
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(
"server.ssl.key-store=./config/keystore.jks", //
"app.webclient.trust-store=./config/truststore.jks", "app.vardata-directory=./target"})
@SuppressWarnings("squid:S3577") // Not containing any tests since it is a mock.
-class MockEnrichmentService {
+class MockInformationService {
private static final Logger logger = LoggerFactory.getLogger(ApplicationTest.class);
@LocalServerPort