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/.
Neels Hofmeyr gerrit-no-reply at lists.osmocom.orgReview at https://gerrit.osmocom.org/2681 rename resource nitb_iface to eth_iface I would like to use the interface addresses also for OsmoBSC processes. The only real distinction we need is public versus loopback interface. So 'eth' indicates public, while 'lo_iface' or 'loopback_iface' can be added later. Change-Id: I829903d7b2111ab5ee106bce52d6121204a5a401 --- M example/resources.conf M selftest/conf/resources.conf M selftest/resource_test.ok M selftest/resource_test.py M selftest/suite_test.ok M selftest/suite_test/resources.conf M selftest/suite_test/test_suite/mo_mt_sms.py M selftest/suite_test/test_suite/mo_sms.py M selftest/suite_test/test_suite/suite.conf M selftest/template_test.ok M selftest/template_test.py M src/osmo_gsm_tester/osmo_msc.py M src/osmo_gsm_tester/osmo_nitb.py M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/suite.py M src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl M suites/debug/suite.conf M suites/sms/suite.conf 18 files changed, 61 insertions(+), 61 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/81/2681/1 diff --git a/example/resources.conf b/example/resources.conf index cd0216e..097d242 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -1,6 +1,6 @@ # all hardware and interfaces available to this osmo-gsm-tester -nitb_iface: +eth_iface: - addr: 10.42.42.1 - addr: 10.42.42.2 - addr: 10.42.42.3 diff --git a/selftest/conf/resources.conf b/selftest/conf/resources.conf index 178e13c..50ad2dc 100644 --- a/selftest/conf/resources.conf +++ b/selftest/conf/resources.conf @@ -1,6 +1,6 @@ # all hardware and interfaces available to this osmo-gsm-tester -nitb_iface: +eth_iface: - addr: 10.42.42.1 - addr: 10.42.42.2 - addr: 10.42.42.3 diff --git a/selftest/resource_test.ok b/selftest/resource_test.ok index db6a8bf..2c76c11 100644 --- a/selftest/resource_test.ok +++ b/selftest/resource_test.ok @@ -66,6 +66,12 @@ 'label': 'nanoBTS 1900', 'trx_list': [{'hw_addr': '00:02:95:00:41:b3'}], 'type': 'nanobts'}], + 'eth_iface': [{'_hash': 'cde1debf28f07f94f92c761b4b7c6bf35785ced4', + 'addr': '10.42.42.1'}, + {'_hash': 'fd103b22c7cf2480d609150e06f4bbd92ac78d8c', + 'addr': '10.42.42.2'}, + {'_hash': '1c614d6210c551d142aadca8f25e1534ebb2a70f', + 'addr': '10.42.42.3'}], 'modem': [{'_hash': '19c69e45aa090fb511446bd00797690aa82ff52f', 'imsi': '901700000007801', 'ki': 'D620F48487B1B782DA55DF6717F08FF9', @@ -145,13 +151,7 @@ 'imsi': '901700000007816', 'ki': 'BF827D219E739DD189F6F59E60D6455C', 'label': 'm7816', - 'path': '/wavecom_15'}], - 'nitb_iface': [{'_hash': 'cde1debf28f07f94f92c761b4b7c6bf35785ced4', - 'addr': '10.42.42.1'}, - {'_hash': 'fd103b22c7cf2480d609150e06f4bbd92ac78d8c', - 'addr': '10.42.42.2'}, - {'_hash': '1c614d6210c551d142aadca8f25e1534ebb2a70f', - 'addr': '10.42.42.3'}]} + 'path': '/wavecom_15'}]} *** end: all resources - request some resources @@ -177,6 +177,9 @@ trx_list: - hw_addr: 00:0c:90:32:b5:8a type: oct +--- testowner: Reserving 1 x eth_iface (candidates: 3) +--- testowner: DBG: Picked - _hash: cde1debf28f07f94f92c761b4b7c6bf35785ced4 + addr: 10.42.42.1 --- testowner: Reserving 2 x modem (candidates: 16) --- testowner: DBG: Picked - _hash: 19c69e45aa090fb511446bd00797690aa82ff52f imsi: '901700000007801' @@ -188,9 +191,6 @@ ki: 47FDB2D55CE6A10A85ABDAD034A5B7B3 label: m7802 path: /wavecom_1 ---- testowner: Reserving 1 x nitb_iface (candidates: 3) ---- testowner: DBG: Picked - _hash: cde1debf28f07f94f92c761b4b7c6bf35785ced4 - addr: 10.42.42.1 ~~~ currently reserved: arfcn: - _hash: e620569450f8259b3f0212ec19c285dd07df063c @@ -218,6 +218,10 @@ trx_list: - hw_addr: 00:0c:90:32:b5:8a type: oct +eth_iface: +- _hash: cde1debf28f07f94f92c761b4b7c6bf35785ced4 + _reserved_by: testowner-123-1490837279 + addr: 10.42.42.1 modem: - _hash: 19c69e45aa090fb511446bd00797690aa82ff52f _reserved_by: testowner-123-1490837279 @@ -231,10 +235,6 @@ ki: 47FDB2D55CE6A10A85ABDAD034A5B7B3 label: m7802 path: /wavecom_1 -nitb_iface: -- _hash: cde1debf28f07f94f92c761b4b7c6bf35785ced4 - _reserved_by: testowner-123-1490837279 - addr: 10.42.42.1 ~~~ end: currently reserved diff --git a/selftest/resource_test.py b/selftest/resource_test.py index 2d0f880..9085df7 100755 --- a/selftest/resource_test.py +++ b/selftest/resource_test.py @@ -72,7 +72,7 @@ print('- request some resources') want = { - 'nitb_iface': [ { 'times': 1 } ], + 'eth_iface': [ { 'times': 1 } ], 'bts': [ { 'type': 'sysmo', 'times': 1 }, { 'type': 'oct', 'times': 1 } ], 'arfcn': [ { 'band': 'GSM-1800', 'times': 2 } ], 'modem': [ { 'times': 2 } ], diff --git a/selftest/suite_test.ok b/selftest/suite_test.ok index fda77dc..8811fc3 100644 --- a/selftest/suite_test.ok +++ b/selftest/suite_test.ok @@ -16,10 +16,10 @@ resources: bts: - times: '1' + eth_iface: + - times: '1' modem: - times: '2' - nitb_iface: - - times: '1' - run hello world test cnf -: DBG: Found config file resources.conf as [PATH]/selftest/suite_test/resources.conf in ./suite_test which is [PATH]/selftest/suite_test @@ -27,7 +27,7 @@ tst test_suite: Suite run start tst test_suite: reserving resources in [PATH]/selftest/suite_test/test_work/state_dir ... tst test_suite: DBG: {combining='resources'} [test_suite↪test_suite] -tst test_suite: DBG: {definition_conf={bts=[{'times': '1'}], modem=[{'times': '2'}], nitb_iface=[{'times': '1'}]}} [test_suite↪(combining_scenarios='resources')↪test_suite] +tst test_suite: DBG: {definition_conf={bts=[{'times': '1'}], eth_iface=[{'times': '1'}], modem=[{'times': '2'}]}} [test_suite↪(combining_scenarios='resources')↪test_suite] tst test_suite: Reserving 1 x bts (candidates: 3) [test_suite↪test_suite] tst test_suite: DBG: Picked - _hash: 07d9c8aaa940b674efcbbabdd69f58a6ce4e94f9 addr: 10.42.42.114 @@ -35,6 +35,10 @@ ipa_unit_id: '1' label: sysmoBTS 1002 type: sysmo + [test_suite↪test_suite] +tst test_suite: Reserving 1 x eth_iface (candidates: 3) [test_suite↪test_suite] +tst test_suite: DBG: Picked - _hash: cde1debf28f07f94f92c761b4b7c6bf35785ced4 + addr: 10.42.42.1 [test_suite↪test_suite] tst test_suite: Reserving 2 x modem (candidates: 16) [test_suite↪test_suite] tst test_suite: DBG: Picked - _hash: 19c69e45aa090fb511446bd00797690aa82ff52f @@ -47,10 +51,6 @@ ki: 47FDB2D55CE6A10A85ABDAD034A5B7B3 label: m7802 path: /wavecom_1 - [test_suite↪test_suite] -tst test_suite: Reserving 1 x nitb_iface (candidates: 3) [test_suite↪test_suite] -tst test_suite: DBG: Picked - _hash: cde1debf28f07f94f92c761b4b7c6bf35785ced4 - addr: 10.42.42.1 [test_suite↪test_suite] tst hello_world.py:[LINENR] START [test_suite↪hello_world.py] tst hello_world.py:[LINENR]: hello world [test_suite↪hello_world.py:[LINENR]] diff --git a/selftest/suite_test/resources.conf b/selftest/suite_test/resources.conf index 178e13c..50ad2dc 100644 --- a/selftest/suite_test/resources.conf +++ b/selftest/suite_test/resources.conf @@ -1,6 +1,6 @@ # all hardware and interfaces available to this osmo-gsm-tester -nitb_iface: +eth_iface: - addr: 10.42.42.1 - addr: 10.42.42.2 - addr: 10.42.42.3 diff --git a/selftest/suite_test/test_suite/mo_mt_sms.py b/selftest/suite_test/test_suite/mo_mt_sms.py index cf44357..ee1e97e 100644 --- a/selftest/suite_test/test_suite/mo_mt_sms.py +++ b/selftest/suite_test/test_suite/mo_mt_sms.py @@ -1,10 +1,10 @@ -nitb_iface = resources.nitb_iface() +eth_iface = resources.eth_iface() nitb = resources.nitb() bts = resources.bts() ms_mo = resources.modem() ms_mt = resources.modem() -nitb.start(nitb_iface) +nitb.start(eth_iface) bts.start(nitb) nitb.add_subscriber(ms_mo, resources.msisdn()) diff --git a/selftest/suite_test/test_suite/mo_sms.py b/selftest/suite_test/test_suite/mo_sms.py index d9517dd..daa851f 100644 --- a/selftest/suite_test/test_suite/mo_sms.py +++ b/selftest/suite_test/test_suite/mo_sms.py @@ -1,11 +1,11 @@ -nitb_iface = resources.nitb_iface() +eth_iface = resources.eth_iface() nitb = resources.nitb() bts = resources.bts() ms_ext = resources.msisdn() fake_ext = resources.msisdn() ms = resources.modem() -nitb.configure(nitb_iface, bts) +nitb.configure(eth_iface, bts) bts.configure(nitb) nitb.start() diff --git a/selftest/suite_test/test_suite/suite.conf b/selftest/suite_test/test_suite/suite.conf index 4a03379..4c5e60c 100644 --- a/selftest/suite_test/test_suite/suite.conf +++ b/selftest/suite_test/test_suite/suite.conf @@ -1,5 +1,5 @@ resources: - nitb_iface: + eth_iface: - times: 1 bts: - times: 1 diff --git a/selftest/template_test.ok b/selftest/template_test.ok index 9ae8e62..8c3bcda 100644 --- a/selftest/template_test.ok +++ b/selftest/template_test.ok @@ -12,11 +12,11 @@ ! line vty no login - bind val_nitb_iface_addr + bind val_eth_iface_addr ! e1_input e1_line 0 driver ipa - ipa bind val_nitb_iface_addr + ipa bind val_eth_iface_addr network network country code val_mcc mobile network code val_mnc @@ -135,14 +135,14 @@ timeslot 3 phys_chan_config val_phys_chan_config_3 smpp - local-tcp-ip val_nitb_iface_addr 2775 + local-tcp-ip val_eth_iface_addr 2775 system-id test policy closed esme test password test default-route ctrl - bind val_nitb_iface_addr + bind val_eth_iface_addr - Testing: expect to fail on invalid templates dir sucess: setting non-existing templates dir raised RuntimeError diff --git a/selftest/template_test.py b/selftest/template_test.py index 31d9e80..bc9b200 100755 --- a/selftest/template_test.py +++ b/selftest/template_test.py @@ -58,7 +58,7 @@ bts_list=(mock_bts0, mock_bts1) ), ), - nitb_iface=dict(addr='val_nitb_iface_addr'), + eth_iface=dict(addr='val_eth_iface_addr'), ) print(template.render('osmo-nitb.cfg', vals)) diff --git a/src/osmo_gsm_tester/osmo_msc.py b/src/osmo_gsm_tester/osmo_msc.py index 5fefcf4..471869b 100644 --- a/src/osmo_gsm_tester/osmo_msc.py +++ b/src/osmo_gsm_tester/osmo_msc.py @@ -36,11 +36,11 @@ process = None bts = None - def __init__(self, suite_run, nitb_iface): + def __init__(self, suite_run, eth_iface): self.suite_run = suite_run - self.nitb_iface = nitb_iface + self.eth_iface = eth_iface self.set_log_category(log.C_RUN) - self.set_name('osmo-nitb_%s' % nitb_iface.get('addr')) + self.set_name('osmo-nitb_%s' % eth_iface.get('addr')) self.bts = [] def start(self): @@ -75,7 +75,7 @@ values = dict(nitb=config.get_defaults('nitb')) config.overlay(values, self.suite_run.config()) - config.overlay(values, dict(nitb_iface=self.nitb_iface)) + config.overlay(values, dict(eth_iface=self.eth_iface)) bts_list = [] for bts in self.bts: @@ -90,7 +90,7 @@ f.write(r) def addr(self): - return self.nitb_iface.get('addr') + return self.eth_iface.get('addr') def bts_add(self, bts): self.bts.append(bts) diff --git a/src/osmo_gsm_tester/osmo_nitb.py b/src/osmo_gsm_tester/osmo_nitb.py index 13dfe27..559d113 100644 --- a/src/osmo_gsm_tester/osmo_nitb.py +++ b/src/osmo_gsm_tester/osmo_nitb.py @@ -26,17 +26,17 @@ class OsmoNitb(log.Origin): suite_run = None - nitb_iface = None + eth_iface = None run_dir = None config_file = None process = None bts = None - def __init__(self, suite_run, nitb_iface): + def __init__(self, suite_run, eth_iface): self.suite_run = suite_run - self.nitb_iface = nitb_iface + self.eth_iface = eth_iface self.set_log_category(log.C_RUN) - self.set_name('osmo-nitb_%s' % nitb_iface.get('addr')) + self.set_name('osmo-nitb_%s' % eth_iface.get('addr')) self.bts = [] def start(self): @@ -71,7 +71,7 @@ values = dict(nitb=config.get_defaults('nitb')) config.overlay(values, self.suite_run.config()) - config.overlay(values, dict(nitb_iface=self.nitb_iface)) + config.overlay(values, dict(eth_iface=self.eth_iface)) bts_list = [] for bts in self.bts: @@ -86,7 +86,7 @@ f.write(r) def addr(self): - return self.nitb_iface.get('addr') + return self.eth_iface.get('addr') def bts_add(self, bts): self.bts.append(bts) diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 2a64772..24c493e 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -41,14 +41,14 @@ LAST_USED_MSISDN_FILE = 'last_used_msisdn.state' RESERVED_RESOURCES_FILE = 'reserved_resources.state' -R_NITB_IFACE = 'nitb_iface' +R_NITB_IFACE = 'eth_iface' R_BTS = 'bts' R_ARFCN = 'arfcn' R_MODEM = 'modem' R_ALL = (R_NITB_IFACE, R_BTS, R_ARFCN, R_MODEM) RESOURCES_SCHEMA = { - 'nitb_iface[].addr': schema.IPV4, + 'eth_iface[].addr': schema.IPV4, 'bts[].label': schema.STR, 'bts[].type': schema.STR, 'bts[].ipa_unit_id': schema.INT, @@ -115,7 +115,7 @@ sysmo and one of type oct, plus 2 ARFCNs in the 1800 band: { - 'nitb_iface': [ { 'times': 1 } ], + 'eth_iface': [ { 'times': 1 } ], 'bts': [ { 'type': 'sysmo', 'times': 1 }, { 'type': 'oct', 'times': 1 } ], 'arfcn': [ { 'band': 'GSM-1800', 'times': 2 } ], 'modem': [ { 'times': 2 } ], @@ -124,7 +124,7 @@ A times=1 value is implicit, so the above is equivalent to: { - 'nitb_iface': [ {} ], + 'eth_iface': [ {} ], 'bts': [ { 'type': 'sysmo' }, { 'type': 'oct' } ], 'arfcn': [ { 'band': 'GSM-1800', 'times': 2 } ], 'modem': [ { 'times': 2 } ], diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 43e55af..3e7f6e6 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -222,13 +222,13 @@ for process in self._processes: process.terminate() - def nitb_iface(self): + def eth_iface(self): return self.reserved_resources.get(resource.R_NITB_IFACE) - def nitb(self, nitb_iface=None): - if nitb_iface is None: - nitb_iface = self.nitb_iface() - return osmo_nitb.OsmoNitb(self, nitb_iface) + def nitb(self, eth_iface=None): + if eth_iface is None: + eth_iface = self.eth_iface() + return osmo_nitb.OsmoNitb(self, eth_iface) def bts(self): return bts_obj(self, self.reserved_resources.get(resource.R_BTS)) diff --git a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl index d7ab472..4a723fe 100644 --- a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl @@ -10,11 +10,11 @@ ! line vty no login - bind ${nitb_iface.addr} + bind ${eth_iface.addr} ! e1_input e1_line 0 driver ipa - ipa bind ${nitb_iface.addr} + ipa bind ${eth_iface.addr} network network country code ${nitb.net.mcc} mobile network code ${nitb.net.mnc} @@ -75,11 +75,11 @@ % endfor %endfor smpp - local-tcp-ip ${nitb_iface.addr} 2775 + local-tcp-ip ${eth_iface.addr} 2775 system-id test policy closed esme test password test default-route ctrl - bind ${nitb_iface.addr} + bind ${eth_iface.addr} diff --git a/suites/debug/suite.conf b/suites/debug/suite.conf index 04959b8..0dcd86f 100644 --- a/suites/debug/suite.conf +++ b/suites/debug/suite.conf @@ -1,5 +1,5 @@ resources: - nitb_iface: + eth_iface: - times: 1 bts: - times: 1 diff --git a/suites/sms/suite.conf b/suites/sms/suite.conf index 4a03379..4c5e60c 100644 --- a/suites/sms/suite.conf +++ b/suites/sms/suite.conf @@ -1,5 +1,5 @@ resources: - nitb_iface: + eth_iface: - times: 1 bts: - times: 1 -- To view, visit https://gerrit.osmocom.org/2681 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I829903d7b2111ab5ee106bce52d6121204a5a401 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>