shouldn't allow API request url without version field

Bug #1734083 reported by Liusheng
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mogan
In Progress
Undecided
Liusheng

Bug Description

Currently, Mogan support request API with url including "v1" or not, see the following example, comparing with most other OpenStack APIs, it is unreasonble to support both these two way to access API, the "v1" should be forcibly included in the API request url.

root@liusheng:/opt/stack/mogan/mogan/api/controllers# curl -g -i -X GET http://192.168.0.135/baremetal_compute/v1/servers/detail -H "User-Agent: python-moganclient" -H "Accept: application/json" -H "X-Auth-Token: $(openstack token issue -f value -c id)"
HTTP/1.1 200 OK
Date: Thu, 23 Nov 2017 09:17:49 GMT
Server: Apache/2.4.18 (Ubuntu)
Content-Length: 989
Content-Type: application/json
Openstack-Request-Id: req-206ca535-9e13-4c1a-b6fa-319877f82cca
Connection: close

{"servers": [{"status": "active", "node": "node-0", "addresses": {"432c58a4-e616-48f2-a592-069350c8de4d": [{"type": "fixed", "addr": "10.0.0.7"}, {"type": "fixed", "addr": "fdc1:111a:e65d:0:f816:3eff:fe56:3f7e"}]}, "user_id": "a3efc47b85014843b93e06fa176c8ff1", "description": null, "links": [{"href": "http://192.168.0.135/v1/servers/9f4ebb0b-7596-456d-8de8-c1b742ea8b4b", "rel": "self"}, {"href": "http://192.168.0.135/servers/9f4ebb0b-7596-456d-8de8-c1b742ea8b4b", "rel": "bookmark"}], "availability_zone": null, "updated_at": "2017-11-23T01:07:27+00:00", "key_name": null, "partitions": {}, "metadata": {}, "locked": false, "name": "test", "affinity_zone": null, "power_state": "power on", "image_uuid": "a765954c-92e6-4f3a-ad13-6412be6047b7", "flavor_uuid": "abad84a7-d4eb-4cae-9f7c-c39ebab7c55d", "created_at": "2017-11-23T01:05:11+00:00", "project_id": "dea7c33a22fd4e96b1b3a0afcbc17586", "launched_at": "2017-11-23T01:07:27+00:00", "uuid": "9f4ebb0b-7596-456d-8de8-c1b742ea8b4b"}]}

Liusheng (liusheng)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to mogan (master)

Fix proposed to branch: master
Review: https://review.openstack.org/522496

Changed in mogan:
assignee: nobody → Liusheng (liusheng)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on mogan (master)

Change abandoned by liusheng (<email address hidden>) on branch: master
Review: https://review.openstack.org/522496
Reason: it is better to to use specified version in headers in future(which we will support microversion)

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.