aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2019-06-13 19:44:56 -0400
committerPamela Dragosh <pdragosh@research.att.com>2019-06-13 19:45:04 -0400
commitf2b9a074416f814f8b4c071296a0abaf373db1b9 (patch)
tree69f9b20b08a7c2fdb225092d3c264a5e549e63b8
parent1353289a194ac20071c51bdb0212cb8db6d11841 (diff)
Fix fieldname for guard
The correct name is 'clname'. Issue-ID: POLICY-1855 Change-Id: I27314576bb84615ccf225f0b57bfd710e2015e60 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
-rw-r--r--models-interactions/model-simulators/src/main/java/org/onap/policy/simulators/GuardSimulatorJaxRs.java2
-rw-r--r--models-interactions/model-simulators/src/test/java/org/onap/policy/simulators/GuardSimulatorTest.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/models-interactions/model-simulators/src/main/java/org/onap/policy/simulators/GuardSimulatorJaxRs.java b/models-interactions/model-simulators/src/main/java/org/onap/policy/simulators/GuardSimulatorJaxRs.java
index 25606eef1..46b66b06a 100644
--- a/models-interactions/model-simulators/src/main/java/org/onap/policy/simulators/GuardSimulatorJaxRs.java
+++ b/models-interactions/model-simulators/src/main/java/org/onap/policy/simulators/GuardSimulatorJaxRs.java
@@ -50,7 +50,7 @@ public class GuardSimulatorJaxRs {
public DecisionResponse getGuardDecision(DecisionRequest req) {
@SuppressWarnings("unchecked")
Map<String, String> guard = (Map<String, String>) req.getResource().get("guard");
- String clName = guard.get("clName");
+ String clName = guard.get("clname");
DecisionResponse response = new DecisionResponse();
if (DENY_CLNAME.equals(clName)) {
response.setStatus("Deny");
diff --git a/models-interactions/model-simulators/src/test/java/org/onap/policy/simulators/GuardSimulatorTest.java b/models-interactions/model-simulators/src/test/java/org/onap/policy/simulators/GuardSimulatorTest.java
index 58f748dd5..06c0d83a9 100644
--- a/models-interactions/model-simulators/src/test/java/org/onap/policy/simulators/GuardSimulatorTest.java
+++ b/models-interactions/model-simulators/src/test/java/org/onap/policy/simulators/GuardSimulatorTest.java
@@ -86,7 +86,7 @@ public class GuardSimulatorTest {
guard.put("actor", actor);
guard.put("recipe", recipe);
guard.put("target", target);
- guard.put("clName", clName);
+ guard.put("clname", clName);
Map<String, Object> resource = new HashMap<String, Object>();
resource.put("guard", guard);
DecisionRequest request = new DecisionRequest();