GitHub user tonybaloney opened a pull request:

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

    Lazy entry

    ## Introduce a convenience method to the libcloud module for getting drivers
    
    ### Description
    
    I find the current mechanism for fetching drivers a little cumbersome, 2 
namespaces to import. After using the `requests` library I really like the 
module `__init__` accessors for common attributes. The most common factory is 
`get_driver` and the most common enum is the Provider enum.
    
    This code allows for this example:
    
    ```python
    import libcloud
    cls = libcloud.get_driver(libcloud.DriverType.COMPUTE, 
libcloud.DriverType.COMPUTE.RACKSPACE)
    ```
    
    ### Status
    
    - done, ready for review
    
    ### Checklist (tick everything that applies)
    
    - [ ] [Code 
linting](http://libcloud.readthedocs.org/en/latest/development.html#code-style-guide)
 (required, can be done after the PR checks)
    - [ ] Documentation
    - [ ] [Tests](http://libcloud.readthedocs.org/en/latest/testing.html)
    - [ ] 
[ICLA](http://libcloud.readthedocs.org/en/latest/development.html#contributing-bigger-changes)
 (required for bigger changes)


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tonybaloney/libcloud lazy_entry

Alternatively you can review and apply these changes as the patch at:

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

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #822
    
----
commit f33df13476b6a3a0db5e3dc448c7d7c266abead2
Author: Anthony Shaw <anthonys...@apache.org>
Date:   2016-06-24T05:18:29Z

    added lazy entry

commit 93d387006d0eb5a1a194098aa480809d2d7baa03
Author: Anthony Shaw <anthonys...@apache.org>
Date:   2016-06-24T05:53:31Z

    added doc example and test

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to