@@ -1810,7 +1810,6 @@ class BGPConfigDaemon:
1810
1810
DEFAULT_VRF = 'default'
1811
1811
1812
1812
global_key_map = [('router_id' , '{no:no-prefix}bgp router-id {}' ),
1813
- ('srv6_locator' , '{no:no-prefix}srv6-locator {}' ),
1814
1813
(['load_balance_mp_relax' , '+as_path_mp_as_set' ], '{no:no-prefix}bgp bestpath as-path multipath-relax {:mp-as-set}' , ['true' , 'false' ]),
1815
1814
('always_compare_med' , '{no:no-prefix}bgp always-compare-med' , ['true' , 'false' ]),
1816
1815
('external_compare_router_id' , '{no:no-prefix}bgp bestpath compare-routerid' , ['true' , 'false' ]),
@@ -2739,6 +2738,14 @@ def __update_bgp(self, data_list):
2739
2738
syslog .syslog (syslog .LOG_ERR , 'local ASN for VRF %s was not configured' % vrf )
2740
2739
continue
2741
2740
cmd_prefix = ['configure terminal' , 'router bgp {} vrf {}' .format (local_asn , vrf )]
2741
+ if 'srv6_locator' in data :
2742
+ cmd = "vtysh -c 'configure terminal' "
2743
+ cmd += " -c 'router bgp {} vrf {}' " .format (local_asn , vrf )
2744
+ cmd += " -c 'segment-routing srv6' "
2745
+ cmd += " -c 'locator {}' " .format (data ['srv6_locator' ].data )
2746
+ if not self .__run_command (table , cmd ):
2747
+ syslog .syslog (syslog .LOG_ERR , 'failed running SRV6 POLICY config command' )
2748
+ continue
2742
2749
if not key_map .run_command (self , table , data , cmd_prefix ):
2743
2750
syslog .syslog (syslog .LOG_ERR , 'failed running BGP global config command' )
2744
2751
continue
0 commit comments