Sha256: 2712d4d1f5880ec9d308b3028055346ed36ef643a3d79e7bbef11bfa6250dee2
Contents?: true
Size: 810 Bytes
Versions: 2
Compression:
Stored size: 810 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 version | no-more' do |cfg| cfg.gsub! /^Uptime:\s.+/, '' comment 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
oxidized-0.25.1 | lib/oxidized/model/edgeos.rb |
oxidized-0.25.0 | lib/oxidized/model/edgeos.rb |