Comment 0 for bug 1629126

Revision history for this message
Syed Ahsan Shamim Zaidi (ahsanmohsin04) wrote :

Currently the api documentation says that in order to list the cell, we need to have cell and name, which is not the case, the only required parameter which needs to be passed in the query is region_id.

vagrant@vagrant-ubuntu-trusty-64:~/craton$ curl -i "http://${MY_IP}:8084/v1/cells?cell=DTW_1&region=DTW" -H "Content-Type:application/json" -H "X-Auth-Token: demo" -H "X-Auth-User:demo" -H "X-Auth-Project: 1"
HTTP/1.0 422 UNPROCESSABLE ENTITY
Date: Thu, 29 Sep 2016 22:42:18 GMT
Server: WSGIServer/0.1 Python/2.7.6
Content-Type: application/json
Content-Length: 86
x-openstack-request-id: req-7d9902c7-3a88-461b-a632-9fdbb92b025e

///

Actual Output

vagrant@vagrant-ubuntu-trusty-64:~/craton$ curl -i "http://${MY_IP}:8084/v1/cells?cell=DTW_1&region_id=7" -H "Content-Type:application/json" -H "X-Auth-Token: demo" -H "X-Auth-User:demo" -H "X-Auth-Project: 1"
HTTP/1.0 200 OK
Date: Thu, 29 Sep 2016 22:42:40 GMT
Server: WSGIServer/0.1 Python/2.7.6
Content-Type: application/json
Content-Length: 76
x-openstack-request-id: req-b22eeb93-519c-495a-b56c-2574c9834561

[{"id": 4, "name": "DTW_1", "note": null, "project_id": 1, "region_id": 7}]