Revision 7c714455 snf-cyclades-app/synnefo/logic/backend.py
b/snf-cyclades-app/synnefo/logic/backend.py | ||
---|---|---|
239 | 239 |
if ipv4: |
240 | 240 |
net.reserve_address(ipv4) |
241 | 241 |
|
242 |
nic['dirty'] = False |
|
243 | 242 |
vm.nics.create(**nic) |
244 | 243 |
# Dummy save the network, because UI uses changed-since for VMs |
245 | 244 |
# and Networks in order to show the VM NICs |
... | ... | |
512 | 511 |
kw['disks'][0]['provider'] = provider |
513 | 512 |
kw['disks'][0]['origin'] = flavor.disk_origin |
514 | 513 |
|
515 |
kw['nics'] = [{"network": nic.network.backend_id, "ip": nic.ipv4} |
|
514 |
kw['nics'] = [{"name": nic.backend_uuid, |
|
515 |
"network": nic.network.backend_id, |
|
516 |
"ip": nic.ipv4} |
|
516 | 517 |
for nic in nics] |
517 | 518 |
backend = vm.backend |
518 | 519 |
depend_jobs = [] |
... | ... | |
779 | 780 |
|
780 | 781 |
depends = [[job, ["success", "error", "canceled"]] for job in depend_jobs] |
781 | 782 |
|
782 |
nic = {'ip': nic.ipv4, 'network': network.backend_id} |
|
783 |
nic = {'name': nic.backend_uuid, |
|
784 |
'network': network.backend_id, |
|
785 |
'ip': nic.ipv4} |
|
783 | 786 |
|
784 |
log.debug("Connecting NIC %s to VM %s", nic, vm)
|
|
787 |
log.debug("Adding NIC %s to VM %s", nic, vm)
|
|
785 | 788 |
|
786 | 789 |
kwargs = { |
787 | 790 |
"instance": vm.backend_vm_id, |
... | ... | |
798 | 801 |
|
799 | 802 |
|
800 | 803 |
def disconnect_from_network(vm, nic): |
801 |
log.debug("Removing nic of VM %s, with index %s", vm, str(nic.index))
|
|
804 |
log.debug("Removing NIC %s of VM %s", nic, vm)
|
|
802 | 805 |
|
803 | 806 |
kwargs = { |
804 | 807 |
"instance": vm.backend_vm_id, |
Also available in: Unified diff