Comment 0 for bug 1472490

Revision history for this message
Yushiro FURUKAWA (y-furukawa-2) wrote :

In "Ports binding extended attributes (ports)" section, Normal response codes of "Create port" is 200 now, but it actually should be 201.

http://developer.openstack.org/api-ref-networking-v2-ext.html#port_binding-ext

[Representation]
$ source devstack/openrc admin admin
$ export TOKEN=`keystone token-get | grep ' id ' | get_field 2`
$ neutron net-list -c id -c name
+--------------------------------------+--------+
| id | name |
+--------------------------------------+--------+
| 318d00a7-b529-48d8-81ff-7b41c6cec725 | admin1 |
| 963436f4-fd71-4cd3-92da-b4dd5faaecbb | public |
| a8ab5c69-6a50-4a1b-a7f3-b17479731800 | demo1 |
+--------------------------------------+--------+
$ curl -i -X POST -H "x-auth-token:$TOKEN" -H "content-type:application/json" -d '{"port":{"name":"test_port","network_id":"318d00a7-b529-48d8-81ff-7b41c6cec725"}}' http://192.168.122.247:9696/v2.0/ports
HTTP/1.1 201 Created
Content-Type: application/json; charset=UTF-8
Content-Length: 620
X-Openstack-Request-Id: req-0485dbfb-9c65-4e90-bc30-07868970959c
Date: Wed, 08 Jul 2015 03:35:04 GMT

{"port": {"status": "DOWN", "binding:host_id": "", "allowed_address_pairs": [], "device_owner": "", "binding:profile": {}, "fixed_ips": [{"subnet_id": "472de1bc-1159-463d-a642-1e63ead4071f", "ip_address": "192.168.99.7"}], "id": "81dcb67b-6929-4bac-a9bd-313b6aa1aae8", "security_groups": ["de4979bc-4dc1-49ba-9edd-5ef651546d08"], "device_id": "", "name": "test_port", "admin_state_up": true, "network_id": "318d00a7-b529-48d8-81ff-7b41c6cec725", "tenant_id": "e7d8a7eccdb542aca94183ef6b2c8e70", "binding:vif_details": {}, "binding:vnic_type": "normal", "binding:vif_type": "unbound", "mac_address": "fa:16:3e:19:a4:07"}}stack@furukawa-dev-aio:~$