From 5474a82034a0354c0e5878fd6690d0861435e992 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Mon, 7 Aug 2023 13:41:24 +0200 Subject: vyos.configdict(): T4228: fix bonding error message interface name 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) --- src/conf_mode/interfaces-bonding.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf_mode/interfaces-bonding.py b/src/conf_mode/interfaces-bonding.py index b3b4e6342..0bd306ed0 100755 --- a/src/conf_mode/interfaces-bonding.py +++ b/src/conf_mode/interfaces-bonding.py @@ -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: -- cgit v1.2.3