Change in osmo-gsm-tester[master]: Keep track of all mobiles and copy them to unstarted later

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

Harald Welte gerrit-no-reply at lists.osmocom.org
Sat Sep 15 09:27:22 UTC 2018


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/10684 )

Change subject: Keep track of all mobiles and copy them to unstarted later
......................................................................

Keep track of all mobiles and copy them to unstarted later

At all times have a list of mobiles that were created. Make a shallow
copy and use it as the unstarted list.

This will be used by the upcoming gsm tester integration to build a list
of subscribers to be added into the HLR/AuC database.

Change-Id: Id72b7ce8821cf53ac0d5e4a141b9a2b66242e2a3
---
M src/osmo_ms_driver/location_update_test.py
1 file changed, 7 insertions(+), 2 deletions(-)

Approvals:
  Pau Espin Pedrol: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/osmo_ms_driver/location_update_test.py b/src/osmo_ms_driver/location_update_test.py
index 2c59d97..e83d91b 100644
--- a/src/osmo_ms_driver/location_update_test.py
+++ b/src/osmo_ms_driver/location_update_test.py
@@ -16,7 +16,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-
+from copy import copy
 from osmo_gsm_tester import log
 from .starter import OsmoVirtPhy, OsmoMobile
 from .test_support import imsi_ki_gen, Results
@@ -62,6 +62,7 @@
         self._cdf = cdf_function
         self._cdf.set_target(number_of_ms)
         self._unstarted = []
+        self._mobiles = []
         self._phys = []
         self._results = {}
         imsi_gen = imsi_ki_gen()
@@ -78,9 +79,13 @@
                                 phy.phy_filename(),
                                 event_server.server_path())
             self._results[ms_name] = LUResult(ms_name)
-            self._unstarted.append(launcher)
+            self._mobiles.append(launcher)
         self._event_server = event_server
         self._event_server.register(self.handle_msg)
+        self._unstarted = copy(self._mobiles)
+
+    def mobiles(self):
+        return self._mobiles
 
     def pre_launch(self, loop):
         """

-- 
To view, visit https://gerrit.osmocom.org/10684
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Id72b7ce8821cf53ac0d5e4a141b9a2b66242e2a3
Gerrit-Change-Number: 10684
Gerrit-PatchSet: 4
Gerrit-Owner: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180915/00a1e3a2/attachment.htm>


More information about the gerrit-log mailing list