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
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 @@
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 @@
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):