summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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