Conversation
… StaticRoutingProtocol and DistributedRoutingProtocol. The register decorator is used to make it easy to plug in new routing protocols in the future.
There was a problem hiding this comment.
Pull request overview
This PR introduces a new sequence.network_management.routing package that unifies routing protocols behind a RoutingProtocol base class + registry, and updates call sites/configs to use the new routing identifiers and forwarding-table update API.
Changes:
- Added
RoutingProtocol(registry + factory) and migratedStaticRoutingProtocol/DistributedRoutingProtocolintosequence/network_management/routing/. - Updated NetworkManager/topologies/tests/examples to reference the new routing module and to use
update_forwarding_rule. - Updated JSON test topologies to use the new routing type strings (
routing_static,routing_distributed).
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/topology/test_dqc_node_net_topo.py | Adds an import-time test invocation (problematic). |
| tests/topology/dqc_node_net_topo_simple.json | Updates routing type string to routing_static. |
| tests/network_management/test_routing.py | Updates imports and logging module names for distributed routing. |
| tests/network_management/test_network_manager.py | Switches to update_forwarding_rule API. |
| tests/network_management/ring_topo.json | Updates routing type string to routing_distributed. |
| tests/network_management/line_topo.json | Updates routing type string to routing_distributed. |
| sequence/topology/router_net_topo.py | Uses new routing module import + update_forwarding_rule. |
| sequence/topology/dqc_net_topo.py | Uses update_forwarding_rule when generating forwarding tables. |
| sequence/network_management/routing_static.py | Removes old module (migrated into package). |
| sequence/network_management/routing/routing_static.py | New static routing protocol registered via RoutingProtocol. |
| sequence/network_management/routing/routing_distributed.py | Migrates distributed routing protocol + registers it; updates message receiver naming. |
| sequence/network_management/routing/routing_base.py | Adds routing base class/registry + forwarding table helpers. |
| sequence/network_management/routing/init.py | Re-exports routing APIs from the new package. |
| sequence/network_management/network_manager.py | Switches routing protocol creation to registry-based factory. |
| sequence/network_management/init.py | Updates exported submodules list. |
| sequence/gui/simulator_bindings.py | Updates forwarding rule API usage (currently targets wrong object). |
| example/demo_for_beginners/three_node_eg_ep_es.ipynb | Updates example calls to update_forwarding_rule. |
| CHANGELOG.md | Documents the new routing module and adjusts formatting. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Should there be a global type, or should we allow nodes to have differing routing protocols?
There was a problem hiding this comment.
Good catch. The global_type is removed. I do not want to enforce that all nodes have the same routing protocol. Even though this might be the most common scenario.
Added the
routingmodule: a new parent classRoutingProtocolfor the subclassesStaticRoutingProtocolandDistributedRoutingProtocol. The register decorator is used to make it easy to plug in new routing protocols in the future.Issue #325