summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api')
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/ActionConstants.java24
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/logging/StatusCode.java26
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/util/ActionUtil.java10
3 files changed, 18 insertions, 42 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/ActionConstants.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/ActionConstants.java
index 25cd06d3ce..1823b752c8 100644
--- a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/ActionConstants.java
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/ActionConstants.java
@@ -21,6 +21,8 @@
package org.openecomp.sdc.action;
+import org.onap.logging.ref.slf4j.ONAPLogConstants;
+
public class ActionConstants {
//
@@ -73,21 +75,21 @@ public class ActionConstants {
public static final String ARTIFACT_METADATA_ATTR_UUID = "ARTIFACT_UUID";
public static final String ARTIFACT_METADATA_ATTR_NAME = "ARTIFACT_NAME";
- public static final String REQUEST_ID = "uuid";
+ public static final String REQUEST_ID = ONAPLogConstants.MDCs.REQUEST_ID;
public static final String SERVICE_INSTANCE_ID = "serviceInstanceID";
- public static final String PARTNER_NAME = "userId";
- public static final String SERVICE_NAME = "ServiceName";
- public static final String INSTANCE_UUID = "InstanceUUID";
+ public static final String PARTNER_NAME = ONAPLogConstants.MDCs.PARTNER_NAME;
+ public static final String SERVICE_NAME = ONAPLogConstants.MDCs.SERVICE_NAME;
+ public static final String INSTANCE_UUID = ONAPLogConstants.MDCs.INSTANCE_UUID;
public static final String REMOTE_HOST = "RemoteHost";
- public static final String CLIENT_IP = "ClientIP";
+ public static final String CLIENT_IP = ONAPLogConstants.MDCs.CLIENT_IP_ADDRESS;
public static final String CATEGORY_LOG_LEVEL = "level";
- public static final String STATUS_CODE = "StatusCode";
- public static final String RESPONSE_CODE = "ResponseCode";
- public static final String RESPONSE_DESCRIPTION = "ResponseDescription";
+ public static final String STATUS_CODE = ONAPLogConstants.MDCs.RESPONSE_STATUS_CODE;
+ public static final String RESPONSE_CODE = ONAPLogConstants.MDCs.RESPONSE_CODE;
+ public static final String RESPONSE_DESCRIPTION = ONAPLogConstants.MDCs.RESPONSE_DESCRIPTION;
public static final String ELAPSED_TIME = "ElapsedTime";
- public static final String BEGIN_TIMESTAMP = "BeginTimestamp";
- public static final String TARGET_SERVICE_NAME = "TargetServiceName";
- public static final String TARGET_ENTITY = "TargetEntity";
+ public static final String BEGIN_TIMESTAMP = ONAPLogConstants.MDCs.ENTRY_TIMESTAMP;
+ public static final String TARGET_SERVICE_NAME = ONAPLogConstants.MDCs.TARGET_SERVICE_NAME;
+ public static final String TARGET_ENTITY = ONAPLogConstants.MDCs.TARGET_ENTITY;
public static final String TARGET_ENTITY_API = "API";
public static final String TARGET_ENTITY_DB = "DB";
public static final String END_TIMESTAMP = "EndTimestamp";
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/logging/StatusCode.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/logging/StatusCode.java
deleted file mode 100644
index b0d5bab12b..0000000000
--- a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/logging/StatusCode.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.sdc.action.logging;
-
-public enum StatusCode {
- COMPLETE,
- ERROR
-}
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/util/ActionUtil.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/util/ActionUtil.java
index 5d91a599a9..2fba053b2d 100644
--- a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/util/ActionUtil.java
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/util/ActionUtil.java
@@ -20,8 +20,8 @@
package org.openecomp.sdc.action.util;
+import org.onap.logging.ref.slf4j.ONAPLogConstants.ResponseStatus;
import org.openecomp.sdc.action.logging.CategoryLogLevel;
-import org.openecomp.sdc.action.logging.StatusCode;
import org.openecomp.sdc.action.types.ActionLogResponseCode;
import org.openecomp.sdc.action.types.ActionSubOperation;
import org.slf4j.MDC;
@@ -93,15 +93,15 @@ public class ActionUtil {
*
* @param statusCode Response code for the current operation
*/
- public static void actionLogPostProcessor(StatusCode statusCode) {
+ public static void actionLogPostProcessor(ResponseStatus statusCode) {
actionLogPostProcessor(statusCode, false);
}
- public static void actionLogPostProcessor(StatusCode statusCode, boolean isServiceMetricLog) {
+ public static void actionLogPostProcessor(ResponseStatus statusCode, boolean isServiceMetricLog) {
actionLogPostProcessor(statusCode, null, isServiceMetricLog);
}
- public static void actionLogPostProcessor(StatusCode statusCode, String responseCode,
+ public static void actionLogPostProcessor(ResponseStatus statusCode, String responseCode,
boolean isServiceMetricLog) {
actionLogPostProcessor(statusCode, responseCode, null, isServiceMetricLog);
}
@@ -114,7 +114,7 @@ public class ActionUtil {
* @param responseDescription the response description
* @param isServiceMetricLog the is service metric log
*/
- public static void actionLogPostProcessor(StatusCode statusCode, String responseCode,
+ public static void actionLogPostProcessor(ResponseStatus statusCode, String responseCode,
String responseDescription,
boolean isServiceMetricLog) {
MDC.put(STATUS_CODE, statusCode.name());