]> git.proxmox.com Git - mirror_frr.git/commitdiff
isisd, yang, doc: combine config cmd for SRGB+SRLB
authorEmanuele Di Pascale <emanuele@voltanet.io>
Tue, 9 Mar 2021 15:56:45 +0000 (16:56 +0100)
committerEmanuele Di Pascale <emanuele@voltanet.io>
Wed, 10 Mar 2021 10:02:30 +0000 (11:02 +0100)
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>
doc/user/isisd.rst
isisd/isis_cli.c
isisd/isis_nb.c
isisd/isis_nb.h
isisd/isis_nb_config.c
isisd/isis_sr.c
yang/frr-isisd.yang

index ebcf21b04ce996e8d2a6a9a82b89684462a1fc0c..ef2bf16166e0d2ec5a3294c1b7b63d84e3227d49 100644 (file)
@@ -364,17 +364,19 @@ Known limitations:
 
    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
    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
    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)
 
index b48da9312fc973c3bc771ff81a94954334dd7d2b..fb9721e8b3a0a504c81a6c1747d5261efd0978d9 100644 (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,
-       "segment-routing global-block (16-1048575)$lower_bound (16-1048575)$upper_bound",
-       SR_STR
-       "Segment Routing Global Block label range\n"
-       "The lower bound of the block\n"
-       "The upper bound of the block (block size may not exceed 65535)\n")
+
+DEFPY_YANG(
+       isis_sr_global_block_label_range, isis_sr_global_block_label_range_cmd,
+       "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]",
+       SR_STR
+       "Segment Routing Global Block label range\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_OP_MODIFY, lower_bound_str);
-       nb_cli_enqueue_change(vty, "./segment-routing/srgb/upper-bound",
-                             NB_OP_MODIFY, upper_bound_str);
+       nb_cli_enqueue_change(vty,
+                             "./segment-routing/label-blocks/srgb/lower-bound",
+                             NB_OP_MODIFY, gb_lower_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);
 }
 
-DEFPY_YANG (no_isis_sr_global_block_label_range,
-       no_isis_sr_global_block_label_range_cmd,
-       "no segment-routing global-block [(16-1048575) (16-1048575)]",
-       NO_STR
-       SR_STR
-       "Segment Routing Global Block label range\n"
-       "The lower bound of the block\n"
-       "The upper bound of the block (block size may not exceed 65535)\n")
+DEFPY_YANG(no_isis_sr_global_block_label_range,
+       no_isis_sr_global_block_label_range_cmd,
+       "no segment-routing global-block [(16-1048575) (16-1048575) local-block (16-1048575) (16-1048575)]",
+       NO_STR SR_STR
+       "Segment Routing Global Block label range\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,
+                             "./segment-routing/label-blocks/srgb/lower-bound",
+                             NB_OP_MODIFY, NULL);
+       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/srgb/upper-bound",
+       nb_cli_enqueue_change(vty,
+                             "./segment-routing/label-blocks/srlb/upper-bound",
                              NB_OP_MODIFY, NULL);
 
        return nb_cli_apply_changes(vty, NULL);
 }
 
