summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthieu Geerebaert <matthieu.geerebaert@orange.com>2019-10-23 08:54:03 +0000
committerGerrit Code Review <gerrit@onap.org>2019-10-23 08:54:03 +0000
commit20d150e87e9e46402daa34ff16cab048663232d8 (patch)
tree755927d295b2d37ed6bddbe34c69b3f13460e242
parent1b425ee2f891e41f129b6b3a9a32e86dfba1ba86 (diff)
parent8b5d91de742dc324274e2b3afe50bafd062864c2 (diff)
Merge "NBI to SO: new Header params"
-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