summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/acos.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/acos.rb
parent2648b1bb271727976e2d96123fcd51d52af39f79 (diff)
the great makeover - standardize layout, alignment, indentation
Diffstat (limited to 'lib/oxidized/model/acos.rb')
-rw-r--r--lib/oxidized/model/acos.rb31
1 files changed, 15 insertions, 16 deletions
diff --git a/lib/oxidized/model/acos.rb b/lib/oxidized/model/acos.rb
index 47649a2..a2db89c 100644
--- a/lib/oxidized/model/acos.rb
+++ b/lib/oxidized/model/acos.rb
@@ -3,7 +3,7 @@ class ACOS < Oxidized::Model
comment '! '
- ##ACOS prompt changes depending on the state of the device
+ # ACOS prompt changes depending on the state of the device
prompt /^([-\w.\/:?\[\]\(\)]+[#>]\s?)$/
cmd :secret do |cfg|
@@ -30,19 +30,19 @@ class ACOS < Oxidized::Model
end
cmd 'show partition-config all' do |cfg|
- cfg.gsub! /(Current configuration).*/, '\\1 <removed>'
- cfg.gsub! /(Configuration last updated at).*/, '\\1 <removed>'
- cfg.gsub! /(Configuration last saved at).*/, '\\1 <removed>'
- cfg.gsub! /(Configuration last synchronized at).*/, '\\1 <removed>'
- cfg
- end
+ cfg.gsub! /(Current configuration).*/, '\\1 <removed>'
+ cfg.gsub! /(Configuration last updated at).*/, '\\1 <removed>'
+ cfg.gsub! /(Configuration last saved at).*/, '\\1 <removed>'
+ cfg.gsub! /(Configuration last synchronized at).*/, '\\1 <removed>'
+ cfg
+ end
cmd 'show running-config all-partitions' do |cfg|
- cfg.gsub! /(Current configuration).*/, '\\1 <removed>'
- cfg.gsub! /(Configuration last updated at).*/, '\\1 <removed>'
- cfg.gsub! /(Configuration last saved at).*/, '\\1 <removed>'
- cfg.gsub! /(Configuration last synchronized at).*/, '\\1 <removed>'
- cfg
+ cfg.gsub! /(Current configuration).*/, '\\1 <removed>'
+ cfg.gsub! /(Configuration last updated at).*/, '\\1 <removed>'
+ cfg.gsub! /(Configuration last saved at).*/, '\\1 <removed>'
+ cfg.gsub! /(Configuration last synchronized at).*/, '\\1 <removed>'
+ cfg
end
cmd 'show aflex all-partitions' do |cfg|
@@ -50,7 +50,7 @@ class ACOS < Oxidized::Model
end
cmd 'show aflex all-partitions' do |cfg|
- @partitions_aflex = cfg.lines.each_with_object({}) do |l,h|
+ @partitions_aflex = cfg.lines.each_with_object({}) do |l, h|
h[$1] = [] if l.match /partition: (.+)/
# only consider scripts that have passed syntax check
h[h.keys.last] << $1 if l.match /^([\w-]+) +Check/
@@ -66,7 +66,7 @@ class ACOS < Oxidized::Model
pre do
unless @partitions_aflex.empty?
out = []
- @partitions_aflex.each do |partition,arules|
+ @partitions_aflex.each do |partition, arules|
out << "! partition: #{partition}"
arules.each do |name|
cmd("show aflex #{name} partition #{partition}") do |cfg|
@@ -85,7 +85,7 @@ class ACOS < Oxidized::Model
username /login:/
password /^Password:/
end
-
+
cfg :telnet, :ssh do
# preferred way to handle additional passwords
post_login do
@@ -98,5 +98,4 @@ class ACOS < Oxidized::Model
post_login 'terminal width 0'
pre_logout "exit\nexit\nY\r\n"
end
-
end