diff options
| author | Saku Ytti <saku@ytti.fi> | 2013-05-01 13:45:02 +0300 | 
|---|---|---|
| committer | Saku Ytti <saku@ytti.fi> | 2013-05-01 14:06:44 +0300 | 
| commit | c252a589b6b0274a17bfe40db3fd57ebeea3beb8 (patch) | |
| tree | 0115a10db0f37506e72aaf4a873aeea93734f6ab /lib/oxidized/config | |
| parent | 387b725fcd248d052cfe68da97f03192959ad6a4 (diff) | |
Add Model#expect, support block at post/pre config
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.
Diffstat (limited to 'lib/oxidized/config')
| -rw-r--r-- | lib/oxidized/config/bootstrap.rb | 7 | 
1 files changed, 5 insertions, 2 deletions
| diff --git a/lib/oxidized/config/bootstrap.rb b/lib/oxidized/config/bootstrap.rb index 6d865b5..bae2b70 100644 --- a/lib/oxidized/config/bootstrap.rb +++ b/lib/oxidized/config/bootstrap.rb @@ -4,13 +4,16 @@ module Oxidized    CFG.username = 'username'    CFG.password = 'password'    CFG.model    = 'junos' -  CFG.interval = 60 +  CFG.interval = 3600    CFG.log      = File.join Config::Root, 'log'    CFG.debug    = false    CFG.threads  = 30    CFG.timeout  = 5 -  CFG.prompt   = /^([\w\.\-@]{3,30}[#>]\s?)$/  +  CFG.prompt   = /^([\w.@-]+[#>]\s?)$/    CFG.rest     = 8888 +  CFG.vars     = { +    :enable  => 'enablePW', +  }    CFG.input    = {      :default => 'ssh, telnet',    } | 
