From 679f142a91b165a958b5739808d6409d6960b6f4 Mon Sep 17 00:00:00 2001 From: Instrumental Date: Fri, 6 Apr 2018 14:59:36 -0500 Subject: Make cross-container access work Issue-ID: AAF-218 Change-Id: Ib31646e3ce6e38c2ef0a02fe1d2f57cf963a5a4a Signed-off-by: Instrumental --- .../src/main/java/org/onap/aaf/auth/direct/DirectRegistrar.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'auth/auth-cass/src/main/java/org') diff --git a/auth/auth-cass/src/main/java/org/onap/aaf/auth/direct/DirectRegistrar.java b/auth/auth-cass/src/main/java/org/onap/aaf/auth/direct/DirectRegistrar.java index 1e8faa2b..695d80f7 100644 --- a/auth/auth-cass/src/main/java/org/onap/aaf/auth/direct/DirectRegistrar.java +++ b/auth/auth-cass/src/main/java/org/onap/aaf/auth/direct/DirectRegistrar.java @@ -63,8 +63,13 @@ public class DirectRegistrar implements Registrant { locate.patch = split.length>2?Integer.parseInt(split[2]):0; locate.minor = split.length>1?Integer.parseInt(split[1]):0; locate.major = split.length>0?Integer.parseInt(split[0]):0; - - locate.hostname = access.getProperty(Config.HOSTNAME, Inet4Address.getLocalHost().getHostName()); + locate.hostname = access.getProperty(Config.CADI_REGISTRATION_HOSTNAME, null); + if(locate.hostname==null) { + locate.hostname = access.getProperty(Config.HOSTNAME, null); + } + if(locate.hostname==null) { + locate.hostname = Inet4Address.getLocalHost().getHostName(); + } String subprotocols = access.getProperty(Config.CADI_PROTOCOLS, null); if(subprotocols==null) { locate.protocol="http"; -- cgit 1.2.3-korg