Revision e6f6627c snf-cyclades-app/synnefo/logic/backend.py

b/snf-cyclades-app/synnefo/logic/backend.py
220 220
    if status == 'success' and state_for_success is not None:
221 221
        back_network.operstate = state_for_success
222 222

  
223
    if status in ('canceled', 'error') and opcode == 'OP_NETWORK_CREATE':
223
    if status in ('canceled', 'error') and opcode == 'OP_NETWORK_ADD':
224 224
        utils.update_state(back_network, 'ERROR')
225 225
        back_network.backendtime = etime
226 226

  
......
250 250

  
251 251
    all_equal = len(set(backend_states)) <= 1
252 252
    network.state = all_equal and backend_states[0] or 'PENDING'
253

  
254 253
    # Release the resources on the deletion of the Network
255 254
    if old_state != 'DELETED' and network.state == 'DELETED':
256 255
        log.info("Network %r deleted. Releasing link %r mac_prefix %r",
......
270 269
        network.serial = serial
271 270
        serial.accepted = True
272 271
        serial.save()
273

  
274 272
    network.save()
275 273

  
276 274

  

Also available in: Unified diff