laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/21472 )


Change subject: gprs_ns2_vty: Re-introduce a 'show ns' command
......................................................................

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
---
M src/gb/gprs_ns2_vty.c
1 file changed, 12 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/72/21472/1

diff --git a/src/gb/gprs_ns2_vty.c b/src/gb/gprs_ns2_vty.c
index 97becf6..8b8a999 100644
--- a/src/gb/gprs_ns2_vty.c
+++ b/src/gb/gprs_ns2_vty.c
@@ -324,6 +324,17 @@
        }
 }

+/* 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 @@
                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);

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/21472
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I7571c6d82f7a712803d09d165abb6c7cb5ae2e5c
Gerrit-Change-Number: 21472
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <lafo...@osmocom.org>
Gerrit-MessageType: newchange

Reply via email to