Sha256: 3f7db672754dc29fc3f7c8f17d30b6f9cded34fb9cac5f4a1eac9de68a89c088

Contents?: true

Size: 597 Bytes

Versions: 1

Compression:

Stored size: 597 Bytes

Contents

class Enterasys < Oxidized::Model

  # Enterasys B3/C3 models #

  prompt /^.+\w\(su\)->\s?$/

  comment  '!'

  cmd :all do |cfg|
     cfg.each_line.to_a[2..-3].map{|line|line.delete("\r").rstrip}.join("\n") + "\n"
  end

  cmd 'show system hardware' do |cfg|
    comment cfg
  end

  cmd 'show config' do |cfg|
    cfg.gsub! /^This command shows non-default configurations only./, ''
    cfg.gsub! /^Use 'show config all' to show both default and non-default configurations./, ''
    cfg.gsub! /^!|#.*/, ''
    cfg.gsub! /^$\n/, ''

    cfg
  end

  cfg :ssh do
    pre_logout 'exit'
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
oxidized-0.21.0 lib/oxidized/model/enterasys.rb