Class: Rbeapi::Eapilib::HttpEapiConnection
- Inherits:
-
EapiConnection
- Object
- EapiConnection
- Rbeapi::Eapilib::HttpEapiConnection
- Defined in:
- lib/rbeapi/eapilib.rb
Overview
The HttpEapiConnection provides a class for building an HTTP eAPI connection to a Arista EOS devices.
Instance Attribute Summary
Attributes inherited from EapiConnection
#error, #open_timeout, #read_timeout
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ HttpEapiConnection
constructor
A new instance of HttpEapiConnection.
Methods inherited from EapiConnection
#authentication, #execute, #request, #send, #timeouts
Constructor Details
#initialize(opts = {}) ⇒ HttpEapiConnection
Returns a new instance of HttpEapiConnection.
348 349 350 351 352 353 354 355 356 357 |
# File 'lib/rbeapi/eapilib.rb', line 348 def initialize(opts = {}) port = opts.fetch(:port, DEFAULT_HTTP_PORT) host = opts.fetch(:host, 'localhost') transport = Net::HTTP.new(host, port.to_i) super(transport) authentication(opts) timeouts(opts) end |