Search in sources :

Example 6 with GlusterVolumeActionParameters

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

the class ScheduleGlusterVolumeSnapshotCommand method checkAndDisableCliScheduler.

private boolean checkAndDisableCliScheduler() {
    GlusterVolumeEntity metaVolume = glusterVolumeDao.getByName(getClusterId(), Config.getValue(ConfigValues.GlusterMetaVolumeName));
    Cluster cluster = getCluster();
    if (metaVolume != null && cluster.isGlusterCliBasedSchedulingOn()) {
        ActionReturnValue returnValue = runInternalAction(ActionType.DisableGlusterCliSnapshotScheduleInternal, new GlusterVolumeActionParameters(getGlusterVolumeId(), true));
        if (!returnValue.getSucceeded()) {
            handleVdsErrors(AuditLogType.GLUSTER_CLI_SNAPSHOT_SCHEDULE_DISABLE_FAILED, returnValue.getExecuteFailedMessages());
        }
        return returnValue.getSucceeded();
    }
    return true;
}
Also used : ActionReturnValue(org.ovirt.engine.core.common.action.ActionReturnValue) GlusterVolumeEntity(org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity) Cluster(org.ovirt.engine.core.common.businessentities.Cluster) GlusterVolumeActionParameters(org.ovirt.engine.core.common.action.gluster.GlusterVolumeActionParameters)

Aggregations

GlusterVolumeActionParameters (org.ovirt.engine.core.common.action.gluster.GlusterVolumeActionParameters)6 GlusterVolumeEntity (org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity)4 ArrayList (java.util.ArrayList)3 ActionParametersBase (org.ovirt.engine.core.common.action.ActionParametersBase)3 ActionReturnValue (org.ovirt.engine.core.common.action.ActionReturnValue)3 ConfirmationModel (org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel)3 Cluster (org.ovirt.engine.core.common.businessentities.Cluster)1 VolumeStatus (org.ovirt.engine.ui.frontend.utils.GlusterVolumeUtils.VolumeStatus)1