Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Python library for communication with Ganeti

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 gentleman
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE
Octocat-spinner-32 MANIFEST.in
Octocat-spinner-32 README.rst
Octocat-spinner-32 setup.py
README.rst

Gentleman

Gentleman is a simple, straightforward Python library for communication with Ganeti clusters using Ganeti's RAPI.

Usage

Import a client of your choice, and then do some work with it.

>>> from gentleman.sync import RequestsRapiClient
>>> c = RequestsRapiClient("your.ganeti.cluster")
>>> c.start()
>>> print c.version
2
>>> print c.features
['instance-reinstall-reqv1', 'node-evac-res1', 'node-migrate-reqv1',
'instance-create-reqv1']

There's also a Twisted client. An example with Twisted's shell:

>>> from gentleman.async import *
>>> c = TwistedRapiClient("your.ganeti.cluster")
>>> c.start()
<Deferred #0>
Deferred #0 called back: None
>>> c.version
2
>>> c.features
['instance-reinstall-reqv1', 'node-evac-res1', 'node-migrate-reqv1',
'instance-create-reqv1']

License

Gentleman is made available under the terms of the GPL, version 2 or (at your discretion) any later version.

Gentleman is based on code from Ganeti, (c) 2010-11 Google Inc., and code from Ganeti Web Manager, (c) 2011-12 Oregon State University.

Something went wrong with that request. Please try again.