예제 #1
0
파일: api.py 프로젝트: igoihman/vdsm
def snapshotScheduleDisable():
    command = [_snapSchedulerPath.cmd, "disable_force"]
    rc, out, err = commands.execCmd(command)
    if rc not in [0, SNAP_SCHEDULER_ALREADY_DISABLED_RC]:
        raise ge.GlusterDisableSnapshotScheduleFailedException(
            rc)
    return True
예제 #2
0
파일: api.py 프로젝트: dong-df/vdsm
def snapshotScheduleDisable():
    command = [_snapSchedulerPath.cmd, "disable_force"]
    try:
        commands.run(command)
    except cmdutils.Error as e:
        if e.rc != SNAP_SCHEDULER_ALREADY_DISABLED_RC:
            raise ge.GlusterDisableSnapshotScheduleFailedException(e.rc)
    return True