Fixed MSB Registration Failure
[holmes/common.git] / holmes-actions / src / main / java / org / onap / holmes / common / config / MicroServiceConfig.java
index 33bd1d2..7cbbb3e 100644 (file)
@@ -35,6 +35,8 @@ public class MicroServiceConfig {
     final static public String CONFIG_BINDING_SERVICE = "CONFIG_BINDING_SERVICE";\r
     final static public String DOCKER_HOST = "DOCKER_HOST";\r
     final static public String MSB_ADDR = "MSB_ADDR";\r
+    final static public String MSB_IAG_SERVICE_HOST = "MSB_IAG_SERVICE_HOST";\r
+    final static public String MSB_IAG_SERVICE_PORT = "MSB_IAG_SERVICE_PORT";\r
     final static public Pattern IP_REG = Pattern.compile("(http(s)?://)?(\\d+\\.\\d+\\.\\d+\\.\\d+)(:(\\d+))?");\r
     final static public String AAI_HOSTNAME = "aai.onap";\r
 \r
@@ -105,7 +107,7 @@ public class MicroServiceConfig {
     }\r
 \r
     public static String[] getMsbIpAndPort() {\r
-        return split(getEnv(MSB_ADDR));\r
+        return new String[] {getEnv(MSB_IAG_SERVICE_HOST), getEnv(MSB_IAG_SERVICE_PORT)};\r
     }\r
 \r
     public static String[] getMicroServiceIpAndPort() {\r
@@ -124,7 +126,7 @@ public class MicroServiceConfig {
         return serviceAddrInfo;\r
     }\r
 \r
-    private static boolean isIpAddress(String info) {\r
+    public static boolean isIpAddress(String info) {\r
         return IP_REG.matcher(info).matches();\r
     }\r
 \r