Add ambiguous command check as the error message is not persistent on nexus devices (#45337)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
pull/45345/head
Trishna Guha 6 years ago committed by GitHub
parent 778b789c84
commit f18856d0e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -161,7 +161,7 @@ class Cli:
if network_api == 'cliconf' and out: if network_api == 'cliconf' and out:
for index, resp in enumerate(out): for index, resp in enumerate(out):
if 'Invalid command at' in resp and 'json' in resp: if ('Invalid command at' in resp or 'Ambiguous command at' in resp) and 'json' in resp:
if commands[index]['output'] == 'json': if commands[index]['output'] == 'json':
commands[index]['output'] = 'text' commands[index]['output'] = 'text'
out = connection.run_commands(commands, check_rc) out = connection.run_commands(commands, check_rc)

Loading…
Cancel
Save