Sha256: 99bc12e76969402e03118c0cdecf5586b70162c352520c44863ebdcf388dfadb
Contents?: true
Size: 623 Bytes
Versions: 2
Compression:
Stored size: 623 Bytes
Contents
class QuantaOS < Oxidized::Model prompt /^\((\w|\S)+\) (>|#)$/ comment '! ' cmd 'show run' do |cfg| cfg.each_line.select do |line| not line.match /^!.*$/ and not line.match /^\((\w|\S)+\) (>|#)$/ and not line.match /^show run$/ end.join end cfg :telnet do username /^User(name)?:/ password /^Password:/ end cfg :telnet, :ssh do post_login do send "enable\n" if vars :enable cmd vars(:enable) else cmd "" end end post_login 'terminal length 0' pre_logout do send "quit\n" send "n\n" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
oxidized-0.21.0 | lib/oxidized/model/quantaos.rb |
oxidized-0.20.0 | lib/oxidized/model/quantaos.rb |