]> git.proxmox.com Git - mirror_frr.git/commitdiff
ospfd: Remove local-block deprecated command
authorDonatas Abraitis <donatas@opensourcerouting.org>
Thu, 2 Jun 2022 10:45:57 +0000 (13:45 +0300)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Tue, 7 Jun 2022 13:11:46 +0000 (16:11 +0300)
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
doc/developer/ospf-sr.rst
doc/user/ospfd.rst
ospfd/ospf_sr.c
tests/topotests/ospf_sr_te_topo1/rt1/ospfd.conf
tests/topotests/ospf_sr_te_topo1/rt2/ospfd.conf
tests/topotests/ospf_sr_te_topo1/rt3/ospfd.conf
tests/topotests/ospf_sr_te_topo1/rt4/ospfd.conf
tests/topotests/ospf_sr_te_topo1/rt5/ospfd.conf
tests/topotests/ospf_sr_te_topo1/rt6/ospfd.conf
tests/topotests/ospf_te_topo1/r4/ospfd.conf
tests/topotests/ospf_te_topo1/test_ospf_te_topo1.py

index 263db9dfb91923b32a8e4cde4a6ad02765440dc3..1c164433dcb5b2d2c3594d43fa3061c1954e981f 100644 (file)
@@ -310,8 +310,7 @@ Routing.
     ospf router-id 192.168.1.11
     capability opaque
     segment-routing on
-    segment-routing global-block 10000 19999
-    segment-routing local-block 5000 5999
+    segment-routing global-block 10000 19999 local-block 5000 5999
     segment-routing node-msd 8
     segment-routing prefix 192.168.1.11/32 index 1100
 
index d1a0bb6f7bffcb9acfa2b7c8d1658b55b7d2ac02..bac382faad2f7e2870a53781d16cee0a3e97befc 100644 (file)
@@ -985,12 +985,6 @@ dataplane.
    Block, i.e. the label range used for Adjacency SID. The negative version
    of the command always unsets both ranges.
 
-.. 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. This command is deprecated
-   in favor of the combined command above.
-
 .. clicmd:: segment-routing node-msd (1-16)
 
    Fix the Maximum Stack Depth supported by the router. The value depend of the
index 8fa5ce77bb19ee4f42723b37bb62e016a1220f12..2c7c80686cfd6bacf1b21627616f3a7490544648 100644 (file)
@@ -2302,84 +2302,6 @@ DEFUN(no_sr_global_label_range, no_sr_global_label_range_cmd,
                return CMD_SUCCESS;
 }
 
