If nobody has any particular objection I will pull this change in for the next 
version.

On 26/06/2016, 9:30 AM, "anthony shaw" <anthony.p.s...@gmail.com> wrote:

Hi,

I've just created a PR, #822, proposing a slightly new API for 1.1, it
is backward compatible but would form the new recommended entry path
for instantiating drivers.

I took a leaf out of requests book, (import requests; requests.get('goole.com'))

Instead of the current

from libcloud.compute.providers import Provider
from libcloud.compute.providers import get_driver

cls = get_driver(Provider.RACKSPACE)

The new way is

import libcloud
cls = libcloud.get_driver(libcloud.DriverType.COMPUTE,
libcloud.DriverType.COMPUTE.RACKSPACE)

OR

import libcloud
cls = libcloud.get_compute_driver(libcloud.DriverType.COMPUTE.RACKSPACE)

Comments please.

https://github.com/apache/libcloud/pull/822

Ant



Reply via email to