<div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Feb 25, 2014 at 6:55 AM, Sylvain Bauza <span dir="ltr"><<a href="mailto:sylvain.bauza@gmail.com" target="_blank">sylvain.bauza@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>Thanks to WSME 0.6, there is now possibility to add extra attributes to a Dynamic basetype.</div>
<div>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.</div>
<div><br></div><div>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.</div><div><br></div><div>
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.</div>
<div><br></div><div>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.</div>
</div></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">I'm not sure I understand the question. Are you saying that the dynamic type feature works for GET arguments but not POST body content?</div>
<div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Doug</div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div><br></div><div><br></div><div>Thanks,</div><div>-Sylvain</div></div>
<br>_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div></div>