use of org.ovirt.engine.core.common.action.StorageJobCommandParameters in project ovirt-engine by oVirt.
the class SparsifyDiskModel method onSparsify.
public void onSparsify(final ICommandTarget target) {
List<ActionParametersBase> parameterList = new ArrayList<>();
for (Disk disk : disksToSparsify) {
ActionParametersBase parameters = new StorageJobCommandParameters(((DiskImage) disk).getImageId());
parameterList.add(parameters);
}
startProgress();
Frontend.getInstance().runMultipleAction(ActionType.SparsifyImage, parameterList, result -> {
stopProgress();
target.executeCommand(cancelCommand);
}, this);
}
use of org.ovirt.engine.core.common.action.StorageJobCommandParameters in project ovirt-engine by oVirt.
the class BackendDiskResource method sparsify.
@Override
public Response sparsify(Action action) {
Disk disk = get();
if (disk == null) {
throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND).build());
}
Guid imageId = getDiskImageId(disk.getImageId());
StorageJobCommandParameters params = new StorageJobCommandParameters(imageId);
return doAction(ActionType.SparsifyImage, params, action);
}
Aggregations