Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add default rsvd_intf_len for Zuul CI
- Loading branch information
1 parent
910de73
commit f647769
Showing
1 changed file
with
14 additions
and
7 deletions.
There are no files selected for viewing
21 changes: 14 additions & 7 deletions
21
test/integration/targets/nxos_l3_interfaces/tasks/main.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
--- | ||
# mgmt0 is included in L3 facts but excluded from result.before/after, so check | ||
# for an IP on mgmt0 to account for the possible extra interface in facts. | ||
# The interface-count asserts need to also account for mgmt0 which is a reserved | ||
# interface; i.e. it will be included in L3 facts when it has non-default values | ||
# but excluded from result.before/after because it's not allowed to be managed. | ||
- set_fact: | ||
mgmt: | ||
"{{ intdataraw|selectattr('interface', 'equalto', 'mgmt0')|list}}" | ||
- set_fact: | ||
rsvd_intf_len: | ||
"{{ 1 if (mgmt and 'ip_addr' in mgmt[0]) else 0}}" | ||
# Zuul CI skips prepare_nxos but will have dhcp configured on mgmt0 | ||
rsvd_intf_len: 1 | ||
|
||
- block: | ||
- set_fact: | ||
mgmt: | ||
"{{ intdataraw|selectattr('interface', 'equalto', 'mgmt0')|list}}" | ||
- set_fact: | ||
rsvd_intf_len: | ||
"{{ 1 if (mgmt and 'ip_addr' in mgmt[0]) else 0}}" | ||
when: prepare_nxos_tests_task | default(True) | bool | ||
|
||
- { include: cli.yaml, tags: ['cli'] } |