tron.command_context module¶
Command Context is how we construct the command line for a command which may have variables that need to be rendered.
- class tron.command_context.ActionRunContext(action_run)¶
Bases:
objectContext object that gives us access to data about the action run.
- property actionname¶
- property node¶
- class tron.command_context.CommandContext(base=None, next=None)¶
Bases:
objectA CommandContext object is a wrapper around any object which has values to be used to render a command for execution. It looks up values by name.
- It’s lookup order is:
base[name], base.__getattr__(name), next[name], next.__getattr__(name)
- get(name, default=None)¶
- class tron.command_context.Filler¶
Bases:
objectFiller object for using CommandContext during config parsing. This class is used as a substitute for objects that would be passed to Context objects. This allows the Context objects to be used directly for config validation.
- class tron.command_context.JobContext(job)¶
Bases:
objectA class which exposes properties for rendering commands.
- property name¶
- property namespace¶
- class tron.command_context.JobRunContext(job_run)¶
Bases:
object- property cleanup_job_status¶
Provide ‘SUCCESS’ or ‘FAILURE’ to a cleanup action context based on the status of the other steps
- property manual¶
- property runid¶
- tron.command_context.build_context(object, parent)¶
Construct a CommandContext for object. object must have a property ‘context_class’.
- tron.command_context.build_filled_context(*context_objects)¶
Create a CommandContext chain from context_objects, using a Filler object to pass to each CommandContext. Can be used to validate a format string.