OsmoPcuSysmo: Integrate with Sysmobts and OsmoSgsn
Change-Id: I01485c5d74e5fe62d0ffea9eb1fad29041426eef
This commit is contained in:
parent
e85f5c9009
commit
ce35d91592
|
@ -14,6 +14,7 @@ bts:
|
|||
ipa_unit_id: 1
|
||||
addr: 10.42.42.114
|
||||
band: GSM-1800
|
||||
direct_pcu: true
|
||||
ciphers: [a5_0, a5_1, a5_3]
|
||||
|
||||
- label: Ettus B200
|
||||
|
|
|
@ -13,6 +13,7 @@ bts:
|
|||
ipa_unit_id: 1
|
||||
addr: 10.42.42.114
|
||||
band: GSM-1800
|
||||
direct_pcu: true
|
||||
ciphers:
|
||||
- 'a5_0'
|
||||
- 'a5_1'
|
||||
|
|
|
@ -46,10 +46,11 @@ cnf ResourcesPool: DBG: Found path state_dir as [PATH]/selftest/conf/test_work/s
|
|||
{'_hash': 'dc9ce027a257da087f31a5bc1ee6b4abd2637369',
|
||||
'arfcn': '548',
|
||||
'band': 'GSM-1900'}],
|
||||
'bts': [{'_hash': '377ac78d5404b826d40c84efd04b4a9fd4e62b7e',
|
||||
'bts': [{'_hash': 'd2aa7c1124943de352351b650ca0c751784da6b6',
|
||||
'addr': '10.42.42.114',
|
||||
'band': 'GSM-1800',
|
||||
'ciphers': ['a5_0', 'a5_1'],
|
||||
'direct_pcu': 'True',
|
||||
'ipa_unit_id': '1',
|
||||
'label': 'sysmoBTS 1002',
|
||||
'type': 'osmo-bts-sysmo'},
|
||||
|
@ -118,12 +119,13 @@ cnf ResourcesPool: DBG: Found path state_dir as [PATH]/selftest/conf/test_work/s
|
|||
arfcn: '514'
|
||||
band: GSM-1800
|
||||
--- testowner: Reserving 2 x bts (candidates: 3)
|
||||
--- testowner: DBG: Picked - _hash: 377ac78d5404b826d40c84efd04b4a9fd4e62b7e
|
||||
--- testowner: DBG: Picked - _hash: d2aa7c1124943de352351b650ca0c751784da6b6
|
||||
addr: 10.42.42.114
|
||||
band: GSM-1800
|
||||
ciphers:
|
||||
- a5_0
|
||||
- a5_1
|
||||
direct_pcu: 'True'
|
||||
ipa_unit_id: '1'
|
||||
label: sysmoBTS 1002
|
||||
type: osmo-bts-sysmo
|
||||
|
@ -170,13 +172,14 @@ arfcn:
|
|||
arfcn: '514'
|
||||
band: GSM-1800
|
||||
bts:
|
||||
- _hash: 377ac78d5404b826d40c84efd04b4a9fd4e62b7e
|
||||
- _hash: d2aa7c1124943de352351b650ca0c751784da6b6
|
||||
_reserved_by: testowner-123-1490837279
|
||||
addr: 10.42.42.114
|
||||
band: GSM-1800
|
||||
ciphers:
|
||||
- a5_0
|
||||
- a5_1
|
||||
direct_pcu: 'True'
|
||||
ipa_unit_id: '1'
|
||||
label: sysmoBTS 1002
|
||||
type: osmo-bts-sysmo
|
||||
|
|
|
@ -50,7 +50,34 @@ network
|
|||
rach max transmission 7
|
||||
ip.access unit_id val_bts.unit_id_bts0 0
|
||||
oml ip.access stream_id val_bts.stream_id_bts0 line 0
|
||||
gprs mode none
|
||||
gprs mode gprs
|
||||
gprs routing area 0
|
||||
gprs network-control-order nc1
|
||||
gprs cell bvci 1800
|
||||
gprs cell timer blocking-timer 3
|
||||
gprs cell timer blocking-retries 3
|
||||
gprs cell timer unblocking-retries 3
|
||||
gprs cell timer reset-timer 3
|
||||
gprs cell timer reset-retries 3
|
||||
gprs cell timer suspend-timer 10
|
||||
gprs cell timer suspend-retries 3
|
||||
gprs cell timer resume-timer 10
|
||||
gprs cell timer resume-retries 3
|
||||
gprs cell timer capability-update-timer 10
|
||||
gprs cell timer capability-update-retries 3
|
||||
gprs nsei 1800
|
||||
gprs ns timer tns-block 3
|
||||
gprs ns timer tns-block-retries 3
|
||||
gprs ns timer tns-reset 3
|
||||
gprs ns timer tns-reset-retries 3
|
||||
gprs ns timer tns-test 30
|
||||
gprs ns timer tns-alive 3
|
||||
gprs ns timer tns-alive-retries 10
|
||||
gprs nsvc 0 nsvci 1800
|
||||
gprs nsvc 0 local udp port 23020
|
||||
gprs nsvc 0 remote udp port 23000
|
||||
gprs nsvc 0 remote ip val_bts.sgsn_ip_addr_bts0
|
||||
no force-combined-si
|
||||
trx 0
|
||||
rf_locked 0
|
||||
arfcn val_trx_arfcn_trx0
|
||||
|
@ -94,7 +121,34 @@ network
|
|||
rach max transmission 7
|
||||
ip.access unit_id val_bts.unit_id_bts1 0
|
||||
oml ip.access stream_id val_bts.stream_id_bts1 line 0
|
||||
gprs mode none
|
||||
gprs mode gprs
|
||||
gprs routing area 0
|
||||
gprs network-control-order nc1
|
||||
gprs cell bvci 1800
|
||||
gprs cell timer blocking-timer 3
|
||||
gprs cell timer blocking-retries 3
|
||||
gprs cell timer unblocking-retries 3
|
||||
gprs cell timer reset-timer 3
|
||||
gprs cell timer reset-retries 3
|
||||
gprs cell timer suspend-timer 10
|
||||
gprs cell timer suspend-retries 3
|
||||
gprs cell timer resume-timer 10
|
||||
gprs cell timer resume-retries 3
|
||||
gprs cell timer capability-update-timer 10
|
||||
gprs cell timer capability-update-retries 3
|
||||
gprs nsei 1800
|
||||
gprs ns timer tns-block 3
|
||||
gprs ns timer tns-block-retries 3
|
||||
gprs ns timer tns-reset 3
|
||||
gprs ns timer tns-reset-retries 3
|
||||
gprs ns timer tns-test 30
|
||||
gprs ns timer tns-alive 3
|
||||
gprs ns timer tns-alive-retries 10
|
||||
gprs nsvc 0 nsvci 1800
|
||||
gprs nsvc 0 local udp port 23020
|
||||
gprs nsvc 0 remote udp port 23000
|
||||
gprs nsvc 0 remote ip val_bts.sgsn_ip_addr_bts1
|
||||
no force-combined-si
|
||||
trx 0
|
||||
rf_locked 0
|
||||
arfcn val_trx_arfcn_trx0
|
||||
|
|
|
@ -26,6 +26,7 @@ mock_bts = {
|
|||
'base_station_id_code': 'val_bts.base_station_id_code',
|
||||
'ipa_unit_id': 'val_bts.unit_id',
|
||||
'stream_id': 'val_bts.stream_id',
|
||||
'sgsn': (dict(ip_address=dict(addr='val_bts.sgsn_ip_addr'))),
|
||||
'trx_list': (
|
||||
dict(arfcn='val_trx_arfcn_trx0',
|
||||
nominal_power='val_trx_nominal_power_trx0',
|
||||
|
|
|
@ -19,11 +19,12 @@
|
|||
|
||||
import os
|
||||
import pprint
|
||||
from . import log, config, util, template, process
|
||||
from . import log, config, util, template, process, pcu_sysmo
|
||||
|
||||
class SysmoBts(log.Origin):
|
||||
suite_run = None
|
||||
bsc = None
|
||||
sgsn = None
|
||||
run_dir = None
|
||||
inst = None
|
||||
remote_inst = None
|
||||
|
@ -32,8 +33,9 @@ class SysmoBts(log.Origin):
|
|||
lac = None
|
||||
cellid = None
|
||||
proc_bts = None
|
||||
_pcu = None
|
||||
|
||||
REMOTE_DIR = '/osmo-gsm-tester'
|
||||
REMOTE_DIR = '/osmo-gsm-tester-bts'
|
||||
BTS_SYSMO_BIN = 'osmo-bts-sysmo'
|
||||
BTS_SYSMO_CFG = 'osmo-bts-sysmo.cfg'
|
||||
|
||||
|
@ -77,15 +79,22 @@ class SysmoBts(log.Origin):
|
|||
|
||||
remote_lib = self.remote_inst.child('lib')
|
||||
remote_binary = self.remote_inst.child('bin', 'osmo-bts-sysmo')
|
||||
self.proc_bts = self.launch_remote('osmo-bts-sysmo',
|
||||
('LD_LIBRARY_PATH=%s' % remote_lib,
|
||||
remote_binary, '-c', remote_config_file, '-r', '1',
|
||||
'-i', self.bsc.addr()),
|
||||
remote_cwd=remote_run_dir)
|
||||
|
||||
args = ('LD_LIBRARY_PATH=%s' % remote_lib,
|
||||
remote_binary, '-c', remote_config_file, '-r', '1',
|
||||
'-i', self.bsc.addr())
|
||||
|
||||
if self._direct_pcu_enabled():
|
||||
args += ('-M',)
|
||||
|
||||
self.proc_bts = self.launch_remote('osmo-bts-sysmo', args, remote_cwd=remote_run_dir)
|
||||
|
||||
def cleanup(self):
|
||||
pass
|
||||
|
||||
def _direct_pcu_enabled(self):
|
||||
return util.str2bool(self.conf.get('direct_pcu'))
|
||||
|
||||
def pcu_socket_path(self):
|
||||
return os.path.join(SysmoBts.REMOTE_DIR, 'pcu_bts')
|
||||
|
||||
|
@ -117,9 +126,17 @@ class SysmoBts(log.Origin):
|
|||
log.ctx(proc)
|
||||
raise log.Error('Exited in error')
|
||||
|
||||
def pcu(self):
|
||||
if self._pcu is None:
|
||||
self._pcu = pcu_sysmo.OsmoPcuSysmo(self.suite_run, self, self.conf)
|
||||
return self._pcu
|
||||
|
||||
def remote_addr(self):
|
||||
return self.conf.get('addr')
|
||||
|
||||
def pcu_socket_path(self):
|
||||
return os.path.join(SysmoBts.REMOTE_DIR, 'pcu_bts')
|
||||
|
||||
def configure(self):
|
||||
if self.bsc is None:
|
||||
raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be configured')
|
||||
|
@ -152,6 +169,10 @@ class SysmoBts(log.Origin):
|
|||
if self.cellid is not None:
|
||||
config.overlay(values, { 'cell_identity': self.cellid })
|
||||
config.overlay(values, self.conf)
|
||||
|
||||
sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client()
|
||||
config.overlay(values, sgsn_conf)
|
||||
|
||||
self.dbg(conf=values)
|
||||
return values
|
||||
|
||||
|
@ -163,6 +184,9 @@ class SysmoBts(log.Origin):
|
|||
def set_bsc(self, bsc):
|
||||
self.bsc = bsc
|
||||
|
||||
def set_sgsn(self, sgsn):
|
||||
self.sgsn = sgsn
|
||||
|
||||
def set_lac(self, lac):
|
||||
self.lac = lac
|
||||
|
||||
|
|
|
@ -91,4 +91,7 @@ class OsmoSgsn(log.Origin):
|
|||
def running(self):
|
||||
return not self.process.terminated()
|
||||
|
||||
def bts_add(self, bts):
|
||||
bts.set_sgsn(self)
|
||||
|
||||
# vim: expandtab tabstop=4 shiftwidth=4
|
||||
|
|
|
@ -55,6 +55,7 @@ RESOURCES_SCHEMA = {
|
|||
'bts[].band': schema.BAND,
|
||||
'bts[].trx_remote_ip': schema.IPV4,
|
||||
'bts[].launch_trx': schema.BOOL_STR,
|
||||
'bts[].direct_pcu': schema.BOOL_STR,
|
||||
'bts[].ciphers[]': schema.CIPHER,
|
||||
'bts[].trx_list[].hw_addr': schema.HWADDR,
|
||||
'bts[].trx_list[].net_device': schema.STR,
|
||||
|
|
|
@ -59,7 +59,38 @@ network
|
|||
rach max transmission 7
|
||||
ip.access unit_id ${bts.ipa_unit_id} 0
|
||||
oml ip.access stream_id ${bts.stream_id} line 0
|
||||
% if bts.get('sgsn', False):
|
||||
gprs mode gprs
|
||||
gprs routing area 0
|
||||
gprs network-control-order nc1
|
||||
gprs cell bvci 1800
|
||||
gprs cell timer blocking-timer 3
|
||||
gprs cell timer blocking-retries 3
|
||||
gprs cell timer unblocking-retries 3
|
||||
gprs cell timer reset-timer 3
|
||||
gprs cell timer reset-retries 3
|
||||
gprs cell timer suspend-timer 10
|
||||
gprs cell timer suspend-retries 3
|
||||
gprs cell timer resume-timer 10
|
||||
gprs cell timer resume-retries 3
|
||||
gprs cell timer capability-update-timer 10
|
||||
gprs cell timer capability-update-retries 3
|
||||
gprs nsei 1800
|
||||
gprs ns timer tns-block 3
|
||||
gprs ns timer tns-block-retries 3
|
||||
gprs ns timer tns-reset 3
|
||||
gprs ns timer tns-reset-retries 3
|
||||
gprs ns timer tns-test 30
|
||||
gprs ns timer tns-alive 3
|
||||
gprs ns timer tns-alive-retries 10
|
||||
gprs nsvc 0 nsvci 1800
|
||||
gprs nsvc 0 local udp port 23020
|
||||
gprs nsvc 0 remote udp port 23000
|
||||
gprs nsvc 0 remote ip ${bts.sgsn.ip_address.addr}
|
||||
no force-combined-si
|
||||
% else:
|
||||
gprs mode none
|
||||
% endif
|
||||
% for trx in bts.trx_list:
|
||||
trx ${loop.index}
|
||||
rf_locked 0
|
||||
|
|
|
@ -49,7 +49,38 @@ network
|
|||
rach max transmission 7
|
||||
ip.access unit_id ${bts.ipa_unit_id} 0
|
||||
oml ip.access stream_id ${bts.stream_id} line 0
|
||||
% if bts.get('sgsn', False):
|
||||
gprs mode gprs
|
||||
gprs routing area 0
|
||||
gprs network-control-order nc1
|
||||
gprs cell bvci 1800
|
||||
gprs cell timer blocking-timer 3
|
||||
gprs cell timer blocking-retries 3
|
||||
gprs cell timer unblocking-retries 3
|
||||
gprs cell timer reset-timer 3
|
||||
gprs cell timer reset-retries 3
|
||||
gprs cell timer suspend-timer 10
|
||||
gprs cell timer suspend-retries 3
|
||||
gprs cell timer resume-timer 10
|
||||
gprs cell timer resume-retries 3
|
||||
gprs cell timer capability-update-timer 10
|
||||
gprs cell timer capability-update-retries 3
|
||||
gprs nsei 1800
|
||||
gprs ns timer tns-block 3
|
||||
gprs ns timer tns-block-retries 3
|
||||
gprs ns timer tns-reset 3
|
||||
gprs ns timer tns-reset-retries 3
|
||||
gprs ns timer tns-test 30
|
||||
gprs ns timer tns-alive 3
|
||||
gprs ns timer tns-alive-retries 10
|
||||
gprs nsvc 0 nsvci 1800
|
||||
gprs nsvc 0 local udp port 23020
|
||||
gprs nsvc 0 remote udp port 23000
|
||||
gprs nsvc 0 remote ip ${bts.sgsn.ip_address.addr}
|
||||
no force-combined-si
|
||||
% else:
|
||||
gprs mode none
|
||||
% endif
|
||||
% for trx in bts.trx_list:
|
||||
trx ${loop.index}
|
||||
rf_locked 0
|
||||
|
|
Loading…
Reference in New Issue