Merge "Add OVN container images to TripleO-common"
This commit is contained in:
commit
e21f8e094f
@ -401,6 +401,15 @@ container_images_template:
|
||||
- OS::TripleO::Services::NeutronServer
|
||||
- OS::TripleO::Services::OpenDaylightApi
|
||||
|
||||
{% elif neutron_driver == "ovn" %}
|
||||
- imagename: "{{namespace}}/{{name_prefix}}neutron-server-ovn{{name_suffix}}:{{tag}}"
|
||||
params:
|
||||
- DockerNeutronApiImage
|
||||
- DockerNeutronConfigImage
|
||||
services:
|
||||
- OS::TripleO::Services::NeutronApi
|
||||
- OS::TripleO::Services::NeutronServer
|
||||
|
||||
{% else %}
|
||||
- imagename: "{{namespace}}/{{name_prefix}}neutron-server{{name_suffix}}:{{tag}}"
|
||||
params:
|
||||
@ -418,11 +427,6 @@ container_images_template:
|
||||
- OS::TripleO::Services::NeutronSriovAgent
|
||||
{% endif %}
|
||||
|
||||
- imagename: "{{namespace}}/{{name_prefix}}neutron-server-ovn{{name_suffix}}:{{tag}}"
|
||||
params:
|
||||
- DockerNeutronOvnApiImage
|
||||
- DockerNeutronOvnConfigImage
|
||||
|
||||
- imagename: "{{namespace}}/{{name_prefix}}nova-api{{name_suffix}}:{{tag}}"
|
||||
params:
|
||||
- DockerNovaApiImage
|
||||
@ -528,6 +532,7 @@ container_images_template:
|
||||
- OS::TripleO::Services::OpenDaylightApi
|
||||
{% endif %}
|
||||
|
||||
{% if neutron_driver == "ovn" %}
|
||||
- imagename: "{{namespace}}/{{name_prefix}}ovn-base{{name_suffix}}:{{tag}}"
|
||||
|
||||
- imagename: "{{namespace}}/{{name_prefix}}ovn-controller{{name_suffix}}:{{tag}}"
|
||||
@ -546,6 +551,8 @@ container_images_template:
|
||||
- imagename: "{{namespace}}/{{name_prefix}}ovn-northd{{name_suffix}}:{{tag}}"
|
||||
params:
|
||||
- DockerOvnNorthdImage
|
||||
- DockerOvnDbsImage
|
||||
- DockerOvnDbsConfigImage
|
||||
services:
|
||||
- OS::TripleO::Services::OVNDBs
|
||||
|
||||
@ -554,6 +561,7 @@ container_images_template:
|
||||
- DockerOvnSbDbImage
|
||||
services:
|
||||
- OS::TripleO::Services::OVNDBs
|
||||
{% endif %}
|
||||
|
||||
- imagename: "{{namespace}}/{{name_prefix}}panko-api{{name_suffix}}:{{tag}}"
|
||||
params:
|
||||
|
@ -191,40 +191,8 @@ class TestKollaImageBuilderTemplate(base.TestCase):
|
||||
}]
|
||||
self.assertEqual(container_images, result)
|
||||
|
||||
def test_container_images_yaml_in_sync(self):
|
||||
'''Confirm overcloud_containers.tpl.yaml equals overcloud_containers.yaml
|
||||
|
||||
TODO(sbaker) remove when overcloud_containers.yaml is deleted
|
||||
'''
|
||||
mod_dir = os.path.dirname(sys.modules[__name__].__file__)
|
||||
project_dir = os.path.abspath(os.path.join(mod_dir, '../../../'))
|
||||
files_dir = os.path.join(project_dir, 'container-images')
|
||||
|
||||
oc_tmpl_file = os.path.join(files_dir, 'overcloud_containers.yaml.j2')
|
||||
tmpl_builder = kb.KollaImageBuilder([oc_tmpl_file])
|
||||
|
||||
def ffunc(entry):
|
||||
if 'params' in entry:
|
||||
del(entry['params'])
|
||||
if 'services' in entry:
|
||||
del(entry['services'])
|
||||
return entry
|
||||
|
||||
result = tmpl_builder.container_images_from_template(filter=ffunc)
|
||||
|
||||
oc_yaml_file = os.path.join(files_dir, 'overcloud_containers.yaml')
|
||||
yaml_builder = kb.KollaImageBuilder([oc_yaml_file])
|
||||
container_images = yaml_builder.load_config_files(
|
||||
yaml_builder.CONTAINER_IMAGES)
|
||||
# remove odl related image references from overcloud_containers.yaml
|
||||
container_images.remove({'imagename': 'tripleoupstream/centos-binary'
|
||||
'-neutron-server-opendaylight:'
|
||||
'latest'})
|
||||
container_images.remove({'imagename': 'tripleoupstream/centos-binary'
|
||||
'-opendaylight:latest'})
|
||||
self.assertSequenceEqual(container_images, result)
|
||||
|
||||
def test_container_images_yaml_in_sync_for_odl(self):
|
||||
def _test_container_images_yaml_in_sync_helper(self, neutron_driver=None,
|
||||
remove_images=[]):
|
||||
'''Confirm overcloud_containers.tpl.yaml equals overcloud_containers.yaml
|
||||
|
||||
TODO(sbaker) remove when overcloud_containers.yaml is deleted
|
||||
@ -244,13 +212,64 @@ class TestKollaImageBuilderTemplate(base.TestCase):
|
||||
return entry
|
||||
|
||||
result = tmpl_builder.container_images_from_template(
|
||||
neutron_driver='odl', filter=ffunc)
|
||||
filter=ffunc, neutron_driver=neutron_driver)
|
||||
|
||||
oc_yaml_file = os.path.join(files_dir, 'overcloud_containers.yaml')
|
||||
yaml_builder = kb.KollaImageBuilder([oc_yaml_file])
|
||||
container_images = yaml_builder.load_config_files(
|
||||
yaml_builder.CONTAINER_IMAGES)
|
||||
# remove neutron-server image reference from overcloud_containers.yaml
|
||||
container_images.remove({'imagename': 'tripleoupstream/centos-binary'
|
||||
'-neutron-server:latest'})
|
||||
|
||||
# remove image references from overcloud_containers.yaml specified
|
||||
# in remove_images param.
|
||||
for image in remove_images:
|
||||
container_images.remove(image)
|
||||
|
||||
self.assertSequenceEqual(container_images, result)
|
||||
|
||||
def test_container_images_yaml_in_sync(self):
|
||||
remove_images = [
|
||||
{'imagename': 'tripleoupstream/centos-binary'
|
||||
'-neutron-server-opendaylight:latest'},
|
||||
{'imagename': 'tripleoupstream/centos-binary'
|
||||
'-neutron-server-ovn:latest'},
|
||||
{'imagename': 'tripleoupstream/centos-binary-ovn-base:latest'},
|
||||
{'imagename': 'tripleoupstream/centos-binary'
|
||||
'-opendaylight:latest'},
|
||||
{'imagename': 'tripleoupstream/centos-binary-ovn-northd:latest'},
|
||||
{'imagename': 'tripleoupstream/centos-binary-ovn-'
|
||||
'controller:latest'},
|
||||
{'imagename': 'tripleoupstream/centos-binary-ovn-'
|
||||
'nb-db-server:latest'},
|
||||
{'imagename': 'tripleoupstream/centos-binary-ovn-'
|
||||
'sb-db-server:latest'}]
|
||||
self._test_container_images_yaml_in_sync_helper(
|
||||
remove_images=remove_images)
|
||||
|
||||
def test_container_images_yaml_in_sync_for_odl(self):
|
||||
# remove neutron-server image reference from overcloud_containers.yaml
|
||||
remove_images = [
|
||||
{'imagename': 'tripleoupstream/centos-binary'
|
||||
'-neutron-server:latest'},
|
||||
{'imagename': 'tripleoupstream/centos-binary'
|
||||
'-neutron-server-ovn:latest'},
|
||||
{'imagename': 'tripleoupstream/centos-binary-ovn-base:latest'},
|
||||
{'imagename': 'tripleoupstream/centos-binary-ovn-northd:latest'},
|
||||
{'imagename': 'tripleoupstream/centos-binary-ovn-'
|
||||
'controller:latest'},
|
||||
{'imagename': 'tripleoupstream/centos-binary-ovn-'
|
||||
'nb-db-server:latest'},
|
||||
{'imagename': 'tripleoupstream/centos-binary-ovn-'
|
||||
'sb-db-server:latest'}]
|
||||
self._test_container_images_yaml_in_sync_helper(
|
||||
neutron_driver='odl', remove_images=remove_images)
|
||||
|
||||
def test_container_images_yaml_in_sync_for_ovn(self):
|
||||
# remove neutron-server image reference from overcloud_containers.yaml
|
||||
remove_images = [{'imagename': 'tripleoupstream/centos-binary'
|
||||
'-neutron-server:latest'},
|
||||
{'imagename': 'tripleoupstream/centos-binary'
|
||||
'-neutron-server-opendaylight:latest'},
|
||||
{'imagename': 'tripleoupstream/centos-binary'
|
||||
'-opendaylight:latest'}]
|
||||
self._test_container_images_yaml_in_sync_helper(
|
||||
neutron_driver='ovn', remove_images=remove_images)
|
||||
|
Loading…
x
Reference in New Issue
Block a user