Recursively replace all : with . in Output keys.
This is needed so that some Quantum properties with colons in the keys are not interpreted as xml namespaces. Change-Id: Iba5290a408595b2f028744c10315daac29da055e
This commit is contained in:
parent
499e492d94
commit
b3a57062ad
@ -148,7 +148,22 @@ class StackController(object):
|
||||
engine_api.OUTPUT_VALUE: 'OutputValue',
|
||||
}
|
||||
|
||||
return api_utils.reformat_dict_keys(keymap, o)
|
||||
def replacecolon(d):
|
||||
return dict(map(lambda (k, v):
|
||||
(k.replace(':', '.'), v), d.items()))
|
||||
|
||||
def transform(attrs):
|
||||
"""
|
||||
Recursively replace all : with . in dict keys
|
||||
so that they are not interpreted as xml namespaces.
|
||||
"""
|
||||
new = replacecolon(attrs)
|
||||
for key, value in new.items():
|
||||
if isinstance(value, dict):
|
||||
new[key] = transform(value)
|
||||
return new
|
||||
|
||||
return api_utils.reformat_dict_keys(keymap, transform(o))
|
||||
|
||||
def format_stack(s):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user