diff options
Diffstat (limited to 'engine-d')
3 files changed, 5 insertions, 1 deletions
diff --git a/engine-d/src/main/java/org/onap/holmes/engine/dmaap/DMaaPAlarmPolling.java b/engine-d/src/main/java/org/onap/holmes/engine/dmaap/DMaaPAlarmPolling.java index 52f3915..37b39c0 100644 --- a/engine-d/src/main/java/org/onap/holmes/engine/dmaap/DMaaPAlarmPolling.java +++ b/engine-d/src/main/java/org/onap/holmes/engine/dmaap/DMaaPAlarmPolling.java @@ -41,7 +41,7 @@ public class DMaaPAlarmPolling implements Runnable { try { vesAlarmList = subscriber.subscribe(); } catch (CorrelationException e) { - log.error("Failed polling request alarm." + e.getMessage()); + log.error("Failed polling request alarm. " + e.getMessage()); } vesAlarmList.forEach(vesAlarm -> droolsEngine.putRaisedIntoStream(vesAlarm)); } diff --git a/engine-d/src/main/java/org/onap/holmes/engine/manager/DroolsEngine.java b/engine-d/src/main/java/org/onap/holmes/engine/manager/DroolsEngine.java index 5ccf29b..2ecea5e 100644 --- a/engine-d/src/main/java/org/onap/holmes/engine/manager/DroolsEngine.java +++ b/engine-d/src/main/java/org/onap/holmes/engine/manager/DroolsEngine.java @@ -38,6 +38,7 @@ import org.drools.runtime.StatefulKnowledgeSession; import org.drools.runtime.rule.FactHandle;
import org.jvnet.hk2.annotations.Service;
import org.onap.holmes.common.api.stat.VesAlarm;
+import org.onap.holmes.common.dmaap.DmaapService;
import org.onap.holmes.engine.request.DeployRuleRequest;
import org.onap.holmes.common.api.entity.CorrelationRule;
import org.onap.holmes.common.exception.CorrelationException;
@@ -101,6 +102,7 @@ public class DroolsEngine { for (CorrelationRule rule : rules) {
if (rule.getContent() != null) {
deployRuleFromDB(rule.getContent());
+ DmaapService.loopControlNames.put(rule.getPackageName(), rule.getClosedControlLoopName());
}
}
}
diff --git a/engine-d/src/test/java/org/onap/holmes/engine/manager/DroolsEngineTest.java b/engine-d/src/test/java/org/onap/holmes/engine/manager/DroolsEngineTest.java index b57fa30..dd0b55d 100644 --- a/engine-d/src/test/java/org/onap/holmes/engine/manager/DroolsEngineTest.java +++ b/engine-d/src/test/java/org/onap/holmes/engine/manager/DroolsEngineTest.java @@ -88,6 +88,8 @@ public class DroolsEngineTest { List<CorrelationRule> rules = new ArrayList<CorrelationRule>();
CorrelationRule rule = new CorrelationRule();
rule.setContent("content");
+ rule.setClosedControlLoopName("test");
+ rule.setPackageName("org.onap.holmes");
rules.add(rule);
expect(ruleMgtWrapper.queryRuleByEnable(anyInt())).andReturn(rules);
|