summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-10-16 16:43:18 +0200
committerlaforge <laforge@osmocom.org>2019-10-23 21:25:33 +0000
commit7240f56a70867edb0455eaff1c2e6bcf5247513f (patch)
treee756fa2ade9342784a96f2b18d1bb8a707a21a57
parentf4f4e8c310d63e746bec97e978c374bc58fd678a (diff)
vty: Print traffic mode during show cs7 instance as
-rw-r--r--src/osmo_ss7_vty.c11
-rw-r--r--tests/vty/ss7_asp_test.vty46
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