Merge "Changed license to CC-BY 4.0"
authorSeshu Kumar M <seshu.kumar.m@huawei.com>
Wed, 25 Oct 2017 05:01:28 +0000 (05:01 +0000)
committerGerrit Code Review <gerrit@onap.org>
Wed, 25 Oct 2017 05:01:28 +0000 (05:01 +0000)
bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy
bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/request.json
bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSIName.json
bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSINameNoRollback.json
bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/DeleteVcpeResCustService/request.json
mso-catalog-db/src/main/resources/HeatFiles.hbm.xml
mso-catalog-db/src/main/resources/NetworkResource.hbm.xml

index 87cf6fb..fc6293c 100644 (file)
@@ -156,29 +156,33 @@ public class CreateVcpeResCustService extends AbstractServiceTaskProcessor {
                        execution.setVariable("subscriberInfo", subscriberInfo)\r
                        utils.log("DEBUG", "Incoming subscriberInfo is: " + subscriberInfo, isDebugEnabled)\r
 \r
-                 /*
-                 * Extracting User Parameters from incoming Request and converting into a Map
-                 */
-                 def jsonSlurper = new JsonSlurper()
-                 def jsonOutput = new JsonOutput()
+                 /*\r
+                 * Extracting User Parameters from incoming Request and converting into a Map\r
+                 */\r
+                 def jsonSlurper = new JsonSlurper()\r
+                 def jsonOutput = new JsonOutput()\r
+\r
+                 Map reqMap = jsonSlurper.parseText(createVcpeServiceRequest)\r
+\r  
+                 //InputParams\r
+                 def userParams = reqMap.requestDetails?.requestParameters?.userParams\r
   
-                 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)\r
-                         }
-                 }
-
-                 utils.log("DEBUG", "User Input Parameters map: " + userParams.toString(), isDebugEnabled)
-                 execution.setVariable("serviceInputParams", inputMap)
-
+                 Map<String, String> inputMap = [:]\r
+\r
+\r
+                 if (userParams) {\r
+                               userParams.each {\r
+                                                               userParam ->\r
+                                                               if("BRG_WAN_MAC_Address".equals(userParam?.name)) {\r
+                                                                                               execution.setVariable("brgWanMacAddress", userParam.value)\r
+                                                                                               inputMap.put("BRG_WAN_MAC_Address", userParam.value)\r
+                                       }\r
+                               }\r
+                 }\r
+\r
+                 utils.log("DEBUG", "User Input Parameters map: " + userParams.toString(), isDebugEnabled)\r
+                 execution.setVariable("serviceInputParams", inputMap)\r
+\r
                        utils.log("DEBUG", "Incoming brgWanMacAddress is: " + execution.getVariable('brgWanMacAddress'), isDebugEnabled)\r
 \r
                        //For Completion Handler & Fallout Handler\r
index dc4669e..a0168bd 100644 (file)
                                        "subscriptionServiceType":"123456789",
                                        "aLaCarte":"false",
                                        "userParams":
-                                               {
-                                                       "BRG_WAN_MAC_Address" : "brgmac"
-                                               }
+                                          [
+                                               {
+                                                       "name":"BRG_WAN_MAC_Address",
+                                                       "value":"brgmac"
+                                               }
+                                          ]
                                }
                                
                }
index dc9ac49..17c6d15 100644 (file)
                                {
                                        "subscriptionServiceType":"123456789",
                                        "aLaCarte":"false",
-                                       "userParams":
-                                               {
-                                                       "BRG_WAN_MAC_Address" : "brgmac"
-                                               }
+                    "userParams":
+                       [
+                            {
+                                "name":"BRG_WAN_MAC_Address",
+                                "value":"brgmac"
+                            }
+                       ]
                                }
                                
                }
index d5b0713..8583e66 100644 (file)
                                {
                                        "subscriptionServiceType":"123456789",
                                        "aLaCarte":"false",
-                                       "userParams":
-                                               {
-                                                       "BRG_WAN_MAC_Address" : "brgmac"
-                                               }
+                    "userParams":
+                       [
+                            {
+                                "name":"BRG_WAN_MAC_Address",
+                                "value":"brgmac"
+                            }
+                       ]
                                }
                                
                }
index dc4669e..99941c9 100644 (file)
                                {
                                        "subscriptionServiceType":"123456789",
                                        "aLaCarte":"false",
-                                       "userParams":
-                                               {
-                                                       "BRG_WAN_MAC_Address" : "brgmac"
-                                               }
+                    "userParams":
+                       [
+                            {
+                                "name":"BRG_WAN_MAC_Address",
+                                "value":"brgmac"
+                            }
+                       ]
                                }
                                
                }
index 4674239..5a2c4aa 100644 (file)
@@ -36,7 +36,7 @@
         <property name="version" type="java.lang.String" length="20" not-null="true">\r
             <column name="VERSION" />\r
         </property>\r
-        <property name="fileBody" type="java.lang.String" not-null="true">\r
+        <property name="fileBody" type="text" not-null="true">\r
             <column name="BODY" />\r
         </property>\r
         <property name="created" type="java.sql.Timestamp" generated="insert" update="false" insert="false" not-null="true">\r
index 7f4698e..1599cf5 100644 (file)
@@ -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>