diff options
Diffstat (limited to 'bpmn/MSOInfrastructureBPMN/src')
8 files changed, 70 insertions, 22 deletions
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy index 072c3810c2..933d45066a 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy @@ -133,11 +133,76 @@ public class CreateSDNCCNetworkResource extends AbstractServiceTaskProcessor { String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
String createNetworkInput = execution.getVariable(Prefix + "networkRequest")
+ String hdrRequestId = execution.getVariable("mso-request-id")
String serviceInstanceId = execution.getVariable(Prefix + "serviceInstanceId")
-
+ String source = execution.getVariable("source")
+ String sdnc_service_id = execution.getVariable(Prefix + "sdncServiceId")
+ ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
+ String serviceType = resourceInputObj.getServiceType()
+ String serviceModelInvariantUuid = resourceInputObj.getServiceModelInfo().getModelInvariantUuid()
+ String serviceModelUuid = resourceInputObj.getServiceModelInfo().getModelUuid()
+ String serviceModelVersion = resourceInputObj.getServiceModelInfo().getModelName()
+ String serviceModelName = resourceInputObj.getServiceModelInfo().getModelVersion()
+ String globalCustomerId = resourceInputObj.getGlobalSubscriberId()
+ String modelInvariantUuid = resourceInputObj.getResourceModelInfo().getModelInvariantUuid();
+ String modelCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid()
+ String modelUuid = resourceInputObj.getResourceModelInfo().getModelUuid()
+ String modelName = resourceInputObj.getResourceModelInfo().getModelName()
+ String modelVersion = resourceInputObj.getResourceModelInfo().getModelVersion()
+ String resourceInputPrameters = resourceInputObj.getResourceParameters()
+ String netowrkInputParametersJson = jsonUtil.getJsonValue(resourceInputPrameters, "requestInputs")
+ //here convert json string to xml string
+ String netowrkInputParameters = jsonUtil.json2xml(netowrkInputParametersJson)
// 1. prepare assign topology via SDNC Adapter SUBFLOW call
String sndcTopologyCreateRequest = sdncAdapterUtils.sdncTopologyRequestRsrc(execution, createNetworkInput, serviceInstanceId, sdncCallback, sdnc_svcAction, sdnc_requestAction, null, null, null)
-
+ String content =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.openecomp.mso/workflow/sdnc/adapter/schema/v1"
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${hdrRequestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${serviceInstanceId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${sdnc_svcAction}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${hdrRequestId}</request-id>
+ <request-action>${sdnc_requestAction}</request-action>
+ <source>${source}</source>
+ <notification-url></notification-url>
+ <order-number></order-number>
+ <order-version></order-version>
+ </request-information>
+ <service-information>
+ <service-id>${sdnc_service_id}</service-id>
+ <subscription-service-type>${serviceType}</subscription-service-type>
+ <ecomp-model-information>
+ <model-invariant-uuid>${serviceModelInvariantUuid}</model-invariant-uuid>
+ <model-uuid>${serviceModelUuid}</model-uuid>
+ <model-version>${serviceModelVersion}</model-version>
+ <model-name>${serviceModelName}</model-name>
+ </ecomp-model-information>
+ <service-instance-id>${serviceInstanceId}</service-instance-id>
+ <global-customer-id>${globalCustomerId}</global-customer-id>
+ </service-information>
+ <network-information>
+ <ecomp-model-information>
+ <model-invariant-uuid>${modelInvariantUuid}</model-invariant-uuid>
+ <model-customization-uuid>${modelCustomizationUuid}</model-customization-uuid>
+ <model-uuid>${modelUuid}</model-uuid>
+ <model-version>${modelVersion}</model-version>
+ <model-name>${modelName}</model-name>
+ </ecomp-model-information>
+ </network-information>
+ <network-request-input>
+ <network-input-parameters>${netowrkInputParameters}</network-input-parameters>
+ </network-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+ </aetgt:SDNCAdapterWorkflowRequest>""".trim()
+
String sndcTopologyCreateRequesAsString = utils.formatXml(sndcTopologyCreateRequest)
utils.logAudit(sndcTopologyCreateRequesAsString)
execution.setVariable(Prefix + "createSDNCRequest", sndcTopologyCreateRequesAsString)
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCompareModelVersions.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCompareModelVersions.groovy index 291df4608d..6d5249e4d6 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCompareModelVersions.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCompareModelVersions.groovy @@ -47,8 +47,6 @@ import org.openecomp.mso.rest.RESTConfig import java.util.List;
import java.util.UUID;
-import javax.mail.Quota.Resource;
-
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.runtime.Execution
import org.camunda.bpm.engine.delegate.DelegateExecution
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy index 5eb3fd9f41..47ad795e25 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy @@ -50,8 +50,6 @@ import org.openecomp.mso.rest.RESTConfig import java.util.List; import java.util.UUID; -import javax.mail.Quota.Resource; - import org.camunda.bpm.engine.delegate.BpmnError import org.camunda.bpm.engine.delegate.DelegateExecution import org.json.JSONObject; @@ -548,12 +546,9 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor { def currentIndex = execution.getVariable("currentResourceIndex") List<Resource> sequencedResourceList = execution.getVariable("sequencedResourceList") Resource currentResource = sequencedResourceList.get(currentIndex) - String resourceCustomizationUuid = currentResource.getModelInfo().getModelCustomizationUuid() - resourceInput.setResourceCustomizationUuid(resourceCustomizationUuid); - String resourceInvariantUuid = currentResource.getModelInfo().getModelInvariantUuid() - resourceInput.setResourceInvariantUuid(resourceInvariantUuid) - String resourceUuid = currentResource.getModelInfo().getModelUuid() - resourceInput.setResourceUuid(resourceUuid) + resourceInput.setResourceModelInfo(currentResource.getModelInfo()); + ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition") + resourceInput.setServiceModelInfo(serviceDecomposition.getModelInfo()); String incomingRequest = execution.getVariable("uuiRequest") //set the requestInputs from tempalte To Be Done diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/RollbackVnf.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/RollbackVnf.groovy index b3ac195c7d..99248a92ad 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/RollbackVnf.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/RollbackVnf.groovy @@ -25,7 +25,6 @@ import groovy.util.Node import groovy.util.XmlParser; import groovy.xml.QName -import java.beans.MetaData.java_lang_Class_PersistenceDelegate import java.io.Serializable; import java.util.UUID; import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil @@ -39,7 +38,6 @@ import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor; import org.openecomp.mso.bpmn.common.scripts.VidUtils; import org.openecomp.mso.bpmn.core.RollbackData import org.openecomp.mso.bpmn.core.WorkflowException -import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil import org.openecomp.mso.bpmn.core.json.JsonUtils import org.openecomp.mso.bpmn.core.domain.ModelInfo import org.openecomp.mso.bpmn.core.domain.ServiceDecomposition diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVnfInfra.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVnfInfra.groovy index 0db7616d3d..b6af0a5a6b 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVnfInfra.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVnfInfra.groovy @@ -25,7 +25,6 @@ import groovy.util.Node import groovy.util.XmlParser;
import groovy.xml.QName
-import java.beans.MetaData.java_lang_Class_PersistenceDelegate
import java.io.Serializable;
import java.util.UUID;
import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
@@ -39,7 +38,6 @@ import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor; import org.openecomp.mso.bpmn.common.scripts.VidUtils;
import org.openecomp.mso.bpmn.core.RollbackData
import org.openecomp.mso.bpmn.core.WorkflowException
-import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
import org.openecomp.mso.bpmn.core.json.JsonUtils
import org.openecomp.mso.bpmn.core.domain.ModelInfo
import org.openecomp.mso.bpmn.core.domain.ServiceDecomposition
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfCmBase.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfCmBase.groovy index c588d38946..39820dc2e1 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfCmBase.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfCmBase.groovy @@ -28,7 +28,6 @@ import groovy.xml.QName import org.json.JSONArray import org.json.JSONObject -import java.beans.MetaData.java_lang_Class_PersistenceDelegate import java.io.Serializable; import java.util.List import java.util.UUID; @@ -43,7 +42,6 @@ import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor; import org.openecomp.mso.bpmn.common.scripts.VidUtils; import org.openecomp.mso.bpmn.core.RollbackData import org.openecomp.mso.bpmn.core.WorkflowException -import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil import org.openecomp.mso.bpmn.core.json.JsonUtils import org.openecomp.mso.bpmn.core.domain.ModelInfo import org.openecomp.mso.bpmn.core.domain.ServiceDecomposition diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfConfigUpdate.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfConfigUpdate.groovy index 33aaef084c..13016a5ae4 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfConfigUpdate.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfConfigUpdate.groovy @@ -25,7 +25,6 @@ import groovy.util.Node import groovy.util.XmlParser; import groovy.xml.QName -import java.beans.MetaData.java_lang_Class_PersistenceDelegate import java.io.Serializable; import java.util.UUID; import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil @@ -39,7 +38,6 @@ import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor; import org.openecomp.mso.bpmn.common.scripts.VidUtils; import org.openecomp.mso.bpmn.core.RollbackData import org.openecomp.mso.bpmn.core.WorkflowException -import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil import org.openecomp.mso.bpmn.core.json.JsonUtils import org.openecomp.mso.bpmn.core.domain.ModelInfo import org.openecomp.mso.bpmn.core.domain.ServiceDecomposition diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfInPlaceUpdate.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfInPlaceUpdate.groovy index 2b336afa1e..4a64ab058b 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfInPlaceUpdate.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfInPlaceUpdate.groovy @@ -25,7 +25,6 @@ import groovy.util.Node import groovy.util.XmlParser; import groovy.xml.QName -import java.beans.MetaData.java_lang_Class_PersistenceDelegate import java.io.Serializable; import java.util.UUID; import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil @@ -39,7 +38,6 @@ import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor; import org.openecomp.mso.bpmn.common.scripts.VidUtils; import org.openecomp.mso.bpmn.core.RollbackData import org.openecomp.mso.bpmn.core.WorkflowException -import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil import org.openecomp.mso.bpmn.core.json.JsonUtils import org.openecomp.mso.bpmn.core.domain.ModelInfo import org.openecomp.mso.bpmn.core.domain.ServiceDecomposition |