Age | Commit message (Collapse) | Author |
|
Refactor to common login method to ssh/telnet was broken, as common login method made assumptions of expect and cmd API which weren't true for telnet.
telnet.rb updated to resemble ssh.rb API.
|
|
|
|
* Fixed: fix debug logging (passed @log to telnet)
* Fixed: call closed on sock of telnet instead of telnet
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
When I try to run oxidized as a different user, I get permission errors
for oxidized tries to write debug logs (e.g. true-telnet) in current
working directory which in my case is not writable for the
non-privileged user. I think this can be improved by this change.
1) Why would you use CFG.input.debug?.to_s (which in this case will
always be ‘true’) as a prefix at all
2) let’s use the crash directory for the debug output, as we know this
is available and choose a more descriptive name
|
|
|
|
Some of my switches don’t expect any username on telnet. This change
allows me to leave the username field effectively empty for a switch.
|
|
|
|
|
|
|
|
If you have
input:
debug: session_log
Then session_log-telnet and session_log-ssh will be created showing what
the telnet/ssh saw. Helpful in model development.
|
|
Waittime is how long it waits for /more/ input /after/ matching to RE.
This has been wrong always in Oxidized but only after changing default
timeout to 30, it became apparent.
When timeout was 5s, it just gave 5s delay to every command, now it
gives 30s delay.
|
|
Main benefits
a) we get support for system wide configs
b) we don't use symbols in config file, they're confusing to
non-rubyist
|
|
- add 'connnected?' method to ssh/telnet to query if or not we're
connected
- subclass OxidizedError from StandardError, all future OxidizedErrors
should be subclasssed from this.
|
|
Crappy Cisco WLC 5k, much quality, very implementation, such secure
* stop pre_logout from expecting prompt by default
|
|
Outputs about what we've seen last in input class. Quite dirty in
telnet, so not sure I'm going to support it. Let's see if there is
use-case for it.
|
|
|
|
Now input ssh has configuration secure which is false by default,
meaning we don't care about changing keys. It breaks ssh security model
but rancid does it too.
Also input models error handling is now mostly moved to node.rb for
centralized handling + logging. With input models only defining which
errors they want to receover from.
|
|
|
|
use TimeoutError for compatibility
|
|
|
|
Now we can deal with pager and additional PW prompts, such as 'enable'
Examples in IOS model how to use.
The Telnet implementation is particularly fugly, I just need one line in
'waitfor' to handle pager while waiting for prompt, but couldn't figure
out clean way to do it, so needed to rewrit whole Telnet#waitfor just to
add that line.
|
|
Some devices might throw us out, while we are waiting for command to
compelete
|
|
Dell Powerconnect does this
|
|
|
|
Kudos to Samer Abdel-Hafez for noticing
|
|
Silly for shit-and-giggles attempt at rancid
|