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;
}
}
Aggregations