Refactor: stop trying to derive implicit LCP names. Make it mandatory and explicitly configured
This commit is contained in:
@ -26,31 +26,34 @@ interfaces:
|
||||
100:
|
||||
lcp: "foo"
|
||||
addresses: [ "10.0.0.1/24", "10.0.0.2/24", "2001:db8:2::1/64" ]
|
||||
101:
|
||||
encapsulation:
|
||||
dot1ad: 100
|
||||
exact-match: True
|
||||
lcp: "e1.100"
|
||||
addresses: [ "10.0.2.1/30" ]
|
||||
102:
|
||||
encapsulation:
|
||||
dot1ad: 100
|
||||
inner-dot1q: 100
|
||||
exact-match: True
|
||||
lcp: "e1.100.100"
|
||||
200:
|
||||
mtu: 9000
|
||||
encapsulation:
|
||||
dot1q: 1000
|
||||
addresses: [ "10.0.1.1/30" ]
|
||||
201:
|
||||
encapsulation:
|
||||
dot1ad: 1000
|
||||
addresses: [ "10.0.2.1/30" ]
|
||||
202:
|
||||
encapsulation:
|
||||
dot1q: 1000
|
||||
inner-dot1q: 1234
|
||||
addresses: [ "10.0.3.1/30" ]
|
||||
202:
|
||||
encapsulation:
|
||||
dot1ad: 1000
|
||||
203:
|
||||
encapsulation:
|
||||
dot1ad: 1000
|
||||
inner-dot1q: 1000
|
||||
addresses: [ "10.0.4.1/30" ]
|
||||
204:
|
||||
encapsulation:
|
||||
dot1ad: 1000
|
||||
inner-dot1q: 1000
|
||||
exact-match: True
|
||||
addresses: [ "10.0.5.1/30" ]
|
||||
|
||||
GigabitEthernet2/0/0:
|
||||
description: "This interface has no sub-ints"
|
||||
|
@ -10,9 +10,11 @@ interfaces:
|
||||
sub-interfaces:
|
||||
100:
|
||||
description: "Overlapping IP addresses are fine, if in the same prefix"
|
||||
lcp: e0-0.100
|
||||
addresses: [ 192.0.2.9/29, 192.0.2.10/29 ]
|
||||
101:
|
||||
description: ".. and for IPv6 also, provided the same prefix is used"
|
||||
lcp: e0-0.101
|
||||
addresses: [ 2001:db8:2::1/64, 2001:db8:2::2/64 ]
|
||||
|
||||
GigabitEthernet3/0/0:
|
||||
|
@ -33,4 +33,5 @@ interfaces:
|
||||
sub-interfaces:
|
||||
100:
|
||||
mtu: 2000
|
||||
lcp: "be1.2000"
|
||||
addresses: [ 192.0.2.9/29, 2001:db8:1::1/64 ]
|
||||
|
@ -16,6 +16,7 @@ interfaces:
|
||||
sub-interfaces:
|
||||
100:
|
||||
description: "Cust: hvn0.nlams0.ipng.ch"
|
||||
lcp: e0-0.100
|
||||
addresses: [ 94.142.241.185/29, 2a02:898:146::1/64 ]
|
||||
101:
|
||||
description: "Infra: L2 for FrysIX AS112"
|
||||
@ -40,8 +41,10 @@ interfaces:
|
||||
sub-interfaces:
|
||||
200:
|
||||
description: "This subint is needed to build the parent LCP bond0.1000 for QinQ subint 202 bond0.1000.1234"
|
||||
lcp: "bond0.1000"
|
||||
encapsulation:
|
||||
dot1q: 1000
|
||||
exact-match: True
|
||||
201:
|
||||
encapsulation:
|
||||
dot1ad: 1000
|
||||
@ -49,6 +52,8 @@ interfaces:
|
||||
encapsulation:
|
||||
dot1q: 1000
|
||||
inner-dot1q: 1234
|
||||
exact-match: True
|
||||
lcp: "bond0.1000.1234"
|
||||
addresses: [ 192.168.1.1/24 ]
|
||||
203:
|
||||
encapsulation:
|
||||
|
@ -2,7 +2,7 @@ test:
|
||||
description: "A subinterface cannot have an LCP if the parent doesn't have one"
|
||||
errors:
|
||||
expected:
|
||||
- "sub-interface .* has LCP but .* does not have LCP"
|
||||
- "sub-interface .* has LCP name .* but .* does not have LCP"
|
||||
count: 1
|
||||
---
|
||||
interfaces:
|
||||
|
@ -1,24 +1,39 @@
|
||||
test:
|
||||
description: "The length of the LCP name is too long"
|
||||
description: "Children with an LCP require their parent to have one too"
|
||||
errors:
|
||||
expected:
|
||||
- "sub-interface .* has LCP with too long name .*"
|
||||
count: 2
|
||||
- "sub-interface .* has LCP name .* but .* does not have LCP"
|
||||
- "sub-interface .* is QinX and has LCP name .* but .* does not have LCP"
|
||||
- "sub-interface .* has LCP name .* but its encapsulation is not exact-match"
|
||||
- "sub-interface .* has invalid encapsulation"
|
||||
count: 4
|
||||
---
|
||||
interfaces:
|
||||
GigabitEthernet1/0/0:
|
||||
lcp: "e23456789012"
|
||||
sub-interfaces:
|
||||
100:
|
||||
description: "VLAN 100"
|
||||
lcp: "e0.100"
|
||||
description: "VLAN 100 has an LCP, but Gi1/0/0 does not"
|
||||
|
||||
GigabitEthernet1/0/1:
|
||||
lcp: "e2345678"
|
||||
lcp: "e1"
|
||||
sub-interfaces:
|
||||
100:
|
||||
description: "VLAN 100"
|
||||
101:
|
||||
description: "QinQ 101"
|
||||
description: "QinQ 101 has an LCP but VLAN 100 does not"
|
||||
encapsulation:
|
||||
dot1q: 100
|
||||
inner-dot1q: 100
|
||||
exact-match: True
|
||||
lcp: "e1.100.100"
|
||||
|
||||
GigabitEthernet1/0/2:
|
||||
lcp: "e2"
|
||||
sub-interfaces:
|
||||
100:
|
||||
description: "Sub-interfaces must be exact-match in order to have an LCP"
|
||||
encapsulation:
|
||||
dot1q: 100
|
||||
exact-match: False
|
||||
lcp: "e2.100"
|
||||
|
@ -3,7 +3,8 @@ test:
|
||||
errors:
|
||||
expected:
|
||||
- "sub-interface GigabitEthernet1/0/0.(101|102) has invalid encapsulation"
|
||||
count: 2
|
||||
- "sub-interface .* has LCP name .* but its encapsulation is not exact-match"
|
||||
count: 4
|
||||
---
|
||||
interfaces:
|
||||
GigabitEthernet1/0/0:
|
||||
|
Reference in New Issue
Block a user