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'}], |
| 43 | 'bts': [{'_hash': 'a7c6d2ebaeb139e8c2e7d45c3495d046d7439007', |
| 44 | 'addr': '10.42.42.114', |
| 45 | 'band': 'GSM-1800', |
| 46 | 'label': 'sysmoBTS 1002', |
| 47 | 'type': 'sysmo', |
| 48 | 'unit_id': '1'}, |
| 49 | {'_hash': '02540ab9eb556056a0b4d28443bc9f4793f6d549', |
| 50 | 'addr': '10.42.42.115', |
| 51 | 'band': 'GSM-1800', |
| 52 | 'label': 'octBTS 3000', |
| 53 | 'trx': [{'hwaddr': '00:0c:90:32:b5:8a'}], |
| 54 | 'type': 'oct', |
| 55 | 'unit_id': '5'}, |
| 56 | {'_hash': '556c954d475d12cf0dc622c0df5743cac5543fa0', |
| 57 | 'addr': '10.42.42.190', |
| 58 | 'band': 'GSM-1900', |
| 59 | 'label': 'nanoBTS 1900', |
| 60 | 'trx': [{'hwaddr': '00:02:95:00:41:b3'}], |
| 61 | 'type': 'nanobts', |
| 62 | 'unit_id': '1902'}], |
| 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 |
| 152 | --- (want='nitb_iface'): DBG: Looking for 1 x nitb_iface , candidates: 3 |
| 153 | --- (want='arfcn'): DBG: Looking for 2 x arfcn , candidates: 10 |
| 154 | --- (want='bts'): DBG: Looking for 2 x bts , candidates: 3 |
| 155 | --- (want='modem'): DBG: Looking for 2 x modem , candidates: 16 |
| 156 | ~~~ currently reserved: |
| 157 | arfcn: |
| 158 | - _hash: e620569450f8259b3f0212ec19c285dd07df063c |
| 159 | _reserved_by: testowner-123-1490837279 |
| 160 | arfcn: '512' |
| 161 | band: GSM-1800 |
| 162 | - _hash: 022621e513c5a5bf33b77430a1e9c886be676fa1 |
| 163 | _reserved_by: testowner-123-1490837279 |
| 164 | arfcn: '514' |
| 165 | band: GSM-1800 |
| 166 | bts: |
| 167 | - _hash: a7c6d2ebaeb139e8c2e7d45c3495d046d7439007 |
| 168 | _reserved_by: testowner-123-1490837279 |
| 169 | addr: 10.42.42.114 |
| 170 | band: GSM-1800 |
| 171 | label: sysmoBTS 1002 |
| 172 | type: sysmo |
| 173 | unit_id: '1' |
| 174 | - _hash: 02540ab9eb556056a0b4d28443bc9f4793f6d549 |
| 175 | _reserved_by: testowner-123-1490837279 |
| 176 | addr: 10.42.42.115 |
| 177 | band: GSM-1800 |
| 178 | label: octBTS 3000 |
| 179 | trx: |
| 180 | - hwaddr: 00:0c:90:32:b5:8a |
| 181 | type: oct |
| 182 | unit_id: '5' |
| 183 | modem: |
| 184 | - _hash: 19c69e45aa090fb511446bd00797690aa82ff52f |
| 185 | _reserved_by: testowner-123-1490837279 |
| 186 | imsi: '901700000007801' |
| 187 | ki: D620F48487B1B782DA55DF6717F08FF9 |
| 188 | label: m7801 |
| 189 | path: /wavecom_0 |
| 190 | - _hash: e1a46516a1fb493b2617ab14fc1693a9a45ec254 |
| 191 | _reserved_by: testowner-123-1490837279 |
| 192 | imsi: '901700000007802' |
| 193 | ki: 47FDB2D55CE6A10A85ABDAD034A5B7B3 |
| 194 | label: m7802 |
| 195 | path: /wavecom_1 |
| 196 | nitb_iface: |
| 197 | - _hash: cde1debf28f07f94f92c761b4b7c6bf35785ced4 |
| 198 | _reserved_by: testowner-123-1490837279 |
| 199 | addr: 10.42.42.1 |
| 200 | |
| 201 | ~~~ end: currently reserved |
| 202 | |
| 203 | ~~~ currently reserved: |
| 204 | {} |
| 205 | |
| 206 | ~~~ end: currently reserved |
| 207 | |