]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: Deprecate and hide the `no bgp multiple-instance` command
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 1 Jun 2018 19:03:57 +0000 (15:03 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 1 Jun 2018 19:15:30 +0000 (15:15 -0400)
This command needs to be deprecated.  It partially implements
a refusal to create multiple instances.  If you do not need
multiple instances, just don't create them in the cli instead.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd/bgp_vty.c

index 182ca686378301e74b8dc62d42c2d19f86ff0e85..79f11e68bdbece5e043132cb69be2a87aadddf30 100644 (file)
@@ -771,18 +771,21 @@ static void bgp_clear_star_soft_out(struct vty *vty, const char *name)
 #endif
 
 /* BGP global configuration.  */
-
-DEFUN (bgp_multiple_instance_func,
-       bgp_multiple_instance_cmd,
-       "bgp multiple-instance",
-       BGP_STR
-       "Enable bgp multiple instance\n")
+#if defined(VERSION_TYPE_DEV) && (CONFDATE > 20190601)
+CPP_NOTICE("bgpd: time to remove deprecated bgp multiple-instance")
+CPP_NOTICE("This includes BGP_OPT_MULTIPLE_INSTANCE")
+#endif
+DEFUN_HIDDEN (bgp_multiple_instance_func,
+             bgp_multiple_instance_cmd,
+             "bgp multiple-instance",
+             BGP_STR
+             "Enable bgp multiple instance\n")
 {
        bgp_option_set(BGP_OPT_MULTIPLE_INSTANCE);
        return CMD_SUCCESS;
 }
 
-DEFUN (no_bgp_multiple_instance,
+DEFUN_HIDDEN (no_bgp_multiple_instance,
        no_bgp_multiple_instance_cmd,
        "no bgp multiple-instance",
        NO_STR
@@ -791,6 +794,9 @@ DEFUN (no_bgp_multiple_instance,
 {
        int ret;
 
+       vty_out(vty, "This config option is deprecated, and is scheduled for removal.\n");
+       vty_out(vty, "if you are using this please let the developers know\n");
+       zlog_warn("Deprecated option: `bgp multiple-instance` being used");
        ret = bgp_option_unset(BGP_OPT_MULTIPLE_INSTANCE);
        if (ret < 0) {
                vty_out(vty, "%% There are more than two BGP instances\n");