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 --- .../onap/so/bpmn/infrastructure/workflow/tasks/Resource.java | 4 ++++ .../java/org/onap/so/serviceinstancebeans/Resources.java | 12 +++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/Resource.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/Resource.java index 2a8852a4bd..0214a3f998 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/Resource.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/Resource.java @@ -156,4 +156,8 @@ public class Resource implements Serializable { public List getChildren() { return this.children; } + + public Boolean hasParent() { + return parent != null; + } } 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