This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Pau Espin Pedrol gerrit-no-reply at lists.osmocom.orgPau Espin Pedrol has submitted this change and it was merged. Change subject: Configure bsc and msc to connect to the specific stp provided in test ...................................................................... Configure bsc and msc to connect to the specific stp provided in test Change-Id: I89deaa71956131766fec8fcc3bc7381ebb0e187f --- M src/osmo_gsm_tester/osmo_bsc.py M src/osmo_gsm_tester/osmo_msc.py M src/osmo_gsm_tester/osmo_stp.py M src/osmo_gsm_tester/suite.py M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl M src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl M src/osmo_gsm_tester/templates/osmo-stp.cfg.tmpl M suites/aoip_debug/interactive.py M suites/aoip_encryption/register_a5_0_authopt.py M suites/aoip_encryption/register_a5_0_authreq.py M suites/aoip_encryption/register_a5_1_authreq.py M suites/aoip_smpp/esme_connect_policy_acceptall.py M suites/aoip_smpp/esme_connect_policy_closed.py M suites/aoip_smpp/esme_ms_sms_storeforward.py M suites/aoip_smpp/esme_ms_sms_transaction.py M suites/aoip_sms/mo_mt_sms.py M suites/aoip_ussd/assert_extension.py M suites/voice/mo_mt_call.py 18 files changed, 53 insertions(+), 30 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/osmo_bsc.py b/src/osmo_gsm_tester/osmo_bsc.py index 736fe8f..6d84cf5 100644 --- a/src/osmo_gsm_tester/osmo_bsc.py +++ b/src/osmo_gsm_tester/osmo_bsc.py @@ -31,14 +31,16 @@ bts = None encryption = None mgw = None + stp = None - def __init__(self, suite_run, msc, mgw, ip_address): + def __init__(self, suite_run, msc, mgw, stp, 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 + self.stp = stp def start(self): self.log('Starting osmo-bsc') @@ -76,6 +78,7 @@ 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()) + config.overlay(values, self.stp.conf_for_client()) bts_list = [] for bts in self.bts: diff --git a/src/osmo_gsm_tester/osmo_msc.py b/src/osmo_gsm_tester/osmo_msc.py index 67234e3..cdeec1b 100644 --- a/src/osmo_gsm_tester/osmo_msc.py +++ b/src/osmo_gsm_tester/osmo_msc.py @@ -31,15 +31,17 @@ hlr = None config = None smsc = None + stp = None encryption = None authentication = None - def __init__(self, suite_run, hlr, mgcpgw, ip_address): + def __init__(self, suite_run, hlr, mgcpgw, stp, ip_address): super().__init__(log.C_RUN, 'osmo-msc_%s' % ip_address.get('addr')) self.suite_run = suite_run self.ip_address = ip_address self.hlr = hlr self.mgcpgw = mgcpgw + self.stp = stp self.smsc = smsc.Smsc((ip_address.get('addr'), 2775)) def start(self): @@ -77,6 +79,7 @@ config.overlay(values, dict(msc=dict(ip_address=self.ip_address))) config.overlay(values, self.mgcpgw.conf_for_msc()) config.overlay(values, self.hlr.conf_for_msc()) + config.overlay(values, self.stp.conf_for_client()) config.overlay(values, self.smsc.get_config()) # runtime parameters: diff --git a/src/osmo_gsm_tester/osmo_stp.py b/src/osmo_gsm_tester/osmo_stp.py index cc3906f..c4c6c04 100644 --- a/src/osmo_gsm_tester/osmo_stp.py +++ b/src/osmo_gsm_tester/osmo_stp.py @@ -48,10 +48,9 @@ if not os.path.isdir(lib): raise RuntimeError('No lib/ in %r' % inst) - # TODO: osmo-stp is not yet configurable to a specific IP address - #iface = util.ip_to_iface(self.addr()) - #pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), iface, - # 'host %s and port not 22' % self.addr()) + iface = util.ip_to_iface(self.addr()) + pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), iface, + 'host %s and port not 22' % self.addr()) env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } @@ -78,6 +77,9 @@ self.dbg(r) f.write(r) + def conf_for_client(self): + return dict(stp=dict(ip_address=self.ip_address)) + def addr(self): return self.ip_address.get('addr') diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 25aef35..2d04937 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -240,15 +240,15 @@ ip_address = self.ip_address() return osmo_mgw.OsmoMgw(self, ip_address) - def msc(self, hlr, mgcpgw, ip_address=None): + def msc(self, hlr, mgcpgw, stp, ip_address=None): if ip_address is None: ip_address = self.ip_address() - return osmo_msc.OsmoMsc(self, hlr, mgcpgw, ip_address) + return osmo_msc.OsmoMsc(self, hlr, mgcpgw, stp, ip_address) - def bsc(self, msc, mgw, ip_address=None): + def bsc(self, msc, mgw, stp, ip_address=None): if ip_address is None: ip_address = self.ip_address() - return osmo_bsc.OsmoBsc(self, msc, mgw, ip_address) + return osmo_bsc.OsmoBsc(self, msc, mgw, stp, ip_address) def stp(self, ip_address=None): if ip_address is None: diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl index 2f06710..1b21e63 100644 --- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl @@ -15,6 +15,11 @@ ipa bind ${bsc.ip_address.addr} cs7 instance 1 point-code 0.0.2 + asp asp0 2905 0 m3ua + remote-ip ${stp.ip_address.addr} + as as0 m3ua + asp asp0 + routing-key 2 0.0.2 sccp-address bsc_local point-code 0.0.2 routing-indicator PC diff --git a/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl index 9ac68b3..149833a 100644 --- a/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl @@ -19,6 +19,11 @@ authentication ${msc.net.authentication} cs7 instance 0 point-code 0.0.1 + asp asp0 2905 0 m3ua + remote-ip ${stp.ip_address.addr} + as as0 m3ua + asp asp0 + routing-key 1 0.0.1 msc mgw remote-ip ${mgw.ip_address.addr} assign-tmsi diff --git a/src/osmo_gsm_tester/templates/osmo-stp.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-stp.cfg.tmpl index eb6ac1d..6504b9e 100644 --- a/src/osmo_gsm_tester/templates/osmo-stp.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-stp.cfg.tmpl @@ -14,3 +14,4 @@ xua rkm routing-key-allocation dynamic-permitted listen m3ua 2905 accept-asp-connections dynamic-permitted + local-ip ${stp.ip_address.addr} diff --git a/suites/aoip_debug/interactive.py b/suites/aoip_debug/interactive.py index 98b9170..cad68b7 100755 --- a/suites/aoip_debug/interactive.py +++ b/suites/aoip_debug/interactive.py @@ -4,9 +4,9 @@ bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) mgw_bsc = suite.mgw() -msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() +msc = suite.msc(hlr, mgcpgw, stp) +bsc = suite.bsc(msc, mgw_bsc, stp) modems = suite.modems(int(prompt('How many modems?'))) hlr.start() diff --git a/suites/aoip_encryption/register_a5_0_authopt.py b/suites/aoip_encryption/register_a5_0_authopt.py index f528742..75614e2 100755 --- a/suites/aoip_encryption/register_a5_0_authopt.py +++ b/suites/aoip_encryption/register_a5_0_authopt.py @@ -5,9 +5,9 @@ bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) mgw_bsc = suite.mgw() -msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() +msc = suite.msc(hlr, mgcpgw, stp) +bsc = suite.bsc(msc, mgw_bsc, stp) ms = suite.modem() print('start network...') diff --git a/suites/aoip_encryption/register_a5_0_authreq.py b/suites/aoip_encryption/register_a5_0_authreq.py index a192ff3..07293d2 100755 --- a/suites/aoip_encryption/register_a5_0_authreq.py +++ b/suites/aoip_encryption/register_a5_0_authreq.py @@ -5,9 +5,9 @@ bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) mgw_bsc = suite.mgw() -msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() +msc = suite.msc(hlr, mgcpgw, stp) +bsc = suite.bsc(msc, mgw_bsc, stp) ms = suite.modem() print('start network...') diff --git a/suites/aoip_encryption/register_a5_1_authreq.py b/suites/aoip_encryption/register_a5_1_authreq.py index f5bccfb..190e5bb 100755 --- a/suites/aoip_encryption/register_a5_1_authreq.py +++ b/suites/aoip_encryption/register_a5_1_authreq.py @@ -5,9 +5,9 @@ bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) mgw_bsc = suite.mgw() -msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() +msc = suite.msc(hlr, mgcpgw, stp) +bsc = suite.bsc(msc, mgw_bsc, stp) ms = suite.modem() print('start network...') diff --git a/suites/aoip_smpp/esme_connect_policy_acceptall.py b/suites/aoip_smpp/esme_connect_policy_acceptall.py index 34516a3..ef5db4e 100755 --- a/suites/aoip_smpp/esme_connect_policy_acceptall.py +++ b/suites/aoip_smpp/esme_connect_policy_acceptall.py @@ -9,7 +9,8 @@ hlr = suite.hlr() bts = suite.bts() # bts not started, only needed for mgcpgw mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) -msc = suite.msc(hlr, mgcpgw) +stp = suite.stp() +msc = suite.msc(hlr, mgcpgw, stp) smsc = msc.smsc esme = suite.esme() @@ -18,6 +19,7 @@ smsc.set_smsc_policy(smsc.SMSC_POLICY_ACCEPT_ALL) esme.set_smsc(smsc) +stp.start() hlr.start() msc.start() mgcpgw.start() diff --git a/suites/aoip_smpp/esme_connect_policy_closed.py b/suites/aoip_smpp/esme_connect_policy_closed.py index 79cb0c7..263b428 100755 --- a/suites/aoip_smpp/esme_connect_policy_closed.py +++ b/suites/aoip_smpp/esme_connect_policy_closed.py @@ -14,7 +14,8 @@ hlr = suite.hlr() bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) -msc = suite.msc(hlr, mgcpgw) +stp = suite.stp() +msc = suite.msc(hlr, mgcpgw, stp) smsc = msc.smsc esme = suite.esme() @@ -25,6 +26,7 @@ smsc.esme_add(esme) smsc.esme_add(esme_no_pwd) +stp.start() hlr.start() msc.start() mgcpgw.start() diff --git a/suites/aoip_smpp/esme_ms_sms_storeforward.py b/suites/aoip_smpp/esme_ms_sms_storeforward.py index f0d5dd5..79c570e 100755 --- a/suites/aoip_smpp/esme_ms_sms_storeforward.py +++ b/suites/aoip_smpp/esme_ms_sms_storeforward.py @@ -16,9 +16,9 @@ bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) mgw_bsc = suite.mgw() -msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() +msc = suite.msc(hlr, mgcpgw, stp) +bsc = suite.bsc(msc, mgw_bsc, stp) bsc.bts_add(bts) ms = suite.modem() diff --git a/suites/aoip_smpp/esme_ms_sms_transaction.py b/suites/aoip_smpp/esme_ms_sms_transaction.py index 2b12829..e20b2b6 100755 --- a/suites/aoip_smpp/esme_ms_sms_transaction.py +++ b/suites/aoip_smpp/esme_ms_sms_transaction.py @@ -14,9 +14,9 @@ bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) mgw_bsc = suite.mgw() -msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() +msc = suite.msc(hlr, mgcpgw, stp) +bsc = suite.bsc(msc, mgw_bsc, stp) bsc.bts_add(bts) ms = suite.modem() diff --git a/suites/aoip_sms/mo_mt_sms.py b/suites/aoip_sms/mo_mt_sms.py index 12f8f2b..76b7e51 100755 --- a/suites/aoip_sms/mo_mt_sms.py +++ b/suites/aoip_sms/mo_mt_sms.py @@ -5,9 +5,9 @@ bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) mgw_bsc = suite.mgw() -msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() +msc = suite.msc(hlr, mgcpgw, stp) +bsc = suite.bsc(msc, mgw_bsc, stp) ms_mo = suite.modem() ms_mt = suite.modem() diff --git a/suites/aoip_ussd/assert_extension.py b/suites/aoip_ussd/assert_extension.py index 5204be8..181f07f 100755 --- a/suites/aoip_ussd/assert_extension.py +++ b/suites/aoip_ussd/assert_extension.py @@ -7,9 +7,9 @@ bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) mgw_bsc = suite.mgw() -msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() +msc = suite.msc(hlr, mgcpgw, stp) +bsc = suite.bsc(msc, mgw_bsc, stp) ms = suite.modem() hlr.start() diff --git a/suites/voice/mo_mt_call.py b/suites/voice/mo_mt_call.py index b2d6f8d..46c5ec8 100755 --- a/suites/voice/mo_mt_call.py +++ b/suites/voice/mo_mt_call.py @@ -5,9 +5,9 @@ bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) mgw_bsc = suite.mgw() -msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() +msc = suite.msc(hlr, mgcpgw, stp) +bsc = suite.bsc(msc, mgw_bsc, stp) ms_mo = suite.modem() ms_mt = suite.modem() -- To view, visit https://gerrit.osmocom.org/4857 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I89deaa71956131766fec8fcc3bc7381ebb0e187f Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de> Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>