Revision b2272468 snf-cyclades-app/synnefo/api/actions.py

b/snf-cyclades-app/synnefo/api/actions.py
336 336

  
337 337
    log.info("Connecting VM %s to Network %s(%s)", vm, net, address)
338 338

  
339
    backend.connect_to_network(vm, net, address)
339
    index= NetworkInterface.objects.filter(machine=vm).count()
340
    nic = NetworkInterface.objects.create(machine=vm, network=net,
341
                                          index=index,
342
                                          ipv4=address, state="BUILDING")
343
    backend.connect_to_network(vm, nic)
340 344
    return HttpResponse(status=202)
341 345

  
342 346

  

Also available in: Unified diff