aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/main/java/org
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-10-23 17:38:54 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-11-21 18:07:44 +0530
commitd2c0f8345fc83e04cfaf3d24b8a3392e6d18c67d (patch)
tree5c779796d85ae5c337e20acb1e1a88b112c36135 /framework/src/main/java/org
parent5afc1ab68f9eb20232d02f6b463758637cdda540 (diff)
Move install.sh into zip root folder
Issue-Id: CLI-66 Change-Id: I316788d3f9fc036da71479be7106150b82e25330 Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'framework/src/main/java/org')
-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());