You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/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
7 years ago
..
cli Restore ansible --version output (#55728) 7 years ago
compat Move unit test compat code out of `lib/ansible/`. (#46996) 7 years ago
config Fix encoding issues with file paths. (#50830) 7 years ago
contrib Fix vmware_inventory unit tests so they run. 7 years ago
errors Add better error when k=v syntax is used with YAML in tasks (#41754) 7 years ago
executor Support using importlib on py>=3 to avoid imp deprecation (#54883) 7 years ago
inventory_test_data/group_vars Merge branch 'v2_final' into devel_switch_v2 11 years ago
mock Move unit test compat code out of `lib/ansible/`. (#46996) 7 years ago
module_utils unittests for module_utils.common.removed.removed_module function (#57214) 7 years ago
modules nxos_vlan: fix broken purge behavior (issue #57101) (#57229) 7 years ago
parsing lib/ansible/parsing/ajson.py: added UNIT-tests (#56398) 7 years ago
playbook Restore ansible --version output (#55728) 7 years ago
plugins Templar: encapsulate _available_variables (#55435) 7 years ago
regex Add toggle to control invalid character substitution in group names (#52748) 7 years ago
template Templar: encapsulate _available_variables (#55435) 7 years ago
utils Move the arguments module into cli/ and context_objects into utils 7 years ago
vars Fix inventory cache interface (#50446) 7 years ago
__init__.py Add empty-init code-smell script. (#18406) 9 years ago
ansible.cfg Fix ansible-test config management. 8 years ago
conftest.py Update handling of the non_local test alias. 7 years ago
test_constants.py 1st part of ansible config, adds ansible-config to view/manage configs (#12797) 9 years ago
test_context.py Save the command line arguments into a global context 7 years ago