Removed MsoLogger class
[so.git] / bpmn / so-bpmn-infrastructure-common / src / main / groovy / org / onap / so / bpmn / infrastructure / scripts / CreateVnfInfra.groovy
index 1c2975b..c0e8d5a 100644 (file)
@@ -23,6 +23,7 @@
 package org.onap.so.bpmn.infrastructure.scripts
 
 import org.onap.so.bpmn.common.scripts.CatalogDbUtilsFactory
+import org.onap.so.logger.ErrorCode
 
 import static org.apache.commons.lang3.StringUtils.*;
 
@@ -42,7 +43,6 @@ import org.onap.so.bpmn.core.domain.VnfResource
 import org.onap.so.bpmn.core.json.JsonUtils;
 import org.onap.so.bpmn.infrastructure.aai.groovyflows.AAICreateResources;
 import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
 
@@ -169,7 +169,7 @@ class CreateVnfInfra extends AbstractServiceTaskProcessor {
                                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)
                                }
@@ -195,7 +195,7 @@ class CreateVnfInfra extends AbstractServiceTaskProcessor {
                        throw b
                }catch(Exception e){
                        logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), " Error Occurred in " +
-                                       "CreateVnfInfra PreProcessRequest method", "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e)
+                                       "CreateVnfInfra PreProcessRequest method", "BPMN", ErrorCode.UnknownError.getValue(), "Exception is:\n" + e)
                        exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occurred in CreateVnfInfra PreProcessRequest")
 
                }
@@ -221,7 +221,7 @@ class CreateVnfInfra extends AbstractServiceTaskProcessor {
 
                } catch (Exception ex) {
                        logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), " Error Occurred in CreateVnfInfra SendSyncResponse Process", "BPMN",
-                               MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e)
+                               ErrorCode.UnknownError.getValue(), "Exception is:\n" + e)
                        exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in CreateVnfInfra SendSyncResponse Process")
 
                }
@@ -247,7 +247,7 @@ class CreateVnfInfra extends AbstractServiceTaskProcessor {
 
                }catch(Exception e){
                        logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), "Exception Occurred Processing preProcessSDNCAssignRequest", "BPMN",
-                               MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e)
+                               ErrorCode.UnknownError.getValue(), "Exception is:\n" + e)
                        exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during prepareProvision Method:\n" + e.getMessage())
                }
                logger.trace("COMPLETED preProcessSDNCAssignRequest")
@@ -271,7 +271,7 @@ class CreateVnfInfra extends AbstractServiceTaskProcessor {
 
                }catch(Exception e){
                        logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), "Exception Occured " +
-                                       "Processing preProcessSDNCActivateRequest", "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e)
+                                       "Processing preProcessSDNCActivateRequest", "BPMN", ErrorCode.UnknownError.getValue(), "Exception is:\n" + e)
                        exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during  preProcessSDNCActivateRequest Method:\n" + e.getMessage())
                }
                logger.trace("COMPLETED  preProcessSDNCActivateRequest Process")
@@ -462,7 +462,7 @@ class CreateVnfInfra extends AbstractServiceTaskProcessor {
                        
                        if (vnfs == null) {
                                logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), "No matching " +
-                                               "VNFs in Catalog DB for vnfModelCustomizationUuid=" + vnfModelCustomizationUuid, "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(), "");
+                                               "VNFs in Catalog DB for vnfModelCustomizationUuid=" + vnfModelCustomizationUuid, "BPMN", ErrorCode.UnknownError.getValue(), "");
                                exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "No matching VNFs in Catalog DB for vnfModelCustomizationUuid=" + vnfModelCustomizationUuid)
                        }
                        
@@ -471,7 +471,7 @@ class CreateVnfInfra extends AbstractServiceTaskProcessor {
                        
                        if (vnf == null) {
                                logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), "No matching VNF" +
-                                               " in Catalog DB for vnfModelCustomizationUuid=" + vnfModelCustomizationUuid, "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(), "");
+                                               " in Catalog DB for vnfModelCustomizationUuid=" + vnfModelCustomizationUuid, "BPMN", ErrorCode.UnknownError.getValue(), "");
                                exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "No matching VNF in Catalog DB for vnfModelCustomizationUuid=" + vnfModelCustomizationUuid)
                        }                       
                        
@@ -544,7 +544,7 @@ class CreateVnfInfra extends AbstractServiceTaskProcessor {
                        }catch(Exception ex){
                                String msg = "Exception in LineOfBusiness. " + ex.getMessage();
                                logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
-                                               MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + ex)
+                                               ErrorCode.UnknownError.getValue(), "Exception is:\n" + ex)
                                exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
                        }
                }