1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-31 18:21:14 +00:00

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.
This commit is contained in:
Sergei Trofimov 2017-10-25 09:04:14 +01:00 committed by setrofim
parent 2c1d37fb6b
commit f5cc58d847

View File

@ -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: