Enable BFD for Static Route for chassis-packet. (#15383)
*What I did: Enable BFD for Static Route for chassis-packet. This will trigger the use of the feature as defined in here: #13789 Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
This commit is contained in:
parent
aa01630841
commit
ed71c12e05
@ -1986,6 +1986,10 @@ def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hw
|
||||
port['mux_cable'] = "true"
|
||||
|
||||
if static_routes:
|
||||
# Enable static Route BFD by default for static route in chassis-packet
|
||||
if switch_type == "chassis-packet":
|
||||
for pfx, data in static_routes.items():
|
||||
data.update({"bfd":"true"})
|
||||
results['STATIC_ROUTE'] = static_routes
|
||||
|
||||
for nghbr in list(neighbors.keys()):
|
||||
|
@ -1029,14 +1029,14 @@ class TestCfgGen(TestCase):
|
||||
output = self.run_script(argument)
|
||||
self.assertEqual(
|
||||
utils.to_dict(output.strip()),
|
||||
utils.to_dict("{'8.0.0.1/32': {'nexthop': '192.168.1.2,192.168.2.2', 'ifname': 'PortChannel40,PortChannel50', 'advertise':'false'}}")
|
||||
utils.to_dict("{'8.0.0.1/32': {'nexthop': '192.168.1.2,192.168.2.2', 'ifname': 'PortChannel40,PortChannel50', 'advertise':'false', 'bfd':'true'}}")
|
||||
)
|
||||
|
||||
argument = ['-m', self.packet_chassis_graph, '-p', self.packet_chassis_port_ini, '-n', "asic1", '-v', "STATIC_ROUTE"]
|
||||
output = self.run_script(argument)
|
||||
self.assertEqual(
|
||||
utils.to_dict(output.strip()),
|
||||
utils.to_dict("{'8.0.0.1/32': {'nexthop': '192.168.1.2,192.168.2.2', 'ifname': 'PortChannel40,PortChannel50', 'advertise':'false'}}")
|
||||
utils.to_dict("{'8.0.0.1/32': {'nexthop': '192.168.1.2,192.168.2.2', 'ifname': 'PortChannel40,PortChannel50', 'advertise':'false', 'bfd':'true'}}")
|
||||
)
|
||||
|
||||
def test_minigraph_bgp_packet_chassis_vlan_subintf(self):
|
||||
|
@ -54,6 +54,12 @@ module sonic-static-route {
|
||||
}
|
||||
default "false";
|
||||
}
|
||||
leaf bfd {
|
||||
type string {
|
||||
pattern "((true|false),)*(true|false)";
|
||||
}
|
||||
default "false";
|
||||
}
|
||||
}
|
||||
list STATIC_ROUTE_LIST {
|
||||
key "vrf_name prefix";
|
||||
|
Loading…
Reference in New Issue
Block a user