Neels Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 1 | == Configuration |
| 2 | |
Neels Hofmeyr | b52df17 | 2017-05-14 20:09:35 +0200 | [diff] [blame] | 3 | [[config_paths]] |
| 4 | === Config Paths |
| 5 | |
Neels Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 6 | The osmo-gsm-tester looks for configuration files in various standard |
| 7 | directories in this order: |
| 8 | |
| 9 | - '$HOME/.config/osmo-gsm-tester/' |
| 10 | - '/usr/local/etc/osmo-gsm-tester/' |
| 11 | - '/etc/osmo-gsm-tester/' |
| 12 | |
| 13 | The config location can also be set by an environment variable |
| 14 | '$OSMO_GSM_TESTER_CONF', which then overrides the above locations. |
| 15 | |
| 16 | The osmo-gsm-tester expects to find the following configuration files in a |
| 17 | configuration directory: |
| 18 | |
| 19 | - 'paths.conf' |
| 20 | - 'resources.conf' |
| 21 | - 'default-suites.conf' (optional) |
| 22 | - 'defaults.conf' (optional) |
| 23 | |
Neels Hofmeyr | b52df17 | 2017-05-14 20:09:35 +0200 | [diff] [blame] | 24 | These are described in detail in the following sections. |
| 25 | |
Neels Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 26 | === Format: YAML, and its Drawbacks |
| 27 | |
| 28 | The general configuration format used is YAML. The stock python YAML parser |
| 29 | does have several drawbacks: too many complex possibilities and alternative |
| 30 | ways of formatting a configuration, but at the time of writing seems to be the |
| 31 | only widely used configuration format that offers a simple and human readable |
| 32 | formatting as well as nested structuring. It is recommended to use only the |
| 33 | exact YAML subset seen in this manual in case the osmo-gsm-tester should move |
| 34 | to a less bloated parser in the future. |
| 35 | |
| 36 | Careful: if a configuration item consists of digits and starts with a zero, you |
| 37 | need to quote it, or it may be interpreted as an octal notation integer! Please |
| 38 | avoid using the octal notation on purpose, it is not provided intentionally. |
| 39 | |
| 40 | [[paths_conf]] |
| 41 | === 'paths.conf' |
| 42 | |
| 43 | The 'paths.conf' file defines where to store the global state (of reserved |
| 44 | resources) and where to find suite and scenario definitions. |
| 45 | |
| 46 | Any relative paths found in a 'paths.conf' file are interpreted as relative to |
| 47 | the directory of that 'paths.conf' file. |
| 48 | |
| 49 | Example: |
| 50 | |
| 51 | ---- |
Neels Hofmeyr | b52df17 | 2017-05-14 20:09:35 +0200 | [diff] [blame] | 52 | state_dir: '/var/tmp/osmo-gsm-tester/state' |
| 53 | suites_dir: '/usr/local/src/osmo-gsm-tester/suites' |
Neels Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 54 | scenarios_dir: './scenarios' |
| 55 | ---- |
| 56 | |
Neels Hofmeyr | b52df17 | 2017-05-14 20:09:35 +0200 | [diff] [blame] | 57 | If you would like to set up several separate configurations (not typical), note |
| 58 | that the 'state_dir' is used to reserve resources, which only works when all |
| 59 | configurations that share resources also use the same 'state_dir'. |
Neels Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 60 | |
Pau Espin Pedrol | 6131f35 | 2017-11-02 14:45:46 +0100 | [diff] [blame^] | 61 | [[scenarios_dir]] |
| 62 | ==== 'scenarios_dir' |
| 63 | |
| 64 | This dir contains scenario configuration files. |
| 65 | |
| 66 | Scenarios define constraints to serve the resource requests of a 'suite.conf', |
| 67 | to select specific resources from the general resource pool specified in 'resources.conf'. |
| 68 | |
| 69 | All 'times' attributes are expanded before matching. For example, if a 'suite.conf' |
| 70 | requests two BTS, we may enforce that both BTS should be of type 'osmo-bts-sysmo' in |
| 71 | these ways: |
| 72 | |
| 73 | ---- |
| 74 | resources: |
| 75 | bts: |
| 76 | - type: osmo-bts-sysmo |
| 77 | - type: osmo-bts-sysmo |
| 78 | ---- |
| 79 | |
| 80 | or alternatively, |
| 81 | |
| 82 | ---- |
| 83 | resources: |
| 84 | bts: |
| 85 | - times: 2 |
| 86 | type: osmo-bts-sysmo |
| 87 | ---- |
| 88 | |
| 89 | If only one resource is specified in the scenario, then the resource allocator |
| 90 | assumes the restriction is to be applied to the first resource and that remaining |
| 91 | resources have no restrictions to be taken into consideration. |
| 92 | |
| 93 | To apply restrictions only on the second resource, the first element can be left |
| 94 | emtpy, like: |
| 95 | |
| 96 | ---- |
| 97 | resources: |
| 98 | bts: |
| 99 | - {} |
| 100 | - type: osmo-bts-sysmo |
| 101 | ---- |
| 102 | |
| 103 | On the 'osmo_gsm_tester.py' command line and the 'default_suites.conf', any number of |
| 104 | such scenario configurations can be combined in the form: |
| 105 | |
| 106 | ---- |
| 107 | <suite_name>:<scenario>[+<scenario>[+...]] |
| 108 | ---- |
| 109 | |
| 110 | e.g. |
| 111 | |
| 112 | ---- |
| 113 | my_suite:sysmo+tch_f+amr |
| 114 | ---- |
| 115 | |
Neels Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 116 | [[resources_conf]] |
| 117 | === 'resources.conf' |
| 118 | |
| 119 | The 'resources.conf' file defines which hardware is connected to the main unit, |
| 120 | as well as which limited configuration items (like IP addresses or ARFCNs) |
| 121 | should be used. |
| 122 | |
| 123 | These resources are allocated dynamically and are not configured explicitly: |
| 124 | |
| 125 | - MSISDN: phone numbers are dealt out to test scripts in sequence on request. |
| 126 | |
| 127 | A 'resources.conf' is structured as a list of items for each resource type, |
| 128 | where each item has one or more settings -- for an example, see |
| 129 | <<resources_conf_example>>. |
| 130 | |
| 131 | These kinds of resource are known: |
| 132 | |
Neels Hofmeyr | 5d0330f | 2017-05-18 18:38:50 +0200 | [diff] [blame] | 133 | 'ip_address':: |
Neels Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 134 | List of IP addresses to run osmo-nitb instances on. The main unit |
| 135 | typically has a limited number of such IP addresses configured, which |
| 136 | the connected BTS models can see on their network. |
| 137 | 'addr'::: |
| 138 | IPv4 address of the local interface. |
| 139 | |
| 140 | 'bts':: |
| 141 | List of available BTS hardware. |
| 142 | 'label'::: |
| 143 | human readable label for your own reference |
| 144 | 'type'::: |
| 145 | which way to launch this BTS, one of |
| 146 | - 'osmo-bts-sysmo' |
| 147 | - 'osmo-bts-trx' |
| 148 | - 'osmo-bts-octphy' |
| 149 | - 'ipa-nanobts' |
Pau Espin Pedrol | 264829e | 2017-11-02 16:43:04 +0100 | [diff] [blame] | 150 | 'ipa_unit_id'::: |
| 151 | ip.access unit id to be used by the BTS, written into BTS and BSC config. |
Neels Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 152 | 'addr'::: |
Pau Espin Pedrol | 264829e | 2017-11-02 16:43:04 +0100 | [diff] [blame] | 153 | Remote IP address of the BTS for BTS like sysmoBTS, and local IP address |
| 154 | to bind to for locally run BTS such as osmo-bts-trx. |
Neels Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 155 | 'band'::: |
| 156 | GSM band that this BTS shoud use (*TODO*: allow multiple bands). One of: |
| 157 | - 'GSM-1800' |
| 158 | - 'GSM-1900' |
| 159 | - (*TODO*: more bands) |
| 160 | 'trx_list'::: |
| 161 | Specific TRX configurations for this BTS. There should be as many of |
| 162 | these as the BTS has TRXes. (*TODO*: a way to define >1 TRX without |
| 163 | special configuration for them.) |
| 164 | 'hw_addr':::: |
| 165 | Hardware (MAC) address of the TRX in the form of '11:22:33:44:55:66', |
| 166 | only used for osmo-bts-octphy. (*TODO*: and nanobts??) |
| 167 | 'net_device':::: |
| 168 | Local network device to reach the TRX's 'hw_addr' at, only used for |
Pau Espin Pedrol | 264829e | 2017-11-02 16:43:04 +0100 | [diff] [blame] | 169 | osmo-bts-octphy. Example: 'eth0'. |
| 170 | 'nominal_power':::: |
| 171 | Nominal power to be used by the TRX. |
| 172 | 'max_power_red':::: |
| 173 | Max power reduction to apply to the nominal power of the TRX. |
Neels Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 174 | 'arfcn':: |
| 175 | List of ARFCNs to use for running BTSes, which defines the actual RF |
| 176 | frequency bands used. |
| 177 | 'arfcn'::: |
| 178 | ARFCN number, see e.g. |
| 179 | https://en.wikipedia.org/wiki/Absolute_radio-frequency_channel_number |
| 180 | (note that the resource type 'arfcn' contains an item trait also named |
Pau Espin Pedrol | 264829e | 2017-11-02 16:43:04 +0100 | [diff] [blame] | 181 | 'arfcn'). |
Neels Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 182 | 'band'::: |
| 183 | GSM band name to use this ARFCN for, same as for 'bts:band' above. |
| 184 | |
| 185 | 'modem':: |
| 186 | List of modems reachable via ofono and information on the inserted SIM |
Pau Espin Pedrol | 264829e | 2017-11-02 16:43:04 +0100 | [diff] [blame] | 187 | card. (Note: the MSISDN is allocated dynamically in test scripts). |
Neels Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 188 | 'label'::: |
Pau Espin Pedrol | 264829e | 2017-11-02 16:43:04 +0100 | [diff] [blame] | 189 | Human readable label for your own reference, which also appears in logs. |
Neels Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 190 | 'path'::: |
Pau Espin Pedrol | 264829e | 2017-11-02 16:43:04 +0100 | [diff] [blame] | 191 | Ofono's path for this modem, like '/modemkind_99'. |
Neels Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 192 | 'imsi'::: |
Pau Espin Pedrol | 264829e | 2017-11-02 16:43:04 +0100 | [diff] [blame] | 193 | IMSI of the inserted SIM card, like '"123456789012345"'. |
Neels Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 194 | 'ki'::: |
| 195 | 16 byte authentication/encryption KI of the inserted SIM card, in |
| 196 | hexadecimal notation (32 characters) like + |
Pau Espin Pedrol | 264829e | 2017-11-02 16:43:04 +0100 | [diff] [blame] | 197 | '"00112233445566778899aabbccddeeff"'. |
| 198 | 'auth_algo'::: |
| 199 | Authentication algorithm to be used with the SIM card. One of: |
| 200 | - 'none' |
| 201 | - 'xor' |
| 202 | - 'comp128v1' |
| 203 | 'ciphers'::: |
| 204 | List of ciphers that this modem supports, used to match |
| 205 | requirements in suites or scenarios. Any combination of: |
| 206 | - 'a5_0' |
| 207 | - 'a5_1' |
| 208 | - 'a5_2' |
| 209 | - 'a5_3' |
| 210 | - 'a5_4' |
| 211 | - 'a5_5' |
| 212 | - 'a5_6' |
| 213 | - 'a5_7' |
| 214 | 'features'::: |
| 215 | List of features that this modem supports, used to match requirements in |
| 216 | suites or scenarios. Any combination of: |
| 217 | - 'sms' |
| 218 | - 'gprs' |
| 219 | - 'voice' |
| 220 | - 'ussd' |
Neels Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 221 | |
| 222 | Side note: at first sight it might make sense to the reader to rather structure |
Neels Hofmeyr | 5d0330f | 2017-05-18 18:38:50 +0200 | [diff] [blame] | 223 | e.g. the 'ip_address' or 'arfcn' configuration as + |
Neels Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 224 | '"arfcn: GSM-1800: [512, 514, ...]"', + |
| 225 | but the more verbose format is chosen to stay consistent with the general |
| 226 | structure of resource configurations, which the resource allocation algorithm |
| 227 | uses to resolve required resources according to their traits. These |
| 228 | configurations look cumbersome because they exhibit only one trait / a trait |
| 229 | that is repeated numerous times. No special notation for these cases is |
| 230 | available (yet). |
| 231 | |
| 232 | [[default_suites]] |
| 233 | === 'default-suites.conf' (optional) |
| 234 | |
| 235 | The 'default-suites.conf' file contains a list of 'suite:scenario+scenario+...' |
| 236 | combination strings as defined by the 'osmo-gsm-tester.py -s' commandline |
| 237 | option. If invoking the 'osmo-gsm-tester.py' without any suite definitions, the |
| 238 | '-s' arguments are taken from this file instead. Each of these suite + scenario |
| 239 | combinations is run in sequence. |
| 240 | |
| 241 | A suite name must match the name of a directory in the 'suites_dir' as defined |
| 242 | by 'paths.conf'. |
| 243 | |
| 244 | A scenario name must match the name of a configuration file in the |
| 245 | 'scenarios_dir' as defined by 'paths.conf' (optionally without the '.conf' |
| 246 | suffix). |
| 247 | |
| 248 | For 'paths.conf', see <<paths_conf>>. |
| 249 | |
| 250 | Example of a 'default-suites.conf' file: |
| 251 | |
| 252 | ---- |
| 253 | - sms:sysmo |
| 254 | - voice:sysmo+tch_f |
| 255 | - voice:sysmo+tch_h |
| 256 | - voice:sysmo+dyn_ts |
| 257 | - sms:trx |
| 258 | - voice:trx+tch_f |
| 259 | - voice:trx+tch_h |
| 260 | - voice:trx+dyn_ts |
| 261 | ---- |
| 262 | |
Neels Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 263 | === 'defaults.conf' (optional) |
| 264 | |
| 265 | Each binary run by osmo-gsm-tester, e.g. 'osmo-nitb' or 'osmo-bts-sysmo', |
| 266 | typically has a configuration file template that is populated with values for a |
| 267 | trial run. |
| 268 | |
| 269 | Some of these values are provided by the 'resources.conf' from the allocated |
| 270 | resource(s), but not all values can be populated this way: some osmo-nitb |
| 271 | configuration values like the network name, encryption algorithm or timeslot |
| 272 | channel combinations are in fact not resources (only the nitb's interface |
| 273 | address is). These additional settings may be provided by the scenario |
| 274 | configurations, but in case the provided scenarios leave some values unset, |
Pau Espin Pedrol | 6fa6199 | 2017-11-02 16:57:22 +0100 | [diff] [blame] | 275 | they are taken from this 'defaults.conf'. (A 'scenario.conf' or a |
| 276 | 'resources.conf' providing a similar setting always has precedence over the |
| 277 | values given in a 'defaults.conf'). |
Neels Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 278 | |
| 279 | Example of a 'defaults.conf': |
| 280 | |
| 281 | ---- |
| 282 | nitb: |
| 283 | net: |
Pau Espin Pedrol | 6fa6199 | 2017-11-02 16:57:22 +0100 | [diff] [blame] | 284 | mcc: 901 |
| 285 | mnc: 70 |
| 286 | short_name: osmo-gsm-tester-nitb |
| 287 | long_name: osmo-gsm-tester-nitb |
Neels Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 288 | auth_policy: closed |
Pau Espin Pedrol | 6fa6199 | 2017-11-02 16:57:22 +0100 | [diff] [blame] | 289 | encryption: a5_0 |
Neels Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 290 | |
Pau Espin Pedrol | 6fa6199 | 2017-11-02 16:57:22 +0100 | [diff] [blame] | 291 | bsc: |
| 292 | net: |
| 293 | mcc: 901 |
| 294 | mnc: 70 |
| 295 | short_name: osmo-gsm-tester-msc |
| 296 | long_name: osmo-gsm-tester-msc |
| 297 | auth_policy: closed |
| 298 | encryption: a5_0 |
| 299 | authentication: optional |
| 300 | |
| 301 | msc: |
| 302 | net: |
| 303 | mcc: 901 |
| 304 | mnc: 70 |
| 305 | short_name: osmo-gsm-tester-msc |
| 306 | long_name: osmo-gsm-tester-msc |
| 307 | auth_policy: closed |
| 308 | encryption: a5_0 |
| 309 | authentication: optional |
| 310 | |
| 311 | bsc_bts: |
Neels Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 312 | location_area_code: 23 |
| 313 | base_station_id_code: 63 |
| 314 | stream_id: 255 |
| 315 | osmobsc_bts_type: sysmobts |
| 316 | trx_list: |
Pau Espin Pedrol | 6fa6199 | 2017-11-02 16:57:22 +0100 | [diff] [blame] | 317 | - nominal_power: 23 |
| 318 | max_power_red: 0 |
Neels Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 319 | arfcn: 868 |
| 320 | timeslot_list: |
| 321 | - phys_chan_config: CCCH+SDCCH4 |
| 322 | - phys_chan_config: SDCCH8 |
| 323 | - phys_chan_config: TCH/F_TCH/H_PDCH |
| 324 | - phys_chan_config: TCH/F_TCH/H_PDCH |
| 325 | - phys_chan_config: TCH/F_TCH/H_PDCH |
| 326 | - phys_chan_config: TCH/F_TCH/H_PDCH |
| 327 | - phys_chan_config: TCH/F_TCH/H_PDCH |
| 328 | - phys_chan_config: TCH/F_TCH/H_PDCH |
| 329 | ---- |