Age | Commit message (Collapse) | Author |
|
Will allow convenience methods such as
cmd :all do |cfg|
cfg.pop.shift
end
instead of:
cmd :all do |cfg|
cfg.each_line.to_a[1..-2].join
end
And what ever convenience configs we come up with
|
|
sh ip bgp | i foo
and you won't see empty line before prompt, ergo, we cannot always
remove it.
But I'm not too surprised JunOS + IOS templates are still mostly exactly
the same they were from my testing to see how Oxidized works over year
ago, they need rework to be production quality.
|
|
Change models to Asetus syntax
|
|
|
|
tested on SR and SAS routers
|
|
supports virtual chassis for OS6900
|
|
|
|
|
|
|
|
at least from version 5 onwards
|
|
|
|
that was run
|
|
|
|
|
|
|
|
|
|
^\r? was too strict
Also move non-config above of config, rancid-style.
Also Procurve is unbelievably shitty crapbox, screen drawing is shit,
telnet password is maximum 17 chars, ssh password maximum 16 chars, que?
|
|
Block must return string, it returned nil which broke it.
Also coerce type to string in future, so block won't fail so
catastrophically, just output missing.
|
|
Both post and pre are called after all 'cmd' are already called, but
output from 'pre' is put on top of configuration output and output from
'post' is put on bottom of confguration output.
Rationale is dynamic configuration, where you'll only know after running
some commands what commands you want to run.
Both except blocks, such as
pre do
# commands to execute
end
Both can be called multiple times
|
|
|
|
|
|
They keep changing dynamically in config
|
|
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.
|
|
Specifically AOS 6, vxworks era, not linux era 7
|
|
|
|
always attempt to enable if :enable password is configured
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Gives alternative, maybe less awkward way to do conditional commands.
You can first use cmd methods to gather stuff you want, then in main
method you could conditional to things based on them, maybe futher call
methods per model.
|
|
Easier screen-scraping, if each command produces always same set of
cruft that needs to be removed
|
|
Silly for shit-and-giggles attempt at rancid
|