aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2017-11-09 17:26:47 -0500
committerJim Hahn <jrh3@att.com>2017-11-09 17:26:47 -0500
commit0ad2a8215da0631a80d63106950d165dbfeebec4 (patch)
treee266a372e58a60f7ea4b0816a4dcf8a9ec2046b8
parent6f0a1ef3e4b8891c670c289cfc13219031d25341 (diff)
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 <jrh3@att.com>
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DeleteVcpeResCustService.groovy7
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVcpeResCustService.bpmn1
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DeleteVcpeResCustServiceTest.groovy2
3 files changed, 8 insertions, 2 deletions
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)]]></bpmn2:script>
<camunda:out source="rolledBack" target="rolledBack" />
<camunda:in source="lcpCloudRegionId" target="lcpCloudRegionId" />
<camunda:in source="tenantId" target="tenantId" />
+ <camunda:in source="cloudConfiguration" target="cloudConfiguration" />
</bpmn2:extensionElements>
<bpmn2:incoming>SequenceFlow_128485i</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_04fys47</bpmn2:outgoing>
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"))