Add the ability to specify multiple extension directories
This allows for a colon-separated list of extension directories that will be loaded at startup. Change-Id: Ie7acb24a929b1782be3e916113a90ede238dee40
This commit is contained in:
@@ -11,7 +11,9 @@ bind_host = 0.0.0.0
|
||||
# Port the bind the API server to
|
||||
bind_port = 9696
|
||||
|
||||
# Path to the extensions
|
||||
# Path to the extensions. Note that this can be a colon-separated list of
|
||||
# paths. For example:
|
||||
# api_extensions_path = extensions:/path/to/more/extensions:/even/more/extensions
|
||||
api_extensions_path = extensions
|
||||
|
||||
[composite:quantum]
|
||||
|
||||
@@ -419,8 +419,11 @@ class ExtensionManager(object):
|
||||
extension implementation.
|
||||
|
||||
"""
|
||||
if os.path.exists(self.path):
|
||||
self._load_all_extensions_from_path(self.path)
|
||||
for path in self.path.split(':'):
|
||||
if os.path.exists(path):
|
||||
self._load_all_extensions_from_path(path)
|
||||
else:
|
||||
LOG.error("Extension path \"%s\" doesn't exist!" % path)
|
||||
|
||||
def _load_all_extensions_from_path(self, path):
|
||||
for f in os.listdir(path):
|
||||
|
||||
Reference in New Issue
Block a user