Remove v1 from the falcon app route

This bug was introduced by a recent change
"Barbican should not do rbac on version api call"
Where the main barbican app was split up into two falcon apps,
one for the version resource, and another for the rest of the
calls.

In the paste file, the latter app was mounted on 'v1' but
because the routes in the falcon app also map to 'v1' this resulted
in all calls being routed to 'v1/v1/{tenant}/...'

This change removes the routes from the app, so that only the
'v1' in the paste configuration is mapped, which fixes the
double v1 route.

Change-Id: I05746f11d262ec7aa4f60aeb44e41217e8bc8a44
Closes-Bug: #1296969
This commit is contained in:
Douglas Mendizabal
2014-03-24 16:57:43 -05:00
parent 061a7d1da8
commit b347eb4f05
+8 -8
View File
@@ -69,15 +69,15 @@ def create_main_app(global_config, **local_conf):
if newrelic_loaded:
wsgi_app = newrelic.agent.WSGIApplicationWrapper(wsgi_app)
api.add_route('/v1/{keystone_id}/secrets', secrets)
api.add_route('/v1/{keystone_id}/secrets/{secret_id}', secret)
api.add_route('/v1/{keystone_id}/orders', orders)
api.add_route('/v1/{keystone_id}/orders/{order_id}', order)
api.add_route('/v1/{keystone_id}/verifications', verifications)
api.add_route('/v1/{keystone_id}/verifications/{verification_id}',
api.add_route('/{keystone_id}/secrets', secrets)
api.add_route('/{keystone_id}/secrets/{secret_id}', secret)
api.add_route('/{keystone_id}/orders', orders)
api.add_route('/{keystone_id}/orders/{order_id}', order)
api.add_route('/{keystone_id}/verifications', verifications)
api.add_route('/{keystone_id}/verifications/{verification_id}',
verification)
api.add_route('/v1/{keystone_id}/containers/', containers)
api.add_route('/v1/{keystone_id}/containers/{container_id}', container)
api.add_route('/{keystone_id}/containers/', containers)
api.add_route('/{keystone_id}/containers/{container_id}', container)
# For performance testing only
api.add_route('/{0}'.format(performance_uri), performance)