Fix fieldname for guard 50/89850/1
authorPamela Dragosh <pdragosh@research.att.com>
Thu, 13 Jun 2019 23:44:56 +0000 (19:44 -0400)
committerPamela Dragosh <pdragosh@research.att.com>
Fri, 14 Jun 2019 02:37:46 +0000 (02:37 +0000)
The correct name is 'clname'.

Issue-ID: POLICY-1855
Change-Id: I27314576bb84615ccf225f0b57bfd710e2015e60
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
(cherry picked from commit f2b9a074416f814f8b4c071296a0abaf373db1b9)

models-interactions/model-simulators/src/main/java/org/onap/policy/simulators/GuardSimulatorJaxRs.java
models-interactions/model-simulators/src/test/java/org/onap/policy/simulators/GuardSimulatorTest.java

index 25606ee..46b66b0 100644 (file)
@@ -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");
index 58f748d..06c0d83 100644 (file)
@@ -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();