summaryrefslogtreecommitdiffstats
path: root/holmes-actions/src
diff options
context:
space:
mode:
Diffstat (limited to 'holmes-actions/src')
-rw-r--r--holmes-actions/src/main/java/org/onap/holmes/common/dmaap/DmaapService.java14
1 files changed, 14 insertions, 0 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 c64bd59..f19b89c 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
@@ -47,6 +47,7 @@ public class DmaapService {
publisher.setUrl(DcaeConfigurationsCache.getPubSecInfo(dmaapConfigKey).getDmaapInfo()
.getTopicUrl());
publisher.publish(policyMsg);
+ deleteRequestId(policyMsg);
log.info("send policyMsg: " + GsonUtil.beanToJson(policyMsg));
} catch (CorrelationException e) {
log.error("Failed to publish the control loop event to DMaaP", e);
@@ -183,4 +184,17 @@ public class DmaapService {
}
return vmEntity;
}
+
+ private void deleteRequestId(PolicyMsg policyMsg){
+ String status = policyMsg.getClosedLoopEventStatus().toString();
+ if(status == "ABATED"){
+ String requestId = policyMsg.getRequestID();
+ for(String key: alarmUniqueRequestID.keySet()){
+ if(alarmUniqueRequestID.get(key).equals(requestId)){
+ alarmUniqueRequestID.remove(key);
+ }
+ }
+ log.info("Clear alarm, requestId deleted successful");
+ }
+ }
}