settingsLogin | Registersettings

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

0 votes

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?

Thanks
Alex


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
asked Nov 2, 2017 in openstack-dev by Alex_Xu (8,960 points)   1 3 3

2 Responses

0 votes

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.

-Sean

--
Sean Dague
http://dague.net


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
responded Nov 2, 2017 by Sean_Dague (66,200 points)   4 8 14
0 votes

2017-11-02 20:42 GMT+08:00 Sean Dague sean@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@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-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
responded Nov 3, 2017 by Alex_Xu (8,960 points)   1 3 3
...