For multiple choices response, links displayed incorrect URL

Bug #1840781 reported by Shilpa Devharakar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
masakari
New
Undecided
Shilpa Devharakar

Bug Description

If we given wrong URL mistakenly lets say to get masakari list, response shows incorrect URL.

Actual
======
Here request with 'v4' version, in response check "links", here it displays wrong link

curl -g -i -X GET http://<HOST_IP>/instance-ha/v4/<TENANT_ID>/segments -H "Accept: application/json" -H "User-Agent: masakari keystoneauth1/3.15.0 python-requests/2.22.0 CPython/2.7.15+" -H "X-Auth-Token: <AUTH_TOKEN>"
HTTP/1.1 300 Multiple Choices
Date: Tue, 20 Aug 2019 13:26:22 GMT
Server: Apache/2.4.29 (Ubuntu)
Content-Length: 292
Content-Type: application/json
Connection: close

{"choices": [{"status": "CURRENT", "media-types": [{
 "base": "application/json",
 "type": "application/vnd.openstack.masakari+json;version=1"}],
 "id": "v1.0",
 "links": [{"href": "http://<HOST_IP>/instance-ha/v1/instance-ha/v4/<TENANT_ID>/segments",
 "rel": "self"}]}]}

Expected
========
curl -g -i -X GET http://<HOST_IP>/instance-ha/v1.0/<TENANT_ID>/segments -H "Accept: application/json" -H "User-Agent: masakari keystoneauth1/3.15.0 python-requests/2.22.0 CPython/2.7.15+" -H "X-Auth-Token: <AUTH_TOKEN>"
HTTP/1.1 300 Multiple Choices
Date: Tue, 20 Aug 2019 13:26:22 GMT
Server: Apache/2.4.29 (Ubuntu)
Content-Length: 292
Content-Type: application/json
Connection: close

{"choices": [{"status": "CURRENT", "media-types": [{
 "base": "application/json",
 "type": "application/vnd.openstack.masakari+json;version=1"}],
 "id": "v1.0",
 "links": [{"href": "http://<HOST_IP>/instance-ha/v1/<TENANT_ID>/segments",
 "rel": "self"}]}]}

Changed in masakari:
assignee: nobody → Shilpa Devharakar (shilpasd)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.