WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

Re: [Xen-API] XSDL schemas for Xen virtual machine configurations

To: Ewan Mellor <ewan@xxxxxxxxxxxxx>
Subject: Re: [Xen-API] XSDL schemas for Xen virtual machine configurations
From: Daniel Veillard <veillard@xxxxxxxxxx>
Date: Wed, 2 Aug 2006 05:04:36 -0400
Cc: xen-api@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 02 Aug 2006 02:04:46 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20060802082109.GD22028@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
References: <1154460067.6796.6.camel@xxxxxxxxxxxxxxxxxxxxx> <20060802082109.GD22028@xxxxxxxxxxxxxxxxxxxxxx>
Reply-to: veillard@xxxxxxxxxx
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.1i
On Wed, Aug 02, 2006 at 09:21:09AM +0100, Ewan Mellor wrote:
> On Tue, Aug 01, 2006 at 03:21:06PM -0400, Andrew D. Ball wrote:
> 
> > Please pardon my ignorance if this had already been discussed.
> > 
> > Has there been any work on standardizing schemas for Xen virtual machine
> > configurations?  I really like XSDL schemas instead of DTD's.
> > Regardless, I'd like to have schemas that
> > 
> > (1) Indicate which version of Xen they require.
> > (2) Enumerate exactly which options are available.
> 
> As far as I know, there's no-one working on XSDL schemas for this, no.  I did
> intend to put together a DTD, though I've not done it yet.  I've no idea
> whether XSDL schemas or other technologies would be appropriate, though
> Daniel's reply suggests that there's doubt, at least ;-)

  Well I was mostly reacting to "I really like XSDL schemas" :-)
It definitely allows a better checking of the input documents, but
trying to make one XSD handle evolution and versioning is in practice
relatively hard.

> Perhaps you could kick this off, if you are interested?

  I have an item about this in libvirt TODO. In my experience it may 
less be useful for validating input at this point (since the format is likely
to evolve) than as a way to document relatively thorougthly what one may
find in the XML instance (and hence write the appropriate code handling all
cases). Sometimes the mapping between the predefined schemas data types 
and what is the actually acceptable values is where the real usefulness
of the check, examples:

  - with DTD you can say a domain has one memory and one name children
  - with XSD you may refine this stating that the content of memory is
    a positive integer and the content of name is a string
  - a better schemas would also check values to make sure memory is at least
    4Mbytes and less than 16GB and that the name matches [0-9a-zA-Z]* to
    avoid problems

Now the amount of effort you take to build a really good schemas is worth it
only if the instances content is relatively stable, and if many people use it
as it's harder to define than with a normal programming language. 

  My 2 euro cents,

Daniel

-- 
Daniel Veillard      | Red Hat http://redhat.com/
veillard@xxxxxxxxxx  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api