fix nxos_switchport/l2_interface trunk_vlans state absent (#37180) (#37181)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 02999b77a4)
pull/37190/head
Trishna Guha 7 years ago committed by GitHub
parent 934d1df0d1
commit 2e145cd1f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -271,7 +271,7 @@ def remove_switchport_config_commands(interface, existing, proposed, module):
elif mode == 'trunk':
tv_check = existing.get('trunk_vlans_list') == proposed.get('trunk_vlans_list')
if not tv_check:
if tv_check:
existing_vlans = existing.get('trunk_vlans_list')
proposed_vlans = proposed.get('trunk_vlans_list')
vlans_to_remove = set(proposed_vlans).intersection(existing_vlans)

@ -254,7 +254,7 @@ def remove_switchport_config_commands(name, existing, proposed, module):
elif mode == 'trunk':
tv_check = existing.get('trunk_vlans_list') == proposed.get('trunk_vlans_list')
if not tv_check:
if tv_check:
existing_vlans = existing.get('trunk_vlans_list')
proposed_vlans = proposed.get('trunk_vlans_list')
vlans_to_remove = set(proposed_vlans).intersection(existing_vlans)

@ -95,7 +95,7 @@
nxos_l2_interface: &no_tag
name: "{{ intname }}"
mode: trunk
trunk_vlans: 30-4094
trunk_vlans: 2-50
state: absent
provider: "{{ connection }}"
register: result

@ -92,7 +92,7 @@
nxos_switchport: &no_tag
interface: "{{ intname }}"
mode: trunk
trunk_vlans: 30-4094
trunk_vlans: 2-50
state: absent
provider: "{{ connection }}"
register: result

Loading…
Cancel
Save