Closed piter50 closed 7 years ago
Can you disable this?
line vty 0 4
exec prompt timestamp
in other words, your config has made your output non-standard.
The general problem is that we can't write the getters() such that any changes someone makes to the output in the CLI can be accommodated. It is hard-enough just to handle the normal variations in output.
Second option...if NAPALM-ios and possibly salt integration provided a way to dynamically modify that, is that an acceptable solution to you?
In other words, you pass in a CLI command at beginning of session to disable this in your config. At the end of the session, you then restore the config?
Actually, it looks like it can be turned off on a per session basis and would not need to be done in config mode.
The command would be
terminal no exec prompt timestamp
Subsequent logins would turn it back on.
I was able to get around it by adding to the netmiko libraries...
to netmiko/base_connection.py, i just added a set_timestamp_off command which i just copied from the set terminal width command and added a line for set_timestamp_off in the session_preparation.
cisco/cisco_ios.py: self.set_timestamp_off(command='terminal no exec prompt timestamp')
@piter50 Nice, is that a workable solution for you?
Sounds like a good workaround for me too!
It is a workable solution for me. Is it something you would consider adding/merging to the netmiko code?
Probably not...as this is the first time I have ever seen this issue. Someone can always just turn it off in Netmiko (pretty easily).
Fair enough. I had to patch my rancid set up for this prior to release 3.0 where the devs added it in. Thanks
I will probably watch and see if other people have this issue. It also becomes more problematic for things that depend on Netmiko (NAPALM/Ansible/Salt) where it might not be so easy to directly turn it off.
If a cisco ios device is configured with the following:
it will prepend
to commands. Some commands get an extra empty newline which causes the get function to exit early.
This throws off some of the get commands parsing which are not expecting an extra 2-3 lines