Skip to content

Pr/routing control plane participation#561

Merged
kevin-w-du merged 14 commits into
developmentfrom
pr/routing-control-plane-participation
Jun 18, 2026
Merged

Pr/routing control plane participation#561
kevin-w-du merged 14 commits into
developmentfrom
pr/routing-control-plane-participation

Conversation

@kevin-w-du

Copy link
Copy Markdown
Member

No description provided.

Comment thread seedemu/core/AutonomousSystem.py Outdated
self.__subnets = None if asn > 255 else list(IPv4Network(subnetTemplate.format(asn)).subnets(new_prefix = 24))
self.__name_servers = []
self.__clusters = {}
self.__ibgp_mode = None

@lxl706423651 lxl706423651 Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting it to IBGP_MODE_FULL_MESH directly here improves readability for both users and developers. Using the getIbgpMode() function at a later position may make the logic harder to follow.

Comment thread seedemu/core/AutonomousSystem.py Outdated
IBGP_MODE_ROUTE_REFLECTOR = "route-reflector"
IBGP_MODE_DISABLED = "disabled"

IBGP_MODE_LEGACY_FULL_MESH = "legacy-full-mesh"

@lxl706423651 lxl706423651 Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have IBGP_MODE_FULL_MESH, which is also set as our default mode. There is no need to introduce additional definitions for IBGP_MODE_LEGACY_FULL_MESH and IBGP_MODE_ALIASES. Furthermore, no functions within this file reference these variables, and users should not configure parameters to these values manually.

Comment thread seedemu/core/AutonomousSystem.py Outdated
self.__ibgp_mode = None
self.__bgp_scope = BGP_SCOPE_ALL_ROUTERS
self.__core_forwarding = CORE_FORWARDING_PLAIN_IP
self.__ospf_mode = None

@lxl706423651 lxl706423651 Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can also directly set it to OSPF_MODE_LEGACY here, which would be more intuitive for readers.

Comment thread seedemu/core/Node.py Outdated
ROUTER_BGP_ROLE_CORE = "core"
ROUTER_BGP_ROLES = {ROUTER_BGP_ROLE_EDGE, ROUTER_BGP_ROLE_CORE}

ROUTER_CONTROL_PLANE_ROLE_EDGE = ROUTER_BGP_ROLE_EDGE

@lxl706423651 lxl706423651 Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have BGP role, so introducing another BGP_CONTROL_PLANE_ROLE seems unnecessary, as both represent the exact same concept.

Comment thread seedemu/layers/Ibgp.py Outdated
"""
return self.__masked

def setAsMode(self, asn: int, mode: str) -> Ibgp:

@lxl706423651 lxl706423651 Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn’t we agree to remove this setAsMode function earlier? All relevant configurations are now uniformly managed at the AS level.

Comment thread seedemu/layers/Ibgp.py Outdated
"""
return set(self.__excluded.get(int(asn), set()))

def addSession(self, asn: int, localRouterName: str, peerRouterName: str) -> Ibgp:

@lxl706423651 lxl706423651 Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is unclear what purpose this direct error-reporting function serves, as no calls to it can be found in the surrounding code context.

Comment thread seedemu/layers/Ibgp.py Outdated
)
}

def __get_legacy_router_list(self, asn: int, routers: List[Node], routers_map: Dict[str, Node]) -> List[Node]:

@lxl706423651 lxl706423651 Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The purpose of this function is unclear, and it is not invoked by any other functions in the codebase.

Comment thread seedemu/layers/Mpls.py

n += 1

def configure(self, emulator: Emulator):

@lxl706423651 lxl706423651 Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems there is no integration with setCoreForwarding("mpls") inside the AS module. This logic remains independent and fails to replace mpls.enableOn(asn).

Comment thread seedemu/layers/Ospf.py Outdated
def getName(self) -> str:
return 'Ospf'

def setAsMode(self, asn: int, mode: str) -> Ospf:

@lxl706423651 lxl706423651 Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This presents the same issue. This API should have been replaced by AutonomousSystem.setOspfMode().

@kevin-w-du
kevin-w-du merged commit 36e85f2 into development Jun 18, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants