Sha256: 454caa473af65f1bc07ffbbb35a924bc6564b827fd04e466bbfadcbe333f1de7

Contents?: true

Size: 559 Bytes

Versions: 4

Compression:

Stored size: 559 Bytes

Contents

class IronWare < Oxidized::Model

  comment  '! '

  cmd :all do |cfg|
    cfg.each_line.to_a[1..-3].join
  end

  cmd 'show running-config' do |cfg|
    cfg = cfg.each_line.to_a[3..-1].join
    cfg
  end

  cmd 'show version' do |cfg|
    comment cfg
  end

  cmd 'show chassis' do |cfg|
    cfg.gsub! "\xFF", '' # ugly hack - avoids JSON.dump utf-8 breakage on 1.9..
    comment cfg
  end

  cfg :telnet do
    username /^Username:/
    password /^Password:/
  end

  cfg :telnet, :ssh do
    post_login 'terminal length 0'
    pre_logout 'exit'
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
oxidized-0.2.2 lib/oxidized/model/ironware.rb
oxidized-0.2.1 lib/oxidized/model/ironware.rb
oxidized-0.2.0 lib/oxidized/model/ironware.rb
oxidized-0.1.1 lib/oxidized/model/ironware.rb