diff options
author | Rob Daugherty <rd472p@att.com> | 2018-05-18 19:39:17 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-05-18 19:39:17 +0000 |
commit | 62c099c68ca02c336026076984ff4765143e47b8 (patch) | |
tree | b5c20e3b23c3cbaebd9ee5e4db44b1fbaf53fd5c /bpmn/MSOInfrastructureBPMN/src/main | |
parent | 6f0c00ffbb4517df5377e13a1f7520b1041b6f8f (diff) | |
parent | 465c8992f528ab634f5321e79c6cc0a4e8ec4fd3 (diff) |
Merge "Fallback for cloud region calls to AAI"
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") } |