Removed Objective From keyword check in parser 65/71765/1
authorMichael Mokry <michael.mokry@att.com>
Fri, 2 Nov 2018 20:08:38 +0000 (15:08 -0500)
committerMichael Mokry <michael.mokry@att.com>
Fri, 2 Nov 2018 20:17:04 +0000 (15:17 -0500)
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 <michael.mokry@att.com>
ONAP-REST/src/main/java/org/onap/policy/rest/util/MSModelUtils.java

index 54713ce..f145f4d 100644 (file)
@@ -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);