Update eos_l2_interface.py (#42270)

This commit is contained in:
Dave Thelen 2018-07-04 00:47:46 -04:00 committed by Trishna Guha
parent b60fc33eef
commit 51092c6ea5

View file

@ -207,8 +207,9 @@ def map_config_to_obj(module):
instances = list()
for item in set(match):
command = 'sh int {0} switchport | include Switchport'
switchport_cfg = run_commands(module, command.format(item))[0].split(':')[1].strip()
command = {'command': 'show interfaces {0} switchport | include Switchport'.format(item),
'output': 'text'}
switchport_cfg = run_commands(module, command)[0].split(':')[1].strip()
if switchport_cfg == 'Enabled':
state = 'present'
else: