This attribute allows programmatic submitters of jobs (e.g. iallocator)
to add a comment to each opcode, describing its purpose. Example:
$ gnt-job info 123
Job ID: 123
…
Opcodes:
OP_INSTANCE_REPLACE_DISKS
…
Input fields:
comment: Replaces disks on inst1.example.com
…
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
#: Attribute name for dependencies
DEPEND_ATTR = "depends"
+#: Attribute name for comment
+COMMENT_ATTR = "comment"
+
def _NameToId(name):
"""Convert an opcode class name to an OP_ID.
(DEPEND_ATTR, None, _BuildJobDepCheck(True),
"Job dependencies; if used through ``SubmitManyJobs`` relative (negative)"
" job IDs can be used"),
+ (COMMENT_ATTR, None, ht.TMaybeString,
+ "Comment describing the purpose of the opcode"),
]
def __getstate__(self):