summaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-infrastructure-common
diff options
context:
space:
mode:
authorSrinivasan Ramanathan <srinivasan.ramanathan2@us.fujitsu.com>2020-03-10 20:27:10 +0000
committerSrinivasan Ramanathan <srinivasan.ramanathan2@us.fujitsu.com>2020-03-12 07:10:14 +0000
commitba18c19740050c9ac7e2b0e1ba457a83160e9003 (patch)
tree39e71b05cb644f5da53f84226f76998b5bdaf211 /bpmn/so-bpmn-infrastructure-common
parenta34a2feaaaa9cf4151e124679d6f8f7c2704cc8c (diff)
Changes for MDONS usecase
Template handling and SDNC request sending for Optical services. Change-Id: I52838076ea119237758dfdc804f2ee1f55f3c33c Issue-ID: SO-2460 Signed-off-by: Srinivasan Ramanathan <srinivasan.ramanathan2@us.fujitsu.com>
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-common')
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy33
1 files changed, 32 insertions, 1 deletions
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
index 3da4161953..8b9726c2b7 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
@@ -127,7 +127,11 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
String key = iterator.next()
HashMap<String, String> hashMap = new HashMap()
hashMap.put("name", key)
- hashMap.put("value", jsonObject.get(key))
+ if(jsonObject.get(key)==null){
+ hashMap.put("value", "")
+ }else{
+ hashMap.put("value", jsonObject.get(key))
+ }
paramList.add(hashMap)
}
Map<String, List<Map<String, Object>>> paramMap = new HashMap()
@@ -345,6 +349,32 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
switch (modelType) {
case "VNF" :
+ if(modelName.contains("UNI") && "MDONS_OTN".equals(serviceType)){
+ source = "SO"
+ sdncTopologyCreateRequest = """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${msoUtils.xmlEscape(hdrRequestId)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${msoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${msoUtils.xmlEscape(sdnc_svcAction)}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>optical-service-create</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>opticalservice</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-id>${msoUtils.xmlEscape(hdrRequestId)}</request-id>
+ <global-customer-id>${msoUtils.xmlEscape(globalCustomerId)}</global-customer-id>
+ <service-type>${msoUtils.xmlEscape(serviceType)}</service-type>
+ <notification-url>sdncCallback</notification-url>
+ <source>${msoUtils.xmlEscape(source)}</source>
+ <service-id>${msoUtils.xmlEscape(serviceInstanceId)}</service-id>
+ <payload>
+ $netowrkInputParameters
+ </payload>
+ </sdncadapterworkflow:SDNCRequestData>
+ </aetgt:SDNCAdapterWorkflowRequest>""".trim()
+ } else{
sdncTopologyCreateRequest = """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
@@ -399,6 +429,7 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
</vnf-request-input>
</sdncadapterworkflow:SDNCRequestData>
</aetgt:SDNCAdapterWorkflowRequest>""".trim()
+ }
break
case "GROUP" :
String vnfid = resourceInputObj.getVnfId()