mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-24 23:25:24 +00:00
update uuid number if it is changed to fix console view error
This commit is contained in:
parent
bd44b03bb0
commit
993a247228
1 changed files with 4 additions and 0 deletions
|
@ -173,9 +173,13 @@ def refr(compute):
|
|||
Instance.objects.filter(compute=compute).exclude(name__in=domain_names).delete()
|
||||
# Create instances that're not in DB
|
||||
names = Instance.objects.filter(compute=compute).values_list('name', flat=True)
|
||||
uuids = Instance.objects.filter(compute=compute).values_list('uuid', flat=True)
|
||||
for domain in domains:
|
||||
if domain.name() not in names:
|
||||
Instance(compute=compute, name=domain.name(), uuid=domain.UUIDString()).save()
|
||||
continue
|
||||
if domain.UUIDString() not in uuids:
|
||||
Instance(compute=compute, name=domain.name(), uuid=domain.UUIDString()).save()
|
||||
|
||||
|
||||
def get_dhcp_mac_address(vname):
|
||||
|
|
Loading…
Reference in a new issue