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

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
pull/40193/head
Trishna Guha 6 years ago committed by GitHub
parent d44fd70d02
commit dddcbb7198
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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

Loading…
Cancel
Save