From 77a9a58512b54a9214b90dd1b00473c356036419 Mon Sep 17 00:00:00 2001 From: subhash kumar singh Date: Tue, 13 Nov 2018 14:47:30 +0530 Subject: Replace xmlencode with xmlEscape Replace xmlencode with xmlEscape. Change-Id: Ib84e7e4f10881abbc938ee03b66ed3358f06e2dc Issue-ID: SO-689 Signed-off-by: subhash kumar singh (cherry picked from commit d080aa2ebd5c8b98e0210185030b90ed5a4a6edd) --- .../scripts/ActivateSDNCNetworkResource.groovy | 139 +++++++++---------- .../scripts/CreateSDNCNetworkResource.groovy | 147 +++++++++++---------- .../scripts/DeActivateSDNCNetworkResource.groovy | 133 ++++++++++--------- .../scripts/DeleteSDNCNetworkResource.groovy | 147 +++++++++++---------- 4 files changed, 289 insertions(+), 277 deletions(-) (limited to 'bpmn/so-bpmn-infrastructure-common') diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy index f640aa74f7..ba5cba893b 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy @@ -29,6 +29,7 @@ import org.onap.so.bpmn.common.recipe.ResourceInput import org.onap.so.bpmn.common.resource.ResourceRequestBuilder import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor import org.onap.so.bpmn.common.scripts.ExceptionUtil +import org.onap.so.bpmn.common.scripts.MsoUtils import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils import org.onap.so.bpmn.core.json.JsonUtils import org.onap.so.logger.MsoLogger @@ -47,6 +48,8 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor { JsonUtils jsonUtil = new JsonUtils() SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils() + + MsoUtils msoUtils = new MsoUtils() public void preProcessRequest(DelegateExecution execution) { def isDebugEnabled = execution.getVariable("isDebugLogEnabled") @@ -147,13 +150,13 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor { - ${msoUtils.xmlEncode(operType)} - ${msoUtils.xmlEncode(operationId)} - ${msoUtils.xmlEncode(progress)} - ${msoUtils.xmlEncode(resourceCustomizationUuid)} - ${msoUtils.xmlEncode(ServiceInstanceId)} - ${msoUtils.xmlEncode(status)} - ${msoUtils.xmlEncode(statusDescription)} + ${msoUtils.xmlEscape(operType)} + ${msoUtils.xmlEscape(operationId)} + ${msoUtils.xmlEscape(progress)} + ${msoUtils.xmlEscape(resourceCustomizationUuid)} + ${msoUtils.xmlEscape(ServiceInstanceId)} + ${msoUtils.xmlEscape(status)} + ${msoUtils.xmlEscape(statusDescription)} """; @@ -227,44 +230,44 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor { xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1" xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"> - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(sdnc_svcAction)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(sdnc_svcAction)} vnf-topology-operation sdncCallback generic-resource - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(sdnc_requestAction)} - ${msoUtils.xmlEncode(source)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(sdnc_requestAction)} + ${msoUtils.xmlEscape(source)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(serviceType)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(serviceType)} - ${msoUtils.xmlEncode(serviceModelInvariantUuid)} - ${msoUtils.xmlEncode(serviceModelUuid)} - ${msoUtils.xmlEncode(serviceModelVersion)} - ${msoUtils.xmlEncode(serviceModelName)} + ${msoUtils.xmlEscape(serviceModelInvariantUuid)} + ${msoUtils.xmlEscape(serviceModelUuid)} + ${msoUtils.xmlEscape(serviceModelVersion)} + ${msoUtils.xmlEscape(serviceModelName)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(globalCustomerId)} - ${msoUtils.xmlEncode(globalCustomerId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(globalCustomerId)} + ${msoUtils.xmlEscape(globalCustomerId)} - ${msoUtils.xmlEncode(networkInstanceId)} + ${msoUtils.xmlEscape(networkInstanceId)} - ${msoUtils.xmlEncode(modelInvariantUuid)} - ${msoUtils.xmlEncode(modelCustomizationUuid)} - ${msoUtils.xmlEncode(modelUuid)} - ${msoUtils.xmlEncode(modelVersion)} - ${msoUtils.xmlEncode(modelName)} + ${msoUtils.xmlEscape(modelInvariantUuid)} + ${msoUtils.xmlEscape(modelCustomizationUuid)} + ${msoUtils.xmlEscape(modelUuid)} + ${msoUtils.xmlEscape(modelVersion)} + ${msoUtils.xmlEscape(modelName)} @@ -287,45 +290,45 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor { xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1" xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"> - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(sdnc_svcAction)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(sdnc_svcAction)} connection-attachment-topology-operation sdncCallback generic-resource - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(sdnc_requestAction)} - ${msoUtils.xmlEncode(source)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(sdnc_requestAction)} + ${msoUtils.xmlEscape(source)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(serviceType)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(serviceType)} - ${msoUtils.xmlEncode(serviceModelInvariantUuid)} - ${msoUtils.xmlEncode(serviceModelUuid)} - ${msoUtils.xmlEncode(serviceModelVersion)} - ${msoUtils.xmlEncode(serviceModelName)} + ${msoUtils.xmlEscape(serviceModelInvariantUuid)} + ${msoUtils.xmlEscape(serviceModelUuid)} + ${msoUtils.xmlEscape(serviceModelVersion)} + ${msoUtils.xmlEscape(serviceModelName)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(globalCustomerId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(globalCustomerId)} - ${msoUtils.xmlEncode(networkInstanceId)} + ${msoUtils.xmlEscape(networkInstanceId)} $parentServiceInstanceId - ${msoUtils.xmlEncode(modelInvariantUuid)} - ${msoUtils.xmlEncode(modelCustomizationUuid)} - ${msoUtils.xmlEncode(modelUuid)} - ${msoUtils.xmlEncode(modelVersion)} - ${msoUtils.xmlEncode(modelName)} + ${msoUtils.xmlEscape(modelInvariantUuid)} + ${msoUtils.xmlEscape(modelCustomizationUuid)} + ${msoUtils.xmlEscape(modelUuid)} + ${msoUtils.xmlEscape(modelVersion)} + ${msoUtils.xmlEscape(modelName)} @@ -342,43 +345,43 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor { xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1" xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"> - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(sdnc_svcAction)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(sdnc_svcAction)} network-topology-operation sdncCallback generic-resource - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(sdnc_requestAction)} - ${msoUtils.xmlEncode(source)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(sdnc_requestAction)} + ${msoUtils.xmlEscape(source)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(serviceType)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(serviceType)} - ${msoUtils.xmlEncode(serviceModelInvariantUuid)} - ${msoUtils.xmlEncode(serviceModelUuid)} - ${msoUtils.xmlEncode(serviceModelVersion)} - ${msoUtils.xmlEncode(serviceModelName)} + ${msoUtils.xmlEscape(serviceModelInvariantUuid)} + ${msoUtils.xmlEscape(serviceModelUuid)} + ${msoUtils.xmlEscape(serviceModelVersion)} + ${msoUtils.xmlEscape(serviceModelName)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(globalCustomerId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(globalCustomerId)} - ${msoUtils.xmlEncode(networkInstanceId)} + ${msoUtils.xmlEscape(networkInstanceId)} - ${msoUtils.xmlEncode(modelInvariantUuid)} - ${msoUtils.xmlEncode(modelCustomizationUuid)} - ${msoUtils.xmlEncode(modelUuid)} - ${msoUtils.xmlEncode(modelVersion)} - ${msoUtils.xmlEncode(modelName)} + ${msoUtils.xmlEscape(modelInvariantUuid)} + ${msoUtils.xmlEscape(modelCustomizationUuid)} + ${msoUtils.xmlEscape(modelUuid)} + ${msoUtils.xmlEscape(modelVersion)} + ${msoUtils.xmlEscape(modelName)} 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 47b3cc351f..1509119683 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 @@ -30,6 +30,7 @@ import org.onap.so.bpmn.common.resource.ResourceRequestBuilder import org.onap.so.bpmn.common.scripts.AaiUtil import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor import org.onap.so.bpmn.common.scripts.ExceptionUtil +import org.onap.so.bpmn.common.scripts.MsoUtils import org.onap.so.bpmn.core.json.JsonUtils import org.onap.so.logger.MsoLogger import org.onap.so.rest.APIResponse @@ -49,6 +50,8 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor { JsonUtils jsonUtil = new JsonUtils() + MsoUtils msoUtils = new MsoUtils() + public void preProcessRequest(DelegateExecution execution){ msoLogger.info(" ***** Started preProcessRequest *****") @@ -277,44 +280,44 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor { xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1" xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"> - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(sdnc_svcAction)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(sdnc_svcAction)} vnf-topology-operation sdncCallback generic-resource - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(sdnc_requestAction)} - ${msoUtils.xmlEncode(source)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(sdnc_requestAction)} + ${msoUtils.xmlEscape(source)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(serviceType)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(serviceType)} - ${msoUtils.xmlEncode(serviceModelInvariantUuid)} - ${msoUtils.xmlEncode(serviceModelUuid)} - ${msoUtils.xmlEncode(serviceModelVersion)} - ${msoUtils.xmlEncode(serviceModelName)} + ${msoUtils.xmlEscape(serviceModelInvariantUuid)} + ${msoUtils.xmlEscape(serviceModelUuid)} + ${msoUtils.xmlEscape(serviceModelVersion)} + ${msoUtils.xmlEscape(serviceModelName)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(globalCustomerId)} - ${msoUtils.xmlEncode(globalCustomerId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(globalCustomerId)} + ${msoUtils.xmlEscape(globalCustomerId)} - ${msoUtils.xmlEncode(modelInvariantUuid)} - ${msoUtils.xmlEncode(modelCustomizationUuid)} - ${msoUtils.xmlEncode(modelUuid)} - ${msoUtils.xmlEncode(modelVersion)} - ${msoUtils.xmlEncode(modelName)} + ${msoUtils.xmlEscape(modelInvariantUuid)} + ${msoUtils.xmlEscape(modelCustomizationUuid)} + ${msoUtils.xmlEscape(modelUuid)} + ${msoUtils.xmlEscape(modelVersion)} + ${msoUtils.xmlEscape(modelName)} @@ -336,34 +339,34 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor { xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1" xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"> - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(sdnc_svcAction)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(sdnc_svcAction)} connection-attachment-topology-operation sdncCallback generic-resource - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(sdnc_requestAction)} - ${msoUtils.xmlEncode(source)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(sdnc_requestAction)} + ${msoUtils.xmlEscape(source)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(serviceType)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(serviceType)} - ${msoUtils.xmlEncode(serviceModelInvariantUuid)} - ${msoUtils.xmlEncode(serviceModelUuid)} - ${msoUtils.xmlEncode(serviceModelVersion)} - ${msoUtils.xmlEncode(serviceModelName)} + ${msoUtils.xmlEscape(serviceModelInvariantUuid)} + ${msoUtils.xmlEscape(serviceModelUuid)} + ${msoUtils.xmlEscape(serviceModelVersion)} + ${msoUtils.xmlEscape(serviceModelName)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(globalCustomerId)} - ${msoUtils.xmlEncode(globalCustomerId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(globalCustomerId)} + ${msoUtils.xmlEscape(globalCustomerId)} @@ -371,11 +374,11 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor { $parentServiceInstanceId - ${msoUtils.xmlEncode(modelInvariantUuid)} - ${msoUtils.xmlEncode(modelCustomizationUuid)} - ${msoUtils.xmlEncode(modelUuid)} - ${msoUtils.xmlEncode(modelVersion)} - ${msoUtils.xmlEncode(modelName)} + ${msoUtils.xmlEscape(modelInvariantUuid)} + ${msoUtils.xmlEscape(modelCustomizationUuid)} + ${msoUtils.xmlEscape(modelUuid)} + ${msoUtils.xmlEscape(modelVersion)} + ${msoUtils.xmlEscape(modelName)} @@ -392,40 +395,40 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor { xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"> ${hdrRequestId} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(sdnc_svcAction)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(sdnc_svcAction)} network-topology-operation sdncCallback generic-resource - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(sdnc_requestAction)} - ${msoUtils.xmlEncode(source)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(sdnc_requestAction)} + ${msoUtils.xmlEscape(source)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(serviceType)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(serviceType)} - ${msoUtils.xmlEncode(serviceModelInvariantUuid)} - ${msoUtils.xmlEncode(serviceModelUuid)} - ${msoUtils.xmlEncode(serviceModelVersion)} - ${msoUtils.xmlEncode(serviceModelName)} + ${msoUtils.xmlEscape(serviceModelInvariantUuid)} + ${msoUtils.xmlEscape(serviceModelUuid)} + ${msoUtils.xmlEscape(serviceModelVersion)} + ${msoUtils.xmlEscape(serviceModelName)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(globalCustomerId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(globalCustomerId)} - ${msoUtils.xmlEncode(modelInvariantUuid)} - ${msoUtils.xmlEncode(modelCustomizationUuid)} - ${msoUtils.xmlEncode(modelUuid)} - ${msoUtils.xmlEncode(modelVersion)} - ${msoUtils.xmlEncode(modelName)} + ${msoUtils.xmlEscape(modelInvariantUuid)} + ${msoUtils.xmlEscape(modelCustomizationUuid)} + ${msoUtils.xmlEscape(modelUuid)} + ${msoUtils.xmlEscape(modelVersion)} + ${msoUtils.xmlEscape(modelName)} @@ -473,13 +476,13 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor { - ${msoUtils.xmlEncode(operType)} - ${msoUtils.xmlEncode(operationId)} - ${msoUtils.xmlEncode(progress)} - ${msoUtils.xmlEncode(resourceCustomizationUuid)} - ${msoUtils.xmlEncode(ServiceInstanceId)} - ${msoUtils.xmlEncode(status)} - ${msoUtils.xmlEncode(statusDescription)} + ${msoUtils.xmlEscape(operType)} + ${msoUtils.xmlEscape(operationId)} + ${msoUtils.xmlEscape(progress)} + ${msoUtils.xmlEscape(resourceCustomizationUuid)} + ${msoUtils.xmlEscape(ServiceInstanceId)} + ${msoUtils.xmlEscape(status)} + ${msoUtils.xmlEscape(statusDescription)} """; @@ -506,13 +509,13 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor { - ${msoUtils.xmlEncode(operType)} - ${msoUtils.xmlEncode(operationId)} - ${msoUtils.xmlEncode(progress)} - ${msoUtils.xmlEncode(resourceCustomizationUuid)} - ${msoUtils.xmlEncode(ServiceInstanceId)} - ${msoUtils.xmlEncode(status)} - ${msoUtils.xmlEncode(statusDescription)} + ${msoUtils.xmlEscape(operType)} + ${msoUtils.xmlEscape(operationId)} + ${msoUtils.xmlEscape(progress)} + ${msoUtils.xmlEscape(resourceCustomizationUuid)} + ${msoUtils.xmlEscape(ServiceInstanceId)} + ${msoUtils.xmlEscape(status)} + ${msoUtils.xmlEscape(statusDescription)} """; diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy index f13141751b..a5e0e3f080 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy @@ -27,6 +27,7 @@ import org.onap.so.bpmn.common.recipe.ResourceInput import org.onap.so.bpmn.common.resource.ResourceRequestBuilder import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor import org.onap.so.bpmn.common.scripts.ExceptionUtil +import org.onap.so.bpmn.common.scripts.MsoUtils import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils import org.onap.so.bpmn.core.json.JsonUtils import org.onap.so.logger.MsoLogger @@ -44,6 +45,8 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor JsonUtils jsonUtil = new JsonUtils() SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils() + + MsoUtils msoUtils = new MsoUtils() public void preProcessRequest(DelegateExecution execution) { @@ -165,44 +168,44 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1" xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"> - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(sdnc_svcAction)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(sdnc_svcAction)} vnf-topology-operation sdncCallback generic-resource - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(sdnc_requestAction)} - ${msoUtils.xmlEncode(source)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(sdnc_requestAction)} + ${msoUtils.xmlEscape(source)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(serviceType)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(serviceType)} - ${msoUtils.xmlEncode(serviceModelInvariantUuid)} - ${msoUtils.xmlEncode(serviceModelUuid)} - ${msoUtils.xmlEncode(serviceModelVersion)} - ${msoUtils.xmlEncode(serviceModelName)} + ${msoUtils.xmlEscape(serviceModelInvariantUuid)} + ${msoUtils.xmlEscape(serviceModelUuid)} + ${msoUtils.xmlEscape(serviceModelVersion)} + ${msoUtils.xmlEscape(serviceModelName)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(globalCustomerId)} - ${msoUtils.xmlEncode(globalCustomerId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(globalCustomerId)} + ${msoUtils.xmlEscape(globalCustomerId)} $resourceInstnaceId - ${msoUtils.xmlEncode(modelInvariantUuid)} - ${msoUtils.xmlEncode(modelCustomizationUuid)} - ${msoUtils.xmlEncode(modelUuid)} - ${msoUtils.xmlEncode(modelVersion)} - ${msoUtils.xmlEncode(modelName)} + ${msoUtils.xmlEscape(modelInvariantUuid)} + ${msoUtils.xmlEscape(modelCustomizationUuid)} + ${msoUtils.xmlEscape(modelUuid)} + ${msoUtils.xmlEscape(modelVersion)} + ${msoUtils.xmlEscape(modelName)} @@ -223,33 +226,33 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1" xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"> - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(sdnc_svcAction)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(sdnc_svcAction)} connection-attachment-topology-operation sdncCallback generic-resource - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(sdnc_requestAction)} - ${msoUtils.xmlEncode(source)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(sdnc_requestAction)} + ${msoUtils.xmlEscape(source)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(serviceType)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(serviceType)} - ${msoUtils.xmlEncode(serviceModelInvariantUuid)} - ${msoUtils.xmlEncode(serviceModelUuid)} - ${msoUtils.xmlEncode(serviceModelVersion)} - ${msoUtils.xmlEncode(serviceModelName)} + ${msoUtils.xmlEscape(serviceModelInvariantUuid)} + ${msoUtils.xmlEscape(serviceModelUuid)} + ${msoUtils.xmlEscape(serviceModelVersion)} + ${msoUtils.xmlEscape(serviceModelName)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(globalCustomerId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(globalCustomerId)} @@ -257,11 +260,11 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor - ${msoUtils.xmlEncode(modelInvariantUuid)} - ${msoUtils.xmlEncode(modelCustomizationUuid)} - ${msoUtils.xmlEncode(modelUuid)} - ${msoUtils.xmlEncode(modelVersion)} - ${msoUtils.xmlEncode(modelName)} + ${msoUtils.xmlEscape(modelInvariantUuid)} + ${msoUtils.xmlEscape(modelCustomizationUuid)} + ${msoUtils.xmlEscape(modelUuid)} + ${msoUtils.xmlEscape(modelVersion)} + ${msoUtils.xmlEscape(modelName)} @@ -275,42 +278,42 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1" xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"> - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(sdnc_svcAction)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(sdnc_svcAction)} network-topology-operation sdncCallback generic-resource - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(sdnc_requestAction)} - ${msoUtils.xmlEncode(source)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(sdnc_requestAction)} + ${msoUtils.xmlEscape(source)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(serviceType)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(serviceType)} - ${msoUtils.xmlEncode(serviceModelInvariantUuid)} - ${msoUtils.xmlEncode(serviceModelUuid)} - ${msoUtils.xmlEncode(serviceModelVersion)} - ${msoUtils.xmlEncode(serviceModelName)} + ${msoUtils.xmlEscape(serviceModelInvariantUuid)} + ${msoUtils.xmlEscape(serviceModelUuid)} + ${msoUtils.xmlEscape(serviceModelVersion)} + ${msoUtils.xmlEscape(serviceModelName)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(globalCustomerId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(globalCustomerId)} $resourceInstnaceId - ${msoUtils.xmlEncode(modelInvariantUuid)} - ${msoUtils.xmlEncode(modelCustomizationUuid)} - ${msoUtils.xmlEncode(modelUuid)} - ${msoUtils.xmlEncode(modelVersion)} - ${msoUtils.xmlEncode(modelName)} + ${msoUtils.xmlEscape(modelInvariantUuid)} + ${msoUtils.xmlEscape(modelCustomizationUuid)} + ${msoUtils.xmlEscape(modelUuid)} + ${msoUtils.xmlEscape(modelVersion)} + ${msoUtils.xmlEscape(modelName)} @@ -352,13 +355,13 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor - ${msoUtils.xmlEncode(operType)} - ${msoUtils.xmlEncode(operationId)} - ${msoUtils.xmlEncode(progress)} - ${msoUtils.xmlEncode(resourceCustomizationUuid)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(status)} - ${msoUtils.xmlEncode(statusDescription)} + ${msoUtils.xmlEscape(operType)} + ${msoUtils.xmlEscape(operationId)} + ${msoUtils.xmlEscape(progress)} + ${msoUtils.xmlEscape(resourceCustomizationUuid)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(status)} + ${msoUtils.xmlEscape(statusDescription)} """; diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy index 3519bd7484..be348095fd 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy @@ -27,6 +27,7 @@ import org.onap.so.bpmn.common.recipe.ResourceInput import org.onap.so.bpmn.common.resource.ResourceRequestBuilder import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor import org.onap.so.bpmn.common.scripts.ExceptionUtil +import org.onap.so.bpmn.common.scripts.MsoUtils import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils import org.onap.so.bpmn.core.json.JsonUtils import org.onap.so.logger.MsoLogger @@ -47,6 +48,8 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor { JsonUtils jsonUtil = new JsonUtils() SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils() + + MsoUtils msoUtils = new MsoUtils() public void preProcessRequest(DelegateExecution execution){ msoLogger.info(" ***** Started preProcessRequest *****") @@ -191,44 +194,44 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor { xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1" xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"> - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(sdnc_svcAction)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(sdnc_svcAction)} vnf-topology-operation sdncCallback generic-resource - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(sdnc_requestAction)} - ${msoUtils.xmlEncode(source)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(sdnc_requestAction)} + ${msoUtils.xmlEscape(source)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(serviceType)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(serviceType)} - ${msoUtils.xmlEncode(serviceModelInvariantUuid)} - ${msoUtils.xmlEncode(serviceModelUuid)} - ${msoUtils.xmlEncode(serviceModelVersion)} - ${msoUtils.xmlEncode(serviceModelName)} + ${msoUtils.xmlEscape(serviceModelInvariantUuid)} + ${msoUtils.xmlEscape(serviceModelUuid)} + ${msoUtils.xmlEscape(serviceModelVersion)} + ${msoUtils.xmlEscape(serviceModelName)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(globalCustomerId)} - ${msoUtils.xmlEncode(globalCustomerId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(globalCustomerId)} + ${msoUtils.xmlEscape(globalCustomerId)} $resourceInstnaceId - ${msoUtils.xmlEncode(modelInvariantUuid)} - ${msoUtils.xmlEncode(modelCustomizationUuid)} - ${msoUtils.xmlEncode(modelUuid)} - ${msoUtils.xmlEncode(modelVersion)} - ${msoUtils.xmlEncode(modelName)} + ${msoUtils.xmlEscape(modelInvariantUuid)} + ${msoUtils.xmlEscape(modelCustomizationUuid)} + ${msoUtils.xmlEscape(modelUuid)} + ${msoUtils.xmlEscape(modelVersion)} + ${msoUtils.xmlEscape(modelName)} @@ -249,33 +252,33 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor { xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1" xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"> - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(sdnc_svcAction)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(sdnc_svcAction)} connection-attachment-topology-operation sdncCallback generic-resource - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(sdnc_requestAction)} - ${msoUtils.xmlEncode(source)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(sdnc_requestAction)} + ${msoUtils.xmlEscape(source)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(serviceType)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(serviceType)} - ${msoUtils.xmlEncode(serviceModelInvariantUuid)} - ${msoUtils.xmlEncode(serviceModelUuid)} - ${msoUtils.xmlEncode(serviceModelVersion)} - ${msoUtils.xmlEncode(serviceModelName)} + ${msoUtils.xmlEscape(serviceModelInvariantUuid)} + ${msoUtils.xmlEscape(serviceModelUuid)} + ${msoUtils.xmlEscape(serviceModelVersion)} + ${msoUtils.xmlEscape(serviceModelName)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(globalCustomerId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(globalCustomerId)} @@ -283,11 +286,11 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor { - ${msoUtils.xmlEncode(modelInvariantUuid)} - ${msoUtils.xmlEncode(modelCustomizationUuid)} - ${msoUtils.xmlEncode(modelUuid)} - ${msoUtils.xmlEncode(modelVersion)} - ${msoUtils.xmlEncode(modelName)} + ${msoUtils.xmlEscape(modelInvariantUuid)} + ${msoUtils.xmlEscape(modelCustomizationUuid)} + ${msoUtils.xmlEscape(modelUuid)} + ${msoUtils.xmlEscape(modelVersion)} + ${msoUtils.xmlEscape(modelName)} @@ -301,42 +304,42 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor { xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1" xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"> - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(sdnc_svcAction)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(sdnc_svcAction)} network-topology-operation sdncCallback generic-resource - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(sdnc_requestAction)} - ${msoUtils.xmlEncode(source)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(sdnc_requestAction)} + ${msoUtils.xmlEscape(source)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(serviceType)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(serviceType)} - ${msoUtils.xmlEncode(serviceModelInvariantUuid)} - ${msoUtils.xmlEncode(serviceModelUuid)} - ${msoUtils.xmlEncode(serviceModelVersion)} - ${msoUtils.xmlEncode(serviceModelName)} + ${msoUtils.xmlEscape(serviceModelInvariantUuid)} + ${msoUtils.xmlEscape(serviceModelUuid)} + ${msoUtils.xmlEscape(serviceModelVersion)} + ${msoUtils.xmlEscape(serviceModelName)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(globalCustomerId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(globalCustomerId)} $resourceInstnaceId - ${msoUtils.xmlEncode(modelInvariantUuid)} - ${msoUtils.xmlEncode(modelCustomizationUuid)} - ${msoUtils.xmlEncode(modelUuid)} - ${msoUtils.xmlEncode(modelVersion)} - ${msoUtils.xmlEncode(modelName)} + ${msoUtils.xmlEscape(modelInvariantUuid)} + ${msoUtils.xmlEscape(modelCustomizationUuid)} + ${msoUtils.xmlEscape(modelUuid)} + ${msoUtils.xmlEscape(modelVersion)} + ${msoUtils.xmlEscape(modelName)} @@ -384,13 +387,13 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor { - ${msoUtils.xmlEncode(operType)} - ${msoUtils.xmlEncode(operationId)} - ${msoUtils.xmlEncode(progress)} - ${msoUtils.xmlEncode(resourceCustomizationUuid)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(status)} - ${msoUtils.xmlEncode(statusDescription)} + ${msoUtils.xmlEscape(operType)} + ${msoUtils.xmlEscape(operationId)} + ${msoUtils.xmlEscape(progress)} + ${msoUtils.xmlEscape(resourceCustomizationUuid)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(status)} + ${msoUtils.xmlEscape(statusDescription)} """; @@ -417,13 +420,13 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor { - ${msoUtils.xmlEncode(operType)} - ${msoUtils.xmlEncode(operationId)} - ${msoUtils.xmlEncode(progress)} - ${msoUtils.xmlEncode(resourceCustomizationUuid)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(status)} - ${msoUtils.xmlEncode(statusDescription)} + ${msoUtils.xmlEscape(operType)} + ${msoUtils.xmlEscape(operationId)} + ${msoUtils.xmlEscape(progress)} + ${msoUtils.xmlEscape(resourceCustomizationUuid)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(status)} + ${msoUtils.xmlEscape(statusDescription)} """; -- cgit 1.2.3-korg