Change in osmo-hlr[master]: Add vty command to show summary of all or filtered subscribers

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/.

laforge gerrit-no-reply at lists.osmocom.org
Wed Jan 20 16:20:03 UTC 2021


laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/22311 )

Change subject: Add vty command to show summary of all or filtered subscribers
......................................................................


Patch Set 7:

(7 comments)

https://gerrit.osmocom.org/c/osmo-hlr/+/22311/7/src/db_hlr.c 
File src/db_hlr.c:

https://gerrit.osmocom.org/c/osmo-hlr/+/22311/7/src/db_hlr.c@629 
PS7, Line 629:  
there is no  vty argument in below function


https://gerrit.osmocom.org/c/osmo-hlr/+/22311/7/src/db_hlr.c@633 
PS7, Line 633:  
it's now called get_cb? 'data' is missing.


https://gerrit.osmocom.org/c/osmo-hlr/+/22311/7/src/hlr_vty_subscr.c 
File src/hlr_vty_subscr.c:

https://gerrit.osmocom.org/c/osmo-hlr/+/22311/7/src/hlr_vty_subscr.c@232 
PS7, Line 232: vty_out(vty, "-----  ------------  ----------------  ----------------  -----");
             : 		if (show_ls)
             : 			vty_out(vty, "  ------------");
             : 		vty_out_newline(vty);
             : 		vty_out(vty, "ID     MSISDN        IMSI              IMEI              NAM");
             : 		if (show_ls)
             : 			vty_out(vty, "    LAST SEEN");
             : 		vty_out_newline(vty);
thisi s a repetition of the above.  I suggest you factor that "print header" into a separate function and call it from a few lines above and from here.  This way we don't have to edit two places if the table format ever changes.


https://gerrit.osmocom.org/c/osmo-hlr/+/22311/7/src/hlr_vty_subscr.c@251 
PS7, Line 251: SUBSCR_SHOW_HELP
you could add the SHOW_STR inside the definition of SUBSCR_SHOW_HELP, so you don't have to repeat it at every DEFUN below.  However, you may intentionally not have wanted that, as the number of tokens/strings is harder to see?


https://gerrit.osmocom.org/c/osmo-hlr/+/22311/7/src/hlr_vty_subscr.c@305 
PS7, Line 305: SHOW_STR SUBSCRS_SHOW_HELP "Show summary of subscribers with filter\n"
             :       "Filter by IMSI\n" "Filter by MSISDN\n" "String to match in msisdn or imsi\n")
it's odd that the command syntax is hidden in a #define whle the help strings are not.  So it's hard to match both when looking at the code. Either use #defines for both and put them at the same location in the file, or list them explicitly here.


https://gerrit.osmocom.org/c/osmo-hlr/+/22311/7/src/hlr_vty_subscr.c@320 
PS7, Line 320:      
Somehow the number of help strings doesn't match the number of tokens.  You need 6 strings, I see 5 and some don't make sense.


https://gerrit.osmocom.org/c/osmo-hlr/+/22311/7/src/hlr_vty_subscr.c@323 
PS7, Line 323: last seen
if you do not expect other tokens after "last" (like "last created" or whatever), then please change to a single tokenm "last-seen".



-- 
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/22311
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: I7f0573381a6d0d13841ac6d42d50f0e8389decf4
Gerrit-Change-Number: 22311
Gerrit-PatchSet: 7
Gerrit-Owner: keith <keith at rhizomatica.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: fixeria <vyanitskiy at sysmocom.de>
Gerrit-CC: laforge <laforge at osmocom.org>
Gerrit-CC: neels <nhofmeyr at sysmocom.de>
Gerrit-Comment-Date: Wed, 20 Jan 2021 16:20:03 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210120/b2574b70/attachment.htm>


More information about the gerrit-log mailing list