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

Re: [Libvir] uuid string format



On Po, kvÄ› 22, 2006 at 09:52:35 -0400, Daniel Veillard wrote:
> On Mon, May 22, 2006 at 03:45:04PM +0200, Karel Zak wrote:
> > 
> >  Hello,
> > 
> >  I've found that we use in our XML dump:
> > 
> >   <uuid>%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x</uuid>
> > 
> >  it's strange format of the UUID string representation. Is there any
> >  reason for this format?  I think normal (rfc4122) is format:
> > 
> >   "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x"
> > 
> >  it means with '-'.
> 
>   RFC 4122 is for URN embedding, that's a specific use. We are not following 
> that syntax anyway since it's not an URN, we really don't need to encode this
> as an URI, only as an unambiguous ASCII string, and the current format does
> the job minimally.

 Well, for example "xm list --long" uses the format with '-' (and
 xend, filesystems, and ... everywhere). I think it's better follow
 old manners although we don't need it.

 I've commited virDomainGetUUIDString() and virDomainLookupByUUIDString() 
 functions and the virsh command supports domain look up by UUID now.
 
 All these changes use '-' format ;-) It's nothing important, but I
 think it's better support conversion from/to UUID string in the
 library rather than duplicate this code in every libvirt application.
 Now we use UUID in gnome-virt-manager (+ in dbus API), virsh and my
 plan is use it also in gnome-applet-vm.

    Karel

-- 
 Karel Zak  <kzak redhat com>


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