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

Re: [libvirt] [PATCH 0/4] Add ability to store and display notes and description with domains

On 01/13/2012 11:17 AM, Peter Krempa wrote:
> This patchset adds ability to store, display and modify comments for domains to help
> administrators identify and store metadata to domains to allow easy identification.
> A short description "note" was added as an attribute for the <description> element
> to hold a shorter description (limited to max 40 characters) to be shown along with
> lists of domains.

Do we really want to add a new XML attribute/element, or is it redundant
with <description>?  (By the way, I agree with Dan that a new element
<title> is nicer than an attribute to <description>, if the answer is
that yes, we really do want to distinguish between a length-limited
field and an unlimited length description).

I guess I'm 70/30 in favor of adding a new field, since we can put
restrictions on the new field (max length, no newlines), which make it
friendlier for reuse, while still leaving the existing description for
its full power.  But it would also be nice that if a domain has a
description but not the new field, then the virsh code can truncate the
description field and provide that as though it had been the note field.

>  docs/formatdomain.html.in     |    7 +-
>  docs/schemas/domaincommon.rng |   14 ++-
>  include/libvirt/libvirt.h.in  |   15 +++
>  src/conf/domain_conf.c        |   27 ++++-
>  src/conf/domain_conf.h        |    1 +
>  src/driver.h                  |    5 +
>  src/libvirt.c                 |   47 ++++++++
>  src/libvirt_public.syms       |    5 +
>  src/qemu/qemu_driver.c        |   70 ++++++++++++
>  src/remote/remote_driver.c    |    1 +
>  src/remote/remote_protocol.x  |    9 ++-
>  tools/virsh.c                 |  246 +++++++++++++++++++++++++++++++++++++----
>  tools/virsh.pod               |   30 +++++-

Missing a tests addition; I'd suggest something in qemuxml2xmltest.c
that proves we can parse and regenerate the new XML.

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

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