Add datapath plugins which default to qdisk

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Add Plugin.* query implementations

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Add SR.create

We simply validate the URI by mounting the filesystem and unmounting
it again.

We currently only support file: schemes.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
SR.attach: mount the filesystem

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
SR.detach: unmount the filesystem

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
SR.destroy: this is a no-op

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
SR.ls: add volume listing

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Add Volume.stat

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Add Volume.create

Note this isn't as good as the LVM version because qemu-img succeeds
when create overwrites an existing file. Therefore the user must be
careful to avoid choosing non-unique names.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Add a partial implementation of Volume.clone

We still need to manage the tree of files.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Volume.clone: rename the parent, create 2 leaves and a .readme

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Volume.snapshot: identical to Volume.clone

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
SR.ls should not show base images or readme files

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Fix snapshot and clone

We read the backing image from the qcow2 file directly, to avoid
parsing the output of 'qemu-img info'

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Fix the script linking

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Switch over to the 'script' format

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Install a datapath handler for 'file', not 'block'

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Fix Volume.stat

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Fix Volume.{clone,snapshot}

When we rename the node to make a base image, one of our leaves
must have the same name as the original (not a mangled version
of it)

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Volume.{clone,snapshot}: use the virtual_size not disk_size

Avoid accidentally truncating the disk by using the correct size
during clone and snapshot.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>