Those classes are actually implemented in the plainbox.impl package. This module is here so that the essential API concepts are in a single spot and are easier to understand (by not being mixed with additional source code).
Note
This module has API stability guarantees. We are not going to break or introduce backwards incompatible interfaces here without following our API deprecation policy. All existing features will be retained for at least three releases. All deprecated symbols will warn when they will cease to be available.
Interface for job execution controller clases.
Execution controllers encapsulate knowledge on how to run command associated with a particular job. Some executors might run the command directly, others might delegate the task to a helper program or perform some special-cased customization to the execution environment.
Execute the specified job using the specified subprocess-like object
Parameters: |
|
---|---|
Returns: | The return code of the command, as returned by subprocess.call() |
Job definition that contains a mixture of meta-data and executable information that can be consumed by the job runner to produce results.
The shell command to execute to perform the job.
The return code, standard output and standard error streams are automatically recorded and processed, depending on the plugin type.
This value can be None
Comma-delimited dependency expression
This field can be used to express job dependencies. If a job depends on another job it can only start if the other job had ran and succeeded.
This is the original data as provided when constructed. Use get_direct_dependencies() to obtain the parsed equivalent.
This value can be None
An opaque qualifier for a job definition.
This is an abstraction for matching jobs definitions to names, patterns and other means of selecting jobs.
Check if this qualifier designates the specified plainbox.abc.IJobDefinition
Returns True: | if the qualifier designates the specified job |
---|---|
Returns False: | otherwise |
Class for representing results from a single job
Compute and return the sequence of IOLogRecord objects.
Returns: | A sequence of tuples (delay, stream-name, data) where delay is the delay since the previous message seconds (typically a fractional number), stream name is either ‘stdout’ or ‘stderr’ and data is the bytes object that was obtained from that stream. |
---|
A sequence of tuples (delay, stream-name, data) where delay is the delay since the previous message seconds (typically a fractional number), stream name is either ‘stdout’ or ‘stderr’ and data is the bytes object that was obtained from that stream.
Something that can run a job definition and produce results.
You can run many jobs with one runner, each time you’ll get additional result object. Typically you will need to connect the runner to a user interface but headless mode is also possible.
Run the specified job.
Calling this method may block for arbitrary amount of time. User interfaces should ensure that it runs in a separate thread.
The return value is a JobResult object that contains all the data that was captured during the execution of the job. Some jobs may not return a JobResult value.
Provider for the current type of tests
Also known as the ‘checkbox-like’ provider.
description of this providr
This name should be dbus-friendly. It should not be localizable.
Provider for the current type of tests.
This class provides the APIs required by the internal implementation that are not considered normal public APIs. The only consumer of the those methods and properties are internal to plainbox.
Return the required value of CHECKBOX_SHARE environment variable.
Note
This variable is only required by one script. It would be nice to remove this later on.
Interface for session state controller classes.
Session state controller classes cooperate with SessionState and DependencySolver classes and implement knowledge unique to particular job semantics. Before execution the controller can influence job runnability (by setting inhibitors). After execution the controller can observe the result and influence session state
Get the set of direct dependencies of a particular job.
Parameters: | job – A IJobDefinition instance that is to be visited |
---|---|
Returns: | set of pairs (dep_type, job_name) |
Returns a set of pairs (dep_type, job_name) that describe all dependencies of the specified job. The first element in the pair, dep_type, is either DEP_TYPE_DIRECT or DEP_TYPE_RESOURCE. The second element is the name of the job.
Get a list of readiness inhibitors that inhibit a particular job.
Parameters: |
|
---|---|
Returns: | List of JobReadinessInhibitor |
Notice the specified test result and update readiness state.
Parameters: |
|
---|
This function updates the internal result collection with the data from the specified test result. Results can safely override older results. Results also change the ready map (jobs that can run) because of dependency relations.
An abstract source of text.
Concrete instances of this class are used by plainbox.impl.rfc822.Origin to keep track of where each entry of a RFC822-like document came from.