[openstack-dev] WSME / Pecan and only supporting JSON?

Devananda van der Veen devananda.vdv at gmail.com
Thu Feb 27 15:52:20 UTC 2014


On Thu, Feb 27, 2014 at 5:28 AM, Sean Dague <sean at dague.net> wrote:

> On 02/27/2014 08:13 AM, Doug Hellmann wrote:
> >
> >
> >
> > On Thu, Feb 27, 2014 at 12:48 AM, Michael Davies <michael at the-davies.net
> > <mailto:michael at the-davies.net>> wrote:
> >
> >     Hi everyone,
> >
> >     Over in "Ironic Land" we're looking at removing XML support from
> >     ironic-api (i.e. https://bugs.launchpad.net/ironic/+bug/1271317)
> >
> >     I've been looking, but I can't seem to find an easy way to modify
> >     the accepted content_types.
> >
> >     Are there any wsgi / WSME / Pecan experts out there who can point me
> >     in the right direction?
> >
> >
> > There's no support for turning off a protocol in WSME right now, but we
> > could add that if we really need it.
> >
> > Why would we turn it off, though? The point of dropping XML support in
> > some of the other projects is that they use toolkits that require extra
> > work to support it (either coding or maintenance of code we've written
> > elsewhere for OpenStack). WSME supports both protocols without the API
> > developer having to do any extra work.
>
> Because if an interface is exported to the user, then it needs to be
> both Documented and Tested. So that's double the cost on the validation
> front, and the documentation front.
>
> Exporting an API isn't set and forget. Especially with the semantic
> differences between JSON and XML. And if someone doesn't feel the XML
> created by WSME is semantically useful enough to expose to their users,
> they shouldn't be forced to by the interface.
>
>
Aside from our lack of doc and test coverage for XML support and the desire
to hide an untested and undocumented API (which I think are valid reasons
to disable it) there is an actual technical problem.

Ironic's API relies on HTTP PATCH to modify resources, which Pecan/WSME
does not abstract for us. We're using the python jsonpatch library to parse
these requests. I'm not aware of a similar python library for XML support.

-Deva
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140227/ec94d0d6/attachment.html>


More information about the OpenStack-dev mailing list