[libvirt] [PATCH 2/8] UndefineFlags: Define the public API
Eric Blake
eblake at redhat.com
Wed Jul 13 17:43:07 UTC 2011
On 07/13/2011 04:19 AM, Osier Yang wrote:
> Only support to remove domain managed state file when undefining
s/to remove/removing/
> the domain currently.
> ---
> include/libvirt/libvirt.h.in | 10 ++++++++++
> python/generator.py | 1 +
> src/libvirt_public.syms | 5 +++++
> 3 files changed, 16 insertions(+), 0 deletions(-)
>
> diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
> index d5a7105..98f1454 100644
> --- a/include/libvirt/libvirt.h.in
> +++ b/include/libvirt/libvirt.h.in
> @@ -1200,6 +1200,16 @@ int virDomainMemoryPeek (virDomainPtr dom,
> virDomainPtr virDomainDefineXML (virConnectPtr conn,
> const char *xml);
> int virDomainUndefine (virDomainPtr domain);
> +
> +/* Domain undefine flags */
> +typedef enum {
> + VIR_DOMAIN_UNDEFINE_MANAGED_STATE = 1,
> +
> + /* Future undefine control flags should come here */
> +} virDomainUndefineFlags;
> +
> +int virDomainUndefineWithFlags (virDomainPtr domain,
> + unsigned int flags);
I'm not sure I like the "WithFlags" name. We _had_ to use it on
virDomainCreateWithFlags, because the public name virDomainCreateFlags
was already in existence. But here, you could just as easily go with:
typedef enum { ...
} virDomainUndefineFlagValues;
int virDomainUndefineFlags(virDomainPtr domain, unsigned int flags);
and avoid the extra "With".
> +++ b/python/generator.py
> @@ -366,6 +366,7 @@ skip_impl = (
> 'virDomainSendKey',
> 'virNodeGetCPUStats',
> 'virNodeGetMemoryStats',
> + 'virDomainUndefineWithFlags',
Why does this have to be skipped? virDomainUndefine is not skipped, and
it seems like having python bindings for this new function would be
worthwhile.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110713/c5d26862/attachment-0001.sig>
More information about the libvir-list
mailing list