[WIP] Upgrade ONOS to karaf version 4.2.1
Change-Id: I7cd40c995bdf1c80f94b1895fb3344e32404c7fa
diff --git a/cli/src/main/java/org/onosproject/cli/net/FlowObjectiveNextListCommand.java b/cli/src/main/java/org/onosproject/cli/net/FlowObjectiveNextListCommand.java
index bbf90e3..dd85b5b 100644
--- a/cli/src/main/java/org/onosproject/cli/net/FlowObjectiveNextListCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/FlowObjectiveNextListCommand.java
@@ -18,7 +18,8 @@
import java.util.List;
import org.onlab.osgi.ServiceNotFoundException;
-import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
import org.onosproject.cli.AbstractShellCommand;
import org.onosproject.net.flowobjective.FlowObjectiveService;
@@ -26,6 +27,7 @@
* Returns a mapping of FlowObjective next-ids to the groups that get created
* by a device driver. These mappings are controller instance specific.
*/
+@Service
@Command(scope = "onos", name = "obj-next-ids",
description = "flow-objectives next-ids to group-ids mapping")
public class FlowObjectiveNextListCommand extends AbstractShellCommand {
@@ -33,7 +35,7 @@
private static final String FORMAT_MAPPING = " %s";
@Override
- protected void execute() {
+ protected void doExecute() {
try {
FlowObjectiveService service = get(FlowObjectiveService.class);
printNexts(service.getNextMappings());