aboutsummaryrefslogtreecommitdiff
path: root/kolla/cmd
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-01-08 03:21:48 +0000
committerGerrit Code Review <review@openstack.org>2016-01-08 03:21:49 +0000
commit459d56457381ae625ef73526d31bd09dd4edbc0b (patch)
treeeea749e92514a3a34c8c51f099df8ee9c578189d /kolla/cmd
parente5af3536b5c522ef8b57558ed00161ef123ef53c (diff)
parent9b19db099d9666810845ba5b7be9aff12c5d536d (diff)
downloadkolla-459d56457381ae625ef73526d31bd09dd4edbc0b.tar.gz
kolla-459d56457381ae625ef73526d31bd09dd4edbc0b.zip
Merge "Fix the package source don't register issue"
Diffstat (limited to 'kolla/cmd')
-rwxr-xr-xkolla/cmd/build.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/kolla/cmd/build.py b/kolla/cmd/build.py
index 5a54e79eb..db417499b 100755
--- a/kolla/cmd/build.py
+++ b/kolla/cmd/build.py
@@ -518,7 +518,8 @@ class KollaWorker(object):
def build_image_list(self):
def process_source_installation(image, section):
installation = dict()
- if section not in self.conf.list_all_sections():
+ # NOTE(jeffrey4l): source is not needed when the type is None
+ if self.conf._get('type', self.conf._get_group(section)) is None:
LOG.debug('%s:No source location found', section)
else:
installation['type'] = self.conf[section]['type']
@@ -546,17 +547,17 @@ class KollaWorker(object):
image['plugins'] = list()
if self.install_type == 'source':
- self.conf.register_opts([
- cfg.StrOpt('type'),
- cfg.StrOpt('location'),
- cfg.StrOpt('reference')
- ], image['name'])
+ # NOTE(jeffrey4l): register the opts if the section didn't
+ # register in the kolla/common/config.py file
+ if image['name'] not in self.conf._groups:
+ self.conf.register_opts(common_config.get_source_opts(),
+ image['name'])
image['source'] = process_source_installation(image,
image['name'])
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]:
+ self.conf._groups) if match]:
image['plugins'].append(
process_source_installation(image, plugin))