From 1cc462843c9ac4aea2833748b80516d0f472bf39 Mon Sep 17 00:00:00 2001 From: Lianhao Lu Date: Tue, 20 Nov 2012 14:13:12 +0800 Subject: [PATCH] Used auth_token middleware from keystoneclient. The auth_token middleware was moved from keystone to keystoneclient. Fixed the bug 1080990. Change-Id: I424489b73e420546df96a52f639d0ee1c8ee6287 --- ceilometer/api/acl.py | 14 +++++++------- tools/pip-requires | 1 + tools/test-requires | 1 - tools/test-requires-folsom | 1 - 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/ceilometer/api/acl.py b/ceilometer/api/acl.py index b5c766bc3..555e5afd4 100644 --- a/ceilometer/api/acl.py +++ b/ceilometer/api/acl.py @@ -20,23 +20,23 @@ import flask from ceilometer import policy -import keystone.middleware.auth_token +import keystoneclient.middleware.auth_token as auth_token def register_opts(conf): - """Register keystone middleware options + """Register keystoneclient middleware options """ - conf.register_opts(keystone.middleware.auth_token.opts, + conf.register_opts(auth_token.opts, group='keystone_authtoken', ) - keystone.middleware.auth_token.CONF = conf + auth_token.CONF = conf def install(app, conf): """Install ACL check on application.""" - app.wsgi_app = keystone.middleware.auth_token.AuthProtocol(app.wsgi_app, - conf=conf, - ) + app.wsgi_app = auth_token.AuthProtocol(app.wsgi_app, + conf=conf, + ) app.before_request(check) return app diff --git a/tools/pip-requires b/tools/pip-requires index 83aa567fd..db1c56783 100644 --- a/tools/pip-requires +++ b/tools/pip-requires @@ -13,3 +13,4 @@ Flask==0.9 stevedore>=0.6 python-glanceclient python-novaclient +python-keystoneclient>=0.2,<0.3 diff --git a/tools/test-requires b/tools/test-requires index 5c0b9246e..34311d472 100644 --- a/tools/test-requires +++ b/tools/test-requires @@ -13,5 +13,4 @@ mox https://github.com/dreamhost/Ming/zipball/master#egg=Ming http://tarballs.openstack.org/nova/nova-master.tar.gz http://tarballs.openstack.org/glance/glance-master.tar.gz -http://tarballs.openstack.org/keystone/keystone-master.tar.gz setuptools-git>=0.4 diff --git a/tools/test-requires-folsom b/tools/test-requires-folsom index 6678fd6b6..749ab09f2 100644 --- a/tools/test-requires-folsom +++ b/tools/test-requires-folsom @@ -13,5 +13,4 @@ mox # changes to it so it would be compatible with PyMongo's API. https://github.com/dreamhost/Ming/zipball/master#egg=Ming https://github.com/openstack/glance/zipball/2012.2#egg=glance -https://github.com/openstack/keystone/zipball/2012.2#egg=keystone setuptools-git>=0.4