Method: Rbeapi::Api::Acl#add_entry

Defined in:
lib/rbeapi/api/acl.rb

#add_entry(name, entry) ⇒ Boolean

add_entry will add an entry to the specified ACL with the passed in parameters.

Parameters:

  • name (String)

    The ACL name to add an entry to on the node.

  • entry (Hash)

    the options for the entry.

Options Hash (entry):

  • action (String)

    The action triggered by the ACL. Valid values are ‘permit’, ‘deny’, or ‘remark’.

  • addr (String)

    The IP address to permit or deny.

  • prefixlen (String)

    The prefixlen for the IP address.

  • log (Boolean)

    Triggers an informational log message to the console about the matching packet.

Returns:

  • (Boolean)

    Returns true if the command complete successfully.

Since:

  • eos_version 4.13.7M



326
327
328
329
330
331
# File 'lib/rbeapi/api/acl.rb', line 326

def add_entry(name, entry)
  cmds = ["ip access-list standard #{name}"]
  cmds << build_entry(entry)
  cmds << 'exit'
  configure(cmds)
end