Neutron API-site: "Networks provider extended attributes" missing "Error response codes"
Bug #1477527 reported by
Keiichiro Tokunaga
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openstack-api-site |
Fix Released
|
Medium
|
Keiichiro Tokunaga |
Bug Description
The all methods of "Networks provider extended attributes" are missing "Error response codes". Please see http://
The methods should have the following error response codes.
- List networks
Unauthorized
- Create network
Bad request(400), Unauthorized(401)
- Show network details
Unauthorized
- Update network
Bad request(400), Unauthorized(401), Not found(404)
- Delete network
Unauthorized
Actually, "Delete network" is missing "Normal response codes" as well, and that should be '204'. That can be fixed in the same patch.
Changed in openstack-api-site: | |
assignee: | nobody → Keiichiro Tokunaga (keiichiro) |
Changed in openstack-api-site: | |
milestone: | none → liberty |
To post a comment you must log in.
Here is what I confirmed.
- List networks
It returns 401 when giving a wrong token.
$ curl -i -X GET -H "x-auth-token: dummy" http:// 192.168. 122.111: 9696/v2. 0/networks Authenticate: Keystone uri='http:// 192.168. 122.111: 5000' -Request- Id: req-bd75e25a- b102-4ec2- a68e-7ea16feb05 bf
HTTP/1.1 401 Unauthorized
Content-Type: text/html; charset=UTF-8
Content-Length: 23
Www-
X-Openstack
Date: Thu, 23 Jul 2015 11:55:32 GMT
- Create network
It returns 400 when giving a bad request body.
$ curl -i -X POST -H "x-auth-token: $TOKEN" -H "content- type:applicatio n/jason" -d '{"network" :{"dummy" :"dummy" }}' http:// 192.168. 122.111: 9696/v2. 0/networks -Request- Id: req-ba7ebf42- b1fb-48f8- bc34-62ac8408b9 b1
HTTP/1.1 400 Bad Request
Content-Length: 106
Content-Type: application/json; charset=UTF-8
X-Openstack
Date: Thu, 23 Jul 2015 11:58:56 GMT
It returns 401 when giving a wrong token.
$ curl -i -X POST -H "x-auth-token: dummy" -H "content- type:applicatio n/jason" -d '{"network":{}}' http:// 192.168. 122.111: 9696/v2. 0/networks Authenticate: Keystone uri='http:// 192.168. 122.111: 5000' -Request- Id: req-c4382d22- 5ff6-415b- b8a3-98abada420 e6
HTTP/1.1 401 Unauthorized
Content-Type: text/html; charset=UTF-8
Content-Length: 23
Www-
X-Openstack
Date: Thu, 23 Jul 2015 12:00:00 GMT
- Show network details
It returns 401 when giving a wrong token.
$ neutron net-list ------- ------- ------- ------- ------- -+----- -----+- ------- ------- ------- ------- ------- ------- ------- ------- -+ ------- ------- ------- ------- ------- -+----- -----+- ------- ------- ------- ------- ------- ------- ------- ------- -+ 5e88-4d9a- a155-3f1a64a499 86 | private4 | a0a928f1- e057-4ecd- 99d6-659fe2c950 c5 fdc6:3c3c:39a7::/64 | 71f9-4a7b- 82f1-9005ff24e7 c1 10.0.0.0/24 | c44f-4e85- a1b5-c2b79bd79d ab | public | c2c2c941- c315-43b3- 8318-73adff030a ad 172.24.4.0/24 | f0ad-4d7e- a0b3-2c56d35f01 ce 2001:db8::/64 | ------- ------- ------- ------- ------- -+----- -----+- ------- ------- ------- ------- ------- ------- ------- ------- -+ 192.168. 122.111: 9696/v2. 0/networks/ 0d4af632- 5e88-4d9a- a155-3f1a64a499 86 Authenticate: Keystone uri='http:// 192.168. 122.111: 5000' -Request- Id: req-b6442ede- d972-45c4- 82b6-fb0adff510 8f
+--
| id | name | subnets |
+--
| 0d4af632-
| | | a9d8ad08-
| ae75fb2a-
| | | e8cb68cf-
+--
$ curl -i -X GET -H "x-auth-token: dummy" http://
HTTP/1.1 401 Unauthorized
Content-Type: text/html; charset=UTF-8
Content-Length: 23
Www-
X-Openstack
Date: Thu, 23 Jul 2015 12:02:20 GMT
It returns 404 when giving a wrong network-id.
$ curl -i -X GET -H "x-auth-token: $TOKEN" http:// 192.168. 122.111: 9696/v2. 0/networks/ dummy -Request- Id: req-1f28e824- 6c6a-432d- bcf2-113b4071e0 3d
HTTP/1.1 404 Not Found
Content-Length: 154
Content-Type: text/html; charset=UTF-8
X-Openstack
Date: Thu, 23 Jul 2015 12:03:32 GMT
- Update network
It returns 401 when giving a wrong token.
$ neutron net-list
...