Revision 40ef487d
b/snf-cyclades-app/synnefo/logic/backend.py | ||
---|---|---|
148 | 148 |
ipv6=ipv6, |
149 | 149 |
firewall_profile=firewall_profile, |
150 | 150 |
dirty=False) |
151 |
# Dummy save the network, because UI uses changed-since for VMs |
|
152 |
# and Networks in order to show the VM NICs |
|
153 |
net.save() |
|
151 | 154 |
|
152 | 155 |
vm.backendtime = etime |
153 | 156 |
vm.save() |
... | ... | |
155 | 158 |
|
156 | 159 |
def release_instance_nics(vm): |
157 | 160 |
for nic in vm.nics.all(): |
161 |
net = nic.network |
|
158 | 162 |
if nic.ipv4: |
159 |
nic.network.release_address(nic.ipv4)
|
|
163 |
net.release_address(nic.ipv4)
|
|
160 | 164 |
nic.delete() |
165 |
net.save() |
|
161 | 166 |
|
162 | 167 |
|
163 | 168 |
@transaction.commit_on_success |
Also available in: Unified diff