Search in sources :

Example 1 with ReplaceGlusterVolumeBrickActionVDSParameters

use of org.ovirt.engine.core.common.vdscommands.gluster.ReplaceGlusterVolumeBrickActionVDSParameters in project ovirt-engine by oVirt.

the class ReplaceGlusterVolumeBrickCommand method executeCommand.

@Override
protected void executeCommand() {
    VDSReturnValue returnValue = runVdsCommand(VDSCommandType.ReplaceGlusterVolumeBrick, new ReplaceGlusterVolumeBrickActionVDSParameters(upServer.getId(), getGlusterVolumeName(), getParameters().getExistingBrick().getQualifiedName(), getParameters().getNewBrick().getQualifiedName()));
    setSucceeded(returnValue.getSucceeded());
    if (getSucceeded()) {
        getParameters().getNewBrick().setStatus(getParameters().getExistingBrick().getStatus());
        glusterBrickDao.replaceBrick(getParameters().getExistingBrick(), getParameters().getNewBrick());
    } else {
        handleVdsError(AuditLogType.GLUSTER_VOLUME_REPLACE_BRICK_FAILED, returnValue.getVdsError().getMessage());
        return;
    }
}
Also used : ReplaceGlusterVolumeBrickActionVDSParameters(org.ovirt.engine.core.common.vdscommands.gluster.ReplaceGlusterVolumeBrickActionVDSParameters) VDSReturnValue(org.ovirt.engine.core.common.vdscommands.VDSReturnValue)

Aggregations

VDSReturnValue (org.ovirt.engine.core.common.vdscommands.VDSReturnValue)1 ReplaceGlusterVolumeBrickActionVDSParameters (org.ovirt.engine.core.common.vdscommands.gluster.ReplaceGlusterVolumeBrickActionVDSParameters)1