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

Most of the implementation is available in plainbox.impl.secure.providers.v1

class plainbox.impl.providers.v1.DummyProvider1(job_list=None, whitelist_list=None, **extras)[source]

Dummy provider useful for creating isolated test cases

CHECKBOX_SHARE[source]
bin_dir[source]
description[source]
extra_PYTHONPATH[source]
get_all_executables()[source]
get_builtin_jobs()[source]
get_builtin_whitelists()[source]
name[source]
secure()[source]
version[source]
class plainbox.impl.providers.v1.Provider1(base_dir, name, version, description, secure)

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

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

pathname to a directory with essential provider data

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

bin_dir

Return an absolute path of the bin directory

Note

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

description

description of this provider

extra_PYTHONPATH

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()

Discover and return all executables offered by this provider

get_builtin_jobs()
get_builtin_whitelists()
jobs_dir

Return an absolute path of the jobs directory

load_jobs(somewhere)

Load job definitions from somewhere

name

name of this provider

secure

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

version of this provider

whitelists_dir

Return an absolute path of the whitelist directory

class plainbox.impl.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:/sbuild-nonexistent/.local/share/plainbox-providers-1'
plainbox.impl.providers.v1.get_default_PROVIDERPATH()[source]

Computes the default value for PROVIDERPATH.

PROVIDERPATH should contain two directory entries:

  • /usr/share/plainbox-providers-1
  • $XDG_DATA_HOME/plainbox-providers-1

Previous topic

plainbox.impl.providers.special – various special providers

Next topic

plainbox.impl.resource – job resources

This Page