summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/dnos.rb
diff options
context:
space:
mode:
authorWild Kat <wk@futureinquestion.net>2018-03-20 23:15:34 +0100
committerWild Kat <wk@futureinquestion.net>2018-03-20 23:15:34 +0100
commit6f672654c7e725bc828b6577297b86d501780c50 (patch)
treecf29588894d0c071f0e6b393671c84b7dd605163 /lib/oxidized/model/dnos.rb
parentbaee367bfec7ec5241ad7e893de7df8ea7eec1e7 (diff)
parente7075d18e055613cb0324f0fc8eecfe7adeeac56 (diff)
refactor snr support into dcnos model
Diffstat (limited to 'lib/oxidized/model/dnos.rb')
-rw-r--r--lib/oxidized/model/dnos.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/oxidized/model/dnos.rb b/lib/oxidized/model/dnos.rb
index a44630e..5c3cd53 100644
--- a/lib/oxidized/model/dnos.rb
+++ b/lib/oxidized/model/dnos.rb
@@ -5,6 +5,7 @@ class DNOS < Oxidized::Model
comment '! '
cmd :all do |cfg|
+ cfg.gsub! /^% Invalid input detected at '\^' marker\.$|^\s+\^$/, ''
cfg.each_line.to_a[2..-2].join
end
@@ -22,6 +23,14 @@ class DNOS < Oxidized::Model
comment cfg
end
+ cmd 'show version' do |cfg|
+ comment cfg
+ end
+
+ cmd 'show system' do |cfg|
+ comment cfg
+ end
+
cmd 'show running-config' do |cfg|
cfg = cfg.each_line.to_a[3..-1].join
cfg