Sha256: a5ddf39f5d6375a77bb337a03dd11d5fe8f5ceda54534af293239f6d46a95010

Contents?: true

Size: 518 Bytes

Versions: 2

Compression:

Stored size: 518 Bytes

Contents

class ZyNOSMGS < Oxidized::Model
  using Refinements

  PROMPT = /^(\w.*)>(.*)?$/
  # Used in Zyxel MGS Series switches

  prompt PROMPT
  comment '! '

  cmd 'show version' do |cfg|
    clear_output cfg
  end

  cmd 'show running-config' do |cfg|
    clear_output cfg
  end

  cfg :telnet do
    username /^User\s?name(\(1-32 chars\))?:/i
    password /^Password(\(1-32 chars\))?:/i
  end

  cfg :telnet, :ssh do
    pre_logout 'exit'
  end

  private

  def clear_output(output)
    output.gsub PROMPT, ''
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
oxidized-0.30.1 lib/oxidized/model/zynosmgs.rb
oxidized-0.30.0 lib/oxidized/model/zynosmgs.rb