summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/edgeos.rb
blob: 2a8d6636a4835f84139243d17abe312bf3cbd495 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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! /community (\S+) {/, 'community <hidden> {'
    cfg
  end

  cmd 'show configuration | no-more'

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

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

end