From b3cb0c14bb85e1f961b3777d025f6d040d7303d2 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Wed, 16 Jun 2021 17:55:44 +0200 Subject: osmo_ss7_vty: allow users to inspect routes also in ASP role When libosmo-sigtran runs in ASP role, then the entire routing table introspection (show) and routing table configuration VTY commands are not present. Editing the routing table manually only makes sense in SG role, but it is still useful to be able to inspect the routing table in ASP and SG mode. Change-Id: Ieaef4f0344b5b77ff5047013e9da1e938004e97c Related: SYS#5392 --- src/osmo_ss7_vty.c | 3 ++- tests/vty/ss7_asp_test.vty | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index bd15070..3b39a61 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -2159,6 +2159,8 @@ static void vty_init_shared(void *ctx) install_lib_element(L_CS7_AS_NODE, &as_pc_override_cmd); install_lib_element(L_CS7_AS_NODE, &as_pc_patch_sccp_cmd); + install_lib_element_ve(&show_cs7_route_cmd); + vty_init_addr(); } @@ -2174,7 +2176,6 @@ void osmo_ss7_vty_init_sg(void *ctx) vty_init_shared(ctx); install_node(&rtable_node, NULL); - install_lib_element_ve(&show_cs7_route_cmd); install_lib_element(L_CS7_NODE, &cs7_route_table_cmd); install_lib_element(L_CS7_RTABLE_NODE, &cfg_description_cmd); install_lib_element(L_CS7_RTABLE_NODE, &cs7_rt_upd_cmd); diff --git a/tests/vty/ss7_asp_test.vty b/tests/vty/ss7_asp_test.vty index fd54642..bfbb77e 100644 --- a/tests/vty/ss7_asp_test.vty +++ b/tests/vty/ss7_asp_test.vty @@ -5,6 +5,7 @@ ss7_asp_vty_test> list show cs7 config show cs7 instance <0-15> asp show cs7 instance <0-15> as (active|all|m3ua|sua) + show cs7 instance <0-15> route show cs7 instance <0-15> sccp addressbook show cs7 instance <0-15> sccp users show cs7 instance <0-15> sccp ssn <0-65535> @@ -20,6 +21,7 @@ ss7_asp_vty_test# list show cs7 config show cs7 instance <0-15> asp show cs7 instance <0-15> as (active|all|m3ua|sua) + show cs7 instance <0-15> route show cs7 instance <0-15> sccp addressbook show cs7 instance <0-15> sccp users show cs7 instance <0-15> sccp ssn <0-65535> @@ -49,6 +51,7 @@ ss7_asp_vty_test# show cs7 instance 0 ? users User Table asp Application Server Process (ASP) as Application Server (AS) + route Routing Table sccp Signalling Connection Control Part ss7_asp_vty_test# show cs7 instance 0 as ? -- cgit v1.2.3