2 * ============LICENSE_START=======================================================
\r
4 * ================================================================================
\r
5 * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
\r
6 * ================================================================================
\r
7 * Licensed under the Apache License, Version 2.0 (the "License");
\r
8 * you may not use this file except in compliance with the License.
\r
9 * You may obtain a copy of the License at
\r
11 * http://www.apache.org/licenses/LICENSE-2.0
\r
13 * Unless required by applicable law or agreed to in writing, software
\r
14 * distributed under the License is distributed on an "AS IS" BASIS,
\r
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 * See the License for the specific language governing permissions and
\r
17 * limitations under the License.
\r
18 * ============LICENSE_END=========================================================
\r
20 package org.openecomp.mso.bpmn.infrastructure.scripts;
\r
22 import static org.apache.commons.lang3.StringUtils.*;
\r
23 import groovy.xml.XmlUtil
\r
24 import groovy.json.*
\r
26 import org.openecomp.mso.bpmn.core.domain.ServiceDecomposition
\r
27 import org.openecomp.mso.bpmn.core.domain.ServiceInstance
\r
28 import org.openecomp.mso.bpmn.core.domain.ModelInfo
\r
29 import org.openecomp.mso.bpmn.core.json.JsonUtils
\r
30 import org.openecomp.mso.bpmn.common.scripts.AaiUtil
\r
31 import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
\r
32 import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
\r
33 import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils
\r
34 import org.openecomp.mso.bpmn.core.RollbackData
\r
35 import org.openecomp.mso.bpmn.core.WorkflowException
\r
36 import org.openecomp.mso.rest.APIResponse;
\r
37 import org.openecomp.mso.rest.RESTClient
\r
38 import org.openecomp.mso.rest.RESTConfig
\r
40 import java.util.UUID;
\r
41 import javax.xml.parsers.DocumentBuilder
\r
42 import javax.xml.parsers.DocumentBuilderFactory
\r
44 import org.camunda.bpm.engine.delegate.BpmnError
\r
45 import org.camunda.bpm.engine.runtime.Execution
\r
46 import org.json.JSONObject;
\r
47 import org.json.JSONArray;
\r
48 import org.apache.commons.lang3.*
\r
49 import org.apache.commons.codec.binary.Base64;
\r
50 import org.springframework.web.util.UriUtils;
\r
52 import org.w3c.dom.Document
\r
53 import org.w3c.dom.Element
\r
54 import org.w3c.dom.Node
\r
55 import org.w3c.dom.NodeList
\r
56 import org.xml.sax.InputSource
\r
58 * This groovy class supports the <class>DoCreateServiceInstance.bpmn</class> process.
\r
61 * @param - msoRequestId
\r
62 * @param - globalSubscriberId
\r
63 * @param - subscriptionServiceType
\r
64 * @param - serviceInstanceId
\r
65 * @param - serviceInstanceName - O
\r
66 * @param - serviceModelInfo
\r
67 * @param - productFamilyId
\r
68 * @param - disableRollback
\r
69 * @param - failExists - TODO
\r
70 * @param - serviceInputParams (should contain aic_zone for serviceTypes TRANSPORT,ATM)
\r
71 * @param - sdncVersion ("1610")
\r
72 * @param - serviceDecomposition - Decomposition for R1710
\r
73 * (if macro provides serviceDecompsition then serviceModelInfo, serviceInstanceId & serviceInstanceName will be ignored)
\r
76 * @param - rollbackData (localRB->null)
\r
77 * @param - rolledBack (no localRB->null, localRB F->false, localRB S->true)
\r
78 * @param - WorkflowException
\r
79 * @param - serviceInstanceName - (GET from AAI if null in input)
\r
82 public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
\r
84 String Prefix="DUPDSI_"
\r
85 private static final String DebugFlag = "isDebugEnabled"
\r
87 ExceptionUtil exceptionUtil = new ExceptionUtil()
\r
88 JsonUtils jsonUtil = new JsonUtils()
\r
90 public void preProcessRequest (Execution execution) {
\r
92 execution.setVariable("isDebugLogEnabled","true")
\r
93 execution.setVariable("unit_test", "true")
\r
94 execution.setVariable("skipVFC", "true")
\r
96 def method = getClass().getSimpleName() + '.preProcessRequest(' +'execution=' + execution.getId() +')'
\r
97 def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
\r
98 utils.log("INFO","Entered " + method, isDebugEnabled)
\r
100 utils.log("INFO"," ***** Enter DoUpdateE2EServiceInstance preProcessRequest *****", isDebugEnabled)
\r
102 utils.log("INFO"," unit test : " + execution.getVariable("unit_test"), isDebugEnabled)
\r
105 execution.setVariable("prefix", Prefix)
\r
107 //requestDetails.subscriberInfo. for AAI GET & PUT & SDNC assignToplology
\r
108 String globalSubscriberId = execution.getVariable("globalSubscriberId") //globalCustomerId
\r
109 utils.log("INFO"," ***** globalSubscriberId *****" + globalSubscriberId, isDebugEnabled)
\r
111 //requestDetails.requestParameters. for AAI PUT & SDNC assignTopology
\r
112 String serviceType = execution.getVariable("serviceType")
\r
113 utils.log("INFO"," ***** serviceType *****" + serviceType, isDebugEnabled)
\r
115 //requestDetails.requestParameters. for SDNC assignTopology
\r
116 String productFamilyId = execution.getVariable("productFamilyId") //AAI productFamilyId
\r
118 if (isBlank(globalSubscriberId)) {
\r
119 msg = "Input globalSubscriberId is null"
\r
120 utils.log("INFO", msg, isDebugEnabled)
\r
121 exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
\r
124 if (isBlank(serviceType)) {
\r
125 msg = "Input serviceType is null"
\r
126 utils.log("INFO", msg, isDebugEnabled)
\r
127 exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
\r
130 //Generated in parent for AAI
\r
131 String serviceInstanceId = execution.getVariable("serviceInstanceId")
\r
132 if (isBlank(serviceInstanceId)){
\r
133 msg = "Input serviceInstanceId is null"
\r
134 utils.log("INFO", msg, isDebugEnabled)
\r
135 exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
\r
138 if (productFamilyId == null) {
\r
139 execution.setVariable("productFamilyId", "")
\r
142 String sdncCallbackUrl = execution.getVariable('URN_mso_workflow_sdncadapter_callback')
\r
143 if (isBlank(sdncCallbackUrl)) {
\r
144 msg = "URN_mso_workflow_sdncadapter_callback is null"
\r
145 utils.log("INFO", msg, isDebugEnabled)
\r
146 exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
\r
148 execution.setVariable("sdncCallbackUrl", sdncCallbackUrl)
\r
149 utils.log("INFO","SDNC Callback URL: " + sdncCallbackUrl, isDebugEnabled)
\r
151 //requestDetails.modelInfo.for AAI PUT servieInstanceData
\r
152 //requestDetails.requestInfo. for AAI GET/PUT serviceInstanceData
\r
153 String serviceInstanceName = execution.getVariable("serviceInstanceName")
\r
154 //String serviceInstanceId = execution.getVariable("serviceInstanceId")
\r
155 String uuiRequest = execution.getVariable("uuiRequest")
\r
156 utils.log("INFO","uuiRequest: " + uuiRequest, isDebugEnabled)
\r
158 String modelInvariantUuid = jsonUtil.getJsonValue(uuiRequest, "service.serviceDefId")
\r
159 utils.log("INFO","modelInvariantUuid: " + modelInvariantUuid, isDebugEnabled)
\r
161 String modelUuid = jsonUtil.getJsonValue(uuiRequest, "service.templateId")
\r
162 utils.log("INFO","modelUuid: " + modelUuid, isDebugEnabled)
\r
164 String serviceModelName = jsonUtil.getJsonValue(uuiRequest, "service.parameters.templateName")
\r
165 utils.log("INFO","serviceModelName: " + serviceModelName, isDebugEnabled)
\r
166 execution.setVariable("serviceModelName", serviceModelName)
\r
168 //aai serviceType and Role can be setted as fixed value now.
\r
169 String aaiServiceType = serviceType
\r
170 String aaiServiceRole = serviceType+"Role"
\r
172 execution.setVariable("modelInvariantUuid", modelInvariantUuid)
\r
173 execution.setVariable("model-invariant-id-target", modelInvariantUuid)
\r
174 execution.setVariable("modelUuid", modelUuid)
\r
175 execution.setVariable("model-version-id-target", modelUuid_target)
\r
178 String oStatus = execution.getVariable("initialStatus") ?: ""
\r
179 utils.log("INFO","oStatus: " + oStatus, isDebugEnabled)
\r
180 if ("TRANSPORT".equalsIgnoreCase(serviceType))
\r
185 String statusLine = isBlank(oStatus) ? "" : "<orchestration-status>${oStatus}</orchestration-status>"
\r
186 utils.log("INFO","statusLine: " + statusLine, isDebugEnabled)
\r
187 AaiUtil aaiUriUtil = new AaiUtil(this)
\r
188 utils.log("INFO","start create aai uri: " + aaiUriUtil, isDebugEnabled)
\r
189 String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
\r
190 utils.log("INFO","aai_uri: " + aai_uri, isDebugEnabled)
\r
191 String namespace = aaiUriUtil.getNamespaceFromUri(aai_uri)
\r
192 utils.log("INFO","namespace: " + namespace, isDebugEnabled)
\r
194 String serviceInstanceData =
\r
195 """<service-instance xmlns=\"${namespace}\">
\r
196 <service-instance-id>${serviceInstanceId}</service-instance-id>
\r
197 <service-instance-name>${serviceInstanceName}</service-instance-name>
\r
198 <service-type>${aaiServiceType}</service-type>
\r
199 <service-role>${aaiServiceRole}</service-role>
\r
201 <model-invariant-id>${modelInvariantUuid}</model-invariant-id>
\r
202 <model-version-id>${modelUuid}</model-version-id>
\r
203 </service-instance>""".trim()
\r
205 //begin only for test
\r
206 String serviceInstanceData =
\r
207 """<service-instance xmlns=\"${namespace}\">
\r
208 <service-instance-id>${serviceInstanceId}</service-instance-id>
\r
209 <service-instance-name>${serviceInstanceName}</service-instance-name>
\r
210 <service-type>${aaiServiceType}</service-type>
\r
211 <service-role>${aaiServiceRole}</service-role>
\r
213 </service-instance>""".trim()
\r
214 //end only for test
\r
215 execution.setVariable("serviceInstanceData", serviceInstanceData)
\r
216 utils.log("INFO","serviceInstanceData: " + serviceInstanceData, isDebugEnabled)
\r
217 utils.logAudit(serviceInstanceData)
\r
218 utils.log("INFO", " aai_uri " + aai_uri + " namespace:" + namespace, isDebugEnabled)
\r
219 utils.log("INFO", " 'payload' to create Service Instance in AAI - " + "\n" + serviceInstanceData, isDebugEnabled)
\r
221 execution.setVariable("serviceSDNCCreate", "false")
\r
222 execution.setVariable("operationStatus", "Waiting deploy resource...")
\r
224 } catch (BpmnError e) {
\r
226 } catch (Exception ex){
\r
227 msg = "Exception in preProcessRequest " + ex.getMessage()
\r
228 utils.log("INFO", msg, isDebugEnabled)
\r
229 exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
\r
231 utils.log("INFO", "Exited " + method, isDebugEnabled)
\r
234 public void postProcessAAIGET(Execution execution) {
\r
235 def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
\r
236 utils.log("INFO"," ***** postProcessAAIGET ***** ", isDebugEnabled)
\r
240 String serviceInstanceId = execution.getVariable("serviceInstanceId")
\r
241 boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator")
\r
242 String serviceType = ""
\r
245 utils.log("INFO","Found Service-instance in AAI", isDebugEnabled)
\r
247 String siData = execution.getVariable("GENGS_service")
\r
248 utils.log("INFO", "SI Data", isDebugEnabled)
\r
249 if (isBlank(siData))
\r
251 msg = "Could not retrive ServiceInstance data from AAI, Id:" + serviceInstanceId
\r
252 utils.log("INFO", msg, isDebugEnabled)
\r
253 exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
\r
257 utils.log("INFO", "SI Data" + siData, isDebugEnabled)
\r
259 InputSource source = new InputSource(new StringReader(siData));
\r
260 DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
\r
261 DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
\r
262 Document serviceXml = docBuilder.parse(source)
\r
263 serviceXml.getDocumentElement().normalize()
\r
265 // Get Template uuid and version
\r
266 if (utils.nodeExists(siData, "model-invariant-id") && utils.nodeExists(siData, "model-version-id") ) {
\r
267 utils.log("INFO", "SI Data model-invariant-id and model-version-id exist:", isDebugEnabled)
\r
268 def modelInvariantId = serviceXml.getElementsByTagName("model-invariant-id").item(0).getTextContent()
\r
269 def modelVersionId = serviceXml.getElementsByTagName("model-version-id").item(0).getTextContent()
\r
271 // Set Original Template info
\r
272 execution.setVariable("model-invariant-id-original", modelInvariantId)
\r
273 execution.setVariable("model-version-id-original", modelVersionId)
\r
276 //Confirm there are no related service instances (vnf/network or volume)
\r
277 if (utils.nodeExists(siData, "relationship-list")) {
\r
278 utils.log("INFO", "SI Data relationship-list exists:", isDebugEnabled)
\r
281 NodeList nodeList = serviceXml.getElementsByTagName("relationship")
\r
282 JSONArray jArray = new JSONArray()
\r
283 for (int x = 0; x < nodeList.getLength(); x++) {
\r
284 Node node = nodeList.item(x)
\r
285 if (node.getNodeType() == Node.ELEMENT_NODE) {
\r
286 Element eElement = (Element) node
\r
287 def e = eElement.getElementsByTagName("related-to").item(0).getTextContent() //for ns
\r
288 if(e.equals("service-instance")){
\r
289 def relatedObject = eElement.getElementsByTagName("related-link").item(0).getTextContent()
\r
290 utils.log("INFO", "ServiceInstance Related NS :" + relatedObject, isDebugEnabled)
\r
291 NodeList dataList = node.getChildNodes()
\r
292 if(null != dataList) {
\r
293 JSONObject jObj = new JSONObject()
\r
294 for (int i = 0; i < dataList.getLength(); i++) {
\r
295 Node dNode = dataList.item(i)
\r
296 if(dNode.getNodeName() == "relationship-data") {
\r
297 Element rDataEle = (Element)dNode
\r
298 def eKey = rDataEle.getElementsByTagName("relationship-key").item(0).getTextContent()
\r
299 def eValue = rDataEle.getElementsByTagName("relationship-value").item(0).getTextContent()
\r
300 if(eKey.equals("service-instance.service-instance-id")){
\r
301 jObj.put("resourceInstanceId", eValue)
\r
304 else if(dNode.getNodeName() == "related-to-property"){
\r
305 Element rDataEle = (Element)dNode
\r
306 def eKey = rDataEle.getElementsByTagName("property-key").item(0).getTextContent()
\r
307 def eValue = rDataEle.getElementsByTagName("property-value").item(0).getTextContent()
\r
308 if(eKey.equals("service-instance.service-instance-name")){
\r
309 jObj.put("resourceType", eValue)
\r
313 utils.log("INFO", "Relationship related to Resource:" + jObj.toString(), isDebugEnabled)
\r
316 //for overlay/underlay
\r
317 }else if (e.equals("configuration")){
\r
318 def relatedObject = eElement.getElementsByTagName("related-link").item(0).getTextContent()
\r
319 utils.log("INFO", "ServiceInstance Related Configuration :" + relatedObject, isDebugEnabled)
\r
320 NodeList dataList = node.getChildNodes()
\r
321 if(null != dataList) {
\r
322 JSONObject jObj = new JSONObject()
\r
323 for (int i = 0; i < dataList.getLength(); i++) {
\r
324 Node dNode = dataList.item(i)
\r
325 if(dNode.getNodeName() == "relationship-data") {
\r
326 Element rDataEle = (Element)dNode
\r
327 def eKey = rDataEle.getElementsByTagName("relationship-key").item(0).getTextContent()
\r
328 def eValue = rDataEle.getElementsByTagName("relationship-value").item(0).getTextContent()
\r
329 if(eKey.equals("configuration.configuration-id")){
\r
330 jObj.put("resourceInstanceId", eValue)
\r
333 else if(dNode.getNodeName() == "related-to-property"){
\r
334 Element rDataEle = (Element)dNode
\r
335 def eKey = rDataEle.getElementsByTagName("property-key").item(0).getTextContent()
\r
336 def eValue = rDataEle.getElementsByTagName("property-value").item(0).getTextContent()
\r
337 if(eKey.equals("configuration.configuration-type")){
\r
338 jObj.put("resourceType", eValue)
\r
342 utils.log("INFO", "Relationship related to Resource:" + jObj.toString(), isDebugEnabled)
\r
348 execution.setVariable("serviceRelationShip", jArray.toString())
\r
352 boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
\r
354 utils.log("INFO","Error getting Service-instance from AAI", + serviceInstanceId, isDebugEnabled)
\r
355 WorkflowException workflowException = execution.getVariable("WorkflowException")
\r
356 utils.logAudit("workflowException: " + workflowException)
\r
357 if(workflowException != null){
\r
358 exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())
\r
362 msg = "Failure in postProcessAAIGET GENGS_SuccessIndicator:" + succInAAI
\r
363 utils.log("INFO", msg, isDebugEnabled)
\r
364 exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
\r
368 utils.log("INFO","Service-instance NOT found in AAI. Silent Success", isDebugEnabled)
\r
370 }catch (BpmnError e) {
\r
372 } catch (Exception ex) {
\r
373 msg = "Exception in DoDeleteE2EServiceInstance.postProcessAAIGET. " + ex.getMessage()
\r
374 utils.log("INFO", msg, isDebugEnabled)
\r
375 exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
\r
377 utils.log("INFO"," *** Exit postProcessAAIGET *** ", isDebugEnabled)
\r
381 public void preInitResourcesOperStatus(Execution execution){
\r
382 def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
\r
384 utils.log("INFO", " ======== STARTED preInitResourcesOperStatus Process ======== ", isDebugEnabled)
\r
386 String serviceId = execution.getVariable("serviceInstanceId")
\r
387 String operationId = execution.getVariable("operationId")
\r
388 String operationType = execution.getVariable("operationType")
\r
389 String resourceTemplateUUIDs = ""
\r
390 String result = "processing"
\r
391 String progress = "0"
\r
393 String operationContent = "Prepare service updating"
\r
394 utils.log("INFO", "Generated new operation for Service Instance serviceId:" + serviceId + " operationId:" + operationId + " operationType:" + operationType, isDebugEnabled)
\r
395 serviceId = UriUtils.encode(serviceId,"UTF-8")
\r
396 execution.setVariable("serviceInstanceId", serviceId)
\r
397 execution.setVariable("operationId", operationId)
\r
398 execution.setVariable("operationType", operationType)
\r
400 String serviceRelationShip = execution.getVariable("serviceRelationShip")
\r
402 def jsonSlurper = new JsonSlurper()
\r
403 def jsonOutput = new JsonOutput()
\r
404 List relationShipList = jsonSlurper.parseText(serviceRelationShip)
\r
406 if (relationShipList != null) {
\r
407 relationShipList.each {
\r
408 resourceTemplateUUIDs = resourceTemplateUUIDs + it.resourceInstanceId + ":"
\r
411 execution.setVariable("URN_mso_openecomp_adapters_db_endpoint","http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter")
\r
414 """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
\r
415 xmlns:ns="http://org.openecomp.mso/requestsdb">
\r
418 <ns:initResourceOperationStatus xmlns:ns="http://org.openecomp.mso/requestsdb">
\r
419 <serviceId>${serviceId}</serviceId>
\r
420 <operationId>${operationId}</operationId>
\r
421 <operationType>${operationType}</operationType>
\r
422 <resourceTemplateUUIDs>${resourceTemplateUUIDs}</resourceTemplateUUIDs>
\r
423 </ns:initResourceOperationStatus>
\r
425 </soapenv:Envelope>"""
\r
427 payload = utils.formatXml(payload)
\r
428 execution.setVariable("CVFMI_initResOperStatusRequest", payload)
\r
429 utils.log("INFO", "Outgoing initResourceOperationStatus: \n" + payload, isDebugEnabled)
\r
430 utils.logAudit("CreateVfModuleInfra Outgoing initResourceOperationStatus Request: " + payload)
\r
432 }catch(Exception e){
\r
433 utils.log("ERROR", "Exception Occured Processing preInitResourcesOperStatus. Exception is:\n" + e, isDebugEnabled)
\r
434 execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during preInitResourcesOperStatus Method:\n" + e.getMessage())
\r
436 utils.log("INFO", "======== COMPLETED preInitResourcesOperStatus Process ======== ", isDebugEnabled)
\r
440 * Init the service Operation Status
\r
442 public void preUpdateServiceOperationStatus(Execution execution){
\r
443 def method = getClass().getSimpleName() + '.preUpdateServiceOperationStatus(' +'execution=' + execution.getId() +')'
\r
444 def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
\r
445 utils.log("INFO","Entered " + method, isDebugEnabled)
\r
448 String serviceId = execution.getVariable("serviceInstanceId")
\r
449 String operationId = execution.getVariable("operationId")
\r
450 String serviceName = execution.getVariable("serviceInstanceName")
\r
452 String result = "processing"
\r
453 String progress = execution.getVariable("progress")
\r
454 utils.log("INFO", "progress: " + progress , isDebugEnabled)
\r
455 if ("100".equalsIgnoreCase(progress))
\r
457 result = "finished"
\r
460 String operationContent = "Prepare service : " + execution.getVariable("operationStatus")
\r
462 utils.log("INFO", "Generated new operation for Service Instance serviceId:" + serviceId + " operationId:" + operationId, isDebugEnabled)
\r
463 serviceId = UriUtils.encode(serviceId,"UTF-8")
\r
464 execution.setVariable("serviceInstanceId", serviceId)
\r
465 execution.setVariable("operationId", operationId)
\r
466 execution.setVariable("operationType", operationType)
\r
468 def dbAdapterEndpoint = "http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter"
\r
469 execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
\r
470 utils.log("INFO", "DB Adapter Endpoint is: " + dbAdapterEndpoint, isDebugEnabled)
\r
472 execution.setVariable("URN_mso_openecomp_adapters_db_endpoint","http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter")
\r
474 """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
\r
475 xmlns:ns="http://org.openecomp.mso/requestsdb">
\r
478 <ns:updateServiceOperationStatus xmlns:ns="http://org.openecomp.mso/requestsdb">
\r
479 <serviceId>${serviceId}</serviceId>
\r
480 <operationId>${operationId}</operationId>
\r
481 <serviceName>${serviceName}</serviceName>
\r
482 <operationType>${operationType}</operationType>
\r
483 <userId>${userId}</userId>
\r
484 <result>${result}</result>
\r
485 <operationContent>${operationContent}</operationContent>
\r
486 <progress>${progress}</progress>
\r
487 <reason>${reason}</reason>
\r
488 </ns:updateServiceOperationStatus>
\r
490 </soapenv:Envelope>"""
\r
492 payload = utils.formatXml(payload)
\r
493 execution.setVariable("CVFMI_updateServiceOperStatusRequest", payload)
\r
494 utils.log("INFO", "Outgoing preUpdateServiceOperationStatus: \n" + payload, isDebugEnabled)
\r
497 }catch(Exception e){
\r
498 utils.log("ERROR", "Exception Occured Processing preUpdateServiceOperationStatus. Exception is:\n" + e, isDebugEnabled)
\r
499 execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during preUpdateServiceOperationStatus Method:\n" + e.getMessage())
\r
501 utils.log("INFO", "======== COMPLETED preUpdateServiceOperationStatus Process ======== ", isDebugEnabled)
\r
502 utils.log("INFO", "Exited " + method, isDebugEnabled)
\r
505 public void postResourcesOperStatus(Execution execution) {
\r
506 def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
\r
510 public void preCompareModelVersions(Execution execution) {
\r
511 def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
\r
515 public void postCompareModelVersions(Execution execution) {
\r
516 def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
\r
519 public void preProcessForAddResource(Execution execution) {
\r
520 def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
\r
524 public void postProcessForAddResource(Execution execution) {
\r
525 def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
\r
529 public void preProcessForDeleteResource(Execution execution) {
\r
530 def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
\r
534 public void postProcessForDeleteResource(Execution execution) {
\r
535 def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
\r
539 public void postConfigRequest(execution){
\r