forked from TrueCloudLab/frostfs-testlib
[#114] Add yaml configuration controllers
Signed-off-by: Andrey Berezin <a.berezin@yadro.com>
This commit is contained in:
parent
f8562da7e0
commit
72bd467c53
9 changed files with 244 additions and 22 deletions
|
@ -17,3 +17,16 @@ def load_plugin(plugin_group: str, name: str) -> Any:
|
|||
return None
|
||||
plugin = plugins[name]
|
||||
return plugin.load()
|
||||
|
||||
|
||||
def load_all(group: str) -> Any:
|
||||
"""Loads all plugins using entry point specification.
|
||||
|
||||
Args:
|
||||
plugin_group: Name of plugin group.
|
||||
|
||||
Returns:
|
||||
Classes from specified group.
|
||||
"""
|
||||
plugins = entry_points(group=group)
|
||||
return [plugin.load() for plugin in plugins]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue