use of org.ovirt.engine.core.common.action.gluster.GlusterVolumeRebalanceParameters in project ovirt-engine by oVirt.
the class VolumeListModel method onStopRebalance.
private void onStopRebalance() {
ConfirmationModel model = (ConfirmationModel) getConfirmWindow();
if (model.getProgress() != null) {
return;
}
if (getSelectedItems() == null) {
return;
}
model.startProgress();
final GlusterVolumeEntity volumeEntity = getSelectedItem();
GlusterVolumeRebalanceParameters param = new GlusterVolumeRebalanceParameters(volumeEntity.getId(), false, false);
Frontend.getInstance().runAction(ActionType.StopRebalanceGlusterVolume, param, result -> {
ConfirmationModel localModel = (ConfirmationModel) getConfirmWindow();
localModel.stopProgress();
setConfirmWindow(null);
if (result.getReturnValue().getSucceeded()) {
showRebalanceStatus();
}
});
}
use of org.ovirt.engine.core.common.action.gluster.GlusterVolumeRebalanceParameters in project ovirt-engine by oVirt.
the class VolumeListModel method startRebalance.
private void startRebalance() {
if (getSelectedItems() == null) {
return;
}
ArrayList<ActionParametersBase> list = new ArrayList<>();
for (Object item : getSelectedItems()) {
GlusterVolumeEntity volume = (GlusterVolumeEntity) item;
list.add(new GlusterVolumeRebalanceParameters(volume.getId(), false, false));
}
Frontend.getInstance().runMultipleAction(ActionType.StartRebalanceGlusterVolume, list, null, true, true);
}
use of org.ovirt.engine.core.common.action.gluster.GlusterVolumeRebalanceParameters in project ovirt-engine by oVirt.
the class BackendGlusterVolumeResource method rebalance.
@Override
public Response rebalance(Action action) {
boolean fixLayoutOnly = action.isSetFixLayout() ? action.isFixLayout() : false;
boolean force = action.isSetForce() ? action.isForce() : false;
return doAction(ActionType.StartRebalanceGlusterVolume, new GlusterVolumeRebalanceParameters(guid, fixLayoutOnly, force), action);
}
Aggregations