Skip to content

Commit fb80d37

Browse files
authored
[VOQ] Fix the parsing of core_port_id and core_id for Inband and Recirc Port. (#19755)
[VOQ] Fix the parsing of core_port_id and core_id for Inband and Recirc Port. Signed-off-by: Abhishek Dosi <[email protected]>
1 parent 4e78b11 commit fb80d37

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/sonic-config-engine/minigraph.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ def get_voq_intf_attributes(ports):
127127
core_port_index = None
128128
speed = None
129129
for k,v in ports.get(port, {}).items():
130-
if k.lower() == 'coreid':
130+
if k.lower() == 'core_id':
131131
core_id = v
132-
if k.lower() == 'coreportid':
132+
if k.lower() == 'core_port_id':
133133
core_port_index = v
134134
if k.lower() == 'speed':
135135
speed = v

src/sonic-config-engine/tests/test_chassis_cfggen.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def test_system_port(self):
182182
expected_output_file = os.path.join(
183183
self.test_data_dir, 'system_ports.json')
184184
self.run_script(argument, output_file=self.output_file)
185-
self.assertTrue(self.run_diff(expected_output_file, self.output_file))
185+
self.assertFalse(self.run_diff(expected_output_file, self.output_file))
186186
if os.path.exists(self.output_file):
187187
os.remove(self.output_file)
188188

@@ -479,11 +479,11 @@ def test_system_port(self):
479479
argument = ['-m', self.sample_graph,
480480
'-p', self.sample_port_config,
481481
'-n', 'asic0',
482-
'--var-json', 'DEVICE_METADATA']
482+
'--var-json', 'SYSTEM_PORT']
483483
expected_output_file = os.path.join(
484484
self.test_data_dir, 'system_ports.json')
485485
self.run_script(argument, output_file=self.output_file)
486-
self.assertTrue(self.run_diff(expected_output_file, self.output_file))
486+
self.assertFalse(self.run_diff(expected_output_file, self.output_file))
487487
if os.path.exists(self.output_file):
488488
os.remove(self.output_file)
489489

0 commit comments

Comments
 (0)