use of org.ovirt.engine.core.common.action.CreateSnapshotForVmParameters in project ovirt-engine by oVirt.
the class SnapshotModel method onSave.
public void onSave() {
if (getProgress() != null || !validate()) {
return;
}
startProgress();
VM vm = getVm();
ArrayList<ActionParametersBase> params = new ArrayList<>();
Set<Guid> snapshotDisksIds = null;
if (getSnapshotDisks().getSelectedItems() != null) {
snapshotDisksIds = getSnapshotDisks().getSelectedItems().stream().map(BaseDisk::getId).collect(Collectors.toSet());
}
CreateSnapshotForVmParameters param = new CreateSnapshotForVmParameters(vm.getId(), getDescription().getEntity(), getMemory().getEntity(), snapshotDisksIds);
param.setQuotaId(vm.getQuotaId());
params.add(param);
Frontend.getInstance().runMultipleAction(ActionType.CreateSnapshotForVm, params, result -> {
SnapshotModel localModel = (SnapshotModel) result.getState();
localModel.stopProgress();
getCancelCommand().execute();
}, this);
}
Aggregations