diff options
author | pwielebs <piotr.wielebski@nokia.com> | 2019-12-20 10:57:48 +0100 |
---|---|---|
committer | Remigiusz Janeczek <remigiusz.janeczek@nokia.com> | 2019-12-20 12:03:27 +0100 |
commit | 481350fb01fdc5375dc10479990e07bd7921a241 (patch) | |
tree | 40f3ae82536a9ebac0c054a746d77bdf3fc2fde3 /bpmn/so-bpmn-tasks/src | |
parent | 44cb5d927a9730c28807557360bad0e61ef4b626 (diff) |
Add pnfs resources handling in service macro create
Issue-ID: SO-2568
Signed-off-by: Piotr Wielebski <piotr.wielebski@nokia.com>
Change-Id: If6c6ad5469c9637af119c811e6f87ea00a282f18
Diffstat (limited to 'bpmn/so-bpmn-tasks/src')
-rw-r--r-- | bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java index 68f33c18a8..99ba35232c 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java @@ -75,17 +75,7 @@ import org.onap.so.db.catalog.beans.VfModuleCustomization; import org.onap.so.db.catalog.beans.macro.NorthBoundRequest; import org.onap.so.db.catalog.beans.macro.OrchestrationFlow; import org.onap.so.db.catalog.client.CatalogDbClient; -import org.onap.so.serviceinstancebeans.CloudConfiguration; -import org.onap.so.serviceinstancebeans.ModelInfo; -import org.onap.so.serviceinstancebeans.ModelType; -import org.onap.so.serviceinstancebeans.Networks; -import org.onap.so.serviceinstancebeans.RelatedInstance; -import org.onap.so.serviceinstancebeans.RequestDetails; -import org.onap.so.serviceinstancebeans.RequestInfo; -import org.onap.so.serviceinstancebeans.Service; -import org.onap.so.serviceinstancebeans.ServiceInstancesRequest; -import org.onap.so.serviceinstancebeans.VfModules; -import org.onap.so.serviceinstancebeans.Vnfs; +import org.onap.so.serviceinstancebeans.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -730,6 +720,8 @@ public class WorkflowAction { workflowResourceIds.setServiceInstanceId(serviceInstanceId); if (resource == WorkflowType.VNF) { workflowResourceIds.setVnfId(resourceId); + } else if (resource == WorkflowType.PNF) { + workflowResourceIds.setPnfId(resourceId); } else if (resource == WorkflowType.VFMODULE) { workflowResourceIds.setVfModuleId(resourceId); } else if (resource == WorkflowType.VOLUMEGROUP) { @@ -1173,6 +1165,13 @@ public class WorkflowAction { } } } + if (validate.getResources().getPnfs() != null) { + for (Pnfs pnf : validate.getResources().getPnfs()) { + resourceCounter.add(new Resource(WorkflowType.PNF, + pnf.getModelInfo().getModelCustomizationId(), false)); + foundRelated = true; + } + } if (validate.getResources().getNetworks() != null) { for (Networks network : validate.getResources().getNetworks()) { resourceCounter.add(new Resource(WorkflowType.NETWORK, |