Skip to content

Commit c9ffb8d

Browse files
arista-nwolfemssonicbld
authored andcommitted
[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 5190fcc commit c9ffb8d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ansible/library/port_alias.py

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

5454
MACHINE_CONF = '/host/machine.conf'
5555
ONIE_PLATFORM_KEY = 'onie_platform'
@@ -135,11 +135,11 @@ def get_portmap(self, asic_id=None, include_internal=False,
135135
role_index = index
136136
if 'asic_port_name' in text:
137137
asic_name_index = index
138-
if 'coreid' in text:
138+
if 'core_id' in text:
139139
port_coreid_index = index
140-
if 'coreportid' in text:
140+
if 'core_port_id' in text:
141141
port_core_portid_index = index
142-
if 'numvoq' in text:
142+
if 'num_voq' in text:
143143
num_voq_index = index
144144
if 'index' in text:
145145
port_index = index

0 commit comments

Comments
 (0)