summaryrefslogtreecommitdiff
path: root/lib/oxidized/model
diff options
context:
space:
mode:
authorJacob Thomas <jacob@doogie.consulting>2016-02-01 19:02:55 -0500
committerJacob Thomas <jacob@doogie.consulting>2016-02-01 19:02:55 -0500
commit550a20c9ac0b6f69b91cab9b3d20688a0e7d1bd0 (patch)
tree4f111a510d90986fccc6de34671ac612bb79ab96 /lib/oxidized/model
parenta70afa90707df43408caa1dd3989058ef6dfc910 (diff)
EdgeSwitch Model
Add model file to suit Ubiquiti EdgeSwitch. Assumes enable password is disabled via SSH.
Diffstat (limited to 'lib/oxidized/model')
-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