diff options
Diffstat (limited to 'lib/oxidized/model')
-rw-r--r-- | lib/oxidized/model/ipos.rb | 8 | ||||
-rw-r--r-- | lib/oxidized/model/weos.rb | 22 | ||||
-rw-r--r-- | lib/oxidized/model/xos.rb | 4 |
3 files changed, 33 insertions, 1 deletions
diff --git a/lib/oxidized/model/ipos.rb b/lib/oxidized/model/ipos.rb index 5efd831..938f12d 100644 --- a/lib/oxidized/model/ipos.rb +++ b/lib/oxidized/model/ipos.rb @@ -3,7 +3,7 @@ class IPOS < Oxidized::Model # Ericsson SSR (IPOS) # Redback SE (SEOS) - prompt /^([\[\]\w.@-]+[#>]\s?)$/ + prompt /^([\[\]\w.@-]+[#:>]\s?)$/ comment '! ' cmd 'show chassis' do |cfg| @@ -52,6 +52,12 @@ class IPOS < Oxidized::Model cfg :telnet, :ssh do post_login 'terminal length 0' + if vars :enable + post_login do + cmd "enable" + cmd vars(:enable) + end + end pre_logout do send "exit\n" send "n\n" diff --git a/lib/oxidized/model/weos.rb b/lib/oxidized/model/weos.rb new file mode 100644 index 0000000..1b20286 --- /dev/null +++ b/lib/oxidized/model/weos.rb @@ -0,0 +1,22 @@ +class WEOS < Oxidized::Model + + #Westell WEOS, works with Westell 8178G, Westell 8266G + + prompt /^(\s[\w.@-]+[#>]\s?)$/ + + cmd :all do |cfg| + cfg.each_line.to_a[1..-2].join + end + + cmd 'show running-config' do |cfg| + cfg + end + + cfg :telnet do + username /login:/ + password /assword:/ + post_login 'cli more disable' + pre_logout 'logout' + end + +end diff --git a/lib/oxidized/model/xos.rb b/lib/oxidized/model/xos.rb index 6f1323f..90f6f4a 100644 --- a/lib/oxidized/model/xos.rb +++ b/lib/oxidized/model/xos.rb @@ -29,6 +29,10 @@ class XOS < Oxidized::Model cmd 'show configuration' + cmd 'show policy detail' do |cfg| + comment cfg + end + cfg :telnet do username /^login:/ password /^\r*password:/ |