lib/oxidized/model/aireos.rb in oxidized-0.24.0 vs lib/oxidized/model/aireos.rb in oxidized-0.25.0
- old
+ new
@@ -1,14 +1,14 @@
class Aireos < Oxidized::Model
# AireOS (at least I think that is what it's called, hard to find data)
# Used in Cisco WLC 5500
comment '# ' # this complains too, can't find real comment char
- prompt /^\([^\)]+\)\s>/
+ prompt /^\([^)]+\)\s>/
cmd :all do |cfg|
- cfg.each_line.to_a[1..-2].join
+ cfg.cut_both
end
# show sysinfo?
# show switchconfig?
@@ -42,9 +42,10 @@
def clean cfg
out = []
cfg.each_line do |line|
next if line.match /^\s*$/
next if line.match /rogue (adhoc|client) (alert|Unknown) [\da-f]{2}:/
+
line = line[1..-1] if line[0] == "\r"
out << line.strip
end
out = out.join "\n"
out << "\n"