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

2019-06-25 Thread pespin
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}
  

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

2019-06-25 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-gsm-tester/+/14547 )

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


Patch Set 1: Code-Review+2


--
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 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 25 Jun 2019 21:47:07 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


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

2019-06-24 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-gsm-tester/+/14547 )

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


Patch Set 1: Code-Review+1


--
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 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Mon, 24 Jun 2019 13:51:29 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


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

2019-06-19 Thread pespin
pespin has uploaded this change for review. ( 
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(-)



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

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