Skip to content

Commit

Permalink
nxos_interface port-channel idempotence fix for mode (#44248)
Browse files Browse the repository at this point in the history
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
  • Loading branch information
trishnaguha committed Aug 16, 2018
1 parent 0a9c58f commit 6af6e80
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/ansible/modules/network/nxos/nxos_interface.py
Expand Up @@ -578,7 +578,11 @@ def map_config_to_obj(want, module):
obj['name'] = normalize_interface(interface_table.get('interface'))
obj['admin_state'] = interface_table.get('admin_state')
obj['description'] = interface_table.get('desc')
obj['mode'] = interface_table.get('eth_mode')
mode = interface_table.get('eth_mode')
if mode == 'access':
obj['mode'] = 'layer2'
else:
obj['mode'] = 'layer3'

objs.append(obj)

Expand Down

0 comments on commit 6af6e80

Please sign in to comment.