nxos_interface port-channel idempotence fix for mode (#44248)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
This commit is contained in:
Trishna Guha 2018-08-16 12:16:04 +05:30 committed by GitHub
parent 0a9c58f866
commit 6af6e806ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)