summaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-api-handler-infra/src/main/java
diff options
context:
space:
mode:
authorPlummer, Brittany <brittany.plummer@att.com>2019-12-16 12:23:01 -0500
committerBenjamin, Max (mb388a) <mb388a@att.com>2019-12-16 12:23:01 -0500
commit2f2a1de2e42f0877461ac52e7242af45a5ed14c1 (patch)
tree5e1d67ae6fbb32fae7d6c37a3df42d268b77410b /mso-api-handlers/mso-api-handler-infra/src/main/java
parenta0a017f918430fbd1c14c3af2718b993f0e9357c (diff)
Fix requestId returned in Get
Set requestId to be returned to requestId sent on incoming request Issue-ID: SO-2573 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: I7ac20400f2b5f4dc9abff81b263acef5ad52a2fa
Diffstat (limited to 'mso-api-handlers/mso-api-handler-infra/src/main/java')
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java
index ab51d491eb..ae68cc6032 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java
@@ -44,6 +44,7 @@ import javax.ws.rs.core.UriInfo;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.EnumUtils;
import org.apache.http.HttpStatus;
+import org.onap.logging.ref.slf4j.ONAPLogConstants;
import org.onap.so.apihandler.common.ErrorNumbers;
import org.onap.so.apihandler.common.ResponseBuilder;
import org.onap.so.apihandlerinfra.exceptions.ApiException;
@@ -70,6 +71,7 @@ import org.onap.so.serviceinstancebeans.ServiceInstancesRequest;
import org.onap.so.utils.UUIDChecker;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.slf4j.MDC;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -158,7 +160,8 @@ public class OrchestrationRequests {
request.setRequestId(requestId);
orchestrationResponse.setRequest(request);
- return builder.buildResponse(HttpStatus.SC_OK, requestId, orchestrationResponse, apiVersion);
+ return builder.buildResponse(HttpStatus.SC_OK, MDC.get(ONAPLogConstants.MDCs.REQUEST_ID), orchestrationResponse,
+ apiVersion);
}
@GET
@@ -218,7 +221,8 @@ public class OrchestrationRequests {
}
orchestrationList.setRequestList(requestLists);
- return builder.buildResponse(HttpStatus.SC_OK, null, orchestrationList, apiVersion);
+ return builder.buildResponse(HttpStatus.SC_OK, MDC.get(ONAPLogConstants.MDCs.REQUEST_ID), orchestrationList,
+ apiVersion);
}
@POST