Age | Commit message (Collapse) | Author |
|
This is a port of some of the rancid "show version" parsing. I tried to
simplify it from the way rancid does it, so it doesn't attempt to guess
the device type, but it does provide IOS version and the type of
processor.
|
|
Node - Cumulus additional params
|
|
|
|
Do the terminal configure after enable since it might be prohibited in non ena
|
|
|
|
|
|
|
|
This makes the model racy, some might say broken.
|
|
emj complained that it sometimes pops in, sometimes pops out. I guess
really no point having it there.
|
|
- ios show first line of 'show version'
- junos display omitted config
|
|
a) grit is not supported, rugged is
b) grit requires git CLI installed, rugged does not
c) grit needs monkey patching to work, rugged does not
Closes #21
Closes #22
|
|
|
|
Variables can now be fed to model from multiple locations. In order of
preference:
1) node (from source)
2) group
3) global
In a model vars should be accessed via 'vars' helper method though it is
not required. Helper method ignores nil values so care needs to taken
when designing model behaviour.
Support for node level vars is currently available on sql source via
'vars_map' configuration.
Following example populates node vars 'enable' and 'somevariable' from sql
columns 'var_enable' and 'var_somevariable'
sql:
adapter: sqlite
file: /home/aakso/.config/oxidized/sqrouter.db
table: nodes
map:
name: hostname
model: model
group: node_group
username: username
password: password
vars_map:
enable: var_enablepw
somevariable: var_somevariable
|
|
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
|
|
|
|
Crappy Cisco WLC 5k, much quality, very implementation, such secure
* stop pre_logout from expecting prompt by default
|
|
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.
|
|
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
|