mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 12:41:21 +00:00
isisd: Add nb command to enable/disable SRv6
Add a northbound command to enable/disable SRv6 on a given IS-IS area. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
This commit is contained in:
parent
3ffdeb64b7
commit
e2e4210267
@ -860,6 +860,12 @@ const struct frr_yang_module_info frr_isisd_info = {
|
|||||||
.destroy = isis_instance_flex_algo_priority_destroy,
|
.destroy = isis_instance_flex_algo_priority_destroy,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.xpath = "/frr-isisd:isis/instance/segment-routing-srv6/enabled",
|
||||||
|
.cbs = {
|
||||||
|
.modify = isis_instance_segment_routing_srv6_enabled_modify,
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.xpath = "/frr-isisd:isis/instance/mpls/ldp-sync",
|
.xpath = "/frr-isisd:isis/instance/mpls/ldp-sync",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
|
@ -322,6 +322,8 @@ int isis_instance_flex_algo_affinity_mapping_value_modify(
|
|||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
int isis_instance_flex_algo_affinity_mapping_value_destroy(
|
int isis_instance_flex_algo_affinity_mapping_value_destroy(
|
||||||
struct nb_cb_destroy_args *args);
|
struct nb_cb_destroy_args *args);
|
||||||
|
int isis_instance_segment_routing_srv6_enabled_modify(
|
||||||
|
struct nb_cb_modify_args *args);
|
||||||
int isis_instance_mpls_ldp_sync_destroy(struct nb_cb_destroy_args *args);
|
int isis_instance_mpls_ldp_sync_destroy(struct nb_cb_destroy_args *args);
|
||||||
int isis_instance_mpls_ldp_sync_create(struct nb_cb_create_args *args);
|
int isis_instance_mpls_ldp_sync_create(struct nb_cb_create_args *args);
|
||||||
int isis_instance_mpls_ldp_sync_holddown_modify(struct nb_cb_modify_args *args);
|
int isis_instance_mpls_ldp_sync_holddown_modify(struct nb_cb_modify_args *args);
|
||||||
|
@ -3446,6 +3446,37 @@ int isis_instance_flex_algo_priority_destroy(struct nb_cb_destroy_args *args)
|
|||||||
return NB_OK;
|
return NB_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* XPath: /frr-isisd:isis/instance/segment-routing-srv6/enabled
|
||||||
|
*/
|
||||||
|
int isis_instance_segment_routing_srv6_enabled_modify(
|
||||||
|
struct nb_cb_modify_args *args)
|
||||||
|
{
|
||||||
|
struct isis_area *area;
|
||||||
|
|
||||||
|
if (args->event != NB_EV_APPLY)
|
||||||
|
return NB_OK;
|
||||||
|
|
||||||
|
area = nb_running_get_entry(args->dnode, NULL, true);
|
||||||
|
area->srv6db.config.enabled = yang_dnode_get_bool(args->dnode, NULL);
|
||||||
|
|
||||||
|
if (area->srv6db.config.enabled) {
|
||||||
|
if (IS_DEBUG_EVENTS)
|
||||||
|
zlog_debug(
|
||||||
|
"Segment Routing over IPv6 (SRv6): OFF -> ON");
|
||||||
|
} else {
|
||||||
|
if (IS_DEBUG_EVENTS)
|
||||||
|
zlog_debug(
|
||||||
|
"Segment Routing over IPv6 (SRv6): ON -> OFF");
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Regenerate LSPs to advertise SRv6 capabilities or signal that the
|
||||||
|
* node is no longer SRv6-capable. */
|
||||||
|
lsp_regenerate_schedule(area, area->is_type, 0);
|
||||||
|
|
||||||
|
return NB_OK;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* XPath: /frr-isisd:isis/instance/mpls/ldp-sync
|
* XPath: /frr-isisd:isis/instance/mpls/ldp-sync
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user