Allow 'container image prepare' to support drivers

This updates the 'overcloud container image prepare' command
so that it sets the neutron_driver variable correctly. This
allows tripleo-common to detect if OVN or ODL drivers are in
used and prepares the resulting output files for container
images and parameters accordingly.

Previously you could only access this functionality if you
used the new ContainerImagePrepare workflow (requires Mistral).

Change-Id: Icb5b20bfd98a704f3f33f739bc92f77550b52c26
Closes-bug: #1816663
This commit is contained in:
Dan Prince 2019-02-19 15:20:41 -05:00
parent 828cfe02bb
commit a2c4d07df6
2 changed files with 8 additions and 2 deletions

View File

@ -186,10 +186,13 @@ class TestContainerImagePrepare(TestPluginV1):
mock_get.side_effect = requests.exceptions.SSLError('ouch')
mock_bsf.return_value = set(['OS::TripleO::Services::AodhEvaluator'])
resource_registry = {'resource_registry': {
resource_registry = {
'parameter_defaults': {
'NeutronMechanismDrivers': 'ovn',
}, 'resource_registry': {
'OS::TripleO::Services::AodhEvaluator': aodh_file,
'OS::TripleO::Services::AodhApi': aodh_file
}}
}}
pmef.return_value = None, resource_registry
arglist = [
@ -255,6 +258,7 @@ class TestContainerImagePrepare(TestPluginV1):
'ceph_tag': 'mytag',
'ceph_image': 'mydaemon',
'tag': 'passed-ci',
'neutron_driver': 'ovn',
'ceph_namespace': 'myceph',
'name_prefix': 'os-'
},

View File

@ -427,6 +427,8 @@ class PrepareImageFiles(command.Command):
'name_suffix': parsed_args.suffix,
}
self.parse_set_values(mapping_args, parsed_args.set)
pd = env.get('parameter_defaults', {})
kolla_builder.set_neutron_driver(pd, mapping_args)
output_images_file = (parsed_args.output_images_file
or 'container_images.yaml')