Change in osmo-msc[master]: VTY: add osmo_tdef introspection and configuration commands

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

neels gerrit-no-reply at lists.osmocom.org
Thu Jan 23 21:24:00 UTC 2020


neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/16932 )

Change subject: VTY: add osmo_tdef introspection and configuration commands
......................................................................


Patch Set 1:

X timers: IMHO we should even use unique X timer numbers across osmocom programs. I think we need a wiki page like https://osmocom.org/projects/cellular-infrastructure/wiki/Port_Numbers but for X timers. So far I introduced new timers without much thought, but I think that was a probably not doing it properly. https://osmocom.org/issues/4376

tdef_groups: as in the TODO comment, it seems that this patch rewrites exactly what osmo_tdef_group does. The test libosmocore/tests/tdef/tdef_vty_test_config_root is an example for using osmo_tdef_group.

You can look at the vty commands it provides in
tdef_vty_test_config_root.vty
or try it live with

▶ ./tdef_vty_test_config_root 
<0000> ../../../../src/libosmocore/src/vty/telnet_interface.c:104 Available via telnet 127.0.0.1 42042

▶ telnet localhost 42042

tdef_vty_test> list
...
  show timer [(tea|test|software)] [TNNNN]

tdef_vty_test> enable
tdef_vty_test# configure terminal
tdef_vty_test(config)# timer test         
test: T1 = 100 s	Testing a hundred seconds (default: 100 s)
test: T2 = 100 ms	Testing a hundred milliseconds (default: 100 ms)
test: T3 = 100 m	Testing a hundred minutes (default: 100 m)
test: T4 = 100	Testing a hundred potatoes (default: 100)
test: T2147483647 = 4294967295 m	Very large (default: 4294967295 m)
test: X23 = 239471 s	Negative T number (default: 239471 s)
test: T30 = 50 s	Testing range min (default: 50 s, range: [20 .. inf])
test: T31 = 50 s	Testing range max (default: 50 s, range: [0 .. 52])
test: T32 = 50 s	Testing range both (default: 50 s, range: [20 .. 52])


Seems to me all that it takes is
- create a timer group struct array with mgw, mncc, sccp, geran, utran and sgs in it,
- run osmo_tdef_vty_groups_init(),
- call osmo_tdef_vty_groups_write()
all done.

You won't have an additional 'ran' keyword in there, but I think we can also just drop it, or you could prefix each name like ran-geran, ran-utran, ran-sgs if you really need to keep it.

Of course the tdef_vty API allows for flexibility like in this patch on purpose, but we'd save a bunch of code dup using the group API directly.


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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I6024c104b6101666c8aa1108a043910eb75db9a5
Gerrit-Change-Number: 16932
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Thu, 23 Jan 2020 21:24:00 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200123/0f48e689/attachment.htm>


More information about the gerrit-log mailing list