mirror of
https://github.com/retspen/webvirtcloud.git
synced 2026-05-26 15:13:33 +00:00
update uuid number if it is changed to fix console view error
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user