aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Zhang <zhang.lei.fly@gmail.com>2016-11-05 02:21:27 +0800
committerJeffrey Zhang <zhang.lei.fly@gmail.com>2016-11-05 20:28:30 +0800
commit6e7d73be1616fce7d35ec1296dd4a1083dbfdc59 (patch)
tree10e8133e24fb1cca1f8b6abf5da817ae90564db7
parentdc7001de4cbbf244ec5493d81bfb193a42b2dbe0 (diff)
downloadkolla-6e7d73be1616fce7d35ec1296dd4a1083dbfdc59.tar.gz
kolla-6e7d73be1616fce7d35ec1296dd4a1083dbfdc59.zip
Load all sections defined in code and conf file
oslo.config has two method, _groups and list_all_sections. the former return all sections defined in config file and the latter one return all sections defined in code. Change-Id: Ib05a6dffc2463fd30f183ae5bfb3fc20f475a0bc Closes-Bug: #1639323
-rw-r--r--kolla/image/build.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/kolla/image/build.py b/kolla/image/build.py
index 231824e85..916ff0044 100644
--- a/kolla/image/build.py
+++ b/kolla/image/build.py
@@ -816,6 +816,9 @@ class KollaWorker(object):
installation['reference'] = self.conf[section]['reference']
return installation
+ all_sections = (set(six.iterkeys(self.conf._groups)) |
+ set(self.conf.list_all_sections()))
+
for path in self.docker_build_paths:
# Reading parent image name
with open(os.path.join(path, 'Dockerfile')) as f:
@@ -838,7 +841,7 @@ class KollaWorker(object):
for plugin in [match.group(0) for match in
(re.search('{}-plugin-.+'.format(image.name),
section) for section in
- self.conf.list_all_sections()) if match]:
+ all_sections) if match]:
try:
self.conf.register_opts(
common_config.get_source_opts(),