Sha256: fc408b6dbcb249e1646da390083f6c85c1a5ed23c2dd51f3cba0dee325fa0648

Contents?: true

Size: 716 Bytes

Versions: 3

Compression:

Stored size: 716 Bytes

Contents

class Edgeos < Oxidized::Model
  # EdgeOS #

  prompt /\@.*?\:~\$\s/

  cmd :all do |cfg|
    cfg = cfg.lines.to_a[1..-2].join
  end

  cmd :secret do |cfg|
    cfg.gsub! /encrypted-password (\S+).*/, 'encrypted-password <secret removed>'
    cfg.gsub! /plaintext-password (\S+).*/, 'plaintext-password <secret removed>'
    cfg.gsub! /password (\S+).*/, 'password <secret removed>'
    cfg.gsub! /pre-shared-secret (\S+).*/, 'pre-shared-secret <secret removed>'
    cfg.gsub! /community (\S+) {/, 'community <hidden> {'
    cfg
  end

  cmd 'show configuration commands | no-more'

  cfg :telnet do
    username  /login:\s/
    password  /^Password:\s/
  end

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
oxidized-0.24.0 lib/oxidized/model/edgeos.rb
oxidized-0.23.0 lib/oxidized/model/edgeos.rb
oxidized-0.22.0 lib/oxidized/model/edgeos.rb