Removed MsoLogger class
[so.git] / bpmn / so-bpmn-infrastructure-common / src / main / groovy / org / onap / so / bpmn / infrastructure / scripts / ReplaceVnfInfra.groovy
index 534e5b5..4321dba 100644 (file)
@@ -34,8 +34,8 @@ import org.onap.so.bpmn.core.json.JsonUtils
 import org.onap.so.client.aai.*
 import org.onap.so.client.appc.ApplicationControllerOrchestrator
 import org.onap.so.client.appc.ApplicationControllerSupport
+import org.onap.so.logger.ErrorCode
 import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
 
@@ -235,7 +235,7 @@ public class ReplaceVnfInfra extends VnfCmBase {
                        String restFaultMessage = e.getMessage()
                        logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
                                        "Exception Encountered - " + "\n" + restFaultMessage, "BPMN",
-                                       MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+                                       ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
                        exceptionUtil.buildAndThrowWorkflowException(execution, 5000, restFaultMessage)
                }       
        }
@@ -278,7 +278,7 @@ public class ReplaceVnfInfra extends VnfCmBase {
                } catch (Exception e) {
                        logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
                                        'Caught exception in ' + method, "BPMN",
-                                       MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+                                       ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
                        exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in sendResponse(): ' + e.getMessage())
                }
        }
@@ -329,7 +329,7 @@ public class ReplaceVnfInfra extends VnfCmBase {
                } catch (Exception e) {
                        logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
                                        'Caught exception in ' + method, "BPMN",
-                                       MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+                                       ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
                        exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in getVnfResourceDecomposition(): ' + e.getMessage())
                }
        }
@@ -371,7 +371,7 @@ public class ReplaceVnfInfra extends VnfCmBase {
                } catch (Exception e) {
                        logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
                                        'Caught exception in ' + method, "BPMN",
-                                       MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+                                       ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
                        execution.setVariable("errorCode", "1002")
                        execution.setVariable("errorText", e.getMessage())
                        //exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in checkIfVnfInMaintInAAI(): ' + e.getMessage())
@@ -415,7 +415,7 @@ public class ReplaceVnfInfra extends VnfCmBase {
                } catch (Exception e) {
                        logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
                                        'Caught exception in ' + method, "BPMN",
-                                       MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+                                       ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
                        execution.setVariable("errorCode", "1002")
                        execution.setVariable("errorText", e.getMessage())
                        //exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in checkIfPserversInMaintInAAI(): ' + e.getMessage())
@@ -463,7 +463,7 @@ public class ReplaceVnfInfra extends VnfCmBase {
                } catch (Exception e) {
                        logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
                                        'Caught exception in ' + method, "BPMN",
-                                       MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+                                       ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
                        execution.setVariable("errorCode", "1002")
                        execution.setVariable("errorText", e.getMessage())
                }
@@ -533,19 +533,19 @@ public class ReplaceVnfInfra extends VnfCmBase {
                } catch (BpmnError e) {
                        logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
                                        'Caught exception in ' + method, "BPMN",
-                                       MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+                                       ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
                        execution.setVariable("errorCode", "1002")
                        execution.setVariable("errorText", e.getMessage())                      
                } catch (java.lang.NoSuchMethodError e) {
                        logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
                                        'Caught exception in ' + method, "BPMN",
-                                       MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+                                       ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
                        execution.setVariable("errorCode", "1002")
                        execution.setVariable("errorText", e.getMessage())                              
                } catch (Exception e) {
                        logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
                                        'Caught exception in ' + method, "BPMN",
-                                       MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+                                       ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
                        execution.setVariable("errorCode", "1002")
                        execution.setVariable("errorText", e.getMessage())                      
                }