[openstack-dev] Allow defining a different auth strategy for different service providers.

Doug Hellmann doug.hellmann at dreamhost.com
Wed Aug 1 15:01:16 UTC 2012


On Wed, Aug 1, 2012 at 9:08 AM, Monty Taylor <mordred at inaugust.com> wrote:

>
>
> On 08/01/2012 05:11 AM, Chmouel Boudjnah wrote:
> > I have started an implementation example here :
> >
> >
> https://github.com/chmouel/python-novaclient/commit/3e4b4d367071ec251355fd5a15367c9028e7acca
> >
>


> What if we use pkg_resources entry points instead of a pure __import__?
> It would allow people to pretty easily distribute plugins ...
>

...


>
> > and connect with :
> >
> > from novaclient.v1_1 import client
> > cnx = client.Client("user", "password", "notneeded",
> >                     "https://lon.identity.api.rackspacecloud.com/v2.0",
> >                     auth_strategy="rackspace2_0")
> >
> > it would properly auth to RACK2.0 cloud[1].
>
> Not to beat a dead horse here, but it would be STELLAR for there to be a
> discovery mechanism for this. If the call to client.Client could make a
> standard call that would return something that would indicate an ID key
> by which they would call their auth strategy, and then our client lib
> could look through any installed plugins that exist for one matching
> that key, so that we could remove the need for me to know that rax cloud
> needs rax auth strategy at invocation time.
>

I've been doing a lot with pkg_resources plugins in ceilometer, the unified
CLI, and some projects not related to OpenStack. That led me to start
thinking about plugin patterns a bit, especially for enabling or selecting
plugins at runtime. The result was a plugin loader library that sits on top
of pkg_resources called stevedore[1]. It might make this client integration
easier. See especially EnabledExtensionManager [2] or NamedExtensionManager
[3]. Of course, if this is a new pattern then I would be happy to have a
new manager added to the library to handle it.

Doug

[1] http://stevedore.readthedocs.org/en/latest/index.html
[2]
http://stevedore.readthedocs.org/en/latest/managers.html#enabledextensionmanager
[3]
http://stevedore.readthedocs.org/en/latest/managers.html#namedextensionmanager
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20120801/f0503a05/attachment.html>


More information about the OpenStack-dev mailing list