summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/aosw.rb
diff options
context:
space:
mode:
authorWild Kat <wk@futureinquestion.net>2018-04-21 13:27:05 +0200
committerWild Kat <wk@futureinquestion.net>2018-04-21 13:35:54 +0200
commit21e3d6490496573f25ef77fe8172766ac7d1a736 (patch)
tree785e5243f5f7ffe7e5a4bfcde551ec04c723b2ae /lib/oxidized/model/aosw.rb
parent2648b1bb271727976e2d96123fcd51d52af39f79 (diff)
the great makeover - standardize layout, alignment, indentation
Diffstat (limited to 'lib/oxidized/model/aosw.rb')
-rw-r--r--lib/oxidized/model/aosw.rb24
1 files changed, 11 insertions, 13 deletions
diff --git a/lib/oxidized/model/aosw.rb b/lib/oxidized/model/aosw.rb
index 3397305..7543353 100644
--- a/lib/oxidized/model/aosw.rb
+++ b/lib/oxidized/model/aosw.rb
@@ -1,14 +1,13 @@
class AOSW < Oxidized::Model
-
# AOSW Aruba Wireless, IAP, Instant Controller and Mobility Access Switches
# Used in Alcatel OAW-4750 WLAN controller
# Also Dell controllers
-
+
# HPE Aruba Switches should use a different model as the software is based on the HP Procurve line.
-
+
# Support for IAP & Instant Controller tested with 115, 205, 215 & 325 running 6.4.4.8-4.2.4.5_57965
# Support for Mobility Access Switches tested with S2500-48P & S2500-24P running 7.4.1.4_54199 and S2500-24P running 7.4.1.7_57823
- # All IAPs connected to a Instant Controller will have the same config output. Only the controller needs to be monitored.
+ # All IAPs connected to a Instant Controller will have the same config output. Only the controller needs to be monitored.
comment '# '
prompt /^\(?.+\)?\s[#>]/
@@ -26,11 +25,11 @@ class AOSW < Oxidized::Model
cfg.gsub!(/ sha (\S+)/, ' sha <secret removed>')
cfg.gsub!(/ des (\S+)/, ' des <secret removed>')
cfg.gsub!(/mobility-manager (\S+) user (\S+) (\S+)/, 'mobility-manager \1 user \2 <secret removed>')
- cfg.gsub!(/mgmt-user (\S+) (root|guest\-provisioning|network\-operations|read\-only|location\-api\-mgmt) (\S+)$/, 'mgmt-user \1 \2 <secret removed>') #MAS & Wireless Controler
- cfg.gsub!(/mgmt-user (\S+) (\S+)( (read\-only|guest\-mgmt))?$/, 'mgmt-user \1 <secret removed> \3') #IAP
-#MAS format: mgmt-user <username> <accesslevel> <password hash>
-#IAP format (root user): mgmt-user <username> <password hash>
-#IAP format: mgmt-user <username> <password hash> <access level>
+ cfg.gsub!(/mgmt-user (\S+) (root|guest\-provisioning|network\-operations|read\-only|location\-api\-mgmt) (\S+)$/, 'mgmt-user \1 \2 <secret removed>') # MAS & Wireless Controler
+ cfg.gsub!(/mgmt-user (\S+) (\S+)( (read\-only|guest\-mgmt))?$/, 'mgmt-user \1 <secret removed> \3') # IAP
+ # MAS format: mgmt-user <username> <accesslevel> <password hash>
+ # IAP format (root user): mgmt-user <username> <password hash>
+ # IAP format: mgmt-user <username> <password hash> <access level>
cfg.gsub!(/key (\S+)$/, 'key <secret removed>')
cfg.gsub!(/wpa-passphrase (\S+)$/, 'wpa-passphrase <secret removed>')
cfg.gsub!(/bkup-passwords (\S+)$/, 'bkup-passwords <secret removed>')
@@ -45,17 +44,17 @@ class AOSW < Oxidized::Model
end
cmd 'show inventory' do |cfg|
- cfg = "" if cfg.match /(Invalid input detected at '\^' marker|Parse error)/ #Don't show for unsupported devices (IAP and MAS)
+ cfg = "" if cfg.match /(Invalid input detected at '\^' marker|Parse error)/ # Don't show for unsupported devices (IAP and MAS)
rstrip_cfg clean cfg
end
cmd 'show slots' do |cfg|
- cfg = "" if cfg.match /(Invalid input detected at '\^' marker|Parse error)/ #Don't show for unsupported devices (IAP and MAS)
+ cfg = "" if cfg.match /(Invalid input detected at '\^' marker|Parse error)/ # Don't show for unsupported devices (IAP and MAS)
rstrip_cfg comment cfg
end
cmd 'show license' do |cfg|
- cfg = "" if cfg.match /(Invalid input detected at '\^' marker|Parse error)/ #Don't show for unsupported devices (IAP and MAS)
+ cfg = "" if cfg.match /(Invalid input detected at '\^' marker|Parse error)/ # Don't show for unsupported devices (IAP and MAS)
rstrip_cfg comment cfg
end
@@ -112,5 +111,4 @@ class AOSW < Oxidized::Model
out = comment out.join "\n"
out << "\n"
end
-
end