blob: 66f4b710955d155d59509defb9dc25eb86803706 [file] [log] [blame]
Neels Hofmeyrc0827c42017-04-23 15:04:19 +02001== Configuration
2
3The osmo-gsm-tester looks for configuration files in various standard
4directories in this order:
5
6- '$HOME/.config/osmo-gsm-tester/'
7- '/usr/local/etc/osmo-gsm-tester/'
8- '/etc/osmo-gsm-tester/'
9
10The config location can also be set by an environment variable
11'$OSMO_GSM_TESTER_CONF', which then overrides the above locations.
12
13The osmo-gsm-tester expects to find the following configuration files in a
14configuration directory:
15
16- 'paths.conf'
17- 'resources.conf'
18- 'default-suites.conf' (optional)
19- 'defaults.conf' (optional)
20
21=== Format: YAML, and its Drawbacks
22
23The general configuration format used is YAML. The stock python YAML parser
24does have several drawbacks: too many complex possibilities and alternative
25ways of formatting a configuration, but at the time of writing seems to be the
26only widely used configuration format that offers a simple and human readable
27formatting as well as nested structuring. It is recommended to use only the
28exact YAML subset seen in this manual in case the osmo-gsm-tester should move
29to a less bloated parser in the future.
30
31Careful: if a configuration item consists of digits and starts with a zero, you
32need to quote it, or it may be interpreted as an octal notation integer! Please
33avoid using the octal notation on purpose, it is not provided intentionally.
34
35[[paths_conf]]
36=== 'paths.conf'
37
38The 'paths.conf' file defines where to store the global state (of reserved
39resources) and where to find suite and scenario definitions.
40
41Any relative paths found in a 'paths.conf' file are interpreted as relative to
42the directory of that 'paths.conf' file.
43
44Example:
45
46----
47state_dir: '/var/run/osmo-gsm-tester'
48suites_dir: './suites'
49scenarios_dir: './scenarios'
50----
51
52If you would like to set up several separate 'paths.conf' files (not typical),
53note that the 'state_dir' is used to reserve resources, which only works when
54all configurations that share resources also use the same 'state_dir'.
55
56[[resources_conf]]
57=== 'resources.conf'
58
59The 'resources.conf' file defines which hardware is connected to the main unit,
60as well as which limited configuration items (like IP addresses or ARFCNs)
61should be used.
62
63These resources are allocated dynamically and are not configured explicitly:
64
65- MSISDN: phone numbers are dealt out to test scripts in sequence on request.
66
67A 'resources.conf' is structured as a list of items for each resource type,
68where each item has one or more settings -- for an example, see
69<<resources_conf_example>>.
70
71These kinds of resource are known:
72
73'nitb_iface'::
74 List of IP addresses to run osmo-nitb instances on. The main unit
75 typically has a limited number of such IP addresses configured, which
76 the connected BTS models can see on their network.
77 'addr':::
78 IPv4 address of the local interface.
79
80'bts'::
81 List of available BTS hardware.
82 'label':::
83 human readable label for your own reference
84 'type':::
85 which way to launch this BTS, one of
86 - 'osmo-bts-sysmo'
87 - 'osmo-bts-trx'
88 - 'osmo-bts-octphy'
89 - 'ipa-nanobts'
90 'addr':::
91 remote IP address of the BTS, used to start the BTS and tell it where
92 to find the OsmoNITB.
93 'band':::
94 GSM band that this BTS shoud use (*TODO*: allow multiple bands). One of:
95 - 'GSM-1800'
96 - 'GSM-1900'
97 - (*TODO*: more bands)
98 'trx_list':::
99 Specific TRX configurations for this BTS. There should be as many of
100 these as the BTS has TRXes. (*TODO*: a way to define >1 TRX without
101 special configuration for them.)
102 'hw_addr'::::
103 Hardware (MAC) address of the TRX in the form of '11:22:33:44:55:66',
104 only used for osmo-bts-octphy. (*TODO*: and nanobts??)
105 'net_device'::::
106 Local network device to reach the TRX's 'hw_addr' at, only used for
107 osmo-bts-octphy.
108
109'arfcn'::
110 List of ARFCNs to use for running BTSes, which defines the actual RF
111 frequency bands used.
112 'arfcn':::
113 ARFCN number, see e.g.
114 https://en.wikipedia.org/wiki/Absolute_radio-frequency_channel_number
115 (note that the resource type 'arfcn' contains an item trait also named
116 'arfcn')
117 'band':::
118 GSM band name to use this ARFCN for, same as for 'bts:band' above.
119
120'modem'::
121 List of modems reachable via ofono and information on the inserted SIM
122 card. (Note: the MSISDN is allocated dynamically in test scripts)
123 'label':::
124 human readable label for your own reference
125 'path':::
126 ofono's path for this modem, like '/modemkind_99'
127 'imsi':::
128 IMSI of the inserted SIM card, like '"123456789012345"'
129 'ki':::
130 16 byte authentication/encryption KI of the inserted SIM card, in
131 hexadecimal notation (32 characters) like +
132 '"00112233445566778899aabbccddeeff"' (*TODO*: authentication algorithm,
133 currently always comp128v1)
134
135Side note: at first sight it might make sense to the reader to rather structure
136e.g. the 'nitb_iface' or 'arfcn' configuration as +
137'"arfcn: GSM-1800: [512, 514, ...]"', +
138but the more verbose format is chosen to stay consistent with the general
139structure of resource configurations, which the resource allocation algorithm
140uses to resolve required resources according to their traits. These
141configurations look cumbersome because they exhibit only one trait / a trait
142that is repeated numerous times. No special notation for these cases is
143available (yet).
144
145[[default_suites]]
146=== 'default-suites.conf' (optional)
147
148The 'default-suites.conf' file contains a list of 'suite:scenario+scenario+...'
149combination strings as defined by the 'osmo-gsm-tester.py -s' commandline
150option. If invoking the 'osmo-gsm-tester.py' without any suite definitions, the
151'-s' arguments are taken from this file instead. Each of these suite + scenario
152combinations is run in sequence.
153
154A suite name must match the name of a directory in the 'suites_dir' as defined
155by 'paths.conf'.
156
157A scenario name must match the name of a configuration file in the
158'scenarios_dir' as defined by 'paths.conf' (optionally without the '.conf'
159suffix).
160
161For 'paths.conf', see <<paths_conf>>.
162
163Example of a 'default-suites.conf' file:
164
165----
166- sms:sysmo
167- voice:sysmo+tch_f
168- voice:sysmo+tch_h
169- voice:sysmo+dyn_ts
170- sms:trx
171- voice:trx+tch_f
172- voice:trx+tch_h
173- voice:trx+dyn_ts
174----
175
176=== 'defaults.conf' (optional)
177
178Each binary run by osmo-gsm-tester, e.g. 'osmo-nitb' or 'osmo-bts-sysmo',
179typically has a configuration file template that is populated with values for a
180trial run.
181
182Some of these values are provided by the 'resources.conf' from the allocated
183resource(s), but not all values can be populated this way: some osmo-nitb
184configuration values like the network name, encryption algorithm or timeslot
185channel combinations are in fact not resources (only the nitb's interface
186address is). These additional settings may be provided by the scenario
187configurations, but in case the provided scenarios leave some values unset,
188they are taken from this 'defaults.conf'. (A 'scenario.conf' providing a
189similar setting always has precedence over the values given in a
190'defaults.conf').
191
192*TODO* better match this format with 'resources.conf'?
193
194Example of a 'defaults.conf':
195
196----
197nitb:
198 net:
199 mcc: 1
200 mnc: 868
201 short_name: osmo-gsm-tester
202 long_name: osmo-gsm-tester
203 auth_policy: closed
204 encryption: a5 0
205
206nitb_bts:
207 location_area_code: 23
208 base_station_id_code: 63
209 stream_id: 255
210 osmobsc_bts_type: sysmobts
211 trx_list:
212 - max_power_red: 22
213 arfcn: 868
214 timeslot_list:
215 - phys_chan_config: CCCH+SDCCH4
216 - phys_chan_config: SDCCH8
217 - phys_chan_config: TCH/F_TCH/H_PDCH
218 - phys_chan_config: TCH/F_TCH/H_PDCH
219 - phys_chan_config: TCH/F_TCH/H_PDCH
220 - phys_chan_config: TCH/F_TCH/H_PDCH
221 - phys_chan_config: TCH/F_TCH/H_PDCH
222 - phys_chan_config: TCH/F_TCH/H_PDCH
223----
224
225*TODO*: detailed descriptions