summaryrefslogtreecommitdiff
path: root/lib/oxidized/model
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oxidized/model')
-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