summaryrefslogtreecommitdiffstats
path: root/framework/src/main
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-09-13 10:52:49 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-09-13 11:12:31 +0530
commitbb9a334dc4ab33a90533fc5d35508db3edfa34b6 (patch)
treec7d24afff62942ef34232247010a1e9d3ee781ce /framework/src/main
parent745a26defad16dcb89d6804ca02c11899f9205f0 (diff)
Namespace migration to open_cli_schema_version
CLI-3 Change-Id: I87d739c9c9b9f8e7724f1aa736a51b0fd91c30df Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'framework/src/main')
-rw-r--r--framework/src/main/java/org/onap/cli/fw/OnapCommand.java2
-rw-r--r--framework/src/main/java/org/onap/cli/fw/cmd/OnapHttpCommand.java2
-rw-r--r--framework/src/main/java/org/onap/cli/fw/conf/Constants.java4
-rw-r--r--framework/src/main/java/org/onap/cli/fw/error/OnapCommandInvalidSchemaVersion.java2
-rw-r--r--framework/src/main/java/org/onap/cli/fw/utils/OnapCommandUtils.java8
-rw-r--r--framework/src/main/resources/default_input_parameters.yaml2
-rw-r--r--framework/src/main/resources/onap-cli-schema/schema-refresh.yaml2
-rw-r--r--framework/src/main/resources/onap-cli-schema/schema-validate.yaml2
-rw-r--r--framework/src/main/resources/onap.properties4
9 files changed, 14 insertions, 14 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