[openstack-dev] Is WSME really suitable? (Was: [nova] Autogenerating the Nova v3 API specification)

James Slagle james.slagle at gmail.com
Tue Aug 6 14:03:03 UTC 2013


On Tue, Aug 6, 2013 at 5:35 AM, Mac Innes, Kiall <kiall at hp.com> wrote:
>
> So,
>
>  From experimenting with, and looking at the WSME code - raising a
> status with `pecan.abort(404)` etc doesn't actually work.
>
> WSME sees that, and helpfully swaps it out for a HTTP 500 ;)
>
> The author of WSME even says there is currently no way to return a 404.
> So, ceilometer must be either not using anything but http 400 and http
> 500, or have replaced WSMEs error handling :/
>
> I'll have to have a look a ceilometers API to see if they ran into/fixed
> the issue.


WSME + pecan is being used in Tuskar:
https://github.com/tuskar/tuskar (OpenStack management API)

We encountered the same issue discussed here.  A solution we settled
on for now was to use a custom Renderer class that could handle
different response codes.  You set the renderer in the call to
pecan.make_app.  This was meant to be a temporary solution until
there's better support in WSME.

Here's the commit with all the details:
https://github.com/tuskar/tuskar/commit/16d3fec0e7d28be04252ad6b779ca6460b4918f5


--
-- James Slagle
--



More information about the OpenStack-dev mailing list