aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/resource/ResourceRequestBuilder.java9
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy13
2 files changed, 15 insertions, 7 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/resource/ResourceRequestBuilder.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/resource/ResourceRequestBuilder.java
index 9aa17930c0..c72cc71a74 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/resource/ResourceRequestBuilder.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/resource/ResourceRequestBuilder.java
@@ -22,6 +22,7 @@ package org.openecomp.mso.bpmn.common.resource;
import java.io.File;
import java.io.IOException;
+import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
@@ -120,7 +121,7 @@ public class ResourceRequestBuilder {
throws SdcToscaParserException {
Map<String, Object> resouceRequest = new HashMap<>();
-
+ List<Map<String, Object>> param = new ArrayList<>();
String csarpath = null;
try {
csarpath = getCsarFromUuid(serviceUuid);
@@ -144,9 +145,13 @@ public class ResourceRequestBuilder {
Property property = resourceProperties.get(key);
Object value = getValue(property.getValue(), serviceInputs, serInput);
- resouceRequest.put(key, value);
+ HashMap<String, Object> parameter = new HashMap<>();
+ parameter.put("name", key);
+ parameter.put("value", value);
+ param.add(parameter);
}
}
+ resouceRequest.put("param", param);
return resouceRequest;
}
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>