Neels Hofmeyr | 3531a19 | 2017-03-28 14:30:28 +0200 | [diff] [blame] | 1 | - expect solutions: |
| 2 | [0, 1, 2] |
| 3 | [0, 1, 2] |
| 4 | [1, 0, 2] |
| 5 | [1, 2, 0] |
| 6 | - expect failure to solve: |
| 7 | The requested resource requirements are not solvable [[0, 2], [2], [0, 2]] |
| 8 | - test removing a Resources list from itself |
| 9 | ok, 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: |
| 12 | *** all resources: |
| 13 | {'arfcn': [{'_hash': 'e620569450f8259b3f0212ec19c285dd07df063c', |
| 14 | 'arfcn': '512', |
| 15 | 'band': 'GSM-1800'}, |
| 16 | {'_hash': '022621e513c5a5bf33b77430a1e9c886be676fa1', |
| 17 | 'arfcn': '514', |
| 18 | 'band': 'GSM-1800'}, |
| 19 | {'_hash': '3199abf375a1dd899e554e9d63a552e06d7f38bf', |
| 20 | 'arfcn': '516', |
| 21 | 'band': 'GSM-1800'}, |
| 22 | {'_hash': '57aa7bd1da62495f2857ae6b859193dd592a0a02', |
| 23 | 'arfcn': '518', |
| 24 | 'band': 'GSM-1800'}, |
| 25 | {'_hash': '53dd2e2682b736f427abd2ce59a9a50ca8130678', |
| 26 | 'arfcn': '520', |
| 27 | 'band': 'GSM-1800'}, |
| 28 | {'_hash': '31687a5e6d5140a4b3877606ca5f18244f11d706', |
| 29 | 'arfcn': '540', |
| 30 | 'band': 'GSM-1900'}, |
| 31 | {'_hash': '1def43a5c88a83cdb21279eacab0679ea08ffaf3', |
| 32 | 'arfcn': '542', |
| 33 | 'band': 'GSM-1900'}, |
| 34 | {'_hash': '1d6e3b08a3861fd4d748f111295ec5a93ecd3d23', |
| 35 | 'arfcn': '544', |
| 36 | 'band': 'GSM-1900'}, |
| 37 | {'_hash': '8fb36927de15466fcdbee01f7f65704c312cb36c', |
| 38 | 'arfcn': '546', |
| 39 | 'band': 'GSM-1900'}, |
| 40 | {'_hash': 'dc9ce027a257da087f31a5bc1ee6b4abd2637369', |
| 41 | 'arfcn': '548', |
| 42 | 'band': 'GSM-1900'}], |
Neels Hofmeyr | 17c139e | 2017-04-12 02:42:02 +0200 | [diff] [blame] | 43 | 'bts': [{'_hash': '07d9c8aaa940b674efcbbabdd69f58a6ce4e94f9', |
Neels Hofmeyr | 3531a19 | 2017-03-28 14:30:28 +0200 | [diff] [blame] | 44 | 'addr': '10.42.42.114', |
| 45 | 'band': 'GSM-1800', |
Neels Hofmeyr | 17c139e | 2017-04-12 02:42:02 +0200 | [diff] [blame] | 46 | 'ipa_unit_id': '1', |
Neels Hofmeyr | 3531a19 | 2017-03-28 14:30:28 +0200 | [diff] [blame] | 47 | 'label': 'sysmoBTS 1002', |
Neels Hofmeyr | 17c139e | 2017-04-12 02:42:02 +0200 | [diff] [blame] | 48 | 'type': 'sysmo'}, |
| 49 | {'_hash': '76c8d2f459113cd6c99ed62d1a94bbe9a291ba94', |
Neels Hofmeyr | 3531a19 | 2017-03-28 14:30:28 +0200 | [diff] [blame] | 50 | 'addr': '10.42.42.115', |
| 51 | 'band': 'GSM-1800', |
Neels Hofmeyr | 17c139e | 2017-04-12 02:42:02 +0200 | [diff] [blame] | 52 | 'ipa_unit_id': '5', |
Neels Hofmeyr | 3531a19 | 2017-03-28 14:30:28 +0200 | [diff] [blame] | 53 | 'label': 'octBTS 3000', |
Neels Hofmeyr | 2694a9d | 2017-04-27 19:48:09 +0200 | [diff] [blame] | 54 | 'trx_list': [{'hw_addr': '00:0c:90:32:b5:8a'}], |
Neels Hofmeyr | 17c139e | 2017-04-12 02:42:02 +0200 | [diff] [blame] | 55 | 'type': 'oct'}, |
| 56 | {'_hash': '0b7fabd512b36aec43d7d496abd00af4e193b0f8', |
Neels Hofmeyr | 3531a19 | 2017-03-28 14:30:28 +0200 | [diff] [blame] | 57 | 'addr': '10.42.42.190', |
| 58 | 'band': 'GSM-1900', |
Neels Hofmeyr | 17c139e | 2017-04-12 02:42:02 +0200 | [diff] [blame] | 59 | 'ipa_unit_id': '1902', |
Neels Hofmeyr | 3531a19 | 2017-03-28 14:30:28 +0200 | [diff] [blame] | 60 | 'label': 'nanoBTS 1900', |
Neels Hofmeyr | 2694a9d | 2017-04-27 19:48:09 +0200 | [diff] [blame] | 61 | 'trx_list': [{'hw_addr': '00:02:95:00:41:b3'}], |
Neels Hofmeyr | 17c139e | 2017-04-12 02:42:02 +0200 | [diff] [blame] | 62 | 'type': 'nanobts'}], |
Neels Hofmeyr | 3531a19 | 2017-03-28 14:30:28 +0200 | [diff] [blame] | 63 | 'modem': [{'_hash': '19c69e45aa090fb511446bd00797690aa82ff52f', |
| 64 | 'imsi': '901700000007801', |
| 65 | 'ki': 'D620F48487B1B782DA55DF6717F08FF9', |
| 66 | 'label': 'm7801', |
| 67 | 'path': '/wavecom_0'}, |
| 68 | {'_hash': 'e1a46516a1fb493b2617ab14fc1693a9a45ec254', |
| 69 | 'imsi': '901700000007802', |
| 70 | 'ki': '47FDB2D55CE6A10A85ABDAD034A5B7B3', |
| 71 | 'label': 'm7802', |
| 72 | 'path': '/wavecom_1'}, |
| 73 | {'_hash': '4fe91500a309782bb0fd8ac6fc827834089f8b00', |
| 74 | 'imsi': '901700000007803', |
| 75 | 'ki': 'ABBED4C91417DF710F60675B6EE2C8D2', |
| 76 | 'label': 'm7803', |
| 77 | 'path': '/wavecom_2'}, |
| 78 | {'_hash': 'c895badf0c2faaa4a997cd9f2313b5ebda7486e4', |
| 79 | 'imsi': '901700000007804', |
| 80 | 'ki': '8BA541179156F2BF0918CA3CFF9351B0', |
| 81 | 'label': 'm7804', |
| 82 | 'path': '/wavecom_3'}, |
| 83 | {'_hash': '60f182abed05adb530e3d06d88cc47703b65d7d8', |
| 84 | 'imsi': '901700000007805', |
| 85 | 'ki': '82BEC24B5B50C9FAA69D17DEC0883A23', |
| 86 | 'label': 'm7805', |
| 87 | 'path': '/wavecom_4'}, |
| 88 | {'_hash': 'd1f0fbf089a4bf32dd566af956d23b89e3d60821', |
| 89 | 'imsi': '901700000007806', |
| 90 | 'ki': 'DAF6BD6A188F7A4F09866030BF0F723D', |
| 91 | 'label': 'm7806', |
| 92 | 'path': '/wavecom_5'}, |
| 93 | {'_hash': '2445e3b5949d15f4351c0db1d3f3f593f9d73aa5', |
| 94 | 'imsi': '901700000007807', |
| 95 | 'ki': 'AEB411CFE39681A6352A1EAE4DDC9DBA', |
| 96 | 'label': 'm7807', |
| 97 | 'path': '/wavecom_6'}, |
| 98 | {'_hash': '80247388b2ca382382c4aec678102355b7922965', |
| 99 | 'imsi': '901700000007808', |
| 100 | 'ki': 'F5DEF8692B305D7A65C677CA9EEE09C4', |
| 101 | 'label': 'm7808', |
| 102 | 'path': '/wavecom_7'}, |
| 103 | {'_hash': '5b9e4e117a8889430542d22a9693e7b999362856', |
| 104 | 'imsi': '901700000007809', |
| 105 | 'ki': 'A644F4503E812FD75329B1C8D625DA44', |
| 106 | 'label': 'm7809', |
| 107 | 'path': '/wavecom_8'}, |
| 108 | {'_hash': '219a7abb057050eef3ce4b99c487f32bbaae9a41', |
| 109 | 'imsi': '901700000007810', |
| 110 | 'ki': 'EF663BDF3477DCD18D3D2293A2BAED67', |
| 111 | 'label': 'm7810', |
| 112 | 'path': '/wavecom_9'}, |
| 113 | {'_hash': '75d45c2d975b893da34c7cae827c25a2039cecd2', |
| 114 | 'imsi': '901700000007811', |
| 115 | 'ki': 'E88F37F048A86A9BC4D652539228C039', |
| 116 | 'label': 'm7811', |
| 117 | 'path': '/wavecom_10'}, |
| 118 | {'_hash': '1777362f556b249a5c1d6a83110704dbd037bc20', |
| 119 | 'imsi': '901700000007812', |
| 120 | 'ki': 'E8D940DD66FCF6F1CD2C0F8F8C45633D', |
| 121 | 'label': 'm7812', |
| 122 | 'path': '/wavecom_11'}, |
| 123 | {'_hash': '21d7eb4b0c782e004821a9f7f778891c93956924', |
| 124 | 'imsi': '901700000007813', |
| 125 | 'ki': 'DBF534700C10141C49F699B0419107E3', |
| 126 | 'label': 'm7813', |
| 127 | 'path': '/wavecom_12'}, |
| 128 | {'_hash': 'f53e4e79bdbc63eb2845de671007d4f733f28409', |
| 129 | 'imsi': '901700000007814', |
| 130 | 'ki': 'B36021DEB90C4EA607E408A92F3B024D', |
| 131 | 'label': 'm7814', |
| 132 | 'path': '/wavecom_13'}, |
| 133 | {'_hash': 'df1abec7704ebc89b2c062a69bd299cf3663ed9e', |
| 134 | 'imsi': '901700000007815', |
| 135 | 'ki': '1E209F6F839F9195778C4F96BE281A24', |
| 136 | 'label': 'm7815', |
| 137 | 'path': '/wavecom_14'}, |
| 138 | {'_hash': '11df1e4c7708157e5b89020c757763f58d6e610b', |
| 139 | 'imsi': '901700000007816', |
| 140 | 'ki': 'BF827D219E739DD189F6F59E60D6455C', |
| 141 | 'label': 'm7816', |
| 142 | 'path': '/wavecom_15'}], |
| 143 | 'nitb_iface': [{'_hash': 'cde1debf28f07f94f92c761b4b7c6bf35785ced4', |
| 144 | 'addr': '10.42.42.1'}, |
| 145 | {'_hash': 'fd103b22c7cf2480d609150e06f4bbd92ac78d8c', |
| 146 | 'addr': '10.42.42.2'}, |
| 147 | {'_hash': '1c614d6210c551d142aadca8f25e1534ebb2a70f', |
| 148 | 'addr': '10.42.42.3'}]} |
| 149 | *** end: all resources |
| 150 | |
| 151 | - request some resources |
Neels Hofmeyr | 3531a19 | 2017-03-28 14:30:28 +0200 | [diff] [blame] | 152 | --- (want='arfcn'): DBG: Looking for 2 x arfcn , candidates: 10 |
Neels Hofmeyr | 17c139e | 2017-04-12 02:42:02 +0200 | [diff] [blame] | 153 | --- (want='arfcn'): DBG: Picked - _hash: e620569450f8259b3f0212ec19c285dd07df063c |
| 154 | arfcn: '512' |
| 155 | band: GSM-1800 |
| 156 | - _hash: 022621e513c5a5bf33b77430a1e9c886be676fa1 |
| 157 | arfcn: '514' |
| 158 | band: GSM-1800 |
Neels Hofmeyr | 3531a19 | 2017-03-28 14:30:28 +0200 | [diff] [blame] | 159 | --- (want='bts'): DBG: Looking for 2 x bts , candidates: 3 |
Neels Hofmeyr | 17c139e | 2017-04-12 02:42:02 +0200 | [diff] [blame] | 160 | --- (want='bts'): DBG: Picked - _hash: 07d9c8aaa940b674efcbbabdd69f58a6ce4e94f9 |
| 161 | addr: 10.42.42.114 |
| 162 | band: GSM-1800 |
| 163 | ipa_unit_id: '1' |
| 164 | label: sysmoBTS 1002 |
| 165 | type: sysmo |
| 166 | - _hash: 76c8d2f459113cd6c99ed62d1a94bbe9a291ba94 |
| 167 | addr: 10.42.42.115 |
| 168 | band: GSM-1800 |
| 169 | ipa_unit_id: '5' |
| 170 | label: octBTS 3000 |
Neels Hofmeyr | 2694a9d | 2017-04-27 19:48:09 +0200 | [diff] [blame] | 171 | trx_list: |
Neels Hofmeyr | 17c139e | 2017-04-12 02:42:02 +0200 | [diff] [blame] | 172 | - hw_addr: 00:0c:90:32:b5:8a |
| 173 | type: oct |
Neels Hofmeyr | 3531a19 | 2017-03-28 14:30:28 +0200 | [diff] [blame] | 174 | --- (want='modem'): DBG: Looking for 2 x modem , candidates: 16 |
Neels Hofmeyr | 17c139e | 2017-04-12 02:42:02 +0200 | [diff] [blame] | 175 | --- (want='modem'): DBG: Picked - _hash: 19c69e45aa090fb511446bd00797690aa82ff52f |
| 176 | imsi: '901700000007801' |
| 177 | ki: D620F48487B1B782DA55DF6717F08FF9 |
| 178 | label: m7801 |
| 179 | path: /wavecom_0 |
| 180 | - _hash: e1a46516a1fb493b2617ab14fc1693a9a45ec254 |
| 181 | imsi: '901700000007802' |
| 182 | ki: 47FDB2D55CE6A10A85ABDAD034A5B7B3 |
| 183 | label: m7802 |
| 184 | path: /wavecom_1 |
| 185 | --- (want='nitb_iface'): DBG: Looking for 1 x nitb_iface , candidates: 3 |
| 186 | --- (want='nitb_iface'): DBG: Picked - _hash: cde1debf28f07f94f92c761b4b7c6bf35785ced4 |
| 187 | addr: 10.42.42.1 |
Neels Hofmeyr | 3531a19 | 2017-03-28 14:30:28 +0200 | [diff] [blame] | 188 | ~~~ currently reserved: |
| 189 | arfcn: |
| 190 | - _hash: e620569450f8259b3f0212ec19c285dd07df063c |
| 191 | _reserved_by: testowner-123-1490837279 |
| 192 | arfcn: '512' |
| 193 | band: GSM-1800 |
| 194 | - _hash: 022621e513c5a5bf33b77430a1e9c886be676fa1 |
| 195 | _reserved_by: testowner-123-1490837279 |
| 196 | arfcn: '514' |
| 197 | band: GSM-1800 |
| 198 | bts: |
Neels Hofmeyr | 17c139e | 2017-04-12 02:42:02 +0200 | [diff] [blame] | 199 | - _hash: 07d9c8aaa940b674efcbbabdd69f58a6ce4e94f9 |
Neels Hofmeyr | 3531a19 | 2017-03-28 14:30:28 +0200 | [diff] [blame] | 200 | _reserved_by: testowner-123-1490837279 |
| 201 | addr: 10.42.42.114 |
| 202 | band: GSM-1800 |
Neels Hofmeyr | 17c139e | 2017-04-12 02:42:02 +0200 | [diff] [blame] | 203 | ipa_unit_id: '1' |
Neels Hofmeyr | 3531a19 | 2017-03-28 14:30:28 +0200 | [diff] [blame] | 204 | label: sysmoBTS 1002 |
| 205 | type: sysmo |
Neels Hofmeyr | 17c139e | 2017-04-12 02:42:02 +0200 | [diff] [blame] | 206 | - _hash: 76c8d2f459113cd6c99ed62d1a94bbe9a291ba94 |
Neels Hofmeyr | 3531a19 | 2017-03-28 14:30:28 +0200 | [diff] [blame] | 207 | _reserved_by: testowner-123-1490837279 |
| 208 | addr: 10.42.42.115 |
| 209 | band: GSM-1800 |
Neels Hofmeyr | 17c139e | 2017-04-12 02:42:02 +0200 | [diff] [blame] | 210 | ipa_unit_id: '5' |
Neels Hofmeyr | 3531a19 | 2017-03-28 14:30:28 +0200 | [diff] [blame] | 211 | label: octBTS 3000 |
Neels Hofmeyr | 2694a9d | 2017-04-27 19:48:09 +0200 | [diff] [blame] | 212 | trx_list: |
Neels Hofmeyr | 17c139e | 2017-04-12 02:42:02 +0200 | [diff] [blame] | 213 | - hw_addr: 00:0c:90:32:b5:8a |
Neels Hofmeyr | 3531a19 | 2017-03-28 14:30:28 +0200 | [diff] [blame] | 214 | type: oct |
Neels Hofmeyr | 3531a19 | 2017-03-28 14:30:28 +0200 | [diff] [blame] | 215 | modem: |
| 216 | - _hash: 19c69e45aa090fb511446bd00797690aa82ff52f |
| 217 | _reserved_by: testowner-123-1490837279 |
| 218 | imsi: '901700000007801' |
| 219 | ki: D620F48487B1B782DA55DF6717F08FF9 |
| 220 | label: m7801 |
| 221 | path: /wavecom_0 |
| 222 | - _hash: e1a46516a1fb493b2617ab14fc1693a9a45ec254 |
| 223 | _reserved_by: testowner-123-1490837279 |
| 224 | imsi: '901700000007802' |
| 225 | ki: 47FDB2D55CE6A10A85ABDAD034A5B7B3 |
| 226 | label: m7802 |
| 227 | path: /wavecom_1 |
| 228 | nitb_iface: |
| 229 | - _hash: cde1debf28f07f94f92c761b4b7c6bf35785ced4 |
| 230 | _reserved_by: testowner-123-1490837279 |
| 231 | addr: 10.42.42.1 |
| 232 | |
| 233 | ~~~ end: currently reserved |
| 234 | |
| 235 | ~~~ currently reserved: |
| 236 | {} |
| 237 | |
| 238 | ~~~ end: currently reserved |
| 239 | |