Fix loading of plugin configuration parameters

When the load a plugin, we need to reload once the watcher
configuration data, in order to include the plugin parameters in
cfg.CONF data dict. To reload the conf, we just call self.conf().
But every time we call this method, cfg.CONF is cleaned, and we
lost previously loaded parameters. This generated the exception
RequiredOptError and the plugin was not correctly loaded.

To fix it, we have just to add the watcher configuration
filename as argument of self.conf().

Change-Id: Ic2384b68f6d604640127fe06893d0f808aee34b7
Closes-Bug: #1617240
This commit is contained in:
David TARDIVEL 2016-08-26 12:08:45 +02:00
parent ab10201c72
commit 32c13d00fe
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ class DefaultLoader(base.BaseLoader):
return driver
def _reload_config(self):
self.conf()
self.conf(default_config_files=self.conf.default_config_files)
def get_entry_name(self, name):
return ".".join([self.namespace, name])