Sha256: 1162f9104236cf4c5535a5f66bc6e5ba76e7781f424a34669ac71010e4ddd7b6

Contents?: true

Size: 1.02 KB

Versions: 36

Compression:

Stored size: 1.02 KB

Contents

class Aireos < Oxidized::Model

  # AireOS (at least I think that is what it's called, hard to find data)
  # Used in Cisco WLC 5500

  comment  '# '     ## this complains too, can't find real comment char
  prompt /^\([^\)]+\)\s>/

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

  ##show sysinfo?
  ##show switchconfig?

  cmd 'show udi' do |cfg|
    cfg = comment clean cfg
    cfg << "\n"
  end

  cmd 'show boot' do |cfg|
    cfg = comment clean cfg
    cfg << "\n"
  end

  cmd 'show run-config commands' do |cfg|
    clean cfg
  end

  cfg :telnet, :ssh do
    username /^User:\s*/
    password /^Password:\s*/
    post_login 'config paging disable'
  end

  cfg :telnet, :ssh do
    pre_logout do
      send "logout\n"
      send "n"
    end
  end

  def clean cfg
    out = []
    cfg.each_line do |line|
      next if line.match /^\s*$/
      next if line.match /rogue adhoc alert [\da-f]{2}:/
      line = line[1..-1] if line[0] == "\r"
      out << line.strip
    end
    out = out.join "\n"
    out << "\n"
  end

end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
oxidized-0.19.0 lib/oxidized/model/aireos.rb
oxidized-0.18.0 lib/oxidized/model/aireos.rb
oxidized-0.17.0 lib/oxidized/model/aireos.rb
oxidized-0.16.3 lib/oxidized/model/aireos.rb
oxidized-0.16.2 lib/oxidized/model/aireos.rb
oxidized-0.16.1 lib/oxidized/model/aireos.rb
oxidized-0.16.0 lib/oxidized/model/aireos.rb
oxidized-0.15.0 lib/oxidized/model/aireos.rb
oxidized-0.14.3 lib/oxidized/model/aireos.rb
oxidized-0.14.2 lib/oxidized/model/aireos.rb
oxidized-0.14.1 lib/oxidized/model/aireos.rb
oxidized-0.14.0 lib/oxidized/model/aireos.rb
oxidized-0.13.1 lib/oxidized/model/aireos.rb
oxidized-0.13.0 lib/oxidized/model/aireos.rb
oxidized-0.12.2 lib/oxidized/model/aireos.rb
oxidized-0.12.1 lib/oxidized/model/aireos.rb
oxidized-0.12.0 lib/oxidized/model/aireos.rb
oxidized-0.11.0 lib/oxidized/model/aireos.rb
oxidized-0.10.0 lib/oxidized/model/aireos.rb
oxidized-0.9.0 lib/oxidized/model/aireos.rb