Madan Jampani
Committed by Gerrit Code Review

Block on the future in device-role CLI command

Change-Id: I20e3784a39eb79b8cfb50a60a5b27185c98c5163
......@@ -22,6 +22,8 @@ import org.onosproject.cluster.NodeId;
import org.onosproject.mastership.MastershipAdminService;
import org.onosproject.net.MastershipRole;
import com.google.common.util.concurrent.Futures;
import static org.onosproject.net.DeviceId.deviceId;
/**
......@@ -47,7 +49,7 @@ public class DeviceRoleCommand extends AbstractShellCommand {
protected void execute() {
MastershipAdminService service = get(MastershipAdminService.class);
MastershipRole mastershipRole = MastershipRole.valueOf(role.toUpperCase());
service.setRole(new NodeId(node), deviceId(uri), mastershipRole);
Futures.getUnchecked(service.setRole(new NodeId(node), deviceId(uri), mastershipRole));
}
}
......