1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/units
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
..
cli Restore ansible --version output (#55728) 2019-04-29 16:38:31 -04:00
compat
config
contrib
errors
executor Support using importlib on py>=3 to avoid imp deprecation (#54883) 2019-04-25 10:28:18 -05:00
inventory_test_data/group_vars
mock
module_utils unittests for module_utils.common.removed.removed_module function (#57214) 2019-06-03 11:12:12 -04:00
modules nxos_vlan: fix broken purge behavior (issue #57101) (#57229) 2019-06-04 09:14:09 +05:30
parsing lib/ansible/parsing/ajson.py: added UNIT-tests (#56398) 2019-05-17 23:29:42 -07:00
playbook Restore ansible --version output (#55728) 2019-04-29 16:38:31 -04:00
plugins Templar: encapsulate _available_variables (#55435) 2019-05-20 11:49:54 -04:00
regex
template Templar: encapsulate _available_variables (#55435) 2019-05-20 11:49:54 -04:00
utils
vars
__init__.py
ansible.cfg
conftest.py Update handling of the non_local test alias. 2019-03-22 16:05:24 -07:00
test_constants.py
test_context.py