diff options
author | subhash kumar singh <subhash.kumar.singh@huawei.com> | 2018-04-20 15:05:50 +0000 |
---|---|---|
committer | subhash kumar singh <subhash.kumar.singh@huawei.com> | 2018-04-20 15:05:50 +0000 |
commit | 1cf0d4884b9d352488d5d241ffa8fe7b48f851e7 (patch) | |
tree | b567a0d7ace2d0c08c2c1b28d28f78603c588445 /bpmn/MSOInfrastructureBPMN/src | |
parent | 62fbfc8a97aa4f8766007c49c0165b4d8c50e4dc (diff) |
Fix input for SDNC resource creaation
Fix version id and model name.
Fix input param for sdnc resource request.
Change-Id: I6ade488aec061c9bf4dc0cd04e124896a71571be
Issue-ID: SO-422
Signed-off-by: subhash kumar singh <subhash.kumar.singh@huawei.com>
Diffstat (limited to 'bpmn/MSOInfrastructureBPMN/src')
-rw-r--r-- | bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy index 5eda2cc145..62458ec115 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy @@ -18,7 +18,10 @@ * ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.bpmn.infrastructure.scripts;
+package org.openecomp.mso.bpmn.infrastructure.scripts
+
+import org.json.JSONObject
+import org.json.XML;
import static org.apache.commons.lang3.StringUtils.*;
import groovy.xml.XmlUtil
@@ -144,8 +147,8 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor { String serviceType = resourceInputObj.getServiceType()
String serviceModelInvariantUuid = resourceInputObj.getServiceModelInfo().getModelInvariantUuid()
String serviceModelUuid = resourceInputObj.getServiceModelInfo().getModelUuid()
- String serviceModelVersion = resourceInputObj.getServiceModelInfo().getModelName()
- String serviceModelName = resourceInputObj.getServiceModelInfo().getModelVersion()
+ String serviceModelVersion = resourceInputObj.getServiceModelInfo().getModelVersion()
+ String serviceModelName = resourceInputObj.getServiceModelInfo().getModelName()
String globalCustomerId = resourceInputObj.getGlobalSubscriberId()
String modelInvariantUuid = resourceInputObj.getResourceModelInfo().getModelInvariantUuid();
String modelCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid()
@@ -155,7 +158,7 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor { String resourceInputPrameters = resourceInputObj.getResourceParameters()
String netowrkInputParametersJson = jsonUtil.getJsonValue(resourceInputPrameters, "requestInputs")
//here convert json string to xml string
- String netowrkInputParameters = jsonUtil.json2xml(netowrkInputParametersJson)
+ String netowrkInputParameters = XML.toString(new JSONObject(netowrkInputParametersJson))
// 1. prepare assign topology via SDNC Adapter SUBFLOW call
String sndcTopologyCreateRequest =
"""<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
@@ -179,7 +182,7 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor { <order-version></order-version>
</request-information>
<service-information>
- <service-id>${sdnc_service_id}</service-id>
+ <service-id>${serviceInstanceId}</service-id>
<subscription-service-type>${serviceType}</subscription-service-type>
<ecomp-model-information>
<model-invariant-uuid>${serviceModelInvariantUuid}</model-invariant-uuid>
|