* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
import org.w3c.dom.NodeList
import org.xml.sax.InputSource
-import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
+import org.slf4j.Logger
+import org.slf4j.LoggerFactory
/**
* This class supports the DoDeleteVnf subFlow
*
*/
class DoDeleteVnf extends AbstractServiceTaskProcessor {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoDeleteVnf.class);
+ private static final Logger logger = LoggerFactory.getLogger( DoDeleteVnf.class);
String Prefix="DoDVNF_"
ExceptionUtil exceptionUtil = new ExceptionUtil()
public void preProcessRequest(DelegateExecution execution) {
execution.setVariable("prefix",Prefix)
- msoLogger.trace("STARTED DoDeleteVnf PreProcessRequest Process")
+ logger.trace("STARTED DoDeleteVnf PreProcessRequest Process")
execution.setVariable("DoDVNF_SuccessIndicator", false)
execution.setVariable("DoDVNF_vnfInUse", false)
String vnfId = execution.getVariable("vnfId")
execution.setVariable("DoDVNF_vnfId", vnfId)
- msoLogger.debug("Incoming Vnf(Instance) Id is: " + vnfId)
+ logger.debug("Incoming Vnf(Instance) Id is: " + vnfId)
}catch(BpmnError b){
- msoLogger.debug("Rethrowing MSOWorkflowException")
+ logger.debug("Rethrowing MSOWorkflowException")
throw b
}catch(Exception e){
- msoLogger.debug(" Error Occured in DoDeleteVnf PreProcessRequest method!" + e)
+ logger.debug(" Error Occured in DoDeleteVnf PreProcessRequest method!" + e)
exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoDeleteVnf PreProcessRequest")
}
- msoLogger.trace("COMPLETED DoDeleteVnf PreProcessRequest Process ")
+ logger.trace("COMPLETED DoDeleteVnf PreProcessRequest Process ")
}
public void getVnf(DelegateExecution execution){
execution.setVariable("prefix",Prefix)
- msoLogger.trace("STARTED DoDeleteVnf getVnf Process ")
+ logger.trace("STARTED DoDeleteVnf getVnf Process ")
try {
AAIResourcesClient resourceClient = new AAIResourcesClient()
if(!relationships.isEmpty()){
execution.setVariable("DoDVNF_vnfInUse", true)
}else{
- msoLogger.debug("Relationship NOT related to OpenStack")
+ logger.debug("Relationship NOT related to OpenStack")
}
}
}
} catch (Exception ex) {
- msoLogger.debug("Error Occured in DoDeleteVnf getVnf Process " + ex.getMessage())
+ logger.debug("Error Occured in DoDeleteVnf getVnf Process " + ex.getMessage())
exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoDeleteVnf getVnf Process")
}
- msoLogger.trace("COMPLETED DoDeleteVnf getVnf Process ")
+ logger.trace("COMPLETED DoDeleteVnf getVnf Process ")
}
/**
* Deletes the generic vnf from aai
*/
public void deleteVnf(DelegateExecution execution) {
- msoLogger.trace("STARTED deleteVnf")
+ logger.trace("STARTED deleteVnf")
try {
String vnfId = execution.getVariable("DoDVNF_vnfId")
AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
resourceClient.delete(uri)
- msoLogger.trace("COMPLETED deleteVnf")
+ logger.trace("COMPLETED deleteVnf")
} catch (Exception ex) {
- msoLogger.debug("Error Occured in DoDeleteVnf deleteVnf Process " + ex.getMessage())
+ logger.debug("Error Occured in DoDeleteVnf deleteVnf Process " + ex.getMessage())
exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoDeleteVnf deleteVnf Process")
}
}