mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-08 19:26:48 +00:00
wvmStorage.update_volumes looked each volume up by name three times, read its info twice and its XML once: six round trips per volume to the host. It now lists the pool's volumes as objects (listAllVolumes) and reads each one's XML only (volume_details): name, capacity, allocation and format are all in it, and libvirt refreshes a volume for its XML as it does for info(). A pool of N volumes takes 2 + N calls instead of 2 + 6N; 100 volumes over SSH on a test host read in about 110 ms instead of 720 ms, with the same values. - A volume deleted between the listing and its read is left out; any other error is raised. Volumes come sorted by name. - get_volume_details (the API's one volume) reads it the same way. - Only a refused refresh (a clone running in the pool) is tolerated, not any exception. - The pool page reads its volumes and space only to render itself; its actions, which all redirect, no longer read every volume first. - get_volume_size and get_volume_allocation go: nothing else used them. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_agent_access.py | ||
| test_change_network.py | ||
| test_clone_nvram.py | ||
| test_cloud_init_seed.py | ||
| test_connection.py | ||
| test_connection_threads.py | ||
| test_console_setters.py | ||
| test_device_edits.py | ||
| test_dhcp_leases.py | ||
| test_external_snapshots.py | ||
| test_host_reads.py | ||
| test_instance_getters.py | ||
| test_interface_addresses.py | ||
| test_iso_media.py | ||
| test_live_clone.py | ||
| test_live_connection.py | ||
| test_live_nvram.py | ||
| test_migration.py | ||
| test_network_ip.py | ||
| test_persistent_edits.py | ||
| test_read_cache.py | ||
| test_remove_nvram.py | ||
| test_resize_disk.py | ||
| test_rwlock.py | ||
| test_usage.py | ||
| test_util.py | ||
| test_volume_in_use.py | ||
| test_xml_safety.py | ||
| test_xpath_values.py | ||