summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2020-08-06 09:46:19 +0000
committerGerrit Code Review <gerrit@onap.org>2020-08-06 09:46:19 +0000
commit696f8c54c9b8e7f579a22daef40913fcbf966ab5 (patch)
treef2751579dc1b372dd2d1fb0c52226d06d1f24c94
parentadbd1c40dda760b8810a325ec146d5feef92b82d (diff)
parentb9fdb7afe2a453c14c39c500d26c6abd2db4cfc9 (diff)
Merge "requestorId not equal to request header"
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/BpmnRequestBuilder.java3
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/Network.java5
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/ServiceInstance.java5
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/VfModules.java5
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/Vnf.java5
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/Volumes.java5
6 files changed, 17 insertions, 11 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/BpmnRequestBuilder.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/BpmnRequestBuilder.java
index e8046a2cd9..6e7947bb58 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/BpmnRequestBuilder.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/BpmnRequestBuilder.java
@@ -38,6 +38,7 @@ import org.onap.so.apihandlerinfra.infra.rest.exception.CloudConfigurationNotFou
import org.onap.so.constants.Status;
import org.onap.so.db.request.beans.InfraActiveRequests;
import org.onap.so.db.request.client.RequestsDbClient;
+import org.onap.so.logger.HttpHeadersConstants;
import org.onap.so.serviceinstancebeans.CloudConfiguration;
import org.onap.so.serviceinstancebeans.ModelInfo;
import org.onap.so.serviceinstancebeans.ModelType;
@@ -436,7 +437,7 @@ public class BpmnRequestBuilder {
RequestInfo requestInfo = new RequestInfo();
requestInfo.setSuppressRollback(false);
requestInfo.setSource(MDC.get(ONAPLogConstants.MDCs.PARTNER_NAME));
- requestInfo.setRequestorId(MDC.get(ONAPLogConstants.MDCs.PARTNER_NAME));
+ requestInfo.setRequestorId(MDC.get(HttpHeadersConstants.REQUESTOR_ID));
return requestInfo;
}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/Network.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/Network.java
index 3104c8415f..81ad3106b0 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/Network.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/Network.java
@@ -32,7 +32,6 @@ import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
-import com.fasterxml.jackson.core.JsonProcessingException;
import org.onap.logging.ref.slf4j.ONAPLogConstants;
import org.onap.so.apihandler.filters.ResponseUpdater;
import org.onap.so.apihandlerinfra.Action;
@@ -43,12 +42,14 @@ import org.onap.so.apihandlerinfra.infra.rest.exception.WorkflowEngineConnection
import org.onap.so.apihandlerinfra.infra.rest.handler.NetworkRestHandler;
import org.onap.so.db.catalog.beans.Recipe;
import org.onap.so.db.request.beans.InfraActiveRequests;
+import org.onap.so.logger.HttpHeadersConstants;
import org.onap.so.serviceinstancebeans.ServiceInstancesRequest;
import org.onap.so.serviceinstancebeans.ServiceInstancesResponse;
import org.slf4j.MDC;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Component;
+import com.fasterxml.jackson.core.JsonProcessingException;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.ArraySchema;
import io.swagger.v3.oas.annotations.media.Content;
@@ -80,7 +81,7 @@ public class Network {
ValidateException {
String requestId = networkRestHandler.getRequestId(requestContext);
- String requestorId = "Unknown";
+ String requestorId = MDC.get(HttpHeadersConstants.REQUESTOR_ID);
String source = MDC.get(ONAPLogConstants.MDCs.PARTNER_NAME);
String requestURI = requestContext.getUriInfo().getAbsolutePath().toString();
InfraActiveRequests currentRequest = networkRestHandler.createInfraActiveRequestForDelete(requestId,
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/ServiceInstance.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/ServiceInstance.java
index 7aaf470e18..515862e249 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/ServiceInstance.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/ServiceInstance.java
@@ -32,7 +32,6 @@ import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
-import com.fasterxml.jackson.core.JsonProcessingException;
import org.onap.logging.ref.slf4j.ONAPLogConstants;
import org.onap.so.apihandler.filters.ResponseUpdater;
import org.onap.so.apihandlerinfra.Action;
@@ -43,12 +42,14 @@ import org.onap.so.apihandlerinfra.infra.rest.exception.WorkflowEngineConnection
import org.onap.so.apihandlerinfra.infra.rest.handler.ServiceInstanceRestHandler;
import org.onap.so.db.catalog.beans.Recipe;
import org.onap.so.db.request.beans.InfraActiveRequests;
+import org.onap.so.logger.HttpHeadersConstants;
import org.onap.so.serviceinstancebeans.ServiceInstancesRequest;
import org.onap.so.serviceinstancebeans.ServiceInstancesResponse;
import org.slf4j.MDC;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Component;
+import com.fasterxml.jackson.core.JsonProcessingException;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.ArraySchema;
import io.swagger.v3.oas.annotations.media.Content;
@@ -79,7 +80,7 @@ public class ServiceInstance {
ValidateException {
String requestId = requestHandler.getRequestId(requestContext);
- String requestorId = "Unknown";
+ String requestorId = MDC.get(HttpHeadersConstants.REQUESTOR_ID);
String source = MDC.get(ONAPLogConstants.MDCs.PARTNER_NAME);
String requestURI = requestContext.getUriInfo().getAbsolutePath().toString();
InfraActiveRequests currentRequest = requestHandler.createInfraActiveRequestForDelete(requestId,
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/VfModules.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/VfModules.java
index ddbced98a4..81879c4281 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/VfModules.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/VfModules.java
@@ -32,7 +32,6 @@ import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
-import com.fasterxml.jackson.core.JsonProcessingException;
import org.onap.logging.ref.slf4j.ONAPLogConstants;
import org.onap.so.apihandler.filters.ResponseUpdater;
import org.onap.so.apihandlerinfra.Action;
@@ -43,6 +42,7 @@ import org.onap.so.apihandlerinfra.infra.rest.exception.WorkflowEngineConnection
import org.onap.so.apihandlerinfra.infra.rest.handler.VFModuleRestHandler;
import org.onap.so.db.catalog.beans.Recipe;
import org.onap.so.db.request.beans.InfraActiveRequests;
+import org.onap.so.logger.HttpHeadersConstants;
import org.onap.so.serviceinstancebeans.ModelType;
import org.onap.so.serviceinstancebeans.ServiceInstancesRequest;
import org.onap.so.serviceinstancebeans.ServiceInstancesResponse;
@@ -50,6 +50,7 @@ import org.slf4j.MDC;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Component;
+import com.fasterxml.jackson.core.JsonProcessingException;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.ArraySchema;
import io.swagger.v3.oas.annotations.media.Content;
@@ -81,7 +82,7 @@ public class VfModules {
ValidateException {
String requestId = restHandler.getRequestId(requestContext);
- String requestorId = "Unknown";
+ String requestorId = MDC.get(HttpHeadersConstants.REQUESTOR_ID);
String source = MDC.get(ONAPLogConstants.MDCs.PARTNER_NAME);
String requestURL = requestContext.getUriInfo().getAbsolutePath().toString();
InfraActiveRequests currentRequest = restHandler.createInfraActiveRequestForDelete(requestId,
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/Vnf.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/Vnf.java
index 68e6eb5858..f1331a3185 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/Vnf.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/Vnf.java
@@ -32,7 +32,6 @@ import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
-import com.fasterxml.jackson.core.JsonProcessingException;
import org.onap.logging.ref.slf4j.ONAPLogConstants;
import org.onap.so.apihandler.filters.ResponseUpdater;
import org.onap.so.apihandlerinfra.exceptions.ValidateException;
@@ -41,12 +40,14 @@ import org.onap.so.apihandlerinfra.infra.rest.exception.WorkflowEngineConnection
import org.onap.so.apihandlerinfra.infra.rest.handler.VnfRestHandler;
import org.onap.so.db.catalog.beans.Recipe;
import org.onap.so.db.request.beans.InfraActiveRequests;
+import org.onap.so.logger.HttpHeadersConstants;
import org.onap.so.serviceinstancebeans.ServiceInstancesRequest;
import org.onap.so.serviceinstancebeans.ServiceInstancesResponse;
import org.slf4j.MDC;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Component;
+import com.fasterxml.jackson.core.JsonProcessingException;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.ArraySchema;
import io.swagger.v3.oas.annotations.media.Content;
@@ -77,7 +78,7 @@ public class Vnf {
throws AAIEntityNotFound, JsonProcessingException, WorkflowEngineConnectionException, ValidateException {
String requestId = vnfRestHandler.getRequestId(requestContext);
- String requestorId = "Unknown";
+ String requestorId = MDC.get(HttpHeadersConstants.REQUESTOR_ID);
String source = MDC.get(ONAPLogConstants.MDCs.PARTNER_NAME);
String requestURL = requestContext.getUriInfo().getAbsolutePath().toString();
InfraActiveRequests currentRequest = vnfRestHandler.createInfraActiveRequestForDelete(requestId,
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/Volumes.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/Volumes.java
index b842580b3f..001a8069d9 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/Volumes.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/Volumes.java
@@ -32,7 +32,6 @@ import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
-import com.fasterxml.jackson.core.JsonProcessingException;
import org.onap.logging.ref.slf4j.ONAPLogConstants;
import org.onap.so.apihandler.filters.ResponseUpdater;
import org.onap.so.apihandlerinfra.Action;
@@ -44,6 +43,7 @@ import org.onap.so.apihandlerinfra.infra.rest.handler.VFModuleRestHandler;
import org.onap.so.apihandlerinfra.infra.rest.handler.VolumeRestHandler;
import org.onap.so.db.catalog.beans.Recipe;
import org.onap.so.db.request.beans.InfraActiveRequests;
+import org.onap.so.logger.HttpHeadersConstants;
import org.onap.so.serviceinstancebeans.ModelType;
import org.onap.so.serviceinstancebeans.ServiceInstancesRequest;
import org.onap.so.serviceinstancebeans.ServiceInstancesResponse;
@@ -51,6 +51,7 @@ import org.slf4j.MDC;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Component;
+import com.fasterxml.jackson.core.JsonProcessingException;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.ArraySchema;
import io.swagger.v3.oas.annotations.media.Content;
@@ -85,7 +86,7 @@ public class Volumes {
ValidateException {
String requestId = volumeRestHandler.getRequestId(requestContext);
- String requestorId = "Unknown";
+ String requestorId = MDC.get(HttpHeadersConstants.REQUESTOR_ID);
String source = MDC.get(ONAPLogConstants.MDCs.PARTNER_NAME);
String requestURL = requestContext.getUriInfo().getAbsolutePath().toString();
InfraActiveRequests currentRequest = volumeRestHandler.createInfraActiveRequestForDelete(requestId,