summaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks
diff options
context:
space:
mode:
authorr.bogacki <r.bogacki@samsung.com>2019-03-14 15:24:57 +0100
committerr.bogacki <r.bogacki@samsung.com>2019-03-18 11:02:58 +0100
commitfaa0b29e3b7b1fa23a1444a5d9ac020b3c60dedc (patch)
tree4839f982eb10e66e587b55b757ffc00dd5f9d30f /bpmn/so-bpmn-tasks
parent4ca3abdffa40e7777a233151f66ee0b4131ed538 (diff)
Removed MsoLogger class
Bye bye MsoLogger class. Extracted constants to separated classes. Fixed imports. Change-Id: I7c8e0527e7dbd097d3ea93b9dab279354652da47 Issue-ID: LOG-631 Signed-off-by: Robert Bogacki <r.bogacki@samsung.com>
Diffstat (limited to 'bpmn/so-bpmn-tasks')
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java8
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java4
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/network/tasks/NetworkAdapterDeleteTasks.java1
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImpl.java6
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasks.java4
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOut.java4
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java8
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/NetworkBBUtils.java1
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/manualhandling/tasks/ManualHandlingTasks.java38
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java1
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingClientResponseValidator.java16
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/NetworkAdapterResources.java1
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SdnCommonTasks.java12
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java4
14 files changed, 53 insertions, 55 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java
index 8dd55d9eac..760f623812 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java
@@ -62,8 +62,8 @@ import org.onap.so.client.orchestration.AAIVfModuleResources;
import org.onap.so.client.orchestration.AAIVnfResources;
import org.onap.so.client.orchestration.AAIVolumeGroupResources;
import org.onap.so.client.orchestration.AAIVpnBindingResources;
+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;
import org.springframework.beans.factory.annotation.Autowired;
@@ -121,7 +121,7 @@ public class AAICreateTasks {
String errorMessage = "Exception in creating ServiceSubscription. Customer not present for ServiceInstanceID: "
+ serviceInstance.getServiceInstanceId();
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), errorMessage, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), errorMessage);
+ ErrorCode.UnknownError.getValue(), errorMessage);
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, errorMessage);
}
aaiSIResources.createServiceSubscription(customer);
@@ -166,13 +166,13 @@ public class AAICreateTasks {
if (owningEntityName == null || "".equals(owningEntityName)) {
String msg = "Exception in AAICreateOwningEntity. Can't create an owningEntity with no owningEntityName.";
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), msg);
+ ErrorCode.UnknownError.getValue(), msg);
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg);
} else {
if(aaiSIResources.existsOwningEntityName(owningEntityName)){
String msg = "Exception in AAICreateOwningEntity. Can't create OwningEntity as name already exists in AAI associated with a different owning-entity-id (name must be unique)";
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), msg);
+ ErrorCode.UnknownError.getValue(), msg);
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg);
}else{
aaiSIResources.createOwningEntityandConnectServiceInstance(owningEntity, serviceInstance);
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java
index dc8f72c7a5..821dfc18b0 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java
@@ -36,8 +36,8 @@ import org.onap.so.bpmn.servicedecomposition.entities.BuildingBlock;
import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock;
import org.onap.so.bpmn.servicedecomposition.entities.WorkflowResourceIds;
import org.onap.so.client.exception.ExceptionBuilder;
+import org.onap.so.logger.ErrorCode;
import org.onap.so.logger.MessageEnum;
-import org.onap.so.logger.MsoLogger;
import org.onap.so.serviceinstancebeans.RequestDetails;
import org.onap.so.serviceinstancebeans.ServiceInstancesRequest;
import org.slf4j.Logger;
@@ -136,7 +136,7 @@ public class ExecuteActivity implements JavaDelegate {
protected void buildAndThrowException(DelegateExecution execution, String msg, Exception ex) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), msg, ex);
+ ErrorCode.UnknownError.getValue(), msg, ex);
execution.setVariable("ExecuteActivityErrorMessage", msg);
exceptionBuilder.buildAndThrowWorkflowException(execution, 7000, msg);
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/network/tasks/NetworkAdapterDeleteTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/network/tasks/NetworkAdapterDeleteTasks.java
index 41dabf9302..5eab6110f9 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/network/tasks/NetworkAdapterDeleteTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/network/tasks/NetworkAdapterDeleteTasks.java
@@ -29,7 +29,6 @@ import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB;
import org.onap.so.client.adapter.network.mapper.NetworkAdapterObjectMapper;
import org.onap.so.client.exception.ExceptionBuilder;
-import org.onap.so.logger.MsoLogger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImpl.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImpl.java
index 47357d8ef3..05ddb2e417 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImpl.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImpl.java
@@ -37,8 +37,8 @@ import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB;
import org.onap.so.client.exception.ExceptionBuilder;
import org.onap.so.exceptions.MarshallerException;
+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;
import org.springframework.beans.factory.annotation.Autowired;
@@ -167,9 +167,9 @@ public class VnfAdapterImpl {
SAXSource source = new SAXSource(xmlReader, inputSource);
return jaxbUnmarshaller.unmarshal(source);
} catch (Exception e) {
- logger.error("{} {} {}", MessageEnum.GENERAL_EXCEPTION.toString(), MsoLogger.ErrorCode.SchemaError.getValue(),
+ logger.error("{} {} {}", MessageEnum.GENERAL_EXCEPTION.toString(), ErrorCode.SchemaError.getValue(),
e.getMessage(), e);
- throw new MarshallerException("Error parsing VNF Adapter response. " + e.getMessage(), MsoLogger.ErrorCode.SchemaError.getValue(), e);
+ throw new MarshallerException("Error parsing VNF Adapter response. " + e.getMessage(), ErrorCode.SchemaError.getValue(), e);
}
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasks.java
index 4b4b3eca23..876a555b10 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasks.java
@@ -37,8 +37,8 @@ import org.onap.so.client.exception.BBObjectNotFoundException;
import org.onap.so.client.exception.ExceptionBuilder;
import org.onap.so.db.catalog.beans.ControllerSelectionReference;
import org.onap.so.db.catalog.client.CatalogDbClient;
+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;
import org.springframework.beans.factory.annotation.Autowired;
@@ -137,7 +137,7 @@ public class AppcRunTasks {
catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION.toString(),
"Caught exception in runAppcCommand", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "APPC Error", e);
+ ErrorCode.UnknownError.getValue(), "APPC Error", e);
appcMessage = e.getMessage();
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOut.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOut.java
index 6c0cdb39f6..717d0deff6 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOut.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOut.java
@@ -39,8 +39,8 @@ import org.onap.so.client.appc.ApplicationControllerAction;
import org.onap.so.client.exception.ExceptionBuilder;
import org.onap.so.db.catalog.beans.ControllerSelectionReference;
import org.onap.so.db.catalog.client.CatalogDbClient;
+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;
import org.springframework.beans.factory.annotation.Autowired;
@@ -155,7 +155,7 @@ public class ConfigurationScaleOut {
} catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION.toString(),
"Caught exception in runAppcCommand in ConfigurationScaleOut", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "APPC Error", e);
+ ErrorCode.UnknownError.getValue(), "APPC Error", e);
appcMessage = e.getMessage();
}
logger.error("Error Message: " + appcMessage);
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java
index feb9fb81b4..ce14bde0b3 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java
@@ -34,8 +34,8 @@ import org.onap.so.client.appc.ApplicationControllerAction;
import org.onap.so.client.exception.ExceptionBuilder;
import org.onap.so.db.catalog.client.CatalogDbClient;
import org.onap.so.db.catalog.beans.ControllerSelectionReference;
+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;
import org.springframework.beans.factory.annotation.Autowired;
@@ -111,7 +111,7 @@ public class GenericVnfHealthCheck {
appcMessage = appCClient.getErrorMessage();
} catch (BpmnError ex) {
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- "Caught exception in GenericVnfHealthCheck", "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(), ex);
+ "Caught exception in GenericVnfHealthCheck", "BPMN", ErrorCode.UnknownError.getValue(), ex);
appcMessage = ex.getMessage();
exceptionUtil.buildAndThrowWorkflowException(execution, Integer.parseInt(appcCode), appcMessage);
} catch (Exception e) {
@@ -120,13 +120,13 @@ public class GenericVnfHealthCheck {
appcMessage = "Request to APPC timed out. ";
logger.error("{} {} {} {} {}", MessageEnum.RA_CONNECTION_EXCEPTION.toString(),
"Caught timedOut exception in runAppcCommand in GenericVnfHealthCheck", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "APPC Error", e);
+ ErrorCode.UnknownError.getValue(), "APPC Error", e);
throw e;
}
else {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION.toString(),
"Caught exception in runAppcCommand in GenericVnfHealthCheck", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "APPC Error", e);
+ ErrorCode.UnknownError.getValue(), "APPC Error", e);
appcMessage = e.getMessage();
exceptionUtil.buildAndThrowWorkflowException(execution, Integer.parseInt(appcCode), appcMessage);
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/NetworkBBUtils.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/NetworkBBUtils.java
index 945c693d47..217a60b60a 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/NetworkBBUtils.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/NetworkBBUtils.java
@@ -26,7 +26,6 @@ import java.util.Optional;
import org.onap.so.bpmn.common.BuildingBlockExecution;
import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
import org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock;
-import org.onap.so.logger.MsoLogger;
import org.springframework.stereotype.Component;
@Component
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/manualhandling/tasks/ManualHandlingTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/manualhandling/tasks/ManualHandlingTasks.java
index 2fba3b3b25..9214635602 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/manualhandling/tasks/ManualHandlingTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/manualhandling/tasks/ManualHandlingTasks.java
@@ -11,14 +11,16 @@ import org.onap.so.client.exception.ExceptionBuilder;
import org.onap.so.client.ticket.ExternalTicket;
import org.onap.so.db.request.beans.InfraActiveRequests;
import org.onap.so.db.request.client.RequestsDbClient;
+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;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class ManualHandlingTasks {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, ManualHandlingTasks.class);
+ private static final Logger logger = LoggerFactory.getLogger(ManualHandlingTasks.class);
private static final String TASK_TYPE_PAUSE = "pause";
private static final String TASK_TYPE_FALLOUT = "fallout";
@@ -34,7 +36,7 @@ public class ManualHandlingTasks {
DelegateExecution execution = task.getExecution();
try {
String taskId = task.getId();
- msoLogger.debug("taskId is: " + taskId);
+ logger.debug("taskId is: " + taskId);
String type = TASK_TYPE_FALLOUT;
String nfRole = (String) execution.getVariable("vnfType");
String subscriptionServiceType = (String) execution.getVariable("serviceType");
@@ -66,13 +68,13 @@ public class ManualHandlingTasks {
TaskService taskService = execution.getProcessEngineServices().getTaskService();
taskService.setVariables(taskId, taskVariables);
- msoLogger.debug("successfully created fallout task: "+ taskId);
+ logger.debug("successfully created fallout task: "+ taskId);
} catch (BpmnError e) {
- msoLogger.debug("BPMN exception: " + e.getMessage());
+ logger.debug("BPMN exception: " + e.getMessage());
throw e;
} catch (Exception ex){
String msg = "Exception in setFalloutTaskVariables " + ex.getMessage();
- msoLogger.debug(msg);
+ logger.debug(msg);
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg);
}
}
@@ -83,7 +85,7 @@ public class ManualHandlingTasks {
try {
String taskId = task.getId();
- msoLogger.debug("taskId is: " + taskId);
+ logger.debug("taskId is: " + taskId);
String type = TASK_TYPE_PAUSE;
String nfRole = (String) execution.getVariable("vnfType");
String subscriptionServiceType = (String) execution.getVariable("serviceType");
@@ -115,13 +117,13 @@ public class ManualHandlingTasks {
TaskService taskService = execution.getProcessEngineServices().getTaskService();
taskService.setVariables(taskId, taskVariables);
- msoLogger.debug("successfully created pause task: "+ taskId);
+ logger.debug("successfully created pause task: "+ taskId);
} catch (BpmnError e) {
- msoLogger.debug("BPMN exception: " + e.getMessage());
+ logger.debug("BPMN exception: " + e.getMessage());
throw e;
} catch (Exception ex){
String msg = "Exception in setPauseTaskVariables " + ex.getMessage();
- msoLogger.debug(msg);
+ logger.debug(msg);
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg);
}
@@ -134,24 +136,24 @@ public class ManualHandlingTasks {
try {
String taskId = task.getId();
- msoLogger.debug("taskId is: " + taskId);
+ logger.debug("taskId is: " + taskId);
TaskService taskService = execution.getProcessEngineServices().getTaskService();
Map<String, Object> taskVariables = taskService.getVariables(taskId);
String responseValue = (String) taskVariables.get("responseValue");
- msoLogger.debug("Received responseValue on completion: "+ responseValue);
+ logger.debug("Received responseValue on completion: "+ responseValue);
// Have to set the first letter of the response to upper case
String responseValueUppercaseStart = responseValue.substring(0, 1).toUpperCase() + responseValue.substring(1);
- msoLogger.debug("ResponseValue to taskListener: "+ responseValueUppercaseStart);
+ logger.debug("ResponseValue to taskListener: "+ responseValueUppercaseStart);
execution.setVariable("responseValueTask", responseValueUppercaseStart);
} catch (BpmnError e) {
- msoLogger.debug("BPMN exception: " + e.getMessage());
+ logger.debug("BPMN exception: " + e.getMessage());
throw e;
} catch (Exception ex){
String msg = "Exception in completeManualTask " + ex.getMessage();
- msoLogger.debug(msg);
+ logger.debug(msg);
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg);
}
@@ -177,10 +179,10 @@ public class ManualHandlingTasks {
ticket.createTicket();
} catch (BpmnError e) {
String msg = "BPMN error in createAOTSTicket " + e.getMessage();
- msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, msg, "BPMN", MsoLogger.ErrorCode.UnknownError, "");
+ logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, msg, "BPMN", ErrorCode.UnknownError.getValue());
} catch (Exception ex){
String msg = "Exception in createExternalTicket " + ex.getMessage();
- msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, msg, "BPMN", MsoLogger.ErrorCode.UnknownError, "");
+ logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, msg, "BPMN", ErrorCode.UnknownError.getValue());
}
}
@@ -195,7 +197,7 @@ public class ManualHandlingTasks {
requestDbclient.updateInfraActiveRequests(request);
} catch (Exception e) {
- msoLogger.error("Unable to save the updated request status to the DB",e);
+ logger.error("Unable to save the updated request status to the DB",e);
}
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java
index f917aed39e..8c774d8677 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java
@@ -51,7 +51,6 @@ import org.onap.so.bpmn.servicedecomposition.generalobjects.OrchestrationContext
import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoNetwork;
import org.onap.so.entity.MsoRequest;
-import org.onap.so.logger.MsoLogger;
import org.onap.so.openstack.beans.NetworkRollback;
import org.onap.so.openstack.beans.RouteTarget;
import org.onap.so.openstack.beans.Subnet;
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingClientResponseValidator.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingClientResponseValidator.java
index 17fa10a186..8456f26239 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingClientResponseValidator.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingClientResponseValidator.java
@@ -31,8 +31,8 @@ import org.onap.namingservice.model.NameGenResponse;
import org.onap.namingservice.model.NameGenResponseError;
import org.onap.namingservice.model.Respelement;
import org.onap.so.client.exception.BadResponseException;
+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;
import org.springframework.http.ResponseEntity;
@@ -52,7 +52,7 @@ public class NamingClientResponseValidator {
public String validateNameGenResponse(ResponseEntity<NameGenResponse> response) throws BadResponseException {
if (response == null) {
logger.error("{} {} {} {} {}", MessageEnum.RA_GENERAL_EXCEPTION.toString(), NO_RESPONSE_FROM_NAMING_SERVICE,
- "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(),
+ "BPMN", ErrorCode.UnknownError.getValue(),
NO_RESPONSE_FROM_NAMING_SERVICE);
throw new BadResponseException(NO_RESPONSE_FROM_NAMING_SERVICE);
}
@@ -62,7 +62,7 @@ public class NamingClientResponseValidator {
NameGenResponse responseBody = response.getBody();
if (responseBody == null) {
logger.error("{} {} {} {} {}", MessageEnum.RA_GENERAL_EXCEPTION.toString(), NULL_RESPONSE_FROM_NAMING_SERVICE,
- "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(),
+ "BPMN", ErrorCode.UnknownError.getValue(),
NULL_RESPONSE_FROM_NAMING_SERVICE);
throw new BadResponseException(NULL_RESPONSE_FROM_NAMING_SERVICE);
}
@@ -92,7 +92,7 @@ public class NamingClientResponseValidator {
}
String errorMessage = String.format(NAMING_SERVICE_ERROR, errorMessageString);
logger.error("{} {} {} {} {}", MessageEnum.RA_GENERAL_EXCEPTION.toString(), errorMessage, "BPMN",
- MsoLogger.ErrorCode.DataError.getValue(), errorMessage);
+ ErrorCode.DataError.getValue(), errorMessage);
throw new BadResponseException(errorMessage);
}
}
@@ -100,7 +100,7 @@ public class NamingClientResponseValidator {
public String validateNameGenDeleteResponse(ResponseEntity<NameGenDeleteResponse> response) throws BadResponseException {
if (response == null) {
logger.error("{} {} {} {} {}", MessageEnum.RA_GENERAL_EXCEPTION.toString(), NO_RESPONSE_FROM_NAMING_SERVICE,
- "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(),
+ "BPMN", ErrorCode.UnknownError.getValue(),
NO_RESPONSE_FROM_NAMING_SERVICE);
throw new BadResponseException(NO_RESPONSE_FROM_NAMING_SERVICE);
}
@@ -110,7 +110,7 @@ public class NamingClientResponseValidator {
NameGenDeleteResponse responseBody = response.getBody();
if (responseBody == null) {
logger.error("{} {} {} {} {}", MessageEnum.RA_GENERAL_EXCEPTION.toString(), NULL_RESPONSE_FROM_NAMING_SERVICE,
- "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(),
+ "BPMN", ErrorCode.UnknownError.getValue(),
NULL_RESPONSE_FROM_NAMING_SERVICE);
throw new BadResponseException(NULL_RESPONSE_FROM_NAMING_SERVICE);
}
@@ -123,7 +123,7 @@ public class NamingClientResponseValidator {
String errorMessage = String.format(NAMING_SERVICE_ERROR, errorMessageString);
logger.error("{} {} {} {} {}", MessageEnum.RA_GENERAL_EXCEPTION.toString(), errorMessage, "BPMN",
- MsoLogger.ErrorCode.DataError.getValue(), errorMessage);
+ ErrorCode.DataError.getValue(), errorMessage);
throw new BadResponseException(errorMessage);
}
}
@@ -143,7 +143,7 @@ public class NamingClientResponseValidator {
}
String errorMessage = String.format(NAMING_SERVICE_ERROR, errorMessageString);
logger.error("{} {} {} {} {}", MessageEnum.RA_GENERAL_EXCEPTION.toString(), errorMessage, "BPMN",
- MsoLogger.ErrorCode.DataError.getValue(), errorMessage);
+ ErrorCode.DataError.getValue(), errorMessage);
return errorMessage;
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/NetworkAdapterResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/NetworkAdapterResources.java
index 6867cb8ebb..8f3445529e 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/NetworkAdapterResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/NetworkAdapterResources.java
@@ -43,7 +43,6 @@ import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
import org.onap.so.client.adapter.network.NetworkAdapterClientException;
import org.onap.so.client.adapter.network.NetworkAdapterClientImpl;
import org.onap.so.client.adapter.network.mapper.NetworkAdapterObjectMapper;
-import org.onap.so.logger.MsoLogger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SdnCommonTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SdnCommonTasks.java
index 8513b26a5d..418e70a09e 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SdnCommonTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SdnCommonTasks.java
@@ -30,8 +30,8 @@ import org.apache.commons.lang.StringUtils;
import org.apache.http.HttpStatus;
import org.onap.so.client.exception.BadResponseException;
import org.onap.so.client.exception.MapperException;
+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;
import org.springframework.http.HttpHeaders;
@@ -69,7 +69,7 @@ public class SdnCommonTasks {
} catch (JsonProcessingException e) {
logger.error("{} {} {} {} {}", MessageEnum.JAXB_EXCEPTION.toString(),
COULD_NOT_CONVERT_SDNC_POJO_TO_JSON,
- "BPMN", MsoLogger.ErrorCode.DataError.getValue(), e.getMessage());
+ "BPMN", ErrorCode.DataError.getValue(), e.getMessage());
throw new MapperException(COULD_NOT_CONVERT_SDNC_POJO_TO_JSON);
}
jsonRequest = "{\"input\":" + jsonRequest + "}";
@@ -101,7 +101,7 @@ public class SdnCommonTasks {
public String validateSDNResponse(LinkedHashMap<String, Object> output) throws BadResponseException {
if (CollectionUtils.isEmpty(output)) {
logger.error("{} {} {} {} {}", MessageEnum.RA_RESPONSE_FROM_SDNC.toString(), NO_RESPONSE_FROM_SDNC, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), NO_RESPONSE_FROM_SDNC);
+ ErrorCode.UnknownError.getValue(), NO_RESPONSE_FROM_SDNC);
throw new BadResponseException(NO_RESPONSE_FROM_SDNC);
}
LinkedHashMap<String, Object> embeddedResponse =(LinkedHashMap<String, Object>) output.get("output");
@@ -128,7 +128,7 @@ public class SdnCommonTasks {
} else {
String errorMessage = String.format(SDNC_CODE_NOT_0_OR_IN_200_299, responseMessage);
logger.error("{} {} {} {} {}", MessageEnum.RA_RESPONSE_FROM_SDNC.toString(), errorMessage, "BPMN",
- MsoLogger.ErrorCode.DataError.getValue(), errorMessage);
+ ErrorCode.DataError.getValue(), errorMessage);
throw new BadResponseException(errorMessage);
}
}
@@ -142,7 +142,7 @@ public class SdnCommonTasks {
public String validateSDNGetResponse(LinkedHashMap<String, Object> output) throws BadResponseException {
if (CollectionUtils.isEmpty(output)) {
logger.error("{} {} {} {} {}", MessageEnum.RA_RESPONSE_FROM_SDNC.toString(), NO_RESPONSE_FROM_SDNC, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), NO_RESPONSE_FROM_SDNC);
+ ErrorCode.UnknownError.getValue(), NO_RESPONSE_FROM_SDNC);
throw new BadResponseException(NO_RESPONSE_FROM_SDNC);
}
ObjectMapper objMapper = new ObjectMapper();
@@ -153,7 +153,7 @@ public class SdnCommonTasks {
}
catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.RA_RESPONSE_FROM_SDNC.toString(), BAD_RESPONSE_FROM_SDNC,
- "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(),
+ "BPMN", ErrorCode.UnknownError.getValue(),
BAD_RESPONSE_FROM_SDNC);
throw new BadResponseException(BAD_RESPONSE_FROM_SDNC);
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java
index 5124435a79..b8c5fad41d 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java
@@ -47,8 +47,8 @@ import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
import org.onap.so.client.exception.MapperException;
import org.onap.so.client.sdnc.beans.SDNCSvcAction;
import org.onap.so.client.sdnc.beans.SDNCSvcOperation;
+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;
import org.springframework.beans.factory.annotation.Autowired;
@@ -174,7 +174,7 @@ public class VfModuleTopologyOperationRequestMapper {
objectPath = assignResponseInfo.getVfModuleResponseInformation().getObjectPath();
} catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.RA_RESPONSE_FROM_SDNC.toString(), e.getMessage(), "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), e.getMessage());
+ ErrorCode.UnknownError.getValue(), e.getMessage());
}
}
return objectPath;