summaryrefslogtreecommitdiffstats
path: root/framework
diff options
context:
space:
mode:
Diffstat (limited to 'framework')
-rw-r--r--framework/src/main/java/org/onap/cli/fw/utils/OnapCommandHelperUtils.java6
-rw-r--r--framework/src/main/java/org/onap/cli/fw/utils/OnapCommandSchemaLoaderUtils.java21
-rw-r--r--framework/src/main/resources/open-cli-schema/schema-refresh.yaml2
3 files changed, 17 insertions, 12 deletions
diff --git a/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandHelperUtils.java b/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandHelperUtils.java
index c4a93370..f5ac764b 100644
--- a/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandHelperUtils.java
+++ b/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandHelperUtils.java
@@ -77,8 +77,10 @@ public class OnapCommandHelperUtils {
// Add description
help += "\n\n" + cmd.getDescription();
- // Add service
- help += "\n\nService: " + cmd.getInfo().getService();
+ // Add info
+ help += "\n\nProduct: " + cmd.getInfo().getProduct();
+ help += "\nService: " + cmd.getInfo().getService();
+ help += "\nAuthor: " + cmd.getInfo().getAuthor();
// Add whole command
String commandOptions = "";
diff --git a/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandSchemaLoaderUtils.java b/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandSchemaLoaderUtils.java
index e115fc02..ba72abd5 100644
--- a/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandSchemaLoaderUtils.java
+++ b/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandSchemaLoaderUtils.java
@@ -20,6 +20,7 @@ import static org.onap.cli.fw.conf.Constants.ATTRIBUTES;
import static org.onap.cli.fw.conf.Constants.AUTH;
import static org.onap.cli.fw.conf.Constants.AUTH_VALUES;
import static org.onap.cli.fw.conf.Constants.BODY;
+import static org.onap.cli.fw.conf.Constants.BOOLEAN_TRUE;
import static org.onap.cli.fw.conf.Constants.COMMAND_TYPE_VALUES;
import static org.onap.cli.fw.conf.Constants.DEAFULT_PARAMETER_PASSWORD;
import static org.onap.cli.fw.conf.Constants.DEAFULT_PARAMETER_USERNAME;
@@ -172,9 +173,9 @@ public class OnapCommandSchemaLoaderUtils {
validateSchemaVersion(DEFAULT_PARAMETER_FILE_NAME, cmd.getSchemaVersion()) : new HashMap<>();
//mrkanag default_parameter is supported only for parameters.
if (defaultParameterMap.containsKey(INFO)) {
- defaultParameterMap.remove(Constants.INFO);
+ defaultParameterMap.remove(Constants.INFO);
}
-
+
errors.addAll(OnapCommandSchemaLoaderUtils.parseSchema(cmd, defaultParameterMap, validateSchema));
}
@@ -198,12 +199,12 @@ public class OnapCommandSchemaLoaderUtils {
if (includeDefault) {
Map<String, ?> defaultParameterMap = includeDefault ?
validateSchemaVersion(DEFAULT_PARAMETER_HTTP_FILE_NAME, cmd.getSchemaVersion()) : new HashMap<>();
-
+
//mrkanag default_parameter is supported only for parameters.
if (defaultParameterMap.containsKey(INFO)) {
- defaultParameterMap.remove(Constants.INFO);
+ defaultParameterMap.remove(Constants.INFO);
}
-
+
errors.addAll(OnapCommandSchemaLoaderUtils.parseSchema(cmd, defaultParameterMap, validateSchema));
}
@@ -402,7 +403,7 @@ public class OnapCommandSchemaLoaderUtils {
IS_SECURED, parameter.get(key2)));
}
}
- if ("true".equalsIgnoreCase(String.valueOf(parameter.get(key2)))) {
+ if (BOOLEAN_TRUE.equalsIgnoreCase(String.valueOf(parameter.get(key2)))) {
param.setOptional(true);
} else {
param.setOptional(false);
@@ -417,7 +418,7 @@ public class OnapCommandSchemaLoaderUtils {
}
}
- if ("true".equalsIgnoreCase(String.valueOf(parameter.get(key2)))) {
+ if (BOOLEAN_TRUE.equalsIgnoreCase(String.valueOf(parameter.get(key2)))) {
param.setSecured(true);
} else {
param.setSecured(false);
@@ -432,7 +433,7 @@ public class OnapCommandSchemaLoaderUtils {
}
}
- if ("true".equalsIgnoreCase(String.valueOf(parameter.get(key2)))) {
+ if (BOOLEAN_TRUE.equalsIgnoreCase(String.valueOf(parameter.get(key2)))) {
param.setInclude(true);
} else {
param.setInclude(false);
@@ -525,7 +526,7 @@ public class OnapCommandSchemaLoaderUtils {
IS_SECURED, map.get(key4)));
}
}
- if ("true".equals(String.valueOf(map.get(key4)))) {
+ if (BOOLEAN_TRUE.equals(String.valueOf(map.get(key4)))) {
attr.setSecured(true);
} else {
attr.setSecured(false);
@@ -669,6 +670,8 @@ public class OnapCommandSchemaLoaderUtils {
}
break;
+ //mrkanag: from auth command, add the parameters to the command's parameters list
+
case MODE:
Object mode = serviceMap.get(key);
srv.setMode(mode.toString());
diff --git a/framework/src/main/resources/open-cli-schema/schema-refresh.yaml b/framework/src/main/resources/open-cli-schema/schema-refresh.yaml
index 86829534..e5c9b56f 100644
--- a/framework/src/main/resources/open-cli-schema/schema-refresh.yaml
+++ b/framework/src/main/resources/open-cli-schema/schema-refresh.yaml
@@ -1,6 +1,6 @@
open_cli_schema_version: 1.0
name: schema-refresh
-description: Oclip command to refresh schemas stored in open_cli_schema folders.
+description: Oclip command to refresh schemas stored in open-cli-schema folders.
info:
product: open-cli