Fixes for karaf 4.2.1 CLI annotations for dhcp relay app
Change-Id: I351a9ed4e57a8a73fa6db80d172d5120ebcde4b6
diff --git a/apps/dhcprelay/BUILD b/apps/dhcprelay/BUILD
index 956419e..5d9a3ca 100644
--- a/apps/dhcprelay/BUILD
+++ b/apps/dhcprelay/BUILD
@@ -15,6 +15,7 @@
]
osgi_jar_with_tests(
+ karaf_command_packages = ["org.onosproject.dhcprelay.cli"],
test_deps = TEST_DEPS,
deps = COMPILE_DEPS,
)
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/cli/DhcpRelayAggCountersCommand.java b/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/cli/DhcpRelayAggCountersCommand.java
index 13990d3..d0bdad1 100644
--- a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/cli/DhcpRelayAggCountersCommand.java
+++ b/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/cli/DhcpRelayAggCountersCommand.java
@@ -18,6 +18,7 @@
import org.apache.karaf.shell.api.action.Argument;
import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.Completion;
import org.apache.karaf.shell.api.action.lifecycle.Service;
import org.onosproject.cli.AbstractShellCommand;
import org.onosproject.dhcprelay.api.DhcpRelayService;
@@ -38,6 +39,7 @@
@Argument(index = 0, name = "reset",
description = "reset counters or not",
required = false, multiValued = false)
+ @Completion(DhcpRelayResetCompleter.class)
String reset = null;
private static final String HEADER = "DHCP Relay Aggregate Counters :";
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/cli/DhcpRelayCommand.java b/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/cli/DhcpRelayCommand.java
index 694cb45..4145cd2 100644
--- a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/cli/DhcpRelayCommand.java
+++ b/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/cli/DhcpRelayCommand.java
@@ -19,6 +19,7 @@
import org.apache.karaf.shell.api.action.Argument;
import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.Completion;
import org.apache.karaf.shell.api.action.lifecycle.Service;
import org.onlab.packet.IpAddress;
import org.onlab.packet.MacAddress;
@@ -48,11 +49,13 @@
@Argument(index = 0, name = "counter",
description = "shows counter values",
required = false, multiValued = false)
+ @Completion(DhcpRelayCounterCompleter.class)
String counter = null;
@Argument(index = 1, name = "reset",
description = "reset counters or not",
required = false, multiValued = false)
+ @Completion(DhcpRelayResetCompleter.class)
String reset = null;