Skip to content

Commit

Permalink
Add default rsvd_intf_len for Zuul CI
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvanheuveln committed Jan 6, 2020
1 parent 910de73 commit f647769
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions test/integration/targets/nxos_l3_interfaces/tasks/main.yaml
@@ -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'] }

0 comments on commit f647769

Please sign in to comment.