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:
parent
778b789c84
commit
f18856d0e2
1 changed files with 1 additions and 1 deletions
|
@ -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…
Reference in a new issue