Sha256: 4f6d45670b488488be7e9c1f788c80e4f15a998bf0ab819e5643d77df8850ecb

Contents?: true

Size: 748 Bytes

Versions: 1

Compression:

Stored size: 748 Bytes

Contents

class Hios < Oxidized::Model
  ## Docker location: /var/lib/gems/2.7.0/gems/oxidized-0.28.0/lib/oxidized/model/hios.rb
  prompt /^\[[\w\s\W]+\][>|#]+?$/

  comment '## '

  # Handle pager
  expect /^--More--.*$/ do |data, re|
    send 'n'
    data.sub re, ''
  end

  cmd :all do |cfg|
    cfg.cut_both
  end

  cmd 'show system info' do |cfg|
    cfg.gsub! /^System uptime.*\n/, ""
    cfg.gsub! /^Operating hours.*\n/, ""
    cfg.gsub! /^System date.*\n/, ""
    cfg.gsub! /^Current temperature.*\n/, ""
    comment cfg
  end

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

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

  cfg :telnet, :ssh do
    post_login 'enable'
    pre_logout "logout\nY\r\n"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
oxidized-0.29.0 lib/oxidized/model/hios.rb