diff --git a/config/bridgedomain.py b/config/bridgedomain.py index 96442b1..4c2f313 100644 --- a/config/bridgedomain.py +++ b/config/bridgedomain.py @@ -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) diff --git a/unittest/yaml/error-lcp-unique2.yaml b/unittest/yaml/error-lcp-unique2.yaml index a75fc54..22380c0 100644 --- a/unittest/yaml/error-lcp-unique2.yaml +++ b/unittest/yaml/error-lcp-unique2.yaml @@ -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 ]