From 25ee755cc7885d8f4418d8b6a4883d76731e9b6c Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Wed, 2 Dec 2020 22:14:00 +0100 Subject: gprs_ns2_vty: Re-introduce a 'show ns' command In I157467d6a74d6109bc23521c978c5aac6d29fe50 we introduced a split between 'show ns entities' and 'show ns binds'. However, there is at least one test case in osmo-sgsn.git which depends on 'show ns' working. So let's re-add it as a backwards compatible, hidden command. Change-Id: I7571c6d82f7a712803d09d165abb6c7cb5ae2e5c --- src/gb/gprs_ns2_vty.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/gb/gprs_ns2_vty.c') diff --git a/src/gb/gprs_ns2_vty.c b/src/gb/gprs_ns2_vty.c index 97becf64..8b8a9998 100644 --- a/src/gb/gprs_ns2_vty.c +++ b/src/gb/gprs_ns2_vty.c @@ -324,6 +324,17 @@ static void dump_ns_entities(struct vty *vty, const struct gprs_ns2_inst *nsi, b } } +/* Backwards compatibility, among other things for the TestVTYGbproxy which expects + * 'show ns' to output something about binds */ +DEFUN_HIDDEN(show_ns, show_ns_cmd, "show ns", + SHOW_STR SHOW_NS_STR) +{ + dump_ns_entities(vty, vty_nsi, false, false); + dump_ns_bind(vty, vty_nsi, false); + return CMD_SUCCESS; +} + + DEFUN(show_ns_binds, show_ns_binds_cmd, "show ns binds [stats]", SHOW_STR SHOW_NS_STR "Display information about the NS protocol binds\n" @@ -802,6 +813,7 @@ int gprs_ns2_vty_init(struct gprs_ns2_inst *nsi, return 0; vty_elements_installed = true; + install_lib_element_ve(&show_ns_cmd); install_lib_element_ve(&show_ns_binds_cmd); install_lib_element_ve(&show_ns_entities_cmd); install_lib_element_ve(&show_ns_pers_cmd); -- cgit v1.2.3