blob: 3f8cb44be888534de0386f90282561c963dde5c8 [file] [log] [blame]
Neels Hofmeyrc0827c42017-04-23 15:04:19 +02001== Configuration
2
Neels Hofmeyrb52df172017-05-14 20:09:35 +02003[[config_paths]]
4=== Config Paths
5
Neels Hofmeyrc0827c42017-04-23 15:04:19 +02006The osmo-gsm-tester looks for configuration files in various standard
7directories in this order:
8
9- '$HOME/.config/osmo-gsm-tester/'
10- '/usr/local/etc/osmo-gsm-tester/'
11- '/etc/osmo-gsm-tester/'
12
13The config location can also be set by an environment variable
14'$OSMO_GSM_TESTER_CONF', which then overrides the above locations.
15
16The osmo-gsm-tester expects to find the following configuration files in a
17configuration directory:
18
19- 'paths.conf'
20- 'resources.conf'
21- 'default-suites.conf' (optional)
22- 'defaults.conf' (optional)
23
Neels Hofmeyrb52df172017-05-14 20:09:35 +020024These are described in detail in the following sections.
25
Neels Hofmeyrc0827c42017-04-23 15:04:19 +020026=== Format: YAML, and its Drawbacks
27
28The general configuration format used is YAML. The stock python YAML parser
29does have several drawbacks: too many complex possibilities and alternative
30ways of formatting a configuration, but at the time of writing seems to be the
31only widely used configuration format that offers a simple and human readable
32formatting as well as nested structuring. It is recommended to use only the
33exact YAML subset seen in this manual in case the osmo-gsm-tester should move
34to a less bloated parser in the future.
35
36Careful: if a configuration item consists of digits and starts with a zero, you
37need to quote it, or it may be interpreted as an octal notation integer! Please
38avoid using the octal notation on purpose, it is not provided intentionally.
39
40[[paths_conf]]
41=== 'paths.conf'
42
43The 'paths.conf' file defines where to store the global state (of reserved
44resources) and where to find suite and scenario definitions.
45
46Any relative paths found in a 'paths.conf' file are interpreted as relative to
47the directory of that 'paths.conf' file.
48
49Example:
50
51----
Neels Hofmeyrb52df172017-05-14 20:09:35 +020052state_dir: '/var/tmp/osmo-gsm-tester/state'
53suites_dir: '/usr/local/src/osmo-gsm-tester/suites'
Neels Hofmeyrc0827c42017-04-23 15:04:19 +020054scenarios_dir: './scenarios'
55----
56
Neels Hofmeyrb52df172017-05-14 20:09:35 +020057If you would like to set up several separate configurations (not typical), note
58that the 'state_dir' is used to reserve resources, which only works when all
59configurations that share resources also use the same 'state_dir'.
Neels Hofmeyrc0827c42017-04-23 15:04:19 +020060
61[[resources_conf]]
62=== 'resources.conf'
63
64The 'resources.conf' file defines which hardware is connected to the main unit,
65as well as which limited configuration items (like IP addresses or ARFCNs)
66should be used.
67
68These resources are allocated dynamically and are not configured explicitly:
69
70- MSISDN: phone numbers are dealt out to test scripts in sequence on request.
71
72A 'resources.conf' is structured as a list of items for each resource type,
73where each item has one or more settings -- for an example, see
74<<resources_conf_example>>.
75
76These kinds of resource are known:
77
Neels Hofmeyr5d0330f2017-05-18 18:38:50 +020078'ip_address'::
Neels Hofmeyrc0827c42017-04-23 15:04:19 +020079 List of IP addresses to run osmo-nitb instances on. The main unit
80 typically has a limited number of such IP addresses configured, which
81 the connected BTS models can see on their network.
82 'addr':::
83 IPv4 address of the local interface.
84
85'bts'::
86 List of available BTS hardware.
87 'label':::
88 human readable label for your own reference
89 'type':::
90 which way to launch this BTS, one of
91 - 'osmo-bts-sysmo'
92 - 'osmo-bts-trx'
93 - 'osmo-bts-octphy'
94 - 'ipa-nanobts'
Pau Espin Pedrol264829e2017-11-02 16:43:04 +010095 'ipa_unit_id':::
96 ip.access unit id to be used by the BTS, written into BTS and BSC config.
Neels Hofmeyrc0827c42017-04-23 15:04:19 +020097 'addr':::
Pau Espin Pedrol264829e2017-11-02 16:43:04 +010098 Remote IP address of the BTS for BTS like sysmoBTS, and local IP address
99 to bind to for locally run BTS such as osmo-bts-trx.
Neels Hofmeyrc0827c42017-04-23 15:04:19 +0200100 'band':::
101 GSM band that this BTS shoud use (*TODO*: allow multiple bands). One of:
102 - 'GSM-1800'
103 - 'GSM-1900'
104 - (*TODO*: more bands)
105 'trx_list':::
106 Specific TRX configurations for this BTS. There should be as many of
107 these as the BTS has TRXes. (*TODO*: a way to define >1 TRX without
108 special configuration for them.)
109 'hw_addr'::::
110 Hardware (MAC) address of the TRX in the form of '11:22:33:44:55:66',
111 only used for osmo-bts-octphy. (*TODO*: and nanobts??)
112 'net_device'::::
113 Local network device to reach the TRX's 'hw_addr' at, only used for
Pau Espin Pedrol264829e2017-11-02 16:43:04 +0100114 osmo-bts-octphy. Example: 'eth0'.
115 'nominal_power'::::
116 Nominal power to be used by the TRX.
117 'max_power_red'::::
118 Max power reduction to apply to the nominal power of the TRX.
Neels Hofmeyrc0827c42017-04-23 15:04:19 +0200119'arfcn'::
120 List of ARFCNs to use for running BTSes, which defines the actual RF
121 frequency bands used.
122 'arfcn':::
123 ARFCN number, see e.g.
124 https://en.wikipedia.org/wiki/Absolute_radio-frequency_channel_number
125 (note that the resource type 'arfcn' contains an item trait also named
Pau Espin Pedrol264829e2017-11-02 16:43:04 +0100126 'arfcn').
Neels Hofmeyrc0827c42017-04-23 15:04:19 +0200127 'band':::
128 GSM band name to use this ARFCN for, same as for 'bts:band' above.
129
130'modem'::
131 List of modems reachable via ofono and information on the inserted SIM
Pau Espin Pedrol264829e2017-11-02 16:43:04 +0100132 card. (Note: the MSISDN is allocated dynamically in test scripts).
Neels Hofmeyrc0827c42017-04-23 15:04:19 +0200133 'label':::
Pau Espin Pedrol264829e2017-11-02 16:43:04 +0100134 Human readable label for your own reference, which also appears in logs.
Neels Hofmeyrc0827c42017-04-23 15:04:19 +0200135 'path':::
Pau Espin Pedrol264829e2017-11-02 16:43:04 +0100136 Ofono's path for this modem, like '/modemkind_99'.
Neels Hofmeyrc0827c42017-04-23 15:04:19 +0200137 'imsi':::
Pau Espin Pedrol264829e2017-11-02 16:43:04 +0100138 IMSI of the inserted SIM card, like '"123456789012345"'.
Neels Hofmeyrc0827c42017-04-23 15:04:19 +0200139 'ki':::
140 16 byte authentication/encryption KI of the inserted SIM card, in
141 hexadecimal notation (32 characters) like +
Pau Espin Pedrol264829e2017-11-02 16:43:04 +0100142 '"00112233445566778899aabbccddeeff"'.
143 'auth_algo':::
144 Authentication algorithm to be used with the SIM card. One of:
145 - 'none'
146 - 'xor'
147 - 'comp128v1'
148 'ciphers':::
149 List of ciphers that this modem supports, used to match
150 requirements in suites or scenarios. Any combination of:
151 - 'a5_0'
152 - 'a5_1'
153 - 'a5_2'
154 - 'a5_3'
155 - 'a5_4'
156 - 'a5_5'
157 - 'a5_6'
158 - 'a5_7'
159 'features':::
160 List of features that this modem supports, used to match requirements in
161 suites or scenarios. Any combination of:
162 - 'sms'
163 - 'gprs'
164 - 'voice'
165 - 'ussd'
Neels Hofmeyrc0827c42017-04-23 15:04:19 +0200166
167Side note: at first sight it might make sense to the reader to rather structure
Neels Hofmeyr5d0330f2017-05-18 18:38:50 +0200168e.g. the 'ip_address' or 'arfcn' configuration as +
Neels Hofmeyrc0827c42017-04-23 15:04:19 +0200169'"arfcn: GSM-1800: [512, 514, ...]"', +
170but the more verbose format is chosen to stay consistent with the general
171structure of resource configurations, which the resource allocation algorithm
172uses to resolve required resources according to their traits. These
173configurations look cumbersome because they exhibit only one trait / a trait
174that is repeated numerous times. No special notation for these cases is
175available (yet).
176
177[[default_suites]]
178=== 'default-suites.conf' (optional)
179
180The 'default-suites.conf' file contains a list of 'suite:scenario+scenario+...'
181combination strings as defined by the 'osmo-gsm-tester.py -s' commandline
182option. If invoking the 'osmo-gsm-tester.py' without any suite definitions, the
183'-s' arguments are taken from this file instead. Each of these suite + scenario
184combinations is run in sequence.
185
186A suite name must match the name of a directory in the 'suites_dir' as defined
187by 'paths.conf'.
188
189A scenario name must match the name of a configuration file in the
190'scenarios_dir' as defined by 'paths.conf' (optionally without the '.conf'
191suffix).
192
193For 'paths.conf', see <<paths_conf>>.
194
195Example of a 'default-suites.conf' file:
196
197----
198- sms:sysmo
199- voice:sysmo+tch_f
200- voice:sysmo+tch_h
201- voice:sysmo+dyn_ts
202- sms:trx
203- voice:trx+tch_f
204- voice:trx+tch_h
205- voice:trx+dyn_ts
206----
207
Neels Hofmeyrc0827c42017-04-23 15:04:19 +0200208=== 'defaults.conf' (optional)
209
210Each binary run by osmo-gsm-tester, e.g. 'osmo-nitb' or 'osmo-bts-sysmo',
211typically has a configuration file template that is populated with values for a
212trial run.
213
214Some of these values are provided by the 'resources.conf' from the allocated
215resource(s), but not all values can be populated this way: some osmo-nitb
216configuration values like the network name, encryption algorithm or timeslot
217channel combinations are in fact not resources (only the nitb's interface
218address is). These additional settings may be provided by the scenario
219configurations, but in case the provided scenarios leave some values unset,
Pau Espin Pedrol6fa61992017-11-02 16:57:22 +0100220they are taken from this 'defaults.conf'. (A 'scenario.conf' or a
221'resources.conf' providing a similar setting always has precedence over the
222values given in a 'defaults.conf').
Neels Hofmeyrc0827c42017-04-23 15:04:19 +0200223
224Example of a 'defaults.conf':
225
226----
227nitb:
228 net:
Pau Espin Pedrol6fa61992017-11-02 16:57:22 +0100229 mcc: 901
230 mnc: 70
231 short_name: osmo-gsm-tester-nitb
232 long_name: osmo-gsm-tester-nitb
Neels Hofmeyrc0827c42017-04-23 15:04:19 +0200233 auth_policy: closed
Pau Espin Pedrol6fa61992017-11-02 16:57:22 +0100234 encryption: a5_0
Neels Hofmeyrc0827c42017-04-23 15:04:19 +0200235
Pau Espin Pedrol6fa61992017-11-02 16:57:22 +0100236bsc:
237 net:
238 mcc: 901
239 mnc: 70
240 short_name: osmo-gsm-tester-msc
241 long_name: osmo-gsm-tester-msc
242 auth_policy: closed
243 encryption: a5_0
244 authentication: optional
245
246msc:
247 net:
248 mcc: 901
249 mnc: 70
250 short_name: osmo-gsm-tester-msc
251 long_name: osmo-gsm-tester-msc
252 auth_policy: closed
253 encryption: a5_0
254 authentication: optional
255
256bsc_bts:
Neels Hofmeyrc0827c42017-04-23 15:04:19 +0200257 location_area_code: 23
258 base_station_id_code: 63
259 stream_id: 255
260 osmobsc_bts_type: sysmobts
261 trx_list:
Pau Espin Pedrol6fa61992017-11-02 16:57:22 +0100262 - nominal_power: 23
263 max_power_red: 0
Neels Hofmeyrc0827c42017-04-23 15:04:19 +0200264 arfcn: 868
265 timeslot_list:
266 - phys_chan_config: CCCH+SDCCH4
267 - phys_chan_config: SDCCH8
268 - phys_chan_config: TCH/F_TCH/H_PDCH
269 - phys_chan_config: TCH/F_TCH/H_PDCH
270 - phys_chan_config: TCH/F_TCH/H_PDCH
271 - phys_chan_config: TCH/F_TCH/H_PDCH
272 - phys_chan_config: TCH/F_TCH/H_PDCH
273 - phys_chan_config: TCH/F_TCH/H_PDCH
274----