[openstack-dev] [WSME] Dynamic types and POST requests

Sylvain Bauza sylvain.bauza at gmail.com
Tue Feb 25 11:55:41 UTC 2014


Hi,

Thanks to WSME 0.6, there is now possibility to add extra attributes to a
Dynamic basetype.
I successfully ended up showing my extra attributes from a dict to a
DynamicType using add_attributes() but I'm now stuck with POST requests
having dynamic body data.

Although I'm declaring in wsexpose() my DynamicType, I can't say to WSME to
map the pecan.request.body dict with my wsattrs and create new attributes
if none matched.

Any idea on how to do this ? I looked at WSME and the type is registered at
API startup, not when being called, so the get_arg() method fails to fill
in the gaps.

I can possibly do a workaround within my post function, where I could
introspect pecan.request.body and add extra attributes, so it sounds a bit
crappy as I have to handle the mimetype already managed by WSME.


Thanks,
-Sylvain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140225/e7b40616/attachment.html>


More information about the OpenStack-dev mailing list