-void cli_show_isis_srgb(struct vty *vty, struct lyd_node *dnode,
-                       bool show_defaults)
+void cli_show_isis_label_blocks(struct vty *vty, struct lyd_node *dnode,
+                               bool show_defaults)
 {
-       vty_out(vty, " segment-routing global-block %s %s\n",
-               yang_dnode_get_string(dnode, "./lower-bound"),
-               yang_dnode_get_string(dnode, "./upper-bound"));
+       vty_out(vty, " segment-routing global-block %s %s",
+               yang_dnode_get_string(dnode, "./srgb/lower-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
  */
-DEFPY_YANG (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",
-       SR_STR
-       "Segment Routing Local Block label range\n"
-       "The lower bound of the block\n"
-       "The upper bound of the block (block size may not exceed 65535)\n")
-{
-       nb_cli_enqueue_change(vty, "./segment-routing/srlb/lower-bound",
+DEFPY_HIDDEN(
+       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",
+       SR_STR
+       "Segment Routing Local Block label range\n"
+       "The lower bound of the block\n"
+       "The upper bound of the block (block size may not exceed 65535)\n")
+{
+#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_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);
 
        return nb_cli_apply_changes(vty, NULL);
 }
 
-DEFPY_YANG (no_isis_sr_local_block_label_range,
-       no_isis_sr_local_block_label_range_cmd,
-       "no segment-routing local-block [(16-1048575) (16-1048575)]",
-       NO_STR
-       SR_STR
-       "Segment Routing Local Block label range\n"
-       "The lower bound of the block\n"
-       "The upper bound of the block (block size may not exceed 65535)\n")
+DEFPY_HIDDEN(no_isis_sr_local_block_label_range,
+            no_isis_sr_local_block_label_range_cmd,
+            "no segment-routing local-block [(16-1048575) (16-1048575)]",
+            NO_STR SR_STR
+            "Segment Routing Local Block label range\n"
+            "The lower bound of the block\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_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);
 
        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
  */
index 6d46e6b67e97408bbc9e734254fd380cd9dcfca8..227724934b52920954b26a704bb9eaaacf7f8d61 100644 (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 = {
+                               .pre_validate = isis_instance_segment_routing_label_blocks_pre_validate,
+                               .cli_show = cli_show_isis_label_blocks,
+                       },
+               },
+               {
+                       .xpath = "/frr-isisd:isis/instance/segment-routing/label-blocks/srgb",
                        .cbs = {
                                .apply_finish = isis_instance_segment_routing_srgb_apply_finish,
-                               .pre_validate = isis_instance_segment_routing_srgb_pre_validate,
-                               .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/lower-bound",
                        .cbs = {
                                .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 = {
                                .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 = {
                                .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 = {
                                .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 = {
                                .modify = isis_instance_segment_routing_srlb_upper_bound_modify,
                        },
index 8ecd8134e6dc3c957788c2eb4dcc3f01d4bfcd97..dfa77fbacaf51ee58651c4d3d0b86f4a902cda7a 100644 (file)
@@ -387,9 +387,7 @@ lib_interface_state_isis_event_counters_authentication_fails_get_elem(
 /* Optional 'pre_validate' callbacks. */
 int isis_instance_segment_routing_prefix_sid_map_prefix_sid_pre_validate(
        struct nb_cb_pre_validate_args *args);
-int isis_instance_segment_routing_srgb_pre_validate(
-       struct nb_cb_pre_validate_args *args);
-int isis_instance_segment_routing_srlb_pre_validate(
+int isis_instance_segment_routing_label_blocks_pre_validate(
        struct nb_cb_pre_validate_args *args);
 
 /* 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);
 void cli_show_isis_sr_enabled(struct vty *vty, struct lyd_node *dnode,
                              bool show_defaults);
-void cli_show_isis_srgb(struct vty *vty, struct lyd_node *dnode,
-                       bool show_defaults);
-void cli_show_isis_srlb(struct vty *vty, struct lyd_node *dnode,
-                       bool show_defaults);
+void cli_show_isis_label_blocks(struct vty *vty, struct lyd_node *dnode,
+                               bool show_defaults);
 void cli_show_isis_node_msd(struct vty *vty, struct lyd_node *dnode,
                            bool show_defaults);
 void cli_show_isis_prefix_sid(struct vty *vty, struct lyd_node *dnode,
index 45bbc9737bf5270c2e4a98bd8e0158c6d32aba99..f0663c691c3fb486f70175f559bb066e8d91b660 100644 (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)
 {
        uint32_t srgb_lbound;
@@ -1953,10 +1953,10 @@ int isis_instance_segment_routing_srgb_pre_validate(
        uint32_t srlb_lbound;
        uint32_t srlb_ubound;
 
-       srgb_lbound = yang_dnode_get_uint32(args->dnode, "./lower-bound");
-       srgb_ubound = yang_dnode_get_uint32(args->dnode, "./upper-bound");
-       srlb_lbound = yang_dnode_get_uint32(args->dnode, "../srlb/lower-bound");
-       srlb_ubound = yang_dnode_get_uint32(args->dnode, "../srlb/upper-bound");
+       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, "./srlb/lower-bound");
+       srlb_ubound = yang_dnode_get_uint32(args->dnode, "./srlb/upper-bound");
 
        /* Check that the block size does not exceed 65535 */
        if ((srgb_ubound - srgb_lbound + 1) > 65535) {
@@ -1966,12 +1966,18 @@ int isis_instance_segment_routing_srgb_pre_validate(
                        srgb_lbound, srgb_ubound);
                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 */
        if (!((srgb_ubound < srlb_lbound) || (srgb_lbound > srlb_ubound))) {
                snprintf(
                        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);
                return NB_ERR_VALIDATION;
        }
@@ -1979,6 +1985,10 @@ int isis_instance_segment_routing_srgb_pre_validate(
        return NB_OK;
 }
 
+/*
+ * XPath: /frr-isisd:isis/instance/segment-routing/label-blocks/srgb
+ */
+
 void isis_instance_segment_routing_srgb_apply_finish(
        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(
        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(
        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(
        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(
        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(
        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 = {};
 
        yang_dnode_get_prefix(&prefix, args->dnode, "./prefix");
-       srgb_lbound = yang_dnode_get_uint32(args->dnode,
-                                           "../../srgb/lower-bound");
-       srgb_ubound = yang_dnode_get_uint32(args->dnode,
-                                           "../../srgb/upper-bound");
+       srgb_lbound = yang_dnode_get_uint32(
+               args->dnode, "../../label-blocks/srgb/lower-bound");
+       srgb_ubound = yang_dnode_get_uint32(
+               args->dnode, "../../label-blocks/srgb/upper-bound");
        sid = yang_dnode_get_uint32(args->dnode, "./sid-value");
        sid_type = yang_dnode_get_enum(args->dnode, "./sid-value-type");
 
index 89fa2018b9545842b8bd228d10222382ff075ce6..21f534641cbf8fab1f32a72043c020a88069cc65 100644 (file)
@@ -1213,14 +1213,14 @@ void isis_sr_area_init(struct isis_area *area)
        /* Pull defaults from the YANG module. */
 #ifndef FABRICD
        srdb->config.enabled = yang_get_default_bool("%s/enabled", ISIS_SR);
-       srdb->config.srgb_lower_bound =
-               yang_get_default_uint32("%s/srgb/lower-bound", ISIS_SR);
-       srdb->config.srgb_upper_bound =
-               yang_get_default_uint32("%s/srgb/upper-bound", ISIS_SR);
-       srdb->config.srlb_lower_bound =
-               yang_get_default_uint32("%s/srlb/lower-bound", ISIS_SR);
-       srdb->config.srlb_upper_bound =
-               yang_get_default_uint32("%s/srlb/upper-bound", ISIS_SR);
+       srdb->config.srgb_lower_bound = yang_get_default_uint32(
+               "%s/label-blocks/srgb/lower-bound", ISIS_SR);
+       srdb->config.srgb_upper_bound = yang_get_default_uint32(
+               "%s/label-blocks/srgb/upper-bound", ISIS_SR);
+       srdb->config.srlb_lower_bound = yang_get_default_uint32(
+               "%s/label-blocks/srlb/lower-bound", ISIS_SR);
+       srdb->config.srlb_upper_bound = yang_get_default_uint32(
+               "%s/label-blocks/srlb/upper-bound", ISIS_SR);
 #else
        srdb->config.enabled = false;
        srdb->config.srgb_lower_bound = SRGB_LOWER_BOUND;
index 8757ab6b8b2e74a014e2170a237febef901fb5ce..7c820c96119939b3dd2b1289019c6ee86f2e6abd 100644 (file)
@@ -60,6 +60,11 @@ module frr-isisd {
      (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
      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 {
     description
       "Group LSP timers in a container so that they can be displayed and
@@ -1491,38 +1496,42 @@ module frr-isisd {
           description
             "Enables segment-routing protocol extensions.";
         }
-        container srgb {
-          description
-            "Global blocks to be advertised.";
-          must "./upper-bound > ./lower-bound";
-          leaf lower-bound {
-              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.";
-          }
-        }
-        container srlb {
+        container label-blocks {
           description
-            "Local blocks to be advertised.";
-          must "./upper-bound > ./lower-bound";
-          leaf lower-bound {
-              type uint32;
-              default "15000";
-              description
-                "Lower value in the label range.";
+            "Local and global label blocks.";
+          container srgb {
+            description
+              "Global blocks to be advertised.";
+            must "./upper-bound > ./lower-bound";
+            leaf lower-bound {
+                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 {
-              type uint32;
-              default "15999";
-              description
-                "Upper value in the label range.";
+          container srlb {
+            description
+              "Local blocks to be advertised.";
+            must "./upper-bound > ./lower-bound";
+            leaf lower-bound {
+                type uint32;
+                default "15000";
+                description
+                  "Lower value in the label range.";
+            }
+            leaf upper-bound {
+                type uint32;
+                default "15999";
+                description
+                  "Upper value in the label range.";
+            }
           }
         }
         container msd {