Sha256: 498251043547d8a2328c7150ea9c0739aec23958b43c5c2b5a3574561f55b88d
Contents?: true
Size: 662 Bytes
Versions: 2
Compression:
Stored size: 662 Bytes
Contents
# model for Centec Networks CNOS based switches class CNOS < Oxidized::Model comment '! ' cmd :all do |cfg| cfg.each_line.to_a[0..-2].join end cmd 'show running-config' do |cfg| cfg.gsub!(/(snmp-server community )(\S+)/, '\1<hidden>') cfg.gsub!(/key type private.+key string end/m, '<private key hidden>') cfg end cmd 'show version' do |cfg| cfg.gsub! /^(.* uptime is ).*\n/, '\1' comment cfg end cmd 'show transceiver' do |cfg| comment cfg end cfg :telnet do username /^Username:/ password /^Password:/ end cfg :telnet, :ssh do post_login 'terminal length 0' pre_logout 'exit' end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
oxidized-0.29.0 | lib/oxidized/model/cnos.rb |
oxidized-0.28.0 | lib/oxidized/model/cnos.rb |