[eos] Allow ports to be configured with just trunk mode (#55887)

Fixes #55886
This commit is contained in:
Sean M. Collins 2019-05-15 10:27:46 -04:00 committed by Trishna Guha
parent 4928373a8b
commit 63155983fe

View file

@ -189,6 +189,7 @@ def map_obj_to_commands(updates, module):
if access_vlan != obj_in_have['access_vlan']:
commands.append('switchport access vlan {0}'.format(access_vlan))
else:
commands.append('switchport mode {0}'.format(mode))
if native_vlan != obj_in_have['native_vlan'] and native_vlan:
commands.append('switchport trunk native vlan {0}'.format(native_vlan))
if trunk_allowed_vlans != obj_in_have['trunk_allowed_vlans'] and trunk_allowed_vlans: