From 0ad2a8215da0631a80d63106950d165dbfeebec4 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Thu, 9 Nov 2017 17:26:47 -0500 Subject: Now passing cloudConfig to subflows Modified DeleteVcpeResCustService to pass cloudConfiguration to the delete-vnf-and-modules subflow, in addition to passing the cloud id and tenant id. Change-Id: Icf7824ed36eef95b8ab943005c5f4495706b5d70 Issue-Id: SO-324 Signed-off-by: Jim Hahn --- .../mso/bpmn/vcpe/scripts/DeleteVcpeResCustService.groovy | 7 +++++-- .../src/main/resources/process/DeleteVcpeResCustService.bpmn | 1 + .../mso/bpmn/vcpe/scripts/DeleteVcpeResCustServiceTest.groovy | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) (limited to 'bpmn/MSOInfrastructureBPMN/src') diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DeleteVcpeResCustService.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DeleteVcpeResCustService.groovy index 04eb4c7d7e..77ef3f6fe0 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DeleteVcpeResCustService.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DeleteVcpeResCustService.groovy @@ -135,10 +135,13 @@ public class DeleteVcpeResCustService extends AbstractServiceTaskProcessor { utils.log("DEBUG", "Incoming subscriptionServiceType is: " + subscriptionServiceType, isDebugEnabled) // extract cloud configuration - String lcpCloudRegionId = jsonUtil.getJsonValue(DeleteVcpeResCustServiceRequest, "requestDetails.cloudConfiguration.lcpCloudRegionId") + String cloudConfiguration = jsonUtil.getJsonValue(DeleteVcpeResCustServiceRequest, "requestDetails.cloudConfiguration") + execution.setVariable("cloudConfiguration", cloudConfiguration) + utils.log("DEBUG","cloudConfiguration: "+ cloudConfiguration, isDebugEnabled) + String lcpCloudRegionId = jsonUtil.getJsonValue(cloudConfiguration, "lcpCloudRegionId") execution.setVariable("lcpCloudRegionId", lcpCloudRegionId) utils.log("DEBUG","lcpCloudRegionId: "+ lcpCloudRegionId, isDebugEnabled) - String tenantId = jsonUtil.getJsonValue(DeleteVcpeResCustServiceRequest, "requestDetails.cloudConfiguration.tenantId") + String tenantId = jsonUtil.getJsonValue(cloudConfiguration, "tenantId") execution.setVariable("tenantId", tenantId) utils.log("DEBUG","tenantId: "+ tenantId, isDebugEnabled) diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVcpeResCustService.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVcpeResCustService.bpmn index 38e1d43910..88c45afda2 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVcpeResCustService.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVcpeResCustService.bpmn @@ -253,6 +253,7 @@ DeleteVcpeResCustService.prepareServiceDelete(execution)]]> + SequenceFlow_128485i SequenceFlow_04fys47 diff --git a/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DeleteVcpeResCustServiceTest.groovy b/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DeleteVcpeResCustServiceTest.groovy index df7c0cff97..fc53744b8b 100644 --- a/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DeleteVcpeResCustServiceTest.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DeleteVcpeResCustServiceTest.groovy @@ -108,6 +108,7 @@ class DeleteVcpeResCustServiceTest extends GroovyTestBase { verify(mex).setVariable("lcpCloudRegionId", "mdt1") verify(mex).setVariable("tenantId", "8b1df54faa3b49078e3416e21370a3ba") + assertEquals("""{"tenantId":"8b1df54faa3b49078e3416e21370a3ba","lcpCloudRegionId":"mdt1"}""", map.get("cloudConfiguration")) verify(mex).setVariable("sdncVersion", "1702") verify(mex).setVariable("GENGS_type", "service-instance") assertTrue(map.containsKey(Prefix+"requestInfo")) @@ -146,6 +147,7 @@ class DeleteVcpeResCustServiceTest extends GroovyTestBase { verify(mex).setVariable("lcpCloudRegionId", "mdt1") verify(mex).setVariable("tenantId", "8b1df54faa3b49078e3416e21370a3ba") + assertEquals("""{"tenantId":"8b1df54faa3b49078e3416e21370a3ba","lcpCloudRegionId":"mdt1"}""", map.get("cloudConfiguration")) verify(mex).setVariable("sdncVersion", "1702") verify(mex).setVariable("GENGS_type", "service-instance") assertTrue(map.containsKey(Prefix+"requestInfo")) -- cgit 1.2.3-korg