summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/acos.rb
diff options
context:
space:
mode:
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