Revision 1ce03fb1 lib/opcodes.py

b/lib/opcodes.py
419 419

  
420 420
TNoRelativeJobDependencies = _BuildJobDepCheck(False)
421 421

  
422
#: List of submission status and job ID as returned by C{SubmitManyJobs}
423
TJobIdList = ht.TListOf(ht.TItems([ht.TBool, ht.TOr(ht.TString, ht.TJobId)]))
424

  
422 425

  
423 426
class OpCode(BaseOpCode):
424 427
  """Abstract OpCode.
......
433 436
                      method for details).
434 437
  @cvar OP_PARAMS: List of opcode attributes, the default values they should
435 438
                   get if not already defined, and types they must match.
439
  @cvar OP_RESULT: Callable to verify opcode result
436 440
  @cvar WITH_LU: Boolean that specifies whether this should be included in
437 441
      mcpu's dispatch table
438 442
  @ivar dry_run: Whether the LU should be run in dry-run mode, i.e. just
......
454 458
    (COMMENT_ATTR, None, ht.TMaybeString,
455 459
     "Comment describing the purpose of the opcode"),
456 460
    ]
461
  OP_RESULT = None
457 462

  
458 463
  def __getstate__(self):
459 464
    """Specialized getstate for opcodes.
......
595 600
  """Verify the cluster disks.
596 601

  
597 602
  """
603
  OP_RESULT = ht.TStrictDict(True, True, {
604
    constants.JOB_IDS_KEY: TJobIdList,
605
    })
598 606

  
599 607

  
600 608
class OpGroupVerifyDisks(OpCode):
......
619 627
  OP_PARAMS = [
620 628
    _PGroupName,
621 629
    ]
630
  OP_RESULT = \
631
    ht.TAnd(ht.TIsLength(3),
632
            ht.TItems([ht.TDictOf(ht.TString, ht.TString),
633
                       ht.TListOf(ht.TString),
634
                       ht.TDictOf(ht.TString, ht.TListOf(ht.TString))]))
622 635

  
623 636

  
624 637
class OpClusterRepairDiskSizes(OpCode):

Also available in: Unified diff