aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2019-03-11 20:47:50 +0000
committerGerrit Code Review <gerrit@onap.org>2019-03-11 20:47:50 +0000
commitc068ba17e06cc1aab0616c4ad11f8be8c2d23e45 (patch)
tree44f57982933b42184251308a7684176af04acd00
parentadcc632997be2f621eadce891ffddeda83771b71 (diff)
parentd85bbade599e86c29286e0b4279c811bd83638c6 (diff)
Merge "Cleaned up MsoLogger class"
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java18
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java6
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/MsoTenantAdapterImpl.java4
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java21
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java8
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java5
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java5
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java1
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java2
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/SDNCAdapterCallbackServiceImpl.java5
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/VnfAdapterNotifyServiceImpl.java8
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowMessageResource.java1
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowResource.java1
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/LoggingAndURNMappingPlugin.java1
-rw-r--r--common/src/main/java/org/onap/so/logger/MsoLogger.java80
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/GlobalHealthcheckHandler.java2
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/NodeHealthcheckHandler.java3
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestration.java1
18 files changed, 8 insertions, 164 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java
index 80333d6c7e..25d8e564da 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java
@@ -129,7 +129,6 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync {
String error;
MsoLogger.setLogContext (msoRequest);
- MsoLogger.setServiceName ("CreateNetworkA");
logger.debug("Async Create Network: {} of type {} in {}/{}", networkName, networkType, cloudSiteId, tenantId);
// Use the synchronous method to perform the actual Create
@@ -252,10 +251,7 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync {
String messageId,
MsoRequest msoRequest,
String notificationUrl) {
- String error;
- String serviceName = "UpdateNetworkA";
- MsoLogger.setServiceName (serviceName);
MsoLogger.setLogContext (msoRequest);
logger.debug("Async Update Network: {} of type {} in {}/{}", networkId, networkType, cloudSiteId, tenantId);
@@ -292,9 +288,7 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync {
msoRequest,
subnetIdMap,
networkRollback);
- MsoLogger.setServiceName (serviceName);
} catch (NetworkException e) {
- MsoLogger.setServiceName (serviceName);
logger.debug ("Got a NetworkException on updateNetwork: ", e);
MsoExceptionCategory exCat = null;
String eMsg = null;
@@ -351,8 +345,6 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync {
String error;
MsoLogger.setLogContext (msoRequest);
- String serviceName = "QueryNetworkA";
- MsoLogger.setServiceName (serviceName);
logger.debug("Async Query Network {} in {}/{}", networkNameOrId, cloudSiteId, tenantId);
String errorCreateNetworkMessage = "{} {} Error sending createNetwork notification {} ";
@@ -378,9 +370,7 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync {
status,
vlans,
subnetIdMap);
- MsoLogger.setServiceName (serviceName);
} catch (NetworkException e) {
- MsoLogger.setServiceName (serviceName);
logger.debug (NETWORK_EXCEPTION_MSG, e);
MsoExceptionCategory exCat = null;
String eMsg = null;
@@ -453,7 +443,6 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync {
String error;
MsoLogger.setLogContext (msoRequest);
String serviceName = "DeleteNetworkA";
- MsoLogger.setServiceName (serviceName);
logger.debug("Async Delete Network {} in {}/{}", networkId, cloudSiteId, tenantId);
// Use the synchronous method to perform the actual Create
@@ -464,9 +453,7 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync {
try {
networkAdapter.deleteNetwork (cloudSiteId, tenantId, networkType, modelCustomizationUuid, networkId, msoRequest, networkDeleted);
- MsoLogger.setServiceName (serviceName);
} catch (NetworkException e) {
- MsoLogger.setServiceName (serviceName);
logger.debug (NETWORK_EXCEPTION_MSG, e);
MsoExceptionCategory exCat = null;
String eMsg = null;
@@ -513,9 +500,6 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync {
*/
@Override
public void rollbackNetworkA (NetworkRollback rollback, String messageId, String notificationUrl) {
- String error;
- String serviceName = "RollbackNetworkA";
- MsoLogger.setServiceName (serviceName);
// rollback may be null (e.g. if network already existed when Create was called)
if (rollback == null) {
logger.warn("{} {} Rollback is null", MessageEnum.RA_ROLLBACK_NULL,
@@ -530,9 +514,7 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync {
try {
networkAdapter.rollbackNetwork (rollback);
- MsoLogger.setServiceName (serviceName);
} catch (NetworkException e) {
- MsoLogger.setServiceName (serviceName);
logger.debug ("Got a NetworkException on rollbackNetwork: ", e);
// Build and send Asynchronous error response
MsoExceptionCategory exCat = null;
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java
index 79966577f8..bcb6b1be42 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java
@@ -267,8 +267,6 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
Holder <Map <String, String>> subnetIdMap,
Holder <NetworkRollback> rollback) throws NetworkException {
MsoLogger.setLogContext (msoRequest);
- MsoLogger.setServiceName (CREATE_NETWORK_CONTEXT);
-
logger.debug("*** CREATE Network: {} of type {} in {}/{}", networkName, networkType, cloudSiteId, tenantId);
// Will capture execution time for metrics
@@ -715,7 +713,6 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
Holder <Map <String, String>> subnetIdMap,
Holder <NetworkRollback> rollback) throws NetworkException {
MsoLogger.setLogContext (msoRequest);
- MsoLogger.setServiceName (UPDATE_NETWORK_CONTEXT);
logger.debug("***UPDATE Network adapter with Network: {} of type {} in {}/{}", networkName, networkType,
cloudSiteId, tenantId);
@@ -1151,7 +1148,6 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
Holder <List <RouteTarget>> routeTargets,
Holder <Map <String, String>> subnetIdMap) throws NetworkException {
MsoLogger.setLogContext (msoRequest);
- MsoLogger.setServiceName ("QueryNetwork");
logger.debug("*** QUERY Network with Network: {} in {}/{}", networkNameOrId, cloudSiteId, tenantId);
// Will capture execution time for metrics
@@ -1290,7 +1286,6 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
MsoRequest msoRequest,
Holder <Boolean> networkDeleted) throws NetworkException {
MsoLogger.setLogContext (msoRequest);
- MsoLogger.setServiceName ("DeleteNetwork");
logger.debug("*** DELETE Network adapter with Network: {} in {}/{}", networkId, cloudSiteId, tenantId);
// Will capture execution time for metrics
@@ -1382,7 +1377,6 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
*/
@Override
public void rollbackNetwork (NetworkRollback rollback) throws NetworkException {
- MsoLogger.setServiceName ("RollbackNetwork");
// Will capture execution time for metrics
long startTime = System.currentTimeMillis ();
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/MsoTenantAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/MsoTenantAdapterImpl.java
index db9226bb19..a937bd9499 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/MsoTenantAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/MsoTenantAdapterImpl.java
@@ -89,7 +89,6 @@ public class MsoTenantAdapterImpl implements MsoTenantAdapter {
Holder <String> tenantId,
Holder <TenantRollback> rollback) throws TenantException {
MsoLogger.setLogContext (msoRequest);
- MsoLogger.setServiceName (CREATE_TENANT);
logger.debug("Call to MSO createTenant adapter. Creating Tenant: {} in {}", tenantName, cloudSiteId);
@@ -154,7 +153,6 @@ public class MsoTenantAdapterImpl implements MsoTenantAdapter {
Holder <String> tenantName,
Holder <Map <String, String>> metadata) throws TenantException {
MsoLogger.setLogContext (msoRequest);
- MsoLogger.setServiceName (QUERY_TENANT);
logger.debug ("Querying Tenant {} in {}", tenantNameOrId, cloudSiteId);
MsoTenantUtils tUtils;
@@ -199,7 +197,6 @@ public class MsoTenantAdapterImpl implements MsoTenantAdapter {
MsoRequest msoRequest,
Holder <Boolean> tenantDeleted) throws TenantException {
MsoLogger.setLogContext (msoRequest);
- MsoLogger.setServiceName (DELETE_TENANT);
logger.debug ("Deleting Tenant {} in {}", tenantId, cloudSiteId);
@@ -230,7 +227,6 @@ public class MsoTenantAdapterImpl implements MsoTenantAdapter {
*/
@Override
public void rollbackTenant (TenantRollback rollback) throws TenantException {
- MsoLogger.setServiceName (ROLLBACK_TENANT);
// rollback may be null (e.g. if stack already existed when Create was called)
if (rollback == null) {
logger.warn("{} {} rollbackTenant, rollback is null", MessageEnum.RA_ROLLBACK_NULL,
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java
index 2c9d3776a7..b445dc8a26 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java
@@ -132,10 +132,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
String messageId,
MsoRequest msoRequest,
String notificationUrl) {
- String error;
- String serviceName = "CreateVnfA";
MsoLogger.setLogContext (msoRequest);
- MsoLogger.setServiceName (serviceName);
logger.info("{} createVnfA", MessageEnum.RA_ASYNC_CREATE_VNF);
// Use the synchronous method to perform the actual Create
MsoVnfAdapter vnfAdapter = vnfImpl;
@@ -160,9 +157,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
vnfId,
outputs,
vnfRollback);
- MsoLogger.setServiceName (serviceName);
} catch (VnfException e) {
- MsoLogger.setServiceName (serviceName);
logger.error("{} {} VnfException in createVnfA ", MessageEnum.RA_CREATE_VNF_ERR,
MsoLogger.ErrorCode.BusinessProcesssError.getValue(), e);
org.onap.so.adapters.vnf.async.client.MsoExceptionCategory exCat = null;
@@ -218,9 +213,6 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
String messageId,
MsoRequest msoRequest,
String notificationUrl) {
- String error;
- String serviceName = "UpdateVnfA";
- MsoLogger.setServiceName (serviceName);
MsoLogger.setLogContext (msoRequest);
logger.info("{} UpdateVnfA", MessageEnum.RA_ASYNC_UPDATE_VNF);
@@ -234,9 +226,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
try {
vnfAdapter.updateVnf (cloudSiteId, tenantId, vnfType,vnfVersion, vnfName, requestType, volumeGroupHeatStackId, inputs, msoRequest, outputs, vnfRollback);
- MsoLogger.setServiceName (serviceName);
} catch (VnfException e) {
- MsoLogger.setServiceName (serviceName);
logger.error("{} {} Exception sending updateVnf notification ", MessageEnum.RA_UPDATE_VNF_ERR,
MsoLogger.ErrorCode.BusinessProcesssError.getValue(), e);
org.onap.so.adapters.vnf.async.client.MsoExceptionCategory exCat = null;
@@ -301,7 +291,6 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
String notificationUrl) {
String error;
String serviceName = "QueryVnfA";
- MsoLogger.setServiceName (serviceName);
MsoLogger.setLogContext (msoRequest);
logger.info("{}", MessageEnum.RA_ASYNC_QUERY_VNF);
@@ -316,9 +305,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
try {
vnfAdapter.queryVnf (cloudSiteId, tenantId, vnfName, msoRequest, vnfExists, vnfId, status, outputs);
- MsoLogger.setServiceName (serviceName);
} catch (VnfException e) {
- MsoLogger.setServiceName (serviceName);
logger.error("{} {} Exception sending queryVnfA notification ", MessageEnum.RA_QUERY_VNF_ERR,
MsoLogger.ErrorCode.BusinessProcesssError.getValue(), e);
org.onap.so.adapters.vnf.async.client.MsoExceptionCategory exCat = null;
@@ -391,7 +378,6 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
String notificationUrl) {
String error;
String serviceName = "DeleteVnfA";
- MsoLogger.setServiceName (serviceName);
MsoLogger.setLogContext (msoRequest);
logger.info("{}", MessageEnum.RA_ASYNC_DELETE_VNF);
@@ -400,9 +386,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
try {
vnfAdapter.deleteVnf (cloudSiteId, tenantId, vnfName, msoRequest);
- MsoLogger.setServiceName (serviceName);
} catch (VnfException e) {
- MsoLogger.setServiceName (serviceName);
logger.error("{} {} Exception sending deleteVnfA notification ", MessageEnum.RA_DELETE_VNF_ERR,
MsoLogger.ErrorCode.BusinessProcesssError.getValue(), e);
org.onap.so.adapters.vnf.async.client.MsoExceptionCategory exCat = null;
@@ -451,9 +435,6 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
*/
@Override
public void rollbackVnfA (VnfRollback rollback, String messageId, String notificationUrl) {
- String serviceName = "RollbackVnfA";
- MsoLogger.setServiceName (serviceName);
- String error;
// rollback may be null (e.g. if stack already existed when Create was called)
if (rollback == null) {
logger.info("{} rollbackVnfA: Empty Rollback: No action to perform", MessageEnum.RA_ROLLBACK_NULL);
@@ -468,9 +449,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
try {
vnfAdapter.rollbackVnf (rollback);
- MsoLogger.setServiceName (serviceName);
} catch (VnfException e) {
- MsoLogger.setServiceName (serviceName);
logger.error("{} {} Exception sending rollbackVnfA notification ", MessageEnum.RA_ROLLBACK_VNF_ERR,
MsoLogger.ErrorCode.BusinessProcesssError.getValue(), e);
org.onap.so.adapters.vnf.async.client.MsoExceptionCategory exCat = null;
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
index ce060abee8..a1d7698ad1 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
@@ -275,7 +275,6 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
Holder <VnfRollback> rollback) throws VnfException {
// As of 1707 - this method should no longer be called
MsoLogger.setLogContext (msoRequest.getRequestId (), msoRequest.getServiceInstanceId ());
- MsoLogger.setServiceName ("UpdateVnf");
logger.debug("UpdateVnf called?? This should not be called any longer - update vfModule");
}
@@ -304,7 +303,6 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
Holder <VnfStatus> status,
Holder <Map <String, String>> outputs) throws VnfException {
MsoLogger.setLogContext (msoRequest);
- MsoLogger.setServiceName ("QueryVnf");
logger.debug("Querying VNF {} in {}", vnfName, cloudSiteId + "/" + tenantId);
// Will capture execution time for metrics
@@ -364,7 +362,6 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String vnfName,
MsoRequest msoRequest) throws VnfException {
MsoLogger.setLogContext (msoRequest);
- MsoLogger.setServiceName ("DeleteVnf");
logger.debug("Deleting VNF {} in {}", vnfName, cloudSiteId + "/" + tenantId);
// Will capture execution time for metrics
long startTime = System.currentTimeMillis ();
@@ -401,7 +398,6 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
@Override
public void rollbackVnf (VnfRollback rollback) throws VnfException {
long startTime = System.currentTimeMillis ();
- MsoLogger.setServiceName ("RollbackVnf");
// rollback may be null (e.g. if stack already existed when Create was called)
if (rollback == null) {
logger.info(MessageEnum.RA_ROLLBACK_NULL.toString(), "OpenStack", "rollbackVnf");
@@ -605,7 +601,6 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
}
}
MsoLogger.setLogContext (msoRequest);
- MsoLogger.setServiceName ("CreateVfModule");
String requestTypeString = "";
if (requestType != null && !"".equals(requestType)) {
requestTypeString = requestType;
@@ -1377,7 +1372,6 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String methodName = "updateVfModule";
MsoLogger.setLogContext (msoRequest.getRequestId (), msoRequest.getServiceInstanceId ());
String serviceName = VNF_ADAPTER_SERVICE_NAME + methodName;
- MsoLogger.setServiceName (serviceName);
StringBuilder sbInit = new StringBuilder();
sbInit.append("updateVfModule: \n");
@@ -1505,7 +1499,6 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
throw new VnfException (me);
}
if (nestedHeatStack == null || nestedHeatStack.getStatus() == HeatStatus.NOTFOUND) {
- MsoLogger.setServiceName (serviceName);
String error = "Update VFModule: Attached volume heatStack ID DOES NOT EXIST " + nestedStackId + " in " + cloudSiteId + "/" + tenantId + " USER ERROR" ;
logger.error("{} {} {} {} {} {} {} {} {}", MessageEnum.RA_QUERY_VNF_ERR.toString(), vnfName, cloudSiteId,
tenantId, error, "OpenStack", "QueryStack", MsoLogger.ErrorCode.DataError.getValue(), error);
@@ -1538,7 +1531,6 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
throw new VnfException (me);
}
if (nestedBaseHeatStack == null || nestedBaseHeatStack.getStatus() == HeatStatus.NOTFOUND) {
- MsoLogger.setServiceName (serviceName);
String error = "Update VFModule: Attached base heatStack ID DOES NOT EXIST " + nestedBaseStackId + " in " + cloudSiteId + "/" + tenantId + " USER ERROR" ;
logger.error ("{} {} {} {} {} {} {} {} {}", MessageEnum.RA_QUERY_VNF_ERR.toString(), vfModuleName,
cloudSiteId, tenantId, error, "OpenStack",
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java
index b0601e9264..bba960cddf 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java
@@ -207,7 +207,6 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter {
throws VnfException
{
MsoLogger.setLogContext (msoRequest);
- MsoLogger.setServiceName ("QueryVnfCloudify");
logger.debug ("Querying VNF {} in {}", vnfName, cloudSiteId + "/" + tenantId);
// Will capture execution time for metrics
@@ -266,7 +265,6 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter {
String vnfName,
MsoRequest msoRequest) throws VnfException {
MsoLogger.setLogContext (msoRequest);
- MsoLogger.setServiceName ("DeleteVnf");
// This operation is no longer supported at the VNF level. The adapter is only called to deploy modules.
logger.debug("DeleteVNF command attempted but not supported");
@@ -285,7 +283,6 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter {
@Override
public void rollbackVnf (VnfRollback rollback) throws VnfException {
long startTime = System.currentTimeMillis ();
- MsoLogger.setServiceName ("RollbackVnf");
// rollback may be null (e.g. if stack already existed when Create was called)
if (rollback == null) {
logger.info ("{} {} {} {}", MessageEnum.RA_ROLLBACK_NULL.toString(), "OpenStack", "rollbackVnf", MsoLogger
@@ -580,7 +577,6 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter {
long startTime = System.currentTimeMillis ();
MsoLogger.setLogContext (msoRequest);
- MsoLogger.setServiceName ("CreateVfModule");
// Require a model customization ID. Every VF Module definition must have one.
if (modelCustomizationUuid == null || modelCustomizationUuid.isEmpty()) {
@@ -1184,7 +1180,6 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter {
MsoRequest msoRequest,
Holder <Map <String, String>> outputs) throws VnfException {
MsoLogger.setLogContext (msoRequest);
- MsoLogger.setServiceName ("DeleteVf");
logger.debug ("Deleting VF " + vnfName + " in " + cloudSiteId + "/" + tenantId);
// Will capture execution time for metrics
long startTime = System.currentTimeMillis ();
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java
index cb1e350774..704d54c918 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java
@@ -226,7 +226,6 @@ public class MsoVnfPluginAdapterImpl implements MsoVnfAdapter {
throws VnfException
{
MsoLogger.setLogContext (msoRequest);
- MsoLogger.setServiceName ("QueryVnf");
logger.debug("Querying VNF " + vnfNameOrId + " in " + cloudSiteId + "/" + tenantId);
// Will capture execution time for metrics
@@ -283,7 +282,6 @@ public class MsoVnfPluginAdapterImpl implements MsoVnfAdapter {
String vnfName,
MsoRequest msoRequest) throws VnfException {
MsoLogger.setLogContext (msoRequest);
- MsoLogger.setServiceName ("DeleteVnf");
// This operation is no longer supported at the VNF level. The adapter is only called to deploy modules.
logger.debug("DeleteVNF command attempted but not supported");
@@ -302,7 +300,6 @@ public class MsoVnfPluginAdapterImpl implements MsoVnfAdapter {
@Override
public void rollbackVnf (VnfRollback rollback) throws VnfException {
long startTime = System.currentTimeMillis ();
- MsoLogger.setServiceName ("RollbackVnf");
// rollback may be null (e.g. if stack already existed when Create was called)
if (rollback == null) {
logger.info("{} {} {} {}", MessageEnum.RA_ROLLBACK_NULL.toString(), "OpenStack", "rollbackVnf",
@@ -622,7 +619,6 @@ public class MsoVnfPluginAdapterImpl implements MsoVnfAdapter {
long startTime = System.currentTimeMillis ();
MsoLogger.setLogContext (msoRequest);
- MsoLogger.setServiceName ("CreateVfModule");
// Require a model customization ID. Every VF Module definition must have one.
if (modelCustomizationUuid == null || modelCustomizationUuid.isEmpty()) {
@@ -1170,7 +1166,6 @@ public class MsoVnfPluginAdapterImpl implements MsoVnfAdapter {
Holder <Map <String, String>> outputs) throws VnfException
{
MsoLogger.setLogContext (msoRequest);
- MsoLogger.setServiceName ("DeleteVfModule");
logger.debug("Deleting VF Module " + vfModuleId + " in " + cloudSiteId + "/" + tenantId);
// Will capture execution time for metrics
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java
index 62233273b1..d0973d3c44 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java
@@ -66,7 +66,6 @@ public class SDNCServiceRequestTask {
public void runRequest(SDNCServiceRequest request,String msoRequestId,String msoServiceInstanceId,String myUrlSuffix)
{
MsoLogger.setLogContext(msoRequestId, msoServiceInstanceId);
- MsoLogger.setServiceName(getClass().getSimpleName());
String sdncRequestId = request.getSdncRequestId();
String sdncService = request.getSdncService();
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java b/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java
index bb70e3c65c..dc30b0e7de 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java
@@ -189,7 +189,6 @@ public class ASDCController {
*/
public void initASDC () throws ASDCControllerException {
String event = "Initialize the ASDC Controller";
- MsoLogger.setServiceName ("InitASDC");
logger.debug(event);
if (this.getControllerStatus () != ASDCControllerStatus.STOPPED) {
String endEvent = "The controller is already initialized, call the closeASDC method first";
@@ -237,7 +236,6 @@ public class ASDCController {
*/
public void closeASDC () throws ASDCControllerException {
- MsoLogger.setServiceName ("CloseController");
if (this.getControllerStatus () == ASDCControllerStatus.BUSY) {
throw new ASDCControllerException ("Cannot close the ASDC controller as it's currently in BUSY state");
}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/SDNCAdapterCallbackServiceImpl.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/SDNCAdapterCallbackServiceImpl.java
index 710144dbb9..267e24fec4 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/SDNCAdapterCallbackServiceImpl.java
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/SDNCAdapterCallbackServiceImpl.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -63,7 +65,6 @@ public class SDNCAdapterCallbackServiceImpl extends ProcessEngineAwareService im
String correlationVariable = "SDNCA_requestId";
String correlationValue = sdncAdapterCallbackRequest.getCallbackHeader().getRequestId();
- MsoLogger.setServiceName("MSO." + method);
MsoLogger.setLogContext(correlationValue, "N/A");
CallbackResult result = callback.handleCallback(method, message, messageEventName,
@@ -88,4 +89,4 @@ public class SDNCAdapterCallbackServiceImpl extends ProcessEngineAwareService im
return error;
}
}
-} \ No newline at end of file
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/VnfAdapterNotifyServiceImpl.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/VnfAdapterNotifyServiceImpl.java
index 96a11d21a7..65cc70d5f4 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/VnfAdapterNotifyServiceImpl.java
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/VnfAdapterNotifyServiceImpl.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -116,7 +118,6 @@ public class VnfAdapterNotifyServiceImpl extends ProcessEngineAwareService imple
String correlationVariable = "VNFQ_messageId";
String correlationValue = messageId;
- MsoLogger.setServiceName("MSO." + method);
MsoLogger.setLogContext(correlationValue, "N/A");
QueryVnfNotification message = new QueryVnfNotification();
@@ -160,7 +161,6 @@ public class VnfAdapterNotifyServiceImpl extends ProcessEngineAwareService imple
String correlationVariable = "VNFC_messageId";
String correlationValue = messageId;
- MsoLogger.setServiceName("MSO." + method);
MsoLogger.setLogContext(correlationValue, "N/A");
CreateVnfNotification message = new CreateVnfNotification();
@@ -201,7 +201,6 @@ public class VnfAdapterNotifyServiceImpl extends ProcessEngineAwareService imple
String correlationVariable = "VNFU_messageId";
String correlationValue = messageId;
- MsoLogger.setServiceName("MSO." + method);
MsoLogger.setLogContext(correlationValue, "N/A");
UpdateVnfNotification message = new UpdateVnfNotification();
@@ -237,7 +236,6 @@ public class VnfAdapterNotifyServiceImpl extends ProcessEngineAwareService imple
String correlationVariable = "VNFDEL_uuid";
String correlationValue = messageId;
- MsoLogger.setServiceName("MSO." + method);
MsoLogger.setLogContext(correlationValue, "N/A");
DeleteVnfNotification message = new DeleteVnfNotification();
@@ -250,4 +248,4 @@ public class VnfAdapterNotifyServiceImpl extends ProcessEngineAwareService imple
callback.handleCallback(method, message, messageEventName, messageVariable,
correlationVariable, correlationValue, logMarker);
}
-} \ No newline at end of file
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowMessageResource.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowMessageResource.java
index 8b35f0e6d6..072dec28c6 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowMessageResource.java
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowMessageResource.java
@@ -79,7 +79,6 @@ public class WorkflowMessageResource{
String message) {
String method = "receiveWorkflowMessage";
- MsoLogger.setServiceName("MSO." + method);
MsoLogger.setLogContext(correlator, "N/A");
logger.debug(LOGMARKER + " Received workflow message"
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowResource.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowResource.java
index 92f1b7a816..d10ecd1ce2 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowResource.java
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowResource.java
@@ -237,7 +237,6 @@ public class WorkflowResource extends ProcessEngineAwareService {
}
private void setLogContext(String processKey, Map<String, Object> inputVariables) {
- MsoLogger.setServiceName("MSO." + processKey);
if (inputVariables != null) {
MsoLogger.setLogContext(getValueFromInputVariables(inputVariables, "mso-request-id"),
getValueFromInputVariables(inputVariables, "mso-service-instance-id"));
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/LoggingAndURNMappingPlugin.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/LoggingAndURNMappingPlugin.java
index 62aad7e345..04059557ae 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/LoggingAndURNMappingPlugin.java
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/LoggingAndURNMappingPlugin.java
@@ -314,7 +314,6 @@ public class LoggingAndURNMappingPlugin extends AbstractProcessEnginePlugin {
.getName();
- MsoLogger.setServiceName(processName);
String requestId = (String) execution.getVariable("mso-request-id");
String svcid = (String) execution.getVariable("mso-service-instance-id");
MsoLogger.setLogContext(requestId, svcid);
diff --git a/common/src/main/java/org/onap/so/logger/MsoLogger.java b/common/src/main/java/org/onap/so/logger/MsoLogger.java
index 39a23b5c3e..341d7996a9 100644
--- a/common/src/main/java/org/onap/so/logger/MsoLogger.java
+++ b/common/src/main/java/org/onap/so/logger/MsoLogger.java
@@ -96,12 +96,6 @@ public class MsoLogger {
public static final String PARTNER_NAME = "PartnerName";
-
-
-
-
-
-
// Audit/Metric log specific
public static final String BEGINTIME = "BeginTimestamp";
public static final String STARTTIME = "StartTimeMilis";
@@ -184,9 +178,7 @@ public class MsoLogger {
this.value = value;
}
}
-
- public static final Marker ENTRY = MarkerFactory.getMarker("ENTRY");
- public static final Marker EXIT = MarkerFactory.getMarker("EXIT");
+
private Logger logger;
private Logger metricsLogger;
@@ -194,9 +186,6 @@ public class MsoLogger {
private static String instanceUUID, serverIP, serverName;
private MessageEnum exceptionArg, defaultException, defaultWarning, defaultAudit, defaultMetrics;
- // For internal logging of the initialization of MSO logs
- private static final Logger initLOGGER = LoggerFactory.getLogger(MsoLogger.class.getName());
-
private MsoLogger() {
this(MsoLogger.Catalog.GENERAL);
}
@@ -236,12 +225,6 @@ public class MsoLogger {
* @param targetVEntity
* Target VNF or VM acted opon by the component, if available
*/
- public void recordMetricEvent() {
- metricsLogger.info("");
- MDC.remove(TIMER);
- MDC.remove(TARGETENTITY);
- MDC.remove(TARGETSERVICENAME);
- }
public void recordMetricEvent(Long startTime, StatusCode statusCode, ResponseCode responseCode, String responseDesc,
String targetEntity, String targetServiceName, String targetVEntity) {
@@ -266,10 +249,7 @@ public class MsoLogger {
* @param responseDesc
* Human redable description of the application response code
*/
- public void recordAuditEvent(){
- auditLogger.info("");
- }
-
+
public void recordAuditEvent(Long startTime, StatusCode statusCode, ResponseCode responseCode,
String responseDesc) {
if (StringUtils.isEmpty(MDC.get(MsoLogger.PARTNERNAME))) {
@@ -1060,15 +1040,6 @@ public class MsoLogger {
return classArr[0].getMethodName();
}
- // Based on the discussion with Adrian, instanceUUID is used to identifiy
- // the mso instance,
- // it is generated during mso instance initialization period
- // The same mso instnace will use the same instanceUUID value, even after
- // restart
- private static String getInstanceUUID() {
- return System.getProperty("mso-instance-id");
- }
-
/**
* Set the requestId and serviceInstanceId
*
@@ -1088,36 +1059,6 @@ public class MsoLogger {
}
/**
- * Set the remoteIp and the basic HTTP Authentication user
- *
- * @param remoteIpp
- * The remote ip address
- * @param userp
- * The basic http authencitation user
- */
- public static void setLoggerParameters(String remoteIpp, String userp) {
- if (null != remoteIpp) {
- MDC.put(REMOTE_HOST, remoteIpp);
- }
- if (null != userp) {
- MDC.put(USER, userp);
- }
- }
-
- /**
- * Set the serviceName
- *
- * @param serviceNamep
- * The service name
- */
- public static void setServiceName(String serviceNamep) {
- if (null != serviceNamep) {
- MDC.put(SERVICE_NAME, serviceNamep);
- MDC.remove(SERVICE_NAME_IS_METHOD_NAME);
- }
- }
-
- /**
* Get the serviceName
*
* @return The service name
@@ -1127,13 +1068,6 @@ public class MsoLogger {
}
/**
- * Reset the serviceName
- */
- public static void resetServiceName() {
- MDC.remove(SERVICE_NAME);
- }
-
- /**
* Set the requestId and serviceInstanceId based on the mso request
*
* @param msoRequest
@@ -1191,14 +1125,4 @@ public class MsoLogger {
defaultMetrics = MessageEnum.GENERAL_METRICS;
}
}
-
- public void warnSimple(String message, Exception e) {
- logger.warn(message,e);
-
- }
-
-
-
-
-
}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/GlobalHealthcheckHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/GlobalHealthcheckHandler.java
index b002aa9f54..07c98c19b9 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/GlobalHealthcheckHandler.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/GlobalHealthcheckHandler.java
@@ -114,8 +114,6 @@ public class GlobalHealthcheckHandler {
HealthcheckResponse rsp = new HealthcheckResponse();
try{
- long startTime = System.currentTimeMillis ();
- MsoLogger.setServiceName ("GlobalHealthcheck");
// Generated RequestId
String requestId = requestContext.getProperty("requestId").toString();
MsoLogger.setLogContext(requestId, null);
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/NodeHealthcheckHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/NodeHealthcheckHandler.java
index cb458a7420..351a35826d 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/NodeHealthcheckHandler.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/NodeHealthcheckHandler.java
@@ -34,7 +34,6 @@ import javax.ws.rs.core.Response;
import org.apache.http.HttpStatus;
import org.onap.so.logger.MessageEnum;
-import org.onap.so.logger.MsoLogger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
@@ -60,8 +59,6 @@ public class NodeHealthcheckHandler {
@ApiOperation(value="Performing node health check",response=Response.class)
@Transactional
public Response nodeHealthcheck (@Context ContainerRequestContext requestContext) throws UnknownHostException {
- long startTime = System.currentTimeMillis ();
- MsoLogger.setServiceName ("NodeHealthcheck");
// Generated RequestId
String requestId = requestContext.getProperty("requestId").toString();
logger.info("{} {}", MessageEnum.APIH_GENERATED_REQUEST_ID.toString(), requestId);
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestration.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestration.java
index 377b03c4ab..9305b80c13 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestration.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestration.java
@@ -158,7 +158,6 @@ public class CloudResourcesOrchestration {
@ApiOperation(value="Get status of an Operational Environment based on filter criteria",response=Response.class)
@Transactional
public Response getOperationEnvironmentStatusFilter(@Context UriInfo ui, @PathParam("version") String version ) throws ApiException{
- MsoLogger.setServiceName ("getOperationEnvironmentStatusFilter");
MultivaluedMap<String, String> queryParams = ui.getQueryParameters();
List<String> requestIdKey = queryParams.get("requestId");