use of org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeGeoRepSessionVDSParameters in project ovirt-engine by oVirt.
the class ResumeGeoRepSessionVDSCommand method executeVdsBrokerCommand.
@Override
protected void executeVdsBrokerCommand() {
GlusterVolumeGeoRepSessionVDSParameters parameters = getParameters();
status = getBroker().glusterVolumeGeoRepSessionResume(parameters.getVolumeName(), parameters.getSlaveHost(), parameters.getSlaveVolume(), parameters.getUserName(), parameters.getForce());
proceedProxyReturnValue();
}
use of org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeGeoRepSessionVDSParameters in project ovirt-engine by oVirt.
the class ResumeGeoRepSessionCommand method executeCommand.
@Override
protected void executeCommand() {
GlusterGeoRepSession session = getGeoRepSession();
VDSReturnValue returnValue = runVdsCommand(VDSCommandType.ResumeGeoRepSession, new GlusterVolumeGeoRepSessionVDSParameters(upServer.getId(), session.getMasterVolumeName(), session.getSlaveHostName(), session.getSlaveVolumeName(), session.getUserName(), parameters.isForce()));
setSucceeded(returnValue.getSucceeded());
if (!getSucceeded()) {
handleVdsError(AuditLogType.GLUSTER_VOLUME_GEO_REP_RESUME_FAILED, returnValue.getVdsError().getMessage());
return;
}
}
use of org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeGeoRepSessionVDSParameters in project ovirt-engine by oVirt.
the class PauseGlusterVolumeGeoRepSessionCommand method executeCommand.
@Override
protected void executeCommand() {
GlusterGeoRepSession session = getGeoRepSession();
VDSReturnValue returnValue = runVdsCommand(VDSCommandType.PauseGlusterVolumeGeoRepSession, new GlusterVolumeGeoRepSessionVDSParameters(upServer.getId(), session.getMasterVolumeName(), session.getSlaveHostName(), session.getSlaveVolumeName(), session.getUserName(), getParameters().isForce()));
setSucceeded(returnValue.getSucceeded());
if (!getSucceeded()) {
handleVdsError(AuditLogType.GLUSTER_VOLUME_GEO_REP_PAUSE_FAILED, returnValue.getVdsError().getMessage());
return;
} else {
session.setStatus(GeoRepSessionStatus.PAUSED);
glusterGeoRepDao.updateSession(session);
}
}
use of org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeGeoRepSessionVDSParameters in project ovirt-engine by oVirt.
the class StopGeoRepSessionCommand method executeCommand.
@Override
protected void executeCommand() {
VDSReturnValue returnValue = runVdsCommand(VDSCommandType.StopGlusterVolumeGeoRepSession, new GlusterVolumeGeoRepSessionVDSParameters(upServer.getId(), getGeoRepSession().getMasterVolumeName(), getGeoRepSession().getSlaveHostName(), getGeoRepSession().getSlaveVolumeName(), getGeoRepSession().getUserName(), getParameters().isForce()));
setSucceeded(returnValue.getSucceeded());
if (getSucceeded()) {
getGeoRepSession().setStatus(GeoRepSessionStatus.STOPPED);
glusterGeoRepDao.updateSession(getGeoRepSession());
} else {
handleVdsError(AuditLogType.GEOREP_SESSION_STOP_FAILED, returnValue.getVdsError().getMessage());
}
}
use of org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeGeoRepSessionVDSParameters in project ovirt-engine by oVirt.
the class GetGlusterVolumeGeoRepSessionListVDSCommand method executeVdsBrokerCommand.
@Override
protected void executeVdsBrokerCommand() {
GlusterVolumeGeoRepSessionVDSParameters parameter = getParameters();
if (parameter.getVolumeName() == null) {
result = getBroker().glusterVolumeGeoRepSessionList();
} else if (parameter.getSlaveHost() == null || parameter.getSlaveVolume() == null) {
result = getBroker().glusterVolumeGeoRepSessionList(parameter.getVolumeName());
} else {
result = getBroker().glusterVolumeGeoRepSessionList(parameter.getVolumeName(), parameter.getSlaveHost(), parameter.getSlaveVolume(), parameter.getUserName());
}
proceedProxyReturnValue();
if (getVDSReturnValue().getSucceeded()) {
setReturnValue(result.getGeoRepSessions());
}
}
Aggregations