From 447d6fc9772d3e6da45ca00fc079b6369ff87205 Mon Sep 17 00:00:00 2001 From: Sharon Lutati Date: Sun, 13 Jun 2021 10:43:00 +0300 Subject: [PATCH] tests fixes for zero ports setups Signed-off-by: Sharon Lutati --- tests/common/platform/interface_utils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/common/platform/interface_utils.py b/tests/common/platform/interface_utils.py index c103617fec9..9afa6dd64da 100644 --- a/tests/common/platform/interface_utils.py +++ b/tests/common/platform/interface_utils.py @@ -123,9 +123,8 @@ def get_port_map(dut, asic_index=None): port_mapping_res = {} port_mapping = cfg_facts.get("PORT", {}) for port, port_dict_info in port_mapping.items(): - port_alias = port_dict_info["alias"] - port_alias_number = int(re.search('etp(\d+)', port_alias).group(1)) - port_mapping_res[port] = [port_alias_number] + port_index = port_dict_info["index"] + port_mapping_res[port] = [int(port_index)] return port_mapping_res