mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
Add integration tests for nxos_facts, nxos_bgp, nxos_bgp_af, nxos_bgp_neighbor, and nxos_evpn_global (#26924)
* Add new ITs for nxos_bgp, nxos_bgp_af, nxos_bgp_neighbor, and nxos_evpn_global * Add nxos_facts IT and enhance existing tests * switch nxos_feature tests to use bgp * misc. test fixes * Add checks for titanium in IT * Handle non-titanium case in tests
This commit is contained in:
parent
7e2169f6d5
commit
85fc4c67ef
37 changed files with 1509 additions and 128 deletions
|
@ -1,13 +1,31 @@
|
|||
---
|
||||
# NXAPI is enabled differently on NX-OS platforms.
|
||||
# Try both commands to enable NXAPI and ignore any errors.
|
||||
- name: enable nxapi on remote device
|
||||
nxos_feature:
|
||||
feature: nxapi
|
||||
state: enabled
|
||||
# There is a bug currently where the nxapi server can get
|
||||
# stuck in a bad state when enabling/disabling rapidly by
|
||||
# the integration tests.
|
||||
#
|
||||
# Toggle the command off/on as mitigation.
|
||||
- name: Toggle feature nxapi - Disable
|
||||
nxos_config:
|
||||
lines:
|
||||
- no feature nxapi
|
||||
provider: "{{ cli }}"
|
||||
ignore_errors: yes
|
||||
|
||||
# Pause after disabling nxapi
|
||||
- pause:
|
||||
seconds: 3
|
||||
|
||||
- name: Toggle feature nxapi - Enable
|
||||
nxos_config:
|
||||
lines:
|
||||
- feature nxapi
|
||||
provider: "{{ cli }}"
|
||||
ignore_errors: yes
|
||||
|
||||
# Pause after enabling nxapi
|
||||
- pause:
|
||||
seconds: 3
|
||||
|
||||
# Gather the list of interfaces on this device and make the list
|
||||
# available for integration tests that need them.
|
||||
#
|
||||
|
@ -52,3 +70,7 @@
|
|||
# Set platform to N9K-F for fretta
|
||||
- set_fact: platform="N9K-F"
|
||||
when: (platform | match("N9K")) and (fretta | search("true"))
|
||||
|
||||
# Check if platform is titanium
|
||||
- set_fact: titanium={% for row in nxos_inventory_output.stdout_lines[0]['TABLE_inv']['ROW_inv'] if 'NX-OSv' in row['desc']%}"true"{% endfor %}
|
||||
when: platform | match("N7K")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue