From 3aa8ed2ba0e5d9642a5cf0a6b6d7f7c992acd4fa Mon Sep 17 00:00:00 2001 From: Michael Hanselmann <hansmi@google.com> Date: Fri, 27 May 2011 12:50:15 +0200 Subject: [PATCH] Add opcode attribute for chained jobs Signed-off-by: Michael Hanselmann <hansmi@google.com> Reviewed-by: Iustin Pop <iustin@google.com> --- lib/opcodes.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/opcodes.py b/lib/opcodes.py index e1d40ad28..11a1ac2dd 100644 --- a/lib/opcodes.py +++ b/lib/opcodes.py @@ -413,11 +413,17 @@ class OpCode(BaseOpCode): # pylint: disable-msg=E1101 # as OP_ID is dynamically defined WITH_LU = True + _T_JOB_DEP = \ + ht.TAnd(ht.TIsLength(2), + ht.TItems([ht.TJobId, + ht.TListOf(ht.TElemOf(constants.JOBS_FINALIZED))])) OP_PARAMS = [ ("dry_run", None, ht.TMaybeBool, "Run checks only, don't execute"), ("debug_level", None, ht.TOr(ht.TNone, ht.TPositiveInt), "Debug level"), ("priority", constants.OP_PRIO_DEFAULT, ht.TElemOf(constants.OP_PRIO_SUBMIT_VALID), "Opcode priority"), + ("depends", None, ht.TOr(ht.TNone, ht.TListOf(_T_JOB_DEP)), + "Job dependencies"), ] def __getstate__(self): -- GitLab