Sha256: 2fa18997ca770950b8c5e04429cdbd152b7fa79d9f94935c8ad2ebfd7f81910f

Contents?: true

Size: 843 Bytes

Versions: 6

Compression:

Stored size: 843 Bytes

Contents

class XOS < Oxidized::Model

  # Extreme Networks XOS

  prompt /^*?[\w .-]+# $/
  comment  '# '

  cmd :all do |cfg|
    # xos inserts leading \r characters and other trailing white space.
    # this deletes extraneous \r and trailing white space.
    cfg.each_line.to_a[1..-2].map{|line|line.delete("\r").rstrip}.join("\n") + "\n"
  end

  cmd 'show version' do |cfg|
    comment cfg
  end

  cmd 'show diagnostics' do |cfg|
    comment cfg
  end

  cmd 'show licenses' do |cfg|
    comment cfg
  end

  cmd 'show switch'do |cfg|
    comment cfg.each_line.reject { |line| line.match /Time:/ or line.match /boot/i }.join
  end

  cmd 'show configuration'

  cfg :telnet do
    username /^login:/
    password /^\r*password:/
  end

  cfg :telnet, :ssh do
    post_login 'disable clipaging'
    pre_logout 'exit'
    pre_logout 'n'
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
oxidized-0.12.2 lib/oxidized/model/xos.rb
oxidized-0.12.1 lib/oxidized/model/xos.rb
oxidized-0.12.0 lib/oxidized/model/xos.rb
oxidized-0.11.0 lib/oxidized/model/xos.rb
oxidized-0.10.0 lib/oxidized/model/xos.rb
oxidized-0.9.0 lib/oxidized/model/xos.rb