Re: [openstack-dev] [nova] Do we need a microversion to return a 501 from GET os-virtual-interfaces?

2016-03-07 Thread Andrey Kurilin
Hi!
I did not find any usage "virtual_interfaces" with try...except block, so
we can easily change error code without new microversion.

I'm +1 for proper code.

On Mon, Mar 7, 2016 at 6:32 PM, Ken'ichi Ohmichi 
wrote:

> 2016-03-06 15:41 GMT-08:00 Jay Pipes :
> > On 03/06/2016 02:21 PM, Matt Riedemann wrote:
> >>
> >> Thanks, good point. I think 400 would be best here. And according to our
> >> handy-dandy docs [1] it should be OK to do this without a microversion.
> >
> >
> > Yup, 400 is correct and yes, you should not need a new microversion
> addition
> > to the API.
>
> +1 for unnecessary microversion bumping.
>
> Thanks
> Ken Ohmichi
>
> __
> 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
>



-- 
Best regards,
Andrey Kurilin.
__
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] [nova] Do we need a microversion to return a 501 from GET os-virtual-interfaces?

2016-03-07 Thread Ken'ichi Ohmichi
2016-03-06 15:41 GMT-08:00 Jay Pipes :
> On 03/06/2016 02:21 PM, Matt Riedemann wrote:
>>
>> Thanks, good point. I think 400 would be best here. And according to our
>> handy-dandy docs [1] it should be OK to do this without a microversion.
>
>
> Yup, 400 is correct and yes, you should not need a new microversion addition
> to the API.

+1 for unnecessary microversion bumping.

Thanks
Ken Ohmichi

__
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] [nova] Do we need a microversion to return a 501 from GET os-virtual-interfaces?

2016-03-06 Thread Jay Pipes

On 03/06/2016 02:21 PM, Matt Riedemann wrote:

Thanks, good point. I think 400 would be best here. And according to our
handy-dandy docs [1] it should be OK to do this without a microversion.


Yup, 400 is correct and yes, you should not need a new microversion 
addition to the API.


Best,
-jay

__
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] [nova] Do we need a microversion to return a 501 from GET os-virtual-interfaces?

2016-03-06 Thread Matt Riedemann



On 3/6/2016 12:47 PM, Chris Dent wrote:

On Sat, 5 Mar 2016, Matt Riedemann wrote:


A GET request from the os-virtual-interfaces API returns a 500 today
if neutron is the networking backend.

It would be more accurate to return a 501, but do we need a
microversion for that?


Keep this in mind:
http://specs.openstack.org/openstack/api-wg/guidelines/http.html#use-of-501-not-implemented


501 isn't something api code should be intentionally generating.

400 or 404 is probably what you want.



__
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



Thanks, good point. I think 400 would be best here. And according to our 
handy-dandy docs [1] it should be OK to do this without a microversion.


[1] 
http://docs.openstack.org/developer/nova/api_microversion_dev.html#when-do-i-need-a-new-microversion


--

Thanks,

Matt Riedemann


__
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] [nova] Do we need a microversion to return a 501 from GET os-virtual-interfaces?

2016-03-06 Thread Chris Dent

On Sat, 5 Mar 2016, Matt Riedemann wrote:

A GET request from the os-virtual-interfaces API returns a 500 today if 
neutron is the networking backend.


It would be more accurate to return a 501, but do we need a microversion for 
that?


Keep this in mind:
http://specs.openstack.org/openstack/api-wg/guidelines/http.html#use-of-501-not-implemented

501 isn't something api code should be intentionally generating.

400 or 404 is probably what you want.

--
Chris Dent   (�s°□°)�s�喋擤ォ�http://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] [nova] Do we need a microversion to return a 501 from GET os-virtual-interfaces?

2016-03-06 Thread Matt Riedemann



On 3/5/2016 8:51 PM, Matt Riedemann wrote:

A GET request from the os-virtual-interfaces API returns a 500 today if
neutron is the networking backend.

It would be more accurate to return a 501, but do we need a microversion
for that?

I intend on implementing the method for the neutronv2 API in nova [1]
but it will require a microversion and until then, I was thinking it
should return a 501 rather than a 500 but don't want to go through the
paperwork if that requires a microversion.

[1] https://review.openstack.org/#/c/288965/



Furthermore, I'd hope that a microversion isn't needed to return a 501 
rather than a 500. That's because then we could backport that change to 
the stable branches and change the skip on the tempest test [1] to 
expect a result or a 501. Then we can also test the microversion change 
that returns a result in the case of Neutron (and fail if a 501 is 
returned after the microversion).


[1] 
https://github.com/openstack/tempest/blob/db9672e3473cd6046f269d63435e102a477d8cdd/tempest/api/compute/servers/test_virtual_interfaces.py#L45


--

Thanks,

Matt Riedemann


__
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