aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc/osmo_bsc_vty.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2018-04-04 18:00:48 +0000
committerNeels Hofmeyr <neels@hofmeyr.de>2018-04-05 01:04:18 +0200
commit03ddccc13257dcf46392ff383d9b27fa32bcf60c (patch)
tree3ccbf59cff9110524763cd046e85891f3b92e122 /src/osmo-bsc/osmo_bsc_vty.c
parent5a3b8ae4ca82f8fede597bbdf5372b8b1e797e5b (diff)
vty: re-add 'timeout-ping' and 'timeout-pong' as dummy commands
Legacy VTY commands were removed in commit c74a5616bf1c77ac40ddd92f4927dca7a1b45bc8 == I5cf3fec31cc774c902f3cfe6d16fb85ef301694a Removing the dead VTY commands currently breaks our ttcn3-bts-test and is likely to create problems with users of osmo-bsc, when their config osmo-bsc stops working with a mere upgrade. Instead, add deprecated dummy commands that don't do anything, to not break existing configs. Catch all of these legacy commands: timeout-ping <number> timeout-pong <number> timeout-ping advanced no timeout-ping no timeout-ping advanced by defining timeout-ping ARG timeout-pong ARG no timeout-ping [ARG] I verified manually that starting osmo-bsc with all the abovementioned VTY commands in the config file works (and produces the deprecation messages). Change-Id: I95a5bad1ade66ded849cfc20bebb7fc522aecc38
Diffstat (limited to 'src/osmo-bsc/osmo_bsc_vty.c')
-rw-r--r--src/osmo-bsc/osmo_bsc_vty.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c
index 7968e2166..e6ae0784e 100644
--- a/src/osmo-bsc/osmo_bsc_vty.c
+++ b/src/osmo-bsc/osmo_bsc_vty.c
@@ -884,6 +884,22 @@ DEFUN(show_subscr_all,
return CMD_SUCCESS;
}
+#define LEGACY_STR "This command has no effect, it is kept to support legacy config files\n"
+
+DEFUN_DEPRECATED(cfg_net_msc_ping_time, cfg_net_msc_ping_time_cmd,
+ "timeout-ping ARG", LEGACY_STR "-\n")
+{
+ vty_out(vty, "%% timeout-ping / timeout-pong config is deprecated and has no effect%s",
+ VTY_NEWLINE);
+ return CMD_WARNING;
+}
+
+ALIAS_DEPRECATED(cfg_net_msc_ping_time, cfg_net_msc_no_ping_time_cmd,
+ "no timeout-ping [ARG]", NO_STR LEGACY_STR "-\n");
+
+ALIAS_DEPRECATED(cfg_net_msc_ping_time, cfg_net_msc_pong_time_cmd,
+ "timeout-pong ARG", LEGACY_STR "-\n");
+
int bsc_vty_init_extra(void)
{
struct gsm_network *net = bsc_gsmnet;
@@ -933,6 +949,11 @@ int bsc_vty_init_extra(void)
install_element(MSC_NODE, &cfg_msc_cs7_bsc_addr_cmd);
install_element(MSC_NODE, &cfg_msc_cs7_msc_addr_cmd);
+ /* Deprecated: ping time config, kept to support legacy config files. */
+ install_element(MSC_NODE, &cfg_net_msc_no_ping_time_cmd);
+ install_element(MSC_NODE, &cfg_net_msc_ping_time_cmd);
+ install_element(MSC_NODE, &cfg_net_msc_pong_time_cmd);
+
install_element_ve(&show_statistics_cmd);
install_element_ve(&show_mscs_cmd);
install_element_ve(&show_pos_cmd);