Supporting "application/flare" content type

13 views
Skip to first unread message

Lakshmi Sampath

unread,
May 15, 2014, 12:42:06 PM5/15/14
to pytho...@googlegroups.com
Hi,

In openstack graffiti project we need to support "application/flare" as response type along with json.  How do we write a custom serializer/deserializer and what are the options to achieve it using wsme. 

thanks
lakshmi.

Christophe de Vienne

unread,
May 15, 2014, 3:16:15 PM5/15/14
to pytho...@googlegroups.com
Hello,

Look at wsme/rest/json.py and wsme/rest/xml.py.
These two module provides all the functions that a particular encoding needs to implement.

In addition, the adapter you use will need to be patched.

If you need more information, don't hesistate to ask.

Cheers,

Christophe
--
You received this message because you are subscribed to the Google Groups "python-wsme" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-wsme...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lakshmi Sampath

unread,
May 15, 2014, 5:50:47 PM5/15/14
to pytho...@googlegroups.com
Christophe,

Once we code flare.py  similar to wsme/rest/json.py, where do we save that code and how to patch the adapter and what adpater is this we are talking about?

thanks
lakshmi.

Christophe de Vienne

unread,
May 24, 2014, 6:35:56 PM5/24/14
to pytho...@googlegroups.com
Lakshmi,

Sorry for the late answer.

In a patch for wsme the flare.py file would go into wsme/rest/, but you can have it anywhere else for a start.
For the adapter the easier way is to copy the one you are using and complete it so it knows your serialisation flavor.

Christophe

PS: In case you don't see what adapters are, have a look at https://wsme.readthedocs.org/en/latest/integrate.html.
Reply all
Reply to author
Forward
0 new messages