Removed MsoLogger class
[so.git] / bpmn / so-bpmn-infrastructure-common / src / main / groovy / org / onap / so / bpmn / infrastructure / scripts / DoUpdateVfModule.groovy
index 47647bd..a17dc9d 100644 (file)
@@ -44,8 +44,8 @@ import org.onap.so.client.aai.entities.uri.AAIUri
 import org.onap.so.client.aai.entities.uri.AAIUriFactory;
 import org.onap.so.client.aai.entities.uri.AAIResourceUri
 import org.onap.so.constants.Defaults
+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
 
@@ -327,7 +327,7 @@ public class DoUpdateVfModule extends VfModuleBase {
                        if (sdncCallbackUrl == null || sdncCallbackUrl.trim().isEmpty()) {
                                def msg = 'Required variable \'mso.workflow.sdncadapter.callback\' is missing'
                                logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
-                                               MsoLogger.ErrorCode.UnknownError.getValue());
+                                               ErrorCode.UnknownError.getValue());
                                exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
                        }
 
@@ -337,7 +337,7 @@ public class DoUpdateVfModule extends VfModuleBase {
                } 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 preProcessRequest(): ' + e.getMessage())
                }
        }
@@ -378,7 +378,7 @@ public class DoUpdateVfModule extends VfModuleBase {
                } 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 preparePrepareUpdateAAIVfModule(): ' + e.getMessage())
                }
        }
@@ -429,14 +429,14 @@ public class DoUpdateVfModule extends VfModuleBase {
                } catch(BpmnError b){
                        logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
                                        "Rethrowing MSOWorkflowException", "BPMN",
-                                       MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + b);
+                                       ErrorCode.UnknownError.getValue(), "Exception is:\n" + b);
                        throw b
                }catch (Exception e) {
                        // try error
                        String errorMessage = "Bpmn error encountered in CreateVfModule flow. Unexpected Response from AAI - " + e.getMessage()
                        logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
                                        "AAI Query Cloud Region Failed. Exception - " + "\n" + errorMessage, "BPMN",
-                                       MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+                                       ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
                        exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Exception occured during prepConfirmVolumeGroupTenant(): " + e.getMessage())
                }
                logger.trace('Exited ' + method)
@@ -543,7 +543,7 @@ public class DoUpdateVfModule extends VfModuleBase {
                } 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 prepSDNCTopologyChg(): ' + e.getMessage())
                }
        }
@@ -607,7 +607,7 @@ public class DoUpdateVfModule extends VfModuleBase {
                } 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 prepSDNCTopologyQuery(): ' + e.getMessage())
                }
        }
@@ -709,7 +709,7 @@ public class DoUpdateVfModule extends VfModuleBase {
                } 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 prepVnfAdapterRest(): ' + e.getMessage())
                }
        }
@@ -757,7 +757,7 @@ public class DoUpdateVfModule extends VfModuleBase {
                } 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 prepUpdateAAIGenericVnf(): ' + e.getMessage())
                }
        }
@@ -831,7 +831,7 @@ public class DoUpdateVfModule extends VfModuleBase {
                } 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 prepUpdateAAIVfModule(): ' + e.getMessage())
                }
        }
@@ -934,7 +934,7 @@ public class DoUpdateVfModule extends VfModuleBase {
                } 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 prepSDNCTopologyAct(): ' + e.getMessage())
                }
        }
@@ -955,7 +955,7 @@ public class DoUpdateVfModule extends VfModuleBase {
                        def WorkflowException workflowException = (WorkflowException) execution.getVariable('WorkflowException')
                        logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
                                        method + ' caught WorkflowException: ' + workflowException.getErrorMessage(), "BPMN",
-                                       MsoLogger.ErrorCode.UnknownError.getValue());
+                                       ErrorCode.UnknownError.getValue());
 
                        logger.trace('Exited ' + method)
                } catch (BpmnError e) {
@@ -963,7 +963,7 @@ public class DoUpdateVfModule extends VfModuleBase {
                } 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.buildWorkflowException(execution, 1002, 'Error in handleWorkflowException(): ' + e.getMessage())
                }
        }
@@ -1042,7 +1042,7 @@ public class DoUpdateVfModule extends VfModuleBase {
                } 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 queryAAIVfModule(): ' + e.getMessage())
                }
        }