unittest
correct-address.yaml
correct-bondethernet.yaml
correct-bridgedomain.yaml
correct-example1.yaml
correct-loopback.yaml
error-address1.yaml
error-bondethernet1.yaml
error-bondethernet2.yaml
error-bondethernet3.yaml
error-bondethernet4.yaml
error-bridgedomain1.yaml
error-bridgedomain2.yaml
error-bridgedomain3.yaml
error-bridgedomain4.yaml
error-bridgedomain5.yaml
error-interface-mtu1.yaml
error-interface-mtu2.yaml
error-lcp-unique1.yaml
error-lcp-unique2.yaml
error-loopback1.yaml
error-schema-field1.yaml
error-schema-field2.yaml
error-subinterface1.yaml
error-subinterface2.yaml
error-subinterface3.yaml
error-subinterface4.yaml
error-subinterface5.yaml
error-subinterface6.yaml
error-subinterface7.yaml
error-subinterface8.yaml
validator
.gitignore
LICENSE
README.md
example.yaml
schema.yaml
tests.py
vppcfg
vppcfg.spec
Returns True if there is at most one occurence of the ip_interface (an IPv4/IPv6 prefix+len) in the entire config. That said, we need the 'iface_addresses' because VPP is a bit fickle in this regard. IP addresses from the same prefix/len can be added to a given interface (ie 192.0.2.1/24 and 192.0.2.2/24), but other than that, any prefix can not occur as a more-specific or less-specific of any other interface. So, we will allow: - any ip_interface that is of equal network/len of existing one(s) _on the same interface_ And, we will reject - any ip_interface that is a more specific of any existing one - any ip_interface that is a less specific of any existing one Update unit tests to ensure ip_interfaces are allowed in all cases.
18 lines
437 B
YAML
18 lines
437 B
YAML
test:
|
|
description: "Sub-interface with addresses must have an LCP. Gi1/0/0 does this wrong, while Gi2/0/0 does it correctly"
|
|
errors:
|
|
expected:
|
|
- "sub-interface .* has an address but .* does not have LCP"
|
|
---
|
|
interfaces:
|
|
GigabitEthernet1/0/0:
|
|
sub-interfaces:
|
|
100:
|
|
addresses: [ 192.0.2.1/24 ]
|
|
GigabitEthernet2/0/0:
|
|
lcp: "xe2-0-0"
|
|
sub-interfaces:
|
|
100:
|
|
addresses: [ 192.168.1.1/24 ]
|
|
|