Sha256: b2b324afe341e14f45bc57c2d271ba5ffdc216c079e45bdc3d5cc03fe82054e4
Contents?: true
Size: 522 Bytes
Versions: 1
Compression:
Stored size: 522 Bytes
Contents
class NecIX < Oxidized::Model prompt /^(\([\w.-]*\)\s[#$]|^\S+[$#]\s?)$/ comment '! ' expect /^--More--$/ do |data, re| send ' ' data.sub re, '' end cmd 'show running-config' do |cfg| cfg = cfg.each_line.to_a[3..-2].join cfg.gsub! /^.*Current time.*$/, '' cfg end cfg :telnet do username /^Username:/ password /^Password:/ end cfg :telnet, :ssh do post_login do send "configure\n" end pre_logout do send "\cZ" send "exit\n" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
oxidized-0.29.0 | lib/oxidized/model/necix.rb |