Introduce osmux support for msc,bsc,mgw
Change-Id: Ief3518e77650f2cddb48357b07fe95346e46ee1b
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