Sha256: 4c1bdba812b9ae52b9f7794f84d8931a89bbf1c58be1a477bd976dc5cfe34512
Contents?: true
Size: 606 Bytes
Versions: 10
Compression:
Stored size: 606 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 /User(name)?:\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
10 entries across 10 versions & 1 rubygems