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 | |
| 61 | [[resources_conf]] |
| 62 | === 'resources.conf' |
| 63 | |
| 64 | The 'resources.conf' file defines which hardware is connected to the main unit, |
| 65 | as well as which limited configuration items (like IP addresses or ARFCNs) |
| 66 | should be used. |
| 67 | |
| 68 | These 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 | |
| 72 | A 'resources.conf' is structured as a list of items for each resource type, |
| 73 | where each item has one or more settings -- for an example, see |
| 74 | <<resources_conf_example>>. |
| 75 | |
| 76 | These kinds of resource are known: |
| 77 | |
Neels Hofmeyr | 5d0330f | 2017-05-18 18:38:50 +0200 | [diff] [blame] | 78 | 'ip_address':: |
Neels Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 79 | 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 Pedrol | 264829e | 2017-11-02 16:43:04 +0100 | [diff] [blame] | 95 | 'ipa_unit_id'::: |
| 96 | 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] | 97 | 'addr'::: |
Pau Espin Pedrol | 264829e | 2017-11-02 16:43:04 +0100 | [diff] [blame] | 98 | 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 Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 100 | '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 Pedrol | 264829e | 2017-11-02 16:43:04 +0100 | [diff] [blame] | 114 | 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 Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 119 | '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 Pedrol | 264829e | 2017-11-02 16:43:04 +0100 | [diff] [blame] | 126 | 'arfcn'). |
Neels Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 127 | '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 Pedrol | 264829e | 2017-11-02 16:43:04 +0100 | [diff] [blame] | 132 | card. (Note: the MSISDN is allocated dynamically in test scripts). |
Neels Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 133 | 'label'::: |
Pau Espin Pedrol | 264829e | 2017-11-02 16:43:04 +0100 | [diff] [blame] | 134 | Human readable label for your own reference, which also appears in logs. |
Neels Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 135 | 'path'::: |
Pau Espin Pedrol | 264829e | 2017-11-02 16:43:04 +0100 | [diff] [blame] | 136 | Ofono's path for this modem, like '/modemkind_99'. |
Neels Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 137 | 'imsi'::: |
Pau Espin Pedrol | 264829e | 2017-11-02 16:43:04 +0100 | [diff] [blame] | 138 | IMSI of the inserted SIM card, like '"123456789012345"'. |
Neels Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 139 | 'ki'::: |
| 140 | 16 byte authentication/encryption KI of the inserted SIM card, in |
| 141 | hexadecimal notation (32 characters) like + |
Pau Espin Pedrol | 264829e | 2017-11-02 16:43:04 +0100 | [diff] [blame] | 142 | '"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 Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 166 | |
| 167 | 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] | 168 | e.g. the 'ip_address' or 'arfcn' configuration as + |
Neels Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 169 | '"arfcn: GSM-1800: [512, 514, ...]"', + |
| 170 | but the more verbose format is chosen to stay consistent with the general |
| 171 | structure of resource configurations, which the resource allocation algorithm |
| 172 | uses to resolve required resources according to their traits. These |
| 173 | configurations look cumbersome because they exhibit only one trait / a trait |
| 174 | that is repeated numerous times. No special notation for these cases is |
| 175 | available (yet). |
| 176 | |
| 177 | [[default_suites]] |
| 178 | === 'default-suites.conf' (optional) |
| 179 | |
| 180 | The 'default-suites.conf' file contains a list of 'suite:scenario+scenario+...' |
| 181 | combination strings as defined by the 'osmo-gsm-tester.py -s' commandline |
| 182 | option. 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 |
| 184 | combinations is run in sequence. |
| 185 | |
| 186 | A suite name must match the name of a directory in the 'suites_dir' as defined |
| 187 | by 'paths.conf'. |
| 188 | |
| 189 | A scenario name must match the name of a configuration file in the |
| 190 | 'scenarios_dir' as defined by 'paths.conf' (optionally without the '.conf' |
| 191 | suffix). |
| 192 | |
| 193 | For 'paths.conf', see <<paths_conf>>. |
| 194 | |
| 195 | Example 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 Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 208 | === 'defaults.conf' (optional) |
| 209 | |
| 210 | Each binary run by osmo-gsm-tester, e.g. 'osmo-nitb' or 'osmo-bts-sysmo', |
| 211 | typically has a configuration file template that is populated with values for a |
| 212 | trial run. |
| 213 | |
| 214 | Some of these values are provided by the 'resources.conf' from the allocated |
| 215 | resource(s), but not all values can be populated this way: some osmo-nitb |
| 216 | configuration values like the network name, encryption algorithm or timeslot |
| 217 | channel combinations are in fact not resources (only the nitb's interface |
| 218 | address is). These additional settings may be provided by the scenario |
| 219 | configurations, but in case the provided scenarios leave some values unset, |
| 220 | they are taken from this 'defaults.conf'. (A 'scenario.conf' providing a |
| 221 | similar setting always has precedence over the values given in a |
| 222 | 'defaults.conf'). |
| 223 | |
| 224 | *TODO* better match this format with 'resources.conf'? |
| 225 | |
| 226 | Example of a 'defaults.conf': |
| 227 | |
| 228 | ---- |
| 229 | nitb: |
| 230 | net: |
| 231 | mcc: 1 |
| 232 | mnc: 868 |
| 233 | short_name: osmo-gsm-tester |
| 234 | long_name: osmo-gsm-tester |
| 235 | auth_policy: closed |
| 236 | encryption: a5 0 |
| 237 | |
| 238 | nitb_bts: |
| 239 | location_area_code: 23 |
| 240 | base_station_id_code: 63 |
| 241 | stream_id: 255 |
| 242 | osmobsc_bts_type: sysmobts |
| 243 | trx_list: |
| 244 | - max_power_red: 22 |
| 245 | arfcn: 868 |
| 246 | timeslot_list: |
| 247 | - phys_chan_config: CCCH+SDCCH4 |
| 248 | - phys_chan_config: SDCCH8 |
| 249 | - phys_chan_config: TCH/F_TCH/H_PDCH |
| 250 | - phys_chan_config: TCH/F_TCH/H_PDCH |
| 251 | - phys_chan_config: TCH/F_TCH/H_PDCH |
| 252 | - phys_chan_config: TCH/F_TCH/H_PDCH |
| 253 | - phys_chan_config: TCH/F_TCH/H_PDCH |
| 254 | - phys_chan_config: TCH/F_TCH/H_PDCH |
| 255 | ---- |
| 256 | |
| 257 | *TODO*: detailed descriptions |