diff options
author | laf <neil@lathwood.co.uk> | 2015-07-09 03:43:26 +0100 |
---|---|---|
committer | laf <neil@lathwood.co.uk> | 2015-07-09 03:43:26 +0100 |
commit | 21cf4a6b7730d2dbd957984087c34825c05437a3 (patch) | |
tree | 6992fa62e983dced266f531e0ca9557d0e4493b0 /lib | |
parent | 513e1375578396797d663398c653e6d64d54e2c0 (diff) |
Added support for EdgeOS
Diffstat (limited to 'lib')
-rw-r--r-- | lib/oxidized/model/edgeos.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/oxidized/model/edgeos.rb b/lib/oxidized/model/edgeos.rb new file mode 100644 index 0000000..2a8d663 --- /dev/null +++ b/lib/oxidized/model/edgeos.rb @@ -0,0 +1,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 |