Warning
THIS MODULE DOES NOT HAVE STABLE PUBLIC API
Job definition class.
Thin wrapper around the RFC822 record that defines a checkbox job definition
Whether the job is fully automated and runs without any intervention from the user
Create a new JobDefinition from RFC822 record.
This method should only be used to create additional jobs from local jobs (plugin local). This ensures that the child job shares the embedded provider reference.
estimated duration of this job in seconds.
The value may be None, which indicates that the duration is basically unknown. Fractional numbers are allowed and indicate fractions of a second.
Symbols for each field that a JobDefinition can have
Get all symbols defined by this symbol definition block
Create a JobDefinition instance from rfc822 record
The record must be a RFC822Record instance.
Only the ‘id’ and ‘plugin’ keys are required. All other data is stored as is and is entirely optional.
Compute and return a set of direct dependencies
To combat a simple mistake where the jobs are space-delimited any mixture of white-space (including newlines) and commas are allowed.
Obtain the value of the specified record attribute
Compute and return a set of resource dependencies
Return a ResourceProgram based on the ‘requires’ expression.
The program instance is cached in the JobDefinition and is not compiled or validated on subsequent calls.
Returns ResourceProgram or None Raises ResourceProgramError or SyntaxError
Get a localized piece of data
Parameters: | msgid – data to translate |
---|---|
Returns: | translated data obtained from the provider if this job has one, msgid itself otherwise. |
Identifier of this job, without the provider name
This field should not be used anymore, except for display
The job needs to be started explicitly by the test operator. This is intended for things that may be timing-sensitive or may require the tester to understand the necessary manipulations that he or she may have to perform ahead of time.
The test operator may select to skip certain tests, in that case the outcome is skip.
Get the translated version of description()
Change the Origin object associated with this JobDefinition
Note
This method is a unfortunate side effect of how via and local jobs that cat existing jobs are implemented. Ideally jobs would be trully immutable. Do not use this method lightly.
A ITextSource subclass indicating that text came from job output.
This class is used by SessionState._gen_rfc822_records_from_io_log() to allow such (generated) jobs to be traced back to the job that generated them.
Variables: | job – plainbox.impl.job.JobDefinition instance that generated the text |
---|
JobTreeNode class is used to store a tree structure. A tree consists of a collection of JobTreeNode instances connected in a hierarchical way where nodes are used as categories, jobs belonging to a category are listed in the node leaves.
Example:
/ Job A
Root-|
| / Job B
\--- Category X |
\ Job C
Adds a new category to this node.
Parameters: | category – the node instance to be added as a category. |
---|
Adds a new job to this node.
Parameters: | job – the job instance to be added to this node. |
---|
Build a rooted JobTreeNode from a job list
Parameters: |
|
---|
the tree or a new experimental job metadata (categories).
Symbols for each possible problem that a field value may have
Get all symbols defined by this symbol definition block