summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/edgeswitch.rb
diff options
context:
space:
mode:
authorytti <saku@ytti.fi>2016-02-02 11:24:02 +0200
committerytti <saku@ytti.fi>2016-02-02 11:24:02 +0200
commit8b15d01422a32eda7505d67b4387a15ed192d251 (patch)
tree4f111a510d90986fccc6de34671ac612bb79ab96 /lib/oxidized/model/edgeswitch.rb
parenta70afa90707df43408caa1dd3989058ef6dfc910 (diff)
parent550a20c9ac0b6f69b91cab9b3d20688a0e7d1bd0 (diff)
Merge pull request #301 from doogieconsulting/master
EdgeSwitch Model
Diffstat (limited to 'lib/oxidized/model/edgeswitch.rb')
-rw-r--r--lib/oxidized/model/edgeswitch.rb25
1 files changed, 25 insertions, 0 deletions
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