summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/acos.rb
diff options
context:
space:
mode:
authorytti <saku@ytti.fi>2018-04-25 16:12:44 +0300
committerGitHub <noreply@github.com>2018-04-25 16:12:44 +0300
commit583bc422448a234a215113a15f8a6976c50b2296 (patch)
treeb3f757e6f37aa058a0c80e4ded3ef82553bc98c1 /lib/oxidized/model/acos.rb
parent9a7d16c00163c421d2c9f3cb2783c76633860336 (diff)
parentdffae0f76656a57da8f5473ce21955638cbe1f7f (diff)
Merge pull request #1296 from wk/the-great-makeover
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