mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-01 05:49:09 -07:00
update junos_command integration tests (#22213)
fixes integration test to check for full rpc-reply string when converted from xml. This is a change from 2.2 as the rpc-reply tag is no longer stripped off
This commit is contained in:
parent
3afc993f3a
commit
911600acf9
9 changed files with 26 additions and 24 deletions
|
@ -229,15 +229,17 @@ def main():
|
|||
while retries > 0:
|
||||
responses = run_commands(module, commands)
|
||||
|
||||
for item in list(conditionals):
|
||||
|
||||
for index, (resp, cmd) in enumerate(zip(responses, commands)):
|
||||
if cmd['output'] == 'xml':
|
||||
if not HAS_JXMLEASE:
|
||||
module.fail_json(msg='jxmlease is required but does not appear to '
|
||||
'be installed. It can be installed using `pip install jxmlease`')
|
||||
for index, (resp, cmd) in enumerate(zip(responses, commands)):
|
||||
if cmd['output'] == 'xml':
|
||||
if not HAS_JXMLEASE:
|
||||
module.fail_json(msg='jxmlease is required but does not appear to '
|
||||
'be installed. It can be installed using `pip install jxmlease`')
|
||||
try:
|
||||
responses[index] = jxmlease.parse(resp)
|
||||
except:
|
||||
raise ValueError(resp)
|
||||
|
||||
for item in list(conditionals):
|
||||
try:
|
||||
if item(responses):
|
||||
if match == 'any':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue