mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
fixes conditional processing with junos and xml data structures (#17801)
The conditional processing was failing due for two reasons: 1) The xml to json conversion string was not happening before the runner was processing the results 2) The Conditional instance was not parsing conditionals encoded with [] This fix address both issues.
This commit is contained in:
@@ -136,7 +136,7 @@ class Netconf(object):
|
||||
|
||||
for index, cmd in enumerate(commands):
|
||||
if cmd.output == 'xml':
|
||||
responses[index] = etree.tostring(responses[index])
|
||||
responses[index] = xml_to_json(responses[index])
|
||||
elif cmd.args.get('command_type') == 'rpc':
|
||||
responses[index] = str(responses[index].text).strip()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user