aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKanagaraj M <mkr1481@gmail.com>2019-08-07 12:12:00 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2019-08-07 12:12:52 +0530
commit1aa15b526706ed7f45f197186a3e6ca0da3204c6 (patch)
tree5727409ab1a9cb3067f2cacf49fbbcf5941228ae
parentfe0d58756ea86d152fbc5b8139c54aa1b52030db (diff)
Fix the boolean check
Issue-ID: CLI-169 Change-Id: I9c739092e7db0c9ff028d711090719528091600a Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
-rw-r--r--deployment/zip/src/main/release/conf/open-cli.properties2
-rw-r--r--framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaLoader.java12
2 files changed, 7 insertions, 7 deletions
diff --git a/deployment/zip/src/main/release/conf/open-cli.properties b/deployment/zip/src/main/release/conf/open-cli.properties
index 65d4db7e..eff85b8a 100644
--- a/deployment/zip/src/main/release/conf/open-cli.properties
+++ b/deployment/zip/src/main/release/conf/open-cli.properties
@@ -34,7 +34,7 @@ cli.schema.base.parameters.sections.mandatory=name,description,type
cli.schema.base.results.sections=name,description,scope,type,is_secured, default_value
cli.schema.base.results.sections.mandatory=name, description, type, scope
-cli.schema.boolean_values=true
+cli.schema.boolean_values=true,false
cli.schema.command.type=cmd,auth,catalog
# moco properties
diff --git a/framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaLoader.java b/framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaLoader.java
index 7d2cec92..a1a14745 100644
--- a/framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaLoader.java
+++ b/framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaLoader.java
@@ -344,7 +344,7 @@ public class OnapCommandSchemaLoader {
case IS_OPTIONAL:
if (validate && !OnapCommandUtils.validateBoolean(String.valueOf(parameter.get(key2)))) {
exceptionList.add(OnapCommandUtils.invalidBooleanValueMessage(parameter.get(NAME),
- IS_OPTIONAL, parameter.get(key2)));
+ IS_OPTIONAL, String.valueOf(parameter.get(key2))));
}
if (BOOLEAN_TRUE.equalsIgnoreCase(String.valueOf(parameter.get(key2)))) {
@@ -358,7 +358,7 @@ public class OnapCommandSchemaLoader {
if (validate) {
if (!OnapCommandUtils.validateBoolean(String.valueOf(parameter.get(key2)))) {
exceptionList.add(OnapCommandUtils.invalidBooleanValueMessage(parameter.get(NAME),
- IS_SECURED, parameter.get(key2)));
+ IS_SECURED, String.valueOf(parameter.get(key2))));
}
}
@@ -372,7 +372,7 @@ public class OnapCommandSchemaLoader {
case IS_INCLUDE:
if (validate && !OnapCommandUtils.validateBoolean(String.valueOf(parameter.get(key2)))) {
exceptionList.add(OnapCommandUtils.invalidBooleanValueMessage(parameter.get(NAME),
- IS_INCLUDE, parameter.get(key2)));
+ IS_INCLUDE, String.valueOf(parameter.get(key2))));
}
if (BOOLEAN_TRUE.equalsIgnoreCase(String.valueOf(parameter.get(key2)))) {
@@ -386,7 +386,7 @@ public class OnapCommandSchemaLoader {
if (validate) {
if (!OnapCommandUtils.validateBoolean(String.valueOf(parameter.get(key2)))) {
exceptionList.add(OnapCommandUtils.invalidBooleanValueMessage(parameter.get(NAME),
- IS_DEFAULT_PARAM, parameter.get(key2)));
+ IS_DEFAULT_PARAM, String.valueOf(parameter.get(key2))));
}
}
@@ -475,7 +475,7 @@ public class OnapCommandSchemaLoader {
if (validate) {
if (!OnapCommandUtils.validateBoolean(String.valueOf(map.get(key4)))) {
exceptionList.add(OnapCommandUtils.invalidBooleanValueMessage(ATTRIBUTES,
- IS_SECURED, map.get(key4)));
+ IS_SECURED, String.valueOf(map.get(key4))));
}
}
if (BOOLEAN_TRUE.equals(String.valueOf(map.get(key4)))) {
@@ -489,7 +489,7 @@ public class OnapCommandSchemaLoader {
if (validate) {
if (!OnapCommandUtils.validateBoolean(String.valueOf(map.get(key4)))) {
exceptionList.add(OnapCommandUtils.invalidBooleanValueMessage(ATTRIBUTES,
- IS_DEFAULT_ATTR, map.get(key4)));
+ IS_DEFAULT_ATTR, String.valueOf(map.get(key4))));
}
}
if (BOOLEAN_TRUE.equals(String.valueOf(map.get(key4)))) {