diff options
author | Saku Ytti <saku@ytti.fi> | 2014-03-28 12:25:05 +0200 |
---|---|---|
committer | Saku Ytti <saku@ytti.fi> | 2014-03-28 12:25:05 +0200 |
commit | d436728663ecd64ab3a7f6da467ab2edbf1a091d (patch) | |
tree | becdb88117b1fcb0af2932d9567d508fc2cff442 | |
parent | fb8ee99105df5ddacaa47b84f833616f536667ac (diff) |
added AOSW (AOS Wireless / Aruba) support
-rw-r--r-- | lib/oxidized/model/aosw.rb | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/lib/oxidized/model/aosw.rb b/lib/oxidized/model/aosw.rb new file mode 100644 index 0000000..ac19379 --- /dev/null +++ b/lib/oxidized/model/aosw.rb @@ -0,0 +1,43 @@ +class AOSW < Oxidized::Model + + # AOSW - Alcatel-Lucent OS - Wireless + # Used in Alcatel OAW-4750 WLAN controller (Aruba) + + comment '# ' + prompt /^\([^)]+\) #/ + + cmd :all do |cfg| + cfg.each_line.to_a[1..-2].join + end + + cmd 'show version' do |cfg| + cfg = cfg.each_line.select { |line| not line.match /Switch uptime/i } + comment cfg + end + + cmd 'show inventory' do |cfg| + cfg = cfg.each_line.take_while { |line| not line.match /Main Board Temp/i } + comment cfg + end + + cmd 'show slots' do |cfg| + comment cfg + end + cmd 'show license' do |cfg| + comment cfg + end + cmd 'show configuration' do |cfg| + cfg + end + + cfg :telnet do + username /^User:\s*/ + password /^Password:\s*/ + end + + cfg :telnet, :ssh do + post_login 'no paging' + pre_logout 'exit' + end + +end |