mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 03:11:24 -07: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:
parent
fb50698da3
commit
c534f8f9fc
2 changed files with 9 additions and 7 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue