libcloud.common.gandi module

Gandi driver base classes

class libcloud.common.gandi.BaseGandiDriver[source]

Bases: object

Gandi base driver


alias of GandiConnection

name = 'Gandi'
class libcloud.common.gandi.BaseObject(id, state, driver)[source]

Bases: object

Base class for objects not conventional


Unique hash for this object



The hash is a function of an SHA1 hash of prefix, the object’s ID and its driver which means that it should be unique between all interfaces. TODO : to review >>> from libcloud.compute.drivers.dummy import DummyNodeDriver >>> driver = DummyNodeDriver(0) >>> vif = driver.create_interface() >>> vif.get_uuid() ‘d3748461511d8b9b0e0bfa0d4d3383a619a2bb9f’

Note, for example, that this example will always produce the same UUID!

uuid_prefix = ''
class libcloud.common.gandi.Disk(id, state, name, driver, size, extra=None)[source]

Bases: BaseObject

Gandi disk component

class libcloud.common.gandi.GandiConnection(key, secure=True, timeout=None, retry_delay=None, backoff=None, proxy_url=None)[source]

Bases: XMLRPCConnection, ConnectionKey

Connection class for the Gandi driver

Initialize user_id and key; set secure to an int based on passed value.

endpoint: str = '/xmlrpc/'
host: str = ''
request(method, *args)[source]

Call a given method_name.

  • method_name (str) – A method exposed by the xmlrpc endpoint that you are connecting to.

  • args (tuple) – Arguments to invoke with method with.


alias of GandiResponse

exception libcloud.common.gandi.GandiException[source]

Bases: Exception

Exception class for Gandi driver

class libcloud.common.gandi.GandiResponse(response, connection)[source]

Bases: XMLRPCResponse

A Base Gandi Response class to derive from.

  • response (httplib.HTTPResponse) – HTTP response object. (optional)

  • connection (Connection) – Parent connection object.

class libcloud.common.gandi.IPAddress(id, state, inet, driver, version=4, extra=None)[source]

Bases: BaseObject

Provide a common interface for ip addresses

uuid_prefix = 'inet:'
class libcloud.common.gandi.NetworkInterface(id, state, mac_address, driver, ips=None, node_id=None, extra=None)[source]

Bases: BaseObject

Provide a common interface for network interfaces

uuid_prefix = 'if:'