Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <[email protected]>
  • Loading branch information
arlakshm committed May 17, 2022
1 parent 4e8366e commit 4d8b9d7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/sonic-config-engine/minigraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -1530,7 +1530,7 @@ def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hw
if inband_port in ports.keys():
ports[inband_port]['admin_status'] = 'up'

# bring up the recirc port for voq chassis
# bring up the recirc port for voq chassis
for port, port_attributes in ports.items():
port_role = port_attributes.get('role', None)
if port_role == 'Rec':
Expand Down
15 changes: 7 additions & 8 deletions src/sonic-config-engine/tests/test_cfggen.py
Original file line number Diff line number Diff line change
Expand Up @@ -893,8 +893,8 @@ def test_minigraph_voq_inband_port(self):
output = self.run_script(argument)
output_dict = utils.to_dict(output.strip())
self.assertDictEqual(
output_dict['Ethernet-IB0'],
{ 'admin_status': 'up',
output_dict['Ethernet-IB0'], {
'admin_status': 'up',
'alias': 'Recirc0/1',
'coreId': '1',
'corePortId': '222',
Expand All @@ -907,16 +907,15 @@ def test_minigraph_voq_inband_port(self):
'role': 'Inb',
'speed': '400000',
'tpid': '0x8100'
}
)
})

def test_minigraph_voq_recirc_ports(self):
argument = "-m {} -p {} --var-json PORT".format(self.sample_graph_voq, self.voq_port_config)
output = self.run_script(argument)
output_dict = utils.to_dict(output.strip())
self.assertDictEqual(
output_dict['Ethernet-Rec0'],
{ 'alias': 'Recirc0/0',
output_dict['Ethernet-Rec0'], {
'alias': 'Recirc0/0',
'coreId': '0',
'corePortId': '221',
'description': 'Recirc0/0',
Expand All @@ -929,8 +928,8 @@ def test_minigraph_voq_recirc_ports(self):
'speed': '400000',
'tpid': '0x8100',
'admin_status': 'up'
}
)
})

def test_minigraph_dhcp(self):
argument = '-m "' + self.sample_graph_simple_case + '" -p "' + self.port_config + '" -v DHCP_RELAY'
output = self.run_script(argument)
Expand Down

0 comments on commit 4d8b9d7

Please sign in to comment.