[openstack-dev] [api][nova] Why we return a redirect (302) when request to 'GET /v2.1'?

Alex Xu soulxu at gmail.com
Fri Nov 3 06:19:24 UTC 2017


2017-11-02 20:42 GMT+08:00 Sean Dague <sean at dague.net>:

> On 11/01/2017 11:04 PM, Alex X wrote:
>
>> There is bug complain about the redirect which returned by the 'GET
>> /v2.1' https://launchpad.net/bugs/1728732
>>
>> 'GET /v2.1' will return a redirect to the 'GET /v2.1/'. The response of
>> 'GET /v2.1/' is the API version info. This seems nova API behaviour for a
>> long time.
>>
>> In the keystone catalog, the endpoint should be the version API I think.
>> For nova, it is 'GET /v2.1' which return a redirect instead of version info.
>>
>> Is there anybody knowing that why we return a redirect?
>>
>
> I thought it was an artifact of the way that paste builds pipelines, and
> the way our resources need urls. I was trying to see if we generate it on
> our side, but I'm not seeing it, so I suspect this is just a consequence of
> the resource mapper and paste.


It is generated it on our side
https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/routes.py#L410



>
>
>         -Sean
>
> --
> Sean Dague
> http://dague.net
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20171103/5677a423/attachment.html>


More information about the OpenStack-dev mailing list