Class: Commutateurs::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/commutateurs/device.rb

Direct Known Subclasses

Cisco, H3c, HP, Juniper

Instance Method Summary collapse

Constructor Details

#initialize(host, credentials, verbose = false) ⇒ Base

Returns a new instance of Base.



12
13
14
15
16
17
18
19
# File 'lib/commutateurs/device.rb', line 12

def initialize(host, credentials, verbose = false)
  @enable = credentials.enable

  @transport = Ssh.new(verbose)
  @transport.host = host
  @transport.user = credentials.user
  @transport.password = credentials.password
end

Instance Method Details

#execute(line) ⇒ Object



21
22
23
# File 'lib/commutateurs/device.rb', line 21

def execute(line)
  @transport.command line
end