From 7240f56a70867edb0455eaff1c2e6bcf5247513f Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Wed, 16 Oct 2019 16:43:18 +0200 Subject: vty: Print traffic mode during show cs7 instance as Change-Id: Ief6b03f50751b8d8f4021e94d54f079681b64d51 --- src/osmo_ss7_vty.c | 11 ++++++----- tests/vty/ss7_asp_test.vty | 46 +++++++++++++++++++++++----------------------- 2 files changed, 29 insertions(+), 28 deletions(-) diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index fa3d5d1..e11b3bc 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -1040,9 +1040,9 @@ DEFUN(show_cs7_as, show_cs7_as_cmd, return CMD_WARNING; } - vty_out(vty, " Routing Routing Key Cic Cic%s", VTY_NEWLINE); - vty_out(vty, "AS Name State Context Dpc Si Opc Ssn Min Max%s", VTY_NEWLINE); - vty_out(vty, "------------ ------------ ---------- ------------- ---- ------------- --- ----- -----%s", VTY_NEWLINE); + vty_out(vty, " Routing Routing Key Cic Cic Traffic%s", VTY_NEWLINE); + vty_out(vty, "AS Name State Context Dpc Si Opc Ssn Min Max Mode%s", VTY_NEWLINE); + vty_out(vty, "------------ ------------ ---------- ------------- ---- ------------- --- ----- ----- -------%s", VTY_NEWLINE); llist_for_each_entry(as, &inst->as_list, list) { if (filter && !strcmp(filter, "m3ua") && as->cfg.proto != OSMO_SS7_ASP_PROT_M3UA) @@ -1050,10 +1050,11 @@ DEFUN(show_cs7_as, show_cs7_as_cmd, if (filter && !strcmp(filter, "sua") && as->cfg.proto != OSMO_SS7_ASP_PROT_SUA) continue; /* FIXME: active filter */ - vty_out(vty, "%-12s %-12s %-10u %-13s %4s %13s %3s %5s %4s%s", + vty_out(vty, "%-12s %-12s %-10u %-13s %4s %13s %3s %5s %4s %10s%s", as->cfg.name, osmo_fsm_inst_state_name(as->fi), as->cfg.routing_key.context, osmo_ss7_pointcode_print(as->inst, as->cfg.routing_key.pc), - "", "", "", "", "", VTY_NEWLINE); + "", "", "", "", "", osmo_ss7_as_traffic_mode_name(as->cfg.mode), + VTY_NEWLINE); } return CMD_SUCCESS; } diff --git a/tests/vty/ss7_asp_test.vty b/tests/vty/ss7_asp_test.vty index b502367..74dc777 100644 --- a/tests/vty/ss7_asp_test.vty +++ b/tests/vty/ss7_asp_test.vty @@ -267,27 +267,27 @@ ss7_asp_vty_test(config-cs7-as)# no ? asp Specify ASP to be removed from this AS ss7_asp_vty_test(config-cs7-as)# do show cs7 instance 0 as all - Routing Routing Key Cic Cic -AS Name State Context Dpc Si Opc Ssn Min Max ------------- ------------ ---------- ------------- ---- ------------- --- ----- ----- -my-ass AS_DOWN 0 0.0.0 + Routing Routing Key Cic Cic Traffic +AS Name State Context Dpc Si Opc Ssn Min Max Mode +------------ ------------ ---------- ------------- ---- ------------- --- ----- ----- ------- +my-ass AS_DOWN 0 0.0.0 loadshare ss7_asp_vty_test(config-cs7-as)# do show cs7 instance 0 as active - Routing Routing Key Cic Cic -AS Name State Context Dpc Si Opc Ssn Min Max ------------- ------------ ---------- ------------- ---- ------------- --- ----- ----- -my-ass AS_DOWN 0 0.0.0 + Routing Routing Key Cic Cic Traffic +AS Name State Context Dpc Si Opc Ssn Min Max Mode +------------ ------------ ---------- ------------- ---- ------------- --- ----- ----- ------- +my-ass AS_DOWN 0 0.0.0 loadshare ss7_asp_vty_test(config-cs7-as)# do show cs7 instance 0 as sua - Routing Routing Key Cic Cic -AS Name State Context Dpc Si Opc Ssn Min Max ------------- ------------ ---------- ------------- ---- ------------- --- ----- ----- + Routing Routing Key Cic Cic Traffic +AS Name State Context Dpc Si Opc Ssn Min Max Mode +------------ ------------ ---------- ------------- ---- ------------- --- ----- ----- ------- ss7_asp_vty_test(config-cs7-as)# do show cs7 instance 0 as m3ua - Routing Routing Key Cic Cic -AS Name State Context Dpc Si Opc Ssn Min Max ------------- ------------ ---------- ------------- ---- ------------- --- ----- ----- -my-ass AS_DOWN 0 0.0.0 + Routing Routing Key Cic Cic Traffic +AS Name State Context Dpc Si Opc Ssn Min Max Mode +------------ ------------ ---------- ------------- ---- ------------- --- ----- ----- ------- +my-ass AS_DOWN 0 0.0.0 loadshare ss7_asp_vty_test(config-cs7-as)# asp my-asp ss7_asp_vty_test(config-cs7-as)# routing-key 0 3.2.1 @@ -315,10 +315,10 @@ ASP Name AS Name State Type Remote IP Addr:Rmt Port SCTP my-asp ? ASP_DOWN m3ua 127.0.0.200:12345 ss7_asp_vty_test(config)# do show cs7 instance 0 as all - Routing Routing Key Cic Cic -AS Name State Context Dpc Si Opc Ssn Min Max ------------- ------------ ---------- ------------- ---- ------------- --- ----- ----- -my-ass AS_DOWN 0 3.2.1 + Routing Routing Key Cic Cic Traffic +AS Name State Context Dpc Si Opc Ssn Min Max Mode +------------ ------------ ---------- ------------- ---- ------------- --- ----- ----- ------- +my-ass AS_DOWN 0 3.2.1 loadshare @@ -356,10 +356,10 @@ ASP Name AS Name State Type Remote IP Addr:Rmt Port SCTP ------------ ------------ ------------- ---- ----------------------- ---------- ss7_asp_vty_test(config-cs7)# do show cs7 instance 0 as all - Routing Routing Key Cic Cic -AS Name State Context Dpc Si Opc Ssn Min Max ------------- ------------ ---------- ------------- ---- ------------- --- ----- ----- -my-ass AS_DOWN 0 3.2.1 + Routing Routing Key Cic Cic Traffic +AS Name State Context Dpc Si Opc Ssn Min Max Mode +------------ ------------ ---------- ------------- ---- ------------- --- ----- ----- ------- +my-ass AS_DOWN 0 3.2.1 loadshare ss7_asp_vty_test(config-cs7)# do show cs7 instance 0 sccp timers -- cgit v1.2.3