Browse Source

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
changes/44/743044/1
Stig Telfer 1 week ago
parent
commit
5949387949
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      rally_openstack/verification/tempest/context.py

+ 2
- 1
rally_openstack/verification/tempest/context.py View File

@@ -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. "


Loading…
Cancel
Save