Allow bondethernet members list to be empty, and omitted from the YAML config

This commit is contained in:
Pim van Pelt
2022-04-05 16:08:51 +00:00
parent 41bce7131c
commit 8971c325c0
5 changed files with 22 additions and 3 deletions

View File

@ -171,6 +171,9 @@ def validate_bondethernets(yaml):
msgs.append("bondethernet %s can only have load-balance if in mode XOR or LACP" % (ifname))
result = False
if not 'interfaces' in iface:
continue
for member in iface['interfaces']:
if (None, None) == interface.get_by_name(yaml, member):
msgs.append("bondethernet %s member %s does not exist" % (ifname, member))