diff options
author | Saku Ytti <saku@ytti.fi> | 2014-12-03 15:22:19 +0200 |
---|---|---|
committer | Saku Ytti <saku@ytti.fi> | 2014-12-03 15:22:19 +0200 |
commit | 53daa6fab0b87c6ef6dc3efda9f0eff0f6af5e3e (patch) | |
tree | c2f3e679f5770941d2dbc8036266a8617a3340c7 /lib/oxidized/model/ios.rb | |
parent | 32733012e2bcda5373406aec8156dcb9c00a58ce (diff) | |
parent | 6132f0f825d281c2d5c7d918239eeec80b3e87be (diff) |
Merge branch 'master' into cfg_as_object
Diffstat (limited to 'lib/oxidized/model/ios.rb')
-rw-r--r-- | lib/oxidized/model/ios.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/oxidized/model/ios.rb b/lib/oxidized/model/ios.rb index d2b4996..6fa3c5c 100644 --- a/lib/oxidized/model/ios.rb +++ b/lib/oxidized/model/ios.rb @@ -37,9 +37,9 @@ class IOS < Oxidized::Model end cmd 'show running-config' do |cfg| - cfg = cfg.each_line.to_a[3..-1].join + cfg = cfg.each_line.to_a[3..-1] + cfg = cfg.reject { |line| line.match /^ntp clock-period / }.join cfg.gsub! /^Current configuration : [^\n]*\n/, '' - cfg.sub! /^(ntp clock-period).*/, '! \1' cfg.gsub! /^\ tunnel\ mpls\ traffic-eng\ bandwidth[^\n]*\n*( (?:\ [^\n]*\n*)* tunnel\ mpls\ traffic-eng\ auto-bw)/mx, '\1' |