Re: [openstack-dev] [api] [nova] microversion edge case query

2016-10-21 Thread Chris Dent

On Fri, 21 Oct 2016, Alex Xu wrote:


Also think 404 is right at here. If you return 406 and it is a signal that
if you used a different microversion the situation could be different, the
thing will become strange when we raise the acceptable min_version someday.


Thanks, yeah, what you and Ed have said has been convincing, I've
updated the code at: https://review.openstack.org/#/c/388115/

Jay's review of that has raised a new issue: which is should we even
bother with the decorator style?


--
Chris Dent   ┬─┬ノ( º _ ºノ)https://anticdent.org/
freenode: cdent tw: @anticdent__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [api] [nova] microversion edge case query

2016-10-20 Thread Alex Xu
2016-10-19 0:58 GMT+08:00 Ed Leafe :

> On Oct 18, 2016, at 11:01 AM, Chris Dent  wrote:
> >
> > If the requested microversion is greater than the maximum, a 404 still
> > makes some sense (no mapping _now_), but a 406 could as well because it
> > provides a signal that if you used a different microversion the
> > situation could be different and the time represented by the
> > requested microversion has conceptual awareness of its past.
> >
> > What do people think?
> >
> > I think I recall there was some discussion of this sort of thing
> > with regard to some of the proxy APIs at the nova midcycle but I
> > can't remember the details of the outcome.
>
> The only way that that could happen (besides a total collapse of the
> review process) is when a method is removed from the API. When that
> happens, the latest version has its max set to the last microversion where
> that method is supported. For microversions after that, 404 is the correct
> response. For all other methods, the latest version should not have a
> maximum specified.
>


Also think 404 is right at here. If you return 406 and it is a signal that
if you used a different microversion the situation could be different, the
thing will become strange when we raise the acceptable min_version someday.



>
> -- Ed Leafe
>
>
>
>
>
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [api] [nova] microversion edge case query

2016-10-18 Thread Ed Leafe
On Oct 18, 2016, at 11:01 AM, Chris Dent  wrote:
> 
> If the requested microversion is greater than the maximum, a 404 still
> makes some sense (no mapping _now_), but a 406 could as well because it
> provides a signal that if you used a different microversion the
> situation could be different and the time represented by the
> requested microversion has conceptual awareness of its past.
> 
> What do people think?
> 
> I think I recall there was some discussion of this sort of thing
> with regard to some of the proxy APIs at the nova midcycle but I
> can't remember the details of the outcome.

The only way that that could happen (besides a total collapse of the review 
process) is when a method is removed from the API. When that happens, the 
latest version has its max set to the last microversion where that method is 
supported. For microversions after that, 404 is the correct response. For all 
other methods, the latest version should not have a maximum specified.

-- Ed Leafe






__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [api] [nova] microversion edge case query

2016-10-18 Thread Chris Dent

On Tue, 18 Oct 2016, Chris Dent wrote:


If the requested microversion is greater than the maximum, a 404 still
makes some sense (no mapping _now_), but a 406 could as well because it
provides a signal that if you used a different microversion the
situation could be different and the time represented by the
requested microversion has conceptual awareness of its past.

What do people think?


The WIP code is now visible in gerrit, the commit message ought to
lead interested parties to the confusing bit:

   https://review.openstack.org/#/c/388115/

--
Chris Dent   ┬─┬ノ( º _ ºノ)https://anticdent.org/
freenode: cdent tw: @anticdent__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev