blob: 8a0b52f01dfd2a77a1c3a291fda526e255f13fa3 [file] [log] [blame]
Neels Hofmeyr3531a192017-03-28 14:30:28 +02001- expect solutions:
2[0, 1, 2]
3[0, 1, 2]
4[1, 0, 2]
5[1, 2, 0]
6- expect failure to solve:
7The requested resource requirements are not solvable [[0, 2], [2], [0, 2]]
8- test removing a Resources list from itself
Pau Espin Pedrolafa2fc32020-05-06 17:29:50 +02009ok, caused exception RuntimeError: Refusing to drop a list of resources from itself. This is probably a bug where a list of Resources() should have been copied but is passed as-is. use Resources.clear() instead.
Neels Hofmeyr3531a192017-03-28 14:30:28 +020010- test removing a Resources list from one with the same list in it
11- test resources config and state dir:
Pau Espin Pedrol6c6c0e82020-05-11 18:30:58 +020012cnf -: DBG: Found main configuration file in [PATH]/selftest/resource_test/conf/paths.conf which is [PATH]/selftest/resource_test/conf/paths.conf
13cnf -: DBG: MAIN CONFIG:
14{'default_suites_conf_path': '[PATH]/selftest/resource_test/conf/default-suites.conf',
15 'defaults_conf_path': '[PATH]/selftest/resource_test/conf/defaults.conf',
16 'resource_conf_path': '[PATH]/selftest/resource_test/conf/resources.conf',
17 'scenarios_dir': '[PATH]/selftest/resource_test/conf/scenarios',
18 'state_dir': '[PATH]/selftest/resource_test/conf/test_work/state_dir',
19 'suites_dir': '[PATH]/selftest/resource_test/conf/suite_test'}
Neels Hofmeyr3531a192017-03-28 14:30:28 +020020*** all resources:
21{'arfcn': [{'_hash': 'e620569450f8259b3f0212ec19c285dd07df063c',
22 'arfcn': '512',
23 'band': 'GSM-1800'},
24 {'_hash': '022621e513c5a5bf33b77430a1e9c886be676fa1',
25 'arfcn': '514',
26 'band': 'GSM-1800'},
27 {'_hash': '3199abf375a1dd899e554e9d63a552e06d7f38bf',
28 'arfcn': '516',
29 'band': 'GSM-1800'},
30 {'_hash': '57aa7bd1da62495f2857ae6b859193dd592a0a02',
31 'arfcn': '518',
32 'band': 'GSM-1800'},
33 {'_hash': '53dd2e2682b736f427abd2ce59a9a50ca8130678',
34 'arfcn': '520',
35 'band': 'GSM-1800'},
36 {'_hash': '31687a5e6d5140a4b3877606ca5f18244f11d706',
37 'arfcn': '540',
38 'band': 'GSM-1900'},
39 {'_hash': '1def43a5c88a83cdb21279eacab0679ea08ffaf3',
40 'arfcn': '542',
41 'band': 'GSM-1900'},
42 {'_hash': '1d6e3b08a3861fd4d748f111295ec5a93ecd3d23',
43 'arfcn': '544',
44 'band': 'GSM-1900'},
45 {'_hash': '8fb36927de15466fcdbee01f7f65704c312cb36c',
46 'arfcn': '546',
47 'band': 'GSM-1900'},
48 {'_hash': 'dc9ce027a257da087f31a5bc1ee6b4abd2637369',
49 'arfcn': '548',
50 'band': 'GSM-1900'}],
Pau Espin Pedrolce35d912017-11-23 11:01:24 +010051 'bts': [{'_hash': 'd2aa7c1124943de352351b650ca0c751784da6b6',
Neels Hofmeyr3531a192017-03-28 14:30:28 +020052 'addr': '10.42.42.114',
53 'band': 'GSM-1800',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020054 'ciphers': ['a5_0', 'a5_1'],
Pau Espin Pedrolce35d912017-11-23 11:01:24 +010055 'direct_pcu': 'True',
Neels Hofmeyr17c139e2017-04-12 02:42:02 +020056 'ipa_unit_id': '1',
Neels Hofmeyr3531a192017-03-28 14:30:28 +020057 'label': 'sysmoBTS 1002',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020058 'type': 'osmo-bts-sysmo'},
Pau Espin Pedrol0d455042018-08-27 17:07:41 +020059 {'_hash': '2158317d5e0055070e7174c2498dedf53a2957e9',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020060 'addr': '10.42.42.50',
Neels Hofmeyr3531a192017-03-28 14:30:28 +020061 'band': 'GSM-1800',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020062 'ciphers': ['a5_0', 'a5_1'],
63 'ipa_unit_id': '6',
64 'label': 'Ettus B200',
Pau Espin Pedrol0d455042018-08-27 17:07:41 +020065 'osmo_trx': {'clock_reference': 'external', 'launch_trx': 'True'},
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020066 'type': 'osmo-bts-trx'},
Pau Espin Pedrol0d455042018-08-27 17:07:41 +020067 {'_hash': 'f964ba5fe7a37b97ec3e0c4ef21c9231a19de45d',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020068 'addr': '10.42.42.51',
69 'band': 'GSM-1800',
70 'ciphers': ['a5_0', 'a5_1'],
71 'ipa_unit_id': '7',
72 'label': 'sysmoCell 5000',
Pau Espin Pedrol0d455042018-08-27 17:07:41 +020073 'osmo_trx': {'clock_reference': 'external',
74 'launch_trx': 'False',
75 'trx_ip': '10.42.42.112'},
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020076 'type': 'osmo-bts-trx'}],
77 'ip_address': [{'_hash': 'fd103b22c7cf2480d609150e06f4bbd92ac78d8c',
Neels Hofmeyr76d81032017-05-18 18:35:32 +020078 'addr': '10.42.42.2'},
79 {'_hash': '1c614d6210c551d142aadca8f25e1534ebb2a70f',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020080 'addr': '10.42.42.3'},
81 {'_hash': '862b529c701adf302477bc126a8032cfc2ec4753',
82 'addr': '10.42.42.4'},
83 {'_hash': '05feb6e1e24ca4235889eb28d0a8d5cedac6e5d1',
84 'addr': '10.42.42.5'},
85 {'_hash': 'e780ac7581ad29f8f46e637b61d0c38898c4c52c',
86 'addr': '10.42.42.6'}],
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +010087 'modem': [{'_hash': '0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0',
88 'auth_algo': 'comp128v1',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020089 'ciphers': ['a5_0', 'a5_1'],
90 'imsi': '901700000009031',
91 'ki': '80A37E6FDEA931EAC92FFA5F671EFEAD',
92 'label': 'sierra_1',
93 'path': '/sierra_1'},
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +010094 {'_hash': '3a6e7747dfe7dfdf817bd3351031bd08051605c3',
95 'auth_algo': 'comp128v1',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020096 'ciphers': ['a5_0', 'a5_1'],
97 'imsi': '901700000009029',
98 'ki': '00969E283349D354A8239E877F2E0866',
99 'label': 'sierra_2',
100 'path': '/sierra_2'},
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100101 {'_hash': 'f6ba17db2ad13da5ba5c54b5385a774f5351bb5a',
102 'auth_algo': 'comp128v1',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200103 'ciphers': ['a5_0', 'a5_1'],
104 'imsi': '901700000009030',
105 'ki': 'BB70807226393CDBAC8DD3439FF54252',
106 'label': 'gobi_0',
107 'path': '/gobi_0'},
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100108 {'_hash': 'fbff2e4f06b727fc8a70da23e1d134f9cd763919',
109 'auth_algo': 'comp128v1',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200110 'ciphers': ['a5_0', 'a5_1'],
111 'imsi': '901700000009032',
112 'ki': '2F70DCA43C45ACB97E947FDD0C7CA30A',
113 'label': 'gobi_3',
114 'path': '/gobi_3'}]}
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200115*** end: all resources
116
117- request some resources
Neels Hofmeyrcccbe592017-05-07 01:16:07 +0200118--- testowner: Reserving 2 x arfcn (candidates: 10)
119--- testowner: DBG: Picked - _hash: e620569450f8259b3f0212ec19c285dd07df063c
Neels Hofmeyr17c139e2017-04-12 02:42:02 +0200120 arfcn: '512'
121 band: GSM-1800
122- _hash: 022621e513c5a5bf33b77430a1e9c886be676fa1
123 arfcn: '514'
124 band: GSM-1800
Neels Hofmeyrcccbe592017-05-07 01:16:07 +0200125--- testowner: Reserving 2 x bts (candidates: 3)
Pau Espin Pedrolce35d912017-11-23 11:01:24 +0100126--- testowner: DBG: Picked - _hash: d2aa7c1124943de352351b650ca0c751784da6b6
Neels Hofmeyr17c139e2017-04-12 02:42:02 +0200127 addr: 10.42.42.114
128 band: GSM-1800
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200129 ciphers:
130 - a5_0
131 - a5_1
Pau Espin Pedrolce35d912017-11-23 11:01:24 +0100132 direct_pcu: 'True'
Neels Hofmeyr17c139e2017-04-12 02:42:02 +0200133 ipa_unit_id: '1'
134 label: sysmoBTS 1002
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200135 type: osmo-bts-sysmo
Pau Espin Pedrol0d455042018-08-27 17:07:41 +0200136- _hash: 2158317d5e0055070e7174c2498dedf53a2957e9
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200137 addr: 10.42.42.50
Neels Hofmeyr17c139e2017-04-12 02:42:02 +0200138 band: GSM-1800
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200139 ciphers:
140 - a5_0
141 - a5_1
142 ipa_unit_id: '6'
143 label: Ettus B200
Pau Espin Pedrol0d455042018-08-27 17:07:41 +0200144 osmo_trx:
145 clock_reference: external
146 launch_trx: 'True'
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200147 type: osmo-bts-trx
148--- testowner: Reserving 1 x ip_address (candidates: 5)
149--- testowner: DBG: Picked - _hash: fd103b22c7cf2480d609150e06f4bbd92ac78d8c
150 addr: 10.42.42.2
151--- testowner: Reserving 2 x modem (candidates: 4)
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100152--- testowner: DBG: Picked - _hash: 0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0
153 auth_algo: comp128v1
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200154 ciphers:
155 - a5_0
156 - a5_1
157 imsi: '901700000009031'
158 ki: 80A37E6FDEA931EAC92FFA5F671EFEAD
159 label: sierra_1
160 path: /sierra_1
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100161- _hash: 3a6e7747dfe7dfdf817bd3351031bd08051605c3
162 auth_algo: comp128v1
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200163 ciphers:
164 - a5_0
165 - a5_1
166 imsi: '901700000009029'
167 ki: 00969E283349D354A8239E877F2E0866
168 label: sierra_2
169 path: /sierra_2
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200170~~~ currently reserved:
171arfcn:
172- _hash: e620569450f8259b3f0212ec19c285dd07df063c
173 _reserved_by: testowner-123-1490837279
174 arfcn: '512'
175 band: GSM-1800
176- _hash: 022621e513c5a5bf33b77430a1e9c886be676fa1
177 _reserved_by: testowner-123-1490837279
178 arfcn: '514'
179 band: GSM-1800
180bts:
Pau Espin Pedrolce35d912017-11-23 11:01:24 +0100181- _hash: d2aa7c1124943de352351b650ca0c751784da6b6
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200182 _reserved_by: testowner-123-1490837279
183 addr: 10.42.42.114
184 band: GSM-1800
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200185 ciphers:
186 - a5_0
187 - a5_1
Pau Espin Pedrolce35d912017-11-23 11:01:24 +0100188 direct_pcu: 'True'
Neels Hofmeyr17c139e2017-04-12 02:42:02 +0200189 ipa_unit_id: '1'
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200190 label: sysmoBTS 1002
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200191 type: osmo-bts-sysmo
Pau Espin Pedrol0d455042018-08-27 17:07:41 +0200192- _hash: 2158317d5e0055070e7174c2498dedf53a2957e9
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200193 _reserved_by: testowner-123-1490837279
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200194 addr: 10.42.42.50
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200195 band: GSM-1800
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200196 ciphers:
197 - a5_0
198 - a5_1
199 ipa_unit_id: '6'
200 label: Ettus B200
Pau Espin Pedrol0d455042018-08-27 17:07:41 +0200201 osmo_trx:
202 clock_reference: external
203 launch_trx: 'True'
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200204 type: osmo-bts-trx
Neels Hofmeyr76d81032017-05-18 18:35:32 +0200205ip_address:
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200206- _hash: fd103b22c7cf2480d609150e06f4bbd92ac78d8c
Neels Hofmeyr76d81032017-05-18 18:35:32 +0200207 _reserved_by: testowner-123-1490837279
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200208 addr: 10.42.42.2
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200209modem:
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100210- _hash: 0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200211 _reserved_by: testowner-123-1490837279
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100212 auth_algo: comp128v1
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200213 ciphers:
214 - a5_0
215 - a5_1
216 imsi: '901700000009031'
217 ki: 80A37E6FDEA931EAC92FFA5F671EFEAD
218 label: sierra_1
219 path: /sierra_1
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100220- _hash: 3a6e7747dfe7dfdf817bd3351031bd08051605c3
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200221 _reserved_by: testowner-123-1490837279
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100222 auth_algo: comp128v1
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200223 ciphers:
224 - a5_0
225 - a5_1
226 imsi: '901700000009029'
227 ki: 00969E283349D354A8239E877F2E0866
228 label: sierra_2
229 path: /sierra_2
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200230
231~~~ end: currently reserved
232
Pau Espin Pedrolaab56922018-08-21 14:58:29 +0200233~~~ with modifiers:
234resources(testowner)={'arfcn': [{'_hash': 'e620569450f8259b3f0212ec19c285dd07df063c',
235 '_reserved_by': 'testowner-123-1490837279',
236 'arfcn': '512',
237 'band': 'GSM-1800'},
238 {'_hash': '022621e513c5a5bf33b77430a1e9c886be676fa1',
239 '_reserved_by': 'testowner-123-1490837279',
240 'arfcn': '514',
241 'band': 'GSM-1800'}],
242 'bts': [{'_hash': 'd2aa7c1124943de352351b650ca0c751784da6b6',
243 '_reserved_by': 'testowner-123-1490837279',
244 'addr': '10.42.42.114',
245 'band': 'GSM-1800',
246 'ciphers': ['a5_0', 'a5_1'],
247 'direct_pcu': 'True',
248 'ipa_unit_id': '1',
249 'label': 'sysmoBTS 1002',
250 'type': 'osmo-bts-sysmo'},
Pau Espin Pedrol0d455042018-08-27 17:07:41 +0200251 {'_hash': '2158317d5e0055070e7174c2498dedf53a2957e9',
Pau Espin Pedrolaab56922018-08-21 14:58:29 +0200252 '_reserved_by': 'testowner-123-1490837279',
253 'addr': '10.42.42.50',
254 'band': 'GSM-1800',
255 'ciphers': ['a5_0', 'a5_1'],
256 'ipa_unit_id': '6',
257 'label': 'Ettus B200',
Pau Espin Pedrolaab56922018-08-21 14:58:29 +0200258 'num_trx': 2,
Pau Espin Pedrol0d455042018-08-27 17:07:41 +0200259 'osmo_trx': {'clock_reference': 'external', 'launch_trx': 'True'},
Pau Espin Pedrolaab56922018-08-21 14:58:29 +0200260 'type': 'osmo-bts-trx'}],
261 'ip_address': [{'_hash': 'fd103b22c7cf2480d609150e06f4bbd92ac78d8c',
262 '_reserved_by': 'testowner-123-1490837279',
263 'addr': '10.42.42.2'}],
264 'modem': [{'_hash': '0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0',
265 '_reserved_by': 'testowner-123-1490837279',
266 'auth_algo': 'comp128v1',
267 'ciphers': ['a5_0', 'a5_1'],
268 'imsi': '901700000009031',
269 'ki': '80A37E6FDEA931EAC92FFA5F671EFEAD',
270 'label': 'sierra_1',
271 'path': '/sierra_1'},
272 {'_hash': '3a6e7747dfe7dfdf817bd3351031bd08051605c3',
273 '_reserved_by': 'testowner-123-1490837279',
274 'auth_algo': 'comp128v1',
275 'ciphers': ['a5_0', 'a5_1'],
276 'imsi': '901700000009029',
277 'ki': '00969E283349D354A8239E877F2E0866',
278 'label': 'sierra_2',
279 'path': '/sierra_2'}]}
280~~~ end: with modifiers:
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200281~~~ currently reserved:
282{}
283
284~~~ end: currently reserved
285
Pau Espin Pedrol58475512017-09-14 15:33:15 +0200286- item_matches:
2871st subset matches correctly, pass
2882nd subset matches correctly, pass
2893rd subset should not match, pass
2903rd subset should not match, pass
2914th subset should not match, pass