diff options
author | Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com> | 2017-12-25 15:28:52 +0530 |
---|---|---|
committer | Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com> | 2017-12-26 10:21:55 +0530 |
commit | 8c79df8d4835e2cded87f60d78e5bf05e3cd6b16 (patch) | |
tree | 7bd5eb01731762f3717a03f280477f4268b5ee73 /profiles/http/src/main/java/org | |
parent | 82b9e1fb1673b2ea2cf16c074ce0c76c200fff8a (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/java/org')
-rw-r--r-- | profiles/http/src/main/java/org/onap/cli/fw/http/cmd/OnapHttpCommand.java | 8 | ||||
-rw-r--r-- | profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java | 3 |
2 files changed, 8 insertions, 3 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(); |