community.general/lib/ansible/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
..
__init__.py
_nxos_ip_interface.py Remove modules which have ended their deprecation cycle 2019-04-12 12:57:35 -07:00
_nxos_mtu.py
_nxos_portchannel.py Remove modules which have ended their deprecation cycle 2019-04-12 12:57:35 -07:00
_nxos_switchport.py Remove modules which have ended their deprecation cycle 2019-04-12 12:57:35 -07:00
nxos_aaa_server.py
nxos_aaa_server_host.py
nxos_acl.py nxos_acl: some platforms/versions raise when no ACLs are present (#55609) 2019-05-02 18:03:27 +05:30
nxos_acl_interface.py
nxos_banner.py
nxos_bgp.py
nxos_bgp_af.py
nxos_bgp_neighbor.py
nxos_bgp_neighbor_af.py
nxos_command.py Revert nxos, ios, iosxr return_timestamps (#56206) 2019-05-08 20:49:29 +05:30
nxos_config.py
nxos_evpn_global.py
nxos_evpn_vni.py
nxos_facts.py text format fan info mismatch and module info check (#57009) 2019-05-29 19:08:46 +05:30
nxos_feature.py
nxos_file_copy.py Fix passwordless workflow (#55441) 2019-05-02 18:06:25 +05:30
nxos_gir.py
nxos_gir_profile_management.py
nxos_hsrp.py Fix typo 2019-03-12 13:34:52 +01:00
nxos_igmp.py
nxos_igmp_interface.py nxos_igmp_interface: argument_spec for oif_ps breaks when 'default' (#53136) 2019-03-11 10:28:29 +05:30
nxos_igmp_snooping.py nxos_igmp_snooping: more group-timeout fixes (#53553) 2019-03-20 13:08:36 +05:30
nxos_install_os.py Fix regular expression for timeout (#53994) 2019-03-20 13:02:11 +05:30
nxos_interface.py nxos_interface: Fix admin_state check for n6k (#55673) 2019-05-08 21:20:22 +05:30
nxos_interface_ospf.py nxos_interfaces_ospf: fix passive-interface states & check_mode (#54260) 2019-03-27 09:15:50 +05:30
nxos_l2_interface.py
nxos_l3_interface.py Add support for multiple IPv6 addresses in nxos_l3_interface module (#50892) 2019-03-27 10:52:42 -04:00
nxos_linkagg.py Add type of group in nxos_linkagg module doc (#54769) 2019-04-03 14:21:12 +05:30
nxos_lldp.py
nxos_logging.py Module nxos logging fixes (#52883) 2019-03-06 13:55:03 -05:00
nxos_ntp.py
nxos_ntp_auth.py
nxos_ntp_options.py
nxos_nxapi.py
nxos_ospf.py
nxos_ospf_vrf.py
nxos_overlay_global.py
nxos_pim.py
nxos_pim_interface.py Sanity fixes to parameter types (#52325) 2019-02-15 16:58:58 +01:00
nxos_pim_rp_address.py
nxos_ping.py Add type int for various argument params (#55026) 2019-04-10 16:19:00 -04:00
nxos_reboot.py
nxos_rollback.py
nxos_rpm.py
nxos_smu.py
nxos_snapshot.py Assorted pylint fixes 2019-02-15 06:54:47 -08:00
nxos_snmp_community.py
nxos_snmp_contact.py
nxos_snmp_host.py
nxos_snmp_location.py
nxos_snmp_traps.py nxos_snmp_traps: fix 'group: all' for N35 platforms (#55995) 2019-05-07 13:57:55 +05:30
nxos_snmp_user.py nxos_snmp_user: platform fixes for get_snmp_user (#55832) 2019-05-10 13:10:49 +05:30
nxos_static_route.py nxos_static_route: reconcile_candidate fails to remove 'track' routes (#53806) 2019-03-21 18:52:46 +05:30
nxos_system.py
nxos_udld.py
nxos_udld_interface.py
nxos_user.py nxos_user: fails to remove usernames with embedded '\' (#53149) 2019-03-07 18:45:26 +05:30
nxos_vlan.py nxos_vlan: fix broken purge behavior (issue #57101) (#57229) 2019-06-04 09:14:09 +05:30
nxos_vpc.py nxos_vpc:Fix multiple idempotency issues, add missing commands (#55735) 2019-05-10 13:17:02 +05:30
nxos_vpc_interface.py
nxos_vrf.py Fix module issues (#52209) 2019-02-15 12:57:20 +01:00
nxos_vrf_af.py
nxos_vrf_interface.py
nxos_vrrp.py
nxos_vtp_domain.py nxos_vtp_*: Fixes n6k issues (#55737) 2019-05-10 10:54:51 +05:30
nxos_vtp_password.py nxos_vtp_*: Fixes n6k issues (#55737) 2019-05-10 10:54:51 +05:30
nxos_vtp_version.py nxos_vtp_*: Fixes n6k issues (#55737) 2019-05-10 10:54:51 +05:30
nxos_vxlan_vtep.py nxos_vxlan_vtep: Add dependency checks (#53288) 2019-03-08 10:33:54 +05:30
nxos_vxlan_vtep_vni.py