aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/main/java')
-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
2 files changed, 16 insertions, 11 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());