1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00

convert HDD selection of new instance creation to user request. Before that, instance creation gets all images of all pools. If there is a problem with some pools other than default. It causes problem and sometimes it takes too long to opeen create instance page. With that extension getting volumes is up to request. Firs you must select pool then select volume. For now the create page opens instantly.

This commit is contained in:
catborise 2018-11-16 16:08:35 +03:00
parent 91f01d884b
commit 45720d3bcf
2 changed files with 95 additions and 28 deletions

View file

@ -48,7 +48,7 @@ def create_instance(request, compute_id):
default_cache = INSTANCE_VOLUME_DEFAULT_CACHE
listener_addr = QEMU_CONSOLE_LISTEN_ADDRESSES
mac_auto = util.randomMAC()
get_images = sorted(conn.get_storages_images())
#get_images = sorted(conn.get_storages_images())
except libvirtError as lib_err:
error_messages.append(lib_err)
@ -157,5 +157,4 @@ def create_instance(request, compute_id):
conn.delete_volume(volumes.keys()[0])
error_messages.append(lib_err)
conn.close()
return render(request, 'create_instance.html', locals())