summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/aosw.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oxidized/model/aosw.rb')
-rw-r--r--lib/oxidized/model/aosw.rb22
1 files changed, 18 insertions, 4 deletions
diff --git a/lib/oxidized/model/aosw.rb b/lib/oxidized/model/aosw.rb
index 26ee0fa..203c5e0 100644
--- a/lib/oxidized/model/aosw.rb
+++ b/lib/oxidized/model/aosw.rb
@@ -1,7 +1,8 @@
class AOSW < Oxidized::Model
- # AOSW - Alcatel-Lucent OS - Wireless
- # Used in Alcatel OAW-4750 WLAN controller (Aruba)
+ # AOSW Aruba Wireless
+ # Used in Alcatel OAW-4750 WLAN controller
+ # Also Dell controllers
comment '# '
prompt /^\([^)]+\) #/
@@ -16,8 +17,7 @@ class AOSW < Oxidized::Model
end
cmd 'show inventory' do |cfg|
- cfg = cfg.each_line.take_while { |line| not line.match /Output \d Config/i }
- comment cfg.join
+ clean cfg
end
cmd 'show slots' do |cfg|
@@ -40,4 +40,18 @@ class AOSW < Oxidized::Model
pre_logout 'exit'
end
+ def clean cfg
+ out = []
+ cfg.each_line do |line|
+ # drop the temperature, fan speed and voltage, which change each run
+ next if line.match /Output \d Config/i
+ next if line.match /(Tachometers|Temperatures|Voltages)/
+ next if line.match /((Card|CPU) Temperature|Chassis Fan|VMON1[0-9])/
+ next if line.match /[0-9]+ (RPM|mV|C)$/
+ out << line.strip
+ end
+ out = out.join "\n"
+ out << "\n"
+ end
+
end