Package onep :: Package interfaces :: Module InterfaceFilter :: Class InterfaceFilter
[frames] | no frames]

Class InterfaceFilter


InterfaceFilter represents a subset of NetworkInterface on NetworkElement. The filter specifies the criteria to be matched against the NetworkInterfaceList so as to select the subset of interfaces matching the criteria.

InterfaceFilter class can be used to specify subset of interface list for various operations like listing of network interfaces, or adding event listeners on the subset of interfaces.

Instance Methods
 
__init__(self, interface=None, interface_type=NetworkInterface.InterfaceTypes.ONEP_IF_TYPE_ANY)
Creates the interface filter for the given criteria in the parameters If no parameters are provided it returns an empty interface filter that will match all the interfaces on the network element.

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

Class Variables
  interface = property(_get_interface, _set_interface, None, _doc)
  interface_type = property(_get_type, _set_type, None, _doc)
Properties

Inherited from object: __class__

Method Details

__init__(self, interface=None, interface_type=NetworkInterface.InterfaceTypes.ONEP_IF_TYPE_ANY)
(Constructor)

 

Creates the interface filter for the given criteria in the parameters If no parameters are provided it returns an empty interface filter that will match all the interfaces on the network element.

Parameters:
  • interface (NetworkInterface) - Specific interface to be matched. The value can be set to None to indicate no specific interface. When not None, this attribute supersedes any other settings in the filter. The default value is None
  • interface_type (InterfaceTypes) - Type of interfaces to be filtered. This parameter is ineffective if the interface parameter is set to a non-None value. The default value will be set to (InterfaceTypes.ONEP_IF_TYPE_ANY) if None is passed.
Returns:
InterfaceFilter Instance
Overrides: object.__init__