From 6a7a83c7184d862227a50745db579bac727bda0e Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Tue, 17 Sep 2024 23:04:30 +0300 Subject: [PATCH] bgpd: Remove deprecated RPKI command `rpki cache ...` Signed-off-by: Donatas Abraitis --- bgpd/bgp_rpki.c | 77 ------------------------------------------------- 1 file changed, 77 deletions(-) diff --git a/bgpd/bgp_rpki.c b/bgpd/bgp_rpki.c index f9cbf240312e..347c5d02a1e1 100644 --- a/bgpd/bgp_rpki.c +++ b/bgpd/bgp_rpki.c @@ -1920,81 +1920,6 @@ DEFUN (no_rpki_retry_interval, return CMD_SUCCESS; } -#if CONFDATE > 20240916 -CPP_NOTICE("Remove rpki_cache_cmd") -#endif -DEFPY(rpki_cache, rpki_cache_cmd, - "rpki cache [source $bindaddr] preference (1-255)", - RPKI_OUTPUT_STRING - "Install a cache server to current group\n" - "IP address of cache server\n" - "Hostname of cache server\n" - "TCP port number\n" - "SSH port number\n" - "SSH user name\n" - "Path to own SSH private key\n" - "Path to the known hosts file\n" - "Configure source IP address of RPKI connection\n" - "Define a Source IP Address\n" - "Preference of the cache server\n" - "Preference value\n") -{ - int return_value; - struct listnode *cache_node; - struct cache *current_cache; - struct rpki_vrf *rpki_vrf; - bool init; - - if (vty->node == RPKI_VRF_NODE) - rpki_vrf = VTY_GET_CONTEXT_SUB(rpki_vrf); - else - rpki_vrf = VTY_GET_CONTEXT(rpki_vrf); - - if (!rpki_vrf) - return CMD_WARNING_CONFIG_FAILED; - - if (!rpki_vrf || !rpki_vrf->cache_list) - return CMD_WARNING; - - init = !!list_isempty(rpki_vrf->cache_list); - - for (ALL_LIST_ELEMENTS_RO(rpki_vrf->cache_list, cache_node, - current_cache)) { - if (current_cache->preference == preference) { - vty_out(vty, - "Cache with preference %ld is already configured\n", - preference); - return CMD_WARNING; - } - } - - // use ssh connection - if (ssh_uname) { -#if defined(FOUND_SSH) - return_value = add_ssh_cache(rpki_vrf, cache, sshport, ssh_uname, - ssh_privkey, known_hosts_path, - preference, bindaddr_str); -#else - return_value = SUCCESS; - vty_out(vty, - "ssh sockets are not supported. Please recompile rtrlib and frr with ssh support. If you want to use it\n"); -#endif - } else { // use tcp connection - return_value = add_tcp_cache(rpki_vrf, cache, tcpport, - preference, bindaddr_str); - } - - if (return_value == ERROR) { - vty_out(vty, "Could not create new rpki cache\n"); - return CMD_WARNING; - } - - if (init) - start(rpki_vrf); - - return CMD_SUCCESS; -} - DEFPY(rpki_cache_tcp, rpki_cache_tcp_cmd, "rpki cache tcp $cache TCPPORT [source $bindaddr] preference (1-255)", RPKI_OUTPUT_STRING @@ -2820,7 +2745,6 @@ static void install_cli_commands(void) /* Install rpki cache commands */ install_element(RPKI_NODE, &rpki_cache_tcp_cmd); install_element(RPKI_NODE, &rpki_cache_ssh_cmd); - install_element(RPKI_NODE, &rpki_cache_cmd); install_element(RPKI_NODE, &no_rpki_cache_cmd); /* RPKI_VRF_NODE commands */ @@ -2844,7 +2768,6 @@ static void install_cli_commands(void) /* Install rpki cache commands */ install_element(RPKI_VRF_NODE, &rpki_cache_tcp_cmd); install_element(RPKI_VRF_NODE, &rpki_cache_ssh_cmd); - install_element(RPKI_VRF_NODE, &rpki_cache_cmd); install_element(RPKI_VRF_NODE, &no_rpki_cache_cmd); /* Install show commands */