Method: Rbeapi::Eapilib::EapiConnection#authentication

Defined in:
lib/rbeapi/eapilib.rb

#authentication(opts = {}) ⇒ Object

Configures the connection authentication values (username and password). The authentication values are used to authenticate the eAPI connection. Using authentication is only required for connections that use Http or Https transports.

Parameters:

  • opts (Hash) (defaults to: {})

    The authentication parameters.

Options Hash (opts):

  • username (String)

    The username to use to authenticate with eAPI. Default is ‘admin’.

  • password (String)

    The password to use to authenticate with eAPI. Default is ”.



154
155
156
157
# File 'lib/rbeapi/eapilib.rb', line 154

def authentication(opts = {})
  @username = opts.fetch(:username, 'admin')
  @password = opts.fetch(:password, '')
end