From 8abe0b299990fba0e12875634368922abe2710df Mon Sep 17 00:00:00 2001 From: Saku Ytti Date: Tue, 15 Apr 2014 20:45:24 +0300 Subject: 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. --- lib/oxidized/model/ios.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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| -- cgit v1.2.1