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

[Xen-API] Xen-API C Bindings, version 0.4.1

To: Xen-API <xen-api@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-API] Xen-API C Bindings, version 0.4.1
From: Ewan Mellor <ewan@xxxxxxxxxxxxx>
Date: Tue, 8 Aug 2006 17:00:23 +0100
Delivery-date: Tue, 08 Aug 2006 09:00:41 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
Attached is the latest version of the C bindings for the Xen Management API.

Apologies for this being later than promised on the call last Wednesday --
some of this turned out to be tricker than I had expected!

Since the last time I posted these bindings, I have made a number of changes.
I've added an awful lot of flesh on the bones, in particular we've got full
coverage across the whole API now.

I've removed the dependency upon xmlrpc-c, and am using libxml2 directly for
parsing and generation of XML.

I've added a record type to each of the classes, such as xen_vm_record, which
will be used for client-side storage of data fields.  I've added getters for
these records, such as xen_vm_get_record, which return one of these.

A record that contains references to other records (Ref in the data model) has
fields of record_opt type.  This type is a tagged union -- either a handle
referring to the object, or a full copy of the object's fields.  The
get_record calls are only shallow -- they return handles as those references,
not full copies -- but I anticipate that we shall add some deep calls later.

I've added constructors, such as xen_vm_create, that take a xen_vm_record, and
use that to supply parameters to the construction.

All items that are allocated by the library and passed to the user have a
corresponding call for deallocation (xen_vm_free, for example).


API Roadmap
-----------

Immediately following the Xen 3.0.3 release (due mid-August), the bindings and
Xend changes will drop into xen-unstable, and the API work will be a
significant part of the Xen 3.0.4 release.  The lifecycle patches (RFC'd on
xen-devel around a month ago) will go in immediately, as will any other
changes to Xend that we have, and then the aim is to work flat out to get Xend
talking the new API.  (This will be done without breaking the old API, so that
xm keeps working in the meantime.)

This timescale implies that people will be able to rely upon the C bindings
and the API, from November 2006.


Immediate Work
--------------

I attach a modified version of XMLRPCServer.py, which will log the requests
that come to it, and return fake UUIDs and data where requested, but won't
actually do anything with the values.  I've been using this for testing the
client bindings.  This ought to be sufficient for people to start playing with
these bindings, and se how they integrate with their own products.

Once the pre-3.0.4 work begins, these bindings will quickly begin able to talk
to the real Xend.


Stats
-----

include/*.h: 4943 LoC
src/*.c: 6290 LoC
libxen.so: 129K


Have fun, and please comment!

Ewan.

Attachment: XMLRPCServer.py
Description: Text Data

Attachment: libxen-src-0.4.1.tar.bz2
Description: Binary data

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