diff options
author | Lukasz Muszkieta <lukasz.muszkieta@nokia.com> | 2020-08-03 15:07:58 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-08-03 15:07:58 +0000 |
commit | 4e81b212f66800fffbb06a1f6c55b5733a98c122 (patch) | |
tree | e9ccadcb71e19cf1a7987cc5850191db6ae942c9 /bpmn/so-bpmn-tasks/src/main/java | |
parent | fbe9971f99989c59d84f434f884b4f2ebc8e1f03 (diff) | |
parent | 4180d54d46aebca6bba531241d01759615887e2c (diff) |
Merge "Create DeactivatePnfBB and include it into Service-Macro-Delete flow."
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/main/java')
2 files changed, 20 insertions, 0 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java index cc630232c2..6c989093ab 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java @@ -90,6 +90,13 @@ public class AAIUpdateTasks { } /** + * BPMN access method to update status of Pnf to Inventoried in AAI + */ + public void updateOrchestrationStatusInventoriedPnf(BuildingBlockExecution execution) { + updateOrchestrationStatusForPnf(execution, OrchestrationStatus.INVENTORIED); + } + + /** * BPMN access method to update status of Pnf to Active in AAI */ public void updateOrchestrationStatusActivePnf(BuildingBlockExecution execution) { 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 6f11882281..985114abcd 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 @@ -936,6 +936,7 @@ public class WorkflowAction { bbInputSetup.getExistingServiceInstance(serviceInstanceAAI); resourceList.add(new Resource(WorkflowType.SERVICE, serviceInstanceMSO.getServiceInstanceId(), false)); traverseServiceInstanceMSOVnfs(resourceList, aaiResourceIds, serviceInstanceMSO); + traverseServiceInstanceMSOPnfs(resourceList, aaiResourceIds, serviceInstanceMSO); if (serviceInstanceMSO.getNetworks() != null) { for (org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network network : serviceInstanceMSO .getNetworks()) { @@ -993,6 +994,18 @@ public class WorkflowAction { } } + private void traverseServiceInstanceMSOPnfs(List<Resource> resourceList, + List<Pair<WorkflowType, String>> aaiResourceIds, + org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance serviceInstanceMSO) { + if (serviceInstanceMSO.getPnfs() == null) { + return; + } + for (org.onap.so.bpmn.servicedecomposition.bbobjects.Pnf pnf : serviceInstanceMSO.getPnfs()) { + aaiResourceIds.add(new Pair<>(WorkflowType.PNF, pnf.getPnfId())); + resourceList.add(new Resource(WorkflowType.PNF, pnf.getPnfId(), false)); + } + } + private void traverseVnfModules(List<Resource> resourceList, List<Pair<WorkflowType, String>> aaiResourceIds, org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf vnf) { if (vnf.getVfModules() == null) { |