diff options
author | ytti <saku@ytti.fi> | 2018-04-05 16:59:05 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-05 16:59:05 +0300 |
commit | f09c4c4d9964b9e637ac2ff7e1ce563ee4556c06 (patch) | |
tree | 10538c59db8eb965e4de667e03f0e78df8655ea4 | |
parent | edd58747495f0fc7fe396bb22fa31d750ea7d62c (diff) | |
parent | b54a5e211f2127d9397e6d43c30fd47de33ee5a5 (diff) |
Merge pull request #1253 from wk/snr-fixes
unspeakable things took place in original PR, correcting model
-rw-r--r-- | lib/oxidized/model/dcnos.rb | 7 |
1 files changed, 5 insertions, 2 deletions
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 |