Assert that bd0 is reserved
This commit is contained in:
@ -122,6 +122,10 @@ def validate_bridgedomains(yaml):
|
|||||||
bd_mtu = 1500
|
bd_mtu = 1500
|
||||||
if 'mtu' in iface:
|
if 'mtu' in iface:
|
||||||
bd_mtu = iface['mtu']
|
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:
|
if 'addresses' in iface and not 'lcp' in iface:
|
||||||
msgs.append("bridgedomain %s has an address but no LCP" % ifname)
|
msgs.append("bridgedomain %s has an address but no LCP" % ifname)
|
||||||
|
@ -5,7 +5,8 @@ test:
|
|||||||
- "interface .* does not have a unique LCP name"
|
- "interface .* does not have a unique LCP name"
|
||||||
- "loopback .* does not have a unique LCP name"
|
- "loopback .* does not have a unique LCP name"
|
||||||
- "bridgedomain .* does not have a unique LCP name"
|
- "bridgedomain .* does not have a unique LCP name"
|
||||||
count: 3
|
- "bridgedomain bd0 is reserved"
|
||||||
|
count: 4
|
||||||
---
|
---
|
||||||
interfaces:
|
interfaces:
|
||||||
GigabitEthernet1/0/0:
|
GigabitEthernet1/0/0:
|
||||||
@ -22,5 +23,6 @@ loopbacks:
|
|||||||
|
|
||||||
bridgedomains:
|
bridgedomains:
|
||||||
bd0:
|
bd0:
|
||||||
|
description: "bd_id 0 in VPP is reserved"
|
||||||
lcp: "e1"
|
lcp: "e1"
|
||||||
interfaces: [ GigabitEthernet2/0/0, GigabitEthernet2/0/1 ]
|
interfaces: [ GigabitEthernet2/0/0, GigabitEthernet2/0/1 ]
|
||||||
|
Reference in New Issue
Block a user