Package onep :: Package policy :: Module L3Acl :: Class L3Acl
[frames] | no frames]

Class L3Acl


L3 Access Control List(ACL) class.

It is a list of L3 Access Control Elements(ACE) that define attributes for matching a packet.

Instance Methods
 
__init__(self, element, afi, lifetime, header=None)
Constructor of class L3Acl.
 
delete_acl(self)
Delete L3 Access Control List(ACL).
 
add_ace(self, ace)
Add a L3 Access Control Element(ACE) to the L3 Access Control List(ACL).
 
remove_ace(self, ace)
Remove a L3 Access Control Element(ACE) from L3 Access Control List(ACL).
str
__str__(self)
Returns a string representation of the L3 Access Control List(ACL) instance.

Inherited from Acl.Acl: apply_to_interface, remove_from_interface

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables
Enum OnepLifetime = enum('ONEP_TRANSIENT', 'ONEP_PERSISTENT')
Enumeration of lifetime of an Acl.

Inherited from Acl.Acl: AclType, Direction

Properties

Inherited from object: __class__

Method Details

__init__(self, element, afi, lifetime, header=None)
(Constructor)

 

Constructor of class L3Acl.

Instantiate a new L3 Access Control List(ACL).

Parameters:
Raises:
Overrides: object.__init__

delete_acl(self)

 

Delete L3 Access Control List(ACL).

Attempt to delete L3-ACL which is already applied to the network interface raises exception.

Raises:

add_ace(self, ace)

 

Add a L3 Access Control Element(ACE) to the L3 Access Control List(ACL).

Already added L3-ACE cannot be added in the same L3-ACL again.

Parameters:
  • ace (L3Ace) - L3 ACE instance to be added in L3 ACL.
Raises:

remove_ace(self, ace)

 

Remove a L3 Access Control Element(ACE) from L3 Access Control List(ACL).

Parameters:
  • ace (L3Ace) - L3 ACE instance to be removed from L3 ACL.
Raises:

__str__(self)
(Informal representation operator)

 

Returns a string representation of the L3 Access Control List(ACL) instance.

Returns: str
String representation of the L3 ACL.
Overrides: object.__str__

Class Variable Details

OnepLifetime

Enumeration of lifetime of an Acl.

ONEP_TRANSIENT: Transient Acl

ONEP_PERSISTENT: Persistent Acl

Type:
Enum
Value:
enum('ONEP_TRANSIENT', 'ONEP_PERSISTENT')