From f5cc58d8478dbafd2848c61ca99c673cfe10fd73 Mon Sep 17 00:00:00 2001 From: Sergei Trofimov Date: Wed, 25 Oct 2017 09:04:14 +0100 Subject: [PATCH] framework/config: add get_plugin_class to PluginCache Expose PluginLoader's get_plugin_class via PluginCache. PluginCache is basically intented to act like a PluginLoader, except when instantiating plugins, the "default" parameter values are taken form the cached configruation, rather than the actual defaults defined in the Plugin's parmaters. --- wa/framework/configuration/plugin_cache.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wa/framework/configuration/plugin_cache.py b/wa/framework/configuration/plugin_cache.py index 8857db12..43a91f5a 100644 --- a/wa/framework/configuration/plugin_cache.py +++ b/wa/framework/configuration/plugin_cache.py @@ -132,6 +132,9 @@ class PluginCache(object): kwargs = dict(config.items() + kwargs.items()) return self.loader.get_plugin(name, kind=kind, *args, **kwargs) + def get_plugin_class(self, name, kind=None): + return self.loader.get_plugin_class(name, kind) + @memoized def get_plugin_parameters(self, name): if name in self.targets: