use of org.ovirt.engine.core.common.action.RemoveDiskSnapshotsParameters in project ovirt-engine by oVirt.
the class StorageSnapshotListModel method onRemove.
private void onRemove() {
ConfirmationModel model = (ConfirmationModel) getWindow();
ArrayList<ActionParametersBase> paramerterList = new ArrayList<>();
Map<Guid, List<Guid>> diskImageIdsMap = groupImageIdsByDiskId(getSelectedItems());
for (List<Guid> imageIds : diskImageIdsMap.values()) {
RemoveDiskSnapshotsParameters parameters = new RemoveDiskSnapshotsParameters(new ArrayList<>(imageIds));
paramerterList.add(parameters);
}
model.startProgress();
Frontend.getInstance().runMultipleAction(ActionType.RemoveDiskSnapshots, paramerterList, result -> {
StorageSnapshotListModel localModel = (StorageSnapshotListModel) result.getState();
localModel.stopProgress();
cancel();
}, this);
}
use of org.ovirt.engine.core.common.action.RemoveDiskSnapshotsParameters in project ovirt-engine by oVirt.
the class RemoveDiskSnapshotsCommandTest method createCommand.
private static RemoveDiskSnapshotsCommand<RemoveDiskSnapshotsParameters> createCommand() {
RemoveDiskSnapshotsParameters params = new RemoveDiskSnapshotsParameters(new ArrayList<>(Arrays.asList(IMAGE_ID_1, IMAGE_ID_2)));
Guid vmGuid = Guid.newGuid();
params.setContainerId(vmGuid);
return new RemoveDiskSnapshotsCommand<>(params, null);
}
Aggregations