You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@libcloud.apache.org by "Tomaz Muraus (JIRA)" <ji...@apache.org> on 2012/11/09 07:04:15 UTC
[dev] [jira] [Commented] (LIBCLOUD-255) Driver registration and handling
improvements
[ https://issues.apache.org/jira/browse/LIBCLOUD-255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13493759#comment-13493759 ]
Tomaz Muraus commented on LIBCLOUD-255:
---------------------------------------
Another great patch.
We should have changed this a long time ago, but we were keep pushing it back.
I would like to minimize backward incompatible changes and because next release is already going to contain a couple I would like to support old-style constants for at least a couple of releases.
> Driver registration and handling improvements
> ---------------------------------------------
>
> Key: LIBCLOUD-255
> URL: https://issues.apache.org/jira/browse/LIBCLOUD-255
> Project: Libcloud
> Issue Type: Improvement
> Components: Core
> Reporter: Mahendra M
> Priority: Minor
> Attachments: libcloud-255.patch
>
>
> The following are limitations that can come up while using libcloud in production - because of usage of C/C++ style ENUM based mechanism of registering drivers.
> 1) In a s/w setup which supports multiple cloud environments (or local), the admin/dev must be able to change the driver via a conf file. For eg: storage_driver = 's3', key = 'abcd' etc. In the current mechanism, the mapping of the driver name to number must be done externally.
> 2) There is no mechanism for dynamically registering a driver. It is quite possible that user's might have drivers which are for private cloud setups. They may want to install libcloud via PYPI, but use their own private drivers. Currently, there is no mechanism to do this without changing libcloud code.
> Also, IMHO, the C/C++ style enumerations need not be there in python.
> The solution for this is pretty simple to implement (given the good design of libcloud).
> 1) Replace the enum numbers with strings. Given the usage of a dictionary for registering drivers, this will work out of the box.
> 2) Implement a set_driver() API which can be used for registering new drivers.
> With this change, libcloud usage can be controlled externally (via a config file or a db field etc.) as the admin sees fit.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira