summaryrefslogtreecommitdiffstats
path: root/profiles/http/src/main
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-12-25 15:28:52 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-12-26 10:21:55 +0530
commit8c79df8d4835e2cded87f60d78e5bf05e3cd6b16 (patch)
tree7bd5eb01731762f3717a03f280477f4268b5ee73 /profiles/http/src/main
parent82b9e1fb1673b2ea2cf16c074ce0c76c200fff8a (diff)
Merge default params files
Issue-ID: CLI-66 Change-Id: I320e21ff3b25d0c38c196b49f2ed320174396e4a Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'profiles/http/src/main')
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/cmd/OnapHttpCommand.java8
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java3
-rw-r--r--profiles/http/src/main/resources/open-cli-schema/http/default_input_parameters_http.yaml5
3 files changed, 8 insertions, 8 deletions
diff --git a/profiles/http/src/main/java/org/onap/cli/fw/http/cmd/OnapHttpCommand.java b/profiles/http/src/main/java/org/onap/cli/fw/http/cmd/OnapHttpCommand.java
index 12309341..17d9c731 100644
--- a/profiles/http/src/main/java/org/onap/cli/fw/http/cmd/OnapHttpCommand.java
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/cmd/OnapHttpCommand.java
@@ -61,6 +61,10 @@ public class OnapHttpCommand extends OnapCommand {
private OnapCommandHttpService oclipService = new OnapCommandHttpService();
+ public OnapHttpCommand() {
+ super.addDefaultSchemas(OnapCommandHttpConstants.DEFAULT_PARAMETER_HTTP_FILE_NAME);
+ }
+
public void setInput(HttpInput input) {
this.input = input;
}
@@ -102,8 +106,8 @@ public class OnapHttpCommand extends OnapCommand {
}
@Override
- protected List<String> initializeProfileSchema(boolean validate) throws OnapCommandException {
- return OnapCommandSchemaHttpLoader.loadHttpSchema(this, this.getSchemaName(), true, validate);
+ protected List<String> initializeProfileSchema(Map<String, ?> schemaMap, boolean validate) throws OnapCommandException {
+ return OnapCommandSchemaHttpLoader.parseHttpSchema(this, schemaMap, validate);
}
@Override
diff --git a/profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java b/profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java
index 08a70782..6dd15884 100644
--- a/profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java
@@ -87,7 +87,7 @@ public class OnapCommandSchemaHttpLoader {
* @throws OnapCommandException
* on error
*/
- static ArrayList<String> parseHttpSchema(OnapHttpCommand cmd,
+ public static ArrayList<String> parseHttpSchema(OnapHttpCommand cmd,
final Map<String, ?> values,
boolean validate) throws OnapCommandException {
ArrayList<String> errorList = new ArrayList<>();
@@ -98,6 +98,7 @@ public class OnapCommandSchemaHttpLoader {
if (validate) {
OnapCommandUtils.validateTags(errorList, valMap, OnapCommandConfig.getCommaSeparatedList(OnapCommandHttpConstants.HTTP_SECTIONS),
OnapCommandConfig.getCommaSeparatedList(OnapCommandHttpConstants.HTTP_MANDATORY_SECTIONS), OnapCommandHttpConstants.HTTP);
+ errorList.addAll(validateHttpSchemaSection(values));
}
for (Map.Entry<String, ?> entry1 : valMap.entrySet()) {
String key1 = entry1.getKey();
diff --git a/profiles/http/src/main/resources/open-cli-schema/http/default_input_parameters_http.yaml b/profiles/http/src/main/resources/open-cli-schema/http/default_input_parameters_http.yaml
index 9029e273..69e82b3b 100644
--- a/profiles/http/src/main/resources/open-cli-schema/http/default_input_parameters_http.yaml
+++ b/profiles/http/src/main/resources/open-cli-schema/http/default_input_parameters_http.yaml
@@ -1,10 +1,5 @@
open_cli_schema_version: 1.0
-info:
- product: open-cli
- service: default-param
- ignore: true
-
parameters:
- name: host-username
type: string