From 65386bb78fb5afe2ccab967e35bd40f65720dd60 Mon Sep 17 00:00:00 2001 From: Jozsef Csongvai Date: Fri, 26 Nov 2021 15:49:36 -0500 Subject: Enable recursive model by adding services to resources Issue-ID: SO-3811 Signed-off-by: Jozsef Csongvai Change-Id: I13ea0986b9c81971432626163d323991b57f9545 --- .../java/org/onap/so/serviceinstancebeans/Resources.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'common/src/main/java/org/onap') diff --git a/common/src/main/java/org/onap/so/serviceinstancebeans/Resources.java b/common/src/main/java/org/onap/so/serviceinstancebeans/Resources.java index acac8c4033..9cb5b33251 100644 --- a/common/src/main/java/org/onap/so/serviceinstancebeans/Resources.java +++ b/common/src/main/java/org/onap/so/serviceinstancebeans/Resources.java @@ -42,6 +42,8 @@ public class Resources implements Serializable { private List pnfs = new ArrayList<>(); @JsonProperty("networks") private List networks = new ArrayList<>(); + @JsonProperty("services") + private List services = new ArrayList<>(); public List getVnfs() { return vnfs; @@ -67,8 +69,16 @@ public class Resources implements Serializable { this.networks = networks; } + public List getServices() { + return services; + } + + public void setServices(List services) { + this.services = services; + } + @Override public String toString() { - return "Resources [vnfs=" + vnfs + ", networks=" + networks + "]"; + return "Resources [vnfs=" + vnfs + ", networks=" + networks + ", services=" + services + "]"; } } -- cgit 1.2.3-korg From fb7e0b5f8b13a0cd8b01011445c27cf47a415954 Mon Sep 17 00:00:00 2001 From: sreeja gattagouni Date: Thu, 21 Apr 2022 15:24:22 +0530 Subject: Processing Priority for Nested Services - Processing Priority For Nested Services. - Prioritising services by mentioning priority number while triggering requests will allow the Services to be instantiated as per the priority in a Nested-Services having Parent-Child Services Relationships. Issue-ID: SO-3855 Change-Id: I66d83f324c122d842f52f0b808dab5640b8c9abf Signed-off-by: sreeja gattagouni --- .../tasks/ebb/loader/UserParamsServiceTraversal.java | 1 + .../java/org/onap/so/serviceinstancebeans/Service.java | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'common/src/main/java/org/onap') diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ebb/loader/UserParamsServiceTraversal.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ebb/loader/UserParamsServiceTraversal.java index 074aa9e5a1..b8b9c458fa 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ebb/loader/UserParamsServiceTraversal.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ebb/loader/UserParamsServiceTraversal.java @@ -115,6 +115,7 @@ public class UserParamsServiceTraversal { for (Service childService : validate.getResources().getServices()) { Resource childServiceResource = new Resource(WorkflowType.SERVICE, childService.getModelInfo().getModelVersionId(), false, serviceResource); + childServiceResource.setProcessingPriority(childService.getProcessingPriority()); childServiceResource.setInstanceName(childService.getInstanceName()); resourceList.add(childServiceResource); } diff --git a/common/src/main/java/org/onap/so/serviceinstancebeans/Service.java b/common/src/main/java/org/onap/so/serviceinstancebeans/Service.java index c368f67907..14b1ab5974 100644 --- a/common/src/main/java/org/onap/so/serviceinstancebeans/Service.java +++ b/common/src/main/java/org/onap/so/serviceinstancebeans/Service.java @@ -45,6 +45,9 @@ public class Service implements Serializable { private List> instanceParams = new ArrayList<>(); @JsonProperty("resources") protected Resources resources; + @JsonProperty("processingPriority") + protected Integer processingPriority = 0; + public ModelInfo getModelInfo() { return modelInfo; @@ -86,9 +89,19 @@ public class Service implements Serializable { this.resources = resources; } + public Integer getProcessingPriority() { + return processingPriority; + } + + public void setProcessingPriority(Integer processingPriority) { + this.processingPriority = processingPriority; + } + + @Override public String toString() { return "Service [modelInfo=" + modelInfo + ", cloudConfiguration=" + cloudConfiguration + ", instanceName=" - + instanceName + ", instanceParams=" + instanceParams + ", resources=" + resources + "]"; + + instanceName + ", instanceParams=" + instanceParams + ", resources=" + resources + + ", processingPriority=" + processingPriority + "]"; } } -- cgit 1.2.3-korg