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:
rahushen 2017-08-10 05:29:13 -04:00 committed by Nathaniel Case
commit 85fc4c67ef
37 changed files with 1509 additions and 128 deletions

View file

@ -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")