summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Drake <rfdrake@users.noreply.github.com>2017-03-24 21:59:19 -0400
committerRobert Drake <rfdrake@users.noreply.github.com>2017-03-28 15:08:29 -0400
commit49b4087297a528cfd5e5f1a0c88fccab7695ad8e (patch)
treec2aa5d6cf91480623147753f6d93fcc3668e6aad
parent0a6cbe3d10dd6d78cf8ec93ad66ebd69e0780946 (diff)
whitespace cleanup / fixing invalid command
-rw-r--r--lib/oxidized/model/ios.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/oxidized/model/ios.rb b/lib/oxidized/model/ios.rb
index a522257..afd419e 100644
--- a/lib/oxidized/model/ios.rb
+++ b/lib/oxidized/model/ios.rb
@@ -20,7 +20,7 @@ class IOS < Oxidized::Model
#cfg.gsub! /\cH+\s{8}/, '' # example how to handle pager
#cfg.gsub! /\cH+/, '' # example how to handle pager
# get rid of errors for commands that don't work on some devices
- cfg.gsub! /^ % Invalid input detected at '\^' marker\./, ''
+ cfg.gsub! /^% Invalid input detected at '\^' marker\.$|^\s+\^$/, ''
cfg.each_line.to_a[1..-2].join
end
@@ -59,11 +59,11 @@ class IOS < Oxidized::Model
comments << "Memory:#{slave} main #{mem}";
# check the next two lines for more CPU info
if cfg.lines[i+1].match /processor board id (\S+)/i
- comments << "Processor ID: #{$1}";
+ comments << "Processor ID: #{$1}";
end
if cfg.lines[i+2].match /(cpu at |processor: |#{cpu} processor,)/i
- # change implementation to impl and prepend comma
- cpuxtra = cfg.lines[i+2].gsub(/implementation/,'impl').gsub(/^/,', ').chomp;
+ # change implementation to impl and prepend comma
+ cpuxtra = cfg.lines[i+2].gsub(/implementation/,'impl').gsub(/^/,', ').chomp;
end
comments << "CPU:#{slave} #{cpu}#{cpuxtra}#{slaveslot}";
end