summaryrefslogtreecommitdiffstats
path: root/src/osmo_gsm_tester/bts_octphy.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/osmo_gsm_tester/bts_octphy.py')
-rw-r--r--src/osmo_gsm_tester/bts_octphy.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py
index d9ffd6e..90eeb40 100644
--- a/src/osmo_gsm_tester/bts_octphy.py
+++ b/src/osmo_gsm_tester/bts_octphy.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 OsmoBtsOctphy(log.Origin):
suite_run = None
bsc = None
+ sgsn = None
run_dir = None
inst = None
env = None
@@ -33,6 +34,7 @@ class OsmoBtsOctphy(log.Origin):
lac = None
cellid = None
proc_bts = None
+ _pcu = None
BIN_BTS_OCTPHY = 'osmo-bts-octphy'
@@ -56,6 +58,11 @@ class OsmoBtsOctphy(log.Origin):
pass
os.rmdir(self.pcu_sk_tmp_dir)
+ def pcu(self):
+ if self._pcu is None:
+ self._pcu = pcu_sysmo.OsmoPcuSysmo(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')
@@ -165,6 +172,10 @@ class OsmoBtsOctphy(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
@@ -176,6 +187,9 @@ class OsmoBtsOctphy(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