The oVirt Ruby SDK is a Ruby gem that simplyfies access to the oVirt Engine API.

This document describes how to generate, build and test the SDK. If you are interested in how to use it read the README.adoc file in the sdk directory instead.


The SDK uses libxml2 for parsing and rendering XML documents, and the part that interacts with this library is written in C. This means that before building you must make sure you have the C compiler and the required header and libraries files installed in your system. For example to install with the yum package manager you will need to do the following:

# yum -y install \
gcc \
libxml2-devel \
ruby-devel \
rubygem-rake-compiler \

Most of the source code of the Ruby SDK is automatically generated from the API model.

The code generator is a Java program that resides in the generator directory. This Java program will get the API model and the metamodel artifacts from the available Maven repositories. To build and run it use the following commands:

$ git clone git://
$ cd ovirt-engine-sdk-ruby
$ mvn package

This will build the code generator, run it to generate the SDK for the version of the API that corresponds to the branch of the SDK that you are using, and build the .gem file.

If you need to generate it for a different version of the API then you can use the model.version property. For example, if you need to generate the SDK for version 4.1.0 of the SDK you can use this command:

$ mvn package -Dmodel.version=4.1.0

The generated .gem file will be located in the sdk directory:

$ ls sdk/*.gem


The test suite of the project is inside the sdk/spec directory. To run the tests change into the sdk directory and execute the rspec command:

$ cd sdk
$ rspec