summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/audiocodes.rb
blob: 2c77abb7207d19643e2c5d67026ff8028cb2ec59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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