Pecan in Keystone
This blueprint is about beginning the transition of the keystone code base to Pecan.
The OpenStack ecosystem is slowly moving on to a more unified base web framework layer consisting of Pecan and WSME. The general advice for how to make this move is don't try to port what you already have, pick a starting point and develop new controllers in pecan from then on and port older code as it becomes necessary.
In my testing it is not currently going to be possible to use WSME for keystone. There is the assumption in WSME that you will know ahead of time all the inputs for your API however keystone allows users to present additional data which is marshalled and saved as 'extra' in the database. WSME has no support for this and it would be non-trivial to add.
What I haven't seen anywhere is any strategies for having Pecan and older code like Routes co-exist (not saying they don't exist), however as both are WSGI technologies and rely fundamentally on the webob framework they should be able to play together.
In my experimentation having routes delegate to Pecan is a pain. You have to setup a wildcard route for every controller you want to expose and then create a new pecan application that can take over from the route. There is no way to really have pecan controllers standing on their own as they must use route's syntax to mount themselves to the URI.
Having Pecan at the route is however simpler so long as we start from a very high level. Everything that does not get routed by a pecan controller can be retrieved from the _default handler of the controller. This we can pass off to the routes engine and (with a quirk of pecan) allow it to render the full webob response.
What this means is that if we start by replacing the /v3 controller we can add new Pecan controllers in proper pecan style and the existing home grown infrastructure will continue to work the same way until we can finally start ripping it out.
Blueprint information
- Status:
- Complete
- Approver:
- None
- Priority:
- Not
- Drafter:
- Jamie Lennox
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- Obsolete
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by
- Morgan Fainberg
Related branches
Related bugs
Sprints
Whiteboard
Gerrit topic: https:/
Addressed by: https:/
Put Pecan in as the root /v3 controller
Addressed by: https:/
Use WebOb directly for locale testing
Addressed by: https:/
Enforce current certificate retrieval behaviour
Addressed by: https:/
Isolate backend loading
(stevemar 16-02-02): is this something we still want to pursue, or should we use flask instead?
Work Items
Dependency tree
* Blueprints in grey have been implemented.