aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2018-12-12 12:47:32 +0000
committerGerrit Code Review <gerrit@onap.org>2018-12-12 12:47:32 +0000
commit6d30c5883a57bf9a7b8b322b131ed8fabec19594 (patch)
tree7721d888da60e8869d75a3c3347af553d119b192 /bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap
parentb49c655fd491afad97fd39be5d8a14a40712b58b (diff)
parenta025602305a7af1d7faa582d5b7328c1ac9f9818 (diff)
Merge "response from aai is now volumeGroups"
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap')
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2.groovy8
1 files changed, 5 insertions, 3 deletions
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2.groovy
index aa22cdaefd..b42962adac 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2.groovy
@@ -24,6 +24,7 @@ import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution
import org.onap.aai.domain.yang.GenericVnf
import org.onap.aai.domain.yang.VolumeGroup
+import org.onap.aai.domain.yang.VolumeGroups
import org.onap.so.bpmn.common.scripts.AaiUtil
import org.onap.so.bpmn.common.scripts.ExceptionUtil
import org.onap.so.bpmn.common.scripts.MsoUtils
@@ -216,10 +217,11 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
try {
AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.VOLUME_GROUP, Defaults.CLOUD_OWNER.toString(), cloudRegion).queryParam("volume-group-name", volumeGroupName)
- Optional<VolumeGroup> volumeGroup = getAAIClient().get(VolumeGroup.class,uri)
- if(volumeGroup.isPresent()){
+ Optional<VolumeGroups> volumeGroups = getAAIClient().get(VolumeGroups.class,uri)
+ if(volumeGroups.isPresent()){
+ VolumeGroup volumeGroup = volumeGroups.get().getVolumeGroup().get(0);
execution.setVariable(prefix+'AaiReturnCode', 200)
- execution.setVariable("queriedVolumeGroupId",volumeGroup.get().getVolumeGroupId())
+ execution.setVariable("queriedVolumeGroupId",volumeGroup.getVolumeGroupId())
msoLogger.debug("Volume Group Name $volumeGroupName exists in AAI.")
}else{
execution.setVariable(prefix+'AaiReturnCode', 404)