Require OsmoMgw in OsmoBsc and update tests

Since Change-Id Ia2882b7ca31a3219c676986e85045fa08a425d7a, osmo-bsc
uses osmo-mgw and utilizes libosmo-mgcp-client to talk to it.

This commit fixes latest constant failures in voice suite.

Change-Id: I1dadd781a357fce33e7bde55e4bcbdaeb4633359
This commit is contained in:
Pau Espin 2017-11-09 13:02:09 +01:00
parent e9d4af8903
commit 386b78d8b0
19 changed files with 50 additions and 20 deletions

View File

@ -6,6 +6,7 @@ ip_address:
- addr: 10.42.42.4
- addr: 10.42.42.5
- addr: 10.42.42.6
- addr: 10.42.42.7
bts:
- label: sysmoBTS 1002

View File

@ -30,13 +30,15 @@ class OsmoBsc(log.Origin):
process = None
bts = None
encryption = None
mgw = None
def __init__(self, suite_run, msc, ip_address):
def __init__(self, suite_run, msc, mgw, ip_address):
super().__init__(log.C_RUN, 'osmo-bsc_%s' % ip_address.get('addr'))
self.suite_run = suite_run
self.ip_address = ip_address
self.bts = []
self.msc = msc
self.mgw = mgw
def start(self):
self.log('Starting osmo-bsc')
@ -73,6 +75,7 @@ class OsmoBsc(log.Origin):
values = dict(bsc=config.get_defaults('bsc'))
config.overlay(values, self.suite_run.config())
config.overlay(values, dict(bsc=dict(ip_address=self.ip_address)))
config.overlay(values, self.mgw.conf_for_client())
bts_list = []
for bts in self.bts:

View File

@ -25,7 +25,7 @@ import traceback
import pprint
from . import config, log, template, util, resource, schema, modem, event_loop, esme, sms
from . import osmo_nitb
from . import osmo_hlr, osmo_mgcpgw, osmo_msc, osmo_bsc, osmo_stp
from . import osmo_hlr, osmo_mgcpgw, osmo_mgw, osmo_msc, osmo_bsc, osmo_stp
from . import test
class Timeout(Exception):
@ -327,15 +327,20 @@ class SuiteRun(log.Origin):
ip_address = self.ip_address()
return osmo_mgcpgw.OsmoMgcpgw(self, ip_address, bts_ip)
def mgw(self, ip_address=None):
if ip_address is None:
ip_address = self.ip_address()
return osmo_mgw.OsmoMgw(self, ip_address)
def msc(self, hlr, mgcpgw, ip_address=None):
if ip_address is None:
ip_address = self.ip_address()
return osmo_msc.OsmoMsc(self, hlr, mgcpgw, ip_address)
def bsc(self, msc, ip_address=None):
def bsc(self, msc, mgw, ip_address=None):
if ip_address is None:
ip_address = self.ip_address()
return osmo_bsc.OsmoBsc(self, msc, ip_address)
return osmo_bsc.OsmoBsc(self, msc, mgw, ip_address)
def stp(self, ip_address=None):
if ip_address is None:

View File

@ -74,7 +74,10 @@ msc
token msc_token_23_42
core-mobile-country-code ${bsc.net.mcc}
core-mobile-network-code ${bsc.net.mnc}
ip.access rtp-base 8000
ip.access rtp-base 25000
mgw remote-ip ${mgw.ip_address.addr}
mgw remote-port 2427
mgw endpoint-range 1 31
timeout-ping 1800
timeout-ping advanced
timeout-pong 60

View File

@ -3,8 +3,9 @@ from osmo_gsm_tester.test import *
hlr = suite.hlr()
bts = suite.bts()
mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr())
mgw_bsc = suite.mgw()
msc = suite.msc(hlr, mgcpgw)
bsc = suite.bsc(msc)
bsc = suite.bsc(msc, mgw_bsc)
stp = suite.stp()
modems = suite.modems(int(prompt('How many modems?')))
@ -12,6 +13,7 @@ hlr.start()
stp.start()
msc.start()
mgcpgw.start()
mgw_bsc.start()
bsc.bts_add(bts)
bsc.start()

View File

@ -1,6 +1,6 @@
resources:
ip_address:
- times: 5
- times: 6
bts:
- times: 1
modem:

View File

@ -4,8 +4,9 @@ from osmo_gsm_tester.test import *
hlr = suite.hlr()
bts = suite.bts()
mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr())
mgw_bsc = suite.mgw()
msc = suite.msc(hlr, mgcpgw)
bsc = suite.bsc(msc)
bsc = suite.bsc(msc, mgw_bsc)
stp = suite.stp()
ms = suite.modem()
@ -17,6 +18,7 @@ hlr.start()
stp.start()
msc.start()
mgcpgw.start()
mgw_bsc.start()
bsc.bts_add(bts)
bsc.start()
bts.start()

View File

