summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorromaingimbert <romain.gimbert@orange.com>2019-10-22 14:12:53 +0200
committerMatthieu Geerebaert <matthieu.geerebaert@orange.com>2019-10-23 08:52:43 +0000
commit8b5d91de742dc324274e2b3afe50bafd062864c2 (patch)
tree17d35f83991c74e0f18b602445f120e872dcfa66
parent784caaab0f643aecede5b2d8e5f435d896c8ec17 (diff)
NBI to SO: new Header params
- add header productFamilyId X-ONAP-PartnerName -b remove other headers Issue-ID: EXTAPI-342 Signed-off-by: romaingimbert <romain.gimbert@orange.com> Change-Id: I152cc025f628fb3ee3307e057eb630690bc7d39e
-rw-r--r--src/main/java/org/onap/nbi/apis/serviceorder/SoClient.java8
-rw-r--r--src/main/resources/application-test.properties1
-rw-r--r--src/main/resources/application.properties2
3 files changed, 7 insertions, 4 deletions
diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/SoClient.java b/src/main/java/org/onap/nbi/apis/serviceorder/SoClient.java
index c9d12a3..6800626 100644
--- a/src/main/java/org/onap/nbi/apis/serviceorder/SoClient.java
+++ b/src/main/java/org/onap/nbi/apis/serviceorder/SoClient.java
@@ -50,14 +50,14 @@ public class SoClient {
@Value("${so.host}")
private String soHostname;
- @Value("${so.api.id}")
- private String soApiId;
+ @Value("${so.onap.partner.name}")
+ private String soOnapPartnerName;
@Value("${so.header.authorization}")
private String soHeaderAuthorization;
private static final String HEADER_AUTHORIZATION = "Authorization";
- private static final String X_FROM_APP_ID = "X-FromAppId";
+ private static final String X_ONAP_PARTNER_HEADER = "X-ONAP-PartnerName";
private static final Logger LOGGER = LoggerFactory.getLogger(SoClient.class);
@@ -334,7 +334,7 @@ public class SoClient {
private HttpHeaders buildRequestHeader() {
HttpHeaders httpHeaders = new HttpHeaders();
httpHeaders.add(HEADER_AUTHORIZATION, soHeaderAuthorization);
- httpHeaders.add(X_FROM_APP_ID, soApiId);
+ httpHeaders.add(X_ONAP_PARTNER_HEADER, soOnapPartnerName);
httpHeaders.add("Accept", "application/json");
httpHeaders.add("Content-Type", "application/json");
return httpHeaders;
diff --git a/src/main/resources/application-test.properties b/src/main/resources/application-test.properties
index 8511a3b..1ab93e3 100644
--- a/src/main/resources/application-test.properties
+++ b/src/main/resources/application-test.properties
@@ -61,6 +61,7 @@ so.api.id = SO
so.owning.entity.id = 6b5b6b70-4e9a-4f6f-8b7b-cbd7cf990c6e
so.owning.entity.name = OE-generic
so.project.name = Project-generic
+so.onap.partner.name = NBI
# DMAAP
dmaap.host = http://127.0.0.1:8091
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index f290102..2925137 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -71,6 +71,8 @@ so.api.id = SO
so.owning.entity.id = 6b5b6b70-4e9a-4f6f-8b7b-cbd7cf990c6e
so.owning.entity.name = OE-generic
so.project.name = Project-generic
+so.onap.partner.name = NBI
+
# DMAAP
dmaap.host = http://10.0.6.1:3904