rename more items from nitb to bsc

A NITB is a BSC + MSC, and if a BTS talks to a NITB, it talks to the BSC part
of the NITB. Hence it makes more sense to name certain things 'bsc' instead of
'nitb', to prepare for a separate BSC process appearing soon.

Change-Id: I6a0343b9243b166d4053cc44f523543f1245d772
This commit is contained in:
Neels Hofmeyr 2017-05-18 19:31:44 +02:00
parent 76d8103bfb
commit c4ba4a6866
4 changed files with 27 additions and 27 deletions

View File

@ -7,7 +7,7 @@ nitb:
auth_policy: closed
encryption: a5 0
nitb_bts:
bsc_bts:
location_area_code: 23
base_station_id_code: 63
stream_id: 255

View File

@ -23,7 +23,7 @@ from . import log, config, util, template, process
class OsmoBtsTrx(log.Origin):
suite_run = None
nitb = None
bsc = None
run_dir = None
inst = None
env = None
@ -43,11 +43,11 @@ class OsmoBtsTrx(log.Origin):
self.env = {}
def start(self):
if self.nitb is None:
raise RuntimeError('BTS needs to be added to a NITB before it can be started')
if self.bsc is None:
raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be started')
self.suite_run.poll()
self.log('Starting to connect to', self.nitb)
self.log('Starting to connect to', self.bsc)
self.run_dir = util.Dir(self.suite_run.trial.get_run_dir().new_dir(self.name()))
self.configure()
@ -63,7 +63,7 @@ class OsmoBtsTrx(log.Origin):
self.proc_trx.log(self.proc_trx.get_stdout_tail(1))
self.launch_process(OsmoBtsTrx.BIN_BTS_TRX, '-r', '1',
'-c', os.path.abspath(self.config_file),
'-i', self.nitb.addr())
'-i', self.bsc.addr())
#self.launch_process(OsmoBtsTrx.BIN_PCU, '-r', '1')
self.suite_run.poll()
@ -85,14 +85,14 @@ class OsmoBtsTrx(log.Origin):
return proc
def configure(self):
if self.nitb is None:
raise RuntimeError('BTS needs to be added to a NITB before it can be configured')
if self.bsc is None:
raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be configured')
self.config_file = self.run_dir.new_file(OsmoBtsTrx.CONF_BTS_TRX)
self.dbg(config_file=self.config_file)
values = dict(osmo_bts_trx=config.get_defaults('osmo_bts_trx'))
config.overlay(values, self.suite_run.config())
config.overlay(values, dict(osmo_bts_trx=dict(oml_remote_ip=self.nitb.addr())))
config.overlay(values, dict(osmo_bts_trx=dict(oml_remote_ip=self.bsc.addr())))
config.overlay(values, dict(osmo_bts_trx=self.conf))
self.dbg('OSMO-BTS-TRX CONFIG:\n' + pprint.pformat(values))
@ -102,14 +102,14 @@ class OsmoBtsTrx(log.Origin):
self.dbg(r)
f.write(r)
def conf_for_nitb(self):
values = config.get_defaults('nitb_bts')
def conf_for_bsc(self):
values = config.get_defaults('bsc_bts')
config.overlay(values, config.get_defaults('osmo_bts_trx'))
config.overlay(values, self.conf)
self.dbg(conf=values)
return values
def set_nitb(self, nitb):
self.nitb = nitb
def set_bsc(self, bsc):
self.bsc = bsc
# vim: expandtab tabstop=4 shiftwidth=4

View File

@ -23,7 +23,7 @@ from . import log, config, util, template, process
class SysmoBts(log.Origin):
suite_run = None
nitb = None
bsc = None
run_dir = None
inst = None
remote_addr = None
@ -45,9 +45,9 @@ class SysmoBts(log.Origin):
def start(self):
with self:
if self.nitb is None:
raise RuntimeError('BTS needs to be added to a NITB before it can be started')
self.log('Starting sysmoBTS to connect to', self.nitb)
if self.bsc is None:
raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be started')
self.log('Starting sysmoBTS to connect to', self.bsc)
self.run_dir = util.Dir(self.suite_run.trial.get_run_dir().new_dir(self.name()))
self.configure()
@ -80,7 +80,7 @@ class SysmoBts(log.Origin):
self.launch_remote('osmo-bts-sysmo',
('LD_LIBRARY_PATH=%s' % remote_lib,
remote_binary, '-c', remote_config_file, '-r', '1',
'-i', self.nitb.addr()),
'-i', self.bsc.addr()),
remote_cwd=remote_run_dir)
def _process_remote(self, name, popen_args, remote_cwd=None):
@ -109,8 +109,8 @@ class SysmoBts(log.Origin):
proc.raise_exn('Exited in error')
def configure(self):
if self.nitb is None:
raise RuntimeError('BTS needs to be added to a NITB before it can be configured')
if self.bsc is None:
raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be configured')
self.remote_addr = self.conf.get('addr')
@ -119,7 +119,7 @@ class SysmoBts(log.Origin):
values = { 'osmo_bts_sysmo': config.get_defaults('osmo_bts_sysmo') }
config.overlay(values, self.suite_run.config())
config.overlay(values, { 'osmo_bts_sysmo': { 'oml_remote_ip': self.nitb.addr() } })
config.overlay(values, { 'osmo_bts_sysmo': { 'oml_remote_ip': self.bsc.addr() } })
config.overlay(values, { 'osmo_bts_sysmo': self.conf })
self.dbg('SYSMOBTS CONFIG:\n' + pprint.pformat(values))
@ -129,14 +129,14 @@ class SysmoBts(log.Origin):
self.dbg(r)
f.write(r)
def conf_for_nitb(self):
values = config.get_defaults('nitb_bts')
def conf_for_bsc(self):
values = config.get_defaults('bsc_bts')
config.overlay(values, config.get_defaults('osmo_bts_sysmo'))
config.overlay(values, self.conf)
self.dbg(conf=values)
return values
def set_nitb(self, nitb):
self.nitb = nitb
def set_bsc(self, bsc):
self.bsc = bsc
# vim: expandtab tabstop=4 shiftwidth=4

View File

@ -74,7 +74,7 @@ class OsmoNitb(log.Origin):
bts_list = []
for bts in self.bts:
bts_list.append(bts.conf_for_nitb())
bts_list.append(bts.conf_for_bsc())
config.overlay(values, dict(nitb=dict(net=dict(bts_list=bts_list))))
self.dbg('NITB CONFIG:\n' + pprint.pformat(values))
@ -89,7 +89,7 @@ class OsmoNitb(log.Origin):
def bts_add(self, bts):
self.bts.append(bts)
bts.set_nitb(self)
bts.set_bsc(self)
def subscriber_add(self, modem, msisdn=None):
if msisdn is None: