Skip to content

Commit

Permalink
Merge pull request #14541 from idryzhov/isis-fix-cb-destroy
Browse files Browse the repository at this point in the history
isisd: remove redundant northbound destroy callbacks
  • Loading branch information
rzalamena authored Oct 8, 2023
2 parents c516447 + 6d8963f commit 5c0a5aa
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 84 deletions.
4 changes: 0 additions & 4 deletions isisd/isis_nb.c
Original file line number Diff line number Diff line change
Expand Up @@ -879,28 +879,24 @@ const struct frr_yang_module_info frr_isisd_info = {
.xpath = "/frr-isisd:isis/instance/segment-routing-srv6/msd/node-msd/max-segs-left",
.cbs = {
.modify = isis_instance_segment_routing_srv6_msd_node_msd_max_segs_left_modify,
.destroy = isis_instance_segment_routing_srv6_msd_node_msd_max_segs_left_destroy,
},
},
{
.xpath = "/frr-isisd:isis/instance/segment-routing-srv6/msd/node-msd/max-end-pop",
.cbs = {
.modify = isis_instance_segment_routing_srv6_msd_node_msd_max_end_pop_modify,
.destroy = isis_instance_segment_routing_srv6_msd_node_msd_max_end_pop_destroy,
},
},
{
.xpath = "/frr-isisd:isis/instance/segment-routing-srv6/msd/node-msd/max-h-encaps",
.cbs = {
.modify = isis_instance_segment_routing_srv6_msd_node_msd_max_h_encaps_modify,
.destroy = isis_instance_segment_routing_srv6_msd_node_msd_max_h_encaps_destroy,
},
},
{
.xpath = "/frr-isisd:isis/instance/segment-routing-srv6/msd/node-msd/max-end-d",
.cbs = {
.modify = isis_instance_segment_routing_srv6_msd_node_msd_max_end_d_modify,
.destroy = isis_instance_segment_routing_srv6_msd_node_msd_max_end_d_destroy,
},
},
{
Expand Down
8 changes: 0 additions & 8 deletions isisd/isis_nb.h
Original file line number Diff line number Diff line change
Expand Up @@ -334,20 +334,12 @@ void cli_show_isis_srv6_locator(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
int isis_instance_segment_routing_srv6_msd_node_msd_max_segs_left_modify(
struct nb_cb_modify_args *args);
int isis_instance_segment_routing_srv6_msd_node_msd_max_segs_left_destroy(
struct nb_cb_destroy_args *args);
int isis_instance_segment_routing_srv6_msd_node_msd_max_end_pop_modify(
struct nb_cb_modify_args *args);
int isis_instance_segment_routing_srv6_msd_node_msd_max_end_pop_destroy(
struct nb_cb_destroy_args *args);
int isis_instance_segment_routing_srv6_msd_node_msd_max_h_encaps_modify(
struct nb_cb_modify_args *args);
int isis_instance_segment_routing_srv6_msd_node_msd_max_h_encaps_destroy(
struct nb_cb_destroy_args *args);
int isis_instance_segment_routing_srv6_msd_node_msd_max_end_d_modify(
struct nb_cb_modify_args *args);
int isis_instance_segment_routing_srv6_msd_node_msd_max_end_d_destroy(
struct nb_cb_destroy_args *args);
void cli_show_isis_srv6_node_msd(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
int isis_instance_segment_routing_srv6_interface_modify(
Expand Down
72 changes: 0 additions & 72 deletions isisd/isis_nb_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -3583,24 +3583,6 @@ int isis_instance_segment_routing_srv6_msd_node_msd_max_segs_left_modify(
return NB_OK;
}

int isis_instance_segment_routing_srv6_msd_node_msd_max_segs_left_destroy(
struct nb_cb_destroy_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.max_seg_left_msd =
yang_get_default_uint8("./msd/node-msd/max-segs-left");

/* Update and regenerate LSP */
lsp_regenerate_schedule(area, area->is_type, 0);

return NB_OK;
}

/*
* XPath: /frr-isisd:isis/instance/segment-routing-srv6/msd/node-msd/max-end-pop
*/
Expand All @@ -3622,24 +3604,6 @@ int isis_instance_segment_routing_srv6_msd_node_msd_max_end_pop_modify(
return NB_OK;
}

int isis_instance_segment_routing_srv6_msd_node_msd_max_end_pop_destroy(
struct nb_cb_destroy_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.max_end_pop_msd =
yang_get_default_uint8("./msd/node-msd/max-end-pop");

/* Update and regenerate LSP */
lsp_regenerate_schedule(area, area->is_type, 0);

return NB_OK;
}

/*
* XPath: /frr-isisd:isis/instance/segment-routing-srv6/msd/node-msd/max-h-encaps
*/
Expand All @@ -3661,24 +3625,6 @@ int isis_instance_segment_routing_srv6_msd_node_msd_max_h_encaps_modify(
return NB_OK;
}

int isis_instance_segment_routing_srv6_msd_node_msd_max_h_encaps_destroy(
struct nb_cb_destroy_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.max_h_encaps_msd =
yang_get_default_uint8("./msd/node-msd/max-h-encaps");

/* Update and regenerate LSP */
lsp_regenerate_schedule(area, area->is_type, 0);

return NB_OK;
}

/*
* XPath: /frr-isisd:isis/instance/segment-routing-srv6/msd/node-msd/max-end-d
*/
Expand All @@ -3700,24 +3646,6 @@ int isis_instance_segment_routing_srv6_msd_node_msd_max_end_d_modify(
return NB_OK;
}

int isis_instance_segment_routing_srv6_msd_node_msd_max_end_d_destroy(
struct nb_cb_destroy_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.max_end_d_msd =
yang_get_default_uint8("./msd/node-msd/max-end-d");

/* Update and regenerate LSP */
lsp_regenerate_schedule(area, area->is_type, 0);

return NB_OK;
}

/*
* XPath: /frr-isisd:isis/instance/segment-routing-srv6/interface
*/
Expand Down

0 comments on commit 5c0a5aa

Please sign in to comment.