Sha256: f4d5de178fd3c4b5b2f08284535d53dc2a57d10db62a879ee758e3a2f2c28314

Contents?: true

Size: 596 Bytes

Versions: 2

Compression:

Stored size: 596 Bytes

Contents

class FabricOS < Oxidized::Model

  # Brocade Fabric OS model #
  ## FIXME: Only ssh exec mode support, no telnet, no ssh screenscraping

  prompt /^([\w]+:+[\w]+[>]\s)$/
  comment  '# '

  cmd 'chassisShow' do |cfg|
    comment cfg.each_line.reject { |line| line.match /Time Awake:/ or line.match /Power Usage \(Watts\):/ or line.match /Time Alive:/ or line.match /Update:/ }.join
  end

  cmd 'configShow -all' do |cfg|
    cfg = cfg.each_line.reject { |line| line.match /date = /}.join
    cfg
  end

  cfg :ssh do
    exec true  # don't run shell, run each command in exec channel
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
oxidized-0.21.0 lib/oxidized/model/fabricos.rb
oxidized-0.20.0 lib/oxidized/model/fabricos.rb