Change in ...osmo-gsm-tester[master]: Introduce osmux support for msc, bsc, mgw

pespin gerrit-no-reply at lists.osmocom.org
Tue Jun 25 21:47:15 UTC 2019


pespin has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/14547 )

Change subject: Introduce osmux support for msc,bsc,mgw
......................................................................

Introduce osmux support for msc,bsc,mgw

Change-Id: Ief3518e77650f2cddb48357b07fe95346e46ee1b
---
M src/osmo_gsm_tester/osmo_bsc.py
M src/osmo_gsm_tester/osmo_mgw.py
M src/osmo_gsm_tester/osmo_msc.py
M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
M src/osmo_gsm_tester/templates/osmo-mgw.cfg.tmpl
M src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl
6 files changed, 41 insertions(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved



diff --git a/src/osmo_gsm_tester/osmo_bsc.py b/src/osmo_gsm_tester/osmo_bsc.py
index ec9c3b8..4160527 100644
--- a/src/osmo_gsm_tester/osmo_bsc.py
+++ b/src/osmo_gsm_tester/osmo_bsc.py
@@ -32,6 +32,7 @@
         self.process = None
         self.encryption = None
         self.rsl_ip = None
+        self.use_osmux = "off"
         self.suite_run = suite_run
         self.ip_address = ip_address
         self.bts = []
@@ -90,6 +91,7 @@
         else:
             encryption_vty = util.encryption2osmovty(values['bsc']['net']['encryption'])
         config.overlay(values, dict(bsc=dict(net=dict(encryption=encryption_vty))))
+        config.overlay(values, dict(bsc=dict(use_osmux=self.use_osmux)))
 
         if self.rsl_ip is not None:
             config.overlay(values, dict(bsc=dict(net=dict(rsl_ip=self.rsl_ip))))
@@ -113,6 +115,15 @@
         other external entities to test the RSL path, such as TTCN3 tests.'''
         self.rsl_ip = ip_addr
 
+    def set_use_osmux(self, use=False, force=False):
+        if not use:
+            self.use_osmux = "off"
+        else:
+            if not force:
+                self.use_osmux = "on"
+            else:
+                self.use_osmux = "only"
+
     def bts_add(self, bts):
         self.bts.append(bts)
         bts.set_bsc(self)
diff --git a/src/osmo_gsm_tester/osmo_mgw.py b/src/osmo_gsm_tester/osmo_mgw.py
index ca7bd51..ea8e652 100644
--- a/src/osmo_gsm_tester/osmo_mgw.py
+++ b/src/osmo_gsm_tester/osmo_mgw.py
@@ -31,6 +31,7 @@
         self.process = None
         self.suite_run = suite_run
         self.ip_address = ip_address
+        self.use_osmux = "off"
 
     def start(self):
         self.log('Starting osmo-mgw')
@@ -63,7 +64,11 @@
 
         values = dict(mgw=config.get_defaults('mgw'))
         config.overlay(values, self.suite_run.config())
-        config.overlay(values, dict(mgw=dict(ip_address=self.ip_address)))
+        config.overlay(values, { 'mgw': {
+                                        'ip_address': self.ip_address,
+                                        'use_osmux': self.use_osmux
+                                        }
+                                })
 
         self.dbg('MGW CONFIG:\n' + pprint.pformat(values))
 
@@ -81,4 +86,14 @@
     def running(self):
         return not self.process.terminated()
 
+    def set_use_osmux(self, use=False, force=False):
+        if not use:
+            self.use_osmux = "off"
+        else:
+            if not force:
+                self.use_osmux = "on"
+            else:
+                self.use_osmux = "only"
+
+
 # vim: expandtab tabstop=4 shiftwidth=4
diff --git a/src/osmo_gsm_tester/osmo_msc.py b/src/osmo_gsm_tester/osmo_msc.py
index 192926c..51f50c4 100644
--- a/src/osmo_gsm_tester/osmo_msc.py
+++ b/src/osmo_gsm_tester/osmo_msc.py
@@ -32,6 +32,7 @@
         self.config = None
         self.encryption = None
         self.authentication = None
+        self.use_osmux = "off"
         self.suite_run = suite_run
         self.ip_address = ip_address
         self.hlr = hlr
@@ -84,6 +85,7 @@
         config.overlay(values, dict(msc=dict(net=dict(encryption=encryption_vty))))
         if self.authentication is not None:
             config.overlay(values, dict(msc=dict(net=dict(authentication=self.authentication))))
+        config.overlay(values, dict(msc=dict(use_osmux=self.use_osmux)))
 
 
         self.config = values
@@ -107,6 +109,15 @@
             return
         self.authentication = "required" if val else "optional"
 
+    def set_use_osmux(self, use=False, force=False):
+        if not use:
+            self.use_osmux = "off"
+        else:
+            if not force:
+                self.use_osmux = "on"
+            else:
+                self.use_osmux = "only"
+
     def mcc(self):
         return self.config['msc']['net']['mcc']
 
diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
index 53e683b..572e765 100644
--- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
+++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
@@ -118,5 +118,6 @@
  amr-config 5_90k allowed
  amr-config 5_15k forbidden
  amr-config 4_75k forbidden
+ osmux ${bsc.use_osmux}
  msc-addr msc_remote
  bsc-addr bsc_local
diff --git a/src/osmo_gsm_tester/templates/osmo-mgw.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-mgw.cfg.tmpl
index 9e338e1..f91ab30 100644
--- a/src/osmo_gsm_tester/templates/osmo-mgw.cfg.tmpl
+++ b/src/osmo_gsm_tester/templates/osmo-mgw.cfg.tmpl
@@ -14,3 +14,4 @@
  number endpoints 31
  rtcp-omit
  rtp-accept-all 1
+ osmux ${mgw.use_osmux}
diff --git a/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl
index b370d5e..31c57d3 100644
--- a/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl
+++ b/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl
@@ -28,6 +28,7 @@
  mgw local-ip ${msc.ip_address.addr}
  mgw endpoint-range 1 31
  mgw bts-base 8000
+ osmux ${msc.use_osmux}
  assign-tmsi
  cs7-instance-iu 0
  cs7-instance-a 0

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/14547
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: Ief3518e77650f2cddb48357b07fe95346e46ee1b
Gerrit-Change-Number: 14547
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at gnumonks.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190625/b8dc8efa/attachment.html>


More information about the gerrit-log mailing list