Skip to content

Commit

Permalink
Use internal flag to mark temporary virtual lag links
Browse files Browse the repository at this point in the history
In multi-provider scenario's, link.type is changed resulting in virtual lag links not being removed
  • Loading branch information
jbemmel committed Jan 1, 2025
1 parent c8e6fd8 commit 0d182ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions netsim/modules/lag.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

#
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 0d182ec

Please sign in to comment.