aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Daugherty <rd472p@att.com>2018-08-28 20:44:01 +0000
committerGerrit Code Review <gerrit@onap.org>2018-08-28 20:44:01 +0000
commita9fe9eb6ed407d657536ee98d065e3092b304c07 (patch)
treebb84cd45ddf0bec968577eece9fafdfa00dc39e3
parent6ffc97aad02be00b5c68c055f16df8ab600b9ea9 (diff)
parentc83d7b3594f51a1b0105483b9799fbbaf1be558f (diff)
Merge "fixed double encoding issue"
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy14
1 files changed, 6 insertions, 8 deletions
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy
index 7fa8b4409b..808bbc1898 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy
@@ -259,6 +259,9 @@ class DoCreateVnf extends AbstractServiceTaskProcessor {
AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
if(resourceClient.exists(uri)){
+ Map<String, String> keys = uri.getURIKeys()
+ execution.setVariable("globalCustomer", keys.get("global-customer-id"))
+ execution.setVariable("serviceType", keys.get("service-type"))
execution.setVariable("GENGS_siResourceLink", uri.build().toString())
}else{
@@ -307,14 +310,9 @@ class DoCreateVnf extends AbstractServiceTaskProcessor {
//Get Service Instance Info
String serviceInstanceId = getVariableEnforced(execution, "DoCVNF_serviceInstanceId")
- String siRelatedLink = getVariableEnforced(execution, "GENGS_siResourceLink")
-
- int custStart = siRelatedLink.indexOf("customer/")
- int custEnd = siRelatedLink.indexOf("/service-subscriptions")
- String globalCustId = siRelatedLink.substring(custStart + 9, custEnd)
- int serviceStart = siRelatedLink.indexOf("service-subscription/")
- int serviceEnd = siRelatedLink.indexOf("/service-instances/")
- String serviceType = siRelatedLink.substring(serviceStart + 21, serviceEnd)
+
+ String globalCustId = execution.getVariable("global-customer-id")
+ String serviceType = execution.getVariable("service-type")
Map<String, String> payload = new LinkedHashMap<>();
payload.put("vnf-id", vnfId);