Comment 8 for bug 1789499

Revision history for this message
Lajos Katona (lajos-katona) wrote :

Some interesting things during my "research" (NOTE: all the commands/API calls below were executed after source openrc demo demo)

* The WIP patch (https://review.openstack.org/601270) seemed too easy, but solved the problem with agents for example. So GET v2.0/agents give back 401 and a body like this: {"NeutronError": {"message": "No resource could be found.", "detail": "", "type": "HTTPNotFound"}}

* but the same patch was not solving the same problem with ports for example:
** I changed policy.json to get_port:rule:admin_only
** The status code is 401 unauthorized, but the result is empty list.

The weirdest part:
Do the API call with show:
$ curl -H "X-Auth-Token: $MY_TOKEN" -X GET http://100.109.0.44:9696/v2.0/ports/3ded052c-ac26-4eec-9b7e-19ee143721a2
{"port": {"binding:vif_type": "unbound", ...., "security_groups": []}}
$ curl -I -H "X-Auth-Token: $MY_TOKEN" -X GET http://100.109.0.44:9696/v2.0/ports/3ded052c-ac26-4eec-9b7e-19ee143721a2
HTTP/1.1 404 Not Found

So by this the response header has the status code 404, but the body as well.