aboutsummaryrefslogtreecommitdiffstats
path: root/validate/validation/src
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-12-11 20:34:44 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-12-12 15:48:55 +0530
commit0d97a835fa2052ded5a31e8921baf641c8e9bb57 (patch)
tree800584529f77c8ff26f05a73abd3fa71205a69a7 /validate/validation/src
parent03c54a40daf75644ec0bcbc73636e3eb427c1604 (diff)
Make Http as separate plugin
Issue-ID: CLI-66 Change-Id: I8ad78f417f6dbb00e29effdd3ed8ec1939aee81d Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'validate/validation/src')
-rw-r--r--validate/validation/src/test/java/org/onap/cli/moco/OnapCommandHttpMocoServer.java2
-rw-r--r--validate/validation/src/test/java/org/onap/cli/validation/OnapValidationTest.java8
-rw-r--r--validate/validation/src/test/resources/open-cli.properties31
3 files changed, 36 insertions, 5 deletions
diff --git a/validate/validation/src/test/java/org/onap/cli/moco/OnapCommandHttpMocoServer.java b/validate/validation/src/test/java/org/onap/cli/moco/OnapCommandHttpMocoServer.java
index 533742ab..b1f18681 100644
--- a/validate/validation/src/test/java/org/onap/cli/moco/OnapCommandHttpMocoServer.java
+++ b/validate/validation/src/test/java/org/onap/cli/moco/OnapCommandHttpMocoServer.java
@@ -36,9 +36,9 @@ import java.util.List;
import java.util.Map;
import java.util.stream.Stream;
-import org.onap.cli.fw.OnapCommandRegistrar;
import org.onap.cli.fw.error.OnapCommandException;
import org.onap.cli.fw.error.OnapCommandInvalidSample;
+import org.onap.cli.fw.registrar.OnapCommandRegistrar;
import org.onap.cli.fw.utils.OnapCommandDiscoveryUtils;
import org.onap.cli.main.OnapCli;
import org.slf4j.Logger;
diff --git a/validate/validation/src/test/java/org/onap/cli/validation/OnapValidationTest.java b/validate/validation/src/test/java/org/onap/cli/validation/OnapValidationTest.java
index fffec3f5..d8e26329 100644
--- a/validate/validation/src/test/java/org/onap/cli/validation/OnapValidationTest.java
+++ b/validate/validation/src/test/java/org/onap/cli/validation/OnapValidationTest.java
@@ -27,9 +27,9 @@ import java.util.Map;
import org.apache.commons.io.FileUtils;
import org.junit.Ignore;
import org.junit.Test;
-import org.onap.cli.fw.OnapCommandRegistrar;
import org.onap.cli.fw.error.OnapCommandException;
-import org.onap.cli.fw.utils.SchemaInfo;
+import org.onap.cli.fw.registrar.OnapCommandRegistrar;
+import org.onap.cli.fw.schema.OnapCommandSchemaInfo;
import org.onap.cli.main.OnapCli;
import org.onap.cli.moco.OnapCommandHttpMocoServer;
import org.onap.cli.moco.OnapCommandSample;
@@ -49,7 +49,7 @@ public class OnapValidationTest {
OnapCommandRegistrar.getRegistrar().setEnabledProductVersion(version);
System.out.println(version);
System.out.println("==========================\n\n");
- for (SchemaInfo sch : OnapCommandRegistrar.getRegistrar().listCommandInfo()) {
+ for (OnapCommandSchemaInfo sch : OnapCommandRegistrar.getRegistrar().listCommandInfo()) {
if (sch.isIgnore()) {
continue;
}
@@ -70,7 +70,7 @@ public class OnapValidationTest {
System.out.println(version);
System.out.println("==========================\n\n");
int i = 1;
- for (SchemaInfo sch : OnapCommandRegistrar.getRegistrar().listCommandInfo()) {
+ for (OnapCommandSchemaInfo sch : OnapCommandRegistrar.getRegistrar().listCommandInfo()) {
if (sch.isIgnore()) {
continue;
}
diff --git a/validate/validation/src/test/resources/open-cli.properties b/validate/validation/src/test/resources/open-cli.properties
new file mode 100644
index 00000000..026b1f13
--- /dev/null
+++ b/validate/validation/src/test/resources/open-cli.properties
@@ -0,0 +1,31 @@
+cli.product_name=open-cli
+cli.version=1.0
+
+cli.discover_always=false
+
+#schema validation
+cli.schema.top_level_params_list=open_cli_schema_version,name,description,parameters,results,http,info
+cli.schema.top_level_mandatory_list=open_cli_schema_version
+
+cli.schema.info_params_list=product,service,type,author,ignore
+cli.schema.info_params_mandatory_list=product,service
+
+cli.schema.input_params_list=name,description,type,short_option,long_option, is_optional,default_value,is_secured,is_include
+cli.schema.input_params_mandatory_list=name,description,type
+
+cli.schema.result_params_list=name,description,scope,type,is_secured, default_value
+cli.schema.result_params_mandatory_list=name, description, type, scope
+
+cli.schema.boolean_values=true,false
+cli.command.type=cmd,auth,catalog
+
+# moco properties
+cli.sample.gen.enable=false
+cli.sample.gen.target=.
+
+# mrkanag Move this to db, once exteranl command registration is supported in place of discovery
+cli.schema.type.supported=http
+
+#other properties to load (it should be hanled when plugins are made as externally register-able
+#when command plugin management support is enabled in oclip
+cli.plugins-prps=open-cli-http.properties \ No newline at end of file