Method: Rbeapi::Api::Entity#configure_interface

Defined in:
lib/rbeapi/api.rb

#configure_interface(name, commands) ⇒ Boolean

configure_interface sends the commands over eAPI to the destination node to configure a specific interface.

Parameters:

  • name (String)

    The interface name to apply the configuration to. The name value must be the full interface identifier.

  • commands (Array)

    The list of commands to configure the interface.

Returns:

  • (Boolean)

    Returns true if the commands complete successfully.



178
179
180
181
182
# File 'lib/rbeapi/api.rb', line 178

def configure_interface(name, commands)
  commands = [*commands]
  commands.insert(0, "interface #{name}")
  configure commands
end