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:

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:

from libcloud.compute.providers import get_driver
from libcloud.compute.providers import set_driver


set_driver('stratuslab',
           'stratuslab.libcloud.stratuslab_driver',
           'StratusLabNodeDriver')

# Your code which uses the driver.
# For example:
driver = get_driver('stratuslab')

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