Fix neutron driver detection for containers params

If neutorn driver is set, use it for container parameters.

Close-Bug: rhbz#1930438
Change-Id: If85ca7a92152e834bffb7fad69d71668f7ed362b
(cherry picked from commit 5104fdf589)
This commit is contained in:
Sagi Shnaidman 2021-04-07 15:08:34 +03:00
parent dbdaa05dc6
commit e28d539d98
1 changed files with 2 additions and 0 deletions

View File

@ -122,6 +122,8 @@ def set_neutron_driver(pd, mapping_args):
:param pd: Parameter defaults from the environment :param pd: Parameter defaults from the environment
:param mapping_args: Dict to set neutron_driver value on :param mapping_args: Dict to set neutron_driver value on
""" """
if mapping_args.get('neutron_driver'):
return
if not pd or 'NeutronMechanismDrivers' not in pd: if not pd or 'NeutronMechanismDrivers' not in pd:
# we should set default neutron driver # we should set default neutron driver
mapping_args['neutron_driver'] = 'ovn' mapping_args['neutron_driver'] = 'ovn'