Class: Rbeapi::Eapilib::HttpLocalEapiConnection
- Inherits:
-
EapiConnection
- Object
- EapiConnection
- Rbeapi::Eapilib::HttpLocalEapiConnection
- Defined in:
- lib/rbeapi/eapilib.rb
Overview
The HttpLocalEapiConnection provides a class for building an HTTP eAPI connection to a local Arista EOS devices.
Instance Attribute Summary
Attributes inherited from EapiConnection
#error, #open_timeout, #read_timeout
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ HttpLocalEapiConnection
constructor
A new instance of HttpLocalEapiConnection.
Methods inherited from EapiConnection
#authentication, #execute, #request, #send, #timeouts
Constructor Details
#initialize(opts = {}) ⇒ HttpLocalEapiConnection
Returns a new instance of HttpLocalEapiConnection.
364 365 366 367 368 369 370 371 |
# File 'lib/rbeapi/eapilib.rb', line 364 def initialize(opts = {}) port = opts.fetch(:port, DEFAULT_HTTP_LOCAL_PORT) transport = Net::HTTP.new('localhost', port) super(transport) authentication(opts) timeouts(opts) end |