From b54a5e211f2127d9397e6d43c30fd47de33ee5a5 Mon Sep 17 00:00:00 2001 From: Wild Kat Date: Thu, 5 Apr 2018 15:29:00 +0200 Subject: unspeakable things took place in original PR, correcting model --- lib/oxidized/model/dcnos.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/oxidized/model/dcnos.rb') diff --git a/lib/oxidized/model/dcnos.rb b/lib/oxidized/model/dcnos.rb index ec0c7f6..8506280 100644 --- a/lib/oxidized/model/dcnos.rb +++ b/lib/oxidized/model/dcnos.rb @@ -8,8 +8,12 @@ class DCNOS < Oxidized::Model comment '! ' + cmd :all do |cfg| + cfg.each_line.to_a[1..-1].join + end + cmd 'show version' do |cfg| - cfg = cfg.gsub! /^(Uptime is ).*/, '' + cfg.gsub! /\s(Uptime is).*/, '' comment cfg end @@ -22,7 +26,6 @@ class DCNOS < Oxidized::Model end cmd 'show running-config' do |cfg| - cfg = cfg.each_line.to_a[1..-1].join cfg end -- cgit v1.2.1