Add unit tests for bondethernet
This commit is contained in:
@ -80,19 +80,6 @@ def has_address(yaml, ifname):
|
||||
return 'addresses' in iface
|
||||
|
||||
|
||||
def is_bond_member(yaml, ifname):
|
||||
""" Returns True if this interface is a member of a BondEthernet """
|
||||
if not 'bondethernets' in yaml:
|
||||
return False
|
||||
|
||||
for bond, iface in yaml['bondethernets'].items():
|
||||
if not 'interfaces' in iface:
|
||||
continue
|
||||
if ifname in iface['interfaces']:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def get_bridge_interfaces(yaml):
|
||||
""" Returns a list of all interfaces that are bridgedomain members """
|
||||
|
||||
|
Reference in New Issue
Block a user