Class: Rbeapi::Eapilib::HttpsEapiConnection
- Inherits:
-
EapiConnection
- Object
- EapiConnection
- Rbeapi::Eapilib::HttpsEapiConnection
- Defined in:
- lib/rbeapi/eapilib.rb
Overview
The HttpEapiConnection provides a class for building an HTTPS 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 = {}) ⇒ HttpsEapiConnection
constructor
A new instance of HttpsEapiConnection.
Methods inherited from EapiConnection
#authentication, #execute, #request, #send, #timeouts
Constructor Details
#initialize(opts = {}) ⇒ HttpsEapiConnection
Returns a new instance of HttpsEapiConnection.
378 379 380 381 382 383 384 385 386 387 388 389 |
# File 'lib/rbeapi/eapilib.rb', line 378 def initialize(opts = {}) host = opts.fetch(:host, 'localhost') port = opts.fetch(:port, DEFAULT_HTTPS_PORT) transport = Net::HTTP.new(host, port) transport.use_ssl = true transport.verify_mode = OpenSSL::SSL::VERIFY_NONE super(transport) authentication(opts) timeouts(opts) end |