Sha256: 3b2ae795a8ba5b6eeb15c1afa546bf1c3c2e901efc9624c1d8538f78121c6d9a

Contents?: true

Size: 786 Bytes

Versions: 3

Compression:

Stored size: 786 Bytes

Contents

class FujitsuPY < Oxidized::Model

  prompt /^(\([\w.-]*\)\s#|^\S+\#\s)$/
  comment  '! '

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

# 1Gbe switch
  cmd 'show version' do |cfg|
    cfg.gsub! /^(<ERROR> : 2 : format error)$/, ''
    comment cfg
  end

# 10Gbe switch
  cmd 'show system information' do |cfg|
    cfg.gsub! /^Current-time : [\w\s:]*$/, ''
    cfg.gsub! /^(\s{33}\^)$/, ''
    cfg.gsub! /^(\% Invalid input detected at '\^' marker.)$/, ''
    comment cfg
  end

  cmd 'show running-config' do |cfg|
    cfg
  end

  cfg :telnet do
    username /^Username:/
    password /^Password:/
  end

  cfg :telnet, :ssh do
    post_login 'no pager'
    post_login 'terminal pager disable'
    pre_logout do
      send "quit\n"
      send "n\n"
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
oxidized-0.21.0 lib/oxidized/model/fujitsupy.rb
oxidized-0.20.0 lib/oxidized/model/fujitsupy.rb
oxidized-0.19.0 lib/oxidized/model/fujitsupy.rb