use of org.ovirt.engine.core.common.action.FenceVdsManualyParameters in project ovirt-engine by oVirt.
the class HostListModel method onManualFence.
public void onManualFence() {
ConfirmationModel model = (ConfirmationModel) getWindow();
if (model.getProgress() != null) {
return;
}
if (!model.validate()) {
return;
}
ArrayList<ActionParametersBase> list = new ArrayList<>();
for (Object item : getSelectedItems()) {
VDS vds = (VDS) item;
FenceVdsManualyParameters parameters = new FenceVdsManualyParameters(true);
parameters.setStoragePoolId(vds.getStoragePoolId());
parameters.setVdsId(vds.getId());
list.add(parameters);
}
model.startProgress();
Frontend.getInstance().runMultipleAction(ActionType.FenceVdsManualy, list, result -> {
ConfirmationModel localModel = (ConfirmationModel) result.getState();
localModel.stopProgress();
cancel();
}, model);
}
use of org.ovirt.engine.core.common.action.FenceVdsManualyParameters in project ovirt-engine by oVirt.
the class BackendHostResource method fenceManually.
private Response fenceManually(Action action) {
FenceVdsManualyParameters params = new FenceVdsManualyParameters(true);
params.setVdsId(guid);
params.setStoragePoolId(getEntity().getStoragePoolId());
return doAction(ActionType.FenceVdsManualy, params, action);
}
use of org.ovirt.engine.core.common.action.FenceVdsManualyParameters in project ovirt-engine by oVirt.
the class RestartVdsCommand method executeFenceVdsManuallyAction.
private void executeFenceVdsManuallyAction(final Guid vdsId, String sessionId) {
FenceVdsManualyParameters fenceVdsManuallyParams = new FenceVdsManualyParameters(true);
fenceVdsManuallyParams.setStoragePoolId(getVds().getStoragePoolId());
fenceVdsManuallyParams.setVdsId(vdsId);
fenceVdsManuallyParams.setSessionId(sessionId);
fenceVdsManuallyParams.setParentCommand(ActionType.RestartVds);
// if fencing succeeded, call to reset irs in order to try select new spm
runInternalAction(ActionType.FenceVdsManualy, fenceVdsManuallyParams, getContext());
}
use of org.ovirt.engine.core.common.action.FenceVdsManualyParameters in project ovirt-engine by oVirt.
the class VdsKdumpDetectionCommand method executeFenceVdsManuallyAction.
private void executeFenceVdsManuallyAction() {
FenceVdsManualyParameters fenceVdsManuallyParams = new FenceVdsManualyParameters(false);
fenceVdsManuallyParams.setStoragePoolId(getVds().getStoragePoolId());
fenceVdsManuallyParams.setVdsId(getVdsId());
fenceVdsManuallyParams.setSessionId(getParameters().getSessionId());
fenceVdsManuallyParams.setParentCommand(ActionType.RestartVds);
// if fencing succeeded, call to reset irs in order to try select new spm
runInternalAction(ActionType.FenceVdsManualy, fenceVdsManuallyParams, getContext());
}
Aggregations