Skip to content

Commit

Permalink
vyos.configdict(): T4228: fix bonding error message interface name
Browse files Browse the repository at this point in the history
This fixes the error message:

Can not add interface "eth1" to bond, it is already a member of bridge
"{'br6327': {}}"!

As the dict should be moved to a string (br6327)
  • Loading branch information
c-po committed Aug 7, 2023
1 parent a7898fd commit 5474a82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/conf_mode/interfaces-bonding.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,11 @@ def verify(bond):
raise ConfigError(error_msg + 'it does not exist!')

if 'is_bridge_member' in interface_config:
tmp = interface_config['is_bridge_member']
tmp = next(iter(interface_config['is_bridge_member']))
raise ConfigError(error_msg + f'it is already a member of bridge "{tmp}"!')

if 'is_bond_member' in interface_config:
tmp = interface_config['is_bond_member']
tmp = next(iter(interface_config['is_bond_member']))
raise ConfigError(error_msg + f'it is already a member of bond "{tmp}"!')

if 'is_source_interface' in interface_config:
Expand Down

0 comments on commit 5474a82

Please sign in to comment.