blob: 08989a2d5dc8606c7ece3b083bbe653afe3dec3a [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
9ok, 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.',)
10- test removing a Resources list from one with the same list in it
11- test resources config and state dir:
Neels Hofmeyref9ed2d2017-05-04 16:39:29 +020012cnf -: DBG: Found config file paths.conf as [PATH]/selftest/conf/paths.conf in ./conf which is [PATH]/selftest/conf
13cnf -: DBG: [PATH]/selftest/conf/paths.conf: relative path ./test_work/state_dir is [PATH]/selftest/conf/test_work/state_dir
14cnf -: DBG: [PATH]/selftest/conf/paths.conf: relative path ./suite_test is [PATH]/selftest/conf/suite_test
15cnf -: DBG: Found path state_dir as [PATH]/selftest/conf/test_work/state_dir
Neels Hofmeyr1a7a3f02017-06-10 01:18:27 +020016cnf ResourcesPool: DBG: Found config file resources.conf as [PATH]/selftest/conf/resources.conf in ./conf which is [PATH]/selftest/conf
17cnf ResourcesPool: DBG: Found path state_dir as [PATH]/selftest/conf/test_work/state_dir
Neels Hofmeyr3531a192017-03-28 14:30:28 +020018*** all resources:
19{'arfcn': [{'_hash': 'e620569450f8259b3f0212ec19c285dd07df063c',
20 'arfcn': '512',
21 'band': 'GSM-1800'},
22 {'_hash': '022621e513c5a5bf33b77430a1e9c886be676fa1',
23 'arfcn': '514',
24 'band': 'GSM-1800'},
25 {'_hash': '3199abf375a1dd899e554e9d63a552e06d7f38bf',
26 'arfcn': '516',
27 'band': 'GSM-1800'},
28 {'_hash': '57aa7bd1da62495f2857ae6b859193dd592a0a02',
29 'arfcn': '518',
30 'band': 'GSM-1800'},
31 {'_hash': '53dd2e2682b736f427abd2ce59a9a50ca8130678',
32 'arfcn': '520',
33 'band': 'GSM-1800'},
34 {'_hash': '31687a5e6d5140a4b3877606ca5f18244f11d706',
35 'arfcn': '540',
36 'band': 'GSM-1900'},
37 {'_hash': '1def43a5c88a83cdb21279eacab0679ea08ffaf3',
38 'arfcn': '542',
39 'band': 'GSM-1900'},
40 {'_hash': '1d6e3b08a3861fd4d748f111295ec5a93ecd3d23',
41 'arfcn': '544',
42 'band': 'GSM-1900'},
43 {'_hash': '8fb36927de15466fcdbee01f7f65704c312cb36c',
44 'arfcn': '546',
45 'band': 'GSM-1900'},
46 {'_hash': 'dc9ce027a257da087f31a5bc1ee6b4abd2637369',
47 'arfcn': '548',
48 'band': 'GSM-1900'}],
Pau Espin Pedrolce35d912017-11-23 11:01:24 +010049 'bts': [{'_hash': 'd2aa7c1124943de352351b650ca0c751784da6b6',
Neels Hofmeyr3531a192017-03-28 14:30:28 +020050 'addr': '10.42.42.114',
51 'band': 'GSM-1800',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020052 'ciphers': ['a5_0', 'a5_1'],
Pau Espin Pedrolce35d912017-11-23 11:01:24 +010053 'direct_pcu': 'True',
Neels Hofmeyr17c139e2017-04-12 02:42:02 +020054 'ipa_unit_id': '1',
Neels Hofmeyr3531a192017-03-28 14:30:28 +020055 'label': 'sysmoBTS 1002',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020056 'type': 'osmo-bts-sysmo'},
Pau Espin Pedrol0d455042018-08-27 17:07:41 +020057 {'_hash': '2158317d5e0055070e7174c2498dedf53a2957e9',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020058 'addr': '10.42.42.50',
Neels Hofmeyr3531a192017-03-28 14:30:28 +020059 'band': 'GSM-1800',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020060 'ciphers': ['a5_0', 'a5_1'],
61 'ipa_unit_id': '6',
62 'label': 'Ettus B200',
Pau Espin Pedrol0d455042018-08-27 17:07:41 +020063 'osmo_trx': {'clock_reference': 'external', 'launch_trx': 'True'},
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020064 'type': 'osmo-bts-trx'},
Pau Espin Pedrol0d455042018-08-27 17:07:41 +020065 {'_hash': 'f964ba5fe7a37b97ec3e0c4ef21c9231a19de45d',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020066 'addr': '10.42.42.51',
67 'band': 'GSM-1800',
68 'ciphers': ['a5_0', 'a5_1'],
69 'ipa_unit_id': '7',
70 'label': 'sysmoCell 5000',
Pau Espin Pedrol0d455042018-08-27 17:07:41 +020071 'osmo_trx': {'clock_reference': 'external',
72 'launch_trx': 'False',
73 'trx_ip': '10.42.42.112'},
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020074 'type': 'osmo-bts-trx'}],
75 'ip_address': [{'_hash': 'fd103b22c7cf2480d609150e06f4bbd92ac78d8c',
Neels Hofmeyr76d81032017-05-18 18:35:32 +020076 'addr': '10.42.42.2'},
77 {'_hash': '1c614d6210c551d142aadca8f25e1534ebb2a70f',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020078 'addr': '10.42.42.3'},
79 {'_hash': '862b529c701adf302477bc126a8032cfc2ec4753',
80 'addr': '10.42.42.4'},
81 {'_hash': '05feb6e1e24ca4235889eb28d0a8d5cedac6e5d1',
82 'addr': '10.42.42.5'},
83 {'_hash': 'e780ac7581ad29f8f46e637b61d0c38898c4c52c',
84 'addr': '10.42.42.6'}],
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +010085 'modem': [{'_hash': '0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0',
86 'auth_algo': 'comp128v1',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020087 'ciphers': ['a5_0', 'a5_1'],
88 'imsi': '901700000009031',
89 'ki': '80A37E6FDEA931EAC92FFA5F671EFEAD',
90 'label': 'sierra_1',
91 'path': '/sierra_1'},
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +010092 {'_hash': '3a6e7747dfe7dfdf817bd3351031bd08051605c3',
93 'auth_algo': 'comp128v1',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020094 'ciphers': ['a5_0', 'a5_1'],
95 'imsi': '901700000009029',
96 'ki': '00969E283349D354A8239E877F2E0866',
97 'label': 'sierra_2',
98 'path': '/sierra_2'},
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +010099 {'_hash': 'f6ba17db2ad13da5ba5c54b5385a774f5351bb5a',
100 'auth_algo': 'comp128v1',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200101 'ciphers': ['a5_0', 'a5_1'],
102 'imsi': '901700000009030',
103 'ki': 'BB70807226393CDBAC8DD3439FF54252',
104 'label': 'gobi_0',
105 'path': '/gobi_0'},
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100106 {'_hash': 'fbff2e4f06b727fc8a70da23e1d134f9cd763919',
107 'auth_algo': 'comp128v1',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200108 'ciphers': ['a5_0', 'a5_1'],
109 'imsi': '901700000009032',
110 'ki': '2F70DCA43C45ACB97E947FDD0C7CA30A',
111 'label': 'gobi_3',
112 'path': '/gobi_3'}]}
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200113*** end: all resources
114
115- request some resources
Neels Hofmeyrcccbe592017-05-07 01:16:07 +0200116--- testowner: Reserving 2 x arfcn (candidates: 10)
117--- testowner: DBG: Picked - _hash: e620569450f8259b3f0212ec19c285dd07df063c
Neels Hofmeyr17c139e2017-04-12 02:42:02 +0200118 arfcn: '512'
119 band: GSM-1800
120- _hash: 022621e513c5a5bf33b77430a1e9c886be676fa1
121 arfcn: '514'
122 band: GSM-1800
Neels Hofmeyrcccbe592017-05-07 01:16:07 +0200123--- testowner: Reserving 2 x bts (candidates: 3)
Pau Espin Pedrolce35d912017-11-23 11:01:24 +0100124--- testowner: DBG: Picked - _hash: d2aa7c1124943de352351b650ca0c751784da6b6
Neels Hofmeyr17c139e2017-04-12 02:42:02 +0200125 addr: 10.42.42.114
126 band: GSM-1800
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200127 ciphers:
128 - a5_0
129 - a5_1
Pau Espin Pedrolce35d912017-11-23 11:01:24 +0100130 direct_pcu: 'True'
Neels Hofmeyr17c139e2017-04-12 02:42:02 +0200131 ipa_unit_id: '1'
132 label: sysmoBTS 1002
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200133 type: osmo-bts-sysmo
Pau Espin Pedrol0d455042018-08-27 17:07:41 +0200134- _hash: 2158317d5e0055070e7174c2498dedf53a2957e9
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200135 addr: 10.42.42.50
Neels Hofmeyr17c139e2017-04-12 02:42:02 +0200136 band: GSM-1800
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200137 ciphers:
138 - a5_0
139 - a5_1
140 ipa_unit_id: '6'
141 label: Ettus B200
Pau Espin Pedrol0d455042018-08-27 17:07:41 +0200142 osmo_trx:
143 clock_reference: external
144 launch_trx: 'True'
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200145 type: osmo-bts-trx
146--- testowner: Reserving 1 x ip_address (candidates: 5)
147--- testowner: DBG: Picked - _hash: fd103b22c7cf2480d609150e06f4bbd92ac78d8c
148 addr: 10.42.42.2
149--- testowner: Reserving 2 x modem (candidates: 4)
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100150--- testowner: DBG: Picked - _hash: 0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0
151 auth_algo: comp128v1
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200152 ciphers:
153 - a5_0
154 - a5_1
155 imsi: '901700000009031'
156 ki: 80A37E6FDEA931EAC92FFA5F671EFEAD
157 label: sierra_1
158 path: /sierra_1
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100159- _hash: 3a6e7747dfe7dfdf817bd3351031bd08051605c3
160 auth_algo: comp128v1
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200161 ciphers:
162 - a5_0
163 - a5_1
164 imsi: '901700000009029'
165 ki: 00969E283349D354A8239E877F2E0866
166 label: sierra_2
167 path: /sierra_2
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200168~~~ currently reserved:
169arfcn:
170- _hash: e620569450f8259b3f0212ec19c285dd07df063c
171 _reserved_by: testowner-123-1490837279
172 arfcn: '512'
173 band: GSM-1800
174- _hash: 022621e513c5a5bf33b77430a1e9c886be676fa1
175 _reserved_by: testowner-123-1490837279
176 arfcn: '514'
177 band: GSM-1800
178bts:
Pau Espin Pedrolce35d912017-11-23 11:01:24 +0100179- _hash: d2aa7c1124943de352351b650ca0c751784da6b6
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200180 _reserved_by: testowner-123-1490837279
181 addr: 10.42.42.114
182 band: GSM-1800
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200183 ciphers:
184 - a5_0
185 - a5_1
Pau Espin Pedrolce35d912017-11-23 11:01:24 +0100186 direct_pcu: 'True'
Neels Hofmeyr17c139e2017-04-12 02:42:02 +0200187 ipa_unit_id: '1'
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200188 label: sysmoBTS 1002
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200189 type: osmo-bts-sysmo
Pau Espin Pedrol0d455042018-08-27 17:07:41 +0200190- _hash: 2158317d5e0055070e7174c2498dedf53a2957e9
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200191 _reserved_by: testowner-123-1490837279
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200192 addr: 10.42.42.50
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200193 band: GSM-1800
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200194 ciphers:
195 - a5_0
196 - a5_1
197 ipa_unit_id: '6'
198 label: Ettus B200
Pau Espin Pedrol0d455042018-08-27 17:07:41 +0200199 osmo_trx:
200 clock_reference: external
201 launch_trx: 'True'
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200202 type: osmo-bts-trx
Neels Hofmeyr76d81032017-05-18 18:35:32 +0200203ip_address:
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200204- _hash: fd103b22c7cf2480d609150e06f4bbd92ac78d8c
Neels Hofmeyr76d81032017-05-18 18:35:32 +0200205 _reserved_by: testowner-123-1490837279
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200206 addr: 10.42.42.2
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200207modem:
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100208- _hash: 0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200209 _reserved_by: testowner-123-1490837279
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100210 auth_algo: comp128v1
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200211 ciphers:
212 - a5_0
213 - a5_1
214 imsi: '901700000009031'
215 ki: 80A37E6FDEA931EAC92FFA5F671EFEAD
216 label: sierra_1
217 path: /sierra_1
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100218- _hash: 3a6e7747dfe7dfdf817bd3351031bd08051605c3
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200219 _reserved_by: testowner-123-1490837279
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100220 auth_algo: comp128v1
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200221 ciphers:
222 - a5_0
223 - a5_1
224 imsi: '901700000009029'
225 ki: 00969E283349D354A8239E877F2E0866
226 label: sierra_2
227 path: /sierra_2
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200228
229~~~ end: currently reserved
230
Pau Espin Pedrolaab56922018-08-21 14:58:29 +0200231~~~ with modifiers:
232resources(testowner)={'arfcn': [{'_hash': 'e620569450f8259b3f0212ec19c285dd07df063c',
233 '_reserved_by': 'testowner-123-1490837279',
234 'arfcn': '512',
235 'band': 'GSM-1800'},
236 {'_hash': '022621e513c5a5bf33b77430a1e9c886be676fa1',
237 '_reserved_by': 'testowner-123-1490837279',
238 'arfcn': '514',
239 'band': 'GSM-1800'}],
240 'bts': [{'_hash': 'd2aa7c1124943de352351b650ca0c751784da6b6',
241 '_reserved_by': 'testowner-123-1490837279',
242 'addr': '10.42.42.114',
243 'band': 'GSM-1800',
244 'ciphers': ['a5_0', 'a5_1'],
245 'direct_pcu': 'True',
246 'ipa_unit_id': '1',
247 'label': 'sysmoBTS 1002',
248 'type': 'osmo-bts-sysmo'},
Pau Espin Pedrol0d455042018-08-27 17:07:41 +0200249 {'_hash': '2158317d5e0055070e7174c2498dedf53a2957e9',
Pau Espin Pedrolaab56922018-08-21 14:58:29 +0200250 '_reserved_by': 'testowner-123-1490837279',
251 'addr': '10.42.42.50',
252 'band': 'GSM-1800',
253 'ciphers': ['a5_0', 'a5_1'],
254 'ipa_unit_id': '6',
255 'label': 'Ettus B200',
Pau Espin Pedrolaab56922018-08-21 14:58:29 +0200256 'num_trx': 2,
Pau Espin Pedrol0d455042018-08-27 17:07:41 +0200257 'osmo_trx': {'clock_reference': 'external', 'launch_trx': 'True'},
Pau Espin Pedrolaab56922018-08-21 14:58:29 +0200258 'type': 'osmo-bts-trx'}],
259 'ip_address': [{'_hash': 'fd103b22c7cf2480d609150e06f4bbd92ac78d8c',
260 '_reserved_by': 'testowner-123-1490837279',
261 'addr': '10.42.42.2'}],
262 'modem': [{'_hash': '0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0',
263 '_reserved_by': 'testowner-123-1490837279',
264 'auth_algo': 'comp128v1',
265 'ciphers': ['a5_0', 'a5_1'],
266 'imsi': '901700000009031',
267 'ki': '80A37E6FDEA931EAC92FFA5F671EFEAD',
268 'label': 'sierra_1',
269 'path': '/sierra_1'},
270 {'_hash': '3a6e7747dfe7dfdf817bd3351031bd08051605c3',
271 '_reserved_by': 'testowner-123-1490837279',
272 'auth_algo': 'comp128v1',
273 'ciphers': ['a5_0', 'a5_1'],
274 'imsi': '901700000009029',
275 'ki': '00969E283349D354A8239E877F2E0866',
276 'label': 'sierra_2',
277 'path': '/sierra_2'}]}
278~~~ end: with modifiers:
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200279~~~ currently reserved:
280{}
281
282~~~ end: currently reserved
283
Pau Espin Pedrol58475512017-09-14 15:33:15 +0200284- item_matches:
2851st subset matches correctly, pass
2862nd subset matches correctly, pass
2873rd subset should not match, pass
2883rd subset should not match, pass
2894th subset should not match, pass