diff options
author | Kalkere Ramesh, Sharan (sk720x) <sk720x@att.com> | 2018-12-11 11:55:38 -0500 |
---|---|---|
committer | Kalkere Ramesh, Sharan (sk720x) <sk720x@att.com> | 2018-12-11 11:56:09 -0500 |
commit | a025602305a7af1d7faa582d5b7328c1ac9f9818 (patch) | |
tree | 37c7633ed49112af0a743518eba51c5916eb1a70 /bpmn/so-bpmn-infrastructure-common/src/main | |
parent | 533311a4934838b67ffd0ca49d7958f69059bccd (diff) |
response from aai is now volumeGroups
AAI Client response is now expected to be VfModules
Change-Id: I13be95496fc711656036dab6c7452638a19139bf
Issue-ID: SO-1327
Signed-off-by: Kalkere Ramesh, Sharan (sk720x) <sk720x@att.com>
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-common/src/main')
-rw-r--r-- | bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2.groovy | 8 |
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 93379c72be..ee634c891a 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) |