bueno.core package
Submodules
bueno.core.bueno module
The good stuff typically called by __main__.
- class bueno.core.bueno.ArgumentParser
Bases:
object
bueno’s argument parser.
- class CommandAction(option_strings, dest, nargs, **kwargs)
Bases:
argparse.Action
Custom action class used for ‘command’ argument structure verification.
- parse() argparse.Namespace
Parses and returns an argparse.Namespace.
- class bueno.core.bueno.Bueno(pargs: argparse.Namespace)
Bases:
object
Implements the bueno service dispatch system.
- static main(pargs: argparse.Namespace) None
Instantiates and runs a bueno service.
- bueno.core.bueno.main() None
bueno’s main().
bueno.core.cntrimg module
Core container image infrastructure.
- class bueno.core.cntrimg.Activator(*args: Any, **kwargs: Any)
Bases:
object
Image activator singleton.
- property impl: bueno.core.cntrimg.BaseImageActivator
Returns the image activator implementation (instance).
- class bueno.core.cntrimg.BaseImageActivator
Bases:
abc.ABC
Abstract base class for container image activators.
- get_img_path() str
Returns the image path used for container image activation.
- abstract requires_img_activation() bool
Returns whether or not the image activator instance requires image activation.
- abstract run(cmds: List[str], echo: bool = True, capture: bool = False, verbose: bool = True, check_exit_code: bool = True) List[str]
Runs the specified command in a container. By default the executed command is emitted echoed before its execution.
- abstract set_img_path(img_path: str) None
Sets the image path used for container image activation. RuntimeError is raised if an invalid path is provided.
- abstract tar2dirs(src: str, dst: str) str
Returns a command string capable of extracting the contents of the provided source tarball to the provided base destination.
- class bueno.core.cntrimg.CharlieCloudImageActivator
Bases:
bueno.core.cntrimg.BaseImageActivator
The CharlieCloud image activator.
- requires_img_activation() bool
Returns whether or not the image activator instance requires image activation.
- run(cmds: List[str], echo: bool = True, capture: bool = False, verbose: bool = True, check_exit_code: bool = True) List[str]
Runs the specified command in a container. By default the executed command is emitted echoed before its execution.
- set_img_path(img_path: str) None
Sets the image path used for container image activation. RuntimeError is raised if an invalid path is provided.
- tar2dirs(src: str, dst: str) str
Returns a command string capable of extracting the contents of the provided source tarball to the provided base destination.
- class bueno.core.cntrimg.ImageActivatorFactory
Bases:
object
The container image activator factory.
- static available() List[str]
Returns list of available container names.
- static build(activator_name: str) None
Builds an image activator based on the provided activator name. If an unrecognized name is provided, a RuntimeError is raised.
- items = [('charliecloud', <function ImageActivatorFactory.<lambda>>), ('none', <function ImageActivatorFactory.<lambda>>)]
- static known(sname: str) bool
Returns a boolean indicating whether or not the provided container name is known (i.e., recognized) by bueno.
- class bueno.core.cntrimg.NoneImageActivator
Bases:
bueno.core.cntrimg.BaseImageActivator
The non-image-activator activator. Just a passthrough to the host’s shell.
- requires_img_activation() bool
Returns whether or not the image activator instance requires image activation.
- run(cmds: List[str], echo: bool = True, capture: bool = False, verbose: bool = True, check_exit_code: bool = True) List[str]
Runs the specified command in a container. By default the executed command is emitted echoed before its execution.
- set_img_path(img_path: str) None
Sets the image path used for container image activation. RuntimeError is raised if an invalid path is provided.
- tar2dirs(src: str, dst: str) str
Returns a command string capable of extracting the contents of the provided source tarball to the provided base destination.
- bueno.core.cntrimg.activator() bueno.core.cntrimg.BaseImageActivator
Returns the current container image activator.
bueno.core.constants module
Constants used across packages and modules.
bueno.core.mathex module
Mathematical expression evaluation module.
- bueno.core.mathex.evaluate(expr: str) int
Evaluates the given arithmetic expression and returns its result cast to an integer. If the provided expression is malformed, then an exception is raised.
bueno.core.metacls module
Convenience metaclasses.
- class bueno.core.metacls.Singleton
Bases:
type
Metaclass for singletons.
bueno.core.service module
Core service infrastructure used by all bueno services.
- class bueno.core.service.Base(desc: str, argv: List[str])
Bases:
abc.ABC
Abstract base class of all bueno services.
- abstract start() None
Starts the service. Akin to a service main().
- class bueno.core.service.Factory
Bases:
object
The service factory.
- static available() List[str]
Returns list of available service names.
- static build(sargv: List[str]) Any
Imports and returns an instance of requested service module.
- static known(sname: str) bool
Returns a boolean indicating whether or not the provided services name is known (i.e., recognized) by bueno.
- services = ['run']
bueno.core.utils module
Core utility module.
- bueno.core.utils.privileged_user() bool
Returns whether or not the user is a privileged user.