diff options
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main/java')
3 files changed, 17 insertions, 3 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/ExecuteBuildingBlock.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/ExecuteBuildingBlock.java index e867b670b7..e45811117c 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/ExecuteBuildingBlock.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/ExecuteBuildingBlock.java @@ -28,6 +28,7 @@ public class ExecuteBuildingBlock extends BuildingBlockBase<ExecuteBuildingBlock private BuildingBlock buildingBlock; private ConfigurationResourceKeys configurationResourceKeys; private Boolean homing = false; + private String oldVolumeGroupName; private static final long serialVersionUID = 3L; public BuildingBlock getBuildingBlock() { @@ -56,4 +57,13 @@ public class ExecuteBuildingBlock extends BuildingBlockBase<ExecuteBuildingBlock this.configurationResourceKeys = configurationResourceKeys; return this; } + + public String getOldVolumeGroupName() { + return oldVolumeGroupName; + } + + public ExecuteBuildingBlock setOldVolumeGroupName(String oldVolumeGroupName) { + this.oldVolumeGroupName = oldVolumeGroupName; + return this; + } } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java index fcc8484385..0cdf8a6e5d 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java @@ -750,6 +750,10 @@ public class BBInputSetup implements JavaDelegate { parameter.getInstanceName(), generatedVnfType, parameter.getInstanceParams()); vnf.getVolumeGroups().add(volumeGroup); if (parameter.getIsReplace()) { + if (parameter.getExecuteBB().getOldVolumeGroupName() != null + && !parameter.getExecuteBB().getOldVolumeGroupName().isEmpty()) { + volumeGroup.setVolumeGroupName(parameter.getExecuteBB().getOldVolumeGroupName()); + } mapCatalogVolumeGroup(volumeGroup, parameter.getModelInfo(), parameter.getServiceModel().getNewService(), replaceVnfModelCustomizationUUID); } else { diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java index 5a52e3a49d..4206596c94 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java @@ -104,7 +104,7 @@ public class ExecuteBuildingBlockRainyDay { handlingCode = "Abort"; } else { try { - if (gBBInput.getCustomer().getServiceSubscription() != null) { + if (gBBInput.getCustomer() != null && gBBInput.getCustomer().getServiceSubscription() != null) { serviceType = gBBInput.getCustomer().getServiceSubscription().getServiceInstances().get(0) .getModelInfoServiceInstance().getServiceType(); } @@ -119,7 +119,7 @@ public class ExecuteBuildingBlockRainyDay { String vnfType = ASTERISK; String vnfName = ASTERISK; try { - if (gBBInput.getCustomer().getServiceSubscription() != null) { + if (gBBInput.getCustomer() != null && gBBInput.getCustomer().getServiceSubscription() != null) { for (GenericVnf vnf : gBBInput.getCustomer().getServiceSubscription().getServiceInstances() .get(0).getVnfs()) { if (vnf.getVnfId().equalsIgnoreCase(lookupKeyMap.get(ResourceKey.GENERIC_VNF_ID))) { @@ -173,7 +173,7 @@ public class ExecuteBuildingBlockRainyDay { String serviceRole = ASTERISK; try { - if (gBBInput.getCustomer().getServiceSubscription() != null) { + if (gBBInput.getCustomer() != null && gBBInput.getCustomer().getServiceSubscription() != null) { serviceRole = gBBInput.getCustomer().getServiceSubscription().getServiceInstances().get(0) .getModelInfoServiceInstance().getServiceRole(); } |