Merge pull request #17253 from privateip/nxos
implements command_string property when preparing commands
This commit is contained in:
commit
09f3c3d074
1 changed files with 2 additions and 2 deletions
|
@ -251,7 +251,7 @@ class Cli(CliBase):
|
||||||
except ValueError:
|
except ValueError:
|
||||||
raise NetworkError(
|
raise NetworkError(
|
||||||
msg='unable to load response from device',
|
msg='unable to load response from device',
|
||||||
response=responses[index]
|
response=responses[index], command=str(cmd)
|
||||||
)
|
)
|
||||||
return responses
|
return responses
|
||||||
|
|
||||||
|
@ -287,5 +287,5 @@ def prepare_commands(commands):
|
||||||
jsonify = lambda x: '%s | json' % x
|
jsonify = lambda x: '%s | json' % x
|
||||||
for cmd in to_list(commands):
|
for cmd in to_list(commands):
|
||||||
if cmd.output == 'json':
|
if cmd.output == 'json':
|
||||||
cmd.command = jsonify(cmd)
|
cmd.command_string = jsonify(cmd)
|
||||||
yield cmd
|
yield cmd
|
||||||
|
|
Loading…
Reference in a new issue