cobald.daemon.core.config module
- class cobald.daemon.core.config.COBalDLoader(stream)[source]
Bases:
SafeLoader
Loader with access to COBalD configuration constructors
- class cobald.daemon.core.config.PipelineTranslator[source]
Bases:
Translator
Translator for
cobald
pipelinesThis allows for YAML configurations to have one or several
pipeline
elements. Eachpipeline
is translated as a series of nested elements, the way aController
receives aPool
.pipeline: # same as ``package.module.callable(a, b, keyword1="one", keyword2="two") - __type__: package.module.Controller interval: 20 - __type__: package.module.Pool
- cobald.daemon.core.config.add_constructor_plugins(entry_point_group: str, loader: Type[BaseLoader]) None [source]
Add PyYAML constructors from an entry point group to a loader
- Parameters:
loader – the PyYAML loader which uses the plugins
entry_point_group – entry point group to search
Note
This directly modifies the
loader
by callingadd_constructor()
.
- cobald.daemon.core.config.load(config_path: str)[source]
Load a configuration and keep it alive for the given context
- Parameters:
config_path – path to a configuration file
- cobald.daemon.core.config.load_pipeline(content: list)[source]
Load a cobald pipeline of Controller >> … >> Pool from a configuration section
- Parameters:
content – content of the configuration section
- Returns:
- cobald.daemon.core.config.load_section_plugins(entry_point_group: str) Tuple[SectionPlugin] [source]
Load configuration plugins from an entry point group
- Parameters:
entry_point_group – entry point group to search
- Returns:
all loaded plugins