laforge has submitted this change. ( 
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(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



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 @@
                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 @@
                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 @@
   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 @@
 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 @@
 ------------  ------------  -------------  ---- ----------------------- 
----------

 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: 6
Gerrit-Owner: pespin <pes...@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <lafo...@osmocom.org>
Gerrit-Reviewer: pespin <pes...@sysmocom.de>
Gerrit-MessageType: merged

Reply via email to