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/selftest/suite_test.ok b/selftest/suite_test.ok
index 2808474..049f7b4 100644
--- a/selftest/suite_test.ok
+++ b/selftest/suite_test.ok
@@ -31,7 +31,7 @@
 tst test_suite: reserving resources in [PATH]/selftest/suite_test/test_work/state_dir ...
 tst test_suite: DBG: {combining='resources'}
 tst {combining_scenarios='resources'}: DBG: {definition_conf={bts=[{'times': '1'}], ip_address=[{'times': '1'}], modem=[{'times': '2'}]}}  [test_suite↪{combining_scenarios='resources'}]
-tst test_suite: Reserving 1 x bts (candidates: 3)
+tst test_suite: Reserving 1 x bts (candidates: 6)
 tst test_suite: DBG: Picked - _hash: 07d9c8aaa940b674efcbbabdd69f58a6ce4e94f9
   addr: 10.42.42.114
   band: GSM-1800
diff --git a/selftest/suite_test/resources.conf b/selftest/suite_test/resources.conf
index 2005590..001d286 100644
--- a/selftest/suite_test/resources.conf
+++ b/selftest/suite_test/resources.conf
@@ -28,6 +28,36 @@
   trx_list:
   - hw_addr: 00:02:95:00:41:b3
 
+- label: Ettus B200
+  type: osmo-bts-trx
+  ipa_unit_id: 6
+  addr: 10.42.42.52
+  band: GSM-1800
+  launch_trx: true
+  trx_list:
+  - nominal_power: 10
+  - nominal_power: 12
+
+- label: sysmoCell 5000
+  type: osmo-bts-trx
+  ipa_unit_id: 7
+  addr: 10.42.42.53
+  band: GSM-1800
+  trx_remote_ip: 10.42.42.112
+  trx_list:
+  - nominal_power: 10
+  - nominal_power: 12
+
+- label: sysmoCell 5000
+  type: osmo-bts-trx
+  ipa_unit_id: 7
+  addr: 10.42.42.53
+  band: GSM-1800
+  trx_remote_ip: 10.42.42.112
+  trx_list:
+  - nominal_power: 10
+  - nominal_power: 12
+
 arfcn:
   - arfcn: 512
     band: GSM-1800
diff --git a/selftest/template_test.ok b/selftest/template_test.ok
index 5af4b6a..5bd32a4 100644
--- a/selftest/template_test.ok
+++ b/selftest/template_test.ok
@@ -54,7 +54,7 @@
   trx 0
    rf_locked 0
    arfcn val_trx_arfcn_trx0
-   nominal power 23
+   nominal power val_trx_nominal_power_trx0
    max_power_red val_trx_max_power_red_trx0
    rsl e1 tei 0
    timeslot 0
@@ -68,7 +68,7 @@
   trx 1
    rf_locked 0
    arfcn val_trx_arfcn_trx1
-   nominal power 23
+   nominal power val_trx_nominal_power_trx1
    max_power_red val_trx_max_power_red_trx1
    rsl e1 tei 0
    timeslot 0
@@ -98,7 +98,7 @@
   trx 0
    rf_locked 0
    arfcn val_trx_arfcn_trx0
-   nominal power 23
+   nominal power val_trx_nominal_power_trx0
    max_power_red val_trx_max_power_red_trx0
    rsl e1 tei 0
    timeslot 0
@@ -112,7 +112,7 @@
   trx 1
    rf_locked 0
    arfcn val_trx_arfcn_trx1
-   nominal power 23
+   nominal power val_trx_nominal_power_trx1
    max_power_red val_trx_max_power_red_trx1
    rsl e1 tei 0
    timeslot 0
diff --git a/selftest/template_test.py b/selftest/template_test.py
index f8c32a5..769df49 100755
--- a/selftest/template_test.py
+++ b/selftest/template_test.py
@@ -27,9 +27,11 @@
     'stream_id': 'val_bts.stream_id',
     'trx_list': (
             dict(arfcn='val_trx_arfcn_trx0',
+                nominal_power='val_trx_nominal_power_trx0',
                 max_power_red='val_trx_max_power_red_trx0',
                 timeslot_list=mock_timeslot_list),
             dict(arfcn='val_trx_arfcn_trx1',
+                nominal_power='val_trx_nominal_power_trx1',
                 max_power_red='val_trx_max_power_red_trx1',
                 timeslot_list=mock_timeslot_list),
             )