aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVnfInfra.groovy
diff options
context:
space:
mode:
authorDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2017-05-09 03:55:30 -0700
committerDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2017-05-09 05:18:51 -0700
commitb1e5734ef566af5d49ba17d05ca0ab7b56d6666d (patch)
tree92a232e908ae587cb244fd102e9c2c5648c66a9f /bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVnfInfra.groovy
parentd4f2190943216278826f39e7010d57f872bda90d (diff)
[MSO-8] Additional fixes for the second rebase
DB fixes + BPMN flows and groovy fixes + Fix issue with CloudConfig file not reloaded properly when it's wrong (JSON error or model hierarchy mistake) at MSO startup Change-Id: I2853030b78499e2a761706b643ea210955e72de3 Signed-off-by: Determe, Sebastien (sd378r) <sd378r@intl.att.com> [MSO-8] Restore files removed in patch set 2 Those groovy files must be there Change-Id: I9a47ac3d9c8fc06774a1b8f518491b1b0b00af04 Signed-off-by: Determe, Sebastien (sd378r) <sd378r@intl.att.com>
Diffstat (limited to 'bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVnfInfra.groovy')
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVnfInfra.groovy70
1 files changed, 0 insertions, 70 deletions
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVnfInfra.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVnfInfra.groovy
index 6168acd..9b7fd68 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVnfInfra.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVnfInfra.groovy
@@ -205,76 +205,6 @@ class CreateVnfInfra extends AbstractServiceTaskProcessor {
utils.log("DEBUG", "*** COMPLETED CreateVnfInfra SendSyncResponse Process ***", isDebugEnabled)
}
- public void prepareCreateGenericVnf (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
-
- utils.log("DEBUG", " *** STARTED CreateVnfInfra PrepareCreateGenericVnf Process *** ", isDebugEnabled)
- try {
- //Get Vnf Info
- String vnfId = execution.getVariable("CREVI_vnfId")
- def vnfName = execution.getVariable("CREVI_vnfName")
- def vnfType = execution.getVariable("CREVI_vnfType")
- def serviceId = execution.getVariable("CREVI_serviceId")
- def orchStatus = execution.getVariable("CREVI_orchStatus")
- def modelInvariantId = execution.getVariable("CREVI_modelInvariantId")
- def modelVersion = execution.getVariable("CREVI_modelVersion")
- // TODO: 1702 Variable
- def equipmentRole = execution.getVariable("CREVI_equipmentRole")
-
- //Get Service Instance Info
- def serviceInstanceId = execution.getVariable("CREVI_serviceInstanceId")
- String siRelatedLink = execution.getVariable("GENGS_siResourceLink")
-
- int custStart = siRelatedLink.indexOf("customer/")
- int custEnd = siRelatedLink.indexOf("/service-subscriptions")
- String globalCustId = siRelatedLink.substring(custStart + 9, custEnd)
- int serviceStart = siRelatedLink.indexOf("service-subscription/")
- int serviceEnd = siRelatedLink.indexOf("/service-instances/")
- String serviceType = siRelatedLink.substring(serviceStart + 21, serviceEnd)
-
- //Get Namespace
- AaiUtil aaiUtil = new AaiUtil(this)
- def aai_uri = aaiUtil.getNetworkGenericVnfUri(execution)
- String namespace = aaiUtil.getNamespaceFromUri(aai_uri)
-
- String payload =
- """<generic-vnf xmlns="${namespace}">
- <vnf-id>${vnfId}</vnf-id>
- <vnf-name>${vnfName}</vnf-name>
- <service-id>${serviceId}</service-id>
- <vnf-type>${vnfType}</vnf-type>
- <orchestration-status>${orchStatus}</orchestration-status>
- <persona-model-id>${modelInvariantId}</persona-model-id>
- <persona-model-version>${modelVersion}</persona-model-version>
- <relationship-list>
- <relationship>
- <related-to>service-instance</related-to>
- <related-link>${siRelatedLink}</related-link>
- <relationship-data>
- <relationship-key>customer.global-customer-id</relationship-key>
- <relationship-value>${globalCustId}</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>service-subscription.service-type</relationship-key>
- <relationship-value>${serviceType}</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>service-instance.service-instance-id</relationship-key>
- <relationship-value>${serviceInstanceId}</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </generic-vnf>"""
-
- execution.setVariable("CREVI_genericVnfPayload", payload)
-
- }catch(Exception ex) {
- utils.log("DEBUG", "Error Occured in CreateVnfInfra PrepareCreateGenericVnf Process " + ex.getMessage(), isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in CreateVnfInfra PrepareCreateGenericVnf Process")
- }
- utils.log("DEBUG", "*** COMPLETED CreateVnfInfra PrepareCreateGenericVnf Process ***", isDebugEnabled)
- }
public void preProcessSDNCAssignRequest(Execution execution){
def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")