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:
Cole Robinson
2013-07-13 10:09:00 -04:00
parent d6f5c3a729
commit 4ce1774d53
46 changed files with 1067 additions and 1004 deletions

View File

@@ -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">

View File

@@ -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"/>