From 7a192e56c9751f268a7f3f84d8b438b5a1ec552a Mon Sep 17 00:00:00 2001 From: Frode Nordahl Date: Fri, 22 Apr 2022 09:19:49 +0200 Subject: [PATCH] dvr_enabled: Avoid KeyError when Neutron not present --- zaza/openstack/utilities/openstack.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zaza/openstack/utilities/openstack.py b/zaza/openstack/utilities/openstack.py index fdadcb1..1dfe5a5 100644 --- a/zaza/openstack/utilities/openstack.py +++ b/zaza/openstack/utilities/openstack.py @@ -650,7 +650,10 @@ def dvr_enabled(): :returns: True when DVR is enabled, False otherwise :rtype: bool """ - return get_application_config_option('neutron-api', 'enable-dvr') + try: + return get_application_config_option('neutron-api', 'enable-dvr') + except KeyError: + return False def ngw_present():