fix eos_l2_interface invalid command (#50644)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
This commit is contained in:
Trishna Guha 2019-01-08 17:27:20 +05:30 committed by GitHub
parent 449fdf44b9
commit 1400d161c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -176,9 +176,9 @@ def map_obj_to_commands(updates, module):
commands.append('switchport trunk allowed vlan {0}'.format(trunk_allowed_vlans))
else:
if obj_in_have['native_vlan']:
commands.append('not switchport trunk native vlan {0}'.format(obj_in_have['native_vlan']))
commands.append('no switchport trunk native vlan {0}'.format(obj_in_have['native_vlan']))
if obj_in_have['trunk_allowed_vlans']:
commands.append('not switchport trunk allowed vlan {0}'.format(obj_in_have['trunk_allowed_vlans']))
commands.append('no switchport trunk allowed vlan {0}'.format(obj_in_have['trunk_allowed_vlans']))
commands.append('switchport access vlan {0}'.format(access_vlan))
else:
if mode == 'access':