summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--holmes-actions/src/main/java/org/openo/holmes/common/constant/AlarmConst.java2
-rw-r--r--holmes-actions/src/main/java/org/openo/holmes/common/utils/MSBRegisterUtil.java5
2 files changed, 3 insertions, 4 deletions
diff --git a/holmes-actions/src/main/java/org/openo/holmes/common/constant/AlarmConst.java b/holmes-actions/src/main/java/org/openo/holmes/common/constant/AlarmConst.java
index 2ddf78f..3894bf3 100644
--- a/holmes-actions/src/main/java/org/openo/holmes/common/constant/AlarmConst.java
+++ b/holmes-actions/src/main/java/org/openo/holmes/common/constant/AlarmConst.java
@@ -33,5 +33,5 @@ public interface AlarmConst {
String ADMIN = "admin";
- int RESPONSE_STATUS_OK = 200;
+ int MICRO_SERVICE_STATUS_SUCCESS = 201;
}
diff --git a/holmes-actions/src/main/java/org/openo/holmes/common/utils/MSBRegisterUtil.java b/holmes-actions/src/main/java/org/openo/holmes/common/utils/MSBRegisterUtil.java
index 30e411f..826fbd0 100644
--- a/holmes-actions/src/main/java/org/openo/holmes/common/utils/MSBRegisterUtil.java
+++ b/holmes-actions/src/main/java/org/openo/holmes/common/utils/MSBRegisterUtil.java
@@ -53,14 +53,13 @@ public class MSBRegisterUtil {
log.warn("Registering the service to the bus failure", e);
return false;
}
- if (response.getStatusLine().getStatusCode() == AlarmConst.RESPONSE_STATUS_OK) {
+ if (response.getStatusLine().getStatusCode() == AlarmConst.MICRO_SERVICE_STATUS_SUCCESS) {
log.info("Registration successful service to the bus :" + response.getEntity());
return true;
} else {
log.warn(
"Registering the service to the bus failure:" + response.getStatusLine().getStatusCode() + " " +
- response.getStatusLine().getReasonPhrase() + response.getStatusLine()
- .getProtocolVersion());
+ response.getStatusLine().getReasonPhrase());
return false;
}
} finally {