summaryrefslogtreecommitdiffstats
path: root/ECOMP-ControlloopPolicy
diff options
context:
space:
mode:
authorrb7147 <rb7147@att.com>2017-07-26 10:11:15 -0400
committerrb7147 <rb7147@att.com>2017-07-26 11:53:31 -0400
commitd80880b097d08f9ab9dda54355216890a4b345dc (patch)
tree6c7b6caec61dbada2201f7ee14c8c1e027106d6d /ECOMP-ControlloopPolicy
parente92ff832cf993db876f22b2d27562fedf59f5043 (diff)
[POLICY-117] Resolve the Policy Critical issues
Change-Id: Ice72d7fa40151bff5db42f5dd632f04a3853b094 Signed-off-by: rb7147 <rb7147@att.com>
Diffstat (limited to 'ECOMP-ControlloopPolicy')
-rw-r--r--ECOMP-ControlloopPolicy/src/main/java/org/openecomp/policy/controlloop/compiler/ControlLoopCompiler.java6
-rw-r--r--ECOMP-ControlloopPolicy/src/main/java/org/openecomp/policy/controlloop/policy/builder/impl/ControlLoopPolicyBuilderImpl.java5
-rw-r--r--ECOMP-ControlloopPolicy/src/main/java/org/openecomp/policy/controlloop/policy/guard/builder/impl/ControlLoopGuardBuilderImpl.java5
3 files changed, 13 insertions, 3 deletions
diff --git a/ECOMP-ControlloopPolicy/src/main/java/org/openecomp/policy/controlloop/compiler/ControlLoopCompiler.java b/ECOMP-ControlloopPolicy/src/main/java/org/openecomp/policy/controlloop/compiler/ControlLoopCompiler.java
index 2f01307af..e0000c02d 100644
--- a/ECOMP-ControlloopPolicy/src/main/java/org/openecomp/policy/controlloop/compiler/ControlLoopCompiler.java
+++ b/ECOMP-ControlloopPolicy/src/main/java/org/openecomp/policy/controlloop/compiler/ControlLoopCompiler.java
@@ -46,7 +46,11 @@ import org.yaml.snakeyaml.constructor.Constructor;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
-public class ControlLoopCompiler {
+public class ControlLoopCompiler implements Serializable{
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
private static Logger LOGGER = FlexLogger.getLogger(ControlLoopCompiler.class.getName());
public static ControlLoopPolicy compile(ControlLoopPolicy policy, ControlLoopCompilerCallback callback) throws CompilerException {
diff --git a/ECOMP-ControlloopPolicy/src/main/java/org/openecomp/policy/controlloop/policy/builder/impl/ControlLoopPolicyBuilderImpl.java b/ECOMP-ControlloopPolicy/src/main/java/org/openecomp/policy/controlloop/policy/builder/impl/ControlLoopPolicyBuilderImpl.java
index 523054dce..036fd75d2 100644
--- a/ECOMP-ControlloopPolicy/src/main/java/org/openecomp/policy/controlloop/policy/builder/impl/ControlLoopPolicyBuilderImpl.java
+++ b/ECOMP-ControlloopPolicy/src/main/java/org/openecomp/policy/controlloop/policy/builder/impl/ControlLoopPolicyBuilderImpl.java
@@ -26,6 +26,8 @@ import java.util.UUID;
import org.openecomp.policy.asdc.Resource;
import org.openecomp.policy.asdc.Service;
+import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
+import org.openecomp.policy.common.logging.flexlogger.Logger;
import org.openecomp.policy.controlloop.compiler.CompilerException;
import org.openecomp.policy.controlloop.compiler.ControlLoopCompiler;
import org.openecomp.policy.controlloop.compiler.ControlLoopCompilerCallback;
@@ -45,7 +47,7 @@ import org.yaml.snakeyaml.DumperOptions.FlowStyle;
import org.yaml.snakeyaml.Yaml;
public class ControlLoopPolicyBuilderImpl implements ControlLoopPolicyBuilder {
-
+ private static Logger logger = FlexLogger.getLogger(ControlLoopPolicyBuilderImpl.class.getName());
private ControlLoopPolicy policy;
public ControlLoopPolicyBuilderImpl(String controlLoopName, Integer timeout) throws BuilderException {
@@ -253,6 +255,7 @@ public class ControlLoopPolicyBuilderImpl implements ControlLoopPolicyBuilder {
try {
ControlLoopCompiler.compile(policy, callback);
} catch (CompilerException e) {
+ logger.error(e.getMessage() + e);
callback.results.addMessage(new MessageImpl(e.getMessage(), MessageLevel.EXCEPTION));
}
//
diff --git a/ECOMP-ControlloopPolicy/src/main/java/org/openecomp/policy/controlloop/policy/guard/builder/impl/ControlLoopGuardBuilderImpl.java b/ECOMP-ControlloopPolicy/src/main/java/org/openecomp/policy/controlloop/policy/guard/builder/impl/ControlLoopGuardBuilderImpl.java
index bd6a3e42f..2e5711914 100644
--- a/ECOMP-ControlloopPolicy/src/main/java/org/openecomp/policy/controlloop/policy/guard/builder/impl/ControlLoopGuardBuilderImpl.java
+++ b/ECOMP-ControlloopPolicy/src/main/java/org/openecomp/policy/controlloop/policy/guard/builder/impl/ControlLoopGuardBuilderImpl.java
@@ -21,6 +21,8 @@ package org.openecomp.policy.controlloop.policy.guard.builder.impl;
import java.util.LinkedList;
+import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
+import org.openecomp.policy.common.logging.flexlogger.Logger;
import org.openecomp.policy.controlloop.compiler.CompilerException;
import org.openecomp.policy.controlloop.compiler.ControlLoopCompilerCallback;
import org.openecomp.policy.controlloop.guard.compiler.ControlLoopGuardCompiler;
@@ -39,7 +41,7 @@ import org.yaml.snakeyaml.DumperOptions.FlowStyle;
import org.yaml.snakeyaml.Yaml;
public class ControlLoopGuardBuilderImpl implements ControlLoopGuardBuilder {
-
+ private static Logger logger = FlexLogger.getLogger(ControlLoopGuardBuilderImpl.class.getName());
private ControlLoopGuard cLGuard;
public ControlLoopGuardBuilderImpl(Guard guard) {
@@ -229,6 +231,7 @@ public class ControlLoopGuardBuilderImpl implements ControlLoopGuardBuilder {
try {
ControlLoopGuardCompiler.compile(cLGuard, callback);
} catch (CompilerException e) {
+ logger.error(e.getMessage() + e);
callback.results.addMessage(new MessageImpl(e.getMessage(), MessageLevel.EXCEPTION));
}
//