use of org.ovirt.engine.core.common.action.ActionParametersBase in project ovirt-engine by oVirt.
the class HostListModel method onStop.
public void onStop() {
ConfirmationModel model = (ConfirmationModel) getConfirmWindow();
if (model.getProgress() != null) {
return;
}
ArrayList<ActionParametersBase> list = new ArrayList<>();
for (Object item : getSelectedItems()) {
VDS vds = (VDS) item;
list.add(new FenceVdsActionParameters(vds.getId()));
}
model.startProgress();
Frontend.getInstance().runMultipleAction(ActionType.StopVds, list, result -> {
ConfirmationModel localModel = (ConfirmationModel) result.getState();
localModel.stopProgress();
cancelConfirm();
}, model);
}
use of org.ovirt.engine.core.common.action.ActionParametersBase in project ovirt-engine by oVirt.
the class HostListModel method start.
public void start() {
ArrayList<ActionParametersBase> list = new ArrayList<>();
for (Object item : getSelectedItems()) {
VDS vds = (VDS) item;
list.add(new FenceVdsActionParameters(vds.getId()));
}
Frontend.getInstance().runMultipleAction(ActionType.StartVds, list, result -> {
}, null);
}
use of org.ovirt.engine.core.common.action.ActionParametersBase in project ovirt-engine by oVirt.
the class HostListModel method onManualFence.
public void onManualFence() {
ConfirmationModel model = (ConfirmationModel) getWindow();
if (model.getProgress() != null) {
return;
}
if (!model.validate()) {
return;
}
ArrayList<ActionParametersBase> list = new ArrayList<>();
for (Object item : getSelectedItems()) {
VDS vds = (VDS) item;
FenceVdsManualyParameters parameters = new FenceVdsManualyParameters(true);
parameters.setStoragePoolId(vds.getStoragePoolId());
parameters.setVdsId(vds.getId());
list.add(parameters);
}
model.startProgress();
Frontend.getInstance().runMultipleAction(ActionType.FenceVdsManualy, list, result -> {
ConfirmationModel localModel = (ConfirmationModel) result.getState();
localModel.stopProgress();
cancel();
}, model);
}
use of org.ovirt.engine.core.common.action.ActionParametersBase in project ovirt-engine by oVirt.
the class HostListModel method refreshCapabilities.
private void refreshCapabilities() {
ArrayList<ActionParametersBase> list = new ArrayList<>();
for (Object item : getSelectedItems()) {
VDS vds = (VDS) item;
list.add(new VdsActionParameters(vds.getId()));
}
Frontend.getInstance().runMultipleAction(ActionType.RefreshHost, list, result -> {
}, null);
}
use of org.ovirt.engine.core.common.action.ActionParametersBase in project ovirt-engine by oVirt.
the class SharedMacPoolListModel method onRemove.
private void onRemove() {
cancel();
ArrayList<ActionParametersBase> params = new ArrayList<>();
for (MacPool macPool : getSelectedItems()) {
params.add(new RemoveMacPoolByIdParameters(macPool.getId()));
}
Frontend.getInstance().runMultipleAction(ActionType.RemoveMacPool, params);
}
Aggregations