summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/edgeos.rb
diff options
context:
space:
mode:
authorytti <saku@ytti.fi>2015-07-09 10:17:53 +0300
committerytti <saku@ytti.fi>2015-07-09 10:17:53 +0300
commit5f892762c05e425f8d4d0d8b36371ed0e9114ca2 (patch)
tree6992fa62e983dced266f531e0ca9557d0e4493b0 /lib/oxidized/model/edgeos.rb
parent513e1375578396797d663398c653e6d64d54e2c0 (diff)
parent21cf4a6b7730d2dbd957984087c34825c05437a3 (diff)
Merge pull request #146 from laf/edgeos
Added support for EdgeOS
Diffstat (limited to 'lib/oxidized/model/edgeos.rb')
-rw-r--r--lib/oxidized/model/edgeos.rb27
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