summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFauli83 <cpuboni@gmail.com>2017-07-02 12:53:07 +0200
committerGitHub <noreply@github.com>2017-07-02 12:53:07 +0200
commit25b2c2c35debb1843ad59487bf20f205599d6ba6 (patch)
treee5bcb5394578260f4e152dd9cd4da983e69d3953
parent8b3b9f455819512d1d6171a5d83c5e86aab23757 (diff)
Create audiocodes.rb
-rw-r--r--lib/oxidized/model/audiocodes.rb32
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/oxidized/model/audiocodes.rb b/lib/oxidized/model/audiocodes.rb
new file mode 100644
index 0000000..b7ee70e
--- /dev/null
+++ b/lib/oxidized/model/audiocodes.rb
@@ -0,0 +1,32 @@
+class AudioCodes < Oxidized::Model
+
+# Pull config from AudioCodes Mediant devices from version > 7.0
+
+ prompt /^\r?([\w.@() -]+[#>]\s?)$/
+ comment '## '
+
+ expect /\s*--MORE--$/ do |data, re|
+
+ send ' '
+
+ data.sub re, ''
+
+ end
+
+ cmd 'show running-config' do |cfg|
+ cfg
+ end
+
+ cfg :ssh do
+ username /^login as:\s$/
+ password /^.+password:\s$/
+ pre_logout 'exit'
+ end
+
+ cfg :telnet do
+ username /^Username:\s$/
+ password /^Password:\s$/
+ pre_logout 'exit'
+ end
+
+end