summaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks/src/main/java/org/onap
diff options
context:
space:
mode:
authorGamboa, Gilbert <gilbert.g.gamboa@att.com>2019-07-18 11:28:01 -0400
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2019-07-18 11:28:02 -0400
commitebe2f6e4b58c78aad50008d6556436a1bf86bcad (patch)
treeca17b86e41ae331976fc1a83954e1f04ed7d6c6e /bpmn/so-bpmn-tasks/src/main/java/org/onap
parent582c5624b4947c14116477297bb4535043281bed (diff)
Remove duplicate name check in createAAITasks.
Remove duplicate name check in createAAITasks. This hould be done prior to status check in WorkflowAction or BBInputSetup. Issue-ID: SO-2119 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com> Change-Id: I0d6d34476b1ab2b351314c9a23926f2fff0e4f89
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/main/java/org/onap')
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java37
1 files changed, 0 insertions, 37 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java
index e3540ecc58..583e3e172a 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java
@@ -77,7 +77,6 @@ public class AAICreateTasks {
private static final Logger logger = LoggerFactory.getLogger(AAICreateTasks.class);
private static final String networkTypeProvider = "PROVIDER";
- private static final String A_LA_CARTE = "aLaCarte";
private static String NETWORK_COLLECTION_NAME = "networkCollectionName";
private static String CONTRAIL_NETWORK_POLICY_FQDN_LIST = "contrailNetworkPolicyFqdnList";
private static String HEAT_STACK_ID = "heatStackId";
@@ -107,12 +106,8 @@ public class AAICreateTasks {
public void createServiceInstance(BuildingBlockExecution execution) {
try {
- Boolean alaCarte = execution.getVariable(A_LA_CARTE);
ServiceInstance serviceInstance =
extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID);
- if (Boolean.TRUE.equals(alaCarte) && aaiSIResources.checkInstanceServiceNameInUse(serviceInstance)) {
- throw new DuplicateNameException("service-instance", serviceInstance.getServiceInstanceName());
- }
Customer customer = execution.getGeneralBuildingBlock().getCustomer();
aaiSIResources.createServiceInstance(serviceInstance, customer);
} catch (Exception ex) {
@@ -199,11 +194,7 @@ public class AAICreateTasks {
public void createVnf(BuildingBlockExecution execution) {
try {
- Boolean alaCarte = execution.getVariable(A_LA_CARTE);
GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
- if (Boolean.TRUE.equals(alaCarte) && aaiVnfResources.checkNameInUse(vnf.getVnfName())) {
- throw new DuplicateNameException("generic-vnf", vnf.getVnfName());
- }
ServiceInstance serviceInstance =
extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID);
execution.setVariable("homing", Boolean.TRUE.equals(vnf.isCallHoming()));
@@ -262,10 +253,6 @@ public class AAICreateTasks {
GenericVnf genericVnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
VolumeGroup volumeGroup = extractPojosForBB.extractByKey(execution, ResourceKey.VOLUME_GROUP_ID);
CloudRegion cloudRegion = gBBInput.getCloudRegion();
- Boolean alaCarte = execution.getVariable(A_LA_CARTE);
- if (Boolean.TRUE.equals(alaCarte) && aaiVolumeGroupResources.checkNameInUse(volumeGroup)) {
- throw new DuplicateNameException("volume-group", volumeGroup.getVolumeGroupName());
- }
aaiVolumeGroupResources.createVolumeGroup(volumeGroup, cloudRegion);
aaiVolumeGroupResources.connectVolumeGroupToVnf(genericVnf, volumeGroup, cloudRegion);
aaiVolumeGroupResources.connectVolumeGroupToTenant(volumeGroup, cloudRegion);
@@ -278,10 +265,6 @@ public class AAICreateTasks {
try {
GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID);
- Boolean alaCarte = execution.getVariable(A_LA_CARTE);
- if (Boolean.TRUE.equals(alaCarte) && aaiVfModuleResources.checkNameInUse(vfModule)) {
- throw new DuplicateNameException("vf-module", vfModule.getVfModuleName());
- }
int moduleIndex = 0;
if (vfModule.getModelInfoVfModule() != null
&& !Boolean.TRUE.equals(vfModule.getModelInfoVfModule().getIsBaseBoolean())) {
@@ -327,14 +310,9 @@ public class AAICreateTasks {
*/
public void createNetwork(BuildingBlockExecution execution) {
try {
- Boolean alaCarte = execution.getVariable(A_LA_CARTE);
ServiceInstance serviceInstance =
extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID);
L3Network l3network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID);
- if (Boolean.TRUE.equals(alaCarte)
- && aaiNetworkResources.checkNetworkNameInUse(l3network.getNetworkName())) {
- throw new DuplicateNameException("l3Network", l3network.getNetworkName());
- }
// set default to false. ToBe updated by SDNC
l3network.setIsBoundToVpn(false);
// define is bound to vpn flag as true if NEUTRON_NETWORK_TYPE is PROVIDER
@@ -385,16 +363,11 @@ public class AAICreateTasks {
*/
public void createNetworkCollectionInstanceGroup(BuildingBlockExecution execution) {
try {
- Boolean alaCarte = execution.getVariable(A_LA_CARTE);
ServiceInstance serviceInstance =
extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID);
InstanceGroup instanceGroup = serviceInstance.getCollection().getInstanceGroup();
// set name generated for NetworkCollection/NetworkCollectionInstanceGroup in previous step of the BB flow
instanceGroup.setInstanceGroupName(execution.getVariable(NETWORK_COLLECTION_NAME));
- if (Boolean.TRUE.equals(alaCarte)
- && aaiInstanceGroupResources.checkInstanceGroupNameInUse(instanceGroup.getInstanceGroupName())) {
- throw new DuplicateNameException("instance-group", instanceGroup.getInstanceGroupName());
- }
// put shell in AAI
aaiNetworkResources.createNetworkInstanceGroup(instanceGroup);
} catch (Exception ex) {
@@ -511,12 +484,7 @@ public class AAICreateTasks {
public void createConfiguration(BuildingBlockExecution execution) {
try {
- Boolean alaCarte = execution.getVariable(A_LA_CARTE);
Configuration configuration = extractPojosForBB.extractByKey(execution, ResourceKey.CONFIGURATION_ID);
- if (Boolean.TRUE.equals(alaCarte)
- && aaiConfigurationResources.checkConfigurationNameInUse(configuration.getConfigurationName())) {
- throw new DuplicateNameException("configuration", configuration.getConfigurationName());
- }
aaiConfigurationResources.createConfiguration(configuration);
} catch (Exception ex) {
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
@@ -525,14 +493,9 @@ public class AAICreateTasks {
public void createInstanceGroupVnf(BuildingBlockExecution execution) {
try {
- Boolean alaCarte = execution.getVariable(A_LA_CARTE);
ServiceInstance serviceInstance =
extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID);
InstanceGroup instanceGroup = extractPojosForBB.extractByKey(execution, ResourceKey.INSTANCE_GROUP_ID);
- if (Boolean.TRUE.equals(alaCarte)
- && aaiInstanceGroupResources.checkInstanceGroupNameInUse(instanceGroup.getInstanceGroupName())) {
- throw new DuplicateNameException("instance-group", instanceGroup.getInstanceGroupName());
- }
aaiInstanceGroupResources.createInstanceGroupandConnectServiceInstance(instanceGroup, serviceInstance);
} catch (Exception ex) {
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);