Commit bde8f481 authored by Adeodato Simo's avatar Adeodato Simo Committed by Michael Hanselmann
Browse files

opcodes: document OP_DSC_FIELD in OpCode and OpCode.Summary()


Signed-off-by: default avatarAdeodato Simo <dato@google.com>
Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 30131294
......@@ -115,6 +115,9 @@ class OpCode(BaseOpCode):
@cvar OP_ID: The ID of this opcode. This should be unique amongst all
children of this class.
@cvar OP_DSC_FIELD: The name of a field whose value will be included in the
string returned by Summary(); see the docstring of that
method for details).
@ivar dry_run: Whether the LU should be run in dry-run mode, i.e. just
the check steps
@ivar priority: Opcode priority for queue
......@@ -170,6 +173,11 @@ class OpCode(BaseOpCode):
def Summary(self):
"""Generates a summary description of this opcode.
The summary is the value of the OP_ID attribute (without the "OP_" prefix),
plus the value of the OP_DSC_FIELD attribute, if one was defined; this field
should allow to easily identify the operation (for an instance creation job,
e.g., it would be the instance name).
"""
# all OP_ID start with OP_, we remove that
txt = self.OP_ID[3:]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment