Refactoring to move code to right locations. Attempt at breaking dependency cycles.
diff --git a/cli/src/main/java/org/onlab/onos/cli/MastersListCommand.java b/cli/src/main/java/org/onlab/onos/cli/MastersListCommand.java
index 2da76fd..c23d59e 100644
--- a/cli/src/main/java/org/onlab/onos/cli/MastersListCommand.java
+++ b/cli/src/main/java/org/onlab/onos/cli/MastersListCommand.java
@@ -1,11 +1,12 @@
 package org.onlab.onos.cli;
 
 import com.google.common.collect.Lists;
+
 import org.apache.karaf.shell.commands.Command;
 import org.onlab.onos.cluster.ClusterService;
 import org.onlab.onos.cluster.ControllerNode;
-import org.onlab.onos.cluster.MastershipService;
 import org.onlab.onos.net.DeviceId;
+import org.onlab.onos.net.device.DeviceMastershipService;
 
 import java.util.Collections;
 import java.util.List;
@@ -22,7 +23,7 @@
     @Override
     protected void execute() {
         ClusterService service = get(ClusterService.class);
-        MastershipService mastershipService = get(MastershipService.class);
+        DeviceMastershipService mastershipService = get(DeviceMastershipService.class);
         List<ControllerNode> nodes = newArrayList(service.getNodes());
         Collections.sort(nodes, Comparators.NODE_COMPARATOR);
         ControllerNode self = service.getLocalNode();
diff --git a/cli/src/main/java/org/onlab/onos/cli/net/DeviceRoleCommand.java b/cli/src/main/java/org/onlab/onos/cli/net/DeviceRoleCommand.java
index dfb8283..3418aa0 100644
--- a/cli/src/main/java/org/onlab/onos/cli/net/DeviceRoleCommand.java
+++ b/cli/src/main/java/org/onlab/onos/cli/net/DeviceRoleCommand.java
@@ -3,9 +3,9 @@
 import org.apache.karaf.shell.commands.Argument;
 import org.apache.karaf.shell.commands.Command;
 import org.onlab.onos.cli.AbstractShellCommand;
-import org.onlab.onos.cluster.MastershipAdminService;
 import org.onlab.onos.cluster.NodeId;
 import org.onlab.onos.net.MastershipRole;
+import org.onlab.onos.net.device.DeviceMastershipAdminService;
 
 import static org.onlab.onos.net.DeviceId.deviceId;
 
@@ -30,7 +30,7 @@
 
     @Override
     protected void execute() {
-        MastershipAdminService service = get(MastershipAdminService.class);
+        DeviceMastershipAdminService service = get(DeviceMastershipAdminService.class);
         MastershipRole mastershipRole = MastershipRole.valueOf(role.toUpperCase());
         service.setRole(new NodeId(node), deviceId(uri), mastershipRole);
     }