Change in osmo-gsm-tester[master]: bsc: Add API to mock BSC RSL IP addr

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
Mon May 28 09:59:22 UTC 2018


Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/9297 )

Change subject: bsc: Add API to mock BSC RSL IP addr
......................................................................

bsc: Add API to mock BSC RSL IP addr

Change-Id: I9ca67964e656943b50967a27a88054fd3e484672
---
M src/osmo_gsm_tester/osmo_bsc.py
M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
2 files changed, 13 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/src/osmo_gsm_tester/osmo_bsc.py b/src/osmo_gsm_tester/osmo_bsc.py
index 2c909bc..323b9ec 100644
--- a/src/osmo_gsm_tester/osmo_bsc.py
+++ b/src/osmo_gsm_tester/osmo_bsc.py
@@ -31,6 +31,7 @@
     process = None
     bts = None
     encryption = None
+    rsl_ip = None
     mgw = None
     stp = None
 
@@ -92,6 +93,9 @@
             encryption_vty = util.encryption2osmovty(values['bsc']['net']['encryption'])
         config.overlay(values, dict(bsc=dict(net=dict(encryption=encryption_vty))))
 
+        if self.rsl_ip is not None:
+            config.overlay(values, dict(bsc=dict(net=dict(rsl_ip=self.rsl_ip))))
+
         self.dbg('BSC CONFIG:\n' + pprint.pformat(values))
 
         with open(self.config_file, 'w') as f:
@@ -105,6 +109,12 @@
     def set_encryption(self, val):
         self.encryption = val
 
+    def set_rsl_ip(self, ip_addr):
+        '''Overwrite RSL IPaddr option sent to all BTS during OML config. Useful
+        for tests only willing to use osmo-bsc to do the OML setup but using
+        other external entities to test the RSL path, such as TTCN3 tests.'''
+        self.rsl_ip = ip_addr
+
     def bts_add(self, bts):
         self.bts.append(bts)
         bts.set_bsc(self)
diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
index 71b44cf..814cf97 100644
--- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
+++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
@@ -52,6 +52,9 @@
   channel allocator ascending
   rach tx integer 9
   rach max transmission 7
+% if bsc.net.get('rsl_ip', False):
+  ip.access rsl-ip ${bsc.net.rsl_ip}
+% endif
   ip.access unit_id ${bts.ipa_unit_id} 0
   oml ip.access stream_id ${bts.stream_id} line 0
 % if bts.get('sgsn', False):

-- 
To view, visit https://gerrit.osmocom.org/9297
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I9ca67964e656943b50967a27a88054fd3e484672
Gerrit-Change-Number: 9297
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180528/60e0de54/attachment.htm>


More information about the gerrit-log mailing list