summaryrefslogtreecommitdiffstats
path: root/framework
diff options
context:
space:
mode:
Diffstat (limited to 'framework')
-rw-r--r--framework/src/main/java/org/onap/cli/fw/registrar/OnapCommandRegistrar.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/framework/src/main/java/org/onap/cli/fw/registrar/OnapCommandRegistrar.java b/framework/src/main/java/org/onap/cli/fw/registrar/OnapCommandRegistrar.java
index bd7977b3..34dc6b6d 100644
--- a/framework/src/main/java/org/onap/cli/fw/registrar/OnapCommandRegistrar.java
+++ b/framework/src/main/java/org/onap/cli/fw/registrar/OnapCommandRegistrar.java
@@ -366,13 +366,22 @@ public class OnapCommandRegistrar {
attrSrv.setScope(OnapCommandResultAttributeScope.SHORT);
help.getRecords().add(attrSrv);
+ OnapCommandResultAttribute attrState = new OnapCommandResultAttribute();
+ attrState.setName(OnapCommandConstants.INFO_STATE.toUpperCase());
+ attrState.setDescription(OnapCommandConstants.INFO_STATE);
+ attrState.setScope(OnapCommandResultAttributeScope.SHORT);
+ help.getRecords().add(attrState);
+
+
OnapCommandResultAttribute attrDesc = new OnapCommandResultAttribute();
attrDesc.setName(OnapCommandConstants.DESCRIPTION.toUpperCase());
attrDesc.setDescription(OnapCommandConstants.DESCRIPTION);
attrDesc.setScope(OnapCommandResultAttributeScope.SHORT);
help.getRecords().add(attrDesc);
- for (String cmdName : isEnabledProductVersionOnly ? OnapCommandUtils.sort(this.listCommandsForEnabledProductVersion()) : OnapCommandUtils.sort(this.listCommands())) {
+ for (String cmdName : isEnabledProductVersionOnly ?
+ OnapCommandUtils.sort(this.listCommandsForEnabledProductVersion()) :
+ OnapCommandUtils.sort(this.listCommands())) {
OnapCommand cmd;
try {
if (!isEnabledProductVersionOnly) {
@@ -387,6 +396,7 @@ public class OnapCommandRegistrar {
attrSrv.getValues().add(cmd.getInfo().getService());
attrDesc.getValues().add(cmd.getDescription());
+ attrState.getValues().add(cmd.getInfo().getState().name());
} catch (OnapCommandException e) {
throw new OnapCommandHelpFailed(e);
}