Change in libosmo-sccp[master]: vty: Print traffic mode during show cs7 instance as

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Wed Oct 16 14:57:19 UTC 2019


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15801 )


Change subject: vty: Print traffic mode during show cs7 instance as
......................................................................

vty: Print traffic mode during show cs7 instance as

Change-Id: Ief6b03f50751b8d8f4021e94d54f079681b64d51
---
M src/osmo_ss7_vty.c
M tests/vty/ss7_asp_test.vty
2 files changed, 29 insertions(+), 28 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/01/15801/1

diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c
index e7b137b..bc0a0cb 100644
--- a/src/osmo_ss7_vty.c
+++ b/src/osmo_ss7_vty.c
@@ -1007,9 +1007,9 @@
 		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)
@@ -1017,10 +1017,11 @@
 		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 2bf7993..146c34b 100644
--- a/tests/vty/ss7_asp_test.vty
+++ b/tests/vty/ss7_asp_test.vty
@@ -266,27 +266,27 @@
   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
@@ -314,10 +314,10 @@
 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
 
 
 
@@ -355,10 +355,10 @@
 ------------  ------------  -------------  ---- ----------------------- ----------
 
 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

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

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: Ief6b03f50751b8d8f4021e94d54f079681b64d51
Gerrit-Change-Number: 15801
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191016/5ea9785c/attachment.htm>


More information about the gerrit-log mailing list