Ensure that LCP names are globally unique (between interface/sub-interface/loopback/bridgedomain)
This commit is contained in:
@ -55,4 +55,4 @@ bridgedomains:
|
||||
description: "Bridge Domain 12, LCP but no address"
|
||||
mtu: 9000
|
||||
interfaces: [ GigabitEthernet4/0/0, GigabitEthernet4/0/1 ]
|
||||
lcp: "bvi11"
|
||||
lcp: "bvi12"
|
||||
|
18
unittest/error-lcp-unique1.yaml
Normal file
18
unittest/error-lcp-unique1.yaml
Normal file
@ -0,0 +1,18 @@
|
||||
test:
|
||||
description: "Two interfaces or subinterfaces can't have the same LCP"
|
||||
errors:
|
||||
expected:
|
||||
- "interface .* does not have a unique LCP name"
|
||||
- "sub-interface .* does not have a unique LCP name"
|
||||
count: 3
|
||||
---
|
||||
interfaces:
|
||||
GigabitEthernet1/0/0:
|
||||
lcp: "e1"
|
||||
sub-interfaces:
|
||||
100:
|
||||
lcp: "e1"
|
||||
|
||||
GigabitEthernet1/0/1:
|
||||
lcp: "e1"
|
||||
|
26
unittest/error-lcp-unique2.yaml
Normal file
26
unittest/error-lcp-unique2.yaml
Normal file
@ -0,0 +1,26 @@
|
||||
test:
|
||||
description: "Loopback and BridgeDomain and Interfaces can't have the same LCP"
|
||||
errors:
|
||||
expected:
|
||||
- "interface .* does not have a unique LCP name"
|
||||
- "loopback .* does not have a unique LCP name"
|
||||
- "bridgedomain .* does not have a unique LCP name"
|
||||
count: 3
|
||||
---
|
||||
interfaces:
|
||||
GigabitEthernet1/0/0:
|
||||
lcp: "e1"
|
||||
|
||||
GigabitEthernet2/0/0:
|
||||
mtu: 1500
|
||||
GigabitEthernet2/0/1:
|
||||
mtu: 1500
|
||||
|
||||
loopbacks:
|
||||
loop0:
|
||||
lcp: "e1"
|
||||
|
||||
bridgedomains:
|
||||
bd0:
|
||||
lcp: "e1"
|
||||
interfaces: [ GigabitEthernet2/0/0, GigabitEthernet2/0/1 ]
|
Reference in New Issue
Block a user