plainbox.impl.highlevel
– High-level API¶
-
class
plainbox.impl.highlevel.
Explorer
(provider_list=None, repository_list=None)[source]¶ Bases:
object
Class simplifying discovery of various PlainBox objects.
-
get_object_tree
()[source]¶ Get a tree of
PlainBoxObject
that represents everything that PlainBox knows about.Returns: A PlainBoxObject
that represents the explorer object itself, along with all the children reachable from it.This function computes the following set of data:
the explorer itself - all providers - all jobs - all whitelists - all executables - all repositories - all storages
-
-
class
plainbox.impl.highlevel.
PlainBoxObject
(impl, name=None, group=None, children=None, attrs=None)[source]¶ Bases:
object
A thin wrapper around some other plainbox object.
-
attrs
¶ A mapping of key-value attributes that this object has
This mapping is mutable and is always guaranteed to exist.
-
children
¶ A list of children that this object has
This list is mutable and is always guaranteed to exist.
-
group
¶ group this object belongs to.
This is a way to distinguish high-level “classes” that may not map one-to-one to a internal python class.
-
name
¶ name of this object
This may be an abbreviated form that assumes the group is displayed before the name. It will probably take a few iterations before we get right names (and other, additional properties) for everything.
-
-
class
plainbox.impl.highlevel.
PrimedJob
(service, session, provider_list, job)[source]¶ Bases:
object
Job primed for execution.
-
job
¶ The job to be executed
-
-
class
plainbox.impl.highlevel.
Service
(provider_list, session_list, config)[source]¶ Bases:
object
-
prime_job
(session, job)[source]¶ Prime the specified job for running.
The job will be invoked in a context specific to the session. The configuration object associated with this service instance might be used to fetch any additional configuration data for certain jobs (environment variables)
Returns: a primed job, ready to be started
-
provider_list
¶
-
session_list
¶
-
version
¶
-