From b27482c0201a433762168abe2d369ea43a599f1c Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 19 Sep 2019 22:29:11 +0200 Subject: ethernet: T1637: interfaces in a bond can be disabled --- src/conf_mode/interface-ethernet.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/conf_mode') diff --git a/src/conf_mode/interface-ethernet.py b/src/conf_mode/interface-ethernet.py index 4f455e8d3..f82105847 100755 --- a/src/conf_mode/interface-ethernet.py +++ b/src/conf_mode/interface-ethernet.py @@ -253,12 +253,10 @@ def verify(eth): # some options can not be changed when interface is enslaved to a bond for bond in conf.list_nodes('interfaces bonding'): if conf.exists('interfaces bonding ' + bond + ' member interface'): - if eth['name'] in conf.return_values('interfaces bonding ' + bond + ' member interface'): - if eth['disable']: - raise ConfigError('Can not disable interface {} which is a member of {}').format(eth['intf'], bond) - - if eth['address']: - raise ConfigError('Can not assign address to interface {} which is a member of {}').format(eth['intf'], bond) + bond_member = conf.return_values('interfaces bonding ' + bond + ' member interface') + if eth['name'] in bond_member: + if eth['address']: + raise ConfigError('Can not assign address to interface {} which is a member of {}').format(eth['intf'], bond) return None -- cgit v1.2.3