Expand autocreated LCP namelen to all possible (dot1q, qin*) scenarios. Allow manually set LCP to be 15char in length

This commit is contained in:
Pim van Pelt
2022-03-17 00:15:18 +00:00
parent 3663a04cde
commit f921b1721a
4 changed files with 23 additions and 7 deletions

View File

@ -4,7 +4,8 @@ test:
expected:
- "yamale: .* is not a "
- "yamale: .*: Unexpected element"
count: 12
- "Length of .* is greater than 15"
count: 13
---
interfaces:
GigabitEthernet1/0/0:
@ -20,6 +21,7 @@ interfaces:
GigabitEthernet1/0/1:
mtu: 1500
lcp: "a234567890123456"
sub-interfaces:
"string":
description: "the sub-int key should be an int"

View File

@ -2,12 +2,23 @@ test:
description: "The length of the LCP name is too long"
errors:
expected:
- "Length .* is greater than 8"
- "sub-interface .* has LCP with too long name .*"
count: 2
---
interfaces:
GigabitEthernet1/0/0:
lcp: "e01234567"
lcp: "e23456789012"
sub-interfaces:
100:
description: "VLAN 100"
GigabitEthernet1/0/1:
lcp: "e2345678"
sub-interfaces:
100:
description: "VLAN 100"
101:
description: "QinQ 101"
encapsulation:
dot1q: 100
inner-dot1q: 100