summaryrefslogtreecommitdiff
path: root/lib/oxidized
diff options
context:
space:
mode:
authorWild Kat <wk@futureinquestion.net>2018-04-05 15:29:00 +0200
committerWild Kat <wk@futureinquestion.net>2018-04-05 15:29:00 +0200
commitb54a5e211f2127d9397e6d43c30fd47de33ee5a5 (patch)
tree10538c59db8eb965e4de667e03f0e78df8655ea4 /lib/oxidized
parentedd58747495f0fc7fe396bb22fa31d750ea7d62c (diff)
unspeakable things took place in original PR, correcting model
Diffstat (limited to 'lib/oxidized')
-rw-r--r--lib/oxidized/model/dcnos.rb7
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