From ba18c19740050c9ac7e2b0e1ba457a83160e9003 Mon Sep 17 00:00:00 2001 From: Srinivasan Ramanathan Date: Tue, 10 Mar 2020 20:27:10 +0000 Subject: 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 --- .../scripts/CreateSDNCNetworkResource.groovy | 33 +++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'bpmn/so-bpmn-infrastructure-common/src/main') 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 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>> 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 = """ + + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(sdnc_svcAction)} + optical-service-create + sdncCallback + opticalservice + + + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(globalCustomerId)} + ${msoUtils.xmlEscape(serviceType)} + sdncCallback + ${msoUtils.xmlEscape(source)} + ${msoUtils.xmlEscape(serviceInstanceId)} + + $netowrkInputParameters + + + """.trim() + } else{ sdncTopologyCreateRequest = """ @@ -399,6 +429,7 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor { """.trim() + } break case "GROUP" : String vnfid = resourceInputObj.getVnfId() -- cgit 1.2.3-korg