Sha256: 0785c49e518901950f386022dfa6f8b4f07534b4eeea8412eee8be04e522c0f2

Contents?: true

Size: 543 Bytes

Versions: 4

Compression:

Stored size: 543 Bytes

Contents

class NecIX < Oxidized::Model
  using Refinements

  prompt /^(\([\w.-]*\)\s[#$]|^\S+[$#]\s?)$/
  comment '! '
  expect /^--More--$/ do |data, re|
    send ' '
    data.sub re, ''
  end

  cmd 'show running-config' do |cfg|
    cfg = cfg.each_line.to_a[3..-2].join
    cfg.gsub! /^.*Current time.*$/, ''
    cfg
  end

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

  cfg :telnet, :ssh do
    post_login do
      send "configure\n"
    end

    pre_logout do
      send "\cZ"
      send "exit\n"
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
oxidized-0.31.0 lib/oxidized/model/necix.rb
oxidized-0.30.1 lib/oxidized/model/necix.rb
oxidized-0.30.0 lib/oxidized/model/necix.rb
oxidized-0.29.1 lib/oxidized/model/necix.rb