summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/fabricos.rb
blob: 4854541f4edf0de345cf3e343965f9f9bbd44594 (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
29
class FabricOS < Oxidized::Model

  # Brocade Fabric OS model #
  ## FIXME: Only ssh exec mode support, no telnet, no ssh screenscraping

  prompt /^([\w]+:+[\w]+[>]\s)$/
  comment  '# '

  cmd :all do |cfg|
    cfg
  end

  cmd 'chassisShow' do |cfg|
    comment cfg
  end

  cmd 'configShow -all' do |cfg|
    cfg
  end

  cfg :ssh do
    exec true  # don't run shell, run each command in exec channel
  end

  cfg :ssh do
    pre_logout 'exit'
  end

end