blob: 0ad760ed6cd7ebf04a2b2caddbf016480f3d042a [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',
Pau Espin Pedrole972c9c2020-05-12 15:06:55 +020019 'suites_dir': '[PATH]/selftest/resource_test/conf/suite_test',
20 'trial_dir': '[PATH]/selftest/resource_test/conf/trial'}
Neels Hofmeyr3531a192017-03-28 14:30:28 +020021*** all resources:
22{'arfcn': [{'_hash': 'e620569450f8259b3f0212ec19c285dd07df063c',
23 'arfcn': '512',
24 'band': 'GSM-1800'},
25 {'_hash': '022621e513c5a5bf33b77430a1e9c886be676fa1',
26 'arfcn': '514',
27 'band': 'GSM-1800'},
28 {'_hash': '3199abf375a1dd899e554e9d63a552e06d7f38bf',
29 'arfcn': '516',
30 'band': 'GSM-1800'},
31 {'_hash': '57aa7bd1da62495f2857ae6b859193dd592a0a02',
32 'arfcn': '518',
33 'band': 'GSM-1800'},
34 {'_hash': '53dd2e2682b736f427abd2ce59a9a50ca8130678',
35 'arfcn': '520',
36 'band': 'GSM-1800'},
37 {'_hash': '31687a5e6d5140a4b3877606ca5f18244f11d706',
38 'arfcn': '540',
39 'band': 'GSM-1900'},
40 {'_hash': '1def43a5c88a83cdb21279eacab0679ea08ffaf3',
41 'arfcn': '542',
42 'band': 'GSM-1900'},
43 {'_hash': '1d6e3b08a3861fd4d748f111295ec5a93ecd3d23',
44 'arfcn': '544',
45 'band': 'GSM-1900'},
46 {'_hash': '8fb36927de15466fcdbee01f7f65704c312cb36c',
47 'arfcn': '546',
48 'band': 'GSM-1900'},
49 {'_hash': 'dc9ce027a257da087f31a5bc1ee6b4abd2637369',
50 'arfcn': '548',
51 'band': 'GSM-1900'}],
Pau Espin Pedrolce35d912017-11-23 11:01:24 +010052 'bts': [{'_hash': 'd2aa7c1124943de352351b650ca0c751784da6b6',
Neels Hofmeyr3531a192017-03-28 14:30:28 +020053 'addr': '10.42.42.114',
54 'band': 'GSM-1800',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020055 'ciphers': ['a5_0', 'a5_1'],
Pau Espin Pedrolce35d912017-11-23 11:01:24 +010056 'direct_pcu': 'True',
Neels Hofmeyr17c139e2017-04-12 02:42:02 +020057 'ipa_unit_id': '1',
Neels Hofmeyr3531a192017-03-28 14:30:28 +020058 'label': 'sysmoBTS 1002',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020059 'type': 'osmo-bts-sysmo'},
Pau Espin Pedrol0d455042018-08-27 17:07:41 +020060 {'_hash': '2158317d5e0055070e7174c2498dedf53a2957e9',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020061 'addr': '10.42.42.50',
Neels Hofmeyr3531a192017-03-28 14:30:28 +020062 'band': 'GSM-1800',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020063 'ciphers': ['a5_0', 'a5_1'],
64 'ipa_unit_id': '6',
65 'label': 'Ettus B200',
Pau Espin Pedrol0d455042018-08-27 17:07:41 +020066 'osmo_trx': {'clock_reference': 'external', 'launch_trx': 'True'},
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020067 'type': 'osmo-bts-trx'},
Pau Espin Pedrol0d455042018-08-27 17:07:41 +020068 {'_hash': 'f964ba5fe7a37b97ec3e0c4ef21c9231a19de45d',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020069 'addr': '10.42.42.51',
70 'band': 'GSM-1800',
71 'ciphers': ['a5_0', 'a5_1'],
72 'ipa_unit_id': '7',
73 'label': 'sysmoCell 5000',
Pau Espin Pedrol0d455042018-08-27 17:07:41 +020074 'osmo_trx': {'clock_reference': 'external',
75 'launch_trx': 'False',
76 'trx_ip': '10.42.42.112'},
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020077 'type': 'osmo-bts-trx'}],
78 'ip_address': [{'_hash': 'fd103b22c7cf2480d609150e06f4bbd92ac78d8c',
Neels Hofmeyr76d81032017-05-18 18:35:32 +020079 'addr': '10.42.42.2'},
80 {'_hash': '1c614d6210c551d142aadca8f25e1534ebb2a70f',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020081 'addr': '10.42.42.3'},
82 {'_hash': '862b529c701adf302477bc126a8032cfc2ec4753',
83 'addr': '10.42.42.4'},
84 {'_hash': '05feb6e1e24ca4235889eb28d0a8d5cedac6e5d1',
85 'addr': '10.42.42.5'},
86 {'_hash': 'e780ac7581ad29f8f46e637b61d0c38898c4c52c',
87 'addr': '10.42.42.6'}],
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +010088 'modem': [{'_hash': '0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0',
89 'auth_algo': 'comp128v1',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020090 'ciphers': ['a5_0', 'a5_1'],
91 'imsi': '901700000009031',
92 'ki': '80A37E6FDEA931EAC92FFA5F671EFEAD',
93 'label': 'sierra_1',
94 'path': '/sierra_1'},
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +010095 {'_hash': '3a6e7747dfe7dfdf817bd3351031bd08051605c3',
96 'auth_algo': 'comp128v1',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020097 'ciphers': ['a5_0', 'a5_1'],
98 'imsi': '901700000009029',
99 'ki': '00969E283349D354A8239E877F2E0866',
100 'label': 'sierra_2',
101 'path': '/sierra_2'},
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100102 {'_hash': 'f6ba17db2ad13da5ba5c54b5385a774f5351bb5a',
103 'auth_algo': 'comp128v1',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200104 'ciphers': ['a5_0', 'a5_1'],
105 'imsi': '901700000009030',
106 'ki': 'BB70807226393CDBAC8DD3439FF54252',
107 'label': 'gobi_0',
108 'path': '/gobi_0'},
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100109 {'_hash': 'fbff2e4f06b727fc8a70da23e1d134f9cd763919',
110 'auth_algo': 'comp128v1',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200111 'ciphers': ['a5_0', 'a5_1'],
112 'imsi': '901700000009032',
113 'ki': '2F70DCA43C45ACB97E947FDD0C7CA30A',
114 'label': 'gobi_3',
115 'path': '/gobi_3'}]}
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200116*** end: all resources
117
118- request some resources
Neels Hofmeyrcccbe592017-05-07 01:16:07 +0200119--- testowner: Reserving 2 x arfcn (candidates: 10)
120--- testowner: DBG: Picked - _hash: e620569450f8259b3f0212ec19c285dd07df063c
Neels Hofmeyr17c139e2017-04-12 02:42:02 +0200121 arfcn: '512'
122 band: GSM-1800
123- _hash: 022621e513c5a5bf33b77430a1e9c886be676fa1
124 arfcn: '514'
125 band: GSM-1800
Neels Hofmeyrcccbe592017-05-07 01:16:07 +0200126--- testowner: Reserving 2 x bts (candidates: 3)
Pau Espin Pedrolce35d912017-11-23 11:01:24 +0100127--- testowner: DBG: Picked - _hash: d2aa7c1124943de352351b650ca0c751784da6b6
Neels Hofmeyr17c139e2017-04-12 02:42:02 +0200128 addr: 10.42.42.114
129 band: GSM-1800
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200130 ciphers:
131 - a5_0
132 - a5_1
Pau Espin Pedrolce35d912017-11-23 11:01:24 +0100133 direct_pcu: 'True'
Neels Hofmeyr17c139e2017-04-12 02:42:02 +0200134 ipa_unit_id: '1'
135 label: sysmoBTS 1002
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200136 type: osmo-bts-sysmo
Pau Espin Pedrol0d455042018-08-27 17:07:41 +0200137- _hash: 2158317d5e0055070e7174c2498dedf53a2957e9
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200138 addr: 10.42.42.50
Neels Hofmeyr17c139e2017-04-12 02:42:02 +0200139 band: GSM-1800
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200140 ciphers:
141 - a5_0
142 - a5_1
143 ipa_unit_id: '6'
144 label: Ettus B200
Pau Espin Pedrol0d455042018-08-27 17:07:41 +0200145 osmo_trx:
146 clock_reference: external
147 launch_trx: 'True'
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200148 type: osmo-bts-trx
149--- testowner: Reserving 1 x ip_address (candidates: 5)
150--- testowner: DBG: Picked - _hash: fd103b22c7cf2480d609150e06f4bbd92ac78d8c
151 addr: 10.42.42.2
152--- testowner: Reserving 2 x modem (candidates: 4)
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100153--- testowner: DBG: Picked - _hash: 0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0
154 auth_algo: comp128v1
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200155 ciphers:
156 - a5_0
157 - a5_1
158 imsi: '901700000009031'
159 ki: 80A37E6FDEA931EAC92FFA5F671EFEAD
160 label: sierra_1
161 path: /sierra_1
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100162- _hash: 3a6e7747dfe7dfdf817bd3351031bd08051605c3
163 auth_algo: comp128v1
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200164 ciphers:
165 - a5_0
166 - a5_1
167 imsi: '901700000009029'
168 ki: 00969E283349D354A8239E877F2E0866
169 label: sierra_2
170 path: /sierra_2
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200171~~~ currently reserved:
172arfcn:
173- _hash: e620569450f8259b3f0212ec19c285dd07df063c
174 _reserved_by: testowner-123-1490837279
175 arfcn: '512'
176 band: GSM-1800
177- _hash: 022621e513c5a5bf33b77430a1e9c886be676fa1
178 _reserved_by: testowner-123-1490837279
179 arfcn: '514'
180 band: GSM-1800
181bts:
Pau Espin Pedrolce35d912017-11-23 11:01:24 +0100182- _hash: d2aa7c1124943de352351b650ca0c751784da6b6
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200183 _reserved_by: testowner-123-1490837279
184 addr: 10.42.42.114
185 band: GSM-1800
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200186 ciphers:
187 - a5_0
188 - a5_1
Pau Espin Pedrolce35d912017-11-23 11:01:24 +0100189 direct_pcu: 'True'
Neels Hofmeyr17c139e2017-04-12 02:42:02 +0200190 ipa_unit_id: '1'
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200191 label: sysmoBTS 1002
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200192 type: osmo-bts-sysmo
Pau Espin Pedrol0d455042018-08-27 17:07:41 +0200193- _hash: 2158317d5e0055070e7174c2498dedf53a2957e9
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200194 _reserved_by: testowner-123-1490837279
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200195 addr: 10.42.42.50
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200196 band: GSM-1800
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200197 ciphers:
198 - a5_0
199 - a5_1
200 ipa_unit_id: '6'
201 label: Ettus B200
Pau Espin Pedrol0d455042018-08-27 17:07:41 +0200202 osmo_trx:
203 clock_reference: external
204 launch_trx: 'True'
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200205 type: osmo-bts-trx
Neels Hofmeyr76d81032017-05-18 18:35:32 +0200206ip_address:
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200207- _hash: fd103b22c7cf2480d609150e06f4bbd92ac78d8c
Neels Hofmeyr76d81032017-05-18 18:35:32 +0200208 _reserved_by: testowner-123-1490837279
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200209 addr: 10.42.42.2
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200210modem:
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100211- _hash: 0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200212 _reserved_by: testowner-123-1490837279
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100213 auth_algo: comp128v1
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200214 ciphers:
215 - a5_0
216 - a5_1
217 imsi: '901700000009031'
218 ki: 80A37E6FDEA931EAC92FFA5F671EFEAD
219 label: sierra_1
220 path: /sierra_1
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100221- _hash: 3a6e7747dfe7dfdf817bd3351031bd08051605c3
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200222 _reserved_by: testowner-123-1490837279
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100223 auth_algo: comp128v1
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200224 ciphers:
225 - a5_0
226 - a5_1
227 imsi: '901700000009029'
228 ki: 00969E283349D354A8239E877F2E0866
229 label: sierra_2
230 path: /sierra_2
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200231
232~~~ end: currently reserved
233
Pau Espin Pedrolaab56922018-08-21 14:58:29 +0200234~~~ with modifiers:
235resources(testowner)={'arfcn': [{'_hash': 'e620569450f8259b3f0212ec19c285dd07df063c',
236 '_reserved_by': 'testowner-123-1490837279',
237 'arfcn': '512',
238 'band': 'GSM-1800'},
239 {'_hash': '022621e513c5a5bf33b77430a1e9c886be676fa1',
240 '_reserved_by': 'testowner-123-1490837279',
241 'arfcn': '514',
242 'band': 'GSM-1800'}],
243 'bts': [{'_hash': 'd2aa7c1124943de352351b650ca0c751784da6b6',
244 '_reserved_by': 'testowner-123-1490837279',
245 'addr': '10.42.42.114',
246 'band': 'GSM-1800',
247 'ciphers': ['a5_0', 'a5_1'],
248 'direct_pcu': 'True',
249 'ipa_unit_id': '1',
250 'label': 'sysmoBTS 1002',
251 'type': 'osmo-bts-sysmo'},
Pau Espin Pedrol0d455042018-08-27 17:07:41 +0200252 {'_hash': '2158317d5e0055070e7174c2498dedf53a2957e9',
Pau Espin Pedrolaab56922018-08-21 14:58:29 +0200253 '_reserved_by': 'testowner-123-1490837279',
254 'addr': '10.42.42.50',
255 'band': 'GSM-1800',
256 'ciphers': ['a5_0', 'a5_1'],
257 'ipa_unit_id': '6',
258 'label': 'Ettus B200',
Pau Espin Pedrolaab56922018-08-21 14:58:29 +0200259 'num_trx': 2,
Pau Espin Pedrol0d455042018-08-27 17:07:41 +0200260 'osmo_trx': {'clock_reference': 'external', 'launch_trx': 'True'},
Pau Espin Pedrolaab56922018-08-21 14:58:29 +0200261 'type': 'osmo-bts-trx'}],
262 'ip_address': [{'_hash': 'fd103b22c7cf2480d609150e06f4bbd92ac78d8c',
263 '_reserved_by': 'testowner-123-1490837279',
264 'addr': '10.42.42.2'}],
265 'modem': [{'_hash': '0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0',
266 '_reserved_by': 'testowner-123-1490837279',
267 'auth_algo': 'comp128v1',
268 'ciphers': ['a5_0', 'a5_1'],
269 'imsi': '901700000009031',
270 'ki': '80A37E6FDEA931EAC92FFA5F671EFEAD',
271 'label': 'sierra_1',
272 'path': '/sierra_1'},
273 {'_hash': '3a6e7747dfe7dfdf817bd3351031bd08051605c3',
274 '_reserved_by': 'testowner-123-1490837279',
275 'auth_algo': 'comp128v1',
276 'ciphers': ['a5_0', 'a5_1'],
277 'imsi': '901700000009029',
278 'ki': '00969E283349D354A8239E877F2E0866',
279 'label': 'sierra_2',
280 'path': '/sierra_2'}]}
281~~~ end: with modifiers:
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200282~~~ currently reserved:
283{}
284
285~~~ end: currently reserved
286
Pau Espin Pedrol58475512017-09-14 15:33:15 +0200287- item_matches:
2881st subset matches correctly, pass
2892nd subset matches correctly, pass
2903rd subset should not match, pass
2913rd subset should not match, pass
2924th subset should not match, pass