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/.
srs_andre gerrit-no-reply at lists.osmocom.orgsrs_andre has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17582 ) Change subject: ms: add optional param to specify fixed SPGW address assigned to MS ...................................................................... ms: add optional param to specify fixed SPGW address assigned to MS this allows to specify a fixed SPGW address for each subscriber in the HLR. If the param is not provided in the resources config, the default allocation type is used, which is to dynamically allocate an IP in the supported range. Change-Id: Ie6fcd7987dc7bc62a686bee3a10c67e3dd813419 --- M src/osmo_gsm_tester/modem.py M src/osmo_gsm_tester/ms.py M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/srs_epc.py M src/osmo_gsm_tester/templates/srsepc_user_db.csv.tmpl 5 files changed, 15 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/82/17582/1 diff --git a/src/osmo_gsm_tester/modem.py b/src/osmo_gsm_tester/modem.py index f8a9245..a7729a6 100644 --- a/src/osmo_gsm_tester/modem.py +++ b/src/osmo_gsm_tester/modem.py @@ -367,6 +367,7 @@ self.dbg('creating from syspath %s' % self.syspath) self._ki = None self._imsi = None + self._spgw_addr = None self.run_dir = util.Dir(suite_run.get_test_run_dir().new_dir(self.name().strip('/'))) self.sms_received_list = [] self.dbus = ModemDbusInteraction(self.dbuspath) @@ -467,6 +468,14 @@ return self._ki return super().ki() + def set_spgw_addr(self, spgw_addr): + self._spgw_addr = spgw_addr + + def spgw_addr(self): + if self._spgw_addr is not None: + return self._spgw_addr + return 'dynamic' + def features(self): return self._conf.get('features', []) diff --git a/src/osmo_gsm_tester/ms.py b/src/osmo_gsm_tester/ms.py index 222a078..d192727 100644 --- a/src/osmo_gsm_tester/ms.py +++ b/src/osmo_gsm_tester/ms.py @@ -34,6 +34,9 @@ def ki(self): return self._conf.get('ki') + def spgw_addr(self): + return self._conf.get('spgw_addr', None) + def auth_algo(self): return self._conf.get('auth_algo', None) diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 757a9c5..32da088 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -100,6 +100,7 @@ 'modem[].imsi': schema.IMSI, 'modem[].ki': schema.KI, 'modem[].auth_algo': schema.AUTH_ALGO, + 'modem[].spgw_addr': schema.IPV4, 'modem[].remote_user': schema.STR, 'modem[].addr': schema.IPV4, 'modem[].ciphers[]': schema.CIPHER, diff --git a/src/osmo_gsm_tester/srs_epc.py b/src/osmo_gsm_tester/srs_epc.py index 0d020bc..a346a86 100644 --- a/src/osmo_gsm_tester/srs_epc.py +++ b/src/osmo_gsm_tester/srs_epc.py @@ -199,7 +199,7 @@ raise log.Error("Auth algo %r selected but no KI specified" % algo_str) subscriber_id = len(self.subscriber_list) # list index - self.subscriber_list.append({'id': subscriber_id, 'imsi': modem.imsi(), 'msisdn': msisdn, 'auth_algo': algo_str, 'ki': modem.ki(), 'opc': None}) + self.subscriber_list.append({'id': subscriber_id, 'imsi': modem.imsi(), 'msisdn': msisdn, 'auth_algo': algo_str, 'ki': modem.ki(), 'opc': None, 'spgw_addr': modem.spgw_addr()}) self.log('Add subscriber', msisdn=msisdn, imsi=modem.imsi(), subscriber_id=subscriber_id, algo_str=algo_str) diff --git a/src/osmo_gsm_tester/templates/srsepc_user_db.csv.tmpl b/src/osmo_gsm_tester/templates/srsepc_user_db.csv.tmpl index c213e53..8dd6257 100644 --- a/src/osmo_gsm_tester/templates/srsepc_user_db.csv.tmpl +++ b/src/osmo_gsm_tester/templates/srsepc_user_db.csv.tmpl @@ -20,5 +20,5 @@ #ue2,mil,001010123456780,00112233445566778899aabbccddeeff,opc,63bfa50ee6523365ff14c1f45f88737d,8000,000000001234,7,dynamic #ue1,xor,001010123456789,00112233445566778899aabbccddeeff,opc,63bfa50ee6523365ff14c1f45f88737d,9001,000000001255,7,dynamic %for sub in epc.hss.subscribers: -ogt${sub.id},${sub.auth_algo},${sub.imsi},${sub.ki},opc,63bfa50ee6523365ff14c1f45f88737d,8000,000000001234,${sub.qci},dynamic +ogt${sub.id},${sub.auth_algo},${sub.imsi},${sub.ki},opc,63bfa50ee6523365ff14c1f45f88737d,8000,000000001234,${sub.qci},${sub.spgw_addr} %endfor -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17582 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: Ie6fcd7987dc7bc62a686bee3a10c67e3dd813419 Gerrit-Change-Number: 17582 Gerrit-PatchSet: 1 Gerrit-Owner: srs_andre <andre at softwareradiosystems.com> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200324/a69ae28c/attachment.htm>