[openstack-dev] Allow defining a different auth strategy for different service providers.
Kevin L. Mitchell
kevin.mitchell at rackspace.com
Wed Aug 1 14:53:37 UTC 2012
On Wed, 2012-08-01 at 12:11 +0200, Chmouel Boudjnah wrote:
> assuming you have this in a file in your PYTHON_PATH named :
>
> openstack_client_auth_rackspace2_0.py
>
> 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")
You should also take a look at the entry points provided by
pkg_resources. We could define an "openstack.auth" entry point, and
your example could then be done by having the following in setup.py:
from setuptools import setup
setup(
…
entry_points={
'openstack.auth': [
'rackspace2_0 = rackspace.auth:authenticate',
],
},
…
)
--
Kevin L. Mitchell <kevin.mitchell at rackspace.com>
More information about the OpenStack-dev
mailing list