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

Class Acl


Access Control List (ACL) Class.

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

Instance Methods
 
__init__(self, element)
Constructor of class Acl.
 
apply_to_interface(self, nif, nif_direction)
Apply an ACL to the Interface.
 
remove_from_interface(self, nif, nif_direction)
Remove an ACl from the Interface.
str
__str__(self)
Returns a string representation of the Acl object instance.

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

Class Variables
  AclType = enum('ONEP_ACL_L2', 'ONEP_ACL_L3')
Enum Direction = enum('ONEP_DIRECTION_IN', 'ONEP_DIRECTION_OUT', 'O...
Enumeration of Acl direction.
Properties

Inherited from object: __class__

Method Details

__init__(self, element)
(Constructor)

 

Constructor of class Acl.

Instantiate a new Access Control List.

Parameters:
Raises:
Overrides: object.__init__

apply_to_interface(self, nif, nif_direction)

 

Apply an ACL to the Interface.

ACL is applied to network interface in inbound,outbound or in both direction.

Parameters:
Raises:

remove_from_interface(self, nif, nif_direction)

 

Remove an ACl from the Interface.

ACL is removed from network interface.

Parameters:
Raises:

__str__(self)
(Informal representation operator)

 

Returns a string representation of the Acl object instance.

Returns: str
String representation of the Acl object.
Overrides: object.__str__

Class Variable Details

Direction

Enumeration of Acl direction.

ONEP_DIRECTION_IN: Inbound direction

ONEP_DIRECTION_OUT: Outbound direction

ONEP_DIRECTION_BOTH: Both inbound and outbound direction

Type:
Enum
Value:
enum('ONEP_DIRECTION_IN', 'ONEP_DIRECTION_OUT', 'ONEP_DIRECTION_BOTH')