Sha256: 635b1e052c8dbb1b00f55e9ba385d15399cae92e68aaf74dafa78bcc04e221a7
Contents?: true
Size: 804 Bytes
Versions: 7
Compression:
Stored size: 804 Bytes
Contents
class Edgeos < Oxidized::Model # EdgeOS # prompt /@.*?:~\$\s/ cmd :all do |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
7 entries across 7 versions & 1 rubygems