Change in osmo-gsm-tester[master]: resource: Add a mobile resource for the virtual test

Holger Freyther gerrit-no-reply at lists.osmocom.org
Sun Mar 10 19:57:59 UTC 2019


Holger Freyther has submitted this change and it was merged. ( https://gerrit.osmocom.org/13041 )

Change subject: resource: Add a mobile resource for the virtual test
......................................................................

resource: Add a mobile resource for the virtual test

Add a new resource and make a reservation in the suite.

Change-Id: Ic26aa63cad62323bb85f952640672eb28af0eadc
---
M example/resources.conf.virtual
M src/osmo_gsm_tester/ms.py
A src/osmo_gsm_tester/ms_osmo_mobile.py
M src/osmo_gsm_tester/resource.py
M suites/nitb_netreg_mass/suite.conf
5 files changed, 58 insertions(+), 1 deletion(-)

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



diff --git a/example/resources.conf.virtual b/example/resources.conf.virtual
index 44973a2..f4d8b4a 100644
--- a/example/resources.conf.virtual
+++ b/example/resources.conf.virtual
@@ -39,3 +39,27 @@
     band: GSM-1900
   - arfcn: 548
     band: GSM-1900
+
+modem:
+  - imsi: "001010000000000"
+    type: osmo-mobile
+  - imsi: "001010000000001"
+    type: osmo-mobile
+  - imsi: "001010000000002"
+    type: osmo-mobile
+  - imsi: "001010000000003"
+    type: osmo-mobile
+  - imsi: "001010000000004"
+    type: osmo-mobile
+  - imsi: "001010000000005"
+    type: osmo-mobile
+  - imsi: "001010000000006"
+    type: osmo-mobile
+  - imsi: "001010000000007"
+    type: osmo-mobile
+  - imsi: "001010000000008"
+    type: osmo-mobile
+  - imsi: "001010000000009"
+    type: osmo-mobile
+  - imsi: "001010000000009"
+    type: osmo-mobile
diff --git a/src/osmo_gsm_tester/ms.py b/src/osmo_gsm_tester/ms.py
index a361865..222a078 100644
--- a/src/osmo_gsm_tester/ms.py
+++ b/src/osmo_gsm_tester/ms.py
@@ -46,4 +46,4 @@
     @abstractmethod
     def cleanup(self):
         """Cleans up resources allocated."""
-        pass
\ No newline at end of file
+        pass
diff --git a/src/osmo_gsm_tester/ms_osmo_mobile.py b/src/osmo_gsm_tester/ms_osmo_mobile.py
new file mode 100644
index 0000000..1c28117
--- /dev/null
+++ b/src/osmo_gsm_tester/ms_osmo_mobile.py
@@ -0,0 +1,28 @@
+# osmo_gsm_tester: OsmocomBB based Mobile Station (MS)
+#
+# Copyright (C) 2016-2019 by sysmocom - s.f.m.c. GmbH
+#
+# Author: Neels Hofmeyr <neels at hofmeyr.de>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# 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 . import ms
+
+
+class MSOsmoMobile(ms.MS):
+    """Represent a osmocom-bb mobile."""
+
+    def cleanup(self):
+        # do nothing for a virtual resource
+        pass
diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py
index 2e7f500..ce1966b 100644
--- a/src/osmo_gsm_tester/resource.py
+++ b/src/osmo_gsm_tester/resource.py
@@ -28,6 +28,7 @@
 from . import schema
 from . import bts_sysmo, bts_osmotrx, bts_osmovirtual, bts_octphy, bts_nanobts
 from . import modem
+from . import ms_osmo_mobile
 
 from .util import is_dict, is_list
 
@@ -110,6 +111,7 @@
         # Map None to ofono for forward compability
         None: modem.Modem,
         'ofono': modem.Modem,
+        'osmo-mobile': ms_osmo_mobile.MSOsmoMobile,
 }
 
 
diff --git a/suites/nitb_netreg_mass/suite.conf b/suites/nitb_netreg_mass/suite.conf
index 94ec603..05bc054 100644
--- a/suites/nitb_netreg_mass/suite.conf
+++ b/suites/nitb_netreg_mass/suite.conf
@@ -3,6 +3,9 @@
   - times: 1
   bts:
   - type: osmo-bts-virtual
+  modem:
+  - times: 10
+    type: osmo-mobile
 
 defaults:
   timeout: 40s

-- 
To view, visit https://gerrit.osmocom.org/13041
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: Ic26aa63cad62323bb85f952640672eb28af0eadc
Gerrit-Change-Number: 13041
Gerrit-PatchSet: 5
Gerrit-Owner: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
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/20190310/ecf519e1/attachment.html>


More information about the gerrit-log mailing list