Merge "Fix plugin parsing for base images"
This commit is contained in:
commit
31c2a255fc
@ -832,7 +832,7 @@ class KollaWorker(object):
|
|||||||
image.name)
|
image.name)
|
||||||
image.source = process_source_installation(image, image.name)
|
image.source = process_source_installation(image, image.name)
|
||||||
for plugin in [match.group(0) for match in
|
for plugin in [match.group(0) for match in
|
||||||
(re.search('{}-plugin-.+'.format(image.name),
|
(re.search('^{}-plugin-.+'.format(image.name),
|
||||||
section) for section in
|
section) for section in
|
||||||
self.conf.list_all_sections()) if match]:
|
self.conf.list_all_sections()) if match]:
|
||||||
try:
|
try:
|
||||||
|
@ -6,6 +6,11 @@ reference = master
|
|||||||
location = https://git.openstack.org/openstack/networking-arista
|
location = https://git.openstack.org/openstack/networking-arista
|
||||||
type = git
|
type = git
|
||||||
|
|
||||||
|
[neutron-base-plugin-neutron-fwaas]
|
||||||
|
reference = master
|
||||||
|
location = https://git.openstack.org/openstack/neutron-fwaas
|
||||||
|
type = git
|
||||||
|
|
||||||
[profiles]
|
[profiles]
|
||||||
default = image-base
|
default = image-base
|
||||||
all = image-base,image-child
|
all = image-base,image-child
|
||||||
|
@ -195,6 +195,24 @@ class KollaWorkerTest(base.TestCase):
|
|||||||
else:
|
else:
|
||||||
self.fail('Can not find the expected neutron arista plugin')
|
self.fail('Can not find the expected neutron arista plugin')
|
||||||
|
|
||||||
|
def test_build_image_list_plugin_parsing(self):
|
||||||
|
"""Ensure regex used to parse plugins adds them to the correct image"""
|
||||||
|
self.conf.set_override('install_type', 'source')
|
||||||
|
|
||||||
|
kolla = build.KollaWorker(self.conf)
|
||||||
|
kolla.setup_working_dir()
|
||||||
|
kolla.find_dockerfiles()
|
||||||
|
kolla.create_dockerfiles()
|
||||||
|
kolla.build_image_list()
|
||||||
|
for image in kolla.images:
|
||||||
|
if image.name == 'base':
|
||||||
|
self.assertEqual(len(image.plugins), 0,
|
||||||
|
'base image should not have any plugins '
|
||||||
|
'registered')
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
self.fail('Expected to find the base image in this test')
|
||||||
|
|
||||||
def _get_matched_images(self, images):
|
def _get_matched_images(self, images):
|
||||||
return [image for image in images
|
return [image for image in images
|
||||||
if image.status == build.STATUS_MATCHED]
|
if image.status == build.STATUS_MATCHED]
|
||||||
|
Loading…
Reference in New Issue
Block a user