Skip to content

Commit 99b8794

Browse files
[chassis][voq] port_alias.py: Handle port_config.ini header change (#12719)
In sonic-net/sonic-buildimage#18704 the header of port_config.ini was changed: - # name lanes alias index role speed asic_port_name coreId corePortId numVoq + # name lanes alias index role speed asic_port_name core_id core_port_id num_voq But port_alias.py depends on the header names and wasn't updated: ALLOWED_HEADER = ['name', 'lanes', 'alias', 'index', 'asic_port_name', 'role', 'speed', 'coreid', 'coreportid', 'numvoq'] This PR updates port_alias.py to account for the port_config.ini change. Summary: Fixes #12718 Type of change
1 parent e9ea3c7 commit 99b8794

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

ansible/library/port_alias.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
FILE_PATH = '/usr/share/sonic/device'
4848
PORTMAP_FILE = 'port_config.ini'
4949
ALLOWED_HEADER = ['name', 'lanes', 'alias', 'index', 'asic_port_name', 'role', 'speed',
50-
'coreid', 'coreportid', 'numvoq']
50+
'core_id', 'core_port_id', 'num_voq']
5151

5252
MACHINE_CONF = '/host/machine.conf'
5353
ONIE_PLATFORM_KEY = 'onie_platform'
@@ -143,11 +143,11 @@ def get_portmap(self, asic_id=None, include_internal=False,
143143
role_index = index
144144
if 'asic_port_name' in text:
145145
asic_name_index = index
146-
if 'coreid' in text:
146+
if 'core_id' in text:
147147
port_coreid_index = index
148-
if 'coreportid' in text:
148+
if 'core_port_id' in text:
149149
port_core_portid_index = index
150-
if 'numvoq' in text:
150+
if 'num_voq' in text:
151151
num_voq_index = index
152152
if 'index' in text:
153153
port_index = index

0 commit comments

Comments
 (0)