This repository contains the generation code for the XenAPI Software Development Kit (SDK) and its associated documentation and examples.
The SDK consists of five components, one for each of C, C#, Java, PowerShell, and Python, exposing the individual XenAPI calls as first-class functions in the target language.
The generation code is mostly written in Ocaml 3.12.
Install opam. It is also recommended to install one of the listed external solvers (e.g. aspcud).
Ensure you are using version 4.02.3 of the Ocaml compiler:
opam switch 4.02.3
and you have the package depext: opam install depext
Note: if you want to avoid setting up the environment by yourself, you can use one of the ready containers from opam-dockerfiles, which come with a preinstalled OPAM environment and Ocaml compiler.
Add xs-opam as a remote Opam repository (follow the instructions in that repo).
The SDK is dependent on the XenAPI, therefore run
opam depext -y xapi
opam install -y xapi
This will install first the dependencies of the xapi package and then the package itself following its master version.
Finally, copy this file into the root of the xen-api-sdk repo.
Run make <lang>
, where <lang>
one or more of c
, java
, csharp
,
powershell
, to generate SDK source code for the specified programming
language(s), or simply make
to generate SDK source code for all the supported
languages.
To compile the generated source code, follow the instructions in the corresponding README files.
Note: The Python module is not auto-generated. It can be found at XenAPI.py.
The preferable way to contribute patches is to fork the repository on Github and then submit a pull request. If for some reason you can't use Github to submit a pull request, then you may send your patch for review to the xen-api@lists.xen.org mailing list, with a link to a public git repository for review. Please see the CONTRIB.md file for some general guidelines on submitting changes.
- Konstantina Chremmou konstantina.chremmou@citrix.com
- Stephen Turner stephen.turner@citrix.com
This code is licensed under the BSD 2-Clause license. Please see the file LICENSE for more information.