nitb_netreg_mass: Allow a suite to configure num subscriber

Remove hardcoded configuration and replace it with a reservation in
the suite.

Change-Id: Ic9fd560c2924731e4fd6eea5aaf3ad565cb4ef52
diff --git a/src/osmo_ms_driver/__main__.py b/src/osmo_ms_driver/__main__.py
index 7e1afa8..24acd61 100644
--- a/src/osmo_ms_driver/__main__.py
+++ b/src/osmo_ms_driver/__main__.py
@@ -21,7 +21,9 @@
 from .location_update_test import MassUpdateLocationTest
 from .cdf import cdfs
 from .starter import BinaryOptions
+from .test_support import imsi_ki_gen
 from osmo_gsm_tester import log, util
+from osmo_gsm_tester import ms
 
 # System modules
 from datetime import timedelta
@@ -84,7 +86,19 @@
 
     # Just a single test for now.
     options = BinaryOptions("virtphy", "mobile", os.environ)
-    test = MassUpdateLocationTest("lu_test", options, args.num_ms, cdf, ev_server, tmp_dir)
+    test = MassUpdateLocationTest("lu_test", options, cdf, ev_server, tmp_dir)
+
+    # Add subscribers to the test.
+    imsi_gen = imsi_ki_gen()
+    for i in range(0, args.num_ms):
+        imsi, ki = next(imsi_gen)
+        conf = {
+            'imsi': imsi,
+            'ki': ki,
+            'auth_algo': 'comp128v1',
+        }
+        test.subscriber_add(ms.MS("ms_%d" % i, conf))
+
     atexit.register(test.stop_all)
 
     # Run until everything has been launched