use of org.ovirt.engine.core.common.action.DeactivateStorageDomainWithOvfUpdateParameters in project ovirt-engine by oVirt.
the class DataCenterStorageListModel method onMaintenance.
public void onMaintenance() {
final ConfirmationModel confirmationModel = (ConfirmationModel) getWindow();
List<ActionParametersBase> pb = getSelectedItems().stream().map(sd -> new DeactivateStorageDomainWithOvfUpdateParameters(sd.getId(), getEntity().getId(), confirmationModel.getForce().getEntity())).collect(Collectors.toList());
confirmationModel.startProgress();
Frontend.getInstance().runMultipleAction(ActionType.DeactivateStorageDomainWithOvfUpdate, pb, result -> {
confirmationModel.stopProgress();
setWindow(null);
});
}
use of org.ovirt.engine.core.common.action.DeactivateStorageDomainWithOvfUpdateParameters in project ovirt-engine by oVirt.
the class StorageDataCenterListModel method onMaintenance.
private void onMaintenance() {
final ConfirmationModel confirmationModel = (ConfirmationModel) getWindow();
ArrayList<ActionParametersBase> list = new ArrayList<>();
for (StorageDomain item : getSelectedItems()) {
DeactivateStorageDomainWithOvfUpdateParameters parameters = new DeactivateStorageDomainWithOvfUpdateParameters();
parameters.setStorageDomainId(getEntity().getId());
parameters.setForceMaintenance(confirmationModel.getForce().getEntity());
if (item.getStoragePoolId() != null) {
parameters.setStoragePoolId(item.getStoragePoolId());
}
list.add(parameters);
}
confirmationModel.startProgress();
Frontend.getInstance().runMultipleAction(ActionType.DeactivateStorageDomainWithOvfUpdate, list, result -> {
confirmationModel.stopProgress();
setWindow(null);
}, null);
}
Aggregations