aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-infrastructure-common
diff options
context:
space:
mode:
authorYulian Han <elaine.hanyulian@huawei.com>2018-11-09 15:06:37 +0800
committerYulian Han <elaine.hanyulian@huawei.com>2018-11-09 15:06:37 +0800
commit047436d7967e91434b7ea19e060e8409baa876a6 (patch)
treed225e563ff50c5b7376bb0e6e1878726d2de4ff4 /bpmn/so-bpmn-infrastructure-common
parenteec3403e1439f536a2aaf89474a6d4b1ca08df29 (diff)
modify getting openecomp.db.endpoint config codes
Change-Id: Idaa55084f5ecb0dd3636c232cebc14fa5f064405 Issue-ID: SO-791 Signed-off-by: Yulian Han <elaine.hanyulian@huawei.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/ActivateSDNCNetworkResource.groovy3
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy45
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateDeviceResource.groovy133
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy3
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy6
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Delete3rdONAPE2EServiceInstance.groovy74
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy3
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteDeviceResource.groovy83
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy3
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2.groovy3
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy3
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ScaleCustomE2EServiceInstance.groovy3
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy3
13 files changed, 225 insertions, 140 deletions
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..30e6c452e0 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
@@ -31,6 +31,7 @@ import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
import org.onap.so.bpmn.common.scripts.ExceptionUtil
import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.bpmn.core.UrnPropertiesReader
import org.onap.so.logger.MsoLogger
/**
@@ -162,7 +163,7 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
}
private void setProgressUpdateVariables(DelegateExecution execution, String body) {
- def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint")
+ def dbAdapterEndpoint = UrnPropertiesReader.getVariable("mso.adapters.openecomp.db.endpoint", execution)
execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
execution.setVariable("CVFMI_updateResOperStatusRequest", body)
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy
index a0f0e279f6..afd67c37f5 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy
@@ -29,13 +29,13 @@ import groovy.xml.XmlUtil
import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
import org.onap.so.bpmn.common.scripts.ExceptionUtil
import org.onap.so.bpmn.common.scripts.ExternalAPIUtil
-import org.onap.so.bpmn.common.scripts.AaiUtil
import org.onap.so.bpmn.common.scripts.MsoUtils
import org.onap.aai.domain.yang.SpPartner
import org.onap.so.bpmn.common.recipe.ResourceInput
import org.onap.so.bpmn.common.resource.ResourceRequestBuilder
import org.onap.so.bpmn.core.WorkflowException
import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.bpmn.core.UrnPropertiesReader
import org.onap.so.bpmn.infrastructure.workflow.serviceTask.client.builder.AbstractBuilder
import org.onap.so.client.aai.AAIObjectType
import org.onap.so.client.aai.AAIResourcesClient
@@ -53,7 +53,7 @@ import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution
import org.apache.commons.lang3.*
import org.apache.commons.codec.binary.Base64
-import org.springframework.web.util.UriUtils
+
/**
* This groovy class supports the <class>Create3rdONAPE2EServiceInstance.bpmn</class> process.
@@ -144,12 +144,10 @@ public class Create3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
execution.setVariable("mso-request-id", requestId)
execution.setVariable("mso-service-instance-id", resourceInputObj.getServiceInstanceId())
- } catch (BpmnError e) {
- throw e
} catch (Exception ex){
String msg = "Exception in checkSPPartnerInfo " + ex.getMessage()
msoLogger.debug(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+// exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
}
@@ -187,7 +185,7 @@ public class Create3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
} catch (Exception ex){
String msg = "Exception in checkLocallCall " + ex.getMessage()
msoLogger.debug(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+// exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
}
@@ -259,12 +257,10 @@ public class Create3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
execution.setVariable(Prefix + "ResourceModelCustomizationUuid", resourceModelCustomizationUuid)
msoLogger.info("resourceModelCustomizationUuid:" + resourceModelCustomizationUuid)
- } catch (BpmnError e) {
- throw e
} catch (Exception ex){
msg = "Exception in preProcessRequest " + ex.getMessage()
msoLogger.debug(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+// exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
}
@@ -424,13 +420,14 @@ public class Create3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
public void doCreateE2ESIin3rdONAP(DelegateExecution execution) {
msoLogger.info(" ***** Started doCreateE2ESIin3rdONAP *****")
-
+ try {
String extAPIPath = execution.getVariable("ExternalAPIURL")
String payload = execution.getVariable(Prefix + "Payload")
msoLogger.debug("doCreateE2ESIin3rdONAP externalAPIURL is: " + extAPIPath)
msoLogger.debug("doCreateE2ESIin3rdONAP payload is: " + payload)
ExternalAPIUtil externalAPIUtil = new ExternalAPIUtil()
+ execution.setVariable("ServiceOrderId", "")
Response response = externalAPIUtil.executeExternalAPIPostCall(execution, extAPIPath, payload)
@@ -446,7 +443,7 @@ public class Create3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
//Process Response
if(responseCode == 200 || responseCode == 201 || responseCode == 202 )
- //200 OK 201 CREATED 202 ACCEPTED
+ //200 OK 201 CREATED 202 ACCEPTED
{
msoLogger.debug("Post ServiceOrder Received a Good Response")
String serviceOrderId = responseObj.get("id")
@@ -458,6 +455,9 @@ public class Create3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
msoLogger.error("Post ServiceOrder Received a Bad Response Code. Response Code is: " + responseCode)
// exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Post ServiceOrder Received a bad response from 3rdONAP External API")
}
+ }catch(Exception e){
+ msoLogger.error("doCreateE2ESIin3rdONAP exception:" + e.getMessage())
+ }
msoLogger.info("Exit " + doCreateE2ESIin3rdONAP)
}
@@ -465,10 +465,11 @@ public class Create3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
public void getE2ESIProgressin3rdONAP(DelegateExecution execution) {
msoLogger.info(" ***** Started getE2ESIProgressin3rdONAP *****")
+ try {
String extAPIPath = execution.getVariable("ExternalAPIURL")
extAPIPath += "/" + execution.getVariable("ServiceOrderId")
- utils.log("DEBUG", "getE2ESIProgressin3rdONAP create externalAPIURL is: " + extAPIPath, isDebugEnabled)
+ msoLogger.debug("getE2ESIProgressin3rdONAP create externalAPIURL is: " + extAPIPath)
ExternalAPIUtil externalAPIUtil = new ExternalAPIUtil()
@@ -547,9 +548,15 @@ public class Create3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
execution.setVariable("progress", 100)
execution.setVariable("status", "error")
execution.setVariable("statusDescription", "Get Create ServiceOrder Received a bad response")
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Get Create ServiceOrder Received a bad response from 3rdONAP External API")
+// exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Get Create ServiceOrder Received a bad response from 3rdONAP External API")
}
+ }catch(Exception e){
+ execution.setVariable("progress", 100)
+ execution.setVariable("status", "error")
+ execution.setVariable("statusDescription", "Get Create ServiceOrder Exception")
+ msoLogger.error("getE2ESIProgressin3rdONAP exception:" + e.getMessage())
+ }
msoLogger.info("Exit " + getE2ESIProgressin3rdONAP)
}
@@ -566,7 +573,7 @@ public class Create3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
public void saveSPPartnerInAAI(DelegateExecution execution) {
msoLogger.info(" ***** Started saveSPPartnerInAAI *****")
-
+ try {
String sppartnerId = execution.getVariable(Prefix + "SppartnerServiceId")
String sppartnerUrl = execution.getVariable(Prefix + "SppartnerUrl")
String callSource = execution.getVariable(Prefix + "CallSource")
@@ -591,12 +598,16 @@ public class Create3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
AAIResourceUri siUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalSubscriberId, serviceType, serviceInstanceId)
client.connect(uri, siUri)
-
+ } catch (Exception ex) {
+ String msg = "Exception in Create3rdONAPE2EServiceInstance.saveSPPartnerInAAI. " + ex.getMessage()
+ msoLogger.info(msg)
+// throw new BpmnError("MSOWorkflowException")
+ }
msoLogger.info("Exit " + saveSPPartnerInAAI)
}
private void setProgressUpdateVariables(DelegateExecution execution, String body) {
- def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint")
+ def dbAdapterEndpoint = UrnPropertiesReader.getVariable("mso.adapters.openecomp.db.endpoint", execution)
execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
execution.setVariable("CVFMI_updateResOperStatusRequest", body)
}
@@ -624,7 +635,7 @@ public class Create3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
} catch (Exception ex) {
String msg = "Exceptuion in sendSyncResponse:" + ex.getMessage()
msoLogger.debug(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+// exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
msoLogger.debug(" ***** Exit sendSyncResopnse *****")
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateDeviceResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateDeviceResource.groovy
index 8fc9ce0883..ff9a119d6d 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateDeviceResource.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateDeviceResource.groovy
@@ -31,7 +31,10 @@ import org.onap.so.bpmn.common.scripts.ExceptionUtil
import org.onap.so.bpmn.common.recipe.ResourceInput;
import org.onap.so.bpmn.common.resource.ResourceRequestBuilder
import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.domain.ModelInfo
+import org.onap.so.bpmn.core.domain.VnfResource
import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.bpmn.core.UrnPropertiesReader
import org.onap.so.bpmn.infrastructure.workflow.serviceTask.client.builder.AbstractBuilder
import org.onap.so.logger.MsoLogger
import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
@@ -41,9 +44,8 @@ import java.util.UUID;
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution
import org.apache.commons.lang3.*
-import org.apache.commons.codec.binary.Base64;
-import org.springframework.web.util.UriUtils
-import org.onap.so.bpmn.common.scripts.AaiUtil
+import org.apache.commons.codec.binary.Base64
+
/**
* This groovy class supports the <class>CreateDeviceResource.bpmn</class> process.
@@ -124,12 +126,10 @@ public class CreateDeviceResource extends AbstractServiceTaskProcessor {
execution.setVariable(Prefix + "serviceInstanceId", resourceInputObj.getServiceInstanceId())
execution.setVariable("mso-request-id", requestId)
- } catch (BpmnError e) {
- throw e;
} catch (Exception ex){
msg = "Exception in preProcessRequest " + ex.getMessage()
msoLogger.debug(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+// exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
}
@@ -143,22 +143,18 @@ public class CreateDeviceResource extends AbstractServiceTaskProcessor {
if(StringUtils.isBlank(devType)) {
devType = "OTHER"
}
- // support VNF as PNF, to modify
- else if(StringUtils.equalsIgnoreCase(devType, "VNF")) {
- devType = "PNF"
- }
execution.setVariable("device_class", devType)
} catch (Exception ex){
String msg = "Exception in checkDevType " + ex.getMessage()
msoLogger.debug(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+// exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
}
private void setProgressUpdateVariables(DelegateExecution execution, String body) {
- def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint")
+ def dbAdapterEndpoint = UrnPropertiesReader.getVariable("mso.adapters.openecomp.db.endpoint", execution)
execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
execution.setVariable("CVFMI_updateResOperStatusRequest", body)
}
@@ -196,7 +192,7 @@ public class CreateDeviceResource extends AbstractServiceTaskProcessor {
msoLogger.info(" ***** Exit prepareUpdateProgress *****")
}
- public void getVNFTemplatefromSDC(DelegateExecution execution){
+ private void getVNFTemplatefromSDC(DelegateExecution execution){
msoLogger.info(" ***** Started getVNFTemplatefromSDC *****")
try {
// To do
@@ -205,22 +201,109 @@ public class CreateDeviceResource extends AbstractServiceTaskProcessor {
} catch (Exception ex){
String msg = "Exception in getVNFTemplatefromSDC " + ex.getMessage()
msoLogger.debug(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+// exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
}
- public void postVNFInfoProcess(DelegateExecution execution){
- msoLogger.info(" ***** Started postVNFInfoProcess *****")
- try {
- // To do
+ public void prepareVnfAndModulesCreate(DelegateExecution execution) {
+ try {
+ msoLogger.trace("Inside prepareVnfAndModulesCreate of CreateDeviceResource ")
+
+ JSONObject resourceInputParameters = execution.getVariable(Prefix + "ResourceRequestInputs")
+ String devType = resourceInputParameters.get("device_type")
+ String devVersion = resourceInputParameters.get("device_version")
+
+ //get vnf model from SDC
+ getVNFTemplatefromSDC(execution)
+
+ VnfResource vnf = execution.getVariable("vnfResource")
+ Integer vnfsCreatedCount = execution.getVariable(Prefix + "VnfsCreatedCount")
+ String vnfModelInfoString = null;
+
+ if (vnf != null) {
+ msoLogger.debug("getting model info for vnf # " + vnfsCreatedCount)
+ ModelInfo vnfModelInfo = vnf.getModelInfo()
+ vnfModelInfoString = vnfModelInfo.toString()
+ } else {
+ msoLogger.debug("vnf is null")
+ vnfModelInfoString = execution.getVariable("vnfModelInfo")
+ }
+
+ msoLogger.debug(" vnfModelInfoString :" + vnfModelInfoString)
+
+ // extract cloud configuration
+// String vimId = jsonUtil.getJsonValue(createVcpeServiceRequest,
+// "requestDetails.cloudConfiguration.lcpCloudRegionId")
+// def cloudRegion = vimId.split("_")
+// execution.setVariable("cloudOwner", cloudRegion[0])
+// msoLogger.debug("cloudOwner: "+ cloudRegion[0])
+// execution.setVariable("cloudRegionId", cloudRegion[1])
+// msoLogger.debug("cloudRegionId: "+ cloudRegion[1])
+// execution.setVariable("lcpCloudRegionId", cloudRegion[1])
+// msoLogger.debug("lcpCloudRegionId: "+ cloudRegion[1])
+// String tenantId = jsonUtil.getJsonValue(createVcpeServiceRequest,
+// "requestDetails.cloudConfiguration.tenantId")
+// execution.setVariable("tenantId", tenantId)
+// msoLogger.debug("tenantId: " + tenantId)
+
+
+ execution.setVariable("cloudOwner", "")
+
+ execution.setVariable("cloudRegionId", "")
+
+ execution.setVariable("lcpCloudRegionId", "")
+
+ execution.setVariable("tenantId", "")
+
+ String sdncVersion = execution.getVariable("sdncVersion")
+ msoLogger.debug("sdncVersion: " + sdncVersion)
+
+ msoLogger.trace("Completed prepareVnfAndModulesCreate of CreateVcpeResCustService ")
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateDeviceResource flow. Unexpected Error from method prepareVnfAndModulesCreate() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ }
+ }
+ // *******************************
+ // Validate Vnf request Section -> increment count
+ // *******************************
+ public void validateVnfCreate(DelegateExecution execution) {
- } catch (Exception ex){
- String msg = "Exception in postVNFInfoProcess " + ex.getMessage()
- msoLogger.debug(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
- }
- }
+ try {
+ msoLogger.trace("Inside validateVnfCreate of CreateDeviceResource ")
+
+ //Update Relationship between VNF to Device
+ addVNFAAIRelationShip(execution)
+
+ Integer vnfsCreatedCount = execution.getVariable(Prefix + "VnfsCreatedCount")
+ vnfsCreatedCount++
+
+ execution.setVariable(Prefix + "VnfsCreatedCount", vnfsCreatedCount)
+
+ msoLogger.debug(" ***** Completed validateVnfCreate of CreateDeviceResource ***** " + " vnf # " + vnfsCreatedCount)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateDeviceResource flow. Unexpected Error from method validateVnfCreate() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ }
+ }
+
+ public void addVNFAAIRelationShip(DelegateExecution execution) {
+
+ try {
+ msoLogger.trace("Inside addVNFAAIRelationShip of CreateDeviceResource ")
+
+
+
+ msoLogger.debug(" ***** Completed addVNFAAIRelationShip of CreateDeviceResource ***** ")
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateDeviceResource flow. Unexpected Error from method addVNFAAIRelationShip() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ }
+ }
public void sendSyncResponse (DelegateExecution execution) {
msoLogger.debug(" *** sendSyncResponse *** ")
@@ -236,7 +319,7 @@ public class CreateDeviceResource extends AbstractServiceTaskProcessor {
} catch (Exception ex) {
String msg = "Exceptuion in sendSyncResponse:" + ex.getMessage()
msoLogger.debug(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+// exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
utils.log("DEBUG"," ***** Exit sendSyncResopnse *****")
}
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 4b5737c776..f8c2ced2c7 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
@@ -33,6 +33,7 @@ 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.core.json.JsonUtils
+import org.onap.so.bpmn.core.UrnPropertiesReader
import org.onap.so.client.aai.AAIObjectPlurals
import org.onap.so.client.aai.AAIResourcesClient
import org.onap.so.client.aai.entities.uri.AAIResourceUri
@@ -448,7 +449,7 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
}
private void setProgressUpdateVariables(DelegateExecution execution, String body) {
- def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint")
+ def dbAdapterEndpoint = UrnPropertiesReader.getVariable("mso.adapters.openecomp.db.endpoint", execution)
execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
execution.setVariable("CVFMI_updateResOperStatusRequest", body)
}
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..ed8b3b4e0a 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
@@ -29,6 +29,7 @@ import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
import org.onap.so.bpmn.common.scripts.ExceptionUtil
import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.bpmn.core.UrnPropertiesReader
import org.onap.so.logger.MsoLogger
/**
@@ -367,13 +368,14 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor
}
private void setProgressUpdateVariables(DelegateExecution execution, String body) {
- def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint")
+ def dbAdapterEndpoint = UrnPropertiesReader.getVariable("mso.adapters.openecomp.db.endpoint", execution)
execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
execution.setVariable("CVFMI_updateResOperStatusRequest", body)
}
public void postDeactivateSDNCCall(DelegateExecution execution) {
- msoLogger.info(" ***** Started prepareSDNCRequest *****") String responseCode = execution.getVariable(Prefix + "sdncDeleteReturnCode")
+ msoLogger.info(" ***** Started prepareSDNCRequest *****")
+ String responseCode = execution.getVariable(Prefix + "sdncDeleteReturnCode")
String responseObj = execution.getVariable(Prefix + "SuccessIndicator")
msoLogger.info("response from sdnc, response code :" + responseCode + " response object :" + responseObj)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Delete3rdONAPE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Delete3rdONAPE2EServiceInstance.groovy
index 46c0c4bfa0..052b28dd04 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Delete3rdONAPE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Delete3rdONAPE2EServiceInstance.groovy
@@ -24,6 +24,7 @@ import javax.ws.rs.NotFoundException
import javax.ws.rs.core.Response
import org.apache.commons.lang3.StringUtils
+import static org.apache.commons.lang3.StringUtils.*
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution
import org.json.JSONArray
@@ -31,11 +32,11 @@ import org.json.JSONObject
import org.onap.aai.domain.yang.SpPartner
import org.onap.so.bpmn.common.recipe.ResourceInput
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.ExternalAPIUtil
import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.bpmn.core.UrnPropertiesReader
import org.onap.so.client.aai.AAIObjectType
import org.onap.so.client.aai.AAIResourcesClient
import org.onap.so.client.aai.entities.uri.AAIResourceUri
@@ -77,11 +78,6 @@ public class Delete3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
execution.setVariable(Prefix + "SppartnerId", sppartnerId)
// Get Sppartner from AAI
- AaiUtil aaiUriUtil = new AaiUtil(this)
- AAIResourceUri spPartner = AAIUriFactory.createResourceUri(AAIObjectType.SP_PARTNER, sppartnerId)
- String spPartnerUri = aaiUriUtil.createAaiUri(spPartner)
- execution.setVariable(Prefix + "ServiceAaiPath", spPartnerUri)
-
getSPPartnerInAAI(execution)
String callSource = "UUI"
@@ -101,12 +97,10 @@ public class Delete3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
execution.setVariable("mso-request-id", requestId)
execution.setVariable("mso-service-instance-id", resourceInputObj.getServiceInstanceId())
- } catch (BpmnError e) {
- throw e
} catch (Exception ex){
String msg = "Exception in checkSPPartnerInfoFromAAI " + ex.getMessage()
msoLogger.debug(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+// exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
}
@@ -169,12 +163,10 @@ public class Delete3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
execution.setVariable("resourceTemplateId", resourceTemplateId)
msoLogger.info( "resourceTemplateId:" + resourceTemplateId)
- } catch (BpmnError e) {
- throw e
} catch (Exception ex){
msg = "Exception in preProcessRequest " + ex.getMessage()
msoLogger.debug(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+// exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
}
@@ -269,6 +261,7 @@ public class Delete3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
private void queryServicefrom3rdONAP(DelegateExecution execution)
{
msoLogger.info(" ***** Started queryServicefrom3rdONAP *****")
+ try {
String globalSubscriberId = execution.getVariable("globalSubscriberId")
String SppartnerServiceId = execution.getVariable(Prefix + "SppartnerId")
@@ -310,19 +303,22 @@ public class Delete3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
msoLogger.error("Get Service Received a Bad Response Code. Response Code is: " + responseCode)
// exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Get Service Received a bad response from 3rdONAP External API")
}
-
+ }catch(Exception e) {
+ msoLogger.error("queryServicefrom3rdONAP exception:" + e.getMessage())
+ }
msoLogger.info( "Exit " + queryServicefrom3rdONAP)
}
public void doDeleteE2ESIin3rdONAP(DelegateExecution execution) {
msoLogger.info(" ***** Started doDeleteE2ESIin3rdONAP *****")
-
+ try {
String extAPIPath = execution.getVariable("ExternalAPIURL")
String payload = execution.getVariable(Prefix + "Payload")
msoLogger.debug("doDeleteE2ESIin3rdONAP externalAPIURL is: " + extAPIPath)
msoLogger.debug("doDeleteE2ESIin3rdONAP payload is: " + payload)
ExternalAPIUtil externalAPIUtil = new ExternalAPIUtil()
+ execution.setVariable("ServiceOrderId", "")
Response response = externalAPIUtil.executeExternalAPIPostCall(execution, extAPIPath, payload)
@@ -348,15 +344,18 @@ public class Delete3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
}
else{
msoLogger.error("Post ServiceOrder Received a Bad Response Code. Response Code is: " + responseCode)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Post ServiceOrder Received a bad response from 3rdONAP External API")
+// exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Post ServiceOrder Received a bad response from 3rdONAP External API")
+ }
+ }catch(Exception e) {
+ msoLogger.error("doDeleteE2ESIin3rdONAP exception:" + e.getMessage())
}
-
msoLogger.info( "Exit " + doDeleteE2ESIin3rdONAP)
}
public void getE2ESIProgressin3rdONAP(DelegateExecution execution) {
msoLogger.info(" ***** Started getE2ESIProgressin3rdONAP *****")
+ try {
String extAPIPath = execution.getVariable("ExternalAPIURL")
extAPIPath += "/" + execution.getVariable("ServiceOrderId")
@@ -438,9 +437,14 @@ public class Delete3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
execution.setVariable("progress", 100)
execution.setVariable("status", "error")
execution.setVariable("statusDescription", "Get Delete ServiceOrder Received a bad response")
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Get Delete ServiceOrder Received a bad response from 3rdONAP External API")
+// exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Get Delete ServiceOrder Received a bad response from 3rdONAP External API")
}
-
+ }catch(Exception e) {
+ execution.setVariable("progress", 100)
+ execution.setVariable("status", "error")
+ execution.setVariable("statusDescription", "Get Delete ServiceOrder Exception")
+ msoLogger.error("getE2ESIProgressin3rdONAP exception:" + e.getMessage())
+ }
msoLogger.info( "Exit " + getE2ESIProgressin3rdONAP)
}
@@ -457,6 +461,7 @@ public class Delete3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
private void getSPPartnerInAAI(DelegateExecution execution) {
msoLogger.info(" ***** Started getSPPartnerInAAI *****")
+ try {
String id = execution.getVariable(Prefix + "SppartnerId")
AAIResourcesClient client = new AAIResourcesClient()
@@ -467,9 +472,9 @@ public class Delete3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
execution.setVariable(Prefix + "SuccessIndicator", true)
execution.setVariable(Prefix + "FoundIndicator", true)
- String sppartnerId = sp.getSpPartnerId()
- execution.setVariable(Prefix + "SppartnerId", sppartnerId)
- msoLogger.debug(" SppartnerId is: " + sppartnerId)
+// String sppartnerId = sp.getSpPartnerId()
+// execution.setVariable(Prefix + "SppartnerId", sppartnerId)
+// msoLogger.debug(" SppartnerId is: " + sppartnerId)
String sppartnerUrl = sp.getUrl()
execution.setVariable(Prefix + "SppartnerUrl", sppartnerUrl)
msoLogger.debug(" SppartnerUrl is: " + sppartnerUrl)
@@ -479,35 +484,38 @@ public class Delete3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
String sppartnerVersion = sp.getResourceVersion()
execution.setVariable(Prefix + "SppartnerVersion", sppartnerVersion)
msoLogger.debug(" Resource Version is: " + sppartnerVersion)
-
+ } catch (Exception ex) {
+ String msg = "Exception in Delete3rdONAPE2EServiceInstance.saveSPPartnerInAAI. " + ex.getMessage()
+ msoLogger.debug(msg)
+// throw new BpmnError("MSOWorkflowException")
+ }
msoLogger.info( "Exit " + getSPPartnerInAAI)
}
public void deleteSPPartnerInAAI(DelegateExecution execution) {
msoLogger.info(" ***** Started deleteSPPartnerInAAI *****")
+ try {
String sppartnerId = execution.getVariable(Prefix + "SppartnerId")
- String sppartnerUrl = execution.getVariable(Prefix + "SppartnerUrl")
- String sppartnerVersion = execution.getVariable(Prefix + "SppartnerVersion")
AAIResourcesClient client = new AAIResourcesClient()
AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SP_PARTNER, sppartnerId)
- try {
- client.delete(uri)
- msoLogger.debug("Delete sppartner Received a Good Response")
- execution.setVariable(Prefix + "SuccessIndicator", true)
- } catch (NotFoundException e) {
- msoLogger.debug(" Delete sppartner Received a Not Found (404) Response")
- execution.setVariable(Prefix + "FoundIndicator", false)
- }
+ client.delete(uri)
msoLogger.debug("Delete sppartner Received a Good Response")
+ execution.setVariable(Prefix + "SuccessIndicator", true)
+ } catch (Exception ex) {
+ String msg = "Exception in Delete3rdONAPE2EServiceInstance.deleteSPPartnerInAAI. " + ex.getMessage()
+ msoLogger.debug(msg)
+// throw new BpmnError("MSOWorkflowException")
+ }
+
msoLogger.info( "Exit " + deleteSPPartnerInAAI)
}
private void setProgressUpdateVariables(DelegateExecution execution, String body) {
- def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint")
+ def dbAdapterEndpoint = UrnPropertiesReader.getVariable("mso.adapters.openecomp.db.endpoint", execution)
execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
execution.setVariable("CVFMI_updateResOperStatusRequest", body)
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy
index cbbc5189f4..519f064802 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy
@@ -33,6 +33,7 @@ import org.onap.so.bpmn.common.scripts.MsoUtils
import org.onap.so.bpmn.common.scripts.VidUtils
import org.onap.so.bpmn.core.WorkflowException
import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.bpmn.core.UrnPropertiesReader
import org.onap.so.logger.MsoLogger
import org.springframework.web.util.UriUtils;
@@ -351,7 +352,7 @@ public class DeleteCustomE2EServiceInstance extends AbstractServiceTaskProcessor
utils.log("DEBUG", "Generated new operation for Service Instance serviceId:" + serviceId + " operationId:" + operationId, isDebugEnabled)
serviceId = UriUtils.encode(serviceId,"UTF-8")
- def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint")
+ def dbAdapterEndpoint = UrnPropertiesReader.getVariable("mso.adapters.openecomp.db.endpoint", execution)
execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
utils.log("DEBUG", "DB Adapter Endpoint is: " + dbAdapterEndpoint, isDebugEnabled)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteDeviceResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteDeviceResource.groovy
index 82be3e6a0c..28297976ff 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteDeviceResource.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteDeviceResource.groovy
@@ -27,6 +27,7 @@ import static org.apache.commons.lang3.StringUtils.*;
import groovy.xml.XmlUtil
import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.aai.domain.yang.Device
import org.onap.so.bpmn.common.recipe.ResourceInput;
import org.onap.so.bpmn.common.resource.ResourceRequestBuilder
import org.onap.so.bpmn.core.UrnPropertiesReader
@@ -34,6 +35,10 @@ import org.onap.so.bpmn.core.WorkflowException
import org.onap.so.bpmn.core.json.JsonUtils
import org.onap.so.bpmn.infrastructure.workflow.serviceTask.client.builder.AbstractBuilder
import org.onap.so.client.HttpClient
+import org.onap.so.client.aai.AAIObjectType
+import org.onap.so.client.aai.AAIResourcesClient
+import org.onap.so.client.aai.entities.uri.AAIResourceUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
import org.onap.so.logger.MsoLogger
import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
@@ -43,10 +48,9 @@ import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution
import org.apache.commons.lang3.*
import javax.ws.rs.core.MediaType
-import org.apache.commons.codec.binary.Base64;
-import org.springframework.web.util.UriUtils
+import org.apache.commons.codec.binary.Base64
import org.onap.so.utils.TargetEntity
-import org.onap.so.bpmn.common.scripts.AaiUtil
+
/**
* This groovy class supports the <class>DeleteDeviceResource.bpmn</class> process.
@@ -95,62 +99,31 @@ public class DeleteDeviceResource extends AbstractServiceTaskProcessor {
execution.setVariable(Prefix + "serviceInstanceId", resourceInputObj.getServiceInstanceId())
execution.setVariable("mso-request-id", requestId)
- } catch (BpmnError e) {
- throw e;
} catch (Exception ex){
String msg = "Exception in preProcessRequest " + ex.getMessage()
msoLogger.debug(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+// exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
}
private void getDeviceInAAI(DelegateExecution execution) {
msoLogger.info(" ***** Started getDeviceInAAI *****")
-
+ try {
String deviceId = execution.getVariable(Prefix + "DeviceId")
- AaiUtil aaiUriUtil = new AaiUtil()
- String aai_uri = aaiUriUtil.getNetworkDeviceUri(execution)
- String aai_endpoint = execution.getVariable("URN_aai_endpoint")
- String serviceAaiPath = "${aai_endpoint}${aai_uri}/" + UriUtils.encode(deviceId,"UTF-8")
- execution.setVariable(Prefix + "ServiceAaiPath", serviceAaiPath)
-
- URL url = new URL(serviceAaiPath)
- HttpClient client = new HttpClient(url, MediaType.APPLICATION_XML, TargetEntity.AAI)
- client.addBasicAuthHeader(UrnPropertiesReader.getVariable("aai.auth", execution), UrnPropertiesReader.getVariable("mso.msoKey", execution))
- client.addAdditionalHeader("X-FromAppId", "MSO")
- client.addAdditionalHeader("X-TransactionId", utils.getRequestID())
- client.addAdditionalHeader("Accept", MediaType.APPLICATION_XML)
- Response response = client.get()
-
-
-
- int responseCode = response.getStatus()
- execution.setVariable(Prefix + "GetDeviceResponseCode", responseCode)
- msoLogger.debug(" Get device response code is: " + responseCode)
-
- String aaiResponse = response.readEntity(String.class)
- aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
- aaiResponse = aaiResponse.replaceAll("&", "&amp;")
- execution.setVariable(Prefix + "GetDeviceResponse", aaiResponse)
-
- //Process Response
- if(responseCode == 200 || responseCode == 201 || responseCode == 202 )
- //200 OK 201 CREATED 202 ACCEPTED
- {
- msoLogger.debug("GET Device Received a Good Response")
- execution.setVariable(Prefix + "SuccessIndicator", true)
- execution.setVariable(Prefix + "FoundIndicator", true)
-
- String devClass = utils.getNodeText(aaiResponse, "device_class")
- execution.setVariable(Prefix + "DeviceClass", devClass)
- msoLogger.debug(" DeviceClass is: " + devClass)
-
- }
- else
- {
- msoLogger.debug("Get DeviceInAAI Received a Bad Response Code. Response Code is: " + responseCode)
-
- }
+
+ AAIResourcesClient client = new AAIResourcesClient()
+ AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.DEVICE, deviceId)
+ Device dev = client.get(uri).asBean(Device.class).get()
+
+ String devClass = dev.getClass ()
+ execution.setVariable(Prefix + "DeviceClass", devClass)
+ msoLogger.debug(" DeviceClass is: " + devClass)
+
+ } catch (Exception ex){
+ String msg = "Exception in getDeviceInAAI " + ex.getMessage()
+ msoLogger.debug(msg)
+// exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
msoLogger.info(" ***** Exit getDeviceInAAI *****")
}
@@ -170,12 +143,12 @@ public class DeleteDeviceResource extends AbstractServiceTaskProcessor {
} catch (Exception ex){
String msg = "Exception in checkDevType " + ex.getMessage()
msoLogger.debug( msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+// exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
}
private void setProgressUpdateVariables(DelegateExecution execution, String body) {
- def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint")
+ def dbAdapterEndpoint = UrnPropertiesReader.getVariable("mso.adapters.openecomp.db.endpoint", execution)
execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
execution.setVariable("CVFMI_updateResOperStatusRequest", body)
}
@@ -222,7 +195,7 @@ public class DeleteDeviceResource extends AbstractServiceTaskProcessor {
} catch (Exception ex){
String msg = "Exception in getVNFTemplatefromSDC " + ex.getMessage()
msoLogger.debug( msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+// exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
}
@@ -235,7 +208,7 @@ public class DeleteDeviceResource extends AbstractServiceTaskProcessor {
} catch (Exception ex){
String msg = "Exception in postVNFInfoProcess " + ex.getMessage()
msoLogger.debug( msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+// exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
}
@@ -253,7 +226,7 @@ public class DeleteDeviceResource extends AbstractServiceTaskProcessor {
} catch (Exception ex) {
String msg = "Exceptuion in sendSyncResponse:" + ex.getMessage()
msoLogger.debug( msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+// exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
msoLogger.debug(" ***** Exit sendSyncResopnse *****")
}
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..b5c9f8cda6 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
@@ -29,6 +29,7 @@ import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
import org.onap.so.bpmn.common.scripts.ExceptionUtil
import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.bpmn.core.UrnPropertiesReader
import org.onap.so.logger.MsoLogger
import static org.apache.commons.lang3.StringUtils.*
@@ -361,7 +362,7 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor {
}
private void setProgressUpdateVariables(DelegateExecution execution, String body) {
- def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint")
+ def dbAdapterEndpoint = UrnPropertiesReader.getVariable("mso.adapters.openecomp.db.endpoint", execution)
execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
execution.setVariable("CVFMI_updateResOperStatusRequest", body)
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2.groovy
index eab6fe05e7..5bc1e65024 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2.groovy
@@ -35,6 +35,7 @@ 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.bpmn.core.UrnPropertiesReader
import org.onap.so.logger.MessageEnum
import org.onap.so.logger.MsoLogger
@@ -911,7 +912,7 @@ public class DoCustomDeleteE2EServiceInstanceV2 extends AbstractServiceTaskProce
execution.setVariable("operationId", operationId)
execution.setVariable("operationType", operationType)
- def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint")
+ def dbAdapterEndpoint = UrnPropertiesReader.getVariable("mso.adapters.openecomp.db.endpoint", execution)
execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
msoLogger.info("DB Adapter Endpoint is: " + dbAdapterEndpoint)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy
index cf0bd3f6fe..9accbd8d24 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy
@@ -39,6 +39,7 @@ import org.onap.so.bpmn.core.domain.Resource
import org.onap.so.bpmn.core.domain.ServiceDecomposition
import org.onap.so.bpmn.core.domain.VnfResource
import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.bpmn.core.UrnPropertiesReader
import org.onap.so.bpmn.infrastructure.properties.BPMNProperties
import org.onap.so.logger.MsoLogger
@@ -320,7 +321,7 @@ public class DoDeleteResourcesV1 extends AbstractServiceTaskProcessor {
</soapenv:Body>
</soapenv:Envelope>""";
- def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint")
+ def dbAdapterEndpoint = UrnPropertiesReader.getVariable("mso.adapters.openecomp.db.endpoint", execution)
execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
execution.setVariable("CVFMI_updateResOperStatusRequest", body)
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ScaleCustomE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ScaleCustomE2EServiceInstance.groovy
index 3a309cf5a2..687ac215a5 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ScaleCustomE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ScaleCustomE2EServiceInstance.groovy
@@ -29,6 +29,7 @@ import org.onap.so.bpmn.common.scripts.ExceptionUtil
import org.onap.so.bpmn.common.scripts.MsoUtils
import org.onap.so.bpmn.core.WorkflowException
import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.bpmn.core.UrnPropertiesReader
import org.onap.so.logger.MessageEnum
import org.onap.so.logger.MsoLogger
import org.onap.so.utils.UUIDChecker
@@ -259,7 +260,7 @@ public class ScaleCustomE2EServiceInstance extends AbstractServiceTaskProcessor
execution.setVariable("operationId", operationId)
execution.setVariable("operationType", operationType)
- def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint")
+ def dbAdapterEndpoint = UrnPropertiesReader.getVariable("mso.adapters.openecomp.db.endpoint", execution)
execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
msoLogger.info("DB Adapter Endpoint is: " + dbAdapterEndpoint)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy
index 20ced72002..df0cd4618d 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy
@@ -36,6 +36,7 @@ import org.onap.so.bpmn.common.scripts.MsoUtils
import org.onap.so.bpmn.core.WorkflowException
import org.onap.so.bpmn.core.domain.Resource
import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.bpmn.core.UrnPropertiesReader
import org.onap.so.client.aai.AAIObjectType
import org.onap.so.client.aai.AAIResourcesClient
import org.onap.so.client.aai.entities.AAIResultWrapper
@@ -247,7 +248,7 @@ public class UpdateCustomE2EServiceInstance extends AbstractServiceTaskProcessor
execution.setVariable("operationId", operationId)
execution.setVariable("operationType", operationType)
- def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint")
+ def dbAdapterEndpoint = UrnPropertiesReader.getVariable("mso.adapters.openecomp.db.endpoint", execution)
execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
utils.log("DEBUG", "DB Adapter Endpoint is: " + dbAdapterEndpoint, isDebugEnabled)