Package onep :: Package policyservice :: Module policymap :: Class Entry
[frames] | no frames]

Class Entry


Entry class.

This class is a container for matches and and actions Matches may be applied directly to the Entry or by reference using a ClassMap.

There can only be one ClassMap per Entry, but each PolicyMap can have multiple Entries with different ClassMap.

The Entry can have only one match of a given type.

Actions are applied directly to the Entry. An Entry with directly applied matches can be used for Open Flow or DPSS programming.

Instance Methods
 
__init__(self)
Constructor of Class Entry.
 
set_insert_sequence(self, sequence)
Insert an entry in policy by sequence number.
 
add_match(self, *matches, **kwargs)
Adds match(es) to the entry.
 
add_match_not(self, *matches)
Adds matches which specify the match criterion as an unsuccessful match criterion.
 
remove_match(self, *matches)
Removes match(es) from the entry.
 
remove_action(self, *actions)
Removes action(s) from the Entry class.
 
replace_all_actions(self, *actions)
Replaces all actions in Entry class with the new actions passed in.

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

Class Variables
  match_all = property(_get_match_all, _set_match_all, None, _do...
  priority = property(_get_priority, _set_priority, None, _doc_p...
  class_map = property(_get_class_map, _set_class_map, None, _do...
Properties

Inherited from object: __class__

Method Details

__init__(self)
(Constructor)

 

Constructor of Class Entry.

Overrides: object.__init__

set_insert_sequence(self, sequence)

 

Insert an entry in policy by sequence number.

Lower sequence numbers have higher precedence.

Parameters:
  • sequence (int) - Position of entry in policy.
Raises:

add_match(self, *matches, **kwargs)

 

Adds match(es) to the entry.

Parameters:
  • matches (Variable length argument list of Match) - The matches.

add_match_not(self, *matches)

 

Adds matches which specify the match criterion as an unsuccessful match criterion.

This is equivalent to CLI "match not <match-criterion>"

Parameters:
  • matches (Variable length argument list of Match) - The matches.

remove_match(self, *matches)

 

Removes match(es) from the entry.

Removes only the matches that are added to entry.

Parameters:
  • matches (Variable length argument list of Match) - The matches.

remove_action(self, *actions)

 

Removes action(s) from the Entry class.

Removes only the actions that are added to entry.

Parameters:
  • actions (Action) - Tuple of Action classes

replace_all_actions(self, *actions)

 

Replaces all actions in Entry class with the new actions passed in.

Parameters:
  • actions (Action) - Tuple of Action classes

Class Variable Details

match_all

Value:
property(_get_match_all, _set_match_all, None, _doc_match_all)

priority

Value:
property(_get_priority, _set_priority, None, _doc_priority)

class_map

Value:
property(_get_class_map, _set_class_map, None, _doc_class_map)