Sha256: cc0cf9bbcc03500ccff6bd1b5e97095fbda97056e8cc72556ce932b8650efdfd
Contents?: true
Size: 606 Bytes
Versions: 5
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
5 entries across 5 versions & 1 rubygems