[PATCH] osmo-gsm-tester[master]: OsmoBtsOctphy: Integrate with OsmoPcu and OsmoSgsn

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/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Thu Nov 23 16:39:44 UTC 2017


Review at  https://gerrit.osmocom.org/5008

OsmoBtsOctphy: Integrate with OsmoPcu and OsmoSgsn

Change-Id: I54780971d711d47b23976dd044a4a53134dd4299
---
M src/osmo_gsm_tester/bts_octphy.py
1 file changed, 14 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/08/5008/1

diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py
index bc93a3a..d92927f 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
@@ -32,6 +33,7 @@
     values = None
     lac = None
     cellid = None
+    _pcu = None
 
     BIN_BTS_OCTPHY = 'osmo-bts-octphy'
 
@@ -46,6 +48,7 @@
         self.pcu_sk_tmp_dir = tempfile.mkdtemp('', 'ogtpcusk')
         if len(self.pcu_socket_path().encode()) > 107:
             raise log.Error('Path for pcu socket is longer than max allowed len for unix socket path (107):', self.pcu_socket_path())
+        self._pcu = pcu_osmo.OsmoPcu(self.suite_run, self, self.conf)
 
     def cleanup(self):
         if self.pcu_sk_tmp_dir:
@@ -54,6 +57,9 @@
             except OSError:
                 pass
             os.rmdir(self.pcu_sk_tmp_dir)
+
+    def pcu(self):
+        return self._pcu
 
     def pcu_socket_path(self):
         return os.path.join(self.pcu_sk_tmp_dir, 'pcu_bts')
@@ -165,12 +171,19 @@
         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
 
     def set_bsc(self, bsc):
         self.bsc = bsc
 
+    def set_sgsn(self, sgsn):
+        self.sgsn = sgsn
+
     def set_lac(self, lac):
         self.lac = lac
 

-- 
To view, visit https://gerrit.osmocom.org/5008
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I54780971d711d47b23976dd044a4a53134dd4299
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>



More information about the gerrit-log mailing list