From 724607c2942cfde53d9cb6a5d3b189f8ef9d17c0 Mon Sep 17 00:00:00 2001 From: Tomi Hakala Date: Wed, 23 Jul 2014 19:36:46 +0300 Subject: Brocade Vyatta model added --- lib/oxidized/model/vyatta.rb | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 lib/oxidized/model/vyatta.rb (limited to 'lib') 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 {' + 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 -- cgit v1.2.1