Registering a third party driver

Driver is considered third party if it’s not bundled with a Libcloud release.

To register a third party driver you should use provider.set_driver() function from the corresponding component.

set_driver() takes the following arguments:

  1. set_driver('provider_name', 'path.to.the.module', 'DriverClass')

Keep in mind that the provider_name needs to be unique and this function needs to be called before using a third party driver.

For example:

  1. from libcloud.compute.providers import get_driver
  2. from libcloud.compute.providers import set_driver
  3. set_driver('stratuslab',
  4. 'stratuslab.libcloud.stratuslab_driver',
  5. 'StratusLabNodeDriver')
  6. # Your code which uses the driver.
  7. # For example:
  8. driver = get_driver('stratuslab')

An example of an existing third party driver can be found at https://github.com/StratusLab/libcloud-drivers