Add 'state' field to interfaces and sub-interfaces
Assert that children cannot be 'up' of their parent is 'down'. Add tests. Update user-guide.
This commit is contained in:
@ -10,9 +10,9 @@ interfaces:
|
||||
description: "This sub-int is invalid because it has no outer dot1q and dot1ad"
|
||||
encapsulation:
|
||||
inner-dot1q: 1000
|
||||
|
||||
102:
|
||||
description: "This sub-int is has the same encap as 103"
|
||||
state: down
|
||||
103:
|
||||
description: "This sub-int is has the same encap as 102"
|
||||
encapsulation:
|
||||
@ -59,6 +59,7 @@ interfaces:
|
||||
GigabitEthernet2/0/0:
|
||||
description: "This interface has no sub-ints"
|
||||
lcp: "e2"
|
||||
state: down
|
||||
|
||||
GigabitEthernet3/0/0:
|
||||
l2xc: GigabitEthernet3/0/1
|
||||
|
17
unittest/yaml/error-subinterface9.yaml
Normal file
17
unittest/yaml/error-subinterface9.yaml
Normal file
@ -0,0 +1,17 @@
|
||||
test:
|
||||
description: "A sub-interface cannot be up if its parent is down."
|
||||
errors:
|
||||
expected:
|
||||
- "sub-interface .* cannot be up if parent .* is down"
|
||||
count: 1
|
||||
---
|
||||
interfaces:
|
||||
GigabitEthernet1/0/0:
|
||||
state: down
|
||||
lcp: "e1"
|
||||
sub-interfaces:
|
||||
100:
|
||||
state: up
|
||||
encapsulation:
|
||||
dot1q: 100
|
||||
exact-match: false
|
Reference in New Issue
Block a user