Change in osmo-gsm-tester[master]: ms_srs: refactor UE state getter functions

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
Thu May 28 11:27:03 UTC 2020


pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18535 )

Change subject: ms_srs: refactor UE state getter functions
......................................................................


Patch Set 1: Code-Review-1

(3 comments)

https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18535/1/src/osmo_gsm_tester/obj/ms_srs.py 
File src/osmo_gsm_tester/obj/ms_srs.py:

https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18535/1/src/osmo_gsm_tester/obj/ms_srs.py@314 
PS1, Line 314:         return pos_connected > pos_released
heh nice way of checking order.


https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18535/1/src/osmo_gsm_tester/obj/ms_srs.py@319 
PS1, Line 319:     def is_emm_registered(self):
Please keep the is_connected() and is_attached() APIs to it also matches the ones in other MS types (like the ofono one), so that we have a common interface as much as possible. The idea is to control a device/UE in a simialr way no matter if it's 2g/3G/4G so we can reuse as much as possible.

I'm fine with renaming "is_connected" to "is_registered" if you want, but then do it in all suite-tests and MS object classes.

We have 2 APIs because in 2G there's difference between being CircuitSwitch attached and PacketSwitch Attached (in our osmocom implementations you first get CS registered, then request PS attachment). In your case if it doesn't make sense, return the same in both.

(I know they should be mrked as abstract methods in the abstract class and they aren't, but we should at some point :P)


https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18535/1/src/osmo_gsm_tester/obj/ms_srs.py@322 
PS1, Line 322:     def get_ipv4_addr(self):
Please add this API as abstract method in superclass ms.py, and leave it unimplemented in ms_ofono.py:
raise log.Error('API not implemented!')

BTW, let's better use same API for both IPv4 and IPv6 addr:
def get_assigned_addr(self, ipv6=False):
    if ipv6:
      .... return ipv6 addr or raise not implemented
    else:
      .... return ipv4



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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: I6cd057e34b4df6a1a73695355dd6406d7e039546
Gerrit-Change-Number: 18535
Gerrit-PatchSet: 1
Gerrit-Owner: srs_andre <andre at softwareradiosystems.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Thu, 28 May 2020 11:27:03 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200528/9e806965/attachment.htm>


More information about the gerrit-log mailing list