blob: 7c063920a83c9a2e30173e4e9fa732abf582e814 [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'
95 'addr':::
96 remote IP address of the BTS, used to start the BTS and tell it where
97 to find the OsmoNITB.
98 'band':::
99 GSM band that this BTS shoud use (*TODO*: allow multiple bands). One of:
100 - 'GSM-1800'
101 - 'GSM-1900'
102 - (*TODO*: more bands)
103 'trx_list':::
104 Specific TRX configurations for this BTS. There should be as many of
105 these as the BTS has TRXes. (*TODO*: a way to define >1 TRX without
106 special configuration for them.)
107 'hw_addr'::::
108 Hardware (MAC) address of the TRX in the form of '11:22:33:44:55:66',
109 only used for osmo-bts-octphy. (*TODO*: and nanobts??)
110 'net_device'::::
111 Local network device to reach the TRX's 'hw_addr' at, only used for
112 osmo-bts-octphy.
113
114'arfcn'::
115 List of ARFCNs to use for running BTSes, which defines the actual RF
116 frequency bands used.
117 'arfcn':::
118 ARFCN number, see e.g.
119 https://en.wikipedia.org/wiki/Absolute_radio-frequency_channel_number
120 (note that the resource type 'arfcn' contains an item trait also named
121 'arfcn')
122 'band':::
123 GSM band name to use this ARFCN for, same as for 'bts:band' above.
124
125'modem'::
126 List of modems reachable via ofono and information on the inserted SIM
127 card. (Note: the MSISDN is allocated dynamically in test scripts)
128 'label':::
129 human readable label for your own reference
130 'path':::
131 ofono's path for this modem, like '/modemkind_99'
132 'imsi':::
133 IMSI of the inserted SIM card, like '"123456789012345"'
134 'ki':::
135 16 byte authentication/encryption KI of the inserted SIM card, in
136 hexadecimal notation (32 characters) like +
137 '"00112233445566778899aabbccddeeff"' (*TODO*: authentication algorithm,
138 currently always comp128v1)
139
140Side note: at first sight it might make sense to the reader to rather structure
Neels Hofmeyr5d0330f2017-05-18 18:38:50 +0200141e.g. the 'ip_address' or 'arfcn' configuration as +
Neels Hofmeyrc0827c42017-04-23 15:04:19 +0200142'"arfcn: GSM-1800: [512, 514, ...]"', +
143but the more verbose format is chosen to stay consistent with the general
144structure of resource configurations, which the resource allocation algorithm
145uses to resolve required resources according to their traits. These
146configurations look cumbersome because they exhibit only one trait / a trait
147that is repeated numerous times. No special notation for these cases is
148available (yet).
149
150[[default_suites]]
151=== 'default-suites.conf' (optional)
152
153The 'default-suites.conf' file contains a list of 'suite:scenario+scenario+...'
154combination strings as defined by the 'osmo-gsm-tester.py -s' commandline
155option. If invoking the 'osmo-gsm-tester.py' without any suite definitions, the
156'-s' arguments are taken from this file instead. Each of these suite + scenario
157combinations is run in sequence.
158
159A suite name must match the name of a directory in the 'suites_dir' as defined
160by 'paths.conf'.
161
162A scenario name must match the name of a configuration file in the
163'scenarios_dir' as defined by 'paths.conf' (optionally without the '.conf'
164suffix).
165
166For 'paths.conf', see <<paths_conf>>.
167
168Example of a 'default-suites.conf' file:
169
170----
171- sms:sysmo
172- voice:sysmo+tch_f
173- voice:sysmo+tch_h
174- voice:sysmo+dyn_ts
175- sms:trx
176- voice:trx+tch_f
177- voice:trx+tch_h
178- voice:trx+dyn_ts
179----
180
Neels Hofmeyrb52df172017-05-14 20:09:35 +0200181*TODO*: voice is not actually implemented yet
182
Neels Hofmeyrc0827c42017-04-23 15:04:19 +0200183=== 'defaults.conf' (optional)
184
185Each binary run by osmo-gsm-tester, e.g. 'osmo-nitb' or 'osmo-bts-sysmo',
186typically has a configuration file template that is populated with values for a
187trial run.
188
189Some of these values are provided by the 'resources.conf' from the allocated
190resource(s), but not all values can be populated this way: some osmo-nitb
191configuration values like the network name, encryption algorithm or timeslot
192channel combinations are in fact not resources (only the nitb's interface
193address is). These additional settings may be provided by the scenario
194configurations, but in case the provided scenarios leave some values unset,
195they are taken from this 'defaults.conf'. (A 'scenario.conf' providing a
196similar setting always has precedence over the values given in a
197'defaults.conf').
198
199*TODO* better match this format with 'resources.conf'?
200
201Example of a 'defaults.conf':
202
203----
204nitb:
205 net:
206 mcc: 1
207 mnc: 868
208 short_name: osmo-gsm-tester
209 long_name: osmo-gsm-tester
210 auth_policy: closed
211 encryption: a5 0
212
213nitb_bts:
214 location_area_code: 23
215 base_station_id_code: 63
216 stream_id: 255
217 osmobsc_bts_type: sysmobts
218 trx_list:
219 - max_power_red: 22
220 arfcn: 868
221 timeslot_list:
222 - phys_chan_config: CCCH+SDCCH4
223 - phys_chan_config: SDCCH8
224 - phys_chan_config: TCH/F_TCH/H_PDCH
225 - phys_chan_config: TCH/F_TCH/H_PDCH
226 - phys_chan_config: TCH/F_TCH/H_PDCH
227 - phys_chan_config: TCH/F_TCH/H_PDCH
228 - phys_chan_config: TCH/F_TCH/H_PDCH
229 - phys_chan_config: TCH/F_TCH/H_PDCH
230----
231
232*TODO*: detailed descriptions