Skip to content

Commit

Permalink
BUGFIX: Groups may include 'bool' flags, test for that
Browse files Browse the repository at this point in the history
  • Loading branch information
jbemmel committed Dec 6, 2024
1 parent 287dc22 commit 45e78fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion netsim/extra/repeater/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def repeat_node(node: Box, topology: Box) -> None:

if 'groups' in topology:
for group in topology.groups.values():
if node.name in group.members:
if isinstance(group,dict) and node.name in group.get('members',[]): # Groups can include 'bool flags too
group.members.extend( clones )

if 'vlans' in topology:
Expand Down
1 change: 1 addition & 0 deletions tests/topology/input/repeater-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ vlans:
links: [r-h] # VLAN links get updated

groups:
_auto_create: True # Test presence of bool flag
hosts:
members: [h] # Gets updated with cloned nodes

Expand Down

0 comments on commit 45e78fe

Please sign in to comment.