Revision 83c046a2 lib/luxi.py

b/lib/luxi.py
1 1
#
2 2
#
3 3

  
4
# Copyright (C) 2006, 2007, 2011 Google Inc.
4
# Copyright (C) 2006, 2007, 2011, 2012 Google Inc.
5 5
#
6 6
# This program is free software; you can redistribute it and/or modify
7 7
# it under the terms of the GNU General Public License as published by
......
53 53
REQ_WAIT_FOR_JOB_CHANGE = "WaitForJobChange"
54 54
REQ_CANCEL_JOB = "CancelJob"
55 55
REQ_ARCHIVE_JOB = "ArchiveJob"
56
REQ_AUTOARCHIVE_JOBS = "AutoArchiveJobs"
56
REQ_AUTO_ARCHIVE_JOBS = "AutoArchiveJobs"
57 57
REQ_QUERY = "Query"
58 58
REQ_QUERY_FIELDS = "QueryFields"
59 59
REQ_QUERY_JOBS = "QueryJobs"
......
64 64
REQ_QUERY_CONFIG_VALUES = "QueryConfigValues"
65 65
REQ_QUERY_CLUSTER_INFO = "QueryClusterInfo"
66 66
REQ_QUERY_TAGS = "QueryTags"
67
REQ_QUEUE_SET_DRAIN_FLAG = "SetDrainFlag"
67
REQ_SET_DRAIN_FLAG = "SetDrainFlag"
68 68
REQ_SET_WATCHER_PAUSE = "SetWatcherPause"
69 69

  
70 70
#: List of all LUXI requests
71 71
REQ_ALL = frozenset([
72 72
  REQ_ARCHIVE_JOB,
73
  REQ_AUTOARCHIVE_JOBS,
73
  REQ_AUTO_ARCHIVE_JOBS,
74 74
  REQ_CANCEL_JOB,
75 75
  REQ_QUERY,
76 76
  REQ_QUERY_CLUSTER_INFO,
......
82 82
  REQ_QUERY_JOBS,
83 83
  REQ_QUERY_NODES,
84 84
  REQ_QUERY_TAGS,
85
  REQ_QUEUE_SET_DRAIN_FLAG,
85
  REQ_SET_DRAIN_FLAG,
86 86
  REQ_SET_WATCHER_PAUSE,
87 87
  REQ_SUBMIT_JOB,
88 88
  REQ_SUBMIT_MANY_JOBS,
......
466 466
                          version=constants.LUXI_VERSION)
467 467

  
468 468
  def SetQueueDrainFlag(self, drain_flag):
469
    return self.CallMethod(REQ_QUEUE_SET_DRAIN_FLAG, (drain_flag, ))
469
    return self.CallMethod(REQ_SET_DRAIN_FLAG, (drain_flag, ))
470 470

  
471 471
  def SetWatcherPause(self, until):
472 472
    return self.CallMethod(REQ_SET_WATCHER_PAUSE, (until, ))
......
489 489

  
490 490
  def AutoArchiveJobs(self, age):
491 491
    timeout = (DEF_RWTO - 1) / 2
492
    return self.CallMethod(REQ_AUTOARCHIVE_JOBS, (age, timeout))
492
    return self.CallMethod(REQ_AUTO_ARCHIVE_JOBS, (age, timeout))
493 493

  
494 494
  def WaitForJobChangeOnce(self, job_id, fields,
495 495
                           prev_job_info, prev_log_serial,

Also available in: Unified diff