diff options
Diffstat (limited to 'bpmn/MSOInfrastructureBPMN/src/main')
-rw-r--r-- | bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfCmBase.groovy | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfCmBase.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfCmBase.groovy index 39820dc2e1..d8405aa243 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfCmBase.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfCmBase.groovy @@ -277,11 +277,19 @@ public abstract class VnfCmBase extends AbstractServiceTaskProcessor { } } - if (cloudRegionId != null) { - AAIUri cloudRegionUri = AAIUriFactory.createResourceUri(AAIObjectType.DEFAULT_CLOUD_REGION, cloudRegionId) + if (cloudRegionId != null) { + String cloudOwnerId = "att-aic"; + try { + cloudOwnerId = execution.getVariable("URN_mso_default_cloud_owner_id"); + if (cloudOwnerId == null) cloudOwnerId = "att-aic"; + } catch (RuntimeException e) { + cloudOwnerId = "att-aic"; + } + + AAIUri cloudRegionUri = AAIUriFactory.createResourceUri(AAIObjectType.CLOUD_REGION, cloudOwnerId, cloudRegionId) // Check if this client region exists if (!client.exists(cloudRegionUri)) { - logDebug("Cloud Region with cloudRegionId " + cloudRegionId + " does not exist in A&AI", isDebugLogEnabled) + logDebug("Cloud Region with cloudOwner ID " + cloudOwnerId + " and cloudRegionId " + cloudRegionId + " does not exist in A&AI", isDebugLogEnabled) exceptionUtil.buildAndThrowWorkflowException(execution, 404, "Cloud Region with cloudRegionId " + cloudRegionId + " does not exist in A&AI") } |