summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/comware.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oxidized/model/comware.rb')
-rw-r--r--lib/oxidized/model/comware.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/oxidized/model/comware.rb b/lib/oxidized/model/comware.rb
index a5b7190..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>'
@@ -47,7 +47,7 @@ class Comware < Oxidized::Model
end
cmd 'display version' do |cfg|
- cfg = cfg.each_line.select {|l| not l.match /uptime/i }.join
+ cfg = cfg.each_line.reject { |l| l.match /uptime/i }.join
comment cfg
end