Fix to prevent classification all portchannels is External (#5202)

Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <arlakshm@microsoft.com>
Fix the checks in the API is_port_channel_internal
This commit is contained in:
arlakshm 2020-08-17 17:22:30 -07:00 committed by GitHub
parent adcca53b8d
commit 4487abdfcb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -265,7 +265,7 @@ def is_port_channel_internal(port_channel, namespace=None):
port_channels = config_db.get_table(PORT_CHANNEL_CFG_DB_TABLE)
if port_channel in port_channels:
if 'members' in port_channel:
if 'members' in port_channels[port_channel]:
members = port_channels[port_channel]['members']
if is_port_internal(members[0], namespace):
return True