Glance middleware uses incorrect conf class

Bug #910181 reported by Ed Leafe
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
Ed Leafe

Bug Description

The glance.common.context.ContextMiddleware class, from which the KeystoneContextMiddleware class in glance_token inherits, expects a conference object of type glance.common.cfg.ConfigOpts. We are currently passing in a dict, which results in the following error when running the tests:

======================================================================
ERROR: test_200_good_token (keystone.test.client.test_middleware.TestGlanceMiddleware)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/stack/keystone/keystone/test/client/test_middleware.py", line 40, in setUp
    (auth_token, glance_auth_token))
  File "/opt/stack/keystone/keystone/test/functional/common.py", line 1546, in setUp
    filter.filter_factory(settings)(self.test_middleware)
  File "/opt/stack/keystone/keystone/middleware/glance_auth_token.py", line 76, in filter
    return KeystoneContextMiddleware(app, conf)
  File "/opt/stack/glance/glance/common/context.py", line 64, in __init__
    self.conf.register_opts(self.opts)
AttributeError: 'dict' object has no attribute 'register_opts'
-------------------- >> begin captured stdout << ---------------------
Starting the Token Authentication component

--------------------- >> end captured stdout << ----------------------
-------------------- >> begin captured logging << --------------------
test.functional.common: DEBUG: Connecting to http://0.0.0.0:45229
test.functional.common: DEBUG: POST /v2.0/tokens returned 200
--------------------- >> end captured logging << ---------------------

Ed Leafe (ed-leafe)
Changed in keystone:
assignee: nobody → Ed Leafe (ed-leafe)
Revision history for this message
Jay Pipes (jaypipes) wrote :

Thanks for catching this Ed. Feel free to mark In Progress if you're in process of submitting a fix. :)

Changed in keystone:
status: New → Triaged
importance: Undecided → Medium
Ed Leafe (ed-leafe)
Changed in keystone:
status: Triaged → In Progress
Ed Leafe (ed-leafe)
Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: none → essex-3
Thierry Carrez (ttx)
Changed in keystone:
milestone: essex-3 → 2012.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.