diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-06-04 18:05:56 +0200 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-06-25 18:38:48 +0200 |
commit | f07e1c4fe4d1999a9c7f38a79c8e41dfb08314b1 (patch) | |
tree | a83745d911d0c9ce2c94cd246f4e8b26eb171aba /bgpd/bgp_vty.c | |
parent | *: remove deprecated 'log trap' commands (diff) | |
download | frr-f07e1c4fe4d1999a9c7f38a79c8e41dfb08314b1.tar.xz frr-f07e1c4fe4d1999a9c7f38a79c8e41dfb08314b1.zip |
bgpd: remove DEFUN_DEPRECATED usage
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_vty.c')
-rw-r--r-- | bgpd/bgp_vty.c | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index d98104a9f..7b1147b61 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -2009,27 +2009,19 @@ DEFUN (no_bgp_fast_external_failover, CPP_NOTICE("bgpd: remove deprecated '[no] bgp enforce-first-as' commands") #endif -DEFUN_DEPRECATED (bgp_enforce_first_as, - bgp_enforce_first_as_cmd, - "bgp enforce-first-as", - BGP_STR - "Enforce the first AS for EBGP routes\n") +DEFUN_HIDDEN (bgp_enforce_first_as, + bgp_enforce_first_as_cmd, + "[no] bgp enforce-first-as", + NO_STR + BGP_STR + "Enforce the first AS for EBGP routes\n") { VTY_DECLVAR_CONTEXT(bgp, bgp); - bgp_flag_set(bgp, BGP_FLAG_ENFORCE_FIRST_AS); - - return CMD_SUCCESS; -} -DEFUN_DEPRECATED (no_bgp_enforce_first_as, - no_bgp_enforce_first_as_cmd, - "no bgp enforce-first-as", - NO_STR - BGP_STR - "Enforce the first AS for EBGP routes\n") -{ - VTY_DECLVAR_CONTEXT(bgp, bgp); - bgp_flag_unset(bgp, BGP_FLAG_ENFORCE_FIRST_AS); + if (strmatch(argv[0]->text, "no")) + bgp_flag_unset(bgp, BGP_FLAG_ENFORCE_FIRST_AS); + else + bgp_flag_set(bgp, BGP_FLAG_ENFORCE_FIRST_AS); return CMD_SUCCESS; } @@ -12439,7 +12431,6 @@ void bgp_vty_init(void) /* "bgp enforce-first-as" commands */ install_element(BGP_NODE, &bgp_enforce_first_as_cmd); - install_element(BGP_NODE, &no_bgp_enforce_first_as_cmd); /* "bgp bestpath compare-routerid" commands */ install_element(BGP_NODE, &bgp_bestpath_compare_router_id_cmd); |