Update eos_l2_interface.py (#42270)
This commit is contained in:
parent
b60fc33eef
commit
51092c6ea5
1 changed files with 3 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue