Enforce that when a bridgedomain has an address (ie a BVI), that it must also have an LCP

This commit is contained in:
Pim van Pelt
2022-03-13 19:32:30 +00:00
parent 8825984d49
commit 0d8a28cadd
3 changed files with 23 additions and 10 deletions

View File

@ -32,6 +32,10 @@ def validate_bridgedomains(yaml):
if 'mtu' in iface:
bd_mtu = iface['mtu']
if 'addresses' in iface and not 'lcp' in iface:
msgs.append("bridgedomain %s has an address but no LCP" % ifname)
result = False
if 'interfaces' in iface:
for member in iface['interfaces']:
member_iface = interface.get_by_name(yaml, member)