Add convenience method for router acl

This commit is contained in:
Marek Wolan
2024-01-08 13:28:55 +00:00
parent 27f70204ed
commit 294c8b982f

View File

@@ -319,6 +319,15 @@ class AccessControlList(SimComponent):
)
print(table)
@property
def num_rules(self) -> int:
"""
Get the number of rules in the ACL.
:return: The number of rules in the ACL.
"""
return len([rule for rule in self._acl if rule is not None])
class RouteEntry(SimComponent):
"""