summaryrefslogtreecommitdiffstats
path: root/holmes-actions/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'holmes-actions/src/main')
-rw-r--r--holmes-actions/src/main/java/org/onap/holmes/common/config/MicroServiceConfig.java11
-rw-r--r--holmes-actions/src/main/java/org/onap/holmes/common/dcae/DcaeConfigurationQuery.java2
2 files changed, 9 insertions, 4 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 212bc66..d86f56c 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
@@ -98,10 +98,15 @@ public class MicroServiceConfig {
//String info = getServiceAddrInfoFromCBS(MSB_ADDR);
String info = getServiceAddrInfoFromCBS(getEnv(HOSTNAME));
log.info("Got the service information of \"" + getEnv(HOSTNAME) + "\" from CBS. The response is " + info + ".");
- JSONObject infoObj = JSONObject.fromObject(info);
- info = infoObj.has("msb.hostname") ? infoObj.getString("msb.hostname") : null;
+
if (info != null){
- msbServerInfo = split(info);
+ JSONObject infoObj = JSONObject.fromObject(info);
+ String msbInfoTmp = infoObj.has("msb.hostname") ? infoObj.getString("msb.hostname") : null;
+ if (msbInfoTmp != null) {
+ msbServerInfo = split(msbInfoTmp);
+ } else {
+ msbServerInfo = split(getEnv(MSB_ADDR));
+ }
} else {
msbServerInfo = split(getEnv(MSB_ADDR));
}
diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/dcae/DcaeConfigurationQuery.java b/holmes-actions/src/main/java/org/onap/holmes/common/dcae/DcaeConfigurationQuery.java
index 8dd3690..897f689 100644
--- a/holmes-actions/src/main/java/org/onap/holmes/common/dcae/DcaeConfigurationQuery.java
+++ b/holmes-actions/src/main/java/org/onap/holmes/common/dcae/DcaeConfigurationQuery.java
@@ -34,7 +34,7 @@ public class DcaeConfigurationQuery {
try {
response = getDcaeResponse(serviceAddrInfo);
} catch (Exception e) {
- throw new CorrelationException("Failed to connect to dcae", e);
+ throw new CorrelationException("Failed to connect to DCAE. ", e);
}
DcaeConfigurations dcaeConfigurations = null;
dcaeConfigurations = DcaeConfigurationParser.parse(response);