use of org.ovirt.engine.core.common.action.StorageDomainParametersBase in project ovirt-engine by oVirt.
the class StorageListModel method updateOvfs.
private void updateOvfs() {
StorageDomain storage = getSelectedItem();
if (storage != null) {
StorageDomainParametersBase params = new StorageDomainParametersBase(storage.getId());
Frontend.getInstance().runAction(ActionType.UpdateOvfStoreForStorageDomain, params, null, this);
}
cancel();
}
use of org.ovirt.engine.core.common.action.StorageDomainParametersBase in project ovirt-engine by oVirt.
the class BackendStorageDomainResource method remove.
@Override
public Response remove() {
boolean destroy = ParametersHelper.getBooleanParameter(httpHeaders, uriInfo, DESTROY, true, false);
get();
if (destroy) {
StorageDomainParametersBase parameters = new StorageDomainParametersBase(guid);
return performAction(ActionType.ForceRemoveStorageDomain, parameters);
} else {
String host = ParametersHelper.getParameter(httpHeaders, uriInfo, HOST);
if (host == null) {
Fault fault = new Fault();
fault.setReason("host parameter is missing");
throw new WebApplicationException(Response.status(Status.BAD_REQUEST).entity(fault).build());
}
boolean format = ParametersHelper.getBooleanParameter(httpHeaders, uriInfo, FORMAT, true, false);
Guid hostId = getHostId(host);
RemoveStorageDomainParameters parameters = new RemoveStorageDomainParameters(guid);
parameters.setVdsId(hostId);
parameters.setDoFormat(format);
return performAction(ActionType.RemoveStorageDomain, parameters);
}
}
use of org.ovirt.engine.core.common.action.StorageDomainParametersBase in project ovirt-engine by oVirt.
the class DeactivateStorageDomainWithOvfUpdateCommand method createUpdateOvfStoreParams.
private StorageDomainParametersBase createUpdateOvfStoreParams() {
StorageDomainParametersBase params = new StorageDomainParametersBase(getStorageDomainId());
params.setParentCommand(getActionType());
params.setParentParameters(getParameters());
params.setEndProcedure(EndProcedure.COMMAND_MANAGED);
return params;
}
use of org.ovirt.engine.core.common.action.StorageDomainParametersBase in project ovirt-engine by oVirt.
the class StorageListModel method onDestroy.
private void onDestroy() {
ConfirmationModel model = (ConfirmationModel) getWindow();
if (model.getProgress() != null) {
return;
}
if (!model.validate()) {
return;
}
StorageDomain storageDomain = getSelectedItem();
model.startProgress();
Frontend.getInstance().runMultipleAction(ActionType.ForceRemoveStorageDomain, new ArrayList<>(Arrays.asList(new ActionParametersBase[] { new StorageDomainParametersBase(storageDomain.getId()) })), result -> {
ConfirmationModel localModel = (ConfirmationModel) result.getState();
localModel.stopProgress();
cancel();
}, model);
}
Aggregations