summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSaku Ytti <saku@ytti.fi>2014-08-30 11:42:45 +0300
committerSaku Ytti <saku@ytti.fi>2014-08-30 11:42:45 +0300
commit4eb1eb2cf9ae0701b6d51a1601b4049e825791d8 (patch)
tree566395e6ed5c68b7278d4d080c5ad399564dd434 /lib
parent3a24cc5ba5af14bff128c512a039abbfe5266bfa (diff)
Remove ntp clock-period completely
emj complained that it sometimes pops in, sometimes pops out. I guess really no point having it there.
Diffstat (limited to 'lib')
-rw-r--r--lib/oxidized/model/ios.rb4
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'