Fix to pass calling application identifier to SO 53/77353/2
authoranupmarathe <anup.marathe@amdocs.com>
Wed, 30 Aug 2017 12:26:27 +0000 (17:56 +0530)
committeranupmarathe <anup.marathe@amdocs.com>
Tue, 12 Sep 2017 11:04:37 +0000 (16:34 +0530)
VID passes application identity to AAI in request header against key
X-FromAppId. It helps in debugging by providing information about which
application called AAI api. Similar change for SO is done to pass 'VID'
in request header against key X-FromAppId.

Issue-ID: VID-41

Change-Id: Icc627f2c9a020465e4a8af279162178f917018cd
Signed-off-by: anupmarathe <anup.marathe@amdocs.com>
vid-app-common/src/main/java/org/openecomp/vid/mso/MsoRestInterface.java

index 31a762e..f964b83 100755 (executable)
@@ -84,7 +84,10 @@ public class MsoRestInterface extends MsoRestInt implements MsoRestInterfaceIfc
 \r
                commonHeaders = new MultivaluedHashMap<String, Object> ();\r
                commonHeaders.put("Authorization",  Collections.singletonList((Object) ("Basic " + authStringEnc)));\r
-               \r
+               //Pass calling application identifier to SO\r
+               commonHeaders.put("X-FromAppId",\r
+                               Collections.singletonList(SystemProperties.getProperty(SystemProperties.APP_DISPLAY_NAME)));\r
+\r
                boolean use_ssl = true;\r
                if ( (mso_url != null) && ( !(mso_url.isEmpty()) ) ) {\r
                        if ( mso_url.startsWith("https")) {\r