Method: Rbeapi::Api::Entity#configure

Defined in:
lib/rbeapi/api.rb

#configure(commands) ⇒ Boolean

Method called to send configuration commands to the node. This method will send the commands to the node and rescue from CommandError or ConnectionError.

Parameters:

  • commands (String, Array)

    The commands to send to the node over the API connection to configure the system.

Returns:

  • (Boolean)

    Returns True if the commands were successful or returns False if there was an error issuing the commands on the node. Use error to further investigate the cause of any errors.



128
129
130
131
132
133
# File 'lib/rbeapi/api.rb', line 128

def configure(commands)
  @node.config(commands)
  return true
rescue Rbeapi::Eapilib::CommandError, Rbeapi::Eapilib::ConnectionError
  return false
end