From 59493879491f5d37282789e26bab2ac13afe14f7 Mon Sep 17 00:00:00 2001 From: Stig Telfer Date: Sat, 25 Jul 2020 21:14:59 +0100 Subject: [PATCH] Fix for KeyError during config preparation In this context, res has keys ['network', 'subnets', 'routers'] - it looks like the correct reference should be res["network"]["name"] Change-Id: I343a582c2ebed729cddebcb6ae8c660c29fec221 Closes-Bug: 1888866 --- rally_openstack/verification/tempest/context.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rally_openstack/verification/tempest/context.py b/rally_openstack/verification/tempest/context.py index cca6c3d0..acc7e2d0 100644 --- a/rally_openstack/verification/tempest/context.py +++ b/rally_openstack/verification/tempest/context.py @@ -154,7 +154,8 @@ class TempestContext(context.VerifierContext): if helper_method: res = helper_method(*args, **kwargs) if res: - value = res["name"] if "network" in option else res.id + value = res["network"]["name"] if ("network" in + option) else res.id LOG.debug("Setting value '%s' to option '%s'." % (value, option)) self.conf.set(section, option, value) LOG.debug("Option '{opt}' is configured. "