[WIP] Upgrade ONOS to karaf version 4.2.1
Change-Id: I7cd40c995bdf1c80f94b1895fb3344e32404c7fa
diff --git a/cli/src/main/java/org/onosproject/cli/net/FlowObjectivePendingNextCommand.java b/cli/src/main/java/org/onosproject/cli/net/FlowObjectivePendingNextCommand.java
index e3f372b..f0fbca8 100644
--- a/cli/src/main/java/org/onosproject/cli/net/FlowObjectivePendingNextCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/FlowObjectivePendingNextCommand.java
@@ -17,7 +17,8 @@
import java.util.List;
-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.onlab.osgi.ServiceNotFoundException;
import org.onosproject.cli.AbstractShellCommand;
import org.onosproject.net.flowobjective.FlowObjectiveService;
@@ -27,6 +28,7 @@
* Also returns the forwarding objectives and next objectives waiting on the pending
* next-objectives. These lists are controller instance specific.
*/
+@Service
@Command(scope = "onos", name = "obj-pending-nexts",
description = "flow-objectives pending next-objectives")
public class FlowObjectivePendingNextCommand extends AbstractShellCommand {
@@ -34,7 +36,7 @@
private static final String FORMAT_MAPPING = " %s";
@Override
- protected void execute() {
+ protected void doExecute() {
try {
FlowObjectiveService service = get(FlowObjectiveService.class);
printNexts(service.getPendingFlowObjectives());