plainbox.impl.secure.providers.v1 – Implementation of V1 provider

class plainbox.impl.secure.providers.v1.AbsolutePathValidator[source]

A validator that checks that the value is an absolute path

class plainbox.impl.secure.providers.v1.ExistingDirectoryValidator[source]

A validator that checks that the value points to an existing directory

class plainbox.impl.secure.providers.v1.IQNValidator[source]

A validator for provider name.

Provider names use a RFC3720 IQN-like identifiers composed of the follwing parts:

  • year
  • (dot separating the next section)
  • domain name
  • (colon separating the next section)
  • identifier

Each of the fields has an informal definition below:

year:
four digit number
domain name:
identifiers spearated by dots, at least one dot has to be present
identifier:
[a-z][a-z0-9-]*
class plainbox.impl.secure.providers.v1.Provider1(base_dir, name, version, description, secure)[source]

A v1 provider implementation.

This base class implements a checkbox-like provider object. Subclasses are only required to implement a single method that designates the base location for all other data.

CHECKBOX_SHARE[source]

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.

base_dir[source]

pathname to a directory with essential provider data

This pathname is used for deriving jobs_dir, bin_dir and whitelists_dir.

bin_dir[source]

Return an absolute path of the bin directory

Note

The programs in that directory may not work without setting PYTHONPATH and CHECKBOX_SHARE.

description[source]

description of this provider

extra_PYTHONPATH[source]

Return additional entry for PYTHONPATH, if needed.

This entry is required for CheckBox scripts to import the correct CheckBox python libraries.

Note

The result may be None

get_all_executables()[source]

Discover and return all executables offered by this provider

get_builtin_jobs()[source]
get_builtin_whitelists()[source]
jobs_dir[source]

Return an absolute path of the jobs directory

load_jobs(somewhere)[source]

Load job definitions from somewhere

name[source]

name of this provider

secure[source]

flag indicating that this provider was loaded from the secure portion of PROVIDERPATH and thus can be used with the plainbox-trusted-launcher-1.

version[source]

version of this provider

whitelists_dir[source]

Return an absolute path of the whitelist directory

plainbox.impl.secure.providers.v1.Provider1Definition[source]

alias of description

class plainbox.impl.secure.providers.v1.Provider1PlugIn(filename, definition_text)[source]

A specialized IPlugIn that loads Provider1 instances from their defition files

plugin_name[source]

plugin name, the namespace of the provider

plugin_object[source]

plugin object, the actual Provider1 instance

class plainbox.impl.secure.providers.v1.Provider1PlugInCollection[source]

A collection of v1 provider plugins.

This class is just like FsPlugInCollection but knows the proper arguments (PROVIDERPATH and the extension)

DEFAULT_PROVIDERPATH = '/usr/share/plainbox-providers-1'
class plainbox.impl.secure.providers.v1.VersionValidator[source]

A validator for provider provider version.

Provider version must be a sequence of non-negative numbers separated by dots. At most one version number must be present, which may be followed by any sub-versions.

plainbox.impl.secure.providers.v1.get_secure_PROVIDERPATH()[source]

Computes the secure value for PROVIDERPATH.

For the root-elevated trusted launcher PROVIDERPATH should contain one directory entry:

  • /usr/share/plainbox-providers-1

Previous topic

plainbox.impl.secure.providers – providers package

Next topic

plainbox.impl.secure.qualifiers – Job Qualifiers

This Page