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
Review at https://gerrit.osmocom.org/3593
hlr: Implement subscriber_delete API
Change-Id: Iefb30ad552929386743d936bf629fe7a760a4713
---
M src/osmo_gsm_tester/osmo_hlr.py
1 file changed, 13 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/93/3593/1
diff --git a/src/osmo_gsm_tester/osmo_hlr.py b/src/osmo_gsm_tester/osmo_hlr.py
index 16548ad..08de07c 100644
--- a/src/osmo_gsm_tester/osmo_hlr.py
+++ b/src/osmo_gsm_tester/osmo_hlr.py
@@ -129,6 +129,19 @@
conn.close()
return subscriber_id
+ def subscriber_delete(self, modem):
+ self.log('Add subscriber', imsi=modem.imsi())
+ conn = sqlite3.connect(self.db_file)
+ try:
+ c = conn.cursor()
+ c.execute('select id from subscriber where imsi = ?', (modem.imsi(),))
+ subscriber_id = c.fetchone()[0]
+ c.execute('delete from subscriber where id = ?', (subscriber_id,))
+ c.execute('delete from auc_2g where subscriber_id = ?', (subscriber_id,))
+ conn.commit()
+ finally:
+ conn.close()
+
def conf_for_msc(self):
return dict(hlr=dict(ip_address=self.ip_address))
--
To view, visit https://gerrit.osmocom.org/3593
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iefb30ad552929386743d936bf629fe7a760a4713
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>