libcloud.common.providers module

Common methods for obtaining a reference to the provider driver class.

libcloud.common.providers.get_driver(drivers, provider, deprecated_providers=None, deprecated_constants=None)[source]

Get a driver.

Parameters:
  • drivers (dict) – Dictionary containing valid providers.

  • provider (libcloud.types.Provider) – Id (constant) of provider to get the driver for.

Param:

deprecated_providers: Dictionary with information about the deprecated drivers.

Param:

deprecated_constants: Dictionary with information about the deprecated provider constants.

libcloud.common.providers.set_driver(drivers, provider, module, klass)[source]

Sets a driver.

Parameters:
  • drivers – Dictionary to store providers.

  • provider (libcloud.types.Provider) – Id of provider to set driver for

  • module (L) – The module which contains the driver

  • klass – The driver class name