aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy43
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy222
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy56
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy29
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceBRG.groovy14
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceTXC.groovy18
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVcpeResCustService.bpmn57
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteCustomE2EServiceInstance.bpmn4
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateAllottedResourceBRG.bpmn32
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateAllottedResourceTXC.bpmn44
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn8
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceTest.groovy137
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustServiceTest.groovy131
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGTest.groovy3
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCTest.groovy89
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/vcpe/CreateVcpeResCustServiceTest.java1
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/vcpe/DoCreateAllottedResourceBRGTest.java1
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/SDNCTopologyQueryTXCCallback.xml4
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/SDNCTopologyQueryCallback.xml4
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/mso.bpmn.urn.properties2
-rw-r--r--docs/Install_Configure_SO.rst2
-rw-r--r--docs/architecture.rst2
-rw-r--r--docs/index.rst2
-rw-r--r--docs/offered_consumed_apis.rst2
-rw-r--r--docs/release-notes.rst47
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java5
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RequestInfo.java3
27 files changed, 580 insertions, 382 deletions
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy
index af63176658..49e4cc9257 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy
@@ -64,7 +64,7 @@ public class DeleteCustomE2EServiceInstance extends AbstractServiceTaskProcessor
execution.setVariable("prefix",Prefix)
String msg = ""
- utils.log("DEBUG", " *** preProcessRequest Request *** ", isDebugEnabled)
+ utils.log("INFO", " *** preProcessRequest Request *** ", isDebugEnabled)
try {
// check for incoming json message/input
@@ -74,7 +74,7 @@ public class DeleteCustomE2EServiceInstance extends AbstractServiceTaskProcessor
String requestId = execution.getVariable("mso-request-id")
execution.setVariable("msoRequestId", requestId)
- utils.log("DEBUG", "Input Request:" + siRequest + " reqId:" + requestId, isDebugEnabled)
+ utils.log("INFO", "Input Request:" + siRequest + " reqId:" + requestId, isDebugEnabled)
String serviceInstanceId = execution.getVariable("serviceInstanceId")
if (isBlank(serviceInstanceId)) {
@@ -85,7 +85,7 @@ public class DeleteCustomE2EServiceInstance extends AbstractServiceTaskProcessor
String serviceType = execution.getVariable("serviceType")
if (isBlank(serviceType)) {
msg = "Input serviceType' is null"
- utils.log("DEBUG", msg, isDebugEnabled)
+ utils.log("INFO", msg, isDebugEnabled)
} else {
execution.setVariable("serviceType", serviceType)
}
@@ -94,7 +94,7 @@ public class DeleteCustomE2EServiceInstance extends AbstractServiceTaskProcessor
String globalSubscriberId = jsonUtil.getJsonValue(siRequest, "globalSubscriberId")
if (isBlank(globalSubscriberId)) {
msg = "Input globalSubscriberId' is null"
- utils.log("DEBUG", msg, isDebugEnabled)
+ utils.log("INFO", msg, isDebugEnabled)
} else {
execution.setVariable("globalSubscriberId", globalSubscriberId)
}
@@ -105,6 +105,7 @@ public class DeleteCustomE2EServiceInstance extends AbstractServiceTaskProcessor
operationId = UUID.randomUUID().toString()
}
execution.setVariable("operationId", operationId)
+ execution.setVariable("operationType", "DELETE")
execution.setVariable("URN_mso_adapters_openecomp_db_endpoint","http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter")
@@ -112,34 +113,34 @@ public class DeleteCustomE2EServiceInstance extends AbstractServiceTaskProcessor
throw e;
} catch (Exception ex){
msg = "Exception in preProcessRequest " + ex.getMessage()
- utils.log("DEBUG", msg, isDebugEnabled)
+ utils.log("INFO", msg, isDebugEnabled)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
- utils.log("DEBUG"," ***** Exit preProcessRequest *****", isDebugEnabled)
+ utils.log("INFO"," ***** Exit preProcessRequest *****", isDebugEnabled)
}
public void sendSyncResponse (Execution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- utils.log("DEBUG", " *** sendSyncResponse *** ", isDebugEnabled)
+ utils.log("INFO", " *** sendSyncResponse *** ", isDebugEnabled)
try {
String operationId = execution.getVariable("operationId")
// RESTResponse (for API Handler (APIH) Reply Task) : :
String syncResponse = """{"operationId":"${operationId}"}""".trim()
- utils.log("DEBUG", " sendSynchResponse: xmlSyncResponse - " + "\n" + syncResponse, isDebugEnabled)
+ utils.log("INFO", " sendSynchResponse: xmlSyncResponse - " + "\n" + syncResponse, isDebugEnabled)
sendWorkflowResponse(execution, 202, syncResponse)
} catch (Exception ex) {
String msg = "Exception in sendSyncResponse: " + ex.getMessage()
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
}
- utils.log("DEBUG"," ***** Exit sendSyncResopnse *****", isDebugEnabled)
+ utils.log("INFO"," ***** Exit sendSyncResopnse *****", isDebugEnabled)
}
public void sendSyncError (Execution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- utils.log("DEBUG", " *** sendSyncError *** ", isDebugEnabled)
+ utils.log("INFO", " *** sendSyncError *** ", isDebugEnabled)
try {
String errorMessage = ""
@@ -160,14 +161,14 @@ public class DeleteCustomE2EServiceInstance extends AbstractServiceTaskProcessor
sendWorkflowResponse(execution, 500, buildworkflowException)
} catch (Exception ex) {
- utils.log("DEBUG", " Sending Sync Error Activity Failed. " + "\n" + ex.getMessage(), isDebugEnabled)
+ utils.log("INFO", " Sending Sync Error Activity Failed. " + "\n" + ex.getMessage(), isDebugEnabled)
}
}
public void prepareCompletionRequest (Execution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- utils.log("DEBUG", " *** prepareCompletion *** ", isDebugEnabled)
+ utils.log("INFO", " *** prepareCompletion *** ", isDebugEnabled)
try {
String requestId = execution.getVariable("msoRequestId")
@@ -188,23 +189,23 @@ public class DeleteCustomE2EServiceInstance extends AbstractServiceTaskProcessor
String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
execution.setVariable("completionRequest", xmlMsoCompletionRequest)
- utils.log("DEBUG", " Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
+ utils.log("INFO", " Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
} catch (Exception ex) {
String msg = " Exception in prepareCompletion:" + ex.getMessage()
- utils.log("DEBUG", msg, isDebugEnabled)
+ utils.log("INFO", msg, isDebugEnabled)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
- utils.log("DEBUG", "*** Exit prepareCompletionRequest ***", isDebugEnabled)
+ utils.log("INFO", "*** Exit prepareCompletionRequest ***", isDebugEnabled)
}
public void prepareFalloutRequest(Execution execution){
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- utils.log("DEBUG", " *** prepareFalloutRequest *** ", isDebugEnabled)
+ utils.log("INFO", " *** prepareFalloutRequest *** ", isDebugEnabled)
try {
WorkflowException wfex = execution.getVariable("WorkflowException")
- utils.log("DEBUG", " Input Workflow Exception: " + wfex.toString(), isDebugEnabled)
+ utils.log("INFO", " Input Workflow Exception: " + wfex.toString(), isDebugEnabled)
String requestId = execution.getVariable("msoRequestId")
String source = execution.getVariable("source")
String requestInfo =
@@ -217,7 +218,7 @@ public class DeleteCustomE2EServiceInstance extends AbstractServiceTaskProcessor
String falloutRequest = exceptionUtil.processMainflowsBPMNException(execution, requestInfo)
execution.setVariable("falloutRequest", falloutRequest)
} catch (Exception ex) {
- utils.log("DEBUG", "Exception prepareFalloutRequest:" + ex.getMessage(), isDebugEnabled)
+ utils.log("INFO", "Exception prepareFalloutRequest:" + ex.getMessage(), isDebugEnabled)
String errorException = " Bpmn error encountered in CreateServiceInstance flow. FalloutHandlerRequest, buildErrorResponse() - " + ex.getMessage()
String requestId = execution.getVariable("msoRequestId")
String falloutRequest =
@@ -237,7 +238,7 @@ public class DeleteCustomE2EServiceInstance extends AbstractServiceTaskProcessor
execution.setVariable("falloutRequest", falloutRequest)
}
- utils.log("DEBUG", "*** Exit prepareFalloutRequest ***", isDebugEnabled)
+ utils.log("INFO", "*** Exit prepareFalloutRequest ***", isDebugEnabled)
}
@@ -249,7 +250,7 @@ public class DeleteCustomE2EServiceInstance extends AbstractServiceTaskProcessor
execution.setVariable("prefix", Prefix)
try {
- utils.log("DEBUG", " ***** Inside prepareDBRequest of DeleteCustomE2EServiceInstance ***** ", isDebugEnabled)
+ utils.log("INFO", " ***** Inside prepareDBRequest of DeleteCustomE2EServiceInstance ***** ", isDebugEnabled)
String requestId = execution.getVariable("DELSI_requestId")
String statusMessage = "E2E Service Instance successfully deleted."
@@ -290,7 +291,7 @@ public class DeleteCustomE2EServiceInstance extends AbstractServiceTaskProcessor
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
execution.setVariable("prefix", Prefix)
- utils.log("DEBUG", " ***** Inside prepareDBRequestError of DeleteCustomE2EServiceInstance ***** ", isDebugEnabled)
+ utils.log("INFO", " ***** Inside prepareDBRequestError of DeleteCustomE2EServiceInstance ***** ", isDebugEnabled)
try {
String requestId = execution.getVariable("DELSI_requestId")
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy
index 9fcb6ace02..6026dc4ef9 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy
@@ -51,6 +51,8 @@ import org.w3c.dom.Node
import org.w3c.dom.NodeList
import org.xml.sax.InputSource
+import com.fasterxml.jackson.jaxrs.json.annotation.JSONP.Def;
+
/**
* This groovy class supports the <class>DoDeleteE2EServiceInstance.bpmn</class> process.
*
@@ -78,7 +80,7 @@ public class DoCustomDeleteE2EServiceInstance extends AbstractServiceTaskProcess
public void preProcessRequest (Execution execution) {
def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("DEBUG"," ***** preProcessRequest *****", isDebugEnabled)
+ utils.log("INFO"," ***** preProcessRequest *****", isDebugEnabled)
String msg = ""
try {
@@ -94,28 +96,28 @@ public class DoCustomDeleteE2EServiceInstance extends AbstractServiceTaskProcess
}
//requestDetails.requestParameters. for AAI PUT & SDNC assignTopology
- String subscriptionServiceType = execution.getVariable("subscriptionServiceType")
- if (subscriptionServiceType == null)
+ String serviceType = execution.getVariable("serviceType")
+ if (serviceType == null)
{
- execution.setVariable("subscriptionServiceType", "")
+ execution.setVariable("serviceType", "")
}
//Generated in parent for AAI PUT
String serviceInstanceId = execution.getVariable("serviceInstanceId")
if (isBlank(serviceInstanceId)){
msg = "Input serviceInstanceId is null"
- utils.log("DEBUG", msg, isDebugEnabled)
+ utils.log("INFO", msg, isDebugEnabled)
exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
}
String sdncCallbackUrl = execution.getVariable('URN_mso_workflow_sdncadapter_callback')
if (isBlank(sdncCallbackUrl)) {
msg = "URN_mso_workflow_sdncadapter_callback is null"
- utils.log("DEBUG", msg, isDebugEnabled)
+ utils.log("INFO", msg, isDebugEnabled)
exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
}
execution.setVariable("sdncCallbackUrl", sdncCallbackUrl)
- utils.log("DEBUG","SDNC Callback URL: " + sdncCallbackUrl, isDebugEnabled)
+ utils.log("INFO","SDNC Callback URL: " + sdncCallbackUrl, isDebugEnabled)
StringBuilder sbParams = new StringBuilder()
Map<String, String> paramsMap = execution.getVariable("serviceInputParams")
@@ -145,10 +147,10 @@ public class DoCustomDeleteE2EServiceInstance extends AbstractServiceTaskProcess
throw e;
} catch (Exception ex){
msg = "Exception in preProcessRequest " + ex.getMessage()
- utils.log("DEBUG", msg, isDebugEnabled)
+ utils.log("INFO", msg, isDebugEnabled)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
- utils.log("DEBUG"," ***** Exit preProcessRequest *****", isDebugEnabled)
+ utils.log("INFO"," ***** Exit preProcessRequest *****", isDebugEnabled)
}
@@ -160,7 +162,7 @@ public class DoCustomDeleteE2EServiceInstance extends AbstractServiceTaskProcess
public void preProcessSDNCDelete (Execution execution) {
def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("DEBUG"," ***** preProcessSDNCDelete *****", isDebugEnabled)
+ utils.log("INFO"," ***** preProcessSDNCDelete *****", isDebugEnabled)
String msg = ""
try {
@@ -259,54 +261,54 @@ public class DoCustomDeleteE2EServiceInstance extends AbstractServiceTaskProcess
String sdncDeactivate = sdncDelete.replace(">delete<", ">deactivate<").replace(">${sdncRequestId}<", ">${sdncRequestId2}<")
execution.setVariable("sdncDelete", sdncDelete)
execution.setVariable("sdncDeactivate", sdncDeactivate)
- utils.log("DEBUG","sdncDeactivate:\n" + sdncDeactivate, isDebugEnabled)
- utils.log("DEBUG","sdncDelete:\n" + sdncDelete, isDebugEnabled)
+ utils.log("INFO","sdncDeactivate:\n" + sdncDeactivate, isDebugEnabled)
+ utils.log("INFO","sdncDelete:\n" + sdncDelete, isDebugEnabled)
} catch (BpmnError e) {
throw e;
} catch(Exception ex) {
msg = "Exception in preProcessSDNCDelete. " + ex.getMessage()
- utils.log("DEBUG", msg, isDebugEnabled)
+ utils.log("INFO", msg, isDebugEnabled)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "Exception Occured in preProcessSDNCDelete.\n" + ex.getMessage())
}
- utils.log("DEBUG"," *****Exit preProcessSDNCDelete *****", isDebugEnabled)
+ utils.log("INFO"," *****Exit preProcessSDNCDelete *****", isDebugEnabled)
}
public void postProcessSDNCDelete(Execution execution, String response, String method) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- utils.log("DEBUG"," ***** postProcessSDNC " + method + " *****", isDebugEnabled)
+ utils.log("INFO"," ***** postProcessSDNC " + method + " *****", isDebugEnabled)
String msg = ""
- try {
+ /*try {
WorkflowException workflowException = execution.getVariable("WorkflowException")
boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
- utils.log("DEBUG", "SDNCResponse: " + response, isDebugEnabled)
- utils.log("DEBUG", "workflowException: " + workflowException, isDebugEnabled)
+ utils.log("INFO", "SDNCResponse: " + response, isDebugEnabled)
+ utils.log("INFO", "workflowException: " + workflowException, isDebugEnabled)
SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
if(execution.getVariable(Prefix + 'sdncResponseSuccess') == "true"){
- utils.log("DEBUG","Good response from SDNC Adapter for service-instance " + method + "response:\n" + response, isDebugEnabled)
+ utils.log("INFO","Good response from SDNC Adapter for service-instance " + method + "response:\n" + response, isDebugEnabled)
}else{
msg = "Bad Response from SDNC Adapter for service-instance " + method
- utils.log("DEBUG", msg, isDebugEnabled)
+ utils.log("INFO", msg, isDebugEnabled)
exceptionUtil.buildAndThrowWorkflowException(execution, 3500, msg)
}
} catch (BpmnError e) {
throw e;
} catch(Exception ex) {
msg = "Exception in postProcessSDNC " + method + " Exception:" + ex.getMessage()
- utils.log("DEBUG", msg, isDebugEnabled)
+ utils.log("INFO", msg, isDebugEnabled)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
- }
- utils.log("DEBUG"," *** Exit postProcessSDNC " + method + " ***", isDebugEnabled)
+ }*/
+ utils.log("INFO"," *** Exit postProcessSDNC " + method + " ***", isDebugEnabled)
}
public void postProcessAAIGET(Execution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- utils.log("DEBUG"," ***** postProcessAAIGET ***** ", isDebugEnabled)
+ utils.log("INFO"," ***** postProcessAAIGET ***** ", isDebugEnabled)
String msg = ""
try {
@@ -315,56 +317,19 @@ public class DoCustomDeleteE2EServiceInstance extends AbstractServiceTaskProcess
String serviceType = ""
if(foundInAAI == true){
- utils.log("DEBUG","Found Service-instance in AAI", isDebugEnabled)
-
- //Extract GlobalSubscriberId
- String siRelatedLink = execution.getVariable("GENGS_siResourceLink")
- if (isBlank(siRelatedLink))
- {
- msg = "Could not retrive ServiceInstance data from AAI to delete id:" + serviceInstanceId
- utils.log("DEBUG", msg, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
- }
- else
- {
- utils.log("DEBUG","Found Service-instance in AAI. link: " + siRelatedLink, isDebugEnabled)
- String globalSubscriberId = execution.getVariable("globalSubscriberId")
- if(isBlank(globalSubscriberId)){
- int custStart = siRelatedLink.indexOf("customer/")
- int custEnd = siRelatedLink.indexOf("/service-subscriptions")
- globalSubscriberId = siRelatedLink.substring(custStart + 9, custEnd)
- execution.setVariable("globalSubscriberId", globalSubscriberId)
- }
-
- //Extract Service Type if not provided on request
- String subscriptionServiceType = execution.getVariable("subscriptionServiceType")
- if(isBlank(subscriptionServiceType)){
- int serviceStart = siRelatedLink.indexOf("service-subscription/")
- int serviceEnd = siRelatedLink.indexOf("/service-instances/")
- String serviceTypeEncoded = siRelatedLink.substring(serviceStart + 21, serviceEnd)
- subscriptionServiceType = UriUtils.decode(serviceTypeEncoded, "UTF-8")
- execution.setVariable("subscriptionServiceType", subscriptionServiceType)
- }
-
- if (isBlank(globalSubscriberId) || isBlank(subscriptionServiceType))
- {
- msg = "Could not retrive global-customer-id & subscription-service-type from AAI to delete id:" + serviceInstanceId
- utils.log("DEBUG", msg, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
- }
- }
+ utils.log("INFO","Found Service-instance in AAI", isDebugEnabled)
String siData = execution.getVariable("GENGS_service")
- utils.log("DEBUG", "SI Data", isDebugEnabled)
+ utils.log("INFO", "SI Data", isDebugEnabled)
if (isBlank(siData))
{
msg = "Could not retrive ServiceInstance data from AAI to delete id:" + serviceInstanceId
- utils.log("DEBUG", msg, isDebugEnabled)
+ utils.log("INFO", msg, isDebugEnabled)
exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
}
else
{
- utils.log("DEBUG", "SI Data" + siData, isDebugEnabled)
+ utils.log("INFO", "SI Data" + siData, isDebugEnabled)
serviceType = utils.getNodeText1(siData,"service-type")
execution.setVariable("serviceType", serviceType)
execution.setVariable("serviceRole", utils.getNodeText1(siData,"service-role"))
@@ -372,7 +337,7 @@ public class DoCustomDeleteE2EServiceInstance extends AbstractServiceTaskProcess
//Confirm there are no related service instances (vnf/network or volume)
if (utils.nodeExists(siData, "relationship-list")) {
- utils.log("DEBUG", "SI Data relationship-list exists:", isDebugEnabled)
+ utils.log("INFO", "SI Data relationship-list exists:", isDebugEnabled)
InputSource source = new InputSource(new StringReader(siData));
DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
@@ -380,63 +345,79 @@ public class DoCustomDeleteE2EServiceInstance extends AbstractServiceTaskProcess
serviceXml.getDocumentElement().normalize()
//test(siData)
NodeList nodeList = serviceXml.getElementsByTagName("relationship")
+ JSONArray jArray = new JSONArray()
for (int x = 0; x < nodeList.getLength(); x++) {
Node node = nodeList.item(x)
if (node.getNodeType() == Node.ELEMENT_NODE) {
Element eElement = (Element) node
- def e = eElement.getElementsByTagName("related-to").item(0).getTextContent()
- if(e.equals("generic-vnf") || e.equals("l3-network") || e.equals("allotted-resource") ){
- utils.log("DEBUG", "ServiceInstance still has relationship(s) to generic-vnfs, l3-networks or allotted-resources", isDebugEnabled)
- execution.setVariable("siInUse", true)
- //there are relationship dependencies to this Service Instance
- msg = " Stopped deleting Service Instance, it has dependencies. Service instance id: " + serviceInstanceId
- utils.log("DEBUG", msg, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
- }else{
+ def e = eElement.getElementsByTagName("related-to").item(0).getTextContent() //for ns
+ if(e.equals("service-instance")){
+ def relatedObject = eElement.getElementsByTagName("related-link").item(0).getTextContent()
+ utils.log("INFO", "ServiceInstance Related NS :" + relatedObject, isDebugEnabled)
+ NodeList dataList = node.getChildNodes()
+ if(null != dataList) {
+ JSONObject jObj = new JSONObject()
+ for (int i = 0; i < dataList.getLength(); i++) {
+ Node dNode = dataList.item(i)
+ if(dNode.getNodeName() == "relationship-data") {
+ Element rDataEle = (Element)dNode
+ def eKey = rDataEle.getElementsByTagName("relationship-key").item(0).getTextContent()
+ def eValue = rDataEle.getElementsByTagName("relationship-value").item(0).getTextContent()
+ if(eKey.equals("service-instance.service-instance-id")){
+ jObj.put("resourceInstanceId", eValue)
+ }
+ }
+ else if(dNode.getNodeName() == "related-to-property"){
+ Element rDataEle = (Element)dNode
+ def eKey = rDataEle.getElementsByTagName("property-key").item(0).getTextContent()
+ def eValue = rDataEle.getElementsByTagName("property-value").item(0).getTextContent()
+ if(eKey.equals("service-instance.service-instance-name")){
+ jObj.put("resourceType", eValue)
+ }
+ }
+ }
+ utils.log("INFO", "Relationship related to Resource:" + jObj.toString(), isDebugEnabled)
+ jArray.put(jObj)
+ }
+ //for overlay/underlay
+ }else if (e.equals("configuration")){
+ def relatedObject = eElement.getElementsByTagName("related-link").item(0).getTextContent()
+ utils.log("INFO", "ServiceInstance Related Configuration :" + relatedObject, isDebugEnabled)
NodeList dataList = node.getChildNodes()
if(null != dataList) {
- JSONArray jArray = new JSONArray()
+ JSONObject jObj = new JSONObject()
for (int i = 0; i < dataList.getLength(); i++) {
Node dNode = dataList.item(i)
if(dNode.getNodeName() == "relationship-data") {
Element rDataEle = (Element)dNode
-
def eKey = rDataEle.getElementsByTagName("relationship-key").item(0).getTextContent()
def eValue = rDataEle.getElementsByTagName("relationship-value").item(0).getTextContent()
-
- JSONObject jObj = new JSONObject()
- jObj.put("resourceInstanceId", eKey)
- jObj.put("resourceType", eValue)
- jArray.put(jObj)
+ if(eKey.equals("configuration.configuration-id")){
+ jObj.put("resourceInstanceId", eValue)
+ }
+ }
+ else if(dNode.getNodeName() == "related-to-property"){
+ Element rDataEle = (Element)dNode
+ def eKey = rDataEle.getElementsByTagName("property-key").item(0).getTextContent()
+ def eValue = rDataEle.getElementsByTagName("property-value").item(0).getTextContent()
+ if(eKey.equals("configuration.configuration-type")){
+ jObj.put("resourceType", eValue)
+ }
}
}
- execution.setVariable("serviceRelationShip", jArray)
- }
- utils.log("DEBUG", "Relationship NOT related to OpenStack", isDebugEnabled)
+ utils.log("INFO", "Relationship related to Resource:" + jObj.toString(), isDebugEnabled)
+ jArray.put(jObj)
+ }
}
}
}
- }
-
- if ("TRANSPORT".equalsIgnoreCase(serviceType))
- {
- if ("PendingDelete".equals(orchestrationStatus))
- {
- execution.setVariable("skipDeactivate", true)
- }
- else
- {
- msg = "ServiceInstance of type TRANSPORT must in PendingDelete status to allow Delete. Orchestration-status:" + orchestrationStatus
- utils.log("DEBUG", msg, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
- }
-
+ execution.setVariable("serviceRelationShip", jArray)
}
}
}else{
boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
if(succInAAI != true){
- utils.log("DEBUG","Error getting Service-instance from AAI", + serviceInstanceId, isDebugEnabled)
+ utils.log("INFO","Error getting Service-instance from AAI", + serviceInstanceId, isDebugEnabled)
WorkflowException workflowException = execution.getVariable("WorkflowException")
utils.logAudit("workflowException: " + workflowException)
if(workflowException != null){
@@ -445,33 +426,33 @@ public class DoCustomDeleteE2EServiceInstance extends AbstractServiceTaskProcess
else
{
msg = "Failure in postProcessAAIGET GENGS_SuccessIndicator:" + succInAAI
- utils.log("DEBUG", msg, isDebugEnabled)
+ utils.log("INFO", msg, isDebugEnabled)
exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
}
}
- utils.log("DEBUG","Service-instance NOT found in AAI. Silent Success", isDebugEnabled)
+ utils.log("INFO","Service-instance NOT found in AAI. Silent Success", isDebugEnabled)
}
- } catch (BpmnError e) {
+ }catch (BpmnError e) {
throw e;
} catch (Exception ex) {
msg = "Exception in DoDeleteE2EServiceInstance.postProcessAAIGET. " + ex.getMessage()
- utils.log("DEBUG", msg, isDebugEnabled)
+ utils.log("INFO", msg, isDebugEnabled)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
- utils.log("DEBUG"," *** Exit postProcessAAIGET *** ", isDebugEnabled)
+ utils.log("INFO"," *** Exit postProcessAAIGET *** ", isDebugEnabled)
}
public void postProcessAAIDEL(Execution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- utils.log("DEBUG"," ***** postProcessAAIDEL ***** ", isDebugEnabled)
+ utils.log("INFO"," ***** postProcessAAIDEL ***** ", isDebugEnabled)
String msg = ""
try {
String serviceInstanceId = execution.getVariable("serviceInstanceId")
boolean succInAAI = execution.getVariable("GENDS_SuccessIndicator")
if(succInAAI != true){
msg = "Error deleting Service-instance in AAI" + serviceInstanceId
- utils.log("DEBUG", msg, isDebugEnabled)
+ utils.log("INFO", msg, isDebugEnabled)
WorkflowException workflowException = execution.getVariable("WorkflowException")
utils.logAudit("workflowException: " + workflowException)
if(workflowException != null){
@@ -486,16 +467,16 @@ public class DoCustomDeleteE2EServiceInstance extends AbstractServiceTaskProcess
throw e;
} catch (Exception ex) {
msg = "Exception in DoDeleteE2EServiceInstance.postProcessAAIDEL. " + ex.getMessage()
- utils.log("DEBUG", msg, isDebugEnabled)
+ utils.log("INFO", msg, isDebugEnabled)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
- utils.log("DEBUG"," *** Exit postProcessAAIDEL *** ", isDebugEnabled)
+ utils.log("INFO"," *** Exit postProcessAAIDEL *** ", isDebugEnabled)
}
public void preInitResourcesOperStatus(Execution execution){
def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("DEBUG", " ======== STARTED preInitResourcesOperStatus Process ======== ", isDebugEnabled)
+ utils.log("INFO", " ======== STARTED preInitResourcesOperStatus Process ======== ", isDebugEnabled)
try{
String serviceId = execution.getVariable("serviceInstanceId")
String operationId = execution.getVariable("operationId")
@@ -505,7 +486,7 @@ public class DoCustomDeleteE2EServiceInstance extends AbstractServiceTaskProcess
String progress = "0"
String reason = ""
String operationContent = "Prepare service creation"
- utils.log("DEBUG", "Generated new operation for Service Instance serviceId:" + serviceId + " operationId:" + operationId + " operationType:" + operationType, isDebugEnabled)
+ utils.log("INFO", "Generated new operation for Service Instance serviceId:" + serviceId + " operationId:" + operationId + " operationType:" + operationType, isDebugEnabled)
serviceId = UriUtils.encode(serviceId,"UTF-8")
execution.setVariable("serviceInstanceId", serviceId)
execution.setVariable("operationId", operationId)
@@ -540,10 +521,7 @@ public class DoCustomDeleteE2EServiceInstance extends AbstractServiceTaskProcess
resourceTemplateUUIDs = resourceTemplateUUIDs + it.resourceInstanceId + ":"
}
}
-
- def dbAdapterEndpoint = execution.getVariable("URN_mso_openecomp_adapters_db_endpoint")
- execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
- utils.log("DEBUG", "DB Adapter Endpoint is: " + dbAdapterEndpoint, isDebugEnabled)
+ execution.setVariable("URN_mso_openecomp_adapters_db_endpoint","http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter")
String payload =
"""<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
@@ -561,14 +539,14 @@ public class DoCustomDeleteE2EServiceInstance extends AbstractServiceTaskProcess
payload = utils.formatXml(payload)
execution.setVariable("CVFMI_initResOperStatusRequest", payload)
- utils.log("DEBUG", "Outgoing initResourceOperationStatus: \n" + payload, isDebugEnabled)
+ utils.log("INFO", "Outgoing initResourceOperationStatus: \n" + payload, isDebugEnabled)
utils.logAudit("CreateVfModuleInfra Outgoing initResourceOperationStatus Request: " + payload)
}catch(Exception e){
utils.log("ERROR", "Exception Occured Processing preInitResourcesOperStatus. Exception is:\n" + e, isDebugEnabled)
execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during preInitResourcesOperStatus Method:\n" + e.getMessage())
}
- utils.log("DEBUG", "======== COMPLETED preInitResourcesOperStatus Process ======== ", isDebugEnabled)
+ utils.log("INFO", "======== COMPLETED preInitResourcesOperStatus Process ======== ", isDebugEnabled)
}
/**
@@ -594,6 +572,9 @@ public class DoCustomDeleteE2EServiceInstance extends AbstractServiceTaskProcess
"resourceType":"underlay"
}
]*/
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+
+ utils.log("INFO", " ======== STARTED preResourceDelete Process ======== ", isDebugEnabled)
String serviceRelationShip = execution.getVariable("serviceRelationShip")
def jsonSlurper = new JsonSlurper()
def jsonOutput = new JsonOutput()
@@ -601,14 +582,17 @@ public class DoCustomDeleteE2EServiceInstance extends AbstractServiceTaskProcess
if (relationShipList != null) {
relationShipList.each {
- if(resourceName.equals(it.resourceType)) {
+ if(StringUtils.containsIgnoreCase(it.resourceType, resourceName)) {
String resourceInstanceUUID = it.resourceInstanceId
String resourceTemplateUUID = it.resourceInstanceId
execution.setVariable("resourceTemplateId", resourceTemplateUUID)
execution.setVariable("resourceInstanceId", resourceInstanceUUID)
execution.setVariable("resourceType", resourceName)
+ utils.log("INFO", "Delete Resource Info resourceTemplate Id :" + resourceTemplateUUID + " resourceInstanceId: " + resourceInstanceUUID + " resourceType: " + resourceName, isDebugEnabled)
}
}
}
+ utils.log("INFO", " ======== END preResourceDelete Process ======== ", isDebugEnabled)
}
}
+ \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy
index bec12906ad..996173ead5 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy
@@ -41,10 +41,10 @@ import org.openecomp.mso.rest.RESTConfig
import org.openecomp.mso.rest.APIResponse;
/**
- * This groovy class supports the <class>DODeleteVFCNetworkServiceInstance.bpmn</class> process.
+ * This groovy class supports the <class>DoDeleteVFCNetworkServiceInstance.bpmn</class> process.
* flow for E2E ServiceInstance Delete
*/
-public class DODeleteVFCNetworkServiceInstance extends AbstractServiceTaskProcessor {
+public class DoDeleteVFCNetworkServiceInstance extends AbstractServiceTaskProcessor {
String deleteUrl = "/vfc/vfcadapters/v1/ns/{nsInstanceId}"
@@ -64,21 +64,21 @@ public class DODeleteVFCNetworkServiceInstance extends AbstractServiceTaskProces
public void preProcessRequest (Execution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
String msg = ""
- utils.log("DEBUG", " *** preProcessRequest() *** ", isDebugEnabled)
+ utils.log("INFO", " *** preProcessRequest() *** ", isDebugEnabled)
try {
//deal with operation key
String globalSubscriberId = execution.getVariable("globalSubscriberId")
- utils.log("DEBUG", "globalSubscriberId:" + globalSubscriberId, isDebugEnabled)
+ utils.log("INFO", "globalSubscriberId:" + globalSubscriberId, isDebugEnabled)
String serviceType = execution.getVariable("serviceType")
- utils.log("DEBUG", "serviceType:" + serviceType, isDebugEnabled)
+ utils.log("INFO", "serviceType:" + serviceType, isDebugEnabled)
String serviceId = execution.getVariable("serviceId")
- utils.log("DEBUG", "serviceId:" + serviceId, isDebugEnabled)
+ utils.log("INFO", "serviceId:" + serviceId, isDebugEnabled)
String operationId = execution.getVariable("operationId")
- utils.log("DEBUG", "serviceType:" + serviceType, isDebugEnabled)
+ utils.log("INFO", "serviceType:" + serviceType, isDebugEnabled)
String nodeTemplateUUID = execution.getVariable("resourceTemplateUUID")
- utils.log("DEBUG", "nodeTemplateUUID:" + nodeTemplateUUID, isDebugEnabled)
+ utils.log("INFO", "nodeTemplateUUID:" + nodeTemplateUUID, isDebugEnabled)
String nsInstanceId = execution.getVariable("resourceInstanceId")
- utils.log("DEBUG", "nsInstanceId:" + nsInstanceId, isDebugEnabled)
+ utils.log("INFO", "nsInstanceId:" + nsInstanceId, isDebugEnabled)
String nsOperationKey = "{\"globalSubscriberId\":\"" + globalSubscriberId + "\",\"serviceType:\""
+ serviceType + "\",\"serviceId\":\"" + serviceId + "\",\"operationId\":\"" + operationId
+"\",\"nodeTemplateUUID\":\"" + nodeTemplateUUID + "\"}";
@@ -87,16 +87,18 @@ public class DODeleteVFCNetworkServiceInstance extends AbstractServiceTaskProces
throw e;
} catch (Exception ex){
msg = "Exception in preProcessRequest " + ex.getMessage()
- utils.log("DEBUG", msg, isDebugEnabled)
+ utils.log("INFO", msg, isDebugEnabled)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
- utils.log("DEBUG"," ***** Exit preProcessRequest *****", isDebugEnabled)
+ utils.log("INFO"," ***** Exit preProcessRequest *****", isDebugEnabled)
}
/**
* delete NS task
*/
public void deleteNetworkService(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO", " *** deleteNetworkService start *** ", isDebugEnabled)
String nsOperationKey = excution.getVariable("nsOperationKey");
String url = deleteUrl.replaceAll("{nsInstanceId}", execution.getVariable("nsInstanceId"))
APIResponse apiResponse = deleteRequest(url, reqBody)
@@ -107,12 +109,16 @@ public class DODeleteVFCNetworkServiceInstance extends AbstractServiceTaskProces
operationStatus = "finished"
}
execution.setVariable("operationStatus", operationStatus)
+
+ utils.log("INFO", " *** deleteNetworkService end *** ", isDebugEnabled)
}
/**
* instantiate NS task
*/
public void terminateNetworkService(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO", " *** terminateNetworkService start *** ", isDebugEnabled)
String nsOperationKey = execution.getVariable("nsOperationKey")
String url = terminateUrl.replaceAll("{nsInstanceId}", execution.getVariable("nsInstanceId"))
APIResponse apiResponse = postRequest(url, reqBody)
@@ -123,12 +129,15 @@ public class DODeleteVFCNetworkServiceInstance extends AbstractServiceTaskProces
jobId = jsonUtil.getJsonValue(aaiResponseAsString, "jobId")
}
execution.setVariable("jobId", nsInstanceId)
+ utils.log("INFO", " *** terminateNetworkService end *** ", isDebugEnabled)
}
/**
* query NS task
*/
public void queryNSProgress(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO", " *** queryNSProgress start *** ", isDebugEnabled)
String jobId = execution.getVariable("jobId")
String nsOperationKey = excution.getVariable("nsOperationKey");
String url = queryJobUrl.replaceAll("{jobId}", execution.getVariable("jobId"))
@@ -140,6 +149,7 @@ public class DODeleteVFCNetworkServiceInstance extends AbstractServiceTaskProces
operationProgress = jsonUtil.getJsonValue(aaiResponseAsString, "responseDescriptor.progress")
}
exection.setVariable("operationProgress", operationProgress)
+ utils.log("INFO", " *** queryNSProgress end *** ", isDebugEnabled)
}
/**
@@ -148,8 +158,8 @@ public class DODeleteVFCNetworkServiceInstance extends AbstractServiceTaskProces
public void timeDelay(Execution execution) {
try {
Thread.sleep(5000);
- } catch(InterruptedException e) {
- taskProcessor.utils.log("ERROR", "Time Delay exception" + e , isDebugEnabled)
+ } catch(InterruptedException e) {
+ utils.log("INFO", "Time Delay exception" + e, isDebugEnabled)
}
}
@@ -167,17 +177,17 @@ public class DODeleteVFCNetworkServiceInstance extends AbstractServiceTaskProces
*/
private APIResponse postRequest(String url, String requestBody){
def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- taskProcessor.logDebug( " ======== Started Execute VFC adapter Post Process ======== ", isDebugEnabled)
- taskProcessor.logDebug( "url:"+url +"\nrequestBody:"+ requestBody, isDebugEnabled)
+ utils.log("INFO", " ======== Started Execute VFC adapter Post Process ======== ", isDebugEnabled)
+ utils.log("INFO", "url:"+url +"\nrequestBody:"+ requestBody, isDebugEnabled)
APIResponse apiResponse = null
try{
RESTConfig config = new RESTConfig(url);
RESTClient client = new RESTClient(config).addHeader("X-FromAppId", "MSO").addHeader("X-TransactionId", uuid).addHeader("Accept","application/json");
apiResponse = client.httpPost(requestBody)
- taskProcessor.logDebug( "response code:"+ apiResponse.getStatusCode() +"\nresponse body:"+ apiResponse.getResponseBodyAsString(), isDebugEnabled)
- taskProcessor.logDebug( "======== Completed Execute VF-C adapter Post Process ======== ", isDebugEnabled)
+ utils.log("INFO", "response code:"+ apiResponse.getStatusCode() +"\nresponse body:"+ apiResponse.getResponseBodyAsString(), isDebugEnabled)
+ utils.log("INFO", "======== Completed Execute VF-C adapter Post Process ======== ", isDebugEnabled)
}catch(Exception e){
- taskProcessor.utils.log("ERROR", "Exception occured while executing VF-C Post Call. Exception is: \n" + e, isDebugEnabled)
+ utils.log("ERROR", "Exception occured while executing VF-C Post Call. Exception is: \n" + e, isDebugEnabled)
throw new BpmnError("MSOWorkflowException")
}
return apiResponse
@@ -189,17 +199,17 @@ public class DODeleteVFCNetworkServiceInstance extends AbstractServiceTaskProces
*/
private APIResponse deleteRequest(String url, String requestBody){
def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- taskProcessor.logDebug( " ======== Started Execute VFC adapter Delete Process ======== ", isDebugEnabled)
- taskProcessor.logDebug( "url:"+url +"\nrequestBody:"+ requestBody, isDebugEnabled)
+ utils.log("INFO", " ======== Started Execute VFC adapter Delete Process ======== ", isDebugEnabled)
+ utils.log("INFO", "url:"+url +"\nrequestBody:"+ requestBody, isDebugEnabled)
APIResponse apiResponse = null
try{
RESTConfig config = new RESTConfig(url);
RESTClient client = new RESTClient(config).addHeader("X-FromAppId", "MSO").addHeader("X-TransactionId", uuid).addHeader("Accept","application/json");
apiResponse = client.httpDelete(requestBody)
- taskProcessor.logDebug( "response code:"+ apiResponse.getStatusCode() +"\nresponse body:"+ apiResponse.getResponseBodyAsString(), isDebugEnabled)
- taskProcessor.logDebug( "======== Completed Execute VF-C adapter Delete Process ======== ", isDebugEnabled)
+ utils.log("INFO", "response code:"+ apiResponse.getStatusCode() +"\nresponse body:"+ apiResponse.getResponseBodyAsString(), isDebugEnabled)
+ utils.log("INFO", "======== Completed Execute VF-C adapter Delete Process ======== ", isDebugEnabled)
}catch(Exception e){
- taskProcessor.utils.log("ERROR", "Exception occured while executing VF-C Post Call. Exception is: \n" + e, isDebugEnabled)
+ utils.log("ERROR", "Exception occured while executing VF-C Post Call. Exception is: \n" + e, isDebugEnabled)
throw new BpmnError("MSOWorkflowException")
}
return apiResponse
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy
index dba1a8b581..703ea8be6d 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy
@@ -40,6 +40,7 @@ import org.json.JSONArray;
import org.apache.commons.lang3.*
import org.apache.commons.codec.binary.Base64;
import org.springframework.web.util.UriUtils;
+import static org.apache.commons.lang3.StringUtils.*
/**
* This groovy class supports the <class>CreateVcpeResCustService.bpmn</class> process.
@@ -93,6 +94,16 @@ public class CreateVcpeResCustService extends AbstractServiceTaskProcessor {
// initialize flow variables
InitializeProcessVariables(execution)
+ //Config Inputs
+ String aaiDistDelay = execution.getVariable('URN_mso_workflow_aai_distribution_delay')
+ if (isBlank(aaiDistDelay)) {
+ msg = "URN_mso_workflow_aai_distribution_delay is null"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ execution.setVariable("aaiDistDelay", aaiDistDelay)
+ utils.log("DEBUG","AAI distribution delay: " + aaiDistDelay, isDebugEnabled)
+
// check for incoming json message/input
String createVcpeServiceRequest = execution.getVariable("bpmnRequest")
utils.logAudit(createVcpeServiceRequest)
@@ -363,24 +374,6 @@ public class CreateVcpeResCustService extends AbstractServiceTaskProcessor {
}
- public void awaitAaiDistribution(Execution execution) {
- def isDebugEnabled=execution.getVariable(DebugFlag)
-
- try {
- String tsleep = execution.getVariable("junitSleepMs")
-
- //workaround for aai replication issue
- utils.log("DEBUG", "sleeping while AAI distributes data", isDebugEnabled)
- sleep(tsleep == null ? 30000 : tsleep as Long)
-
- } catch (Exception ex) {
- // try error in method block
- String exceptionMessage = "Unexpected Error from method awaitAaiDistribution() - " + ex.getMessage()
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
- }
-
-
public void prepareCreateAllottedResourceTXC(Execution execution) {
def isDebugEnabled=execution.getVariable(DebugFlag)
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceBRG.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceBRG.groovy
index b46721c88e..54e23a97e6 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceBRG.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceBRG.groovy
@@ -89,6 +89,15 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
execution.setVariable("sdncCallbackUrl", sdncCallbackUrl)
utils.log("DEBUG","SDNC Callback URL: " + sdncCallbackUrl, isDebugEnabled)
+ String sdncReplDelay = execution.getVariable('URN_mso_workflow_sdnc_replication_delay')
+ if (isBlank(sdncReplDelay)) {
+ msg = "URN_mso_workflow_sdnc_replication_delay is null"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ execution.setVariable("sdncReplDelay", sdncReplDelay)
+ utils.log("DEBUG","SDNC replication delay: " + sdncReplDelay, isDebugEnabled)
+
//Request Inputs
if (isBlank(execution.getVariable("serviceInstanceId"))){
msg = "Input serviceInstanceId is null"
@@ -562,11 +571,6 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
String serviceInstanceId = execution.getVariable("serviceInstanceId")
String sdncRequestId = UUID.randomUUID().toString()
-
- String tsleep = execution.getVariable("junitSleepMs")
-
- //workaround for sdnc replication issue
- sleep(tsleep == null ? 5000 : tsleep as Long)
//neeed the same url as used by vfmodules
String SDNCGetRequest =
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceTXC.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceTXC.groovy
index 8a4e591654..c9edf05d6c 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceTXC.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceTXC.groovy
@@ -93,6 +93,15 @@ public class DoCreateAllottedResourceTXC extends AbstractServiceTaskProcessor{
execution.setVariable("sdncCallbackUrl", sdncCallbackUrl)
utils.log("DEBUG","SDNC Callback URL: " + sdncCallbackUrl, isDebugEnabled)
+ String sdncReplDelay = execution.getVariable('URN_mso_workflow_sdnc_replication_delay')
+ if (isBlank(sdncReplDelay)) {
+ msg = "URN_mso_workflow_sdnc_replication_delay is null"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ execution.setVariable("sdncReplDelay", sdncReplDelay)
+ utils.log("DEBUG","SDNC replication delay: " + sdncReplDelay, isDebugEnabled)
+
//Request Inputs
if (isBlank(execution.getVariable("serviceInstanceId"))){
msg = "Input serviceInstanceId is null"
@@ -554,11 +563,6 @@ public class DoCreateAllottedResourceTXC extends AbstractServiceTaskProcessor{
String serviceInstanceId = execution.getVariable("serviceInstanceId")
String sdncRequestId = UUID.randomUUID().toString()
-
- String tsleep = execution.getVariable("junitSleepMs")
-
- //workaround for sdnc replication issue
- sleep(tsleep == null ? 5000 : tsleep as Long)
//neeed the same url as used by vfmodules
String SDNCGetRequest =
@@ -606,8 +610,8 @@ public class DoCreateAllottedResourceTXC extends AbstractServiceTaskProcessor{
String txca = utils.getNodeXml(arData, "tunnelxconn-assignments")
execution.setVariable("vni", utils.getNodeText1(txca, "vni"))
- execution.setVariable("vgmuxBearerIP", utils.getNodeText1(txca, "vgmux_bearer_ip"))
- execution.setVariable("vgmuxLanIP", utils.getNodeText1(txca, "vgmux_lan_ip"))
+ execution.setVariable("vgmuxBearerIP", utils.getNodeText1(txca, "vgmux-bearer-ip"))
+ execution.setVariable("vgmuxLanIP", utils.getNodeText1(txca, "vgmux-lan-ip"))
String ari = utils.getNodeXml(arData, "allotted-resource-identifiers")
execution.setVariable("allotedResourceName", utils.getNodeText1(ari, "allotted-resource-name"))
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVcpeResCustService.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVcpeResCustService.bpmn
index 3c5e26874a..175efaf8b5 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVcpeResCustService.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVcpeResCustService.bpmn
@@ -366,9 +366,8 @@ CreateVcpeResCustService.prepareCreateServiceInstance(execution)]]></bpmn2:scrip
</camunda:connector>
</bpmn2:extensionElements>
<bpmn2:incoming>SequenceFlow_0vj46ej</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_13uceka</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0sjpja4</bpmn2:outgoing>
</bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_13uceka" sourceRef="updateInfraRequest" targetRef="ScriptTask_1e5rwka" />
<bpmn2:scriptTask id="ScriptTask_1qd3uwb" name="Post Process&#10;Create&#10;Service&#10;" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_1ky2sv9</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_0vj46ej</bpmn2:outgoing>
@@ -431,7 +430,7 @@ CreateVcpeResCustService.prepareCreateAllottedResourceTXC(execution)]]></bpmn2:s
<bpmn2:linkEventDefinition name="StartService" />
</bpmn2:intermediateCatchEvent>
<bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1as6hoa" name="GoToCreateAllottedResourcesTXC">
- <bpmn2:incoming>SequenceFlow_16acruh</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1db0ri1</bpmn2:incoming>
<bpmn2:linkEventDefinition name="CreateAllottedResourcesTXC" />
</bpmn2:intermediateThrowEvent>
<bpmn2:sequenceFlow id="SequenceFlow_15odbkz" sourceRef="IntermediateCatchEvent_1i1nwfx" targetRef="prepareCreateService_scriptTask" />
@@ -616,14 +615,15 @@ CreateVcpeResCustService.validateVnfCreate(execution)]]></bpmn2:script>
<bpmn2:outgoing>SequenceFlow_0e9e6fo</bpmn2:outgoing>
</bpmn2:callActivity>
<bpmn2:sequenceFlow id="SequenceFlow_0e9e6fo" sourceRef="CallActivity_0xt1l8t" targetRef="ExclusiveGateway_0jqgskx" />
- <bpmn2:scriptTask id="ScriptTask_1e5rwka" name="Await AAI Distribution" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_13uceka</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_16acruh</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.vcpe.scripts.*
-def CreateVcpeResCustService = new CreateVcpeResCustService()
-CreateVcpeResCustService.awaitAaiDistribution(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_16acruh" sourceRef="ScriptTask_1e5rwka" targetRef="IntermediateThrowEvent_1as6hoa" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1x88t9v" name="Await AAI Distribution&#10;&#10;">
+ <bpmn2:incoming>SequenceFlow_0sjpja4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1db0ri1</bpmn2:outgoing>
+ <bpmn2:timerEventDefinition>
+ <bpmn2:timeDuration xsi:type="bpmn2:tFormalExpression">${aaiDistDelay}</bpmn2:timeDuration>
+ </bpmn2:timerEventDefinition>
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0sjpja4" sourceRef="updateInfraRequest" targetRef="IntermediateCatchEvent_1x88t9v" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1db0ri1" sourceRef="IntermediateCatchEvent_1x88t9v" targetRef="IntermediateThrowEvent_1as6hoa" />
</bpmn2:process>
<bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
<bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
@@ -921,13 +921,6 @@ CreateVcpeResCustService.awaitAaiDistribution(execution)]]></bpmn2:script>
<bpmndi:BPMNShape id="ServiceTask_16yhzej_di" bpmnElement="updateInfraRequest">
<dc:Bounds x="794" y="543" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_13uceka_di" bpmnElement="SequenceFlow_13uceka">
- <di:waypoint xsi:type="dc:Point" x="894" y="583" />
- <di:waypoint xsi:type="dc:Point" x="995" y="583" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="899.5" y="568" width="90" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_1qd3uwb_di" bpmnElement="ScriptTask_1qd3uwb">
<dc:Bounds x="623" y="543" width="100" height="80" />
</bpmndi:BPMNShape>
@@ -1151,9 +1144,9 @@ CreateVcpeResCustService.awaitAaiDistribution(execution)]]></bpmn2:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="IntermediateThrowEvent_1as6hoa_di" bpmnElement="IntermediateThrowEvent_1as6hoa">
- <dc:Bounds x="1027" y="712" width="36" height="36" />
+ <dc:Bounds x="1027" y="666" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1002" y="753" width="85" height="36" />
+ <dc:Bounds x="1002" y="707" width="85" height="36" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_15odbkz_di" bpmnElement="SequenceFlow_15odbkz">
@@ -1508,16 +1501,24 @@ CreateVcpeResCustService.awaitAaiDistribution(execution)]]></bpmn2:script>
<dc:Bounds x="440" y="1166" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_1e5rwka_di" bpmnElement="ScriptTask_1e5rwka">
- <dc:Bounds x="995" y="543" width="100" height="80" />
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1x88t9v_di" bpmnElement="IntermediateCatchEvent_1x88t9v">
+ <dc:Bounds x="1027" y="565" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1018" y="530" width="54" height="48" />
+ </bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_16acruh_di" bpmnElement="SequenceFlow_16acruh">
- <di:waypoint xsi:type="dc:Point" x="1045" y="623" />
- <di:waypoint xsi:type="dc:Point" x="1045" y="663" />
- <di:waypoint xsi:type="dc:Point" x="1045" y="663" />
- <di:waypoint xsi:type="dc:Point" x="1045" y="712" />
+ <bpmndi:BPMNEdge id="SequenceFlow_0sjpja4_di" bpmnElement="SequenceFlow_0sjpja4">
+ <di:waypoint xsi:type="dc:Point" x="894" y="583" />
+ <di:waypoint xsi:type="dc:Point" x="1027" y="583" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="960.5" y="562" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1db0ri1_di" bpmnElement="SequenceFlow_1db0ri1">
+ <di:waypoint xsi:type="dc:Point" x="1045" y="601" />
+ <di:waypoint xsi:type="dc:Point" x="1045" y="666" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1060" y="657" width="0" height="12" />
+ <dc:Bounds x="1060" y="627.5" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteCustomE2EServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteCustomE2EServiceInstance.bpmn
index c6a6d02e4c..2983589699 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteCustomE2EServiceInstance.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteCustomE2EServiceInstance.bpmn
@@ -34,8 +34,10 @@ ex.processJavaException(execution)]]></bpmn:script>
<camunda:in source="serviceInputParams" target="serviceInputParams" />
<camunda:in source="failIfExists" target="failIfExists" />
<camunda:in source="globalSubscriberId" target="globalSubscriberId" />
- <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" />
+ <camunda:in source="serviceType" target="serviceType" />
<camunda:in sourceExpression="1610" target="sdncVersion" />
+ <camunda:in source="operationId" target="operationId" />
+ <camunda:in source="operationType" target="operationType" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_0zf2qyk</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_07hrbs0</bpmn:outgoing>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateAllottedResourceBRG.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateAllottedResourceBRG.bpmn
index a35371e97c..b925b007cd 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateAllottedResourceBRG.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateAllottedResourceBRG.bpmn
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_DkzPAHB4EeaJwpcpVN5gXw" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_DkzPAHB4EeaJwpcpVN5gXw" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.9.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
<bpmn2:process id="DoCreateAllottedResourceBRG" name="DoCreateAllottedResourceBRG" isExecutable="true">
<bpmn2:startEvent id="StartEvent_1">
<bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
@@ -180,7 +180,7 @@ dcar.validateSDNCResp(execution, response, "activate" )]]></bpmn2:script>
<bpmn2:outgoing>SequenceFlow_0q1hz2p</bpmn2:outgoing>
</bpmn2:callActivity>
<bpmn2:sequenceFlow id="SequenceFlow_1iy3cqb" sourceRef="postProcessSDNCGetResponse" targetRef="generateOutputs" />
- <bpmn2:sequenceFlow id="SequenceFlow_1dgzhsm" sourceRef="UpdateAAIARActive" targetRef="PreProcessSDNCGet" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1dgzhsm" sourceRef="UpdateAAIARActive" targetRef="IntermediateCatchEvent_1f4tse6" />
<bpmn2:callActivity id="GetAAIParentSI" name="Get AAI Parent ServiceInstance&#10;" calledElement="GenericGetService">
<bpmn2:extensionElements>
<camunda:in source="parentServiceInstanceId" target="GENGS_serviceInstanceId" />
@@ -277,8 +277,8 @@ DoCreateAllottedResourceBRG dcar = new DoCreateAllottedResourceBRG()
dcar.updateAaiAROrchStatus(execution, "Created")]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:scriptTask id="PreProcessSDNCGet" name="PreProcess SDNC Get" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1dgzhsm</bpmn2:incoming>
<bpmn2:incoming>SequenceFlow_0z8luou</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0ec9eiq</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_030mhcm</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.vcpe.scripts.*
DoCreateAllottedResourceBRG dcar = new DoCreateAllottedResourceBRG()
@@ -326,6 +326,14 @@ DoCreateAllottedResourceBRG dcar = new DoCreateAllottedResourceBRG()
dcar.generateOutputs(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_09xwplc" sourceRef="generateOutputs" targetRef="EndEvent_3" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1f4tse6" name="Await SDNC Replication&#10;&#10;">
+ <bpmn2:incoming>SequenceFlow_1dgzhsm</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ec9eiq</bpmn2:outgoing>
+ <bpmn2:timerEventDefinition>
+ <bpmn2:timeDuration xsi:type="bpmn2:tFormalExpression">${sdncReplDelay}</bpmn2:timeDuration>
+ </bpmn2:timerEventDefinition>
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ec9eiq" sourceRef="IntermediateCatchEvent_1f4tse6" targetRef="PreProcessSDNCGet" />
</bpmn2:process>
<bpmn2:error id="Error_1" name="Java Lang Exception" errorCode="java.lang.Exception" />
<bpmn2:error id="Error_2" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
@@ -532,10 +540,9 @@ dcar.generateOutputs(execution)]]></bpmn2:script>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1dgzhsm_di" bpmnElement="SequenceFlow_1dgzhsm">
<di:waypoint xsi:type="dc:Point" x="964" y="624" />
- <di:waypoint xsi:type="dc:Point" x="964" y="545" />
- <di:waypoint xsi:type="dc:Point" x="1140" y="545" />
+ <di:waypoint xsi:type="dc:Point" x="964" y="563" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="979" y="584.5" width="0" height="0" />
+ <dc:Bounds x="934" y="593.5" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="CallActivity_0e73um9_di" bpmnElement="GetAAIParentSI">
@@ -730,6 +737,19 @@ dcar.generateOutputs(execution)]]></bpmn2:script>
<dc:Bounds x="575" y="980" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1f4tse6_di" bpmnElement="IntermediateCatchEvent_1f4tse6">
+ <dc:Bounds x="946" y="527" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="933" y="492" width="61" height="48" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ec9eiq_di" bpmnElement="SequenceFlow_0ec9eiq">
+ <di:waypoint xsi:type="dc:Point" x="982" y="545" />
+ <di:waypoint xsi:type="dc:Point" x="1140" y="545" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1061" y="524" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateAllottedResourceTXC.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateAllottedResourceTXC.bpmn
index 178534f797..a240bb5ffa 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateAllottedResourceTXC.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateAllottedResourceTXC.bpmn
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_DkzPAHB4EeaJwpcpVN5gXw" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_DkzPAHB4EeaJwpcpVN5gXw" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.9.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
<bpmn2:process id="DoCreateAllottedResourceTXC" name="DoCreateAllottedResourceTXC" isExecutable="true">
<bpmn2:startEvent id="StartEvent_1">
<bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
@@ -180,7 +180,6 @@ dcar.validateSDNCResp(execution, response, "activate" )]]></bpmn2:script>
<bpmn2:outgoing>SequenceFlow_0q1hz2p</bpmn2:outgoing>
</bpmn2:callActivity>
<bpmn2:sequenceFlow id="SequenceFlow_1iy3cqb" sourceRef="postProcessSDNCGetResponse" targetRef="generateOutputs" />
- <bpmn2:sequenceFlow id="SequenceFlow_1dgzhsm" sourceRef="UpdateAAIARActive" targetRef="PreProcessSDNCGet" />
<bpmn2:callActivity id="GetAAIParentSI" name="Get AAI Parent ServiceInstance&#10;" calledElement="GenericGetService">
<bpmn2:extensionElements>
<camunda:in source="parentServiceInstanceId" target="GENGS_serviceInstanceId" />
@@ -262,7 +261,7 @@ dcar.postProcessRollback(execution)]]></bpmn2:script>
</bpmn2:subProcess>
<bpmn2:scriptTask id="UpdateAAIARActive" name="Update AAI AR Active" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_00i7x43</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1dgzhsm</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_07kxd8t</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.vcpe.scripts.*
DoCreateAllottedResourceTXC dcar = new DoCreateAllottedResourceTXC()
@@ -277,8 +276,8 @@ DoCreateAllottedResourceTXC dcar = new DoCreateAllottedResourceTXC()
dcar.updateAaiAROrchStatus(execution, "Created")]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:scriptTask id="PreProcessSDNCGet" name="PreProcess SDNC Get" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1dgzhsm</bpmn2:incoming>
<bpmn2:incoming>SequenceFlow_0z8luou</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_08hhqb2</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_030mhcm</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.vcpe.scripts.*
DoCreateAllottedResourceTXC dcar = new DoCreateAllottedResourceTXC()
@@ -326,6 +325,15 @@ DoCreateAllottedResourceTXC dcar = new DoCreateAllottedResourceTXC()
dcar.generateOutputs(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_09xwplc" sourceRef="generateOutputs" targetRef="EndEvent_3" />
+ <bpmn2:sequenceFlow id="SequenceFlow_07kxd8t" sourceRef="UpdateAAIARActive" targetRef="IntermediateThrowEvent_0ti2fv8" />
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_0ti2fv8" name="Await SDNC Replication&#10;&#10;">
+ <bpmn2:incoming>SequenceFlow_07kxd8t</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_08hhqb2</bpmn2:outgoing>
+ <bpmn2:timerEventDefinition>
+ <bpmn2:timeDuration xsi:type="bpmn2:tFormalExpression">${sdncReplDelay}</bpmn2:timeDuration>
+ </bpmn2:timerEventDefinition>
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_08hhqb2" sourceRef="IntermediateThrowEvent_0ti2fv8" targetRef="PreProcessSDNCGet" />
</bpmn2:process>
<bpmn2:error id="Error_1" name="Java Lang Exception" errorCode="java.lang.Exception" />
<bpmn2:error id="Error_2" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
@@ -530,14 +538,6 @@ dcar.generateOutputs(execution)]]></bpmn2:script>
<dc:Bounds x="1277" y="779" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1dgzhsm_di" bpmnElement="SequenceFlow_1dgzhsm">
- <di:waypoint xsi:type="dc:Point" x="964" y="624" />
- <di:waypoint xsi:type="dc:Point" x="964" y="545" />
- <di:waypoint xsi:type="dc:Point" x="1140" y="545" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="979" y="584.5" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="CallActivity_0e73um9_di" bpmnElement="GetAAIParentSI">
<dc:Bounds x="843" y="199" width="100" height="80" />
</bpmndi:BPMNShape>
@@ -730,6 +730,26 @@ dcar.generateOutputs(execution)]]></bpmn2:script>
<dc:Bounds x="575" y="980" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_07kxd8t_di" bpmnElement="SequenceFlow_07kxd8t">
+ <di:waypoint xsi:type="dc:Point" x="964" y="624" />
+ <di:waypoint xsi:type="dc:Point" x="964" y="563" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="979" y="587.5" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_038xgwf_di" bpmnElement="IntermediateThrowEvent_0ti2fv8">
+ <dc:Bounds x="946" y="527" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="933" y="492" width="61" height="48" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_08hhqb2_di" bpmnElement="SequenceFlow_08hhqb2">
+ <di:waypoint xsi:type="dc:Point" x="982" y="545" />
+ <di:waypoint xsi:type="dc:Point" x="1140" y="545" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1061" y="524" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn
index ecdfd628bb..e39db56ee8 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn
@@ -66,7 +66,7 @@ ex.processJavaException(execution)]]></bpmn:script>
<bpmn:sequenceFlow id="SequenceFlow_0e7inkl" sourceRef="ScriptTask_01erufg" targetRef="EndEvent_1uqzt26" />
<bpmn:sequenceFlow id="SequenceFlow_0g6bxqw" sourceRef="CallActivity_06izbke" targetRef="ScriptTask_01erufg" />
<bpmn:sequenceFlow id="SequenceFlow_0vi0sv6" sourceRef="ScriptTask_1rtnsh8" targetRef="ScriptTask_146jt8v" />
- <bpmn:callActivity id="CallActivity_Del_VFC" name="Call Network Service Delete for vEPC" calledElement="DODeleteVFCNetworkServiceInstance">
+ <bpmn:callActivity id="CallActivity_Del_VFC" name="Call Network Service Delete for vEPC" calledElement="DoDeleteVFCNetworkServiceInstance">
<bpmn:extensionElements>
<camunda:in source="globalSubscriberId" target="globalSubscriberId" />
<camunda:in source="serviceType" target="serviceType" />
@@ -129,7 +129,7 @@ def ddsi = new DoCustomDeleteE2EServiceInstance()
ddsi.preResourceDelete(execution, resourceName )]]></bpmn:script>
</bpmn:scriptTask>
<bpmn:sequenceFlow id="SequenceFlow_1m7tont" sourceRef="ScriptTask_1g0tsto" targetRef="Task_0z1x3sg" />
- <bpmn:callActivity id="Task_0963dho" name="Call Network Service Delete for vIMS" calledElement="DODeleteVFCNetworkServiceInstance">
+ <bpmn:callActivity id="Task_0963dho" name="Call Network Service Delete for vIMS" calledElement="DoDeleteVFCNetworkServiceInstance">
<bpmn:extensionElements>
<camunda:in source="globalSubscriberId" target="globalSubscriberId" />
<camunda:in source="serviceType" target="serviceType" />
@@ -182,7 +182,7 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">#{BasicAuthHeaderValueDB}</camunda:entry>
+ <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_initResOperStatusRequest}</camunda:inputParameter>
@@ -207,6 +207,8 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn:script>
<camunda:out source="WorkflowException" target="WorkflowException" />
<camunda:out source="GENGS_siResourceLink" target="GENGS_siResourceLink" />
<camunda:out source="GENGS_service" target="GENGS_service" />
+ <camunda:in source="globalSubscriberId" target="GENGS_globalCustomerId" />
+ <camunda:in source="serviceType" target="GENGS_serviceType" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_11e6bfy</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_188ejvu</bpmn:outgoing>
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceTest.groovy b/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceTest.groovy
new file mode 100644
index 0000000000..1e56984621
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceTest.groovy
@@ -0,0 +1,137 @@
+package org.openecomp.mso.bpmn.infrastructure.scripts
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.junit.Before
+import org.junit.BeforeClass
+import org.junit.Rule
+import org.junit.Test
+import org.mockito.MockitoAnnotations
+import org.openecomp.mso.bpmn.infrastructure.scripts.DoCustomDeleteE2EServiceInstance
+import org.openecomp.mso.bpmn.mock.FileUtil
+import org.openecomp.mso.bpmn.vcpe.scripts.GroovyTestBase
+
+import static org.mockito.Mockito.verify
+import static org.mockito.Mockito.when
+import static org.mockito.Mockito.when
+import static org.mockito.Mockito.when
+import static org.mockito.Mockito.when
+import static org.mockito.Mockito.when
+import static org.mockito.Mockito.when
+import static org.mockito.Mockito.when
+
+class DoCustomDeleteE2EServiceInstanceTest extends GroovyTestBase {
+
+ private static String request
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(GroovyTestBase.PORT)
+
+ String Prefix = "CVRCS_"
+ String RbType = "DCRENI_"
+
+ @BeforeClass
+ public static void setUpBeforeClass() {
+ request = FileUtil.readResourceFile("__files/InfrastructureFlows/DeleteCustomE2EService.json")
+ }
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+ public DoCustomDeleteE2EServiceInstanceTest(){
+ super("DoCustomDeleteE2EServiceInstance")
+ }
+
+ @Test
+ public void preProcessRequestTest(){
+
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+
+ DoCustomDeleteE2EServiceInstance instance = new DoCustomDeleteE2EServiceInstance()
+ instance.preProcessRequest(mex)
+ verify(mex).setVariable("sdncCallbackUrl", "/mso/sdncadapter/")
+ verify(mex).setVariable("siParamsXml", "")
+ }
+
+ @Test
+ public void postProcessAAIGETTest(){
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+ when(mex.getVariable("GENGS_SuccessIndicator")).thenReturn(true)
+
+ String aaiGetResponse = FileUtil.readResourceFile("__files/GenericFlows/aaiGetResponse.xml")
+ when(mex.getVariable("GENGS_service")).thenReturn(aaiGetResponse)
+ DoCustomDeleteE2EServiceInstance instance = new DoCustomDeleteE2EServiceInstance()
+ instance.postProcessAAIGET(mex)
+ verify(mex).setVariable("subscriptionServiceType", "e2eserviceInstance/delete")
+ }
+
+ @Test
+ public void preInitResourcesOperStatusTest(){
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+ when(mex.getVariable("serviceRelationShip")).thenReturn("[{\"resourceInstanceId\":\"3333\",\"resourceType\":\"overlay\"},{\"resourceInstanceId\":\"4444\",\"resourceType\":\"underlay\"},{\"resourceInstanceId\":\"1111\",\"resourceType\":\"vIMS\"},{\"resourceInstanceId\":\"222\",\"resourceType\":\"vEPC\"}]")
+ DoCustomDeleteE2EServiceInstance instance = new DoCustomDeleteE2EServiceInstance()
+ instance.preInitResourcesOperStatus(mex)
+ verify(mex).setVariable("CVFMI_dbAdapterEndpoint", "http://localhost:8080/mso")
+ }
+
+ @Test
+ public void preResourceDeleteTest() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+ when(mex.getVariable("serviceRelationShip")).thenReturn("[{\"resourceInstanceId\":\"3333\",\"resourceType\":\"overlay\"},{\"resourceInstanceId\":\"4444\",\"resourceType\":\"underlay\"},{\"resourceInstanceId\":\"1111\",\"resourceType\":\"vIMS\"},{\"resourceInstanceId\":\"222\",\"resourceType\":\"vEPC\"}]")
+ DoCustomDeleteE2EServiceInstance instance = new DoCustomDeleteE2EServiceInstance()
+ instance.preResourceDelete(mex,"overlay")
+ verify(mex).setVariable("resourceType", "overlay")
+ }
+
+
+ @Test
+ public void postProcessSDNCDeleteTest(){
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+ when(mex.getVariable("SDNCA_SuccessIndicator")).thenReturn("true")
+ when(mex.getVariable("DDELSI_sdncResponseSuccess")).thenReturn("true")
+ when(mex.getVariable("prefix")).thenReturn("DDELSI_")
+ DoCustomDeleteE2EServiceInstance instance = new DoCustomDeleteE2EServiceInstance()
+ String response = FileUtil.readResourceFile("__files/GenericFlows/SDNCDeleteResponse.xml")
+ String method = "deleteE2E";
+ instance.postProcessSDNCDelete(mex, response, method)
+ verify(mex).setVariable("DDELSI_sdncRequestDataResponseCode", "0")
+ }
+
+ @Test
+ public void postProcessAAIDELTest() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+ when(mex.getVariable("GENDS_SuccessIndicator")).thenReturn("true")
+ DoCustomDeleteE2EServiceInstance instance = new DoCustomDeleteE2EServiceInstance()
+ instance.postProcessAAIDEL(mex)
+ }
+
+ private void initPreProcess(ExecutionEntity mex) {
+ when(mex.getVariable(GroovyTestBase.DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("bpmnRequest")).thenReturn(request)
+ when(mex.getVariable("mso-request-id")).thenReturn("mri")
+ when(mex.getVariable("serviceType")).thenReturn("VoLTE")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("e151059a-d924-4629-845f-264db19e50b4")
+ when(mex.getVariable("requestAction")).thenReturn("ra")
+ when(mex.getVariable("operationId")).thenReturn("59960003992")
+ when(mex.getVariable("URN_mso_workflow_sdncadapter_callback")).thenReturn("/mso/sdncadapter/")
+ when(mex.getVariable("GENGS_FoundIndicator")).thenReturn("true")
+ when(mex.getVariable("GENGS_siResourceLink")).thenReturn("/service-subscription/e2eserviceInstance/delete/service-instances/")
+ when(mex.getVariable("globalSubscriberId")).thenReturn("4993921112123")
+ when(mex.getVariable("GENGS_service")).thenReturn("test3434")
+ when(mex.getVariable("URN_mso_openecomp_adapters_db_endpoint")).thenReturn("http://localhost:8080/mso")
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustServiceTest.groovy b/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustServiceTest.groovy
index f646eae130..f0645b2bc7 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustServiceTest.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustServiceTest.groovy
@@ -85,7 +85,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
// ***** preProcessRequest *****
@Test
- @Ignore
+ // @Ignore
public void preProcessRequest() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
@@ -96,6 +96,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
verify(mex).getVariable(DBGFLAG)
verify(mex).setVariable("prefix", Prefix)
+ verify(mex).setVariable("aaiDistDelay", "aaidelay")
verify(mex).setVariable("createVcpeServiceRequest", request)
verify(mex).setVariable("msoRequestId", "mri")
assertEquals("sii", map.get("serviceInstanceId"))
@@ -118,7 +119,21 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
+ public void preProcessRequest_MissingAaiDistDelay() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+
+ when(mex.getVariable("URN_mso_workflow_aai_distribution_delay")).thenReturn(null)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.preProcessRequest(mex) }))
+ }
+
+ @Test
+ // @Ignore
public void preProcessRequest_EmptyParts() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
@@ -160,7 +175,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void preProcessRequest_MissingSubscriberId() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
@@ -178,7 +193,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void preProcessRequest_BpmnError() {
ExecutionEntity mex = setupMock()
initPreProcess(mex)
@@ -191,7 +206,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void preProcessRequest_Ex() {
ExecutionEntity mex = setupMock()
initPreProcess(mex)
@@ -206,7 +221,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
// ***** sendSyncResponse *****
@Test
- @Ignore
+ // @Ignore
public void sendSyncResponse() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
@@ -229,7 +244,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void sendSyncResponse_Ex() {
ExecutionEntity mex = setupMock()
initSendSyncResponse(mex)
@@ -245,7 +260,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
// ***** prepareDecomposeService *****
@Test
- @Ignore
+ // @Ignore
public void prepareDecomposeService() {
ExecutionEntity mex = setupMock()
initPrepareDecomposeService(mex)
@@ -258,7 +273,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void prepareDecomposeService_Ex() {
ExecutionEntity mex = setupMock()
initPrepareDecomposeService(mex)
@@ -274,7 +289,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
// ***** prepareCreateServiceInstance *****
@Test
- @Ignore
+ // @Ignore
public void prepareCreateServiceInstance() {
ExecutionEntity mex = setupMock()
initPrepareCreateServiceInstance(mex)
@@ -288,7 +303,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void prepareCreateServiceInstance_Ex() {
ExecutionEntity mex = setupMock()
initPrepareCreateServiceInstance(mex)
@@ -304,7 +319,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
// ***** postProcessServiceInstanceCreate *****
@Test
- @Ignore
+ // @Ignore
public void postProcessServiceInstanceCreate() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
@@ -323,7 +338,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void postProcessServiceInstanceCreate_BpmnError() {
ExecutionEntity mex = setupMock()
initPostProcessServiceInstanceCreate(mex)
@@ -336,7 +351,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void postProcessServiceInstanceCreate_Ex() {
ExecutionEntity mex = setupMock()
initPostProcessServiceInstanceCreate(mex)
@@ -352,7 +367,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
// ***** processDecomposition *****
@Test
- @Ignore
+ // @Ignore
public void processDecomposition() {
ExecutionEntity mex = setupMock()
def svcdecomp = initProcessDecomposition(mex, true, true)
@@ -371,7 +386,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void processDecomposition_EmptyNet_EmptyVnf() {
ExecutionEntity mex = setupMock()
def svcdecomp = initProcessDecomposition(mex, true, true)
@@ -392,7 +407,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void processDecomposition_Ex() {
ExecutionEntity mex = setupMock()
def svcdecomp = initProcessDecomposition(mex, true, true)
@@ -405,26 +420,10 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
}
- // ***** awaitAaiDistribution *****
-
- @Test
- @Ignore
- public void awaitAaiDistribution() {
- ExecutionEntity mex = setupMock()
- initAwaitAaiDistribution(mex)
-
- CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
- CreateVcpeResCustService.awaitAaiDistribution(mex)
-
- verify(mex).getVariable(DBGFLAG)
- verify(mex).getVariable("junitSleepMs")
- }
-
-
// ***** prepareCreateAllottedResourceTXC *****
@Test
- @Ignore
+ // @Ignore
public void prepareCreateAllottedResourceTXC() {
ExecutionEntity mex = setupMock()
initPrepareCreateAllottedResourceTXC(mex)
@@ -442,7 +441,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void prepareCreateAllottedResourceTXC_NullArList() {
ExecutionEntity mex = setupMock()
def svcdecomp = initPrepareCreateAllottedResourceTXC(mex)
@@ -462,7 +461,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void prepareCreateAllottedResourceTXC_Ex() {
ExecutionEntity mex = setupMock()
initPrepareCreateAllottedResourceTXC(mex)
@@ -478,7 +477,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
// ***** prepareCreateAllottedResourceBRG *****
@Test
- @Ignore
+ // @Ignore
public void prepareCreateAllottedResourceBRG() {
ExecutionEntity mex = setupMock()
initPrepareCreateAllottedResourceBRG(mex)
@@ -496,7 +495,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void prepareCreateAllottedResourceBRG_NullArList() {
ExecutionEntity mex = setupMock()
def svcdecomp = initPrepareCreateAllottedResourceBRG(mex)
@@ -516,7 +515,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void prepareCreateAllottedResourceBRG_Ex() {
ExecutionEntity mex = setupMock()
initPrepareCreateAllottedResourceBRG(mex)
@@ -532,7 +531,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
// ***** prepareVnfAndModulesCreate *****
@Test
- @Ignore
+ // @Ignore
public void prepareVnfAndModulesCreate() {
ExecutionEntity mex = setupMock()
initPrepareVnfAndModulesCreate(mex)
@@ -548,7 +547,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void prepareVnfAndModulesCreate_EmptyList() {
ExecutionEntity mex = setupMock()
initPrepareVnfAndModulesCreate(mex)
@@ -566,7 +565,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void prepareVnfAndModulesCreate_NullList() {
ExecutionEntity mex = setupMock()
initPrepareVnfAndModulesCreate(mex)
@@ -584,7 +583,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void prepareVnfAndModulesCreate_Ex() {
ExecutionEntity mex = setupMock()
initPrepareVnfAndModulesCreate(mex)
@@ -600,7 +599,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
// ***** validateVnfCreate *****
@Test
- @Ignore
+ // @Ignore
public void validateVnfCreate() {
ExecutionEntity mex = setupMock()
initValidateVnfCreate(mex)
@@ -614,7 +613,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void validateVnfCreate_Ex() {
ExecutionEntity mex = setupMock()
initValidateVnfCreate(mex)
@@ -630,7 +629,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
// ***** postProcessResponse *****
@Test
- @Ignore
+ // @Ignore
public void postProcessResponse() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
@@ -651,7 +650,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void postProcessResponse_BpmnError() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
@@ -665,7 +664,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void postProcessResponse_Ex() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
@@ -682,7 +681,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
// ***** preProcessRollback *****
@Test
- @Ignore
+ // @Ignore
public void preProcessRollback() {
ExecutionEntity mex = setupMock()
def wfe = initPreProcessRollback(mex)
@@ -696,7 +695,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void preProcessRollback_NullWfe() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
@@ -713,7 +712,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void preProcessRollback_BpmnError() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
@@ -730,7 +729,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void preProcessRollback_Ex() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
@@ -750,7 +749,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
// ***** postProcessRollback *****
@Test
- @Ignore
+ // @Ignore
public void postProcessRollback() {
ExecutionEntity mex = setupMock()
def wfe = initPostProcessRollback(mex)
@@ -764,7 +763,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void postProcessRollback_NullWfe() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
@@ -781,7 +780,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void postProcessRollback_BpmnError() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
@@ -794,7 +793,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void postProcessRollback_Ex() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
@@ -814,7 +813,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
// ***** prepareFalloutRequest *****
@Test
- @Ignore
+ // @Ignore
public void prepareFalloutRequest() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
@@ -833,7 +832,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void prepareFalloutRequest_Ex() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
@@ -849,7 +848,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
// ***** sendSyncError *****
@Test
- @Ignore
+ // @Ignore
public void sendSyncError() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
@@ -873,7 +872,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void sendSyncError_NotWfe() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
@@ -899,7 +898,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void sendSyncError_NullWfe() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
@@ -925,7 +924,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void sendSyncError_Ex() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
@@ -944,7 +943,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
// ***** processJavaException *****
@Test
- @Ignore
+ // @Ignore
public void processJavaException() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
@@ -964,7 +963,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void processJavaException_BpmnError() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
@@ -980,7 +979,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void processJavaException_Ex() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
@@ -1001,6 +1000,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
private void initPreProcess(ExecutionEntity mex) {
when(mex.getVariable(DBGFLAG)).thenReturn("true")
when(mex.getVariable("bpmnRequest")).thenReturn(request)
+ when(mex.getVariable("URN_mso_workflow_aai_distribution_delay")).thenReturn("aaidelay")
when(mex.getVariable("mso-request-id")).thenReturn("mri")
when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
when(mex.getVariable("requestAction")).thenReturn("ra")
@@ -1055,7 +1055,6 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
private initAwaitAaiDistribution(ExecutionEntity mex) {
when(mex.getVariable(DBGFLAG)).thenReturn("true")
- when(mex.getVariable("junitSleepMs")).thenReturn("5")
}
private ServiceDecomposition initPrepareCreateAllottedResourceTXC(ExecutionEntity mex) {
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGTest.groovy b/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGTest.groovy
index 1d4d3ea5a3..ecf3869b6e 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGTest.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGTest.groovy
@@ -89,6 +89,7 @@ class DoCreateAllottedResourceBRGTest extends GroovyTestBase {
verify(mex).setVariable("prefix", Prefix)
assertTrue(checkMissingPreProcessRequest("URN_mso_workflow_sdncadapter_callback"))
+ assertTrue(checkMissingPreProcessRequest("URN_mso_workflow_sdnc_replication_delay"))
assertTrue(checkMissingPreProcessRequest("serviceInstanceId"))
assertTrue(checkMissingPreProcessRequest("parentServiceInstanceId"))
assertTrue(checkMissingPreProcessRequest("allottedResourceModelInfo"))
@@ -886,6 +887,7 @@ class DoCreateAllottedResourceBRGTest extends GroovyTestBase {
private void initPreProcess(ExecutionEntity mex) {
when(mex.getVariable(DBGFLAG)).thenReturn("true")
when(mex.getVariable("URN_mso_workflow_sdncadapter_callback")).thenReturn("sdncurn")
+ when(mex.getVariable("URN_mso_workflow_sdnc_replication_delay")).thenReturn("sdncdelay")
when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
when(mex.getVariable("parentServiceInstanceId")).thenReturn("psii")
when(mex.getVariable("allottedResourceModelInfo")).thenReturn("armi")
@@ -963,7 +965,6 @@ class DoCreateAllottedResourceBRGTest extends GroovyTestBase {
when(mex.getVariable("aaiARGetResponse")).thenReturn("<selflink>arlink</selflink>")
when(mex.getVariable("sdncAssignResponse")).thenReturn("<response-data>&lt;object-path&gt;assignlink&lt;/object-path&gt;</response-data>")
when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
- when(mex.getVariable("junitSleepMs")).thenReturn("5")
when(mex.getVariable("sdncCallbackUrl")).thenReturn("myurl")
}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCTest.groovy b/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCTest.groovy
index 026c490eb1..64d49bbea2 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCTest.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCTest.groovy
@@ -83,7 +83,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
// ***** preProcessRequest *****
@Test
- @Ignore
+ // @Ignore
public void preProcessRequest() {
ExecutionEntity mex = setupMock()
initPreProcess(mex)
@@ -95,6 +95,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
verify(mex).setVariable("prefix", Prefix)
assertTrue(checkMissingPreProcessRequest("URN_mso_workflow_sdncadapter_callback"))
+ assertTrue(checkMissingPreProcessRequest("URN_mso_workflow_sdnc_replication_delay"))
assertTrue(checkMissingPreProcessRequest("serviceInstanceId"))
assertTrue(checkMissingPreProcessRequest("parentServiceInstanceId"))
assertTrue(checkMissingPreProcessRequest("allottedResourceModelInfo"))
@@ -107,7 +108,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
// ***** getAaiAR *****
@Test
- @Ignore
+ // @Ignore
public void getAaiAR() {
MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXC/getArTxc.xml")
@@ -121,7 +122,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void getAaiAR_Duplicate() {
MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXC/getArTxc.xml")
@@ -137,7 +138,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void getAaiAR_NotActive() {
MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXC/getArTxc.xml")
@@ -153,7 +154,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void getAaiAR_NoStatus() {
MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXC/getArTxc.xml")
@@ -172,7 +173,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
// ***** createAaiAR *****
@Test
- @Ignore
+ // @Ignore
public void createAaiAR() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
@@ -196,7 +197,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void createAaiAR_NoArid_NoModelUuids() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
@@ -226,7 +227,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void createAaiAR_MissingPsiLink() {
ExecutionEntity mex = setupMock()
initCreateAaiAr(mex)
@@ -241,7 +242,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void createAaiAR_HttpFailed() {
ExecutionEntity mex = setupMock()
initCreateAaiAr(mex)
@@ -254,7 +255,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void createAaiAR_BpmnError() {
ExecutionEntity mex = setupMock()
initCreateAaiAr(mex)
@@ -269,7 +270,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void createAaiAR_Ex() {
ExecutionEntity mex = setupMock()
initCreateAaiAr(mex)
@@ -287,7 +288,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
// ***** buildSDNCRequest *****
@Test
- @Ignore
+ // @Ignore
public void buildSDNCRequest() {
ExecutionEntity mex = setupMock()
initBuildSDNCRequest(mex)
@@ -312,7 +313,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void buildSDNCRequest_Ex() {
ExecutionEntity mex = setupMock()
initBuildSDNCRequest(mex)
@@ -328,7 +329,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
// ***** preProcessSDNCAssign *****
@Test
- @Ignore
+ // @Ignore
public void preProcessSDNCAssign() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
@@ -354,7 +355,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void preProcessSDNCAssign_BpmnError() {
ExecutionEntity mex = setupMock()
initPreProcessSDNC(mex)
@@ -367,7 +368,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void preProcessSDNCAssign_Ex() {
ExecutionEntity mex = setupMock()
initPreProcessSDNC(mex)
@@ -383,7 +384,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
// ***** preProcessSDNCCreate *****
@Test
- @Ignore
+ // @Ignore
public void preProcessSDNCCreate() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
@@ -410,7 +411,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void preProcessSDNCCreate_BpmnError() {
ExecutionEntity mex = setupMock()
initPreProcessSDNC(mex)
@@ -423,7 +424,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void preProcessSDNCCreate_Ex() {
ExecutionEntity mex = setupMock()
initPreProcessSDNC(mex)
@@ -439,7 +440,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
// ***** preProcessSDNCActivate *****
@Test
- @Ignore
+ // @Ignore
public void preProcessSDNCActivate() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
@@ -466,7 +467,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void preProcessSDNCActivate_BpmnError() {
ExecutionEntity mex = setupMock()
initPreProcessSDNC(mex)
@@ -479,7 +480,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void preProcessSDNCActivate_Ex() {
ExecutionEntity mex = setupMock()
initPreProcessSDNC(mex)
@@ -495,7 +496,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
// ***** validateSDNCResp *****
@Test
- @Ignore
+ // @Ignore
public void validateSDNCResp() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
@@ -519,7 +520,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void validateSDNCResp_Get() {
ExecutionEntity mex = setupMock()
def data = initValidateSDNCResp(mex)
@@ -538,7 +539,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void validateSDNCResp_Unsuccessful() {
ExecutionEntity mex = setupMock()
initValidateSDNCResp(mex)
@@ -553,7 +554,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void validateSDNCResp_BpmnError() {
ExecutionEntity mex = setupMock()
initValidateSDNCResp(mex)
@@ -567,7 +568,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void validateSDNCResp_Ex() {
ExecutionEntity mex = setupMock()
initValidateSDNCResp(mex)
@@ -584,7 +585,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
// ***** preProcessSDNCGet *****
@Test
- @Ignore
+ // @Ignore
public void preProcessSDNCGet_FoundAR() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
@@ -603,7 +604,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void preProcessSDNCGet_NotFoundAR() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
@@ -624,7 +625,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void preProcessSDNCGet_Ex() {
ExecutionEntity mex = setupMock()
initPreProcessSDNCGet(mex)
@@ -640,7 +641,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
// ***** updateAaiAROrchStatus *****
@Test
- @Ignore
+ // @Ignore
public void updateAaiAROrchStatus() {
MockPatchAllottedResource(CUST, SVC, INST, ARID)
@@ -655,7 +656,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
// ***** generateOutputs *****
@Test
- @Ignore
+ // @Ignore
public void generateOutputs() {
ExecutionEntity mex = setupMock()
def txctop = FileUtil.readResourceFile("__files/VCPE/DoCreateAllottedResourceTXC/SDNCTopologyQueryCallback.xml")
@@ -674,7 +675,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void generateOutputs_BadXml() {
ExecutionEntity mex = setupMock()
@@ -689,7 +690,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void generateOutputs_BpmnError() {
ExecutionEntity mex = setupMock()
@@ -704,7 +705,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void generateOutputs_Ex() {
ExecutionEntity mex = setupMock()
@@ -722,7 +723,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
// ***** preProcessRollback *****
@Test
- @Ignore
+ // @Ignore
public void preProcessRollback() {
ExecutionEntity mex = setupMock()
WorkflowException wfe = mock(WorkflowException.class)
@@ -738,7 +739,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void preProcessRollback_NotWFE() {
ExecutionEntity mex = setupMock()
@@ -753,7 +754,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void preProcessRollback_BpmnError() {
ExecutionEntity mex = setupMock()
@@ -767,7 +768,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void preProcessRollback_Ex() {
ExecutionEntity mex = setupMock()
@@ -784,7 +785,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
// ***** postProcessRollback *****
@Test
- @Ignore
+ // @Ignore
public void postProcessRollback() {
ExecutionEntity mex = setupMock()
WorkflowException wfe = mock(WorkflowException.class)
@@ -801,7 +802,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void postProcessRollback_NotWFE() {
ExecutionEntity mex = setupMock()
@@ -817,7 +818,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void postProcessRollback_BpmnError() {
ExecutionEntity mex = setupMock()
@@ -832,7 +833,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
}
@Test
- @Ignore
+ // @Ignore
public void postProcessRollback_Ex() {
ExecutionEntity mex = setupMock()
@@ -860,6 +861,7 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
private void initPreProcess(ExecutionEntity mex) {
when(mex.getVariable(DBGFLAG)).thenReturn("true")
when(mex.getVariable("URN_mso_workflow_sdncadapter_callback")).thenReturn("sdncurn")
+ when(mex.getVariable("URN_mso_workflow_sdnc_replication_delay")).thenReturn("sdncdelay")
when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
when(mex.getVariable("parentServiceInstanceId")).thenReturn("psii")
when(mex.getVariable("allottedResourceModelInfo")).thenReturn("armi")
@@ -923,7 +925,6 @@ class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
when(mex.getVariable("aaiARGetResponse")).thenReturn("<selflink>arlink</selflink>")
when(mex.getVariable("sdncAssignResponse")).thenReturn("<response-data>&lt;object-path&gt;assignlink&lt;/object-path&gt;</response-data>")
when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
- when(mex.getVariable("junitSleepMs")).thenReturn("5")
when(mex.getVariable("sdncCallbackUrl")).thenReturn("myurl")
}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/vcpe/CreateVcpeResCustServiceTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/vcpe/CreateVcpeResCustServiceTest.java
index 38461de5a0..0af43a2c42 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/vcpe/CreateVcpeResCustServiceTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/vcpe/CreateVcpeResCustServiceTest.java
@@ -371,7 +371,6 @@ public class CreateVcpeResCustServiceTest extends AbstractTestBase {
variables.put("request-id", "testRequestId");
variables.put("serviceInstanceId", DEC_INST);
variables.put("allottedResourceId", ARID);
- variables.put("junitSleepMs", "5");
return variables;
}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/vcpe/DoCreateAllottedResourceBRGTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/vcpe/DoCreateAllottedResourceBRGTest.java
index 5b6f74fc7d..0373266ce1 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/vcpe/DoCreateAllottedResourceBRGTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/vcpe/DoCreateAllottedResourceBRGTest.java
@@ -277,7 +277,6 @@ public class DoCreateAllottedResourceBRGTest extends AbstractTestBase {
variables.put("vni", "BRG");
variables.put("vgmuxBearerIP", "bearerip");
variables.put("brgWanMacAddress", "wanmac");
- variables.put("junitSleepMs", "5");
variables.put("serviceInstanceId", DEC_INST);
variables.put("parentServiceInstanceId", DEC_PARENT_INST);
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/SDNCTopologyQueryTXCCallback.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/SDNCTopologyQueryTXCCallback.xml
index 9b201d9808..05583cd7aa 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/SDNCTopologyQueryTXCCallback.xml
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/SDNCTopologyQueryTXCCallback.xml
@@ -16,8 +16,8 @@
</allotted-resource-identifiers>
<tunnelxconn-assignments>
<vni>my-vni</vni>
- <vgmux_bearer_ip>my-bearer-ip</vgmux_bearer_ip>
- <vgmux_lan_ip>my-lan-ip</vgmux_lan_ip>
+ <vgmux-bearer-ip>my-bearer-ip</vgmux-bearer-ip>
+ <vgmux-lan-ip>my-lan-ip</vgmux-lan-ip>
</tunnelxconn-assignments>
</tunnelxconn-topology>
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/SDNCTopologyQueryCallback.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/SDNCTopologyQueryCallback.xml
index 9b201d9808..05583cd7aa 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/SDNCTopologyQueryCallback.xml
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/SDNCTopologyQueryCallback.xml
@@ -16,8 +16,8 @@
</allotted-resource-identifiers>
<tunnelxconn-assignments>
<vni>my-vni</vni>
- <vgmux_bearer_ip>my-bearer-ip</vgmux_bearer_ip>
- <vgmux_lan_ip>my-lan-ip</vgmux_lan_ip>
+ <vgmux-bearer-ip>my-bearer-ip</vgmux-bearer-ip>
+ <vgmux-lan-ip>my-lan-ip</vgmux-lan-ip>
</tunnelxconn-assignments>
</tunnelxconn-topology>
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/mso.bpmn.urn.properties b/bpmn/MSOInfrastructureBPMN/src/test/resources/mso.bpmn.urn.properties
index aad79b00f0..325ee3ce97 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/mso.bpmn.urn.properties
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/mso.bpmn.urn.properties
@@ -40,6 +40,8 @@ mso.sdnc.timeout.ucpe.async.hours=120
mso.sdnc.timeout.ucpe.async.minutes=5
mso.workflow.message.endpoint=http://localhost:28080/mso/WorkflowMesssage
mso.workflow.sdncadapter.callback=http://localhost:28080/mso/SDNCAdapterCallbackService
+mso.workflow.sdnc.replication.delay=PT0.01S
+mso.workflow.aai.distribution.delay=PT0.01S
mso.catalog.db.endpoint=http://localhost:28090
diff --git a/docs/Install_Configure_SO.rst b/docs/Install_Configure_SO.rst
index a1a9bf4317..3f7b903ac8 100644
--- a/docs/Install_Configure_SO.rst
+++ b/docs/Install_Configure_SO.rst
@@ -2,7 +2,7 @@
.. http://creativecommons.org/licenses/by/4.0
.. Copyright 2017 Huawei Technologies Co., Ltd.
-Install and Configure Service Orchestrator
+SO Install & Configure
==========================================
Get Ubuntu
diff --git a/docs/architecture.rst b/docs/architecture.rst
index 67cf67f745..ac7740080b 100644
--- a/docs/architecture.rst
+++ b/docs/architecture.rst
@@ -2,7 +2,7 @@
.. http://creativecommons.org/licenses/by/4.0
.. Copyright 2017 Huawei Technologies Co., Ltd.
-ONAP Service Orchestration - Architecture
+SO - Service Orchestration
========================================================
SO Architecture
diff --git a/docs/index.rst b/docs/index.rst
index 63b49fa017..4aa515b4d5 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -2,7 +2,7 @@
.. http://creativecommons.org/licenses/by/4.0
.. Copyright 2017 Huawei Technologies Co., Ltd.
-ONAP Service Orchestration Documentation
+ONAP SO
========================================
.. toctree::
diff --git a/docs/offered_consumed_apis.rst b/docs/offered_consumed_apis.rst
index abc513a900..8888c6437e 100644
--- a/docs/offered_consumed_apis.rst
+++ b/docs/offered_consumed_apis.rst
@@ -2,7 +2,7 @@
.. http://creativecommons.org/licenses/by/4.0
.. Copyright 2017 Huawei Technologies Co., Ltd.
-ONAP Service Orchestration APIs
+SO Offered and Consumed APIs
=====================================
SO APIs
diff --git a/docs/release-notes.rst b/docs/release-notes.rst
index 7c7c1371cc..66b519b89f 100644
--- a/docs/release-notes.rst
+++ b/docs/release-notes.rst
@@ -6,43 +6,54 @@
Service Orchestrator Release Notes
==================================
-.. note::
- * This Release Notes must be updated each time the team decides to Release new artifacts.
- * The scope of this Release Notes is for this particular component. In other words, each ONAP component has its Release Notes.
- * This Release Notes is cumulative, the most recently Released artifact is made visible in the top of this Release Notes.
- * Except the date and the version number, all the other sections are optional but there must be at least one section describing the purpose of this new release.
- * This note must be removed after content has been added.
Version: 1.1.0
--------------
-:Release Date: yyyy-mm-dd
+:Release Date: 2017-11-16
**New Features**
- Initial release of Service Orchestrator (SO) for Open Network Automation Platform (ONAP)
-
+The SO provides the highest level of service orchestration in the ONAP architecture.
+SO is implemented via BPMN flows that operate on Models distributed from SDC that describe the Services and associated VNFs and other Resource components.
+Cloud orchestration currently based on HEAT and TOSCA templates.
+The orchestration engine is a reusable service. Any component of the architecture can execute process workflows.
+Orchestration services can consume a process workflow and execute it.
+The service model maintains consistency and reusability across all orchestration activities and ensures consistent methods, structure and version of the workflow execution environment.
+Orchestration processes interact with other platform components or external systems via standard and well-defined APIs.
**Bug Fixes**
- - ``_ and a sentence explaining what this defect is addressing.
+This is the initial release of ONAP SO.
+Issues of the Ecomp 1710 release are fixed in this release.
+
**Known Issues**
- - ``_ and two, three sentences.
- One sentences explaining what is the issue.
-
- Another sentence explaining the impact of the issue.
-
- And an optional sentence providing a workaround.
+1. The articatfs of SO are under the openecomp/mso folder in nexus.
+ This is not impacting the release but is good to be moved to the ONAP
+2. Current SO release does not support PNF orchestration.
+ The usecases demonstrated in ONAP Amsterdam release does not include PNF.
+3. ARIA Plugin is not in full fledged in the current release.
+ The VNFs provided in the vCPE and vFW usecase are heat based and dont require ARIA.
**Security Issues**
- You may want to include a reference to CVE (Common Vulnerabilities and Exposures) `CVE <https://cve.mitre.org>`_
-
+This is the initial release of ONAP SO.
+Security aspects are not included in the current release.
**Upgrade Notes**
+This is the initial release of ONAP SO.
**Deprecation Notes**
+There is a MSO 1.0.0 SO implementation existing in the pre-R1 ONAP Gerrit system.
+The MSO1.0.0 is deprecated by the R1 release and the current release is built over this release.
+The Gerrit repos of mso/* are voided and already locked as read-only.
+Following are the deprecated SO projects in gerrit repo:
+mso
+mso/chef-repo
+mso/docker-config
+mso/libs
+mso/mso-config
**Other**
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java
index 6413c4bf57..3c40003dd0 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java
@@ -751,6 +751,11 @@ public class ServiceInstances {
private RecipeLookupResult getServiceURI (CatalogDatabase db, MsoRequest msoRequest, Action action) throws Exception {
// SERVICE REQUEST
// Construct the default service name
+ // if no source is provided then make it as VID
+// if (null == msoRequest.getRequestInfo().getSource() || msoRequest.getRequestInfo().getSource().isEmpty()){
+// msoRequest.getRequestInfo().setSource("VID");
+// }
+
// TODO need to make this a configurable property
String defaultServiceModelName = msoRequest.getRequestInfo().getSource() + "_DEFAULT";
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RequestInfo.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RequestInfo.java
index ba017fe27d..6b8cb84b3c 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RequestInfo.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RequestInfo.java
@@ -143,6 +143,9 @@ public class RequestInfo {
*
*/
public String getSource() {
+ if(null == source || source.isEmpty()){
+ source = "VID";
+ }
return source;
}