From 550a20c9ac0b6f69b91cab9b3d20688a0e7d1bd0 Mon Sep 17 00:00:00 2001 From: Jacob Thomas Date: Mon, 1 Feb 2016 19:02:55 -0500 Subject: EdgeSwitch Model Add model file to suit Ubiquiti EdgeSwitch. Assumes enable password is disabled via SSH. --- lib/oxidized/model/edgeswitch.rb | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 lib/oxidized/model/edgeswitch.rb (limited to 'lib/oxidized/model') diff --git a/lib/oxidized/model/edgeswitch.rb b/lib/oxidized/model/edgeswitch.rb new file mode 100644 index 0000000..c303fe2 --- /dev/null +++ b/lib/oxidized/model/edgeswitch.rb @@ -0,0 +1,25 @@ +class EdgeSwitch < Oxidized::Model + +# Ubiquiti EdgeSwitch # + + comment '!' + + prompt /[(]\w*\s\w*[)][\s#>]*[\s#>]/ + + cmd 'show running-config' do |cfg| + comment cfg + end + + cfg :telnet do + username /Username:\s/ + passsword /^Password:\s/ + end + + cfg :telnet, :ssh do + post_login 'enable' + post_login 'terminal length 0' + pre_logout 'exit' + pre_logout 'exit' + end + +end -- cgit v1.2.1