[Libvir] [Libvirt] Proposal to add 3 functions for VBDs (Virtual Block Devices)

Daniel Veillard veillard at redhat.com
Thu Aug 24 16:51:58 UTC 2006


On Thu, Aug 24, 2006 at 05:54:21PM +0200, Philippe Berthault wrote:
> I think that, instead of designate the backend domain by its id, it 
> would be better to designate it by its name.
> This is because the id isn't fix, excepted for the domain-0.

  Right, providing a flexible and generic enough naming scheme is probably
the best, using strings is definitely better IMHO. Usually devices will
be associated to existing devices or files, which will be referenced by
names. If those resources doesn't exist as such or can't be named, it's 
better to still build a naming scheme around the mechanism, for example:

    'xen:vbd:0:1234' or 'xen:vif:2:0123' 

and using those names separates the API from the specifics, while allowing
some flexibility.
  And it may be better to think in term of 'device' than 'block device'
at that level, I don't see why we should do the same game again in 2 months
once one realize that one also want to address for example network cards.
  Using string constructs for names keeps the API more generic, more flexible
but one will need to explain in the documentation what names are accepted,
and what the constructs means.

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard at redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/




More information about the libvir-list mailing list