Sha256: 4f0b50c58c94f43940c935e9d212fefc988343a0ade0d91129b71d1da1f88452

Contents?: true

Size: 474 Bytes

Versions: 2

Compression:

Stored size: 474 Bytes

Contents

class Adtran < Oxidized::Model
  # Adtran

  prompt /([\w.@-]+[#>]\s?)$/

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

  cmd :secret do |cfg|
    cfg.gsub!(/password (\S+)/, 'password <hidden>')
    cfg
  end

  cmd 'show running-config'

  cfg :ssh do
    post_login do
      send "enable\n"
      cmd vars(:enable)
    end
    post_login 'terminal length 0'
    pre_logout 'exit'
    sleep 1
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
oxidized-0.28.0 lib/oxidized/model/adtran.rb
oxidized-0.27.0 lib/oxidized/model/adtran.rb