mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-02 08:56:07 +00:00
fix(instances): a new VM's existing volume or template is taken from the chosen pool
The create job looked volumes up by name in every active pool and took the first match, so a volume of the same name in another pool could be attached or copied in place of the chosen one. The form now sends each existing volume as pool/volume and the template's pool, and the job looks each up in its own pool. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kk4h2TcUiaWmU5MUszYSea
This commit is contained in:
parent
d2383be914
commit
8f09812b7d
7 changed files with 41 additions and 22 deletions
|
|
@ -256,13 +256,13 @@ class SubmittedListsTests(TestCase):
|
|||
|
||||
def test_a_refused_form_sends_back_its_lists(self):
|
||||
_, response = render_create_page(self, valid(
|
||||
name="bad name!", disk_source="existing", **{"storage-control": "default"}, images="a.qcow2,b.qcow2",
|
||||
name="bad name!", disk_source="existing", **{"storage-control": "default"}, images="default/a.qcow2,default/b.qcow2",
|
||||
device0="cdrom", bus0="sata", device1="disk", bus1="virtio",
|
||||
networks="default,isolated", mac="52:54:00:00:00:01"))
|
||||
self.assertEqual(self.lists(response), {
|
||||
"pool": "default",
|
||||
"disks": [{"volume": "a.qcow2", "device": "cdrom", "bus": "sata"},
|
||||
{"volume": "b.qcow2", "device": "disk", "bus": "virtio"}],
|
||||
"disks": [{"volume": "default/a.qcow2", "device": "cdrom", "bus": "sata"},
|
||||
{"volume": "default/b.qcow2", "device": "disk", "bus": "virtio"}],
|
||||
"networks": [{"name": "default", "mac": "52:54:00:00:00:01"}, {"name": "isolated", "mac": ""}],
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue