Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Fetching latest commit…

Cannot retrieve the latest commit at this time

rOCCI - A Ruby OCCI Framework

Build Status


The following setup is recommended

  • usage of the Ruby Version Manger
  • Ruby 1.9.3
  • RubyGems installed


gem install occi

Latest version

Checkout latest version from GIT:

git clone git://

Change to rOCCI folder

cd rOCCI

Install dependencies for deployment

bundle install --deployment


First require the gem require 'occi'


The OCCI gem includes its own logging mechanism using a message queue. By default, no one is listening to that queue. A new OCCI Logger can be initialized by specifying the log destination (either a filename or an IO object like STDOUT) and the log level.,OCCI::Log::INFO) You can create multiple Loggers to receive the log output.

You can always, even if there is no logger defined, log output using the class methods of OCCI::Log e.g."Test message")

Registering categories in the OCCI Model

Before the parser may be used, the available categories have to be registered in the OCCI Model.

For categories already specified by the OCCI WG a method exists in the OCCI Model class to register them: OCCI::Model.register_core OCCI::Model.register_infrastructure

Further categories can either be registered from files which include OCCI collections in JSON formator or from parsed JSON objects (e.g. from the query interface of an OCCI service endpoint).

Parsing OCCI messages

The OCCI gem includes a Parser to easily parse OCCI messages. With a given media type (e.g. json, xml or plain text) the parser analyses the content of the message body and, if supplied, the message header. As the text/plain and text/occi media type do not clearly distinguish between a message with a category and a message with an entity which has a kind, it has to be specified if the message contains a category (e .g. for user defined mixins)

OCCI messages can be parsed for example like media_type = text/plain body = %Q|Category: compute; scheme=""; class="kind"| header = {} category = false OCCI::Parser.parse(media_type,body,header,category)

Using the OCCI model

The OCCI gem includes all OCCI Core classes necessary to handly arbitrary OCCI objects.


Version 2.1

Several improvements to the gem structure and code documentation. First rSpec test were added. Readme has been extended to include instructions how the gem can be used.

Version 2.0

Starting with version 2.0 Florian Feldhaus and Piotr Kasprzak took over the development of the OCCI gem. The codebase was taken from the rOCCI framework and improved to be bundled as a standalone gem.

Version 1.X

Version 1.X of the OCCI gem has been developed by retr0h and served as a simple way to access the first OpenNebula OCCI implementation.


Code Documentation

Code Documentation for rOCCI by YARD

Continuous integration

Continuous integration for rOCCI by Travis-CI


  1. Fork it.
  2. Create a branch (git checkout -b my_markup)
  3. Commit your changes (git commit -am "My changes")
  4. Push to the branch (git push origin my_markup)
  5. Create an Issue with a link to your branch
Something went wrong with that request. Please try again.