On Tue, Aug 6, 2013 at 2:17 PM, Mac Innes, Kiall <ki...@hp.com> wrote:
> On 06/08/13 21:56, Jonathan LaCour wrote: > > James Slagle <james.sla...@gmail.com> wrote: > > > >> 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. > > > > If there is anything I can do on the Pecan side, let me know! Happy to > build in new functionality to make this easier, in general. It does seem to > make sense to be fixed on the WSME side, though. > > > > Best -- > > > > - Jonathan > > Nah - this is entirely on the WSME side :) > > WSME translate all exceptions that don't extend their ClientExcption to > HTTP 500, and anything that does to HTTP 400. > > Beyond that, you only have the "default status code" to work with - 401, > 404, 503 etc are all off limits with stock WSME. Literally you have a > default code for successful requests, and 400 or 500. Nothing else. > > It seems like Ceilometer has worked there way around it using the > "_lookup" method for 404's (but I can't find how they return any other > status codes..), and libra + tuskar have replaced the WSME error > handling for something entirely custom. > > We're not massively interested in replacing WSME's error handling with > something custom, so our plan is to just use Pecan and ignore WSME for > the Designate v2 API. When it's ready, hopefully the switch won't be too > painful! > > Thanks, > Kiall > > Ironic is also using WSME, and has been bitten by this issue. In certain situations we want to return either a 200 or a 202, which doesn't work for the same reasons. -Deva
_______________________________________________ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev