summaryrefslogtreecommitdiffstats
path: root/src/osmo_gsm_tester/config.py
diff options
context:
space:
mode:
authorYour Name <you@example.com>2017-04-13 03:11:59 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-04-13 03:39:07 +0200
commit44af3415a5b1d1e8348b81d983578f3cd8ac05f9 (patch)
tree3cb8327c84bbc1613bf28483ab871009a447094a /src/osmo_gsm_tester/config.py
parent17c139ef4c8aaea9477ba34092fe453afd417c49 (diff)
fix octphy, fix conf, improve logging
Clearly separate the kinds of BTS hardware the GSM tester knows ('type') from the NITB's bts/type config item ('osmobsc_bts_type' -- not 'osmonitb_...' to stay in tune with future developments: it is the libbsc that needs this). For BTS hardware kinds, use the full name of the binary for osmo driven models: osmo-bts-sysmo, osmo-bts-trx, osmo-bts-octphy. Change-Id: I1aa9b48e74013a93f9db1a34730f17717fb3b36c
Diffstat (limited to 'src/osmo_gsm_tester/config.py')
-rw-r--r--src/osmo_gsm_tester/config.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/osmo_gsm_tester/config.py b/src/osmo_gsm_tester/config.py
index cbbfa6f..68bbd13 100644
--- a/src/osmo_gsm_tester/config.py
+++ b/src/osmo_gsm_tester/config.py
@@ -177,6 +177,12 @@ def get_defaults(for_kind):
defaults = read_config_file('default.conf', if_missing_return={})
return defaults.get(for_kind, {})
+class Scenario(log.Origin, dict):
+ def __init__(self, name, path):
+ self.set_name(name)
+ self.set_log_category(log.C_TST)
+ self.path = path
+
def get_scenario(name, validation_schema=None):
scenarios_dir = get_scenarios_dir()
if not name.endswith('.conf'):
@@ -184,7 +190,9 @@ def get_scenario(name, validation_schema=None):
path = scenarios_dir.child(name)
if not os.path.isfile(path):
raise RuntimeError('No such scenario file: %r' % path)
- return read(path, validation_schema=validation_schema)
+ sc = Scenario(name, path)
+ sc.update(read(path, validation_schema=validation_schema))
+ return sc
def add(dest, src):
if is_dict(dest):