From 8b5d91de742dc324274e2b3afe50bafd062864c2 Mon Sep 17 00:00:00 2001 From: romaingimbert Date: Tue, 22 Oct 2019 14:12:53 +0200 Subject: NBI to SO: new Header params - add header productFamilyId X-ONAP-PartnerName -b remove other headers Issue-ID: EXTAPI-342 Signed-off-by: romaingimbert Change-Id: I152cc025f628fb3ee3307e057eb630690bc7d39e --- src/main/java/org/onap/nbi/apis/serviceorder/SoClient.java | 8 ++++---- src/main/resources/application-test.properties | 1 + src/main/resources/application.properties | 2 ++ 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 -- cgit 1.2.3-korg