summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorytti <saku@ytti.fi>2017-07-02 14:13:29 +0300
committerGitHub <noreply@github.com>2017-07-02 14:13:29 +0300
commit7e87b3c7ee2d7c3002e732cc774617892374d861 (patch)
treee5bcb5394578260f4e152dd9cd4da983e69d3953
parent449d3bf9f4950c0f8f2fc7304389793cc0608e2e (diff)
parent25b2c2c35debb1843ad59487bf20f205599d6ba6 (diff)
Merge pull request #910 from Fauli83/AudioCodes
Create audiocodes.rb for AudioCodes devices
-rw-r--r--README.md2
-rw-r--r--lib/oxidized/model/audiocodes.rb32
2 files changed, 34 insertions, 0 deletions
diff --git a/README.md b/README.md
index 9d8ba2f..ff4ea6c 100644
--- a/README.md
+++ b/README.md
@@ -70,6 +70,8 @@ Oxidized is a network device configuration backup tool. It's a RANCID replacemen
* [C4CMTS](lib/oxidized/model/c4cmts.rb)
* Aruba
* [AOSW](lib/oxidized/model/aosw.rb)
+ * AudioCodes
+ * [AudioCodes](lib/oxdized/model/audiocodes.rb)
* Avaya
* [VOSS (VSP Operating System Software)](lib/oxidized/model/voss.rb)
* [BOSS (Baystack Operating System Software)](lib/oxidized/model/boss.rb)
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