X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=enrichment-coordinator-service%2Fsrc%2Fmain%2Fjava%2Forg%2Foransc%2Fenrichment%2Fcontrollers%2Fr1consumer%2FConsumerController.java;h=9f16728b6692f65785c184fa6b8a8f8b596e3eb8;hb=9cd4d7948e24a7f77b2c207c4f37999878373260;hp=18897c3055ffec4f291be7d3e899d7e575a77fdc;hpb=6feeffdf7069bdea16dc5e9731afc5e72bc6213d;p=nonrtric.git diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerController.java b/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerController.java index 18897c30..9f16728b 100644 --- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerController.java +++ b/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerController.java @@ -37,6 +37,7 @@ import java.lang.invoke.MethodHandles; import java.net.URI; import java.net.URISyntaxException; import java.util.ArrayList; +import java.util.Collection; import java.util.List; import org.json.JSONObject; @@ -226,9 +227,11 @@ public class ConsumerController { } private ConsumerJobStatus toInfoJobStatus(InfoJob job) { + Collection producerIds = new ArrayList<>(); + this.infoProducers.getProducersForType(job.getTypeId()).forEach(producer -> producerIds.add(producer.getId())); return this.infoProducers.isJobEnabled(job) - ? new ConsumerJobStatus(ConsumerJobStatus.InfoJobStatusValues.ENABLED) - : new ConsumerJobStatus(ConsumerJobStatus.InfoJobStatusValues.DISABLED); + ? new ConsumerJobStatus(ConsumerJobStatus.InfoJobStatusValues.ENABLED, producerIds) + : new ConsumerJobStatus(ConsumerJobStatus.InfoJobStatusValues.DISABLED, producerIds); }