[libvirt] PATCH: 1/5: Public API for domain XML conversions
Daniel Veillard
veillard at redhat.com
Wed May 13 15:24:33 UTC 2009
On Wed, May 13, 2009 at 03:35:26PM +0100, Daniel P. Berrange wrote:
> This provides the 2 public APIs needed for conversion of domain XML
> to/from native configuration formats. It also hooks up the internal
> driver infrastructure, and binds to virsh
[...]
this seems to have changed massively the generated HTML files, should
probably be skipped on commit and double checked manually.
> diff -r 803e91762b86 docs/libvirt-api.xml
> --- a/docs/libvirt-api.xml Wed May 13 09:34:19 2009 -0400
> +++ b/docs/libvirt-api.xml Wed May 13 09:41:37 2009 -0400
okay on that one but again it's regenerated let's avoid this on the
patch
> diff -r 803e91762b86 docs/libvirt-refs.xml
idem
> diff -r 803e91762b86 include/libvirt/libvirt.h
> --- a/include/libvirt/libvirt.h Wed May 13 09:34:19 2009 -0400
> +++ b/include/libvirt/libvirt.h Wed May 13 09:47:20 2009 -0400
> @@ -590,6 +590,16 @@ typedef enum {
>
> char * virDomainGetXMLDesc (virDomainPtr domain,
> int flags);
> +
> +
> +char * virConnectDomainXMLFromNative(virConnectPtr conn,
> + const char *nativeFormat,
> + const char *nativeConfig,
> + unsigned int flags);
> +char * virConnectDomainXMLToNative(virConnectPtr conn,
> + const char *nativeFormat,
> + const char *domainXml,
> + unsigned int flags);
okay, looks fine ! This works purely at the driver level and doesn't
involve a specific domain.
[...]
> +/*
> + * "domxml-from-native" command
> + */
> +static const vshCmdInfo info_domxmlfromnative[] = {
> + {"help", gettext_noop("Import native config as domain XML")},
> + {"desc", gettext_noop("Import native guest configuration format to domain XML format.")},
> + {NULL, NULL}
> +};
I wouldn't really say it's an import, at best it's an export to a new
format, import may be misunderstood as possibly defining a resulting
domain.
> +/*
> + * "domxml-to-native" command
> + */
> +static const vshCmdInfo info_domxmltonative[] = {
> + {"help", gettext_noop("Export domain XML as native config")},
> + {"desc", gettext_noop("Export domain XML config to a native guest configuration format.")},
> + {NULL, NULL}
> +};
Hum, maybe we should just use "Convert" instead of import or export.
Okay, looks fine to me !
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel at veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
More information about the libvir-list
mailing list