isisd, yang, doc: combine config cmd for SRGB+SRLB

when changing both ranges at the same time the order of the commands
matters, as we need to make sure that the intermediate state is valid.
This represents a problem when pushing configuration via frr-reload.
To fix this, the global-block command was extended to optionally
allow setting the local-block range as well. The local-block command
is deprecated with a 1-year notice.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
This commit is contained in:
Emanuele Di Pascale 2021-03-09 16:56:45 +01:00
parent da0a277fae
commit 01d431418b
7 changed files with 177 additions and 163 deletions

View file

@ -364,17 +364,19 @@ Known limitations:
Enable Segment Routing. Enable Segment Routing.
.. clicmd:: segment-routing global-block (0-1048575) (0-1048575) .. clicmd:: segment-routing global-block (16-1048575) (16-1048575) [local-block (16-1048575) (16-1048575)]
Set the Segment Routing Global Block i.e. the label range used by MPLS Set the Segment Routing Global Block i.e. the label range used by MPLS
to store label in the MPLS FIB for Prefix SID. Note that the block size to store label in the MPLS FIB for Prefix SID. Note that the block size
may not exceed 65535. may not exceed 65535. Optionally sets also the Segment Routing Local Block.
The negative command always unsets both.
.. clicmd:: segment-routing local-block (0-1048575) (0-1048575) .. clicmd:: segment-routing local-block (16-1048575) (16-1048575)
Set the Segment Routing Local Block i.e. the label range used by MPLS Set the Segment Routing Local Block i.e. the label range used by MPLS
to store label in the MPLS FIB for Adjacency SID. Note that the block size to store label in the MPLS FIB for Adjacency SID. Note that the block size
may not exceed 65535. may not exceed 65535. This command is deprecated in favor of the combined
'segment-routing global-block A B local-block C D' command.
.. clicmd:: segment-routing node-msd (1-16) .. clicmd:: segment-routing node-msd (1-16)

View file

@ -1596,93 +1596,120 @@ void cli_show_isis_sr_enabled(struct vty *vty, struct lyd_node *dnode,
} }
/* /*
* XPath: /frr-isisd:isis/instance/segment-routing/srgb * XPath: /frr-isisd:isis/instance/segment-routing/label-block
*/ */
DEFPY_YANG (isis_sr_global_block_label_range,
isis_sr_global_block_label_range_cmd, DEFPY_YANG(
"segment-routing global-block (16-1048575)$lower_bound (16-1048575)$upper_bound", isis_sr_global_block_label_range, isis_sr_global_block_label_range_cmd,
SR_STR "segment-routing global-block (16-1048575)$gb_lower_bound (16-1048575)$gb_upper_bound [local-block (16-1048575)$lb_lower_bound (16-1048575)$lb_upper_bound]",
"Segment Routing Global Block label range\n" SR_STR
"The lower bound of the block\n" "Segment Routing Global Block label range\n"
"The upper bound of the block (block size may not exceed 65535)\n") "The lower bound of the global block\n"
"The upper bound of the global block (block size may not exceed 65535)\n"
"Segment Routing Local Block label range\n"
"The lower bound of the local block\n"
"The upper bound of the local block (block size may not exceed 65535)\n")
{ {
nb_cli_enqueue_change(vty, "./segment-routing/srgb/lower-bound", nb_cli_enqueue_change(vty,
NB_OP_MODIFY, lower_bound_str); "./segment-routing/label-blocks/srgb/lower-bound",
nb_cli_enqueue_change(vty, "./segment-routing/srgb/upper-bound", NB_OP_MODIFY, gb_lower_bound_str);
NB_OP_MODIFY, upper_bound_str); nb_cli_enqueue_change(vty,
"./segment-routing/label-blocks/srgb/upper-bound",
NB_OP_MODIFY, gb_upper_bound_str);
nb_cli_enqueue_change(
vty, "./segment-routing/label-blocks/srlb/lower-bound",
NB_OP_MODIFY, lb_lower_bound ? lb_lower_bound_str : NULL);
nb_cli_enqueue_change(
vty, "./segment-routing/label-blocks/srlb/upper-bound",
NB_OP_MODIFY, lb_upper_bound ? lb_upper_bound_str : NULL);
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY_YANG (no_isis_sr_global_block_label_range, DEFPY_YANG(no_isis_sr_global_block_label_range,
no_isis_sr_global_block_label_range_cmd, no_isis_sr_global_block_label_range_cmd,
"no segment-routing global-block [(16-1048575) (16-1048575)]", "no segment-routing global-block [(16-1048575) (16-1048575) local-block (16-1048575) (16-1048575)]",
NO_STR NO_STR SR_STR
SR_STR "Segment Routing Global Block label range\n"
"Segment Routing Global Block label range\n" "The lower bound of the global block\n"
"The lower bound of the block\n" "The upper bound of the global block (block size may not exceed 65535)\n"
"The upper bound of the block (block size may not exceed 65535)\n") "Segment Routing Local Block label range\n"
"The lower bound of the local block\n"
"The upper bound of the local block (block size may not exceed 65535)\n")
{ {
nb_cli_enqueue_change(vty, "./segment-routing/srgb/lower-bound", nb_cli_enqueue_change(vty,
"./segment-routing/label-blocks/srgb/lower-bound",
NB_OP_MODIFY, NULL); NB_OP_MODIFY, NULL);
nb_cli_enqueue_change(vty, "./segment-routing/srgb/upper-bound", nb_cli_enqueue_change(vty,
"./segment-routing/label-blocks/srgb/upper-bound",
NB_OP_MODIFY, NULL);
nb_cli_enqueue_change(vty,
"./segment-routing/label-blocks/srlb/lower-bound",
NB_OP_MODIFY, NULL);
nb_cli_enqueue_change(vty,
"./segment-routing/label-blocks/srlb/upper-bound",
NB_OP_MODIFY, NULL); NB_OP_MODIFY, NULL);
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
void cli_show_isis_srgb(struct vty *vty, struct lyd_node *dnode, void cli_show_isis_label_blocks(struct vty *vty, struct lyd_node *dnode,
bool show_defaults) bool show_defaults)
{ {
vty_out(vty, " segment-routing global-block %s %s\n", vty_out(vty, " segment-routing global-block %s %s",
yang_dnode_get_string(dnode, "./lower-bound"), yang_dnode_get_string(dnode, "./srgb/lower-bound"),
yang_dnode_get_string(dnode, "./upper-bound")); yang_dnode_get_string(dnode, "./srgb/upper-bound"));
if (!yang_dnode_is_default(dnode, "./srlb/lower-bound")
|| !yang_dnode_is_default(dnode, "./srlb/upper-bound"))
vty_out(vty, " local-block %s %s",
yang_dnode_get_string(dnode, "./srlb/lower-bound"),
yang_dnode_get_string(dnode, "./srlb/upper-bound"));
vty_out(vty, "\n");
} }
/* /*
* XPath: /frr-isisd:isis/instance/segment-routing/srlb * XPath: /frr-isisd:isis/instance/segment-routing/srlb
*/ */
DEFPY_YANG (isis_sr_local_block_label_range, DEFPY_HIDDEN(
isis_sr_local_block_label_range_cmd, isis_sr_local_block_label_range, isis_sr_local_block_label_range_cmd,
"segment-routing local-block (16-1048575)$lower_bound (16-1048575)$upper_bound", "segment-routing local-block (16-1048575)$lower_bound (16-1048575)$upper_bound",
SR_STR SR_STR
"Segment Routing Local Block label range\n" "Segment Routing Local Block label range\n"
"The lower bound of the block\n" "The lower bound of the block\n"
"The upper bound of the block (block size may not exceed 65535)\n") "The upper bound of the block (block size may not exceed 65535)\n")
{ {
nb_cli_enqueue_change(vty, "./segment-routing/srlb/lower-bound", #if CONFDATE > 20220217
CPP_NOTICE("Use of the local-block command is deprecated")
#endif
nb_cli_enqueue_change(vty,
"./segment-routing/label-blocks/srlb/lower-bound",
NB_OP_MODIFY, lower_bound_str); NB_OP_MODIFY, lower_bound_str);
nb_cli_enqueue_change(vty, "./segment-routing/srlb/upper-bound", nb_cli_enqueue_change(vty,
"./segment-routing/label-blocks/srlb/upper-bound",
NB_OP_MODIFY, upper_bound_str); NB_OP_MODIFY, upper_bound_str);
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY_YANG (no_isis_sr_local_block_label_range, DEFPY_HIDDEN(no_isis_sr_local_block_label_range,
no_isis_sr_local_block_label_range_cmd, no_isis_sr_local_block_label_range_cmd,
"no segment-routing local-block [(16-1048575) (16-1048575)]", "no segment-routing local-block [(16-1048575) (16-1048575)]",
NO_STR NO_STR SR_STR
SR_STR "Segment Routing Local Block label range\n"
"Segment Routing Local Block label range\n" "The lower bound of the block\n"
"The lower bound of the block\n" "The upper bound of the block (block size may not exceed 65535)\n")
"The upper bound of the block (block size may not exceed 65535)\n")
{ {
nb_cli_enqueue_change(vty, "./segment-routing/srlb/lower-bound", nb_cli_enqueue_change(vty,
"./segment-routing/label-blocks/srlb/lower-bound",
NB_OP_MODIFY, NULL); NB_OP_MODIFY, NULL);
nb_cli_enqueue_change(vty, "./segment-routing/srlb/upper-bound", nb_cli_enqueue_change(vty,
"./segment-routing/label-blocks/srlb/upper-bound",
NB_OP_MODIFY, NULL); NB_OP_MODIFY, NULL);
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
void cli_show_isis_srlb(struct vty *vty, struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " segment-routing local-block %s %s\n",
yang_dnode_get_string(dnode, "./lower-bound"),
yang_dnode_get_string(dnode, "./upper-bound"));
}
/* /*
* XPath: /frr-isisd:isis/instance/segment-routing/msd/node-msd * XPath: /frr-isisd:isis/instance/segment-routing/msd/node-msd
*/ */

View file

@ -573,41 +573,44 @@ const struct frr_yang_module_info frr_isisd_info = {
}, },
}, },
{ {
.xpath = "/frr-isisd:isis/instance/segment-routing/srgb", .xpath = "/frr-isisd:isis/instance/segment-routing/label-blocks",
.cbs = { .cbs = {
.apply_finish = isis_instance_segment_routing_srgb_apply_finish, .pre_validate = isis_instance_segment_routing_label_blocks_pre_validate,
.pre_validate = isis_instance_segment_routing_srgb_pre_validate, .cli_show = cli_show_isis_label_blocks,
.cli_show = cli_show_isis_srgb,
}, },
}, },
{ {
.xpath = "/frr-isisd:isis/instance/segment-routing/srgb/lower-bound", .xpath = "/frr-isisd:isis/instance/segment-routing/label-blocks/srgb",
.cbs = {
.apply_finish = isis_instance_segment_routing_srgb_apply_finish,
},
},
{
.xpath = "/frr-isisd:isis/instance/segment-routing/label-blocks/srgb/lower-bound",
.cbs = { .cbs = {
.modify = isis_instance_segment_routing_srgb_lower_bound_modify, .modify = isis_instance_segment_routing_srgb_lower_bound_modify,
}, },
}, },
{ {
.xpath = "/frr-isisd:isis/instance/segment-routing/srgb/upper-bound", .xpath = "/frr-isisd:isis/instance/segment-routing/label-blocks/srgb/upper-bound",
.cbs = { .cbs = {
.modify = isis_instance_segment_routing_srgb_upper_bound_modify, .modify = isis_instance_segment_routing_srgb_upper_bound_modify,
}, },
}, },
{ {
.xpath = "/frr-isisd:isis/instance/segment-routing/srlb", .xpath = "/frr-isisd:isis/instance/segment-routing/label-blocks/srlb",
.cbs = { .cbs = {
.apply_finish = isis_instance_segment_routing_srlb_apply_finish, .apply_finish = isis_instance_segment_routing_srlb_apply_finish,
.pre_validate = isis_instance_segment_routing_srlb_pre_validate,
.cli_show = cli_show_isis_srlb,
}, },
}, },
{ {
.xpath = "/frr-isisd:isis/instance/segment-routing/srlb/lower-bound", .xpath = "/frr-isisd:isis/instance/segment-routing/label-blocks/srlb/lower-bound",
.cbs = { .cbs = {
.modify = isis_instance_segment_routing_srlb_lower_bound_modify, .modify = isis_instance_segment_routing_srlb_lower_bound_modify,
}, },
}, },
{ {
.xpath = "/frr-isisd:isis/instance/segment-routing/srlb/upper-bound", .xpath = "/frr-isisd:isis/instance/segment-routing/label-blocks/srlb/upper-bound",
.cbs = { .cbs = {
.modify = isis_instance_segment_routing_srlb_upper_bound_modify, .modify = isis_instance_segment_routing_srlb_upper_bound_modify,
}, },

View file

@ -387,9 +387,7 @@ lib_interface_state_isis_event_counters_authentication_fails_get_elem(
/* Optional 'pre_validate' callbacks. */ /* Optional 'pre_validate' callbacks. */
int isis_instance_segment_routing_prefix_sid_map_prefix_sid_pre_validate( int isis_instance_segment_routing_prefix_sid_map_prefix_sid_pre_validate(
struct nb_cb_pre_validate_args *args); struct nb_cb_pre_validate_args *args);
int isis_instance_segment_routing_srgb_pre_validate( int isis_instance_segment_routing_label_blocks_pre_validate(
struct nb_cb_pre_validate_args *args);
int isis_instance_segment_routing_srlb_pre_validate(
struct nb_cb_pre_validate_args *args); struct nb_cb_pre_validate_args *args);
/* Optional 'apply_finish' callbacks. */ /* Optional 'apply_finish' callbacks. */
@ -476,10 +474,8 @@ void cli_show_isis_mt_ipv6_dstsrc(struct vty *vty, struct lyd_node *dnode,
bool show_defaults); bool show_defaults);
void cli_show_isis_sr_enabled(struct vty *vty, struct lyd_node *dnode, void cli_show_isis_sr_enabled(struct vty *vty, struct lyd_node *dnode,
bool show_defaults); bool show_defaults);
void cli_show_isis_srgb(struct vty *vty, struct lyd_node *dnode, void cli_show_isis_label_blocks(struct vty *vty, struct lyd_node *dnode,
bool show_defaults); bool show_defaults);
void cli_show_isis_srlb(struct vty *vty, struct lyd_node *dnode,
bool show_defaults);
void cli_show_isis_node_msd(struct vty *vty, struct lyd_node *dnode, void cli_show_isis_node_msd(struct vty *vty, struct lyd_node *dnode,
bool show_defaults); bool show_defaults);
void cli_show_isis_prefix_sid(struct vty *vty, struct lyd_node *dnode, void cli_show_isis_prefix_sid(struct vty *vty, struct lyd_node *dnode,

View file

@ -1943,9 +1943,9 @@ int isis_instance_segment_routing_enabled_modify(
} }
/* /*
* XPath: /frr-isisd:isis/instance/segment-routing/srgb * XPath: /frr-isisd:isis/instance/segment-routing/label-blocks
*/ */
int isis_instance_segment_routing_srgb_pre_validate( int isis_instance_segment_routing_label_blocks_pre_validate(
struct nb_cb_pre_validate_args *args) struct nb_cb_pre_validate_args *args)
{ {
uint32_t srgb_lbound; uint32_t srgb_lbound;
@ -1953,10 +1953,10 @@ int isis_instance_segment_routing_srgb_pre_validate(
uint32_t srlb_lbound; uint32_t srlb_lbound;
uint32_t srlb_ubound; uint32_t srlb_ubound;
srgb_lbound = yang_dnode_get_uint32(args->dnode, "./lower-bound"); srgb_lbound = yang_dnode_get_uint32(args->dnode, "./srgb/lower-bound");
srgb_ubound = yang_dnode_get_uint32(args->dnode, "./upper-bound"); srgb_ubound = yang_dnode_get_uint32(args->dnode, "./srgb/upper-bound");
srlb_lbound = yang_dnode_get_uint32(args->dnode, "../srlb/lower-bound"); srlb_lbound = yang_dnode_get_uint32(args->dnode, "./srlb/lower-bound");
srlb_ubound = yang_dnode_get_uint32(args->dnode, "../srlb/upper-bound"); srlb_ubound = yang_dnode_get_uint32(args->dnode, "./srlb/upper-bound");
/* Check that the block size does not exceed 65535 */ /* Check that the block size does not exceed 65535 */
if ((srgb_ubound - srgb_lbound + 1) > 65535) { if ((srgb_ubound - srgb_lbound + 1) > 65535) {
@ -1966,12 +1966,18 @@ int isis_instance_segment_routing_srgb_pre_validate(
srgb_lbound, srgb_ubound); srgb_lbound, srgb_ubound);
return NB_ERR_VALIDATION; return NB_ERR_VALIDATION;
} }
if ((srlb_ubound - srlb_lbound + 1) > 65535) {
snprintf(args->errmsg, args->errmsg_len,
"New SR Local Block (%u/%u) exceed the limit of 65535",
srlb_lbound, srlb_ubound);
return NB_ERR_VALIDATION;
}
/* Validate SRGB against SRLB */ /* Validate SRGB against SRLB */
if (!((srgb_ubound < srlb_lbound) || (srgb_lbound > srlb_ubound))) { if (!((srgb_ubound < srlb_lbound) || (srgb_lbound > srlb_ubound))) {
snprintf( snprintf(
args->errmsg, args->errmsg_len, args->errmsg, args->errmsg_len,
"New SR Global Block (%u/%u) conflict with Local Block (%u/%u)", "SR Global Block (%u/%u) conflicts with Local Block (%u/%u)",
srgb_lbound, srgb_ubound, srlb_lbound, srlb_ubound); srgb_lbound, srgb_ubound, srlb_lbound, srlb_ubound);
return NB_ERR_VALIDATION; return NB_ERR_VALIDATION;
} }
@ -1979,6 +1985,10 @@ int isis_instance_segment_routing_srgb_pre_validate(
return NB_OK; return NB_OK;
} }
/*
* XPath: /frr-isisd:isis/instance/segment-routing/label-blocks/srgb
*/
void isis_instance_segment_routing_srgb_apply_finish( void isis_instance_segment_routing_srgb_apply_finish(
struct nb_cb_apply_finish_args *args) struct nb_cb_apply_finish_args *args)
{ {
@ -1993,7 +2003,7 @@ void isis_instance_segment_routing_srgb_apply_finish(
} }
/* /*
* XPath: /frr-isisd:isis/instance/segment-routing/srgb/lower-bound * XPath: /frr-isisd:isis/instance/segment-routing/label-blocks/srgb/lower-bound
*/ */
int isis_instance_segment_routing_srgb_lower_bound_modify( int isis_instance_segment_routing_srgb_lower_bound_modify(
struct nb_cb_modify_args *args) struct nb_cb_modify_args *args)
@ -2018,7 +2028,7 @@ int isis_instance_segment_routing_srgb_lower_bound_modify(
} }
/* /*
* XPath: /frr-isisd:isis/instance/segment-routing/srgb/upper-bound * XPath: /frr-isisd:isis/instance/segment-routing/label-blocks/srgb/upper-bound
*/ */
int isis_instance_segment_routing_srgb_upper_bound_modify( int isis_instance_segment_routing_srgb_upper_bound_modify(
struct nb_cb_modify_args *args) struct nb_cb_modify_args *args)
@ -2043,41 +2053,8 @@ int isis_instance_segment_routing_srgb_upper_bound_modify(
} }
/* /*
* XPath: /frr-isisd:isis/instance/segment-routing/srlb * XPath: /frr-isisd:isis/instance/segment-routing/label-blocks/srlb
*/ */
int isis_instance_segment_routing_srlb_pre_validate(
struct nb_cb_pre_validate_args *args)
{
uint32_t srgb_lbound;
uint32_t srgb_ubound;
uint32_t srlb_lbound;
uint32_t srlb_ubound;
srgb_lbound = yang_dnode_get_uint32(args->dnode, "../srgb/lower-bound");
srgb_ubound = yang_dnode_get_uint32(args->dnode, "../srgb/upper-bound");
srlb_lbound = yang_dnode_get_uint32(args->dnode, "./lower-bound");
srlb_ubound = yang_dnode_get_uint32(args->dnode, "./upper-bound");
/* Check that the block size does not exceed 65535 */
if ((srlb_ubound - srlb_lbound + 1) > 65535) {
snprintf(args->errmsg, args->errmsg_len,
"New SR Local Block (%u/%u) exceed the limit of 65535",
srlb_lbound, srlb_ubound);
return NB_ERR_VALIDATION;
}
/* Validate SRLB against SRGB */
if (!((srlb_ubound < srgb_lbound) || (srlb_lbound > srgb_ubound))) {
snprintf(
args->errmsg, args->errmsg_len,
"New SR Local Block (%u/%u) conflict with Global Block (%u/%u)",
srlb_lbound, srlb_ubound, srgb_lbound, srgb_ubound);
return NB_ERR_VALIDATION;
}
return NB_OK;
}
void isis_instance_segment_routing_srlb_apply_finish( void isis_instance_segment_routing_srlb_apply_finish(
struct nb_cb_apply_finish_args *args) struct nb_cb_apply_finish_args *args)
{ {
@ -2092,7 +2069,7 @@ void isis_instance_segment_routing_srlb_apply_finish(
} }
/* /*
* XPath: /frr-isisd:isis/instance/segment-routing/srlb/lower-bound * XPath: /frr-isisd:isis/instance/segment-routing/label-blocks/srlb/lower-bound
*/ */
int isis_instance_segment_routing_srlb_lower_bound_modify( int isis_instance_segment_routing_srlb_lower_bound_modify(
struct nb_cb_modify_args *args) struct nb_cb_modify_args *args)
@ -2117,7 +2094,7 @@ int isis_instance_segment_routing_srlb_lower_bound_modify(
} }
/* /*
* XPath: /frr-isisd:isis/instance/segment-routing/srlb/upper-bound * XPath: /frr-isisd:isis/instance/segment-routing/label-blocks/srlb/upper-bound
*/ */
int isis_instance_segment_routing_srlb_upper_bound_modify( int isis_instance_segment_routing_srlb_upper_bound_modify(
struct nb_cb_modify_args *args) struct nb_cb_modify_args *args)
@ -2231,10 +2208,10 @@ int isis_instance_segment_routing_prefix_sid_map_prefix_sid_pre_validate(
struct isis_prefix_sid psid = {}; struct isis_prefix_sid psid = {};
yang_dnode_get_prefix(&prefix, args->dnode, "./prefix"); yang_dnode_get_prefix(&prefix, args->dnode, "./prefix");
srgb_lbound = yang_dnode_get_uint32(args->dnode, srgb_lbound = yang_dnode_get_uint32(
"../../srgb/lower-bound"); args->dnode, "../../label-blocks/srgb/lower-bound");
srgb_ubound = yang_dnode_get_uint32(args->dnode, srgb_ubound = yang_dnode_get_uint32(
"../../srgb/upper-bound"); args->dnode, "../../label-blocks/srgb/upper-bound");
sid = yang_dnode_get_uint32(args->dnode, "./sid-value"); sid = yang_dnode_get_uint32(args->dnode, "./sid-value");
sid_type = yang_dnode_get_enum(args->dnode, "./sid-value-type"); sid_type = yang_dnode_get_enum(args->dnode, "./sid-value-type");

View file

@ -1213,14 +1213,14 @@ void isis_sr_area_init(struct isis_area *area)
/* Pull defaults from the YANG module. */ /* Pull defaults from the YANG module. */
#ifndef FABRICD #ifndef FABRICD
srdb->config.enabled = yang_get_default_bool("%s/enabled", ISIS_SR); srdb->config.enabled = yang_get_default_bool("%s/enabled", ISIS_SR);
srdb->config.srgb_lower_bound = srdb->config.srgb_lower_bound = yang_get_default_uint32(
yang_get_default_uint32("%s/srgb/lower-bound", ISIS_SR); "%s/label-blocks/srgb/lower-bound", ISIS_SR);
srdb->config.srgb_upper_bound = srdb->config.srgb_upper_bound = yang_get_default_uint32(
yang_get_default_uint32("%s/srgb/upper-bound", ISIS_SR); "%s/label-blocks/srgb/upper-bound", ISIS_SR);
srdb->config.srlb_lower_bound = srdb->config.srlb_lower_bound = yang_get_default_uint32(
yang_get_default_uint32("%s/srlb/lower-bound", ISIS_SR); "%s/label-blocks/srlb/lower-bound", ISIS_SR);
srdb->config.srlb_upper_bound = srdb->config.srlb_upper_bound = yang_get_default_uint32(
yang_get_default_uint32("%s/srlb/upper-bound", ISIS_SR); "%s/label-blocks/srlb/upper-bound", ISIS_SR);
#else #else
srdb->config.enabled = false; srdb->config.enabled = false;
srdb->config.srgb_lower_bound = SRGB_LOWER_BOUND; srdb->config.srgb_lower_bound = SRGB_LOWER_BOUND;

View file

@ -60,6 +60,11 @@ module frr-isisd {
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
revision 2021-02-15 {
description
"Group SRGB and SRLB in a container so that they can be displayed
and configured together";
}
revision 2020-04-06 { revision 2020-04-06 {
description description
"Group LSP timers in a container so that they can be displayed and "Group LSP timers in a container so that they can be displayed and
@ -1491,38 +1496,42 @@ module frr-isisd {
description description
"Enables segment-routing protocol extensions."; "Enables segment-routing protocol extensions.";
} }
container srgb { container label-blocks {
description description
"Global blocks to be advertised."; "Local and global label blocks.";
must "./upper-bound > ./lower-bound"; container srgb {
leaf lower-bound { description
type uint32; "Global blocks to be advertised.";
default "16000"; must "./upper-bound > ./lower-bound";
description leaf lower-bound {
"Lower value in the label range."; type uint32;
default "16000";
description
"Lower value in the label range.";
}
leaf upper-bound {
type uint32;
default "23999";
description
"Upper value in the label range.";
}
} }
leaf upper-bound { container srlb {
type uint32; description
default "23999"; "Local blocks to be advertised.";
description must "./upper-bound > ./lower-bound";
"Upper value in the label range."; leaf lower-bound {
} type uint32;
} default "15000";
container srlb { description
description "Lower value in the label range.";
"Local blocks to be advertised."; }
must "./upper-bound > ./lower-bound"; leaf upper-bound {
leaf lower-bound { type uint32;
type uint32; default "15999";
default "15000"; description
description "Upper value in the label range.";
"Lower value in the label range."; }
}
leaf upper-bound {
type uint32;
default "15999";
description
"Upper value in the label range.";
} }
} }
container msd { container msd {