summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/fiberdriver.rb
blob: 8f8eb07f488940afd26946589b8313f02af26d36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
class FiberDriver < Oxidized::Model
  prompt /\w+#/
  comment "! "

  cmd :all do |cfg|
    cfg.each_line.to_a[1..-2].join
  end
  cmd 'show inventory' do |cfg|
    comment cfg
  end

  cmd "show running-config" do |cfg|
    cfg.each_line.to_a[3..-1].join
  end

  cfg :ssh do
    post_login 'terminal length 0'
    post_login 'terminal width 512'
    pre_logout 'exit'
  end
end