[openstack-dev] [nova] Future of the Nova API

Christopher Yeoh cbkyeoh at gmail.com
Wed Feb 26 04:52:45 UTC 2014


On Wed, 26 Feb 2014 15:14:55 +1030
Christopher Yeoh <cbkyeoh at gmail.com> wrote:

> On Tue, 25 Feb 2014 10:37:14 +0000
> John Garbutt <john at johngarbutt.com> wrote:
> > 
> 
> So I was pondering if its possible to write a decorator for v3 (not
> json schema because we have to do some crazy stuff) that does the
> equivalent of V2 input validation. Getting it right for perfectly good
> input would not be that hard. But getting all the quirks of V2 just
> right would be very tricky and error prone, with no tests.

So I sent this a bit prematurely and meant to say here that this
decorator in addition to doing V2 type input validation would also
transform the incoming data into the form the V3 expects. And
also filtering out the junk that the strong input validation of v3 would
reject. 

On the way out it could transform success return codes (ick! But it
might cover all cases) to keep backwards compatibility.

Yea, its really ugly but its way better than trying to get v2 and v3
or v3 improvements to co-exist in the same place.

Chris



More information about the OpenStack-dev mailing list