Skip to content

Comments

isisd: configure SRGB and SRLB together#8085

Merged
odd22 merged 1 commit intomasterfrom
unknown repository
Mar 12, 2021
Merged

isisd: configure SRGB and SRLB together#8085
odd22 merged 1 commit intomasterfrom
unknown repository

Conversation

@edipascale
Copy link
Contributor

@edipascale edipascale commented Feb 15, 2021

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.
Add a new command 'segment-routing label-blocks global XX XX local XX XX' and use this to show the configuration, so that we can process both changes in a single sweep. The existing individual commands are left there both for backwards compatibility and as utility to set/unset a single range.

Signed-off-by: Emanuele Di Pascale emanuele@voltanet.io

Copy link

@polychaeta polychaeta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution to FRR!

Click for style suggestions

To apply these suggestions:

curl -s https://gist.githubusercontent.com/polychaeta/f634a512a4f2545edaedba645832fc70/raw/4689a4508f4c6b759118983357eb5cc8ae47b76a/cr_8085_1613402230.diff | git apply

diff --git a/isisd/isis_cli.c b/isisd/isis_cli.c
index 74d8e30f2..77b0e5abf 100644
--- a/isisd/isis_cli.c
+++ b/isisd/isis_cli.c
@@ -1598,52 +1598,57 @@ void cli_show_isis_sr_enabled(struct vty *vty, struct lyd_node *dnode,
 /*
  * XPath: /frr-isisd:isis/instance/segment-routing/label-block
  */
-DEFPY_YANG (isis_sr_label_blocks_range,
-       isis_sr_label_blocks_range_cmd,
-       "segment-routing label-blocks global (16-1048575)$srgb_lbound (16-1048575)$srgb_ubound local (16-1048575)$srlb_lbound (16-1048575)$srlb_ubound",
-       SR_STR
-       "Set both Local and Global label blocks\n"
-       "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"
-       )
+DEFPY_YANG(
+	isis_sr_label_blocks_range, isis_sr_label_blocks_range_cmd,
+	"segment-routing label-blocks global (16-1048575)$srgb_lbound (16-1048575)$srgb_ubound local (16-1048575)$srlb_lbound (16-1048575)$srlb_ubound",
+	SR_STR
+	"Set both Local and Global label blocks\n"
+	"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/label-blocks/srgb/lower-bound",
+	nb_cli_enqueue_change(vty,
+			      "./segment-routing/label-blocks/srgb/lower-bound",
 			      NB_OP_MODIFY, srgb_lbound_str);
-	nb_cli_enqueue_change(vty, "./segment-routing/label-blocks/srgb/upper-bound",
+	nb_cli_enqueue_change(vty,
+			      "./segment-routing/label-blocks/srgb/upper-bound",
 			      NB_OP_MODIFY, srgb_ubound_str);
-	nb_cli_enqueue_change(vty, "./segment-routing/label-blocks/srlb/lower-bound",
+	nb_cli_enqueue_change(vty,
+			      "./segment-routing/label-blocks/srlb/lower-bound",
 			      NB_OP_MODIFY, srlb_lbound_str);
-	nb_cli_enqueue_change(vty, "./segment-routing/label-blocks/srlb/upper-bound",
+	nb_cli_enqueue_change(vty,
+			      "./segment-routing/label-blocks/srlb/upper-bound",
 			      NB_OP_MODIFY, srlb_ubound_str);
 
 	return nb_cli_apply_changes(vty, NULL);
 }
 
-DEFPY_YANG (no_isis_sr_label_blocks_range,
-       no_isis_sr_label_blocks_range_cmd,
-       "no segment-routing label-blocks [global (16-1048575) (16-1048575) local (16-1048575) (16-1048575)]",
-       NO_STR
-       SR_STR
-       "Set both Local and Global label blocks\n"
-       "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"
-       )
+DEFPY_YANG(
+	no_isis_sr_label_blocks_range, no_isis_sr_label_blocks_range_cmd,
+	"no segment-routing label-blocks [global (16-1048575) (16-1048575) local (16-1048575) (16-1048575)]",
+	NO_STR SR_STR
+	"Set both Local and Global label blocks\n"
+	"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/label-blocks/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_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_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_cli_enqueue_change(vty,
+			      "./segment-routing/label-blocks/srlb/upper-bound",
 			      NB_OP_MODIFY, NULL);
 
 	return nb_cli_apply_changes(vty, NULL);
@@ -1651,7 +1656,7 @@ DEFPY_YANG (no_isis_sr_label_blocks_range,
 
 
 void cli_show_isis_label_blocks(struct vty *vty, struct lyd_node *dnode,
-			bool show_defaults)
+				bool show_defaults)
 {
 	vty_out(vty, " segment-routing label-blocks global %s %s local %s %s\n",
 		yang_dnode_get_string(dnode, "./srgb/lower-bound"),
@@ -1671,9 +1676,11 @@ DEFPY_YANG (isis_sr_global_block_label_range,
        "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/label-blocks/srgb/lower-bound",
+	nb_cli_enqueue_change(vty,
+			      "./segment-routing/label-blocks/srgb/lower-bound",
 			      NB_OP_MODIFY, lower_bound_str);
-	nb_cli_enqueue_change(vty, "./segment-routing/label-blocks/srgb/upper-bound",
+	nb_cli_enqueue_change(vty,
+			      "./segment-routing/label-blocks/srgb/upper-bound",
 			      NB_OP_MODIFY, upper_bound_str);
 
 	return nb_cli_apply_changes(vty, NULL);
@@ -1688,9 +1695,11 @@ DEFPY_YANG (no_isis_sr_global_block_label_range,
        "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/label-blocks/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_cli_enqueue_change(vty,
+			      "./segment-routing/label-blocks/srgb/upper-bound",
 			      NB_OP_MODIFY, NULL);
 
 	return nb_cli_apply_changes(vty, NULL);
@@ -1707,9 +1716,11 @@ DEFPY_YANG (isis_sr_local_block_label_range,
        "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/label-blocks/srlb/lower-bound",
+	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/label-blocks/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);
@@ -1724,9 +1735,11 @@ DEFPY_YANG (no_isis_sr_local_block_label_range,
        "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/label-blocks/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/label-blocks/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);
diff --git a/isisd/isis_nb.h b/isisd/isis_nb.h
index 6d2906c78..591324307 100644
--- a/isisd/isis_nb.h
+++ b/isisd/isis_nb.h
@@ -482,7 +482,7 @@ void cli_show_isis_mt_ipv6_dstsrc(struct vty *vty, struct lyd_node *dnode,
 void cli_show_isis_sr_enabled(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);
+				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,
diff --git a/isisd/isis_nb_config.c b/isisd/isis_nb_config.c
index ee0dbd032..d9be4fd82 100644
--- a/isisd/isis_nb_config.c
+++ b/isisd/isis_nb_config.c
@@ -2294,10 +2294,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,
-					    "../../label-blocks/srgb/lower-bound");
-	srgb_ubound = yang_dnode_get_uint32(args->dnode,
-					    "../../label-blocks/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");
 
diff --git a/isisd/isis_sr.c b/isisd/isis_sr.c
index 9fe851795..21f534641 100644
--- a/isisd/isis_sr.c
+++ b/isisd/isis_sr.c
@@ -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/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);
+	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;

If you are a new contributor to FRR, please see our contributing guidelines.

After making changes, you do not need to create a new PR. You should perform an amend or interactive rebase followed by a force push.

@LabN-CI
Copy link
Collaborator

LabN-CI commented Feb 15, 2021

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result SUCCESS git merge/8085 9cf4b0d
Date 02/15/2021
Start 11:20:27
Finish 11:59:59
Run-Time 39:32
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2021-02-15-11:20:27.txt
Log autoscript-2021-02-15-11:21:34.log.bz2
Memory 493 499 426

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Feb 15, 2021

Continuous Integration Result: SUCCESSFUL

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17154/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Warnings Generated during build:

Checkout code: Successful with additional warnings
Report for isis_cli.c | 32 issues
===============================================
< WARNING: line over 80 characters
< #1616: FILE: /tmp/f1-7592/isis_cli.c:1616:
< WARNING: line over 80 characters
< #1618: FILE: /tmp/f1-7592/isis_cli.c:1618:
< WARNING: line over 80 characters
< #1620: FILE: /tmp/f1-7592/isis_cli.c:1620:
< WARNING: line over 80 characters
< #1640: FILE: /tmp/f1-7592/isis_cli.c:1640:
< WARNING: line over 80 characters
< #1642: FILE: /tmp/f1-7592/isis_cli.c:1642:
< WARNING: line over 80 characters
< #1644: FILE: /tmp/f1-7592/isis_cli.c:1644:
< WARNING: line over 80 characters
< #1646: FILE: /tmp/f1-7592/isis_cli.c:1646:
< WARNING: line over 80 characters
< #1674: FILE: /tmp/f1-7592/isis_cli.c:1674:
< WARNING: line over 80 characters
< #1676: FILE: /tmp/f1-7592/isis_cli.c:1676:
< WARNING: line over 80 characters
< #1691: FILE: /tmp/f1-7592/isis_cli.c:1691:
< WARNING: line over 80 characters
< #1693: FILE: /tmp/f1-7592/isis_cli.c:1693:
< WARNING: line over 80 characters
< #1710: FILE: /tmp/f1-7592/isis_cli.c:1710:
< WARNING: line over 80 characters
< #1712: FILE: /tmp/f1-7592/isis_cli.c:1712:
< WARNING: line over 80 characters
< #1727: FILE: /tmp/f1-7592/isis_cli.c:1727:
< WARNING: line over 80 characters
< #1729: FILE: /tmp/f1-7592/isis_cli.c:1729:
< WARNING: line over 80 characters
< #2043: FILE: /tmp/f1-7592/isis_cli.c:2043:
Report for isis_nb.c | 6 issues
===============================================
< WARNING: line over 80 characters
< #579: FILE: /tmp/f1-7592/isis_nb.c:579:
< WARNING: line over 80 characters
< #584: FILE: /tmp/f1-7592/isis_nb.c:584:
< WARNING: line over 80 characters
< #586: FILE: /tmp/f1-7592/isis_nb.c:586:
Report for isis_sr.c | 8 issues
===============================================
< WARNING: line over 80 characters
< #1217: FILE: /tmp/f1-7592/isis_sr.c:1217:
< WARNING: line over 80 characters
< #1219: FILE: /tmp/f1-7592/isis_sr.c:1219:
< WARNING: line over 80 characters
< #1221: FILE: /tmp/f1-7592/isis_sr.c:1221:
< WARNING: line over 80 characters
< #1223: FILE: /tmp/f1-7592/isis_sr.c:1223:

Warnings Generated during build:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17154/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.5.0.3 (current is 4.3.0)
W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.5.0.3 (current is 4.3.0)
W: frr-doc: changelog-file-missing-explicit-entry 7.5-0 -> 7.7-dev-20210215-02-g63d1f5a77-0 (missing) -> 7.7-dev-20210215-02-g63d1f5a77-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 7.5-0 -> 7.7-dev-20210215-02-g63d1f5a77-0 (missing) -> 7.7-dev-20210215-02-g63d1f5a77-0~deb10u1
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 7.5-0 -> 7.7-dev-20210215-02-g63d1f5a77-0 (missing) -> 7.7-dev-20210215-02-g63d1f5a77-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 7.5-0 -> 7.7-dev-20210215-02-g63d1f5a77-0 (missing) -> 7.7-dev-20210215-02-g63d1f5a77-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 7.5-0 -> 7.7-dev-20210215-02-g63d1f5a77-0 (missing) -> 7.7-dev-20210215-02-g63d1f5a77-0~deb10u1

CLANG Static Analyzer Summary

  • Github Pull Request 8085, comparing to Git base SHA f736532

No Changes in Static Analysis warnings compared to base

5 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17154/artifact/shared/static_analysis/index.html

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Feb 15, 2021

Continuous Integration Result: SUCCESSFUL

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17155/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Warnings Generated during build:

Checkout code: Successful with additional warnings
Report for isis_nb.c | 6 issues
===============================================
< WARNING: line over 80 characters
< #579: FILE: /tmp/f1-10879/isis_nb.c:579:
< WARNING: line over 80 characters
< #584: FILE: /tmp/f1-10879/isis_nb.c:584:
< WARNING: line over 80 characters
< #586: FILE: /tmp/f1-10879/isis_nb.c:586:

Warnings Generated during build:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17155/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.5.0.3 (current is 4.3.0)
W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.5.0.3 (current is 4.3.0)
W: frr-snmp: changelog-file-missing-explicit-entry 7.5-0 -> 7.7-dev-20210215-02-g9cf4b0d8c-0 (missing) -> 7.7-dev-20210215-02-g9cf4b0d8c-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 7.5-0 -> 7.7-dev-20210215-02-g9cf4b0d8c-0 (missing) -> 7.7-dev-20210215-02-g9cf4b0d8c-0~deb10u1
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 7.5-0 -> 7.7-dev-20210215-02-g9cf4b0d8c-0 (missing) -> 7.7-dev-20210215-02-g9cf4b0d8c-0~deb10u1
W: frr-doc: changelog-file-missing-explicit-entry 7.5-0 -> 7.7-dev-20210215-02-g9cf4b0d8c-0 (missing) -> 7.7-dev-20210215-02-g9cf4b0d8c-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 7.5-0 -> 7.7-dev-20210215-02-g9cf4b0d8c-0 (missing) -> 7.7-dev-20210215-02-g9cf4b0d8c-0~deb10u1

CLANG Static Analyzer Summary

  • Github Pull Request 8085, comparing to Git base SHA f736532

No Changes in Static Analysis warnings compared to base

5 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17155/artifact/shared/static_analysis/index.html

@donaldsharp
Copy link
Member

please update the documentation

@donaldsharp
Copy link
Member

do we need a deprecation cycle for the old style commands? Will they auto-generate the new commands?

Copy link
Member

@riw777 riw777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes look good ... I do wonder about the existing commands, however. I would think it would be better to auto-generate the new way of entering the command, leaving the old way in place only for changes to existing ranges, rather than for configuring new ranges. Maybe the existing commands should be left in as hidden for backward compatibility, with a plan to deprecate them in a year for configuring ranges, converting them over so they can only be used if ranges already exist, or something like this?

@edipascale
Copy link
Contributor Author

OK, I am updating the docs and adding a deprecation notice to the old commands, as requested. As for hiding them, what is the equivalent of DEFPY_HIDDEN for commands that use DEFPY_YANG? Couldn't find anything in the docs

@polychaeta polychaeta added documentation tests Topotests, make check, etc labels Feb 19, 2021
Copy link

@polychaeta polychaeta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution to FRR!

Click for style suggestions

To apply these suggestions:

curl -s https://gist.githubusercontent.com/polychaeta/a25a927cafc3c439111e7375952eb1fd/raw/30c4a99562131a35734a123d5dd49209df799fc6/cr_8085_1613744659.diff | git apply

diff --git a/isisd/isis_cli.c b/isisd/isis_cli.c
index f404772bd..dfda31ce7 100644
--- a/isisd/isis_cli.c
+++ b/isisd/isis_cli.c
@@ -1677,7 +1677,7 @@ DEFPY_HIDDEN(
 	"The upper bound of the block (block size may not exceed 65535)\n")
 {
 #if CONFDATE > 20220217
-CPP_NOTICE("Use of global-block is deprecated, please use label-blocks")
+	CPP_NOTICE("Use of global-block is deprecated, please use label-blocks")
 #endif
 	nb_cli_enqueue_change(vty,
 			      "./segment-routing/label-blocks/srgb/lower-bound",
@@ -1719,7 +1719,7 @@ DEFPY_HIDDEN(
 	"The upper bound of the block (block size may not exceed 65535)\n")
 {
 #if CONFDATE > 20220217
-CPP_NOTICE("Use of local-block is deprecated, please use label-blocks")
+	CPP_NOTICE("Use of local-block is deprecated, please use label-blocks")
 #endif
 	nb_cli_enqueue_change(vty,
 			      "./segment-routing/label-blocks/srlb/lower-bound",
diff --git a/tests/topotests/isis-sr-topo1/test_isis_sr_topo1.py b/tests/topotests/isis-sr-topo1/test_isis_sr_topo1.py
index 22d1acf8d..cf476713d 100644
--- a/tests/topotests/isis-sr-topo1/test_isis_sr_topo1.py
+++ b/tests/topotests/isis-sr-topo1/test_isis_sr_topo1.py
@@ -134,6 +134,7 @@ class TemplateTopo(Topo):
         switch.add_link(tgen.gears["rt5"], nodeif="eth-rt6")
         switch.add_link(tgen.gears["rt6"], nodeif="eth-rt5")
 
+
 @pytest.mark.isis
 def setup_module(mod):
     "Sets up the pytest environment"
diff --git a/tests/topotests/isis-tilfa-topo1/test_isis_tilfa_topo1.py b/tests/topotests/isis-tilfa-topo1/test_isis_tilfa_topo1.py
index 982e33d30..06b477c5d 100755
--- a/tests/topotests/isis-tilfa-topo1/test_isis_tilfa_topo1.py
+++ b/tests/topotests/isis-tilfa-topo1/test_isis_tilfa_topo1.py
@@ -177,6 +177,7 @@ class TemplateTopo(Topo):
                         f_in.close()
                         f_out.close()
 
+
 @pytest.mark.isis
 def setup_module(mod):
     "Sets up the pytest environment"

If you are a new contributor to FRR, please see our contributing guidelines.

After making changes, you do not need to create a new PR. You should perform an amend or interactive rebase followed by a force push.

@LabN-CI
Copy link
Collaborator

LabN-CI commented Feb 19, 2021

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result SUCCESS git merge/8085 a131727
Date 02/19/2021
Start 10:20:12
Finish 10:59:46
Run-Time 39:34
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2021-02-19-10:20:12.txt
Log autoscript-2021-02-19-10:21:17.log.bz2
Memory 492 490 427

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Feb 19, 2021

Continuous Integration Result: SUCCESSFUL

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17219/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Warnings Generated during build:

Checkout code: Successful with additional warnings
Report for isis_nb.c | 6 issues
===============================================
< WARNING: line over 80 characters
< #579: FILE: /tmp/f1-347/isis_nb.c:579:
< WARNING: line over 80 characters
< #584: FILE: /tmp/f1-347/isis_nb.c:584:
< WARNING: line over 80 characters
< #586: FILE: /tmp/f1-347/isis_nb.c:586:

Warnings Generated during build:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17219/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.5.0.3 (current is 4.3.0)
W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.5.0.3 (current is 4.3.0)
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 7.5-0 -> 7.7-dev-20210219-01-ga1317276f-0 (missing) -> 7.7-dev-20210219-01-ga1317276f-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 7.5-0 -> 7.7-dev-20210219-01-ga1317276f-0 (missing) -> 7.7-dev-20210219-01-ga1317276f-0~deb10u1
W: frr-doc: changelog-file-missing-explicit-entry 7.5-0 -> 7.7-dev-20210219-01-ga1317276f-0 (missing) -> 7.7-dev-20210219-01-ga1317276f-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 7.5-0 -> 7.7-dev-20210219-01-ga1317276f-0 (missing) -> 7.7-dev-20210219-01-ga1317276f-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 7.5-0 -> 7.7-dev-20210219-01-ga1317276f-0 (missing) -> 7.7-dev-20210219-01-ga1317276f-0~deb10u1

CLANG Static Analyzer Summary

  • Github Pull Request 8085, comparing to Git base SHA dc86ef7

No Changes in Static Analysis warnings compared to base

1 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17219/artifact/shared/static_analysis/index.html

@riw777
Copy link
Member

riw777 commented Feb 23, 2021

OK, I am updating the docs and adding a deprecation notice to the old commands, as requested. As for hiding them, what is the equivalent of DEFPY_HIDDEN for commands that use DEFPY_YANG? Couldn't find anything in the docs

I think that's correct ... you might want to pm @qlyoung on slack to verify

@donaldsharp donaldsharp self-requested a review February 23, 2021 16:37
Copy link
Member

@odd22 odd22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch and the new combine command. But, I would prefer that the local part of the combined command remains optional. So that, you could configure only the global block without the need to set the local part to default value.

In addition, keeping the same syntax could avoid to mark the command deprecated for the global block. Only the local block command should be mark as deprecated.

@edipascale
Copy link
Contributor Author

Thanks for the patch and the new combine command. But, I would prefer that the local part of the combined command remains optional. So that, you could configure only the global block without the need to set the local part to default value.

Sure, that can be done

In addition, keeping the same syntax could avoid to mark the command deprecated for the global block. Only the local block command should be mark as deprecated.

I'm not sure I follow, it should be the other way around, right? Making the local block part optional in the combined command means that one can configure just the SRGB or both, so I think it would make more sense to deprecate the global-block command and leave the local-block one if you just wanted to configure that.

In any case the request to deprecate them came from @riw777 - I'm fine with either solution, just want to make sure everyone's on board

@odd22
Copy link
Member

odd22 commented Mar 2, 2021

I'm not sure I follow, it should be the other way around, right? Making the local block part optional in the combined command means that one can configure just the SRGB or both, so I think it would make more sense to deprecate the global-block command and leave the local-block one if you just wanted to configure that.

Sorry, I was not clear enough. I would suggest to modify the command like this:

segment-routing global-block (16-1048575) (16-1048575) [local-block (16-1048575) (16-1048575)]

So, the old segment-routing global-block ... CLI remains unchanged and continue to work. And only the segment-routing local-block ... CLI should be marked as deprecated.

I hope I have been clearer

@riw777
Copy link
Member

riw777 commented Mar 9, 2021

I'm not sure I follow, it should be the other way around, right? Making the local block part optional in the combined command means that one can configure just the SRGB or both, so I think it would make more sense to deprecate the global-block command and leave the local-block one if you just wanted to configure that.

Sorry, I was not clear enough. I would suggest to modify the command like this:

segment-routing global-block (16-1048575) (16-1048575) [local-block (16-1048575) (16-1048575)]

So, the old segment-routing global-block ... CLI remains unchanged and continue to work. And only the segment-routing local-block ... CLI should be marked as deprecated.

I hope I have been clearer

This works ... and it's a good solution.

@polychaeta polychaeta added the yang label Mar 9, 2021
@LabN-CI
Copy link
Collaborator

LabN-CI commented Mar 9, 2021

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result SUCCESS git merge/8085 150750f
Date 03/09/2021
Start 14:10:01
Finish 14:49:06
Run-Time 39:05
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2021-03-09-14:10:01.txt
Log autoscript-2021-03-09-14:11:06.log.bz2
Memory 500 500 430

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Mar 9, 2021

Continuous Integration Result: SUCCESSFUL

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17545/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Warnings Generated during build:

Checkout code: Successful with additional warnings
Report for isis_nb.c | 2 issues
===============================================
< WARNING: line over 80 characters
< #583: FILE: /tmp/f1-30262/isis_nb.c:583:

Copy link
Member

@odd22 odd22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New command is fine for me.

I have just 2 questions about the management of the srlb with this new command.

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>
@LabN-CI
Copy link
Collaborator

LabN-CI commented Mar 10, 2021

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/8085 01d4314
Date 03/10/2021
Start 05:05:44
Finish 05:44:53
Run-Time 39:09
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2021-03-10-05:05:44.txt
Log autoscript-2021-03-10-05:06:47.log.bz2
Memory 506 506 430

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17556/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Warnings Generated during build:

Checkout code: Successful with additional warnings
Report for isis_nb.c | 2 issues
===============================================
< WARNING: line over 80 characters
< #583: FILE: /tmp/f1-7919/isis_nb.c:583:

@odd22 odd22 merged commit e81f3c6 into FRRouting:master Mar 12, 2021
@edipascale edipascale deleted the isis_label_blocks branch March 12, 2021 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation isis tests Topotests, make check, etc yang

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants