Sha256: 7391d5d3029ca307be2328fe842aa14dae01e76f470f6f47ffdc04bd6ef37e9f

Contents?: true

Size: 598 Bytes

Versions: 11

Compression:

Stored size: 598 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

11 entries across 11 versions & 1 rubygems

Version Path
oxidized-0.28.0 lib/oxidized/model/enterasys.rb
oxidized-0.27.0 lib/oxidized/model/enterasys.rb
oxidized-0.26.3 lib/oxidized/model/enterasys.rb
oxidized-0.26.2 lib/oxidized/model/enterasys.rb
oxidized-0.26.1 lib/oxidized/model/enterasys.rb
oxidized-0.26.0 lib/oxidized/model/enterasys.rb
oxidized-0.25.1 lib/oxidized/model/enterasys.rb
oxidized-0.25.0 lib/oxidized/model/enterasys.rb
oxidized-0.24.0 lib/oxidized/model/enterasys.rb
oxidized-0.23.0 lib/oxidized/model/enterasys.rb
oxidized-0.22.0 lib/oxidized/model/enterasys.rb