mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
VirtualDisk: Rework provisioning and validation behavior
We separate all the provisioning bits to diskbackend.py. VirtualDisk users now need to explicitly opt in to storage creation by using set_create_storage(). validation is no longer done automatically, users must call the validation() command. __init__ drops all extra parameters. This will eventually get us to a point where we can unify the manual XML building and XML parsing machinery, and get consistent validation behavior between devices.
This commit is contained in:
@@ -18,10 +18,10 @@
|
||||
<vcpu>5</vcpu>
|
||||
<devices>
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<disk type="file" device="disk">
|
||||
<source file="/dev/loop0"/>
|
||||
<disk type="block" device="disk">
|
||||
<target dev="hda" bus="ide"/>
|
||||
<serial>frob</serial>
|
||||
<source dev="/dev/loop0"/>
|
||||
<driver name="test" type="raw"/>
|
||||
</disk>
|
||||
<disk type="block" device="disk">
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
<driver name="qemu" type="qcow2"/>
|
||||
<source file="/default-pool/default-vol"/>
|
||||
</disk>
|
||||
<disk type="file" device="cdrom">
|
||||
<disk type="block" device="cdrom">
|
||||
<target dev="hdb" bus="ide"/>
|
||||
<driver name="qemu" type="qcow2"/>
|
||||
<source file="/disk-pool/diskvol1"/>
|
||||
<driver name="qemu" type="raw"/>
|
||||
<source dev="/disk-pool/diskvol1"/>
|
||||
</disk>
|
||||
<disk type="block" device="cdrom">
|
||||
<target dev="hdc" bus="ide"/>
|
||||
|
||||
Reference in New Issue
Block a user