aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/main/java/org/onap
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-08-30 10:38:50 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-08-30 11:03:50 +0530
commitaf8413e2b168187d7a1683b8b8bf9d1ab16fafbf (patch)
treeab10506337a4d99dd996930d46d51868cfec9ef2 /framework/src/main/java/org/onap
parenta4cd2403a5a171d6ab6aa6b1b0b1aae83345121b (diff)
Update Schema refresh to report product version
CLI-37 Change-Id: Ifabd3e0581c74fd76cc60ec2a5b3005fb023e55e Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'framework/src/main/java/org/onap')
-rw-r--r--framework/src/main/java/org/onap/cli/fw/cmd/OnapSchemaRefreshCommand.java6
-rw-r--r--framework/src/main/java/org/onap/cli/fw/cmd/OnapSchemaValidateCommand.java2
2 files changed, 6 insertions, 2 deletions
diff --git a/framework/src/main/java/org/onap/cli/fw/cmd/OnapSchemaRefreshCommand.java b/framework/src/main/java/org/onap/cli/fw/cmd/OnapSchemaRefreshCommand.java
index 81cdfca2..7a156cac 100644
--- a/framework/src/main/java/org/onap/cli/fw/cmd/OnapSchemaRefreshCommand.java
+++ b/framework/src/main/java/org/onap/cli/fw/cmd/OnapSchemaRefreshCommand.java
@@ -30,7 +30,7 @@ import java.util.List;
* Refresh external schema.
*
*/
-@OnapCommandSchema(name = "schema-refresh", version="0.0", schema = "schema-refresh.yaml")
+@OnapCommandSchema(name = "schema-refresh", version="cli-1.0", schema = "schema-refresh.yaml")
public class OnapSchemaRefreshCommand extends OnapCommand {
@Override
@@ -44,6 +44,7 @@ public class OnapSchemaRefreshCommand extends OnapCommand {
List<String> cmdNames = new ArrayList<>();
List<String> cmdFiles = new ArrayList<>();
List<String> versions = new ArrayList<>();
+ List<String> cmdVersions = new ArrayList<>();
for (int i = 0; i < schemas.size(); i++) {
ExternalSchema schema = schemas.get(i);
@@ -51,12 +52,15 @@ public class OnapSchemaRefreshCommand extends OnapCommand {
cmdNames.add(schema.getCmdName());
cmdFiles.add(schema.getSchemaName());
versions.add(schema.getVersion());
+ cmdVersions.add(schema.getCmdVersion());
}
for (OnapCommandResultAttribute attribute : this.getResult().getRecords()) {
if ("sl-no".equals(attribute.getName())) {
attribute.setValues(slNumbers);
} else if ("command".equals(attribute.getName())) {
attribute.setValues(cmdNames);
+ } else if ("product-version".equals(attribute.getName())) {
+ attribute.setValues(cmdVersions);
} else if ("schema".equals(attribute.getName())) {
attribute.setValues(cmdFiles);
} else if ("version".equals(attribute.getName())) {
diff --git a/framework/src/main/java/org/onap/cli/fw/cmd/OnapSchemaValidateCommand.java b/framework/src/main/java/org/onap/cli/fw/cmd/OnapSchemaValidateCommand.java
index 140ac818..3119f9c7 100644
--- a/framework/src/main/java/org/onap/cli/fw/cmd/OnapSchemaValidateCommand.java
+++ b/framework/src/main/java/org/onap/cli/fw/cmd/OnapSchemaValidateCommand.java
@@ -29,7 +29,7 @@ import java.util.Map;
/**
* Validate schema command.
*/
-@OnapCommandSchema(name = "schema-validate", version="0.0", schema = "schema-validate.yaml")
+@OnapCommandSchema(name = "schema-validate", version="cli-1.0", schema = "schema-validate.yaml")
public class OnapSchemaValidateCommand extends OnapCommand {
@Override