use of org.ovirt.engine.core.common.action.ActionParametersBase in project ovirt-engine by oVirt.
the class PoolVmListModel method onDetach.
public void onDetach() {
ConfirmationModel model = (ConfirmationModel) getConfirmWindow();
boolean latchChecked = !model.validate();
if (model.getProgress() != null || latchChecked) {
return;
}
ArrayList<ActionParametersBase> list = new ArrayList<>();
for (Object item : getSelectedItems()) {
VM vm = (VM) item;
list.add(new RemoveVmFromPoolParameters(vm.getId(), true, true));
}
model.startProgress();
Frontend.getInstance().runMultipleAction(ActionType.RemoveVmFromPool, 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 VmListModel method cancelMigration.
private void cancelMigration() {
ArrayList<ActionParametersBase> list = new ArrayList<>();
for (Object item : getSelectedItems()) {
VM a = (VM) item;
list.add(new VmOperationParameterBase(a.getId()));
}
Frontend.getInstance().runMultipleAction(ActionType.CancelMigrateVm, list, result -> {
}, null);
}
use of org.ovirt.engine.core.common.action.ActionParametersBase in project ovirt-engine by oVirt.
the class VmListModel method cancelConversion.
private void cancelConversion() {
List<ActionParametersBase> parameters = new ArrayList<>();
for (VM vm : getSelectedItems()) {
parameters.add(new VmOperationParameterBase(vm.getId()));
}
Frontend.getInstance().runMultipleAction(ActionType.CancelConvertVm, parameters);
}
use of org.ovirt.engine.core.common.action.ActionParametersBase in project ovirt-engine by oVirt.
the class VmListModel method run.
private void run() {
ArrayList<ActionParametersBase> list = new ArrayList<>();
for (Object item : getSelectedItems()) {
VM a = (VM) item;
list.add(new RunVmParams(a.getId()));
}
Frontend.getInstance().runMultipleAction(ActionType.RunVm, list, result -> {
}, null);
}
use of org.ovirt.engine.core.common.action.ActionParametersBase in project ovirt-engine by oVirt.
the class VmListModel method pause.
private void pause() {
ArrayList<ActionParametersBase> list = new ArrayList<>();
for (Object item : getSelectedItems()) {
VM a = (VM) item;
list.add(new VmOperationParameterBase(a.getId()));
}
Frontend.getInstance().runMultipleAction(ActionType.HibernateVm, list, result -> {
}, null);
}
Aggregations