Sha256: 257725894142cdad94e2b79782edecb4fddb23b41fe5d4d6ed79572988a848dc
Contents?: true
Size: 743 Bytes
Versions: 1
Compression:
Stored size: 743 Bytes
Contents
class H3C < Oxidized::Model # H3C prompt /^.*(<[\w.-]+>)$/ comment '# ' cmd :secret do |cfg| cfg.gsub! /(pin verify (?:auto|)).*/, '\\1 <PIN hidden>' cfg.gsub! /(%\^%#.*%\^%#)/, '<secret hidden>' cfg end cmd :all do |cfg| cfg.cut_both end cfg :telnet do username /^Username:$/ password /^Password:$/ end cfg :telnet, :ssh do post_login 'screen-length disable' pre_logout 'quit' end cmd 'display version' do |cfg| cfg = cfg.each_line.reject { |l| l.match /uptime/ }.join cfg = cfg.each_line.reject { |l| l.match /Uptime is/ }.join comment cfg end cmd 'display device' do |cfg| comment cfg end cmd 'display current-configuration' do |cfg| cfg end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
oxidized-0.29.0 | lib/oxidized/model/h3c.rb |