Sha256: f1e693a79f263634ed7469d31704e84bf48a1386c1d1f1514a6c5526a641be95
Contents?: true
Size: 630 Bytes
Versions: 9
Compression:
Stored size: 630 Bytes
Contents
class Firebrick < Oxidized::Model # Firebrick # prompt /\x0a\x1b\x5b\x32\x4b\x0d.*>\s/ cmd :all do |cfg| # remove arbitrary whitespace after commands. cfg.each_line.to_a[1..-2].drop_while { |e| e.match /^\s+$/ }.join end cmd 'show status' do |cfg| cfg.gsub! /Status/, '' cfg.gsub! /------/, '' cfg.gsub! /Uptime.*/, '' cfg.gsub! /Current time.*/, '' cfg.gsub! /RAM.*/, '' cfg.gsub! /Warranty.*/, '' comment cfg end cmd 'show configuration' cfg :telnet do username /Username:\s?/ password /Password:\s?/ end cfg :telnet, :ssh do pre_logout 'exit' end end
Version data entries
9 entries across 9 versions & 1 rubygems