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

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
This commit is contained in:
Trishna Guha 2018-09-07 16:35:37 +05:30 committed by GitHub
parent 778b789c84
commit f18856d0e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -161,7 +161,7 @@ class Cli:
if network_api == 'cliconf' and 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':
commands[index]['output'] = 'text'
out = connection.run_commands(commands, check_rc)