Re: [sandbox PATCH 02/10] Add configuration object for disk support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 26, 2015 at 03:27:37PM +0200, Eren Yagdiran wrote:
> Add the config gobject, functions to store and load the new configuration
> fragments and test. This will allow creating sandboxes with attached
> disk with a parameter formatted like file:tag=/source/file.qcow2,format=qcow2
> ---
>  libvirt-sandbox/Makefile.am                   |   2 +
>  libvirt-sandbox/libvirt-sandbox-config-disk.c | 273 ++++++++++++++++++++++++
>  libvirt-sandbox/libvirt-sandbox-config-disk.h |  82 +++++++
>  libvirt-sandbox/libvirt-sandbox-config.c      | 293 ++++++++++++++++++++++++++
>  libvirt-sandbox/libvirt-sandbox-config.h      |  10 +
>  libvirt-sandbox/libvirt-sandbox.h             |   1 +
>  libvirt-sandbox/libvirt-sandbox.sym           |   4 +
>  libvirt-sandbox/tests/test-config.c           |  11 +
>  8 files changed, 676 insertions(+)
>  create mode 100644 libvirt-sandbox/libvirt-sandbox-config-disk.c
>  create mode 100644 libvirt-sandbox/libvirt-sandbox-config-disk.h
> +/**
> + * gvir_sandbox_config_add_disk_strv:
> + * @config: (transfer none): the sandbox config
> + * @disks: (transfer none)(array zero-terminated=1): the list of disks
> + *
> + * Parses @disks whose elements are in the format TYPE:TARGET=SOURCE,FORMAT=FORMAT
> + * creating #GVirSandboxConfigMount instances for each element. For
> + * example
> + *
> + * - file:hda=/var/lib/sandbox/demo/tmp.qcow2,format=qcow2
> + */

'hda' needs changing to a tag of some kind

> +/**
> + * gvir_sandbox_config_add_disk_opts:
> + * @config: (transfer none): the sandbox config
> + * @disk: (transfer none): the disk config
> + *
> + * Parses @disk in the format TYPE:TARGET=SOURCE,FORMAT=FORMAT
> + * creating #GVirSandboxConfigDisk instances for each element. For
> + * example
> + *
> + * - file:hda=/var/lib/sandbox/demo/tmp.qcow2,format=qcow2
> + */

Again


> diff --git a/libvirt-sandbox/tests/test-config.c b/libvirt-sandbox/tests/test-config.c
> index dcbe5c1..3ea2017 100644
> --- a/libvirt-sandbox/tests/test-config.c
> +++ b/libvirt-sandbox/tests/test-config.c
> @@ -58,6 +58,14 @@ int main(int argc, char **argv)
>          "host-bind:/tmp=",
>          NULL
>      };
> +    const gchar *disks[] = {
> +        "file:hda=/tmp/img.blah,format=qcow2",
> +        "file:hda=/tmp/img.qcow2",
> +        "file:hda=/tmp/img.qcow2,format=raw",
> +        "file:hda=/tmp/img.img",
> +        "file:hda=/tmp/imq",
> +        NULL
> +    };

And here


ACK, I'll make the changes before pushing.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]