summaryrefslogtreecommitdiffstats
path: root/holmes-actions/src
diff options
context:
space:
mode:
authorGuangrong Fu <fu.guangrong@zte.com.cn>2017-11-10 23:02:11 +0800
committerGuangrong Fu <fu.guangrong@zte.com.cn>2017-11-10 23:02:11 +0800
commit503068f2472e88d88d4f896557be276ff4d208e9 (patch)
tree655af0700750df378c87cf3edeb45bdae6ef4cbd /holmes-actions/src
parent449744265f24a4d3337115240ae4e834594c50a2 (diff)
Change-Id: Ib33ded1a69fcb112b2df68d155564f3acb2974f4 Issue-ID: HOLMES-85 Signed-off-by: Guangrong Fu <fu.guangrong@zte.com.cn>
Diffstat (limited to 'holmes-actions/src')
-rw-r--r--holmes-actions/src/main/java/org/onap/holmes/common/dmaap/DmaapService.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/dmaap/DmaapService.java b/holmes-actions/src/main/java/org/onap/holmes/common/dmaap/DmaapService.java
index 5fb1176..65058c5 100644
--- a/holmes-actions/src/main/java/org/onap/holmes/common/dmaap/DmaapService.java
+++ b/holmes-actions/src/main/java/org/onap/holmes/common/dmaap/DmaapService.java
@@ -71,7 +71,12 @@ public class DmaapService {
if (rootAlarm.getAlarmIsCleared() == PolicyMassgeConstant.POLICY_MESSAGE_ONSET) {
enrichVnfInfo(vmEntity, childAlarm, policyMsg);
policyMsg.setClosedLoopEventStatus(EVENT_STATUS.ONSET);
- policyMsg.getAai().put("vserver.in-maint", String.valueOf(vmEntity.getInMaint()));
+ try {
+ policyMsg.getAai().put("vserver.in-maint", Boolean.valueOf(vmEntity.getInMaint()).booleanValue());
+ } catch (Exception e) {
+ log.error("Failed to parse the field \"in-maint\". A boolean string (\"true\"/\"false\")"
+ + " is expected but the actual value is " + vmEntity.getInMaint() + ".", e);
+ }
try {
policyMsg.getAai().put("vserver.is-closed-loop-disabled",
Boolean.valueOf(vmEntity.getClosedLoopDisable()).booleanValue());