Assert that bd0 is reserved

This commit is contained in:
Pim van Pelt
2022-03-26 11:25:13 +00:00
parent abbabcf2d0
commit 660cccd14e
2 changed files with 7 additions and 1 deletions

View File

@ -122,6 +122,10 @@ def validate_bridgedomains(yaml):
bd_mtu = 1500
if 'mtu' in iface:
bd_mtu = iface['mtu']
instance = int(ifname[2:])
if instance == 0:
msgs.append("bridgedomain %s is reserved" % ifname)
result = False
if 'addresses' in iface and not 'lcp' in iface:
msgs.append("bridgedomain %s has an address but no LCP" % ifname)

View File

@ -5,7 +5,8 @@ test:
- "interface .* does not have a unique LCP name"
- "loopback .* does not have a unique LCP name"
- "bridgedomain .* does not have a unique LCP name"
count: 3
- "bridgedomain bd0 is reserved"
count: 4
---
interfaces:
GigabitEthernet1/0/0:
@ -22,5 +23,6 @@ loopbacks:
bridgedomains:
bd0:
description: "bd_id 0 in VPP is reserved"
lcp: "e1"
interfaces: [ GigabitEthernet2/0/0, GigabitEthernet2/0/1 ]