Sha256: 4602fca6b63da42073af3469d217337eb3c751c19ca26e9ea3d4bdbc30376316
Contents?: true
Size: 1016 Bytes
Versions: 3
Compression:
Stored size: 1016 Bytes
Contents
class FSOS < Oxidized::Model # Fiberstore / fs.com using Refinements comment '! ' # Handle paging expect /^ --More--.*$/ do |data, re| send ' ' data.sub re, '' end cmd :secret do |cfg| cfg.gsub! /(secret \w+) (\S+).*/, '\\1 <secret hidden>' cfg.gsub! /(password \d+) (\S+).*/, '\\1 <secret hidden>' cfg.gsub! /(snmp-server community \d+) (\S+).*/, '\\1 <secret hidden>' cfg end cmd 'show version' do |cfg| # Remove uptime so the result doesn't change every time cfg.gsub! /.*uptime is.*\n/, '' cfg.gsub! /.*System uptime.*\n/, '' comment cfg end cmd 'show running-config' do |cfg| # Remove "Building configuration..." message cfg.gsub! /^Building configuration.*\n/, '' cfg.cut_head end cfg :telnet do username /^Username:/ password /^Password:/ end cfg :telnet, :ssh do post_login 'enable' post_login 'terminal length 0' post_login 'terminal width 256' pre_logout 'exit' pre_logout 'exit' end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
oxidized-0.31.0 | lib/oxidized/model/fsos.rb |
oxidized-0.30.1 | lib/oxidized/model/fsos.rb |
oxidized-0.30.0 | lib/oxidized/model/fsos.rb |