summaryrefslogtreecommitdiffstats
path: root/rulemgt/src/main
diff options
context:
space:
mode:
authorGuangrong Fu <fu.guangrong@zte.com.cn>2022-01-20 15:24:56 +0800
committerGuangrong Fu <fu.guangrong@zte.com.cn>2022-01-20 15:24:56 +0800
commitb47f0129455748b68929a09d88510adc5a5f65ed (patch)
tree965c555e15c068b220c7d036b0bdea54ceaa1c65 /rulemgt/src/main
parent58e113734959922ec70516f9be1d7ebcc3fd5dc3 (diff)
bugfix - rule deployment failure due to existed rule name
Issue-ID: HOLMES-488 Signed-off-by: Guangrong Fu <fu.guangrong@zte.com.cn> Change-Id: I4b941b2fc813b1a4638c67e3317e35b98a6914f0
Diffstat (limited to 'rulemgt/src/main')
-rw-r--r--rulemgt/src/main/java/org/onap/holmes/rulemgt/dcae/ConfigFileScanningTask.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/rulemgt/src/main/java/org/onap/holmes/rulemgt/dcae/ConfigFileScanningTask.java b/rulemgt/src/main/java/org/onap/holmes/rulemgt/dcae/ConfigFileScanningTask.java
index 574432c..8423f3d 100644
--- a/rulemgt/src/main/java/org/onap/holmes/rulemgt/dcae/ConfigFileScanningTask.java
+++ b/rulemgt/src/main/java/org/onap/holmes/rulemgt/dcae/ConfigFileScanningTask.java
@@ -41,7 +41,6 @@ public class ConfigFileScanningTask implements Runnable {
final public static long POLLING_PERIOD = 30L;
final private static Logger LOGGER = LoggerFactory.getLogger(ConfigFileScanningTask.class);
final private static long FILE_SIZE_LMT = 1024 * 1024 * 10; // 10MB
- final private Map<String, String> configInEffect = new HashMap(); // Contents for configInEffect are <closedControlLoop>:<ruleContents> pairs.
private String configFile = "/opt/hrmrules/index.json";
private ConfigFileScanner configFileScanner;
private String url;
@@ -69,6 +68,8 @@ public class ConfigFileScanningTask implements Runnable {
return;
}
+ // Contents for configInEffect are <closedControlLoop>:<ruleContents> pairs.
+ Map<String, String> configInEffect = new HashMap();
for (RuleResult4API ruleResult4API : deployedRules) {
configInEffect.put(ruleResult4API.getLoopControlName(), ruleResult4API.getContent());
}