From 46bae1bd7439c62c93ebb4f7756faf877e3fb06d Mon Sep 17 00:00:00 2001 From: sanmalho Date: Wed, 5 Apr 2023 17:06:57 -0400 Subject: [PATCH] Bug fix to get iface_namingmode tests to work on multi-asic linecards of a T2 chassis - Treat Inband and Recycle ports on a VoQ chassis as internal ports Since the inband and recycle ports do not show up in 'show' commands unless we specify '-d all' option, they should be treated similar to internal ports. This fixes iface_namingmode::test_show_pfc_counters test case --- ansible/library/port_alias.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/library/port_alias.py b/ansible/library/port_alias.py index 861c3c38c2b..1245251c511 100755 --- a/ansible/library/port_alias.py +++ b/ansible/library/port_alias.py @@ -165,7 +165,7 @@ def get_portmap(self, asic_id=None, include_internal=False, else: alias = name add_port = False - if role in {"Ext", "Inb", "Rec"} or (role == "Int" and include_internal): + if role in {"Ext"} or (role in ["Int", "Inb", "Rec"] and include_internal): add_port = True aliases.append((alias, -1 if port_index == -1 or len(mapping) <= port_index else mapping[port_index])) portmap[name] = alias