Revision 35049ff2 lib/opcodes.py

b/lib/opcodes.py
74 74

  
75 75

  
76 76
class Job(BaseJO):
77
  """Job definition structure"""
77
  """Job definition structure
78

  
79
  The Job definitions has two sets of parameters:
80
    - the parameters of the job itself (all filled by server):
81
      - job_id,
82
      - status: pending, running, successfull, failed, aborted
83
    - opcode parameters:
84
      - op_list, list of opcodes, clients creates this
85
      - op_status, status for each opcode, server fills in
86
      - op_result, result for each opcode, server fills in
87

  
88
  """
78 89
  STATUS_PENDING = 1
79 90
  STATUS_RUNNING = 2
80
  STATUS_FINISHED = 3
81
  RESULT_OK = 1
82
  RESULT_FAIL = 2
83
  RESULT_ABORT = 3
91
  STATUS_SUCCESS = 3
92
  STATUS_FAIL = 4
93
  STATUS_ABORT = 5
84 94

  
85
  __slots__ = ["job_id", "op_list", "status", "result"]
95
  __slots__ = [
96
    "job_id",
97
    "status",
98
    "op_list",
99
    "op_status",
100
    "op_result",
101
    ]
86 102

  
87 103
  def __getstate__(self):
88 104
    """Specialized getstate for jobs

Also available in: Unified diff