diff --git a/src/sonic-config-engine/minigraph.py b/src/sonic-config-engine/minigraph.py index a3b3c2e9320f..c9b1eb70d920 100644 --- a/src/sonic-config-engine/minigraph.py +++ b/src/sonic-config-engine/minigraph.py @@ -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': diff --git a/src/sonic-config-engine/tests/test_cfggen.py b/src/sonic-config-engine/tests/test_cfggen.py index 65730972c114..fc0e57e3af62 100644 --- a/src/sonic-config-engine/tests/test_cfggen.py +++ b/src/sonic-config-engine/tests/test_cfggen.py @@ -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', @@ -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', @@ -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)