Sha256: 74d5eb43e5d4b9aee713c2e14cbbd6aab3a073d91883ab0adddade53b67667e1

Contents?: true

Size: 769 Bytes

Versions: 3

Compression:

Stored size: 769 Bytes

Contents

class Hios < Oxidized::Model
  using Refinements

  ## 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

3 entries across 3 versions & 1 rubygems

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