diff options
author | Saku Ytti <saku@ytti.fi> | 2014-04-15 20:45:24 +0300 |
---|---|---|
committer | Saku Ytti <saku@ytti.fi> | 2014-04-15 20:45:24 +0300 |
commit | 8abe0b299990fba0e12875634368922abe2710df (patch) | |
tree | e952d1a062a1e7e43417f4d64687f7ce4ba399f4 /lib/oxidized/model | |
parent | c1dbc182671e52014966db96ed0a3f7a016a384d (diff) |
the second to last line isn't always empty
sh ip bgp | i foo
and you won't see empty line before prompt, ergo, we cannot always
remove it.
But I'm not too surprised JunOS + IOS templates are still mostly exactly
the same they were from my testing to see how Oxidized works over year
ago, they need rework to be production quality.
Diffstat (limited to 'lib/oxidized/model')
-rw-r--r-- | lib/oxidized/model/ios.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/oxidized/model/ios.rb b/lib/oxidized/model/ios.rb index 11e605a..c0994c2 100644 --- a/lib/oxidized/model/ios.rb +++ b/lib/oxidized/model/ios.rb @@ -19,7 +19,7 @@ class IOS < Oxidized::Model cmd :all do |cfg| #cfg.gsub! /\cH+\s{8}/, '' # example how to handle pager #cfg.gsub! /\cH+/, '' # example how to handle pager - cfg.each_line.to_a[1..-3].join + cfg.each_line.to_a[1..-2].join end cmd 'show inventory' do |cfg| |