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:
Peter Sprygada 2016-09-28 20:58:43 -04:00 committed by GitHub
parent fb50698da3
commit c534f8f9fc
2 changed files with 9 additions and 7 deletions

View file

@ -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()