From 4bc05f1cdd233067c9f5d54da46594ee116d6c97 Mon Sep 17 00:00:00 2001 From: PatrikBuhr Date: Fri, 27 Nov 2020 12:11:20 +0100 Subject: [PATCH] Adding owner to jobInfo Added job owner to Job Ino in producer API. Uplift submodule with policymanagement source from ONAP. This means that GET component configuration is included. Change-Id: Ib10138080c0d46165e5fb82de4693e6c9acdf983 Signed-off-by: PatrikBuhr Issue-ID: NONRTRIC-173 --- docs/offeredapis/swagger/ecs-api.json | 6 +++++- .../enrichment/controllers/producer/ProducerJobInfo.java | 10 ++++++++-- .../src/main/java/org/oransc/enrichment/repository/EiJob.java | 1 + onap/oran | 2 +- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/docs/offeredapis/swagger/ecs-api.json b/docs/offeredapis/swagger/ecs-api.json index 740be9b1..303a9253 100644 --- a/docs/offeredapis/swagger/ecs-api.json +++ b/docs/offeredapis/swagger/ecs-api.json @@ -508,7 +508,7 @@ "tags": ["A1-EI (enrichment information)"] }} }, - "host": "localhost:38411", + "host": "localhost:34053", "definitions": { "producer_ei_job_request": { "description": "The body of the EI producer callbacks for EI job creation and deletion", @@ -516,6 +516,10 @@ "title": "producer_ei_job_request", "required": ["ei_job_identity"], "properties": { + "owner": { + "description": "The owner of the job", + "type": "string" + }, "ei_job_identity": { "description": "Idenitity of the EI job", "type": "string" diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/producer/ProducerJobInfo.java b/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/producer/ProducerJobInfo.java index 1380cca2..c02c280e 100644 --- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/producer/ProducerJobInfo.java +++ b/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/producer/ProducerJobInfo.java @@ -55,15 +55,21 @@ public class ProducerJobInfo { @JsonProperty("target_uri") public String targetUri; - public ProducerJobInfo(Object jobData, String id, String typeId, String targetUri) { + @ApiModelProperty(value = "The owner of the job") + @SerializedName("owner") + @JsonProperty("owner") + public String owner; + + public ProducerJobInfo(Object jobData, String id, String typeId, String targetUri, String owner) { this.id = id; this.jobData = jobData; this.typeId = typeId; this.targetUri = targetUri; + this.owner = owner; } public ProducerJobInfo(EiJob job) { - this(job.getJobData(), job.getId(), job.getTypeId(), job.getTargetUrl()); + this(job.getJobData(), job.getId(), job.getTypeId(), job.getTargetUrl(), job.getOwner()); } public ProducerJobInfo() { diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/EiJob.java b/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/EiJob.java index ed0187aa..9825ab7c 100644 --- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/EiJob.java +++ b/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/EiJob.java @@ -21,6 +21,7 @@ package org.oransc.enrichment.repository; import java.lang.invoke.MethodHandles; + import lombok.Builder; import lombok.Getter; diff --git a/onap/oran b/onap/oran index 50fe65ea..3b56b4ff 160000 --- a/onap/oran +++ b/onap/oran @@ -1 +1 @@ -Subproject commit 50fe65ea5daca6935cdbc1155adbfb53f5a28c40 +Subproject commit 3b56b4ff40eba05108651d04df4b9a2ef3a4eb1d -- 2.16.6