Remove Default Routes¶
-
rig.routing_table.remove_default_routes.
minimise
(table, target_length, check_for_aliases=True)[source]¶ Remove from the routing table any entries which could be replaced by default routing.
Parameters: - routing_table : [
RoutingTableEntry
, …] Routing table from which to remove entries which could be handled by default routing.
- target_length : int or None
Target length of the routing table.
- check_for_aliases : bool
If True (the default), default-route candidates are checked for aliased entries before suggesting a route may be default routed. This check is required to ensure correctness in the general case but has a runtime complexity of O(N^2) in the worst case for N-entry tables.
If False, the alias-check is skipped resulting in O(N) runtime. This option should only be used if the supplied table is guaranteed not to contain any aliased entries.
Returns: - [:py:class:`~rig.routing_table.RoutingTableEntry`, …]
Reduced routing table entries.
Raises: - MinimisationFailedError
If the smallest table that can be produced is larger than target_length.
- routing_table : [