osmo-gsm-tester[master]: Use own format to specify encryption algorithm

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

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Wed Sep 6 16:16:23 UTC 2017


Patch Set 1:

(2 comments)

https://gerrit.osmocom.org/#/c/3815/1/src/osmo_gsm_tester/osmo_bsc.py
File src/osmo_gsm_tester/osmo_bsc.py:

Line 89:             encryption_vty = util.encryption2osmovty(values['bsc']['net']['encryption'])
> hmm, I didn't think of this, now we need to translate the value kept in the
I must admit I hated you a bit while reworking this to use "_" instead of " " :-P
I had to add an extra commit + add lines like this one, it took me a while. I didn't think about the extra work initially, same as you.

This sort of thing can indeed re-appear with other values, or if other implementations / hw are included which use a different configuration format / fields. For some cases it can be easily done during rendering of mode, for other probably we need to keep some logic here. But I don't think this is an issue, as anyway the python object is bound to the config template anyway...

What we need for sure is to maintain a unified format to specify in resources.conf/defaults.conf, as well as the one used through public APIs accessible from tests, as well as properties which are shared between objects through public interfaces. Once inside an object, like inside configure(), it's not an issue to convert stuff or do some tricks there.


I think we should merge this and if we see it's an issue later, fix it. Let's not lose time reworking commits with this things if we can avoid it.


https://gerrit.osmocom.org/#/c/3815/1/src/osmo_gsm_tester/util.py
File src/osmo_gsm_tester/util.py:

Line 319:     return 'a5 ' + val[3:]
> well, what if I feed 'a5_potato' :)
In that case you really well deserve getting an error somewhere else. I can introduce a PotatoException and test that one specifically if you want :-)

It's not that important, values coming from config files are checked before during schema validation.
The assert in there is a small check to understand what do you need to pass to the function if you use that inside the code of osmo-gsm-tester, or if using it quickly in a wrong way (passing some other object or strange value), to get a quick report.


-- 
To view, visit https://gerrit.osmocom.org/3815
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I5265cc9990dd5e99dba1f6262b3a8c597a3e958d
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-HasComments: Yes



More information about the gerrit-log mailing list