summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2019-02-25 03:20:16 +0000
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2019-03-07 09:39:39 +0000
commit10501ccc8e6fe320f700070e5bfd16d970521edd (patch)
tree057662c586461e10e5ea3af962d9507a3fab5ef1
parent8910fbb9a865df54c87caa632805a68c4c9ca15b (diff)
resource: Add a mobile resource for the virtual test
Add a new resource and make a reservation in the suite. Change-Id: Ic26aa63cad62323bb85f952640672eb28af0eadc
-rw-r--r--example/resources.conf.virtual24
-rw-r--r--src/osmo_gsm_tester/ms.py2
-rw-r--r--src/osmo_gsm_tester/ms_osmo_mobile.py28
-rw-r--r--src/osmo_gsm_tester/resource.py2
-rw-r--r--suites/nitb_netreg_mass/suite.conf3
5 files changed, 58 insertions, 1 deletions
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 @@ arfcn:
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 @@ class MS(log.Origin, metaclass=ABCMeta):
@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@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 util
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 @@ KNOWN_MS_TYPES = {
# 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 @@ resources:
- times: 1
bts:
- type: osmo-bts-virtual
+ modem:
+ - times: 10
+ type: osmo-mobile
defaults:
timeout: 40s