cobald.daemon.core.config module
- class cobald.daemon.core.config.COBalDLoader(stream)[source]
Bases:
SafeLoaderLoader with access to COBalD configuration constructors
- class cobald.daemon.core.config.PipelineTranslator[source]
Bases:
TranslatorTranslator for
cobaldpipelinesThis allows for YAML configurations to have one or several
pipelineelements. Eachpipelineis translated as a series of nested elements, the way aControllerreceives 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
loaderby 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