Sha256: 85c56460a1bcd9f9d4bc6951b6fc305f63a8bf2a63b0c56c9d3028383b57d556

Contents?: true

Size: 577 Bytes

Versions: 7

Compression:

Stored size: 577 Bytes

Contents

class EOS < Oxidized::Model

  # Arista EOS model #
  # need to add telnet support here .. #

  prompt /^[^\(]+\([^\)]+\)#/

  comment  '! '

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

  cmd :secret do |cfg|
     cfg.gsub! /^(snmp-server community).*/, '\\1 <configuration removed>'
     cfg.gsub! /username (\S+) privilege (\d+) (\S+).*/, '<secret hidden>'
     cfg
  end

  cmd 'show inventory | no-more' do |cfg|
    comment cfg
  end

  cmd 'show running-config | no-more' do |cfg|
    cfg
  end

  cfg :telnet, :ssh do
    pre_logout 'exit'
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
oxidized-0.3.0 lib/oxidized/model/eos.rb
oxidized-0.2.4 lib/oxidized/model/eos.rb
oxidized-0.2.3 lib/oxidized/model/eos.rb
oxidized-0.2.2 lib/oxidized/model/eos.rb
oxidized-0.2.1 lib/oxidized/model/eos.rb
oxidized-0.2.0 lib/oxidized/model/eos.rb
oxidized-0.1.1 lib/oxidized/model/eos.rb