From 82aed176a824d64925142a140e3b0e7c67045508 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Mon, 28 Aug 2017 18:07:40 +0200 Subject: Reserve ARFCN dynamically based on BTS band support Instead of statically specifying a band for a BTS to use, declare a list of supported bands for each BTS. At the time of BTS object creation, ask the BTS for band support and try to dynamically reserve an ARFCN resource which is compatible with any of the bands supported by the BTS. All this happens transparently to the test. Still, the test may want to use a specific band / arfcn. In this case, a test can use suite.reserve_arfcn(band, arfcn) to reserve a specific band/arfcn and pass that to the BTS at creation time, which will then use that one instead of trying to find a suitable one. It is left as future work to support BTs with multiple TRX, in which case several arfcn must be reserved. It should not be that difficult, mostly using "times: X" where X is the amount of trx, changing the API to use a list of arfcns and the configure() methods of the BTS. Related: OS#2230 Change-Id: I6fb5d95bed1fa50c3deaf62a7a6df3cb276bc3c9 --- selftest/resource_test.ok | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) (limited to 'selftest/resource_test.ok') diff --git a/selftest/resource_test.ok b/selftest/resource_test.ok index 09c276a..9b2fd64 100644 --- a/selftest/resource_test.ok +++ b/selftest/resource_test.ok @@ -46,16 +46,16 @@ cnf ResourcesPool: DBG: Found path state_dir as [PATH]/selftest/conf/test_work/s {'_hash': 'dc9ce027a257da087f31a5bc1ee6b4abd2637369', 'arfcn': '548', 'band': 'GSM-1900'}], - 'bts': [{'_hash': '377ac78d5404b826d40c84efd04b4a9fd4e62b7e', + 'bts': [{'_hash': '2769d8f6cfe22f15e7dbd14f7ce929db2e56bdf3', 'addr': '10.42.42.114', - 'band': 'GSM-1800', + 'bands': ['GSM-850', 'GSM-900', 'GSM-1800', 'GSM-1900'], 'ciphers': ['a5_0', 'a5_1'], 'ipa_unit_id': '1', 'label': 'sysmoBTS 1002', 'type': 'osmo-bts-sysmo'}, {'_hash': '6a9c9fbd364e1563a5b9f0826030a7888fd19575', 'addr': '10.42.42.50', - 'band': 'GSM-1800', + 'bands': ['GSM-1800'], 'ciphers': ['a5_0', 'a5_1'], 'ipa_unit_id': '6', 'label': 'Ettus B200', @@ -63,7 +63,7 @@ cnf ResourcesPool: DBG: Found path state_dir as [PATH]/selftest/conf/test_work/s 'type': 'osmo-bts-trx'}, {'_hash': 'e50fd38e3bfe8039ac13bc315bc84f46110b7443', 'addr': '10.42.42.51', - 'band': 'GSM-1800', + 'bands': ['GSM-1800'], 'ciphers': ['a5_0', 'a5_1'], 'ipa_unit_id': '7', 'label': 'sysmoCell 5000', @@ -118,9 +118,13 @@ cnf ResourcesPool: DBG: Found path state_dir as [PATH]/selftest/conf/test_work/s arfcn: '514' band: GSM-1800 --- testowner: Reserving 2 x bts (candidates: 3) ---- testowner: DBG: Picked - _hash: 377ac78d5404b826d40c84efd04b4a9fd4e62b7e +--- testowner: DBG: Picked - _hash: 2769d8f6cfe22f15e7dbd14f7ce929db2e56bdf3 addr: 10.42.42.114 - band: GSM-1800 + bands: + - GSM-850 + - GSM-900 + - GSM-1800 + - GSM-1900 ciphers: - a5_0 - a5_1 @@ -129,7 +133,8 @@ cnf ResourcesPool: DBG: Found path state_dir as [PATH]/selftest/conf/test_work/s type: osmo-bts-sysmo - _hash: 6a9c9fbd364e1563a5b9f0826030a7888fd19575 addr: 10.42.42.50 - band: GSM-1800 + bands: + - GSM-1800 ciphers: - a5_0 - a5_1 @@ -170,10 +175,14 @@ arfcn: arfcn: '514' band: GSM-1800 bts: -- _hash: 377ac78d5404b826d40c84efd04b4a9fd4e62b7e +- _hash: 2769d8f6cfe22f15e7dbd14f7ce929db2e56bdf3 _reserved_by: testowner-123-1490837279 addr: 10.42.42.114 - band: GSM-1800 + bands: + - GSM-850 + - GSM-900 + - GSM-1800 + - GSM-1900 ciphers: - a5_0 - a5_1 @@ -183,7 +192,8 @@ bts: - _hash: 6a9c9fbd364e1563a5b9f0826030a7888fd19575 _reserved_by: testowner-123-1490837279 addr: 10.42.42.50 - band: GSM-1800 + bands: + - GSM-1800 ciphers: - a5_0 - a5_1 -- cgit v1.2.3