diff options
Diffstat (limited to 'framework/src')
36 files changed, 42 insertions, 42 deletions
diff --git a/framework/src/main/java/org/onap/cli/fw/OnapCommand.java b/framework/src/main/java/org/onap/cli/fw/OnapCommand.java index c65ca9a8..dc90314a 100644 --- a/framework/src/main/java/org/onap/cli/fw/OnapCommand.java +++ b/framework/src/main/java/org/onap/cli/fw/OnapCommand.java @@ -71,7 +71,7 @@ public abstract class OnapCommand { protected boolean isInitialzied = false; public String getSchemaVersion() { - return Constants.ONAP_CMD_SCHEMA_VERSION_VALUE; + return Constants.OPEN_CLI_SCHEMA_VERSION_VALUE; } /** diff --git a/framework/src/main/java/org/onap/cli/fw/cmd/OnapHttpCommand.java b/framework/src/main/java/org/onap/cli/fw/cmd/OnapHttpCommand.java index 9438102f..e3ec17de 100644 --- a/framework/src/main/java/org/onap/cli/fw/cmd/OnapHttpCommand.java +++ b/framework/src/main/java/org/onap/cli/fw/cmd/OnapHttpCommand.java @@ -48,7 +48,7 @@ public class OnapHttpCommand extends OnapCommand { @Override public String getSchemaVersion() { - return Constants.ONAP_CMD_SCHEMA_VERSION_VALUE; + return Constants.OPEN_CLI_SCHEMA_VERSION_VALUE; } public void setSuccessStatusCodes(List<Integer> successStatusCodes) { diff --git a/framework/src/main/java/org/onap/cli/fw/conf/Constants.java b/framework/src/main/java/org/onap/cli/fw/conf/Constants.java index 00bdb855..17b771c0 100644 --- a/framework/src/main/java/org/onap/cli/fw/conf/Constants.java +++ b/framework/src/main/java/org/onap/cli/fw/conf/Constants.java @@ -80,7 +80,7 @@ public class Constants { public static final String SCOPE = "scope"; - public static final String ONAP_CMD_SCHEMA_VERSION_VALUE = "1.0"; + public static final String OPEN_CLI_SCHEMA_VERSION_VALUE = "1.0"; public static final String DESCRIPTION = "description"; public static final String SERVICE = "service"; public static final String PARAMETERS = "parameters"; @@ -90,7 +90,7 @@ public class Constants { public static final String RESULTS = "results"; - public static final String ONAP_CMD_SCHEMA_VERSION = "onap_cmd_schema_version"; + public static final String OPEN_CLI_SCHEMA_VERSION = "open_cli_schema_version"; public static final String NAME = "name"; public static final String VERSION = "version"; public static final String BASE_PATH = "base_path"; diff --git a/framework/src/main/java/org/onap/cli/fw/error/OnapCommandInvalidSchemaVersion.java b/framework/src/main/java/org/onap/cli/fw/error/OnapCommandInvalidSchemaVersion.java index 75530ab4..e330283f 100644 --- a/framework/src/main/java/org/onap/cli/fw/error/OnapCommandInvalidSchemaVersion.java +++ b/framework/src/main/java/org/onap/cli/fw/error/OnapCommandInvalidSchemaVersion.java @@ -25,7 +25,7 @@ public class OnapCommandInvalidSchemaVersion extends OnapCommandException { private static final long serialVersionUID = 4459731110721370387L; public OnapCommandInvalidSchemaVersion(String schemaVersion) { - super("0x0008", "Command schema onap_cmd_schema_version " + schemaVersion + " is invalid or missing"); + super("0x0008", "Command schema open_cli_schema_version " + schemaVersion + " is invalid or missing"); } } diff --git a/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandUtils.java b/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandUtils.java index f4fb7515..9b824d32 100644 --- a/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandUtils.java +++ b/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandUtils.java @@ -62,7 +62,7 @@ import static org.onap.cli.fw.conf.Constants.MODE; import static org.onap.cli.fw.conf.Constants.MODE_VALUES; import static org.onap.cli.fw.conf.Constants.MULTIPART_ENTITY_NAME; import static org.onap.cli.fw.conf.Constants.NAME; -import static org.onap.cli.fw.conf.Constants.ONAP_CMD_SCHEMA_VERSION; +import static org.onap.cli.fw.conf.Constants.OPEN_CLI_SCHEMA_VERSION; import static org.onap.cli.fw.conf.Constants.PARAMETERS; import static org.onap.cli.fw.conf.Constants.QUERIES; import static org.onap.cli.fw.conf.Constants.REQUEST; @@ -200,8 +200,8 @@ public class OnapCommandUtils { throw new OnapCommandInvalidSchema(schemaName, e); } String schemaVersion = ""; - if (values.keySet().contains(ONAP_CMD_SCHEMA_VERSION)) { - Object obj = values.get(ONAP_CMD_SCHEMA_VERSION); + if (values.keySet().contains(OPEN_CLI_SCHEMA_VERSION)) { + Object obj = values.get(OPEN_CLI_SCHEMA_VERSION); schemaVersion = obj.toString(); } @@ -1528,7 +1528,7 @@ public class OnapCommandUtils { schema.setSchemaName(resource.getFilename()); schema.setSchemaURI(resource.getURI().toString()); schema.setCmdName((String) resourceMap.get(NAME)); - Object obj = resourceMap.get(ONAP_CMD_SCHEMA_VERSION); + Object obj = resourceMap.get(OPEN_CLI_SCHEMA_VERSION); schema.setVersion(obj.toString()); schema.setCmdVersion(resourceMap.get(Constants.VERSION).toString()); if (resourceMap.get(Constants.HTTP) != null) { diff --git a/framework/src/main/resources/default_input_parameters.yaml b/framework/src/main/resources/default_input_parameters.yaml index 3b7e198a..0503ff90 100644 --- a/framework/src/main/resources/default_input_parameters.yaml +++ b/framework/src/main/resources/default_input_parameters.yaml @@ -1,4 +1,4 @@ -onap_cmd_schema_version: 1.0 +open_cli_schema_version: 1.0 parameters: - name: onap-username type: string diff --git a/framework/src/main/resources/onap-cli-schema/schema-refresh.yaml b/framework/src/main/resources/onap-cli-schema/schema-refresh.yaml index 2cd90bcd..280dec36 100644 --- a/framework/src/main/resources/onap-cli-schema/schema-refresh.yaml +++ b/framework/src/main/resources/onap-cli-schema/schema-refresh.yaml @@ -1,4 +1,4 @@ -onap_cmd_schema_version: 1.0 +open_cli_schema_version: 1.0 name: schema-refresh description: Onap command to refresh schemas stored in onap_cli_schema folders. version: cli-1.0 diff --git a/framework/src/main/resources/onap-cli-schema/schema-validate.yaml b/framework/src/main/resources/onap-cli-schema/schema-validate.yaml index 74abfdc4..5eb29f0b 100644 --- a/framework/src/main/resources/onap-cli-schema/schema-validate.yaml +++ b/framework/src/main/resources/onap-cli-schema/schema-validate.yaml @@ -1,4 +1,4 @@ -onap_cmd_schema_version: 1.0 +open_cli_schema_version: 1.0 name: schema-validate description: Onap command to validate schema version: cli-1.0 diff --git a/framework/src/main/resources/onap.properties b/framework/src/main/resources/onap.properties index fc4dcb7d..285e5c8a 100644 --- a/framework/src/main/resources/onap.properties +++ b/framework/src/main/resources/onap.properties @@ -28,8 +28,8 @@ cli.http.basic.common_headers.sdc.user-id.value=${onap-username} #cli.service.auth=aaf #schema validation -cli.schema.top_level_params_list=onap_cmd_schema_version,name,version,description,service,parameters,results,http -cli.schema.top_level_mandatory_list=onap_cmd_schema_version +cli.schema.top_level_params_list=open_cli_schema_version,name,version,description,service,parameters,results,http +cli.schema.top_level_mandatory_list=open_cli_schema_version cli.schema.service_params_list=name,version,auth,mode cli.schema.service_params_mandatory_list=name,version diff --git a/framework/src/test/java/org/onap/cli/fw/error/OnapCommandErrorTest.java b/framework/src/test/java/org/onap/cli/fw/error/OnapCommandErrorTest.java index 0a388e5f..20402b0d 100644 --- a/framework/src/test/java/org/onap/cli/fw/error/OnapCommandErrorTest.java +++ b/framework/src/test/java/org/onap/cli/fw/error/OnapCommandErrorTest.java @@ -162,7 +162,7 @@ public class OnapCommandErrorTest { public void onapCommandInvalidSchemaVersionTest() { OnapCommandInvalidSchemaVersion failed = new OnapCommandInvalidSchemaVersion("1.0"); - assertEquals("0x0008::Command schema onap_cmd_schema_version 1.0 is invalid or missing", failed.getMessage()); + assertEquals("0x0008::Command schema open_cli_schema_version 1.0 is invalid or missing", failed.getMessage()); } @Test diff --git a/framework/src/test/java/org/onap/cli/fw/utils/OnapCommandUtilsTest.java b/framework/src/test/java/org/onap/cli/fw/utils/OnapCommandUtilsTest.java index 5a992c6f..47ee2c7a 100644 --- a/framework/src/test/java/org/onap/cli/fw/utils/OnapCommandUtilsTest.java +++ b/framework/src/test/java/org/onap/cli/fw/utils/OnapCommandUtilsTest.java @@ -133,7 +133,7 @@ public class OnapCommandUtilsTest { try { map = OnapCommandUtils.validateSchemaVersion("sample-test-schema.yaml", "1.1"); } catch (OnapCommandInvalidSchemaVersion e) { - assertEquals("0x0008::Command schema onap_cmd_schema_version 1.0 is invalid or missing", e.getMessage()); + assertEquals("0x0008::Command schema open_cli_schema_version 1.0 is invalid or missing", e.getMessage()); } catch (OnapCommandInvalidSchema e) { fail("Test should not have thrown this exception : " + e.getMessage()); } catch (OnapCommandSchemaNotFound e) { diff --git a/framework/src/test/resources/onap-cli-schema/sample-test1-schema-http.yaml b/framework/src/test/resources/onap-cli-schema/sample-test1-schema-http.yaml index 0da1d22e..55e9326c 100644 --- a/framework/src/test/resources/onap-cli-schema/sample-test1-schema-http.yaml +++ b/framework/src/test/resources/onap-cli-schema/sample-test1-schema-http.yaml @@ -1,4 +1,4 @@ -onap_cmd_schema_version: 1.0 +open_cli_schema_version: 1.0 name: sample-test1 description: Onap sample command to test the command features version: cli-1.0 diff --git a/framework/src/test/resources/onap-test-schema.yaml b/framework/src/test/resources/onap-test-schema.yaml index 0a2f5c47..ef86348e 100644 --- a/framework/src/test/resources/onap-test-schema.yaml +++ b/framework/src/test/resources/onap-test-schema.yaml @@ -1,4 +1,4 @@ -onap_cmd_schema_version: 1.0 +open_cli_schema_version: 1.0 name: sample-test description: Onap sample command to test the command features verion: cli-1.0 diff --git a/framework/src/test/resources/onap.properties b/framework/src/test/resources/onap.properties index 9e6b34bd..14639504 100644 --- a/framework/src/test/resources/onap.properties +++ b/framework/src/test/resources/onap.properties @@ -28,8 +28,8 @@ cli.http.basic.common_headers.sdc.user-id.value=${onap-username} #cli.service.auth=aaf #schema validation -cli.schema.top_level_params_list=onap_cmd_schema_version,name,version,description,service,parameters,results,http -cli.schema.top_level_mandatory_list=onap_cmd_schema_version +cli.schema.top_level_params_list=open_cli_schema_version,name,version,description,service,parameters,results,http +cli.schema.top_level_mandatory_list=open_cli_schema_version cli.schema.service_params_list=name,version,auth,mode cli.schema.service_params_mandatory_list=name,version diff --git a/framework/src/test/resources/sample-test-exclude-param.yaml b/framework/src/test/resources/sample-test-exclude-param.yaml index 970a185d..7aed55cf 100644 --- a/framework/src/test/resources/sample-test-exclude-param.yaml +++ b/framework/src/test/resources/sample-test-exclude-param.yaml @@ -1,4 +1,4 @@ -onap_cmd_schema_version: 1.0 +open_cli_schema_version: 1.0 default_parameters: exclude: - long diff --git a/framework/src/test/resources/sample-test-import-def-param-false.yaml b/framework/src/test/resources/sample-test-import-def-param-false.yaml index 438ad64d..2eb92ef3 100644 --- a/framework/src/test/resources/sample-test-import-def-param-false.yaml +++ b/framework/src/test/resources/sample-test-import-def-param-false.yaml @@ -1,2 +1,2 @@ -onap_cmd_schema_version: 1.0 +open_cli_schema_version: 1.0 default_parameters: diff --git a/framework/src/test/resources/sample-test-include-exclude.yaml b/framework/src/test/resources/sample-test-include-exclude.yaml index 7a14f262..77d3211c 100644 --- a/framework/src/test/resources/sample-test-include-exclude.yaml +++ b/framework/src/test/resources/sample-test-include-exclude.yaml @@ -1,4 +1,4 @@ -onap_cmd_schema_version: 1.0 +open_cli_schema_version: 1.0 default_parameters: include: - onap-username diff --git a/framework/src/test/resources/sample-test-include-param.yaml b/framework/src/test/resources/sample-test-include-param.yaml index ecc737c7..18097129 100644 --- a/framework/src/test/resources/sample-test-include-param.yaml +++ b/framework/src/test/resources/sample-test-include-param.yaml @@ -1,4 +1,4 @@ -onap_cmd_schema_version: 1.0 +open_cli_schema_version: 1.0 default_parameters: include: - onap-username diff --git a/framework/src/test/resources/sample-test-invalid-default-parameter.yaml b/framework/src/test/resources/sample-test-invalid-default-parameter.yaml index ae20145a..242bdbfb 100644 --- a/framework/src/test/resources/sample-test-invalid-default-parameter.yaml +++ b/framework/src/test/resources/sample-test-invalid-default-parameter.yaml @@ -1,4 +1,4 @@ -onap_cmd_schema_version: 1.0 +open_cli_schema_version: 1.0 default_parameters: exclude: - invalid-param diff --git a/framework/src/test/resources/sample-test-invalid-default-params-not-exist.yaml b/framework/src/test/resources/sample-test-invalid-default-params-not-exist.yaml index 7e1f39e9..d8bea682 100644 --- a/framework/src/test/resources/sample-test-invalid-default-params-not-exist.yaml +++ b/framework/src/test/resources/sample-test-invalid-default-params-not-exist.yaml @@ -1,4 +1,4 @@ -onap_cmd_schema_version: 1.0 +open_cli_schema_version: 1.0 default_parameters: exclude: - invalid-param-1
\ No newline at end of file diff --git a/framework/src/test/resources/sample-test-invalid-exclude-noauth.yaml b/framework/src/test/resources/sample-test-invalid-exclude-noauth.yaml index 1de471c8..1a42b8d4 100644 --- a/framework/src/test/resources/sample-test-invalid-exclude-noauth.yaml +++ b/framework/src/test/resources/sample-test-invalid-exclude-noauth.yaml @@ -1,4 +1,4 @@ -onap_cmd_schema_version: 1.0 +open_cli_schema_version: 1.0 default_parameters: exclude: - onap-username
\ No newline at end of file diff --git a/framework/src/test/resources/sample-test-invalid-include-noauth.yaml b/framework/src/test/resources/sample-test-invalid-include-noauth.yaml index b80ac57f..2d53ab11 100644 --- a/framework/src/test/resources/sample-test-invalid-include-noauth.yaml +++ b/framework/src/test/resources/sample-test-invalid-include-noauth.yaml @@ -1,4 +1,4 @@ -onap_cmd_schema_version: 1.0 +open_cli_schema_version: 1.0 service: auth: none default_parameters: diff --git a/framework/src/test/resources/sample-test-invalid-schema-duplicate-longoption.yaml b/framework/src/test/resources/sample-test-invalid-schema-duplicate-longoption.yaml index a18aacc0..c7b018d3 100644 --- a/framework/src/test/resources/sample-test-invalid-schema-duplicate-longoption.yaml +++ b/framework/src/test/resources/sample-test-invalid-schema-duplicate-longoption.yaml @@ -1,4 +1,4 @@ -onap_cmd_schema_version: 1.0 +open_cli_schema_version: 1.0 name: sample-test description: Onap sample command to test the command features version: cli-1.0 diff --git a/framework/src/test/resources/sample-test-invalid-schema-duplicate-name.yaml b/framework/src/test/resources/sample-test-invalid-schema-duplicate-name.yaml index 375f4548..f46a9759 100644 --- a/framework/src/test/resources/sample-test-invalid-schema-duplicate-name.yaml +++ b/framework/src/test/resources/sample-test-invalid-schema-duplicate-name.yaml @@ -1,4 +1,4 @@ -onap_cmd_schema_version: 1.0 +open_cli_schema_version: 1.0 name: sample-test description: Onap sample command to test the command features version: cli-1.0 diff --git a/framework/src/test/resources/sample-test-invalid-schema-duplicate-shortoption.yaml b/framework/src/test/resources/sample-test-invalid-schema-duplicate-shortoption.yaml index 9c501452..4eb07be4 100644 --- a/framework/src/test/resources/sample-test-invalid-schema-duplicate-shortoption.yaml +++ b/framework/src/test/resources/sample-test-invalid-schema-duplicate-shortoption.yaml @@ -1,4 +1,4 @@ -onap_cmd_schema_version: 1.0 +open_cli_schema_version: 1.0 name: sample-test description: Onap sample command to test the command features version: cli-1.0 diff --git a/framework/src/test/resources/sample-test-invalid-schema.yaml b/framework/src/test/resources/sample-test-invalid-schema.yaml index fc301bbd..036a2071 100644 --- a/framework/src/test/resources/sample-test-invalid-schema.yaml +++ b/framework/src/test/resources/sample-test-invalid-schema.yaml @@ -1,4 +1,4 @@ -onap_cmd_schema_version: 1.0 +open_cli_schema_version: 1.0 name: sample-test description: Onap sample command to test the command features version: cli-1.0 diff --git a/framework/src/test/resources/sample-test-schema-auth-required.yaml b/framework/src/test/resources/sample-test-schema-auth-required.yaml index 408c74c7..6250e1f8 100644 --- a/framework/src/test/resources/sample-test-schema-auth-required.yaml +++ b/framework/src/test/resources/sample-test-schema-auth-required.yaml @@ -1,4 +1,4 @@ -onap_cmd_schema_version: 1.0 +open_cli_schema_version: 1.0 name: sample-test description: Onap sample command to test the command features version: cli-1.0 diff --git a/framework/src/test/resources/sample-test-schema-http.yaml b/framework/src/test/resources/sample-test-schema-http.yaml index 56a0a536..c6e0450c 100644 --- a/framework/src/test/resources/sample-test-schema-http.yaml +++ b/framework/src/test/resources/sample-test-schema-http.yaml @@ -1,4 +1,4 @@ -onap_cmd_schema_version: 1.0 +open_cli_schema_version: 1.0 name: sample-create-http description: Register microservice into Onap version: onap-1.0 diff --git a/framework/src/test/resources/sample-test-schema-swagger.yaml b/framework/src/test/resources/sample-test-schema-swagger.yaml index b9944363..7f486c2f 100644 --- a/framework/src/test/resources/sample-test-schema-swagger.yaml +++ b/framework/src/test/resources/sample-test-schema-swagger.yaml @@ -1,4 +1,4 @@ -onap_cmd_schema_version: 1.0 +open_cli_schema_version: 1.0 name: sample-test-swagger description: Sample swagger command test. version: cli-1.0 diff --git a/framework/src/test/resources/sample-test-schema.yaml b/framework/src/test/resources/sample-test-schema.yaml index 2f021779..48ef2d61 100644 --- a/framework/src/test/resources/sample-test-schema.yaml +++ b/framework/src/test/resources/sample-test-schema.yaml @@ -1,4 +1,4 @@ -onap_cmd_schema_version: 1.0 +open_cli_schema_version: 1.0 name: sample-test description: Onap sample command to test the command features version: onap-1.0 diff --git a/framework/src/test/resources/schema-invalid-file.yaml b/framework/src/test/resources/schema-invalid-file.yaml index 7b5937d5..3b841e7c 100644 --- a/framework/src/test/resources/schema-invalid-file.yaml +++ b/framework/src/test/resources/schema-invalid-file.yaml @@ -1,4 +1,4 @@ -onap_cmd_schema_version: 1.0 +open_cli_schema_version: 1.0 description: Register microservice into Onap name: schema-validate service:dasd diff --git a/framework/src/test/resources/schema-validate-basic.yaml b/framework/src/test/resources/schema-validate-basic.yaml index 80a9e1c6..f7880316 100644 --- a/framework/src/test/resources/schema-validate-basic.yaml +++ b/framework/src/test/resources/schema-validate-basic.yaml @@ -1,4 +1,4 @@ -onap_cmd_schema_version: 1.0 +open_cli_schema_version: 1.0 description: Register microservice into Onap name: schema-validate service: diff --git a/framework/src/test/resources/schema-validate-http.yaml b/framework/src/test/resources/schema-validate-http.yaml index 82f44aed..c813b764 100644 --- a/framework/src/test/resources/schema-validate-http.yaml +++ b/framework/src/test/resources/schema-validate-http.yaml @@ -1,4 +1,4 @@ -onap_cmd_schema_version: 1.0 +open_cli_schema_version: 1.0 description: Register microservice into Onap name: schema-validate service: diff --git a/framework/src/test/resources/schema-validate-invalid.yaml b/framework/src/test/resources/schema-validate-invalid.yaml index 61f3eeba..6a1a2a71 100644 --- a/framework/src/test/resources/schema-validate-invalid.yaml +++ b/framework/src/test/resources/schema-validate-invalid.yaml @@ -1,4 +1,4 @@ -onap_cmd_schema_version: 1.0 +open_cli_schema_version: 1.0 name: sdnc-create description: Register SDNC into Onap service: diff --git a/framework/src/test/resources/schema-validate-invalidschematype.yaml b/framework/src/test/resources/schema-validate-invalidschematype.yaml index cacf9c06..469f28ee 100644 --- a/framework/src/test/resources/schema-validate-invalidschematype.yaml +++ b/framework/src/test/resources/schema-validate-invalidschematype.yaml @@ -1,4 +1,4 @@ -onap_cmd_schema_version: 1.0 +open_cli_schema_version: 1.0 description: Register microservice into Onap name: schema-validate parameters: diff --git a/framework/src/test/resources/schema-validate-pass.yaml b/framework/src/test/resources/schema-validate-pass.yaml index 91fb3141..f5a258c9 100644 --- a/framework/src/test/resources/schema-validate-pass.yaml +++ b/framework/src/test/resources/schema-validate-pass.yaml @@ -1,4 +1,4 @@ -onap_cmd_schema_version: 1.0 +open_cli_schema_version: 1.0 name: sdnc-create description: Register SDNC into Onap service: |