From 0d182eca3f6f7ae2de192b2d5027c908876668e6 Mon Sep 17 00:00:00 2001 From: J vanBemmel Date: Mon, 30 Dec 2024 09:21:41 -0600 Subject: [PATCH] Use internal flag to mark temporary virtual lag links In multi-provider scenario's, link.type is changed resulting in virtual lag links not being removed --- netsim/modules/lag.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netsim/modules/lag.py b/netsim/modules/lag.py index 686a62bb7..1eb1555ee 100644 --- a/netsim/modules/lag.py +++ b/netsim/modules/lag.py @@ -338,7 +338,7 @@ def process_lag_link(link: Box, topology: Box) -> bool: create_peer_links(link,topology) return False else: - link.type = 'virtual_lag' # Temporary virtual link, removed in module_post_link_transform + link._virtual_lag = True # Temporary virtual link, removed in module_post_link_transform return create_lag_member_links(link,topology) # @@ -417,7 +417,7 @@ def link_pre_link_transform(self, link: Box, topology: Box) -> None: def module_post_link_transform(self, topology: Box) -> None: if log.debug_active('lag'): print(f'LAG module_post_link_transform: Cleanup "virtual_lag" links') - topology.links = [ link for link in topology.links if link.type != 'virtual_lag' ] + topology.links = [ link for link in topology.links if '_virtual_lag' not in link ] """ After attribute propagation and consolidation, verify that requested features are supported.