]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: Hide and deprecate `bgp config-type cisco` command
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 1 Jun 2018 18:56:15 +0000 (14:56 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 1 Jun 2018 19:15:30 +0000 (15:15 -0400)
This command needs to be deprecated.  It sets a small variety
of options via the BGP_OPT_CONFIG_CISCO flag.  Set for removal
in 1 year.

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

index 257adda3f3f228dcffa4d670a473f6ea299e889a..182ca686378301e74b8dc62d42c2d19f86ff0e85 100644 (file)
@@ -799,31 +799,38 @@ DEFUN (no_bgp_multiple_instance,
        return CMD_SUCCESS;
 }
 
-DEFUN (bgp_config_type,
-       bgp_config_type_cmd,
-       "bgp config-type <cisco|zebra>",
-       BGP_STR
-       "Configuration type\n"
-       "cisco\n"
-       "zebra\n")
+#if defined(VERSION_TYPE_DEV) && (CONFDATE > 20190601)
+CPP_NOTICE("bgpd: time to remove deprecated cli bgp config-type cisco")
+CPP_NOTICE("This includes BGP_OPT_CISCO_CONFIG")
+#endif
+DEFUN_HIDDEN (bgp_config_type,
+             bgp_config_type_cmd,
+             "bgp config-type <cisco|zebra>",
+             BGP_STR
+             "Configuration type\n"
+             "cisco\n"
+             "zebra\n")
 {
        int idx = 0;
-       if (argv_find(argv, argc, "cisco", &idx))
+       if (argv_find(argv, argc, "cisco", &idx)) {
+               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 config-type cisco` being used");
                bgp_option_set(BGP_OPT_CONFIG_CISCO);
-       else
+       else
                bgp_option_unset(BGP_OPT_CONFIG_CISCO);
 
        return CMD_SUCCESS;
 }
 
-DEFUN (no_bgp_config_type,
-       no_bgp_config_type_cmd,
-       "no bgp config-type [<cisco|zebra>]",
-       NO_STR
-       BGP_STR
-       "Display configuration type\n"
-       "cisco\n"
-       "zebra\n")
+DEFUN_HIDDEN (no_bgp_config_type,
+             no_bgp_config_type_cmd,
+             "no bgp config-type [<cisco|zebra>]",
+             NO_STR
+             BGP_STR
+             "Display configuration type\n"
+             "cisco\n"
+             "zebra\n")
 {
        bgp_option_unset(BGP_OPT_CONFIG_CISCO);
        return CMD_SUCCESS;