summaryrefslogtreecommitdiffstats
path: root/src/osmo_gsm_tester/resource.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/osmo_gsm_tester/resource.py')
-rw-r--r--src/osmo_gsm_tester/resource.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py
index a4643ac..34901b9 100644
--- a/src/osmo_gsm_tester/resource.py
+++ b/src/osmo_gsm_tester/resource.py
@@ -53,7 +53,7 @@ RESOURCES_SCHEMA = {
'bts[].type': schema.STR,
'bts[].ipa_unit_id': schema.UINT,
'bts[].addr': schema.IPV4,
- 'bts[].band': schema.BAND,
+ 'bts[].bands[]': schema.BAND,
'bts[].trx_remote_ip': schema.IPV4,
'bts[].launch_trx': schema.BOOL_STR,
'bts[].ciphers[]': schema.CIPHER,
@@ -533,6 +533,11 @@ class ReservedResources(log.Origin):
for item in item_list:
item.pop(USED_KEY, None)
+ def add(self, more):
+ if more is self or more is self.reserved:
+ raise RuntimeError('adding a list of reserved resources to itself')
+ config.add(self.reserved, copy.deepcopy(more.reserved))
+
def free(self):
if self.reserved:
self.resources_pool.free(self.origin, self.reserved)