Files
vppcfg/schema.yaml
Pim van Pelt 2360d28d0a Add the ability to set any mode/lb on bonds
This requires a schema change, adding 'mode' and 'load-balance' fields,
a semantic invariant that 'load-balance' can only be set in the case of
LACP and XOR bonds, a mapper from the mode/lb strings, ie.
"round-robin" to their VPP numeric counterparts, a bunch of unit tests.

Then in the reconciler, changing bonds (__bond_has_diff()) will
invalidate any LCP or sub-interfaces built on them, so those will have
to be pruned. create_bondethernet() will now create (or re-create)
the bond with the correct flags.

Unit-tests, YAML tests and the integration test all pass.

Updated config-guide.
2022-04-05 15:05:03 +00:00

65 lines
2.6 KiB
YAML

interfaces: map(include('interface'),key=str(),required=False)
bondethernets: map(include('bondethernet'),key=str(matches='BondEthernet[0-9]+'),required=False)
loopbacks: map(include('loopback'),key=str(matches='loop[0-9]+'),required=False)
bridgedomains: map(include('bridgedomain'),key=str(matches='bd[0-9]+'),required=False)
vxlan_tunnels: map(include('vxlan'),key=str(matches='vxlan_tunnel[0-9]+'),required=False)
---
vxlan:
description: str(exclude='\'"',len=64,required=False)
local: ip()
remote: ip()
vni: int(min=1,max=16777215)
---
bridgedomain:
description: str(exclude='\'"',len=64,required=False)
mtu: int(min=128,max=9216,required=False)
bvi: str(matches='loop[0-9]+',required=False)
interfaces: list(str(),required=False)
settings: include('bridgedomain-settings',required=False)
---
bridgedomain-settings:
learn: bool(required=False)
unicast-flood: bool(required=False)
unknown-unicast-flood: bool(required=False)
unicast-forward: bool(required=False)
arp-termination: bool(required=False)
arp-unicast-forward: bool(required=False)
mac-age-minutes: int(min=0,max=255,required=False)
---
loopback:
description: str(exclude='\'"',len=64,required=False)
lcp: str(max=15,matches='[a-z]+[a-z0-9-]*',required=False)
mtu: int(min=128,max=9216,required=False)
addresses: list(ip_interface(),min=1,max=6,required=False)
---
bondethernet:
description: str(exclude='\'"',len=64,required=False)
interfaces: list(str(matches='.*GigabitEthernet[0-9]+/[0-9]+/[0-9]+'))
mode: enum('round-robin','active-backup','broadcast','lacp','xor',required=False)
load-balance: enum('l2','l23','l34',required=False)
---
interface:
description: str(exclude='\'"',len=64,required=False)
mac: mac(required=False)
lcp: str(max=15,matches='[a-z]+[a-z0-9-]*',required=False)
mtu: int(min=128,max=9216,required=False)
addresses: list(ip_interface(),min=1,max=6,required=False)
sub-interfaces: map(include('sub-interface'),key=int(min=1,max=4294967295),required=False)
l2xc: str(required=False)
state: enum('up', 'down', required=False)
---
sub-interface:
description: str(exclude='\'"',len=64,required=False)
lcp: str(max=15,matches='[a-z]+[a-z0-9-]*',required=False)
mtu: int(min=128,max=9216,required=False)
addresses: list(ip_interface(),required=False)
encapsulation: include('encapsulation',required=False)
l2xc: str(required=False)
state: enum('up', 'down', required=False)
---
encapsulation:
dot1q: int(min=1,max=4095,required=False)
dot1ad: int(min=1,max=4095,required=False)
inner-dot1q: int(min=1,max=4095,required=False)
exact-match: bool(required=False)