summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/comware.rb
diff options
context:
space:
mode:
authorWild Kat <wk@futureinquestion.net>2018-04-21 13:27:05 +0200
committerWild Kat <wk@futureinquestion.net>2018-04-21 13:35:54 +0200
commit21e3d6490496573f25ef77fe8172766ac7d1a736 (patch)
tree785e5243f5f7ffe7e5a4bfcde551ec04c723b2ae /lib/oxidized/model/comware.rb
parent2648b1bb271727976e2d96123fcd51d52af39f79 (diff)
the great makeover - standardize layout, alignment, indentation
Diffstat (limited to 'lib/oxidized/model/comware.rb')
-rw-r--r--lib/oxidized/model/comware.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/oxidized/model/comware.rb b/lib/oxidized/model/comware.rb
index 0ba26d5..f20cd4d 100644
--- a/lib/oxidized/model/comware.rb
+++ b/lib/oxidized/model/comware.rb
@@ -1,23 +1,23 @@
class Comware < Oxidized::Model
# HP (A-series)/H3C/3Com Comware
-
+
# sometimes the prompt might have a leading nul or trailing ASCII Bell (^G)
prompt /^\0*(<[\w.-]+>).?$/
comment '# '
# example how to handle pager
- #expect /^\s*---- More ----$/ do |data, re|
+ # expect /^\s*---- More ----$/ do |data, re|
# send ' '
# data.sub re, ''
- #end
+ # end
cmd :all do |cfg|
- #cfg.gsub! /^.*\e\[42D/, '' # example how to handle pager
- #skip rogue ^M
+ # cfg.gsub! /^.*\e\[42D/, '' # example how to handle pager
+ # skip rogue ^M
cfg = cfg.gsub /\r/, ''
cfg.each_line.to_a[1..-2].join
end
-
+
cmd :secret do |cfg|
cfg.gsub! /^( snmp-agent community).*/, '\\1 <configuration removed>'
cfg.gsub! /^( password hash).*/, '\\1 <configuration removed>'