mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-01 08:26:03 +00:00
perf(storages): the pool page does not list the host's pools
The page computed storages = conn.get_storages(), two libvirt listings on every load and POST, and never used it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kk4h2TcUiaWmU5MUszYSea
This commit is contained in:
parent
6f12e10091
commit
235b4ad285
3 changed files with 1 additions and 2 deletions
|
|
@ -126,7 +126,6 @@ class PoolAndVolumeRowTests(TransactionTestCase):
|
|||
conn.is_active.return_value = True
|
||||
conn.get_size.return_value = (1, 1)
|
||||
conn.get_storages_info.return_value = []
|
||||
conn.get_storages.return_value = ["default"]
|
||||
conn.get_secrets_info.return_value = []
|
||||
conn.update_volumes.return_value = []
|
||||
conn.create_volume.return_value = "disk1.qcow2"
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ class PoolPageTests(TestCase):
|
|||
self.conn.get_size.return_value = (0, 0) # an iSCSI pool without LUNs
|
||||
response = self.client.get(reverse("storage", args=[self.compute.pk, "default"]))
|
||||
self.assertContains(response, "base.qcow2")
|
||||
self.conn.get_storages.assert_not_called() # the page lists no other pools
|
||||
|
||||
def test_the_volume_list_answers_while_a_volume_is_cloned(self):
|
||||
response = self.client.get(reverse("volumes", args=[self.compute.pk, "default"]))
|
||||
|
|
|
|||
|
|
@ -132,7 +132,6 @@ def storage(request, compute_id, pool):
|
|||
finally:
|
||||
conn.close()
|
||||
|
||||
storages = conn.get_storages()
|
||||
state = conn.is_active()
|
||||
|
||||
if request.method == "POST":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue