Merge "Fix neutron driver detection for containers params"

This commit is contained in:
Zuul 2021-04-19 06:07:33 +00:00 committed by Gerrit Code Review
commit 7896e481f0
1 changed files with 7 additions and 5 deletions

View File

@ -115,10 +115,12 @@ def set_neutron_driver(pd, mapping_args):
:param pd: Parameter defaults from the environment
: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:
# we should set default neutron driver
mapping_args['neutron_driver'] = 'ovn'
return
else:
nmd = pd['NeutronMechanismDrivers']
if 'ovn' in nmd:
mapping_args['neutron_driver'] = 'ovn'