summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/vyatta.rb
diff options
context:
space:
mode:
authorTomi Hakala <tomi.hakala@itvirtuoosit.fi>2014-07-23 19:36:46 +0300
committerTomi Hakala <tomi.hakala@itvirtuoosit.fi>2014-07-23 19:36:46 +0300
commit724607c2942cfde53d9cb6a5d3b189f8ef9d17c0 (patch)
tree80c146c2b717883a248360244320d3a88b0164f4 /lib/oxidized/model/vyatta.rb
parentcbd6177479c8c6d9b8d55a4291bddba8390bab7d (diff)
Brocade Vyatta model added
Diffstat (limited to 'lib/oxidized/model/vyatta.rb')
-rw-r--r--lib/oxidized/model/vyatta.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/oxidized/model/vyatta.rb b/lib/oxidized/model/vyatta.rb
new file mode 100644
index 0000000..8d977aa
--- /dev/null
+++ b/lib/oxidized/model/vyatta.rb
@@ -0,0 +1,27 @@
+class Vyatta < Oxidized::Model
+
+ # Brocade Vyatta / VyOS model #
+
+ 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