mirror of https://github.com/ansible/ansible.git
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.
* 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
(cherry picked from commit
|
7 years ago | |
|---|---|---|
| .. | ||
| cli | 7 years ago | |
| compat | 7 years ago | |
| config | 7 years ago | |
| contrib | 7 years ago | |
| errors | 7 years ago | |
| executor | 7 years ago | |
| inventory_test_data/group_vars | 11 years ago | |
| mock | 7 years ago | |
| module_utils | 7 years ago | |
| modules | 7 years ago | |
| parsing | 7 years ago | |
| playbook | 7 years ago | |
| plugins | 7 years ago | |
| regex | 7 years ago | |
| template | 7 years ago | |
| utils | 7 years ago | |
| vars | 7 years ago | |
| __init__.py | 9 years ago | |
| ansible.cfg | 8 years ago | |
| conftest.py | 7 years ago | |
| test_constants.py | 9 years ago | |
| test_context.py | 7 years ago | |