Sha256: 88c05d4c563f3edf604652a642a4ea47d752d0a2eac38934056607e384c13838
Contents?: true
Size: 601 Bytes
Versions: 6
Compression:
Stored size: 601 Bytes
Contents
class EdgeSwitch < Oxidized::Model # Ubiquiti EdgeSwitch # comment '!' prompt /\(.*\)\s[#>]/ cmd 'show running-config' do |cfg| cfg.each_line.to_a[2..-2].reject { |line| line.match /System Up Time.*/ or line.match /Current SNTP Synchronized Time.*/ }.join end cfg :telnet do username /Username:\s/ password /^Password:\s/ end cfg :telnet, :ssh do post_login do if vars :enable send "enable\n" cmd vars(:enable) else cmd 'enable' end cmd 'terminal length 0' end pre_logout 'quit' pre_logout 'n' end end
Version data entries
6 entries across 6 versions & 1 rubygems