summaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks/src/main
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2019-12-13 17:05:20 +0000
committerGerrit Code Review <gerrit@onap.org>2019-12-13 17:05:20 +0000
commitae2e0e84e68213e2d0811fd551e3777bf64f587d (patch)
treeeac5e4200b412827f6352f10eaf4db9617ec22ba /bpmn/so-bpmn-tasks/src/main
parent7d3f616c778005a59d3ab8d643025f918c640bf6 (diff)
parent5671fed30c9bcc74f0884893538e4aacabbc1b2f (diff)
Merge "Need to globally check object name duplicates in"
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/main')
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java13
1 files changed, 11 insertions, 2 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 58bf17f08b..5cab676469 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
@@ -1268,12 +1268,15 @@ public class WorkflowAction {
}
}
}
+ if (bbInputSetupUtils.existsAAIVfModuleGloballyByName(instanceName)) {
+ throw new DuplicateNameException("vfModule", instanceName);
+ }
} else if ("VOLUMEGROUP".equalsIgnoreCase(type.toString())) {
GenericVnf vnf = bbInputSetupUtils.getAAIGenericVnf(workflowResourceIds.getVnfId());
Optional<VolumeGroup> volumeGroup = bbInputSetupUtils
.getRelatedVolumeGroupByNameFromVnf(workflowResourceIds.getVnfId(), instanceName);
if (volumeGroup.isPresent()) {
- if (vnf.getModelCustomizationId()
+ if (volumeGroup.get().getVfModuleModelCustomizationId()
.equalsIgnoreCase(reqDetails.getModelInfo().getModelCustomizationId())) {
return volumeGroup.get().getVolumeGroupId();
} else {
@@ -1286,7 +1289,7 @@ public class WorkflowAction {
bbInputSetupUtils.getRelatedVolumeGroupByNameFromVfModule(vnf.getVnfId(),
vfModule.getVfModuleId(), instanceName);
if (volumeGroupFromVfModule.isPresent()) {
- if (vnf.getModelCustomizationId()
+ if (volumeGroupFromVfModule.get().getVfModuleModelCustomizationId()
.equalsIgnoreCase(reqDetails.getModelInfo().getModelCustomizationId())) {
return volumeGroupFromVfModule.get().getVolumeGroupId();
} else {
@@ -1297,6 +1300,9 @@ public class WorkflowAction {
}
}
}
+ if (bbInputSetupUtils.existsAAIVolumeGroupGloballyByName(instanceName)) {
+ throw new DuplicateNameException("volumeGroup", instanceName);
+ }
} else if ("CONFIGURATION".equalsIgnoreCase(type.toString())) {
Optional<org.onap.aai.domain.yang.Configuration> configuration =
bbInputSetupUtils.getRelatedConfigurationByNameFromServiceInstance(
@@ -1311,6 +1317,9 @@ public class WorkflowAction {
configuration.get().getConfigurationId()));
}
}
+ if (bbInputSetupUtils.existsAAIConfigurationGloballyByName(instanceName)) {
+ throw new DuplicateNameException("configuration", instanceName);
+ }
}
return generatedResourceId;
} catch (DuplicateNameException dne) {