ansible/test/units/modules/network/nxos
Chris Van Heuveln 6bb13bbb84 nxos_vlan: fix broken purge behavior (issue #57101) (#57229)
* nxos_vlan: fix broken purge behavior (issue #57101)

Symptoms/Analysis:
- `nxos_vlan` `purge: true` would fail when `purge` was trying to delete all unspecified vlans, including vlan 1.
- `nxos` devices do not allow removing vlan 1 and raise a cli exception error
- Previous fix #55144 caused a side effect when `purge` was used: vlan changes specified by `aggregate` were ignored; e.g.
 - vlan 4 is not present; playbook specifies `aggregate: { vlan: 4 }, purge: true`
 - results in proper purging but vlan 4 is not created

Solutions:
- ignore vlan 1 when purging
- remove the `not purge` check from state present logic

Added additional unit tests and integration tests.
Tested against all regression platforms.

* PEP fixes

* Add agg_show_vlan_brief.txt fixture

* Add warning for removing vlan 1

* change method name check
2019-06-04 09:14:09 +05:30
..
fixtures nxos_vlan: fix broken purge behavior (issue #57101) (#57229) 2019-06-04 09:14:09 +05:30
__init__.py
nxos_module.py Update bare exceptions to specify Exception. 2018-12-16 15:03:19 -08:00
test_nxos_acl.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
test_nxos_acl_interface.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
test_nxos_banner.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
test_nxos_bgp.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
test_nxos_bgp_af.py Move utility functions out of basic.py (#51715) 2019-03-14 21:29:55 -04:00
test_nxos_bgp_neighbor.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
test_nxos_bgp_neighbor_af.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
test_nxos_command.py Revert nxos, ios, iosxr return_timestamps (#56206) 2019-05-08 20:49:29 +05:30
test_nxos_config.py Fix 'defaults' option in the nxos_config module (#51076) 2019-01-23 11:29:27 +05:30
test_nxos_evpn_global.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
test_nxos_evpn_vni.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
test_nxos_feature.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
test_nxos_hsrp.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
test_nxos_interface.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
test_nxos_interface_ospf.py nxos_interfaces_ospf: fix passive-interface states & check_mode (#54260) 2019-03-27 09:15:50 +05:30
test_nxos_l3_interface.py Add support for multiple IPv6 addresses in nxos_l3_interface module (#50892) 2019-03-27 10:52:42 -04:00
test_nxos_nxapi.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
test_nxos_ospf.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
test_nxos_ospf_vrf.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
test_nxos_overlay_global.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
test_nxos_pim.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
test_nxos_pim_interface.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
test_nxos_pim_rp_address.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
test_nxos_static_route.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
test_nxos_system.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
test_nxos_vlan.py nxos_vlan: fix broken purge behavior (issue #57101) (#57229) 2019-06-04 09:14:09 +05:30
test_nxos_vpc.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
test_nxos_vpc_interface.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
test_nxos_vrf.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
test_nxos_vrf_af.py Remove deprecated options from modules (#50246) 2019-01-22 09:18:26 -05:00
test_nxos_vxlan_vtep.py Add new configurations for nxos_vxlan_vtep (#47834) 2018-11-02 11:23:37 +05:30
test_nxos_vxlan_vtep_vni.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00