nominal_power and max_power_red attrs can now be set per resource
Before this commit, only max_power_red was specified and it could only
be used as a defaults and could not be set per object. Together with
nominal_power, it can be useful to be able to set them to different
values for different objects, as for example different osmo-bts-trx
objects can require different values.
Change-Id: I472742e98052cc39686d38c945be76d7f50eeebd
diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py
index 8f34bdb..7ba6e72 100644
--- a/src/osmo_gsm_tester/resource.py
+++ b/src/osmo_gsm_tester/resource.py
@@ -58,6 +58,8 @@
'bts[].launch_trx': schema.BOOL_STR,
'bts[].trx_list[].hw_addr': schema.HWADDR,
'bts[].trx_list[].net_device': schema.STR,
+ 'bts[].trx_list[].nominal_power': schema.UINT,
+ 'bts[].trx_list[].max_power_red': schema.UINT,
'arfcn[].arfcn': schema.INT,
'arfcn[].band': schema.BAND,
'modem[].label': schema.STR,
diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
index 57ab8a3..14aa62d 100644
--- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
+++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
@@ -61,7 +61,7 @@
trx ${loop.index}
rf_locked 0
arfcn ${trx.arfcn}
- nominal power 23
+ nominal power ${trx.nominal_power}
max_power_red ${trx.max_power_red}
rsl e1 tei 0
% for ts in trx.timeslot_list:
diff --git a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl
index d2927f9..fbafc8e 100644
--- a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl
+++ b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl
@@ -54,7 +54,7 @@
trx ${loop.index}
rf_locked 0
arfcn ${trx.arfcn}
- nominal power 23
+ nominal power ${trx.nominal_power}
max_power_red ${trx.max_power_red}
rsl e1 tei 0
% for ts in trx.timeslot_list: