diff options
author | Guangrong Fu <fu.guangrong@zte.com.cn> | 2023-03-24 09:43:46 +0800 |
---|---|---|
committer | Guangrong Fu <fu.guangrong@zte.com.cn> | 2023-03-24 09:43:46 +0800 |
commit | 6e0fd04861ecd2a00ca2d158b0639454eae94702 (patch) | |
tree | 45a4b495b66201afe7494bef5cf4fbb7c5291f92 /holmes-actions/src/main/java | |
parent | 6bc2f1eb5ff3f271c9584a0c48498354d2fcc4cc (diff) |
Removed redundant env vars
Issue-ID: HOLMES-613
Signed-off-by: Guangrong Fu <fu.guangrong@zte.com.cn>
Change-Id: I754658a0ce3172dffd4e4dd28a95922d5eb7d991
Diffstat (limited to 'holmes-actions/src/main/java')
-rw-r--r-- | holmes-actions/src/main/java/org/onap/holmes/common/config/MicroServiceConfig.java | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/config/MicroServiceConfig.java b/holmes-actions/src/main/java/org/onap/holmes/common/config/MicroServiceConfig.java index 621e23b..4702d7b 100644 --- a/holmes-actions/src/main/java/org/onap/holmes/common/config/MicroServiceConfig.java +++ b/holmes-actions/src/main/java/org/onap/holmes/common/config/MicroServiceConfig.java @@ -33,13 +33,10 @@ public class MicroServiceConfig { final static public String HOSTNAME = "HOSTNAME"; final static public String POD_IP = "POD_IP"; final static public String CONFIG_BINDING_SERVICE = "CONFIG_BINDING_SERVICE"; - final static public String MSB_ADDR = "MSB_ADDR"; final static public String MSB_IAG_SERVICE_HOST = "MSB_IAG_SERVICE_HOST"; final static public String MSB_IAG_SERVICE_PORT = "MSB_IAG_SERVICE_PORT"; - final static public String BASE_URL = "BASE_URL"; - final static public String PRE_ADDR = "PRE_ADDR"; - final static public String POST_ADDR = "POST_ADDR"; final static public String AAI_ADDR = "AAI_ADDR"; + final static public String NAMESPACE = "NAMESPACE"; final static public String PROTOCOL_HTTP = "http"; final static public String PROTOCOL_HTTPS = "https"; final static public int PLAIN_PORT = 80; @@ -97,12 +94,10 @@ public class MicroServiceConfig { public static String getAaiAddr() { boolean tlsEnabled = Boolean.valueOf(getEnv("ENABLE_ENCRYPT")); - return String.format("%s://%s%s%s.%s:%d", + return String.format("%s://%s.%s:%d", tlsEnabled ? PROTOCOL_HTTPS : PROTOCOL_HTTP, - nullToEmptyString(getEnv(PRE_ADDR)), nullToEmptyString(getEnv(AAI_ADDR)), - nullToEmptyString(getEnv(POST_ADDR)), - nullToEmptyString(getEnv(BASE_URL)), + nullToEmptyString(getEnv(NAMESPACE)), tlsEnabled ? TLS_PORT : PLAIN_PORT); } |