Package onep :: Package policyservice :: Module classmap :: Class ClassMap
[frames] | no frames]

Class ClassMap


ClassMap class.

This class contains a hierarchy of matches that define class map.

The ClassMap object is created with specified PolicyCapability and may be associated with one or more targets.

Adding and removing Match(es) from this class will result in the local copy's Match(es) being removed.

If the corresponding ClassMap requires that the Network Element's require changes, then the class BulkServices must be use to submit those changes or else those changes will not be noted on the Network Element.

Instance Methods
 
__init__(self, capabilities=None, name=None, storage_type=StorageType.TRANSIENT)
Constructs an instance of ClassMap with specified capability.
 
capabilities(self)
 
add_match(self, *matches)
Adds match(es) to the class map.
 
add_match_not(self, *matches)
Adds match(es) which specify the match criterion as an unsuccessful match criterion.
 
remove_match(self, *matches)
Removes match(es) from the class map.
 
remove_all_match(self)
Removes all matches from the class map.
 
get_result_detail(self)
Gets the results from submit/update/delete operations
 
__str__(self)
str(x)

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

Class Variables
  match_all = property(_get_match_all, _set_match_all, None, _do...
  handle = property(_get_handle, _set_handle, None, _doc_handle)
  ClassOperation = enum(ONEP_CLASS_OP_CREATE= 0, ONEP_CLASS_OP_M...
  result_code = property(_get_result_code, None, None, _doc_resu...
  result_text = property(_get_result_text, None, None, _doc_resu...
Properties

Inherited from object: __class__

Method Details

__init__(self, capabilities=None, name=None, storage_type=StorageType.TRANSIENT)
(Constructor)

 

Constructs an instance of ClassMap with specified capability.

Parameters:
Raises:
Overrides: object.__init__

capabilities(self)

 
Decorators:
  • @property

add_match(self, *matches)

 

Adds match(es) to the class map.

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

add_match_not(self, *matches)

 

Adds match(es) 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 class map.

Removes only the matches that are added to class map.

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

__str__(self)
(Informal representation operator)

 

str(x)

Overrides: object.__str__
(inherited documentation)

Class Variable Details

match_all

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

ClassOperation

Value:
enum(ONEP_CLASS_OP_CREATE= 0, ONEP_CLASS_OP_MODIFY= 1, ONEP_CLASS_OP_D\
ELETE= 2, ONEP_CLASS_OP_REP= 3, ONEP_CLASS_OP_GET= 5)

result_code

Value:
property(_get_result_code, None, None, _doc_result_code)

result_text

Value:
property(_get_result_text, None, None, _doc_result_text)