From 959493d3274d2f2749586248cf31ee12b730e2af Mon Sep 17 00:00:00 2001 From: "Benjamin, Max (mb388a)" Date: Fri, 26 Oct 2018 15:05:42 -0400 Subject: Bug fixes October 26th Set non-custom health diagnostic check code to a default value. created custom java serialization for SimpleUri changed property value for cloud-owner in unit test converted aai call to use the AAI Client Correct a JUnit data file to include userParams values that are expected to be set. Set userParams on requestContext to parameters that need to be passed to downstream systems. Change-Id: I3974691875ef967f90a15f076ae27bc0cd76ee8e Issue-ID: SO-1169 Signed-off-by: Benjamin, Max (mb388a) --- .../infrastructure/scripts/UpdateVfModuleVolume.groovy | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'bpmn/so-bpmn-infrastructure-common') diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy index 82e27ec116..0f9a0ad292 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy @@ -29,10 +29,13 @@ import org.onap.so.bpmn.common.scripts.MsoUtils import org.onap.so.bpmn.common.scripts.VfModuleBase import org.onap.so.bpmn.core.UrnPropertiesReader; import org.onap.so.bpmn.core.WorkflowException +import org.onap.so.client.aai.AAIObjectType +import org.onap.so.client.aai.entities.uri.AAIResourceUri +import org.onap.so.client.aai.entities.uri.AAIUriFactory +import org.onap.so.constants.Defaults import org.onap.so.logger.MessageEnum import org.onap.so.logger.MsoLogger import org.onap.so.rest.APIResponse -import org.springframework.web.util.UriUtils class UpdateVfModuleVolume extends VfModuleBase { private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, UpdateVfModuleVolume.class); @@ -172,14 +175,15 @@ class UpdateVfModuleVolume extends VfModuleBase { try { def volumeGroupId = execution.getVariable('UPDVfModVol_volumeGroupId') def aicCloudRegion = execution.getVariable('UPDVfModVol_aicCloudRegion') - def endPoint = UrnPropertiesReader.getVariable("aai.endpoint", execution) + - '/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/' + UriUtils.encode(aicCloudRegion, "UTF-8") + - '/volume-groups/volume-group/' + UriUtils.encode(volumeGroupId, "UTF-8") + + AaiUtil aaiUtil = new AaiUtil(this) + AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, Defaults.CLOUD_OWNER.toString(), aicCloudRegion, volumeGroupId) + String endPoint = aaiUtil.createAaiUri(uri) + msoLogger.debug('Sending GET to AAI endpoint \'' + endPoint + '\'') msoLogger.debug("UpdateVfModuleVolume sending GET for quering AAI endpoint: " + endPoint) - AaiUtil aaiUtil = new AaiUtil(this) APIResponse response = aaiUtil.executeAAIGetCall(execution, endPoint) def int statusCode = response.getStatusCode() def responseData = response.getResponseBodyAsString() -- cgit 1.2.3-korg