blob: 3ec922bf5758a56a2c164f1a1122e3cedb155c8b [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'},
57 {'_hash': '6a9c9fbd364e1563a5b9f0826030a7888fd19575',
58 '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',
63 'launch_trx': 'True',
64 'type': 'osmo-bts-trx'},
65 {'_hash': 'e50fd38e3bfe8039ac13bc315bc84f46110b7443',
66 'addr': '10.42.42.51',
67 'band': 'GSM-1800',
68 'ciphers': ['a5_0', 'a5_1'],
69 'ipa_unit_id': '7',
70 'label': 'sysmoCell 5000',
71 'trx_remote_ip': '10.42.42.112',
72 'type': 'osmo-bts-trx'}],
73 'ip_address': [{'_hash': 'fd103b22c7cf2480d609150e06f4bbd92ac78d8c',
Neels Hofmeyr76d81032017-05-18 18:35:32 +020074 'addr': '10.42.42.2'},
75 {'_hash': '1c614d6210c551d142aadca8f25e1534ebb2a70f',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020076 'addr': '10.42.42.3'},
77 {'_hash': '862b529c701adf302477bc126a8032cfc2ec4753',
78 'addr': '10.42.42.4'},
79 {'_hash': '05feb6e1e24ca4235889eb28d0a8d5cedac6e5d1',
80 'addr': '10.42.42.5'},
81 {'_hash': 'e780ac7581ad29f8f46e637b61d0c38898c4c52c',
82 'addr': '10.42.42.6'}],
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +010083 'modem': [{'_hash': '0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0',
84 'auth_algo': 'comp128v1',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020085 'ciphers': ['a5_0', 'a5_1'],
86 'imsi': '901700000009031',
87 'ki': '80A37E6FDEA931EAC92FFA5F671EFEAD',
88 'label': 'sierra_1',
89 'path': '/sierra_1'},
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +010090 {'_hash': '3a6e7747dfe7dfdf817bd3351031bd08051605c3',
91 'auth_algo': 'comp128v1',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020092 'ciphers': ['a5_0', 'a5_1'],
93 'imsi': '901700000009029',
94 'ki': '00969E283349D354A8239E877F2E0866',
95 'label': 'sierra_2',
96 'path': '/sierra_2'},
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +010097 {'_hash': 'f6ba17db2ad13da5ba5c54b5385a774f5351bb5a',
98 'auth_algo': 'comp128v1',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020099 'ciphers': ['a5_0', 'a5_1'],
100 'imsi': '901700000009030',
101 'ki': 'BB70807226393CDBAC8DD3439FF54252',
102 'label': 'gobi_0',
103 'path': '/gobi_0'},
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100104 {'_hash': 'fbff2e4f06b727fc8a70da23e1d134f9cd763919',
105 'auth_algo': 'comp128v1',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200106 'ciphers': ['a5_0', 'a5_1'],
107 'imsi': '901700000009032',
108 'ki': '2F70DCA43C45ACB97E947FDD0C7CA30A',
109 'label': 'gobi_3',
110 'path': '/gobi_3'}]}
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200111*** end: all resources
112
113- request some resources
Neels Hofmeyrcccbe592017-05-07 01:16:07 +0200114--- testowner: Reserving 2 x arfcn (candidates: 10)
115--- testowner: DBG: Picked - _hash: e620569450f8259b3f0212ec19c285dd07df063c
Neels Hofmeyr17c139e2017-04-12 02:42:02 +0200116 arfcn: '512'
117 band: GSM-1800
118- _hash: 022621e513c5a5bf33b77430a1e9c886be676fa1
119 arfcn: '514'
120 band: GSM-1800
Neels Hofmeyrcccbe592017-05-07 01:16:07 +0200121--- testowner: Reserving 2 x bts (candidates: 3)
Pau Espin Pedrolce35d912017-11-23 11:01:24 +0100122--- testowner: DBG: Picked - _hash: d2aa7c1124943de352351b650ca0c751784da6b6
Neels Hofmeyr17c139e2017-04-12 02:42:02 +0200123 addr: 10.42.42.114
124 band: GSM-1800
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200125 ciphers:
126 - a5_0
127 - a5_1
Pau Espin Pedrolce35d912017-11-23 11:01:24 +0100128 direct_pcu: 'True'
Neels Hofmeyr17c139e2017-04-12 02:42:02 +0200129 ipa_unit_id: '1'
130 label: sysmoBTS 1002
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200131 type: osmo-bts-sysmo
132- _hash: 6a9c9fbd364e1563a5b9f0826030a7888fd19575
133 addr: 10.42.42.50
Neels Hofmeyr17c139e2017-04-12 02:42:02 +0200134 band: GSM-1800
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200135 ciphers:
136 - a5_0
137 - a5_1
138 ipa_unit_id: '6'
139 label: Ettus B200
140 launch_trx: 'True'
141 type: osmo-bts-trx
142--- testowner: Reserving 1 x ip_address (candidates: 5)
143--- testowner: DBG: Picked - _hash: fd103b22c7cf2480d609150e06f4bbd92ac78d8c
144 addr: 10.42.42.2
145--- testowner: Reserving 2 x modem (candidates: 4)
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100146--- testowner: DBG: Picked - _hash: 0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0
147 auth_algo: comp128v1
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200148 ciphers:
149 - a5_0
150 - a5_1
151 imsi: '901700000009031'
152 ki: 80A37E6FDEA931EAC92FFA5F671EFEAD
153 label: sierra_1
154 path: /sierra_1
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100155- _hash: 3a6e7747dfe7dfdf817bd3351031bd08051605c3
156 auth_algo: comp128v1
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200157 ciphers:
158 - a5_0
159 - a5_1
160 imsi: '901700000009029'
161 ki: 00969E283349D354A8239E877F2E0866
162 label: sierra_2
163 path: /sierra_2
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200164~~~ currently reserved:
165arfcn:
166- _hash: e620569450f8259b3f0212ec19c285dd07df063c
167 _reserved_by: testowner-123-1490837279
168 arfcn: '512'
169 band: GSM-1800
170- _hash: 022621e513c5a5bf33b77430a1e9c886be676fa1
171 _reserved_by: testowner-123-1490837279
172 arfcn: '514'
173 band: GSM-1800
174bts:
Pau Espin Pedrolce35d912017-11-23 11:01:24 +0100175- _hash: d2aa7c1124943de352351b650ca0c751784da6b6
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200176 _reserved_by: testowner-123-1490837279
177 addr: 10.42.42.114
178 band: GSM-1800
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200179 ciphers:
180 - a5_0
181 - a5_1
Pau Espin Pedrolce35d912017-11-23 11:01:24 +0100182 direct_pcu: 'True'
Neels Hofmeyr17c139e2017-04-12 02:42:02 +0200183 ipa_unit_id: '1'
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200184 label: sysmoBTS 1002
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200185 type: osmo-bts-sysmo
186- _hash: 6a9c9fbd364e1563a5b9f0826030a7888fd19575
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200187 _reserved_by: testowner-123-1490837279
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200188 addr: 10.42.42.50
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200189 band: GSM-1800
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200190 ciphers:
191 - a5_0
192 - a5_1
193 ipa_unit_id: '6'
194 label: Ettus B200
195 launch_trx: 'True'
196 type: osmo-bts-trx
Neels Hofmeyr76d81032017-05-18 18:35:32 +0200197ip_address:
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200198- _hash: fd103b22c7cf2480d609150e06f4bbd92ac78d8c
Neels Hofmeyr76d81032017-05-18 18:35:32 +0200199 _reserved_by: testowner-123-1490837279
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200200 addr: 10.42.42.2
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200201modem:
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100202- _hash: 0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200203 _reserved_by: testowner-123-1490837279
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100204 auth_algo: comp128v1
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200205 ciphers:
206 - a5_0
207 - a5_1
208 imsi: '901700000009031'
209 ki: 80A37E6FDEA931EAC92FFA5F671EFEAD
210 label: sierra_1
211 path: /sierra_1
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100212- _hash: 3a6e7747dfe7dfdf817bd3351031bd08051605c3
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200213 _reserved_by: testowner-123-1490837279
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100214 auth_algo: comp128v1
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200215 ciphers:
216 - a5_0
217 - a5_1
218 imsi: '901700000009029'
219 ki: 00969E283349D354A8239E877F2E0866
220 label: sierra_2
221 path: /sierra_2
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200222
223~~~ end: currently reserved
224
Pau Espin Pedrolaab56922018-08-21 14:58:29 +0200225~~~ with modifiers:
226resources(testowner)={'arfcn': [{'_hash': 'e620569450f8259b3f0212ec19c285dd07df063c',
227 '_reserved_by': 'testowner-123-1490837279',
228 'arfcn': '512',
229 'band': 'GSM-1800'},
230 {'_hash': '022621e513c5a5bf33b77430a1e9c886be676fa1',
231 '_reserved_by': 'testowner-123-1490837279',
232 'arfcn': '514',
233 'band': 'GSM-1800'}],
234 'bts': [{'_hash': 'd2aa7c1124943de352351b650ca0c751784da6b6',
235 '_reserved_by': 'testowner-123-1490837279',
236 'addr': '10.42.42.114',
237 'band': 'GSM-1800',
238 'ciphers': ['a5_0', 'a5_1'],
239 'direct_pcu': 'True',
240 'ipa_unit_id': '1',
241 'label': 'sysmoBTS 1002',
242 'type': 'osmo-bts-sysmo'},
243 {'_hash': '6a9c9fbd364e1563a5b9f0826030a7888fd19575',
244 '_reserved_by': 'testowner-123-1490837279',
245 'addr': '10.42.42.50',
246 'band': 'GSM-1800',
247 'ciphers': ['a5_0', 'a5_1'],
248 'ipa_unit_id': '6',
249 'label': 'Ettus B200',
250 'launch_trx': 'True',
251 'num_trx': 2,
252 'type': 'osmo-bts-trx'}],
253 'ip_address': [{'_hash': 'fd103b22c7cf2480d609150e06f4bbd92ac78d8c',
254 '_reserved_by': 'testowner-123-1490837279',
255 'addr': '10.42.42.2'}],
256 'modem': [{'_hash': '0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0',
257 '_reserved_by': 'testowner-123-1490837279',
258 'auth_algo': 'comp128v1',
259 'ciphers': ['a5_0', 'a5_1'],
260 'imsi': '901700000009031',
261 'ki': '80A37E6FDEA931EAC92FFA5F671EFEAD',
262 'label': 'sierra_1',
263 'path': '/sierra_1'},
264 {'_hash': '3a6e7747dfe7dfdf817bd3351031bd08051605c3',
265 '_reserved_by': 'testowner-123-1490837279',
266 'auth_algo': 'comp128v1',
267 'ciphers': ['a5_0', 'a5_1'],
268 'imsi': '901700000009029',
269 'ki': '00969E283349D354A8239E877F2E0866',
270 'label': 'sierra_2',
271 'path': '/sierra_2'}]}
272~~~ end: with modifiers:
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200273~~~ currently reserved:
274{}
275
276~~~ end: currently reserved
277
Pau Espin Pedrol58475512017-09-14 15:33:15 +0200278- item_matches:
2791st subset matches correctly, pass
2802nd subset matches correctly, pass
2813rd subset should not match, pass
2823rd subset should not match, pass
2834th subset should not match, pass