Add get_by_lcp_name() plus tests. Correct behavior of sub-ints without explicit encap: they are exact-match

This commit is contained in:
Pim van Pelt
2022-03-24 20:14:06 +00:00
parent 95c08bbb29
commit de9ed1730d
4 changed files with 35 additions and 3 deletions

View File

@ -17,6 +17,7 @@ interfaces:
description: "This sub-int is has the same encap as 102"
encapsulation:
dot1q: 102
exact-match: True
GigabitEthernet1/0/1:
mtu: 9216

View File

@ -3,7 +3,7 @@ test:
errors:
expected:
- "sub-interface .*.100 does not have unique encapsulation"
- "sub-interface .*.101 does not have unique encapsulation"
- "sub-interface .*.102 does not have unique encapsulation"
count: 2
---
interfaces:
@ -12,7 +12,11 @@ interfaces:
100:
description: "VLAN 100"
101:
description: "Another VLAN 100"
description: "Another VLAN 100, but without exact-match"
encapsulation:
dot1q: 100
102:
description: "Another VLAN 100, but without exact-match"
encapsulation:
dot1q: 100
exact-match: True