libxenserver
============

Version 6.5.0

libxenserver is a complete SDK for Citrix XenServer, exposing the XenServer
API to C programmers.

It is available in the XenServer-SDK-6.4.90.zip, which can be downloaded
from http://www.citrix.com/downloads/xenserver/.

For XenServer documentation, see http://docs.xensource.com. 
libxenserver includes a C function call for each XenServer API call, so API
documentation and examples written for for other languages can be easily
mapped to C. In particular, the SDK Guide and API Documentation are ideal
for developers wishing to use libxenserver.

libxenserver comes with the usual complexities inherent with programming
in C, and it is recommended that you study the test programs carefully
to understand the approach to error reporting and memory management taken
by this library.

For community content, blogs, and downloads, visit the XenServer Developer
Network at https://www.citrix.com/community.html.

libxenserver is free sofware. You can redistribute and modify it under the
terms of the BSD license. See COPYING for details.


Dependencies
------------

This library is dependent upon libxml2, the XML toolkit from the GNOME
project, by Daniel Veillard, et al.  This can be obtained from
http://xmlsoft.org/.

The test programs are dependent also upon libcurl3, by Daniel Stenberg, et al.
This can be downloaded from http://curl.haxx.se/. You may choose to use
libcurl3 in your application, just as we have for the test programs, though
it's not required to do so, and you may use a different network layer if you
prefer.

On Debian, these are packaged as libxml2-dev and libcurl3-dev.


Folder structure
----------------

libxenserver consists of two separate folders:
- libxenserver/bin: contains the compiled binaries
- libxenserver/src: contains the source code and tests; the tests can also
be used as pedagogical examples.


Compiling from source
---------------------

To build, simply type "make" in the libxenserver/src directory.
To build on Windows with cygwin type "make CYGWIN=1"

To run any of the tests, for example the test_vm_ops, do

./test/test_vm_ops <url> <sr-name> <username> <password>

The <url> should be of the form: https://hostname.domain/

You can obtain a suitable <sr-name> by typing in "xe sr-list" on the host, e.g.
"Auto-created spanning LVM SR on /dev/sda3"
