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/.
Holger Freyther gerrit-no-reply at lists.osmocom.orgHolger Freyther has uploaded this change for review. ( 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/resource.py
M src/osmo_gsm_tester/suite.py
M suites/nitb_netreg_mass/suite.conf
4 files changed, 25 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/41/13041/1
diff --git a/example/resources.conf.virtual b/example/resources.conf.virtual
index 44973a2..17d67ff 100644
--- a/example/resources.conf.virtual
+++ b/example/resources.conf.virtual
@@ -39,3 +39,16 @@
band: GSM-1900
- arfcn: 548
band: GSM-1900
+
+mobile:
+ - imsi: "001010000000000"
+ - imsi: "001010000000001"
+ - imsi: "001010000000002"
+ - imsi: "001010000000003"
+ - imsi: "001010000000004"
+ - imsi: "001010000000005"
+ - imsi: "001010000000006"
+ - imsi: "001010000000007"
+ - imsi: "001010000000008"
+ - imsi: "001010000000009"
+ - imsi: "001010000000009"
diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py
index 4f48dc4..0185e3c 100644
--- a/src/osmo_gsm_tester/resource.py
+++ b/src/osmo_gsm_tester/resource.py
@@ -45,7 +45,8 @@
R_ARFCN = 'arfcn'
R_MODEM = 'modem'
R_OSMOCON = 'osmocon_phone'
-R_ALL = (R_IP_ADDRESS, R_BTS, R_ARFCN, R_MODEM, R_OSMOCON)
+R_MOBILE = 'mobile'
+R_ALL = (R_IP_ADDRESS, R_BTS, R_ARFCN, R_MODEM, R_OSMOCON, R_MOBILE)
RESOURCES_SCHEMA = {
'ip_address[].addr': schema.IPV4,
@@ -86,6 +87,7 @@
'modem[].ciphers[]': schema.CIPHER,
'modem[].features[]': schema.MODEM_FEATURE,
'osmocon_phone[].serial_device': schema.STR,
+ 'mobile[].imsi': schema.STR,
}
WANT_SCHEMA = util.dict_add(
diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py
index e5ac9a8..71e7c04 100644
--- a/src/osmo_gsm_tester/suite.py
+++ b/src/osmo_gsm_tester/suite.py
@@ -17,6 +17,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/>.
+import collections
import os
import sys
import time
@@ -25,6 +26,8 @@
from .event_loop import MainLoop
from . import osmo_nitb, osmo_hlr, osmo_mgcpgw, osmo_mgw, osmo_msc, osmo_bsc, osmo_stp, osmo_ggsn, osmo_sgsn, modem, esme, osmocon, ms_driver, iperf3
+Mobile = collections.namedtuple("Mobile", ["imsi"])
+
class Timeout(Exception):
pass
@@ -316,6 +319,10 @@
self.register_for_cleanup(ms)
return ms
+ def mobile(self):
+ mobile_cfg = self.reserved_resources.get(resource.R_MOBILE)
+ return Mobile(mobile_cfg['imsi'])
+
def bts(self, specifics=None):
bts = bts_obj(self, self.reserved_resources.get(resource.R_BTS, specifics=specifics))
bts.set_lac(self.lac())
diff --git a/suites/nitb_netreg_mass/suite.conf b/suites/nitb_netreg_mass/suite.conf
index 94ec603..4b16da2 100644
--- a/suites/nitb_netreg_mass/suite.conf
+++ b/suites/nitb_netreg_mass/suite.conf
@@ -3,6 +3,8 @@
- times: 1
bts:
- type: osmo-bts-virtual
+ mobile:
+ - times: 10
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: newchange
Gerrit-Change-Id: Ic26aa63cad62323bb85f952640672eb28af0eadc
Gerrit-Change-Number: 13041
Gerrit-PatchSet: 1
Gerrit-Owner: Holger Freyther <holger at freyther.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190225/f9a12674/attachment.htm>