Search in sources :

Example 1 with FenceVolumeJobCommandParameters

use of org.ovirt.engine.core.common.action.FenceVolumeJobCommandParameters in project ovirt-engine by oVirt.

the class AmendVolumeCommand method attemptToFenceJob.

@Override
public void attemptToFenceJob() {
    VdsmImageLocationInfo info = (VdsmImageLocationInfo) getParameters().getVolInfo();
    FenceVolumeJobCommandParameters parameters = new FenceVolumeJobCommandParameters(info);
    parameters.setParentCommand(getActionType());
    parameters.setParentParameters(getParameters());
    parameters.setStoragePoolId(getParameters().getStoragePoolId());
    parameters.setEndProcedure(ActionParametersBase.EndProcedure.COMMAND_MANAGED);
    runInternalActionWithTasksContext(ActionType.FenceVolumeJob, parameters);
}
Also used : FenceVolumeJobCommandParameters(org.ovirt.engine.core.common.action.FenceVolumeJobCommandParameters) VdsmImageLocationInfo(org.ovirt.engine.core.common.businessentities.VdsmImageLocationInfo)

Example 2 with FenceVolumeJobCommandParameters

use of org.ovirt.engine.core.common.action.FenceVolumeJobCommandParameters in project ovirt-engine by oVirt.

the class UpdateVolumeCommand method attemptToFenceJob.

@Override
public void attemptToFenceJob() {
    log.info("Command {} id: '{}': attempting to fence job {}", getActionType(), getCommandId(), getJobId());
    VdsmImageLocationInfo info = getParameters().getVolInfo();
    FenceVolumeJobCommandParameters p = new FenceVolumeJobCommandParameters(info);
    p.setParentCommand(getActionType());
    p.setParentParameters(getParameters());
    p.setStoragePoolId(getParameters().getStoragePoolId());
    p.setEndProcedure(ActionParametersBase.EndProcedure.COMMAND_MANAGED);
    runInternalActionWithTasksContext(ActionType.FenceVolumeJob, p);
}
Also used : FenceVolumeJobCommandParameters(org.ovirt.engine.core.common.action.FenceVolumeJobCommandParameters) VdsmImageLocationInfo(org.ovirt.engine.core.common.businessentities.VdsmImageLocationInfo)

Example 3 with FenceVolumeJobCommandParameters

use of org.ovirt.engine.core.common.action.FenceVolumeJobCommandParameters in project ovirt-engine by oVirt.

the class ColdMergeCommand method attemptToFenceJob.

@Override
public void attemptToFenceJob() {
    SubchainInfo info = getParameters().getSubchainInfo();
    VdsmImageLocationInfo locationInfo = new VdsmImageLocationInfo(info.getStorageDomainId(), info.getImageGroupId(), info.getBaseImageId(), info.getBaseImageGeneration());
    FenceVolumeJobCommandParameters parameters = new FenceVolumeJobCommandParameters(locationInfo);
    parameters.setParentCommand(getActionType());
    parameters.setParentParameters(getParameters());
    parameters.setStoragePoolId(getParameters().getStoragePoolId());
    parameters.setEndProcedure(ActionParametersBase.EndProcedure.COMMAND_MANAGED);
    runInternalActionWithTasksContext(ActionType.FenceVolumeJob, parameters);
}
Also used : FenceVolumeJobCommandParameters(org.ovirt.engine.core.common.action.FenceVolumeJobCommandParameters) SubchainInfo(org.ovirt.engine.core.common.businessentities.SubchainInfo) VdsmImageLocationInfo(org.ovirt.engine.core.common.businessentities.VdsmImageLocationInfo)

Example 4 with FenceVolumeJobCommandParameters

use of org.ovirt.engine.core.common.action.FenceVolumeJobCommandParameters in project ovirt-engine by oVirt.

the class CopyDataCommand method attemptToFenceJob.

@Override
public void attemptToFenceJob() {
    if (isDstVdsmImage()) {
        log.info("Command {} id: '{}': attempting to fence job {}", getActionType(), getCommandId(), getJobId());
        VdsmImageLocationInfo info = (VdsmImageLocationInfo) getParameters().getDstInfo();
        FenceVolumeJobCommandParameters p = new FenceVolumeJobCommandParameters(info);
        p.setParentCommand(getActionType());
        p.setParentParameters(getParameters());
        p.setStoragePoolId(getParameters().getStoragePoolId());
        p.setEndProcedure(EndProcedure.COMMAND_MANAGED);
        runInternalActionWithTasksContext(ActionType.FenceVolumeJob, p);
    }
}
Also used : FenceVolumeJobCommandParameters(org.ovirt.engine.core.common.action.FenceVolumeJobCommandParameters) VdsmImageLocationInfo(org.ovirt.engine.core.common.businessentities.VdsmImageLocationInfo)

Aggregations

FenceVolumeJobCommandParameters (org.ovirt.engine.core.common.action.FenceVolumeJobCommandParameters)4 VdsmImageLocationInfo (org.ovirt.engine.core.common.businessentities.VdsmImageLocationInfo)4 SubchainInfo (org.ovirt.engine.core.common.businessentities.SubchainInfo)1