summaryrefslogtreecommitdiffstats
path: root/src/osmo_gsm_tester
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2017-11-23 13:34:27 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2017-12-05 15:06:51 +0100
commit5936d8f4b18356f1bce21fe6f822caeb9574ac85 (patch)
treeb2adce4b90fb830601ee213e51e539687b7f479c /src/osmo_gsm_tester
parentce35d915922a7275298bfcb646832f08cff33362 (diff)
OsmoBtsTrx: Integrate with OsmoPcu and OsmoSgsn
Diffstat (limited to 'src/osmo_gsm_tester')
-rw-r--r--src/osmo_gsm_tester/bts_osmotrx.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py
index d30c1ee..6d4f634 100644
--- a/src/osmo_gsm_tester/bts_osmotrx.py
+++ b/src/osmo_gsm_tester/bts_osmotrx.py
@@ -20,11 +20,12 @@
import os
import pprint
import tempfile
-from . import log, config, util, template, process, event_loop
+from . import log, config, util, template, process, event_loop, pcu_osmo
class OsmoBtsTrx(log.Origin):
suite_run = None
bsc = None
+ sgsn = None
run_dir = None
inst = None
env = None
@@ -33,6 +34,7 @@ class OsmoBtsTrx(log.Origin):
lac = None
cellid = None
proc_bts = None
+ _pcu = None
BIN_BTS_TRX = 'osmo-bts-trx'
BIN_PCU = 'osmo-pcu'
@@ -56,6 +58,11 @@ class OsmoBtsTrx(log.Origin):
pass
os.rmdir(self.pcu_sk_tmp_dir)
+ def pcu(self):
+ if self._pcu is None:
+ self._pcu = pcu_osmo.OsmoPcu(self.suite_run, self, self.conf)
+ return self._pcu
+
def pcu_socket_path(self):
return os.path.join(self.pcu_sk_tmp_dir, 'pcu_bts')
@@ -143,6 +150,10 @@ class OsmoBtsTrx(log.Origin):
if self.cellid is not None:
config.overlay(values, { 'cell_identity': self.cellid })
config.overlay(values, self.conf)
+
+ sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client()
+ config.overlay(values, sgsn_conf)
+
self.dbg(conf=values)
return values
@@ -154,6 +165,9 @@ class OsmoBtsTrx(log.Origin):
def set_bsc(self, bsc):
self.bsc = bsc
+ def set_sgsn(self, sgsn):
+ self.sgsn = sgsn
+
def set_lac(self, lac):
self.lac = lac