Sha256: 418cb25efc810d765d89e3d0ed0a3c738b7c8b85d397eb631bf72205e5234a66

Contents?: true

Size: 545 Bytes

Versions: 4

Compression:

Stored size: 545 Bytes

Contents

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
    cfg.gsub! /^Building configuration.*$/, ''
    cfg.gsub! /^Current configuration:.*$$/, ''
    cfg.gsub! /^! Configuration (saved|generated) on .*$/, ''
    cfg
  end

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
oxidized-0.24.0 lib/oxidized/model/fiberdriver.rb
oxidized-0.23.0 lib/oxidized/model/fiberdriver.rb
oxidized-0.22.0 lib/oxidized/model/fiberdriver.rb
oxidized-0.21.0 lib/oxidized/model/fiberdriver.rb