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

Doug Hellmann doug.hellmann at dreamhost.com
Wed Feb 26 21:53:21 UTC 2014


On Wed, Feb 26, 2014 at 3:34 PM, Sylvain Bauza <sylvain.bauza at gmail.com>wrote:

>
>
>
> 2014-02-26 19:40 GMT+01:00 Doug Hellmann <doug.hellmann at dreamhost.com>:
>
>
>> So you're not segregating the dynamic part of the API at all from the
>> static part?
>>
>> Doug
>>
>>
> No, you're right, at least with API V1 (Flask). As per our discussion, it
> seems our use-case hasn't yet been implemented in WSME, so I'll provide a
> different way to add extra attributes with API V2 (Pecan/WSME) by using a
> single key with JSON-serialized extra attributes as value.
>
> Something like this:
> { 'name': 'foo',
>   'extra_capabilities': "{u'fruits':u'bananas',u'vgpus':u'2'}"}
>
> Using that body will allow us to keep WSME validation for extra
> attributes, but I would really like having the logic I mentioned within
> WSME in the next releases. Do you think this is something manageable some
> way, or is it a tricky feature ?
>

It's probably something we can do, but it will take some thought. When
receiving data we can stick the attributes on the model, but model will
have no way to know what extra attributes need to be serialized, so
returning the data may be a little challenging.

Doug



>
> Thanks for your support Doug,
> -Sylvain
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140226/d3878ab2/attachment.html>


More information about the OpenStack-dev mailing list