plainbox.impl.commands.checkbox – mix-in for checkbox commands

class plainbox.impl.commands.checkbox.CheckBoxInvocationMixIn(provider_loader, config_loader)[source]

Bases: object


Load and return a list of JobDefinition instances

get_whitelist_from_file(filename, stream=None)[source]

Load a whitelist from a file, with special behavior.

  • filename – name of the file to load
  • stream – (optional) pre-opened stream pointing at the whitelist

The loaded whitelist or None if loading fails for any reason

This function implements special loading behavior for whitelists that makes them inherit the implicit namespace of the provider they may be a part of. Before loading the whitelist directly from the file, all known providers are interrogated to see if any of them has a whitelist that was loaded from the same file (as indicated by os.path.realpath())

The stream argument can be provided if the caller already has an open file object, which is typically the case when working with argparse.

class plainbox.impl.commands.checkbox.CheckBoxCommandMixIn[source]

Bases: object

Mix-in class for plainbox commands that want to discover and load checkbox jobs


Add common options for job selection to an existing parser

comments powered by Disqus