2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
6 * ================================================================================
7 * Modifications Copyright (c) 2019 Samsung
8 * ================================================================================
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 * ============LICENSE_END=========================================================
22 package org.onap.so.bpmn.infrastructure.scripts
25 import groovy.json.JsonOutput
26 import groovy.json.JsonSlurper
27 import org.apache.commons.lang3.StringUtils
28 import org.apache.commons.lang3.tuple.ImmutablePair
29 import org.camunda.bpm.engine.delegate.BpmnError
30 import org.camunda.bpm.engine.delegate.DelegateExecution
31 import org.json.JSONArray
32 import org.json.JSONObject
33 import org.onap.aai.domain.yang.RelatedToProperty
34 import org.onap.aai.domain.yang.Relationship
35 import org.onap.aai.domain.yang.RelationshipData
36 import org.onap.aai.domain.yang.ServiceInstance
37 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
38 import org.onap.so.bpmn.common.scripts.ExceptionUtil
39 import org.onap.so.bpmn.common.scripts.MsoUtils
40 import org.onap.so.bpmn.core.UrnPropertiesReader
41 import org.onap.so.bpmn.core.domain.GroupResource
42 import org.onap.so.bpmn.core.domain.Resource
43 import org.onap.so.bpmn.core.domain.ResourceType
44 import org.onap.so.bpmn.core.domain.ServiceDecomposition
45 import org.onap.so.bpmn.core.domain.VnfResource
46 import org.onap.so.bpmn.core.domain.VnfcResource
47 import org.onap.so.bpmn.core.json.JsonUtils
48 import org.onap.so.client.HttpClient
49 import org.onap.so.client.HttpClientFactory
50 import org.onap.so.client.aai.AAIObjectType
51 import org.onap.so.client.aai.AAIResourcesClient
52 import org.onap.so.client.aai.entities.AAIResultWrapper
53 import org.onap.so.client.aai.entities.uri.AAIResourceUri
54 import org.onap.so.client.aai.entities.uri.AAIUriFactory
55 import org.slf4j.Logger
56 import org.slf4j.LoggerFactory
57 import org.onap.so.utils.TargetEntity
58 import org.springframework.web.util.UriUtils
60 import javax.ws.rs.NotFoundException
61 import javax.ws.rs.core.Response
64 import static org.apache.commons.lang3.StringUtils.isBlank
67 * This groovy class supports the <class>DoDeleteE2EServiceInstance.bpmn</class> process.
70 * @param - msoRequestId
71 * @param - globalSubscriberId - O
72 * @param - subscriptionServiceType - O
73 * @param - serviceInstanceId
74 * @param - serviceInstanceName - O
75 * @param - serviceInputParams (should contain aic_zone for serviceTypes TRANSPORT,ATM)
76 * @param - sdncVersion
77 * @param - failNotFound - TODO
78 * @param - serviceInputParams - TODO
80 * @param - delResourceList
81 * @param - serviceRelationShip
84 * @param - WorkflowException
88 public class DoDeleteE2EServiceInstance extends AbstractServiceTaskProcessor {
90 String Prefix="DDEESI_"
91 ExceptionUtil exceptionUtil = new ExceptionUtil()
92 JsonUtils jsonUtil = new JsonUtils()
93 private static final Logger logger = LoggerFactory.getLogger( DoDeleteE2EServiceInstance.class);
96 public void preProcessRequest (DelegateExecution execution) {
97 logger.debug(" ***** preProcessRequest *****")
101 String requestId = execution.getVariable("msoRequestId")
102 execution.setVariable("prefix",Prefix)
105 //requestDetails.subscriberInfo. for AAI GET & PUT & SDNC assignToplology
106 String globalSubscriberId = execution.getVariable("globalSubscriberId") //globalCustomerId
107 if (globalSubscriberId == null)
109 execution.setVariable("globalSubscriberId", "")
112 //requestDetails.requestParameters. for AAI PUT & SDNC assignTopology
113 String serviceType = execution.getVariable("serviceType")
114 if (serviceType == null)
116 execution.setVariable("serviceType", "")
119 //Generated in parent for AAI PUT
120 String serviceInstanceId = execution.getVariable("serviceInstanceId")
121 if (isBlank(serviceInstanceId)){
122 msg = "Input serviceInstanceId is null"
124 exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
127 String sdncCallbackUrl = UrnPropertiesReader.getVariable('mso.workflow.sdncadapter.callback', execution)
128 if (isBlank(sdncCallbackUrl)) {
129 msg = "URN_mso_workflow_sdncadapter_callback is null"
131 exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
133 execution.setVariable("sdncCallbackUrl", sdncCallbackUrl)
134 logger.info("SDNC Callback URL: " + sdncCallbackUrl)
136 StringBuilder sbParams = new StringBuilder()
137 Map<String, String> paramsMap = execution.getVariable("serviceInputParams")
139 if (paramsMap != null) {
140 sbParams.append("<service-input-parameters>")
141 for (Map.Entry<String, String> entry : paramsMap.entrySet()) {
143 String paramName = entry.getKey()
144 String paramValue = entry.getValue()
147 <name>${MsoUtils.xmlEscape(paramName)}</name>
148 <value>${MsoUtils.xmlEscape(paramValue)}</value>
151 sbParams.append(paramsXml)
153 sbParams.append("</service-input-parameters>")
155 String siParamsXml = sbParams.toString()
156 if (siParamsXml == null)
158 execution.setVariable("siParamsXml", siParamsXml)
160 } catch (BpmnError e) {
162 } catch (Exception ex){
163 msg = "Exception in preProcessRequest " + ex.getMessage()
165 exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
167 logger.debug("***** Exit preProcessRequest *****")
170 public void postProcessAAIGET(DelegateExecution execution) {
171 logger.debug(" ***** postProcessAAIGET ***** ")
175 String serviceInstanceId = execution.getVariable('serviceInstanceId')
176 String globalSubscriberId = execution.getVariable('globalSubscriberId')
177 String serviceType = execution.getVariable('serviceType')
178 AAIResourcesClient resourceClient = new AAIResourcesClient()
179 AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalSubscriberId, serviceType, serviceInstanceId)
180 if (!resourceClient.exists(serviceInstanceUri)) {
181 exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Service Instance was not found in aai")
183 AAIResultWrapper wrapper = resourceClient.get(serviceInstanceUri, NotFoundException.class)
184 Optional<ServiceInstance> si = wrapper.asBean(ServiceInstance.class)
186 if (si.isPresent() && StringUtils.isNotEmpty(si.get().getServiceInstanceName())) {
187 logger.debug("Found Service-instance in AAI")
188 execution.setVariable("serviceInstanceName", si.get().getServiceInstanceName())
189 // get model invariant id
190 // Get Template uuid and version
191 if ((null != si.get().getModelInvariantId()) && (null != si.get().getModelVersionId())) {
192 logger.debug("SI Data model-invariant-id and model-version-id exist")
193 // Set Original Template info
194 execution.setVariable("model-invariant-id-original", si.get().getModelInvariantId())
195 execution.setVariable("model-version-id-original", si.get().getModelVersionId())
197 if ((null != si.get().getRelationshipList()) && (null != si.get().getRelationshipList().getRelationship())) {
198 logger.debug("SI Data relationship-list exists")
199 List<Relationship> relationshipList = si.get().getRelationshipList().getRelationship()
200 JSONArray jArray = new JSONArray()
201 for (Relationship relationship : relationshipList) {
202 def jObj = getRelationShipData(relationship)
205 execution.setVariable("serviceRelationShip", jArray.toString())
208 msg = "Service-instance: " + serviceInstanceId + " NOT found in AAI."
210 exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
212 } catch (BpmnError e) {
214 } catch (NotFoundException e) {
215 logger.debug("Service Instance does not exist AAI")
216 exceptionUtil.buildAndThrowWorkflowException(execution, 404, "Service Instance was not found in aai")
217 } catch (Exception ex) {
218 msg = "Exception in DoDeleteE2EServiceInstance.postProcessAAIGET. " + ex.getMessage()
220 exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
222 logger.debug(" *** Exit postProcessAAIGET *** ")
225 private JSONObject getRelationShipData(Relationship relationship) {
226 JSONObject jObj = new JSONObject()
227 def rt = relationship.getRelatedTo()
228 def rl = relationship.getRelatedLink()
229 logger.debug("ServiceInstance Related NS/Configuration :" + rl)
230 List<RelationshipData> rl_datas = relationship.getRelationshipData()
231 for (RelationshipData rl_data : rl_datas) {
232 def eKey = rl_data.getRelationshipKey()
233 def eValue = rl_data.getRelationshipValue()
234 if ((rt.equals("service-instance") && eKey.equals("service-instance.service-instance-id"))
235 //for overlay/underlay
236 || (rt.equals("configuration") && eKey.equals("configuration.configuration-id")
238 jObj.put("resourceInstanceId", eValue)
240 // for sp-partner and others
241 else if (eKey.endsWith("-id")) {
242 jObj.put("resourceInstanceId", eValue)
243 String resourceName = rt + eValue;
244 jObj.put("resourceType", resourceName)
246 jObj.put("resourceLinkUrl", rl)
248 List<RelatedToProperty> rl_props = relationship.getRelatedToProperty()
249 for (RelatedToProperty rl_prop : rl_props) {
250 def eKey = rl_prop.getPropertyKey()
251 def eValue = rl_prop.getPropertyValue()
252 if ((rt.equals("service-instance") && eKey.equals("service-instance.service-instance-name"))
253 //for overlay/underlay
254 || (rt.equals("configuration") && eKey.equals("configuration.configuration-type"))) {
255 jObj.put("resourceType", eValue)
258 logger.debug("Relationship related to Resource:" + jObj.toString())
262 private Relationship getRelationShipFromNode(groovy.util.slurpersupport.Node relationshipNode) {
263 Relationship relationship = new Relationship()
264 def rtn = relationshipNode.childNodes()
265 List<RelationshipData> relationshipDatas = new ArrayList<>()
266 List<RelatedToProperty> relationshipProperties = new ArrayList<>()
267 while (rtn.hasNext()) {
268 groovy.util.slurpersupport.Node node = rtn.next()
269 def key = node.name()
271 if(key.equals("related-to")){
273 relationship.setRelatedTo(rt)
274 } else if (key.equals("related-link")){
276 relationship.setRelatedLink(rl)
277 } else if (key.equals("relationship-label")){
278 def label = node.text()
279 relationship.setRelationshipLabel(label)
280 } else if (key.equals("relationship-data")){
281 def rData = node.childNodes()
282 RelationshipData relationshipData = new RelationshipData()
283 while(rData.hasNext()){
284 groovy.util.slurpersupport.Node datanode = rData.next()
285 def dataKey = datanode.name()
286 if(dataKey.equals("relationship-key")) {
287 relationshipData.setRelationshipKey(datanode.text())
288 } else if(dataKey.equals("relationship-value")) {
289 relationshipData.setRelationshipValue(datanode.text())
292 relationshipDatas.add(relationshipData)
293 } else if (key.equals("related-to-property")){
294 def rProperty = node.childNodes()
295 RelatedToProperty relationshipProperty = new RelatedToProperty()
296 while(rProperty.hasNext()){
297 groovy.util.slurpersupport.Node propnode = rProperty.next()
299 def dataKey = propnode.name()
300 if(dataKey.equals("property-key")) {
301 relationshipProperty.setPropertyKey(propnode.text())
302 } else if(dataKey.equals("property-value")) {
303 relationshipProperty.setPropertyValue(propnode.text())
307 relationshipProperties.add(relationshipProperty)
311 relationship.getRelationshipData().addAll(relationshipDatas)
312 relationship.getRelatedToProperty().addAll(relationshipProperties)
314 logger.debug("Relationship related to Resource:" + relationship.toString())
318 public void getCurrentNS(DelegateExecution execution){
319 logger.info( "======== Start getCurrentNS Process ======== ")
321 def currentIndex = execution.getVariable("currentNSIndex")
322 List<String> nsSequence = execution.getVariable("nsSequence")
323 String nsResourceType = nsSequence.get(currentIndex)
325 // GET AAI by Name, not ID, for process convenient
326 execution.setVariable("GENGS_type", "service-instance")
327 execution.setVariable("GENGS_serviceInstanceId", "")
328 execution.setVariable("GENGS_serviceInstanceName", nsResourceType)
330 logger.debug("======== COMPLETED getCurrentNS Process ======== ")
333 public void prepareDecomposeService(DelegateExecution execution) {
335 logger.debug(" ***** Inside prepareDecomposeService of create generic e2e service ***** ")
336 String modelInvariantUuid = execution.getVariable("model-invariant-id-original")
337 String modelVersionId = execution.getVariable("model-version-id-original")
339 String serviceModelInfo = """{
340 "modelInvariantUuid":"${modelInvariantUuid}",
341 "modelUuid":"${modelVersionId}",
344 execution.setVariable("serviceModelInfo", serviceModelInfo)
346 logger.debug(" ***** Completed prepareDecomposeService of create generic e2e service ***** ")
347 } catch (Exception ex) {
348 // try error in method block
349 String exceptionMessage = "Bpmn error encountered in create generic e2e service flow. Unexpected Error from method prepareDecomposeService() - " + ex.getMessage()
350 logger.error(exceptionMessage)
351 exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
355 private void generateRelatedResourceInfo(String response, JSONObject jObj, boolean processRelationship){
357 def xml = new XmlSlurper().parseText(response)
358 def rtn = xml.childNodes()
359 while (rtn.hasNext()) {
360 groovy.util.slurpersupport.Node node = rtn.next()
361 def key = node.name()
362 if (key.equals("relationship-list") && processRelationship) {
363 def relns = node.childNodes()
364 JSONArray jArray = new JSONArray()
365 while (relns.hasNext()) {
366 groovy.util.slurpersupport.Node relNode = relns.next()
367 Relationship relationship = getRelationShipFromNode(relNode)
368 def relationObj = getRelationShipData(relationship)
369 jArray.put(relationObj)
371 jObj.put(key, jArray)
373 def value = node.text()
379 private JSONObject getRelatedResourceInAAI (DelegateExecution execution, JSONObject jObj, boolean processRelationship)
381 logger.debug(" ***** Started getRelatedResourceInAAI *****")
383 String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
384 String urlLink = jObj.get("resourceLinkUrl")
385 String serviceAaiPath = "${aai_endpoint}${urlLink}"
387 URL url = new URL(serviceAaiPath)
388 HttpClient client = new HttpClientFactory().newXmlClient(url, TargetEntity.AAI)
391 Response response = client.get()
392 int responseCode = response.getStatus()
393 execution.setVariable(Prefix + "GeRelatedResourceResponseCode", responseCode)
394 logger.debug(" Get RelatedResource code is: " + responseCode)
396 String aaiResponse = response.readEntity(String.class)
397 execution.setVariable(Prefix + "GetRelatedResourceResponse", aaiResponse)
400 if(responseCode == 200 || responseCode == 201 || responseCode == 202 )
401 //200 OK 201 CREATED 202 ACCEPTED
403 logger.debug("GET RelatedResource Received a Good Response")
404 execution.setVariable(Prefix + "SuccessIndicator", true)
405 execution.setVariable(Prefix + "FoundIndicator", true)
407 generateRelatedResourceInfo(aaiResponse, jObj, processRelationship)
409 //get model-invariant-uuid and model-uuid
410 String modelInvariantId = ""
411 String modelUuid = ""
412 String modelCustomizationId = ""
413 if(jObj.has("model-invariant-id")) {
414 modelInvariantId = jObj.get("model-invariant-id")
415 modelUuid = jObj.get("model-version-id")
416 modelCustomizationId = jObj.get("model-customization-id")
419 jObj.put("modelInvariantId", modelInvariantId)
420 jObj.put("modelVersionId", modelUuid)
421 jObj.put("modelCustomizationId", modelCustomizationId)
424 String exceptionMessage = "Get RelatedResource Received a Bad Response Code. Response Code is: " + responseCode
425 logger.error(exceptionMessage)
426 exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
429 logger.debug(" ***** Exit getRelatedResourceInAAI *****")
433 public void postDecomposeService(DelegateExecution execution) {
434 logger.debug(" ***** Inside postDecomposeService() of delete generic e2e service flow ***** ")
436 ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
438 // service model info
439 execution.setVariable("serviceModelInfo", serviceDecomposition.getModelInfo())
441 List<Resource> deleteResourceList = serviceDecomposition.getServiceResources()
442 String serviceRelationShip = execution.getVariable("serviceRelationShip")
443 def jsonSlurper = new JsonSlurper()
444 def jsonOutput = new JsonOutput()
446 List relationShipList = null
447 if (serviceRelationShip != null) {
448 relationShipList = jsonSlurper.parseText(serviceRelationShip)
451 List<ImmutablePair<Resource, List<Resource>>> deleteRealResourceList = new ArrayList<ImmutablePair<Resource, List<Resource>>>()
453 //Set the real resource instance id to the decomosed resource list
454 //reset the resource instance id , because in the decompose flow ,its a random one.
455 //match the resource-instance-name and the model name
456 if (relationShipList != null) {
457 relationShipList.each {
459 JSONObject obj = getRelatedResourceInAAI(execution, (JSONObject)it, true)
461 for (Resource resource : deleteResourceList) {
463 boolean matches = processMatchingResource(resource, obj)
464 if((matches) && resource.getResourceType().equals(ResourceType.VNF)) {
465 List<Resource> delGroupList = new ArrayList<Resource>()
466 JSONArray vfRelationship = obj.getJSONArray("relationship-list")
467 for (int idx = 0; idx < vfRelationship.length(); idx++) {
468 JSONObject vfItem = vfRelationship.getJSONObject(idx)
469 JSONObject groupObject = getRelatedResourceInAAI(execution, vfItem, false)
470 List<GroupResource> groups = ((VnfResource)resource).getGroups()
471 for (GroupResource group : groups){
472 if(processMatchingResource(group, groupObject)){
473 delGroupList.add(group)
477 def delMap = new ImmutablePair(resource, delGroupList)
479 deleteRealResourceList.add(delMap)
485 // only delete real existing resources
486 execution.setVariable("deleteResourceList", deleteRealResourceList)
488 boolean isDeleteResourceListValid = false
489 if(deleteRealResourceList.size() > 0) {
490 isDeleteResourceListValid = true
492 execution.setVariable("isDeleteResourceListValid", isDeleteResourceListValid)
494 logger.debug("delete resource list : " + deleteRealResourceList)
495 } catch (Exception ex) {
496 String exceptionMessage = "Bpmn error encountered in create generic e2e service flow. processDecomposition() - " + ex.getMessage()
497 logger.error(exceptionMessage)
498 exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
500 logger.debug(" ***** exit postDecomposeService() of delete generic e2e service flow ***** ")
503 private boolean processMatchingResource(Resource resource, JSONObject obj) {
504 boolean matches = false
505 String modelName = resource.getModelInfo().getModelName()
507 String modelCustomizationUuid = resource.getModelInfo().getModelCustomizationUuid()
508 if (StringUtils.containsIgnoreCase(obj.get("resourceType"), modelName)) {
509 resource.setResourceId(obj.get("resourceInstanceId"))
510 //deleteRealResourceList.add(resource)
512 } else if (modelCustomizationUuid.equals(obj.get("modelCustomizationId"))) {
513 resource.setResourceId(obj.get("resourceInstanceId"))
514 resource.setResourceInstanceName(obj.get("resourceType"))
515 //deleteRealResourceList.add(resource)
521 public void preInitResourcesOperStatus(DelegateExecution execution){
522 logger.debug(" ======== STARTED preInitResourcesOperStatus Process ======== ")
524 String serviceId = execution.getVariable("serviceInstanceId")
525 String operationId = execution.getVariable("operationId")
526 String operationType = execution.getVariable("operationType")
527 String resourceTemplateUUIDs = ""
528 String result = "processing"
529 String progress = "0"
531 String operationContent = "Prepare service creation"
532 logger.debug("Generated new operation for Service Instance serviceId:" + serviceId + " operationId:" + operationId + " operationType:" + operationType)
533 serviceId = UriUtils.encode(serviceId,"UTF-8")
534 execution.setVariable("serviceInstanceId", serviceId)
535 execution.setVariable("operationId", operationId)
536 execution.setVariable("operationType", operationType)
537 List<ImmutablePair<Resource, List<Resource>>> deleteResourceList = execution.getVariable("deleteResourceList")
539 String serviceRelationShip = execution.getVariable("serviceRelationShip")
540 for (ImmutablePair rc : deleteResourceList) {
541 Resource resource = rc.getKey()
542 resourceTemplateUUIDs = resourceTemplateUUIDs + resource.getModelInfo().getModelCustomizationUuid() + ":"
545 def dbAdapterEndpoint = UrnPropertiesReader.getVariable("mso.adapters.openecomp.db.endpoint", execution)
546 execution.setVariable("URN_mso_adapters_openecomp_db_endpoint", dbAdapterEndpoint)
549 """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
550 xmlns:ns="http://org.onap.so/requestsdb">
553 <ns:initResourceOperationStatus xmlns:ns="http://org.onap.so/requestsdb">
554 <serviceId>${MsoUtils.xmlEscape(serviceId)}</serviceId>
555 <operationId>${MsoUtils.xmlEscape(operationId)}</operationId>
556 <operationType>${MsoUtils.xmlEscape(operationType)}</operationType>
557 <resourceTemplateUUIDs>${MsoUtils.xmlEscape(resourceTemplateUUIDs)}</resourceTemplateUUIDs>
558 </ns:initResourceOperationStatus>
560 </soapenv:Envelope>"""
562 payload = utils.formatXml(payload)
563 execution.setVariable("CVFMI_initResOperStatusRequest", payload)
564 logger.debug("Outgoing initResourceOperationStatus: \n" + payload)
565 logger.debug("CreateVfModuleInfra Outgoing initResourceOperationStatus Request: " + payload)
568 logger.debug("Exception Occured Processing preInitResourcesOperStatus. Exception is:\n" + e)
569 execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during preInitResourcesOperStatus Method:\n" + e.getMessage())
571 logger.debug("======== COMPLETED preInitResourcesOperStatus Process ======== ")
574 public void prepareUpdateServiceOperationStatus(DelegateExecution execution){
575 logger.debug(" ======== STARTED prepareUpdateServiceOperationStatus Process ======== ")
577 String serviceId = execution.getVariable("serviceInstanceId")
578 String operationId = execution.getVariable("operationId")
580 String result = execution.getVariable("result")
581 String progress = execution.getVariable("progress")
583 String operationContent = execution.getVariable("operationContent")
585 serviceId = UriUtils.encode(serviceId,"UTF-8")
587 def dbAdapterEndpoint = UrnPropertiesReader.getVariable("mso.adapters.openecomp.db.endpoint", execution)
588 execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
589 logger.debug("DB Adapter Endpoint is: " + dbAdapterEndpoint)
592 """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
593 xmlns:ns="http://org.onap.so/requestsdb">
596 <ns:updateServiceOperationStatus xmlns:ns="http://org.onap.so/requestsdb">
597 <serviceId>${MsoUtils.xmlEscape(serviceId)}</serviceId>
598 <operationId>${MsoUtils.xmlEscape(operationId)}</operationId>
599 <operationType>DELETE</operationType>
600 <userId>${MsoUtils.xmlEscape(userId)}</userId>
601 <result>${MsoUtils.xmlEscape(result)}</result>
602 <operationContent>${MsoUtils.xmlEscape(operationContent)}</operationContent>
603 <progress>${MsoUtils.xmlEscape(progress)}</progress>
604 <reason>${MsoUtils.xmlEscape(reason)}</reason>
605 </ns:updateServiceOperationStatus>
607 </soapenv:Envelope>"""
609 payload = utils.formatXml(payload)
610 execution.setVariable("CVFMI_updateServiceOperStatusRequest", payload)
611 logger.debug("Outgoing updateServiceOperStatusRequest: \n" + payload)
614 logger.error("Exception Occured Processing prepareUpdateServiceOperationStatus. Exception is:\n" + e)
615 execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during prepareUpdateServiceOperationStatus Method:\n" + e.getMessage())
617 logger.debug("======== COMPLETED prepareUpdateServiceOperationStatus Process ======== ")
621 * post config request.
623 public void postConfigRequest(execution){