Sha256: 96a6cad6f90dba7f622c9cc8cbb572e4463964898226fb46893825a55a2f6209

Contents?: true

Size: 620 Bytes

Versions: 8

Compression:

Stored size: 620 Bytes

Contents

class QuantaOS < Oxidized::Model

  prompt /^\((\w|\S)+\) (>|#)$/
  comment '! '
  
  cmd 'show run' do |cfg|
    cfg.each_line.select do |line|
      not line.match /^!.*$/ and
      not line.match /^\((\w|\S)+\) (>|#)$/ and
      not line.match /^show run$/
    end.join
  end

  cfg :telnet do
    username /^Username:/
    password /^Password:/
  end

  cfg :telnet, :ssh do
    post_login do
      send "enable\n"
      if vars :enable
        cmd vars(:enable)
      else
        cmd ""
      end
    end
    post_login 'terminal length 0'
    pre_logout do
      send "quit\n"
      send "n\n"
    end
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
oxidized-0.19.0 lib/oxidized/model/quantaos.rb
oxidized-0.18.0 lib/oxidized/model/quantaos.rb
oxidized-0.17.0 lib/oxidized/model/quantaos.rb
oxidized-0.16.3 lib/oxidized/model/quantaos.rb
oxidized-0.16.2 lib/oxidized/model/quantaos.rb
oxidized-0.16.1 lib/oxidized/model/quantaos.rb
oxidized-0.16.0 lib/oxidized/model/quantaos.rb
oxidized-0.15.0 lib/oxidized/model/quantaos.rb