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
This commit is contained in:
parent
4c207ae082
commit
5949387949
@ -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…
x
Reference in New Issue
Block a user