From b8650ee5d54f1b0e682fe0d0e354a57a5fa7eb10 Mon Sep 17 00:00:00 2001 From: sharath reddy Date: Fri, 1 Apr 2022 13:07:30 +0530 Subject: re visit a block of commented-out lines of code Issue-ID: CLI-439 report: tested weather-report Signed-off-by: sharath reddy Change-Id: Idb5178bff022e7d1a5450730ed55e025de53f25c Signed-off-by: sharath reddy --- framework/src/main/java/org/onap/cli/fw/cmd/OnapCommandType.java | 3 ++- .../main/java/org/onap/cli/fw/registrar/OnapCommandRegistrar.java | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/framework/src/main/java/org/onap/cli/fw/cmd/OnapCommandType.java b/framework/src/main/java/org/onap/cli/fw/cmd/OnapCommandType.java index e874a14e..eb22765c 100644 --- a/framework/src/main/java/org/onap/cli/fw/cmd/OnapCommandType.java +++ b/framework/src/main/java/org/onap/cli/fw/cmd/OnapCommandType.java @@ -27,7 +27,8 @@ public enum OnapCommandType { AUTH, CATALOG, - CMD; + CMD, + SYSTEM; /** * Get parameter type. 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 912ea23d..de462b4f 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 @@ -26,6 +26,7 @@ import java.util.Set; import org.apache.commons.io.IOUtils; import org.onap.cli.fw.cmd.OnapCommand; +import org.onap.cli.fw.cmd.OnapCommandType; import org.onap.cli.fw.cmd.dummy.OnapCommandDummy; import org.onap.cli.fw.conf.OnapCommandConfig; import org.onap.cli.fw.conf.OnapCommandConstants; @@ -413,9 +414,9 @@ public class OnapCommandRegistrar { } //don't expose system commands for user usage - //if (cmd.getInfo().getCommandType().name().equalsIgnoreCase(OnapCommandType.SYSTEM.name())) { - // continue; - //} + if (cmd.getInfo().getCommandType().name().equalsIgnoreCase(OnapCommandType.SYSTEM.name())) { + continue; + } attrSrv.getValues().add(cmd.getInfo().getService()); attrDesc.getValues().add(cmd.getDescription()); -- cgit 1.2.3-korg