[WIP] Upgrade ONOS to karaf version 4.2.1
Change-Id: I7cd40c995bdf1c80f94b1895fb3344e32404c7fa
diff --git a/cli/src/main/java/org/onosproject/cli/MastersListCommand.java b/cli/src/main/java/org/onosproject/cli/MastersListCommand.java
index 7ffc3b2..6debc1b 100644
--- a/cli/src/main/java/org/onosproject/cli/MastersListCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/MastersListCommand.java
@@ -19,7 +19,8 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.google.common.collect.Lists;
-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.cluster.ClusterService;
import org.onosproject.cluster.ControllerNode;
import org.onosproject.mastership.MastershipService;
@@ -34,12 +35,13 @@
/**
* Lists device mastership information.
*/
+@Service
@Command(scope = "onos", name = "masters",
description = "Lists device mastership information")
public class MastersListCommand extends AbstractShellCommand {
@Override
- protected void execute() {
+ protected void doExecute() {
ClusterService service = get(ClusterService.class);
MastershipService mastershipService = get(MastershipService.class);
DeviceService deviceService = get(DeviceService.class);