diff options
author | tangpeng <tang.peng5@zte.com.cn> | 2019-02-22 17:47:23 +0800 |
---|---|---|
committer | tangpeng <tang.peng5@zte.com.cn> | 2019-02-22 17:47:23 +0800 |
commit | 81edfdbaffd9c450f37d2418bb444473ee3bbe77 (patch) | |
tree | 5c2d5889fc79428d6ab7fa793d1986c7e963ae0b /holmes-actions/src/main | |
parent | 6a3873859d6efd8199d4812e3fb4ae2fe8a47e41 (diff) |
Added some codes for UT
Change-Id: Iaf47ab320511538618c031913dc349679b4ed6b8
Issue-ID: HOLMES-203
Signed-off-by: tangpeng <tang.peng5@zte.com.cn>
Diffstat (limited to 'holmes-actions/src/main')
-rw-r--r-- | holmes-actions/src/main/java/org/onap/holmes/common/dcae/entity/DcaeConfigurations.java | 1 | ||||
-rw-r--r-- | holmes-actions/src/main/java/org/onap/holmes/common/dmaap/DmaapService.java | 16 |
2 files changed, 3 insertions, 14 deletions
diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/dcae/entity/DcaeConfigurations.java b/holmes-actions/src/main/java/org/onap/holmes/common/dcae/entity/DcaeConfigurations.java index a8045ec..4b90dd7 100644 --- a/holmes-actions/src/main/java/org/onap/holmes/common/dcae/entity/DcaeConfigurations.java +++ b/holmes-actions/src/main/java/org/onap/holmes/common/dcae/entity/DcaeConfigurations.java @@ -21,7 +21,6 @@ import java.util.HashMap; import java.util.List;
import java.util.Map;
import java.util.Set;
-import lombok.NoArgsConstructor;
public class DcaeConfigurations extends HashMap<String, Object>{
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 e3f6e58..ba52262 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 @@ -70,19 +70,9 @@ public class DmaapService { if (rootAlarm.getAlarmIsCleared() == PolicyMassgeConstant.POLICY_MESSAGE_ONSET) { enrichVnfInfo(vmEntity, childAlarm, policyMsg); policyMsg.setClosedLoopEventStatus(EVENT_STATUS.ONSET); - try { - policyMsg.getAai().put("vserver.in-maint", vmEntity.getInMaint()); - } 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", + policyMsg.getAai().put("vserver.in-maint", vmEntity.getInMaint()); + policyMsg.getAai().put("vserver.is-closed-loop-disabled", vmEntity.getClosedLoopDisable()); - } catch (Exception e) { - log.error("Failed to parse the field \"is-closed-loop-disabled\". A boolean string (\"true\"/\"false\")" - + " is expected but the actual value is " + vmEntity.getClosedLoopDisable() + ".", e); - } policyMsg.getAai().put("vserver.prov-status", vmEntity.getProvStatus()); policyMsg.getAai().put("vserver.resource-version", vmEntity.getResourceVersion()); } else { @@ -196,7 +186,7 @@ public class DmaapService { break; } } - log.info("Clear alarm, requestId deleted successful"); + log.info("An alarm is cleared and the corresponding requestId is deleted successfully"); } } } |