Sha256: 64241947c3fdc05c3c98eaa97280bae02efc04190a8aad1e12e782d575751c21

Contents?: true

Size: 873 Bytes

Versions: 17

Compression:

Stored size: 873 Bytes

Contents

class MasterOS < Oxidized::Model

  # MRV MasterOS model #

comment '!'

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

  cmd :all do |cfg|
    cfg.each_line.to_a[1..-2].join
    cfg.gsub /^(! Configuration ).*/, '!'
  end

  cmd 'show inventory' do |cfg|
    cfg = cfg.each_line.to_a[0..-2].join
    comment cfg
  end

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

  cmd 'show hw-config' do |cfg|
    comment cfg
  end

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

  cfg :telnet, :ssh do
    post_login 'no pager'
    if vars :enable
      post_login do
        send "enable\n"
        send vars(:enable) + "\n"
      end
    end
    pre_logout 'exit'
  end

end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
oxidized-0.21.0 lib/oxidized/model/masteros.rb
oxidized-0.20.0 lib/oxidized/model/masteros.rb
oxidized-0.19.0 lib/oxidized/model/masteros.rb
oxidized-0.18.0 lib/oxidized/model/masteros.rb
oxidized-0.17.0 lib/oxidized/model/masteros.rb
oxidized-0.16.3 lib/oxidized/model/masteros.rb
oxidized-0.16.2 lib/oxidized/model/masteros.rb
oxidized-0.16.1 lib/oxidized/model/masteros.rb
oxidized-0.16.0 lib/oxidized/model/masteros.rb
oxidized-0.15.0 lib/oxidized/model/masteros.rb
oxidized-0.14.3 lib/oxidized/model/masteros.rb
oxidized-0.14.2 lib/oxidized/model/masteros.rb
oxidized-0.14.1 lib/oxidized/model/masteros.rb
oxidized-0.14.0 lib/oxidized/model/masteros.rb
oxidized-0.13.1 lib/oxidized/model/masteros.rb
oxidized-0.13.0 lib/oxidized/model/masteros.rb
oxidized-0.12.2 lib/oxidized/model/masteros.rb