-#if CONFDATE > 20220528
-CPP_NOTICE(
-       "Use of the segment-routing local-block command is deprecated, use the combined global-block command instead")
-#endif
-
-DEFUN_HIDDEN(sr_local_label_range, sr_local_label_range_cmd,
-            "segment-routing local-block (16-1048575) (16-1048575)",
-            SR_STR
-            "Segment Routing Local Block label range\n"
-            "Lower-bound range in decimal (16-1048575)\n"
-            "Upper-bound range in decimal (16-1048575)\n")
-{
-       uint32_t upper;
-       uint32_t lower;
-       uint32_t srgb_upper;
-       int idx_low = 2;
-       int idx_up = 3;
-
-       /* Get lower and upper bound */
-       lower = strtoul(argv[idx_low]->arg, NULL, 10);
-       upper = strtoul(argv[idx_up]->arg, NULL, 10);
-
-       /* check correctness of SRLB */
-       if (!sr_range_is_valid(lower, upper, MIN_SRLB_SIZE)) {
-               vty_out(vty, "Invalid SRLB range\n");
-               return CMD_WARNING_CONFIG_FAILED;
-       }
-
-       /* Check if values have changed */
-       if ((OspfSR.srlb.start == lower)
-           && (OspfSR.srlb.end == upper))
-               return CMD_SUCCESS;
-
-       /* Validate SRLB against SRGB */
-       srgb_upper = OspfSR.srgb.start + OspfSR.srgb.size - 1;
-
-       if (ranges_overlap(OspfSR.srgb.start, srgb_upper, lower, upper)) {
-               vty_out(vty,
-                       "New SR Local Block (%u/%u) conflicts with Global Block (%u/%u)\n",
-                       lower, upper, OspfSR.srgb.start, srgb_upper);
-               return CMD_WARNING_CONFIG_FAILED;
-       }
-
-       if (update_sr_blocks(OspfSR.srgb.start, srgb_upper, lower, upper) < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-       else
-               return CMD_SUCCESS;
-}
-
-DEFUN_HIDDEN(no_sr_local_label_range, no_sr_local_label_range_cmd,
-            "no segment-routing local-block [(16-1048575) (16-1048575)]",
-            NO_STR SR_STR
-            "Segment Routing Local Block label range\n"
-            "Lower-bound range in decimal (16-1048575)\n"
-            "Upper-bound range in decimal (16-1048575)\n")
-{
-
-       uint32_t srgb_end;
-
-       /* Validate SRLB against SRGB */
-       srgb_end = OspfSR.srgb.start + OspfSR.srgb.size - 1;
-       if (ranges_overlap(OspfSR.srgb.start, srgb_end, DEFAULT_SRLB_LABEL,
-                          DEFAULT_SRLB_END)) {
-               vty_out(vty,
-                       "New SR Local Block (%u/%u) conflicts with Global Block (%u/%u)\n",
-                       DEFAULT_SRLB_LABEL, DEFAULT_SRLB_END, OspfSR.srgb.start,
-                       srgb_end);
-               return CMD_WARNING_CONFIG_FAILED;
-       }
-
-       if (update_sr_blocks(OspfSR.srgb.start, srgb_end, DEFAULT_SRLB_LABEL,
-                            DEFAULT_SRLB_END)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-       else
-               return CMD_SUCCESS;
-}
-
 DEFUN (sr_node_msd,
        sr_node_msd_cmd,
        "segment-routing node-msd (1-16)",
@@ -3047,8 +2969,6 @@ void ospf_sr_register_vty(void)
        install_element(OSPF_NODE, &no_ospf_sr_enable_cmd);
        install_element(OSPF_NODE, &sr_global_label_range_cmd);
        install_element(OSPF_NODE, &no_sr_global_label_range_cmd);
-       install_element(OSPF_NODE, &sr_local_label_range_cmd);
-       install_element(OSPF_NODE, &no_sr_local_label_range_cmd);
        install_element(OSPF_NODE, &sr_node_msd_cmd);
        install_element(OSPF_NODE, &no_sr_node_msd_cmd);
        install_element(OSPF_NODE, &sr_prefix_sid_cmd);
index a440fa6fdf7c3dc6777fa65f967486b6e9bb69f5..064a4bf2863b387843bb43cb0f2f531150d2ed9b 100644 (file)
@@ -30,7 +30,6 @@ router ospf
  passive-interface lo
  segment-routing on
  segment-routing global-block 16000 23999
- !segment-routing local-block 15000 15999
  segment-routing node-msd 8
  segment-routing prefix 1.1.1.1/32 index 10
 !
index 7bec98cd765f56379810b87bf632ce08441a3c2d..65b20f0e63f2280c6dca6dd9475cdd29f46ea92f 100644 (file)
@@ -41,7 +41,6 @@ router ospf
  passive-interface lo
  segment-routing on
  segment-routing global-block 16000 23999
- !segment-routing local-block 15000 15999
  segment-routing node-msd 8
  segment-routing prefix 2.2.2.2/32 index 20
 !
index 40b85c4601f9e471e26439cacdb9692a30359b3d..5be0c49a85771dab06b73d1be15c776e3d313778 100644 (file)
@@ -40,7 +40,6 @@ router ospf
  router-info area 0.0.0.0
  segment-routing on
  segment-routing global-block 16000 23999
- !segment-routing local-block 15000 15999
  segment-routing node-msd 8
  segment-routing prefix 3.3.3.3/32 index 30
 !
index 4d3380d107f4f1b0b68e15f1eff4c88d2507aa78..7cdf032eaa6a2fcbdbe0a29db201f4fe50d3dac2 100644 (file)
@@ -47,7 +47,6 @@ router ospf
  passive-interface lo
  segment-routing on
  segment-routing global-block 16000 23999
- !segment-routing local-block 15000 15999
  segment-routing node-msd 8
  segment-routing prefix 4.4.4.4/32 index 40
 !
index b111ce588adcf9a17e040611538ae0ead1fa1642..8f71cda443da99abd299205c598e6b20fc9753db 100644 (file)
@@ -47,7 +47,6 @@ router ospf
  passive-interface lo
  segment-routing on
  segment-routing global-block 16000 23999
-! segment-routing local-block 15000 15999
  segment-routing node-msd 8
  segment-routing prefix 5.5.5.5/32 index 50
 !
index f0c5a9c0ba80db800ce71739927491313b86d4cf..20c89757a839d1eafd4c7a357ccb09a7ded8ad4b 100644 (file)
@@ -35,7 +35,6 @@ router ospf
  passive-interface lo
  segment-routing on
  segment-routing global-block 16000 23999
-! segment-routing local-block 15000 15999
  segment-routing node-msd 8
  segment-routing prefix 6.6.6.6/32 index 60
 !
index e454673153e9c14ab31fab2d7aa8c5e2de67d118..cd508017d3b42015a62dc1070439bcc6066814e7 100644 (file)
@@ -15,8 +15,7 @@ router ospf
   mpls-te on
   mpls-te router-address 10.0.255.4
   segment-routing on
-  segment-routing local-block 5000 5999
-  segment-routing global-block 10000 19999
+  segment-routing global-block 10000 19999 local-block 5000 5999
   segment-routing node-msd 12
   segment-routing prefix 10.0.255.4/32 index 400 no-php-flag
 !
index 7de23dc34e7397714594ab215af001898cd9c4e8..699cdc90546bcc8de6464b0ca78133bc6782a768 100644 (file)
@@ -224,7 +224,7 @@ def test_step4():
         'vtysh -c "conf t" -c "router ospf" -c "segment-routing node-msd 16"'
     )
     tgen.net["r2"].cmd(
-        'vtysh -c "conf t" -c "router ospf" -c "segment-routing local-block 5000 6999"'
+        'vtysh -c "conf t" -c "router ospf" -c "segment-routing global-block 16000 23999 local-block 5000 6999"'
     )
     tgen.net["r2"].cmd(
         'vtysh -c "conf t" -c "router ospf" -c "segment-routing prefix 10.0.255.2/32 index 20 explicit-null"'