diff options
7 files changed, 56 insertions, 40 deletions
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy index 87cf6fbd0f..fc6293c11f 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy @@ -156,29 +156,33 @@ public class CreateVcpeResCustService extends AbstractServiceTaskProcessor { execution.setVariable("subscriberInfo", subscriberInfo)
utils.log("DEBUG", "Incoming subscriberInfo is: " + subscriberInfo, isDebugEnabled)
- /* - * Extracting User Parameters from incoming Request and converting into a Map - */ - def jsonSlurper = new JsonSlurper() - def jsonOutput = new JsonOutput() + /*
+ * Extracting User Parameters from incoming Request and converting into a Map
+ */
+ def jsonSlurper = new JsonSlurper()
+ def jsonOutput = new JsonOutput()
+
+ Map reqMap = jsonSlurper.parseText(createVcpeServiceRequest)
+
+ //InputParams
+ def userParams = reqMap.requestDetails?.requestParameters?.userParams
- Map reqMap = jsonSlurper.parseText(createVcpeServiceRequest) - - //InputParams - def userParams = reqMap.requestDetails?.requestParameters?.userParams - - Map<String, String> inputMap = [:] - if (userParams) { - userParams.each { - name, value -> inputMap.put(name, value) - if (name.equals("BRG_WAN_MAC_Address")) - execution.setVariable("brgWanMacAddress", value)
- } - } - - utils.log("DEBUG", "User Input Parameters map: " + userParams.toString(), isDebugEnabled) - execution.setVariable("serviceInputParams", inputMap) - + Map<String, String> inputMap = [:]
+
+
+ if (userParams) {
+ userParams.each {
+ userParam ->
+ if("BRG_WAN_MAC_Address".equals(userParam?.name)) {
+ execution.setVariable("brgWanMacAddress", userParam.value)
+ inputMap.put("BRG_WAN_MAC_Address", userParam.value)
+ }
+ }
+ }
+
+ utils.log("DEBUG", "User Input Parameters map: " + userParams.toString(), isDebugEnabled)
+ execution.setVariable("serviceInputParams", inputMap)
+
utils.log("DEBUG", "Incoming brgWanMacAddress is: " + execution.getVariable('brgWanMacAddress'), isDebugEnabled)
//For Completion Handler & Fallout Handler
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/request.json b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/request.json index dc4669e8d9..a0168bd96a 100644 --- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/request.json +++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/request.json @@ -31,9 +31,12 @@ "subscriptionServiceType":"123456789", "aLaCarte":"false", "userParams": - { - "BRG_WAN_MAC_Address" : "brgmac" - } + [ + { + "name":"BRG_WAN_MAC_Address", + "value":"brgmac" + } + ] } } diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSIName.json b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSIName.json index dc9ac49a4e..17c6d15fe7 100644 --- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSIName.json +++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSIName.json @@ -29,10 +29,13 @@ { "subscriptionServiceType":"123456789", "aLaCarte":"false", - "userParams": - { - "BRG_WAN_MAC_Address" : "brgmac" - } + "userParams": + [ + { + "name":"BRG_WAN_MAC_Address", + "value":"brgmac" + } + ] } } diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSINameNoRollback.json b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSINameNoRollback.json index d5b0713d9f..8583e66d33 100644 --- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSINameNoRollback.json +++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSINameNoRollback.json @@ -29,10 +29,13 @@ { "subscriptionServiceType":"123456789", "aLaCarte":"false", - "userParams": - { - "BRG_WAN_MAC_Address" : "brgmac" - } + "userParams": + [ + { + "name":"BRG_WAN_MAC_Address", + "value":"brgmac" + } + ] } } diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/DeleteVcpeResCustService/request.json b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/DeleteVcpeResCustService/request.json index dc4669e8d9..99941c99ce 100644 --- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/DeleteVcpeResCustService/request.json +++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/DeleteVcpeResCustService/request.json @@ -30,10 +30,13 @@ { "subscriptionServiceType":"123456789", "aLaCarte":"false", - "userParams": - { - "BRG_WAN_MAC_Address" : "brgmac" - } + "userParams": + [ + { + "name":"BRG_WAN_MAC_Address", + "value":"brgmac" + } + ] } } diff --git a/mso-catalog-db/src/main/resources/HeatFiles.hbm.xml b/mso-catalog-db/src/main/resources/HeatFiles.hbm.xml index 4674239a99..5a2c4aa537 100644 --- a/mso-catalog-db/src/main/resources/HeatFiles.hbm.xml +++ b/mso-catalog-db/src/main/resources/HeatFiles.hbm.xml @@ -36,7 +36,7 @@ <property name="version" type="java.lang.String" length="20" not-null="true">
<column name="VERSION" />
</property>
- <property name="fileBody" type="java.lang.String" not-null="true">
+ <property name="fileBody" type="text" not-null="true">
<column name="BODY" />
</property>
<property name="created" type="java.sql.Timestamp" generated="insert" update="false" insert="false" not-null="true">
diff --git a/mso-catalog-db/src/main/resources/NetworkResource.hbm.xml b/mso-catalog-db/src/main/resources/NetworkResource.hbm.xml index 7f4698e82b..1599cf5c66 100644 --- a/mso-catalog-db/src/main/resources/NetworkResource.hbm.xml +++ b/mso-catalog-db/src/main/resources/NetworkResource.hbm.xml @@ -29,7 +29,7 @@ <id name="modelUUID" column="MODEL_UUID" type="string" length="200"/> <property name="modelName" column="MODEL_NAME" type="string" length="200" not-null="true" /> - <property name="modelInvariantUUID" column="MODEL_INVARIANT_UUID" type="string" length="20"/> + <property name="modelInvariantUUID" column="MODEL_INVARIANT_UUID" type="string" length="200"/> <property name="modelVersion" column="MODEL_VERSION" type="string" length="20"/> <property name="toscaNodeType" column="TOSCA_NODE_TYPE" type="string" length="200"/> <property name="neutronNetworkType" column="NEUTRON_NETWORK_TYPE" type="string" length="20"/> @@ -50,4 +50,4 @@ </class> -</hibernate-mapping>
\ No newline at end of file +</hibernate-mapping> |