@ -4,8 +4,9 @@ from osmo_gsm_tester.test import *
hlr = suite.hlr()
bts = suite.bts()
mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr())
mgw_bsc = suite.mgw()
msc = suite.msc(hlr, mgcpgw)
bsc = suite.bsc(msc)
bsc = suite.bsc(msc, mgw_bsc)
stp = suite.stp()
ms = suite.modem()
@ -17,6 +18,7 @@ hlr.start()
stp.start()
msc.start()
mgcpgw.start()
mgw_bsc.start()
bsc.bts_add(bts)
bsc.start()
bts.start()

View File

@ -4,8 +4,9 @@ from osmo_gsm_tester.test import *
hlr = suite.hlr()
bts = suite.bts()
mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr())
mgw_bsc = suite.mgw()
msc = suite.msc(hlr, mgcpgw)
bsc = suite.bsc(msc)
bsc = suite.bsc(msc, mgw_bsc)
stp = suite.stp()
ms = suite.modem()
@ -17,6 +18,7 @@ hlr.start()
stp.start()
msc.start()
mgcpgw.start()
mgw_bsc.start()
bsc.bts_add(bts)
bsc.start()
bts.start()

View File

@ -1,6 +1,6 @@
resources:
ip_address:
- times: 5 # msc, bsc, hlr, stp, mgw
- times: 6 # msc, bsc, hlr, stp, mgw*2
bts:
- times: 1
ciphers:

View File

@ -15,8 +15,9 @@ SMPP_ESME_RINVDSTADR = 0x0000000B
hlr = suite.hlr()
bts = suite.bts()
mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr())
mgw_bsc = suite.mgw()
msc = suite.msc(hlr, mgcpgw)
bsc = suite.bsc(msc)
bsc = suite.bsc(msc, mgw_bsc)
stp = suite.stp()
bsc.bts_add(bts)
@ -28,6 +29,7 @@ hlr.start()
stp.start()
msc.start()
mgcpgw.start()
mgw_bsc.start()
bsc.start()
bts.start()

View File

@ -13,8 +13,9 @@ SMPP_ESME_RINVDSTADR = 0x0000000B
hlr = suite.hlr()
bts = suite.bts()
mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr())
mgw_bsc = suite.mgw()
msc = suite.msc(hlr, mgcpgw)
bsc = suite.bsc(msc)
bsc = suite.bsc(msc, mgw_bsc)
stp = suite.stp()
bsc.bts_add(bts)
@ -26,6 +27,7 @@ hlr.start()
stp.start()
msc.start()
mgcpgw.start()
mgw_bsc.start()
bsc.start()
bts.start()

View File

@ -1,6 +1,6 @@
resources:
ip_address:
- times: 5 # msc, bsc, hlr, stp, mgw
- times: 6 # msc, bsc, hlr, stp, mgw*2
bts:
- times: 1
modem:

View File

@ -4,8 +4,9 @@ from osmo_gsm_tester.test import *
hlr = suite.hlr()
bts = suite.bts()
mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr())
mgw_bsc = suite.mgw()
msc = suite.msc(hlr, mgcpgw)
bsc = suite.bsc(msc)
bsc = suite.bsc(msc, mgw_bsc)
stp = suite.stp()
ms_mo = suite.modem()
ms_mt = suite.modem()
@ -14,6 +15,7 @@ hlr.start()
stp.start()
msc.start()
mgcpgw.start()
mgw_bsc.start()
bsc.bts_add(bts)
bsc.start()

View File

@ -1,6 +1,6 @@
resources:
ip_address:
- times: 5 # msc, bsc, hlr, stp, mgw
- times: 6 # msc, bsc, hlr, stp, mgw*2
bts:
- times: 1
modem:

View File

@ -6,8 +6,9 @@ USSD_COMMAND_GET_EXTENSION = '*#100#'
hlr = suite.hlr()
bts = suite.bts()
mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr())
mgw_bsc = suite.mgw()
msc = suite.msc(hlr, mgcpgw)
bsc = suite.bsc(msc)
bsc = suite.bsc(msc, mgw_bsc)
stp = suite.stp()
ms = suite.modem()
@ -15,6 +16,7 @@ hlr.start()
stp.start()
msc.start()
mgcpgw.start()
mgw_bsc.start()
bsc.bts_add(bts)
bsc.start()

View File

@ -1,6 +1,6 @@
resources:
ip_address:
- times: 5 # msc, bsc, hlr, stp, mgw
- times: 6 # msc, bsc, hlr, stp, mgw*2
bts:
- times: 1
modem:

View File

@ -4,8 +4,9 @@ from osmo_gsm_tester.test import *
hlr = suite.hlr()
bts = suite.bts()
mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr())
mgw_bsc = suite.mgw()
msc = suite.msc(hlr, mgcpgw)
bsc = suite.bsc(msc)
bsc = suite.bsc(msc, mgw_bsc)
stp = suite.stp()
ms_mo = suite.modem()
ms_mt = suite.modem()
@ -14,6 +15,7 @@ hlr.start()
stp.start()
msc.start()
mgcpgw.start()
mgw_bsc.start()
bsc.bts_add(bts)
bsc.start()

View File

@ -1,6 +1,6 @@
resources:
ip_address:
- times: 5 # msc, bsc, hlr, stp, mgw
- times: 6 # msc, bsc, hlr, stp, mgw*2
bts:
- times: 1
modem: