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).
Then, to install the dependencies of the SDK, which include Xapi, run
opam depext -y xen-api-sdk
opam install -y --deps-only xen-api-sdk
This will install first the external dependencies of this package and of all its dependencies, and then all the OPAM packages required for building it.
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 [email protected] 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 [email protected]
- Stephen Turner [email protected]
This code is licensed under the BSD 2-Clause license. Please see the file LICENSE for more information.