Module: Dumbcli
- Defined in:
- lib/dumbcli.rb,
lib/dumbcli/device.rb,
lib/dumbcli/logger.rb,
lib/dumbcli/version.rb,
lib/dumbcli/device/a10.rb,
lib/dumbcli/device/base.rb,
lib/dumbcli/device/cisco.rb,
lib/dumbcli/device/arista.rb,
lib/dumbcli/device/juniper.rb,
lib/dumbcli/device/cisco_xr.rb,
lib/dumbcli/device/cisco_asa.rb
Defined Under Namespace
Modules: Device Classes: Logger
Constant Summary collapse
- VERSION =
'0.2.0'
Class Attribute Summary collapse
-
.logger ⇒ Object
Returns the value of attribute logger.
Class Method Summary collapse
Class Attribute Details
.logger ⇒ Object
Returns the value of attribute logger.
9 10 11 |
# File 'lib/dumbcli.rb', line 9 def logger @logger end |
Class Method Details
.Device(host, platform, options = {}) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/dumbcli.rb', line 11 def Device(host, platform, ={}) case platform when 'a10' Dumbcli::Device::A10.new(host, ) when 'arista' Dumbcli::Device::Arista.new(host, ) when 'cisco' Dumbcli::Device::Cisco.new(host, ) when 'cisco-asa' Dumbcli::Device::CiscoAsa.new(host, ) when 'cisco-xr' Dumbcli::Device::CiscoXr.new(host, ) when 'juniper' Dumbcli::Device::Juniper.new(host, ) else raise ArgumentError, %(Unknown device type: "#{platform}" for host "#{host}") end end |