Nokia SR-OS classical CLI doesn't let you set global_cmd_verify (i.e. it is always hard-coded to False).
See original GitHub issueHi. I’m in the process of migrating my tools to netmiko 4.1.0. I’m wondering if send_config_set()
is behaving as before. This is how send config commands to the router, where inCmds
is a list of commands.
So, the commands I’m sending to the router are the following…
echo SCRIPT_NONO_START
/environment no more
/configure router interface loop8 loopback
/configure router interface loop8 address 11.11.11.23/32
exit all
echo SCRIPT_NONO_FIN
And this is how I send those by means of the function send_config_set()
:
inCmds = ['echo SCRIPT_NONO_START', '', '/environment no more', '/configure router interface loop8 loopback', '/configure router interface loop8 address 11.11.11.23/32', 'exit all', 'echo SCRIPT_NONO_FIN', '']
outputTxt = conn2rtr.send_config_set(config_commands=inCmds, enter_config_mode=False, cmd_verify=True, read_timeout=10)
However, when lookin at the debug shown by netmiko, it seems to me that netmiko is sending the commands as a bulk operation.
DEBUG:netmiko:[find_prompt()]: prompt is *A:myRouter#
DEBUG:netmiko:write_channel: b'echo SCRIPT_NONO_START\n'
DEBUG:netmiko:write_channel: b'\n'
DEBUG:netmiko:write_channel: b'/environment no more\n'
DEBUG:netmiko:write_channel: b'/configure router interface loop8 loopback\n'
DEBUG:netmiko:write_channel: b'/configure router interface loop8 address 11.11.11.23/32\n'
DEBUG:netmiko:write_channel: b'exit all\n'
DEBUG:netmiko:write_channel: b'echo SCRIPT_NONO_FIN\n'
DEBUG:netmiko:write_channel: b'\n'
DEBUG:netmiko:read_channel: echo SCRIPT_NONO_START
SCRIPT_NONO_START
*A:myRouter#
*A:myRouter# /environment no more
*A:myRouter# /configure router interface "loop8" loopback
*A:myRouter# /configure router interface "loop8" address 11.11.11.23/32
*A:
DEBUG:netmiko:read_channel: myRouter# exit all
*A:myRouter# echo SCRIPT_NONO_FIN
DEBUG:netmiko:read_channel: SCRIPT_NONO_FIN
*A:myRouter#
DEBUG:netmiko:read_channel:
DEBUG:netmiko:read_channel:
DEBUG:netmiko:write_channel: b'exit all\n'
DEBUG:netmiko:read_channel:
DEBUG:netmiko:read_channel:
DEBUG:netmiko:read_channel:
DEBUG:netmiko:read_channel:
DEBUG:netmiko:read_channel:
DEBUG:netmiko:read_channel: exit all
Is that so? I don’t have a log with me at this moment, but I’m pretty sure that netmiko 3.4.0 would perform a command verify per each individual command in the list provided to send_config_set()
. I know that, because with 3.4.0 if there was any difference between the sent command with respect to the echo, netmiko would complain. And now it is not happening …
For example: I’m sending (on purpose) the line configure router interface loop8 loopback
and the router is echoing configure router interface "loop8" loopback
(note the ""
on the interface name). Before this would imply an error; it is not happening now…
Regards!
Lucas
Issue Analytics
- State:
- Created a year ago
- Comments:8 (8 by maintainers)
Top GitHub Comments
Should be fixed…thanks for your contribution on this @laimaretto
LOL, I messed that up also…yep, you are totally right.