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 | |
| 78 | 'nitb_iface':: |
| 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' |
| 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 | |
| 140 | Side note: at first sight it might make sense to the reader to rather structure |
| 141 | e.g. the 'nitb_iface' or 'arfcn' configuration as + |
| 142 | '"arfcn: GSM-1800: [512, 514, ...]"', + |
| 143 | but the more verbose format is chosen to stay consistent with the general |
| 144 | structure of resource configurations, which the resource allocation algorithm |
| 145 | uses to resolve required resources according to their traits. These |
| 146 | configurations look cumbersome because they exhibit only one trait / a trait |
| 147 | that is repeated numerous times. No special notation for these cases is |
| 148 | available (yet). |
| 149 | |
| 150 | [[default_suites]] |
| 151 | === 'default-suites.conf' (optional) |
| 152 | |
| 153 | The 'default-suites.conf' file contains a list of 'suite:scenario+scenario+...' |
| 154 | combination strings as defined by the 'osmo-gsm-tester.py -s' commandline |
| 155 | option. 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 |
| 157 | combinations is run in sequence. |
| 158 | |
| 159 | A suite name must match the name of a directory in the 'suites_dir' as defined |
| 160 | by 'paths.conf'. |
| 161 | |
| 162 | A scenario name must match the name of a configuration file in the |
| 163 | 'scenarios_dir' as defined by 'paths.conf' (optionally without the '.conf' |
| 164 | suffix). |
| 165 | |
| 166 | For 'paths.conf', see <<paths_conf>>. |
| 167 | |
| 168 | Example 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 Hofmeyr | b52df17 | 2017-05-14 20:09:35 +0200 | [diff] [blame] | 181 | *TODO*: voice is not actually implemented yet |
| 182 | |
Neels Hofmeyr | c0827c4 | 2017-04-23 15:04:19 +0200 | [diff] [blame] | 183 | === 'defaults.conf' (optional) |
| 184 | |
| 185 | Each binary run by osmo-gsm-tester, e.g. 'osmo-nitb' or 'osmo-bts-sysmo', |
| 186 | typically has a configuration file template that is populated with values for a |
| 187 | trial run. |
| 188 | |
| 189 | Some of these values are provided by the 'resources.conf' from the allocated |
| 190 | resource(s), but not all values can be populated this way: some osmo-nitb |
| 191 | configuration values like the network name, encryption algorithm or timeslot |
| 192 | channel combinations are in fact not resources (only the nitb's interface |
| 193 | address is). These additional settings may be provided by the scenario |
| 194 | configurations, but in case the provided scenarios leave some values unset, |
| 195 | they are taken from this 'defaults.conf'. (A 'scenario.conf' providing a |
| 196 | similar setting always has precedence over the values given in a |
| 197 | 'defaults.conf'). |
| 198 | |
| 199 | *TODO* better match this format with 'resources.conf'? |
| 200 | |
| 201 | Example of a 'defaults.conf': |
| 202 | |
| 203 | ---- |
| 204 | nitb: |
| 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 | |
| 213 | nitb_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 |