use show run instead of section pipeline ios_l2_interface (#39658)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
This commit is contained in:
Trishna Guha
2018-05-04 21:22:09 +05:30
committed by GitHub
parent d44fd70d02
commit dddcbb7198

View File

@@ -146,10 +146,9 @@ def is_switchport(name, module):
def interface_is_portchannel(name, module):
if get_interface_type(name) == 'ethernet':
config = get_config(module, flags=[' | section interface'])
if 'channel group' in config:
config = run_commands(module, ['show run interface {0}'.format(name)])[0]
if any(c in config for c in ['channel group', 'channel-group']):
return True
return False