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

Class Method Summary collapse

Class Attribute Details

.loggerObject

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, options={})
  case platform
  when 'a10'
    Dumbcli::Device::A10.new(host, options)
  when 'arista'
    Dumbcli::Device::Arista.new(host, options)
  when 'cisco'
    Dumbcli::Device::Cisco.new(host, options)
  when 'cisco-asa'
    Dumbcli::Device::CiscoAsa.new(host, options)
  when 'cisco-xr'
    Dumbcli::Device::CiscoXr.new(host, options)
  when 'juniper'
    Dumbcli::Device::Juniper.new(host, options)
  else
    raise ArgumentError, %(Unknown device type: "#{platform}" for host "#{host}")
  end
end