Add bridge-domain support.

Refactor validator main function to avoid 'interface' symbol clash.
Add get_mtu() for interfaces, returns the sub-int's MTU or its parent's MTU, defaulting to 1500.
Ensure MTU for all bridge-domain members is set to the same value.
Ensure all bridge-domain members are L2 (have no LCP, have no address)
This commit is contained in:
Pim van Pelt
2022-03-13 11:17:44 +00:00
parent 3d6903bfdc
commit 6b8735bb18
7 changed files with 112 additions and 16 deletions

View File

@ -21,6 +21,9 @@ interfaces:
GigabitEthernet2/0/1:
description: "Infra: LAG to xsw1"
GigabitEthernet3/0/0:
description: "Infra: Bridge Doamin 10"
BondEthernet0:
description: "Bond, James Bond!"
mac: 00:01:02:03:04:05
@ -46,3 +49,11 @@ loopbacks:
mtu: 9216
lcp: "loop0"
addresses: [ 192.0.2.1/32, 2001:db8:1::1/128 ]
bridgedomains:
bd10:
description: "Bridge Domain 10"
mtu: 1500
lcp: "bvi10"
addresses: [ 192.0.2.9/29, 2001:db8:2::1/64 ]
interfaces: [ BondEthernet0.203, GigabitEthernet3/0/0 ]