Committed by
Gerrit Code Review
Block on the future in device-role CLI command
Change-Id: I20e3784a39eb79b8cfb50a60a5b27185c98c5163
Showing
1 changed file
with
3 additions
and
1 deletions
| ... | @@ -22,6 +22,8 @@ import org.onosproject.cluster.NodeId; | ... | @@ -22,6 +22,8 @@ import org.onosproject.cluster.NodeId; |
| 22 | import org.onosproject.mastership.MastershipAdminService; | 22 | import org.onosproject.mastership.MastershipAdminService; |
| 23 | import org.onosproject.net.MastershipRole; | 23 | import org.onosproject.net.MastershipRole; |
| 24 | 24 | ||
| 25 | +import com.google.common.util.concurrent.Futures; | ||
| 26 | + | ||
| 25 | import static org.onosproject.net.DeviceId.deviceId; | 27 | import static org.onosproject.net.DeviceId.deviceId; |
| 26 | 28 | ||
| 27 | /** | 29 | /** |
| ... | @@ -47,7 +49,7 @@ public class DeviceRoleCommand extends AbstractShellCommand { | ... | @@ -47,7 +49,7 @@ public class DeviceRoleCommand extends AbstractShellCommand { |
| 47 | protected void execute() { | 49 | protected void execute() { |
| 48 | MastershipAdminService service = get(MastershipAdminService.class); | 50 | MastershipAdminService service = get(MastershipAdminService.class); |
| 49 | MastershipRole mastershipRole = MastershipRole.valueOf(role.toUpperCase()); | 51 | MastershipRole mastershipRole = MastershipRole.valueOf(role.toUpperCase()); |
| 50 | - service.setRole(new NodeId(node), deviceId(uri), mastershipRole); | 52 | + Futures.getUnchecked(service.setRole(new NodeId(node), deviceId(uri), mastershipRole)); |
| 51 | } | 53 | } |
| 52 | 54 | ||
| 53 | } | 55 | } | ... | ... |
-
Please register or login to post a comment