Support multiple plugins

This commit is contained in:
Jean-Paul Calderone
2019-06-14 17:54:35 -04:00
parent 646cd452b9
commit e2982c0129
4 changed files with 58 additions and 6 deletions

View File

@ -635,11 +635,11 @@ class _Client(node.Node, pollmixin.PollMixin):
"""
Get the names of storage plugins that are enabled in the configuration.
"""
return {
return set(
self.config.get_config(
"storage", "plugins", b""
).decode("ascii")
}
).decode("ascii").split(u",")
)
def _collect_storage_plugins(self, storage_plugin_names):
@ -668,7 +668,11 @@ class _Client(node.Node, pollmixin.PollMixin):
),
)
for plugin
in plugins
# The order is fairly arbitrary and it is not meant to convey
# anything but providing *some* stable ordering makes the data a
# little easier to deal with (mainly in tests and when manually
# inspecting it).
in sorted(plugins, key=lambda p: p.name)
)