Add scope_types attribute to the BaseCheck class
Neutron, based on the defined policy rules is creating check objects "in flight" to e.g. include check some object's attributes, like e.g. network's provider parameters. That use case requires that BaseCheck class and classes which inherits from it needs to have scope_types defined thus Neutron can set it for the Check based on the defined policy rule. This patch adds scope_types attribute to the BaseCheck class to make it available for use cases like described above. Related-Bug: #1923503 Change-Id: Ibf30d0ffa5e9b125742089705d3557c02a03bc43
This commit is contained in:
@@ -83,6 +83,8 @@ def _check(rule, target, creds, enforcer, current_rule):
|
||||
class BaseCheck(metaclass=abc.ABCMeta):
|
||||
"""Abstract base class for Check classes."""
|
||||
|
||||
scope_types = None
|
||||
|
||||
@abc.abstractmethod
|
||||
def __str__(self):
|
||||
"""String representation of the Check tree rooted at this node."""
|
||||
|
||||
Reference in New Issue
Block a user