From: Michael Mokry Date: Fri, 2 Nov 2018 20:08:38 +0000 (-0500) Subject: Removed Objective From keyword check in parser X-Git-Tag: 1.3.3~10 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=policy%2Fengine.git;a=commitdiff_plain;h=51842453b199a7c3a6785f4ab047612d50eab3b9 Removed Objective From keyword check in parser Modified the Model parser code to allow "objective" as a field name in yaml. Change-Id: Ia3667ebc84a0bbdbbb3723bdcf0237a8f35313ee Issue-ID: POLICY-1244 Signed-off-by: Michael Mokry --- diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/util/MSModelUtils.java b/ONAP-REST/src/main/java/org/onap/policy/rest/util/MSModelUtils.java index 54713ceef..f145f4db1 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/util/MSModelUtils.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/util/MSModelUtils.java @@ -1214,9 +1214,7 @@ public class MSModelUtils { hm = new LinkedHashMap<>(); String keyStr = key.substring(key.lastIndexOf('.') + 1); String valueStr = map.get(key); - if (key.contains(".objective.")) { - throw new ParserException("Attribute objective is a key word. Please use a different name"); - } + if (("type").equals(keyStr)) { if (!key.contains("entry_schema")) { hm.put(keyStr, valueStr);