Change in osmo-gsm-tester[master]: Add channel_allocator cfg attr to bts resources

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Thu Aug 23 15:52:07 UTC 2018


Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/10582


Change subject: Add channel_allocator cfg attr to bts resources
......................................................................

Add channel_allocator cfg attr to bts resources

Change-Id: I682809d4aeb91a36e3a35fc481e8d40d0b084fa0
---
M example/defaults.conf
M src/osmo_gsm_tester/resource.py
M src/osmo_gsm_tester/schema.py
M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
4 files changed, 10 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/82/10582/1

diff --git a/example/defaults.conf b/example/defaults.conf
index f7bd1b1..73188d5 100644
--- a/example/defaults.conf
+++ b/example/defaults.conf
@@ -28,6 +28,7 @@
   base_station_id_code: 63
   stream_id: 255
   osmobsc_bts_type: sysmobts
+  channel_allocator: ascending
   num_trx: 1
   max_trx: 1
   trx_list:
diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py
index 5204b61..e4e2f9d 100644
--- a/src/osmo_gsm_tester/resource.py
+++ b/src/osmo_gsm_tester/resource.py
@@ -58,6 +58,7 @@
         'bts[].launch_trx': schema.BOOL_STR,
         'bts[].direct_pcu': schema.BOOL_STR,
         'bts[].ciphers[]': schema.CIPHER,
+        'bts[].channel_allocator': schema.CHAN_ALLOCATOR,
         'bts[].num_trx': schema.UINT,
         'bts[].max_trx': schema.UINT,
         'bts[].trx_list[].addr': schema.IPV4,
diff --git a/src/osmo_gsm_tester/schema.py b/src/osmo_gsm_tester/schema.py
index 1473ad7..4a15bcd 100644
--- a/src/osmo_gsm_tester/schema.py
+++ b/src/osmo_gsm_tester/schema.py
@@ -105,6 +105,11 @@
         return
     raise ValueError('Unknown Physical channel config: %r' % val)
 
+def channel_allocator(val):
+    if val in ('ascending', 'descending'):
+        return
+    raise ValueError('Unknown Channel Allocator Policy %r' % val)
+
 INT = 'int'
 STR = 'str'
 UINT = 'uint'
@@ -120,6 +125,7 @@
 CIPHER = 'cipher'
 MODEM_FEATURE = 'modem_feature'
 PHY_CHAN = 'chan'
+CHAN_ALLOCATOR = 'chan_allocator'
 
 SCHEMA_TYPES = {
         INT: int,
@@ -137,6 +143,7 @@
         CIPHER: cipher,
         MODEM_FEATURE: modem_feature,
         PHY_CHAN: phy_channel_config,
+        CHAN_ALLOCATOR: channel_allocator,
     }
 
 def validate(config, schema):
diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
index 18303b6..edcf33f 100644
--- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
+++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
@@ -49,7 +49,7 @@
   ms max power 33
   cell reselection hysteresis 4
   rxlev access min 0
-  channel allocator ascending
+  channel allocator ${bts.channel_allocator}
   rach tx integer 9
   rach max transmission 7
 % if bsc.net.get('rsl_ip', False):

-- 
To view, visit https://gerrit.osmocom.org/10582
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I682809d4aeb91a36e3a35fc481e8d40d0b084fa0
Gerrit-Change-Number: 10582
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180823/d7ff4242/attachment.htm>


More information about the gerrit-log mailing list