summaryrefslogtreecommitdiffstats
path: root/ONAP-REST/src/main/java/org
diff options
context:
space:
mode:
authorMichael Mokry <michael.mokry@att.com>2018-11-02 15:08:38 -0500
committerMichael Mokry <michael.mokry@att.com>2018-11-06 21:14:23 +0000
commita85a1546bb718a7643b4dc92622cedb827082f02 (patch)
treedb78e860588a7b0b0dc8d9714ffbf69d1bbfde55 /ONAP-REST/src/main/java/org
parent677d872505a8b74a175023ff199b123ff2147dc8 (diff)
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 <michael.mokry@att.com> (cherry picked from commit 51842453b199a7c3a6785f4ab047612d50eab3b9)
Diffstat (limited to 'ONAP-REST/src/main/java/org')
-rw-r--r--ONAP-REST/src/main/java/org/onap/policy/rest/util/MSModelUtils.java4
1 files changed, 1 insertions, 3 deletions
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);