diff --git a/src/sonic-config-engine/minigraph.py b/src/sonic-config-engine/minigraph.py index b67595247db3..f47f8e7a1c5d 100644 --- a/src/sonic-config-engine/minigraph.py +++ b/src/sonic-config-engine/minigraph.py @@ -1768,6 +1768,11 @@ def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hw if is_storage_device: results['DEVICE_METADATA']['localhost']['storage_device'] = "true" + # remove bgp monitor and slb peers for storage backend + if is_storage_device and 'BackEnd' in current_device['type']: + results['BGP_MONITORS'] = {} + results['BGP_PEER_RANGE'] = {} + results['VLAN'] = vlans results['VLAN_MEMBER'] = vlan_members diff --git a/src/sonic-config-engine/tests/test_cfggen.py b/src/sonic-config-engine/tests/test_cfggen.py index 1190ef9680e5..ca5c83e88c79 100644 --- a/src/sonic-config-engine/tests/test_cfggen.py +++ b/src/sonic-config-engine/tests/test_cfggen.py @@ -804,6 +804,14 @@ def verify_sub_intf(self, **kwargs): output = self.run_script(argument) self.assertEqual(output.strip(), "") + # SLB and BGP Monitor table does not exist + argument = '-m "' + graph_file + '" -p "' + self.port_config + '" -v "BGP_PEER_RANGE"' + output = self.run_script(argument) + self.assertEqual(output.strip(), "{}") + argument = '-m "' + graph_file + '" -p "' + self.port_config + '" -v "BGP_MONITORS"' + output = self.run_script(argument) + self.assertEqual(output.strip(), "{}") + # ACL_TABLE should not contain EVERFLOW related entries argument = '-m "' + graph_file + '" -p "' + self.port_config + '" -v "ACL_TABLE"' output = self.run_script(argument) @@ -1021,4 +1029,4 @@ def test_minigraph_packet_chassis_400g_zr_port_config(self): output = self.run_script(argument) output_dict = utils.to_dict(output.strip()) self.assertEqual(output_dict['tx_power'], '7.5') - self.assertEqual(output_dict['laser_freq'], 131000) \ No newline at end of file + self.assertEqual(output_dict['laser_freq'], 131000)