Comment 2 for bug 1471228

Revision history for this message
Keiichiro Tokunaga (keiichiro) wrote :

Thanks, Anne. Here's the information of how I confirmed the return code was 200.

$ source devstack/openrc admin admin
$ export TOKEN=`keystone token-get | grep ' id ' | get_field 2`
/usr/local/lib/python2.7/dist-packages/keystoneclient/shell.py:64: DeprecationWarning: The keystone CLI is deprecated in favor of python-openstackclient. For a Python library, continue using python-keystoneclient.
  'python-keystoneclient.', DeprecationWarning)
$ neutron net-list
+--------------------------------------+----------+----------------------------------------------------------+
| id | name | subnets |
+--------------------------------------+----------+----------------------------------------------------------+
| 0d4af632-5e88-4d9a-a155-3f1a64a49986 | private2 | a0a928f1-e057-4ecd-99d6-659fe2c950c5 fdc6:3c3c:39a7::/64 |
| | | a9d8ad08-71f9-4a7b-82f1-9005ff24e7c1 10.0.0.0/24 |
| ae75fb2a-c44f-4e85-a1b5-c2b79bd79dab | public | c2c2c941-c315-43b3-8318-73adff030aad 172.24.4.0/24 |
| | | e8cb68cf-f0ad-4d7e-a0b3-2c56d35f01ce 2001:db8::/64 |
+--------------------------------------+----------+----------------------------------------------------------+
$ curl -i -X PUT -H "x-auth-token: $TOKEN" -H "content-type:application/json" -d '{"network":{"name":"private3"}}' http://192.168.122.111:969
6/v2.0/networks/0d4af632-5e88-4d9a-a155-3f1a64a49986
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 452
X-Openstack-Request-Id: req-bbc23538-ccda-479b-8204-ac9d75983529
Date: Wed, 08 Jul 2015 23:58:12 GMT

{"network": {"status": "ACTIVE", "subnets": ["a0a928f1-e057-4ecd-99d6-659fe2c950c5", "a9d8ad08-71f9-4a7b-82f1-9005ff24e7c1"], "name": "private3", "provider:physical_network": null, "router:external": false, "tenant_id": "56b048ae10a94b3893c3ac0b1cfb40a3", "admin_state_up": true, "provider:network_type": "vxlan", "shared": false, "port_security_enabled": true, "mtu": 0, "id": "0d4af632-5e88-4d9a-a155-3f1a64a49986", "provider:segmentation_id": 1065}}

I followed this section of the guideline.

  http://specs.openstack.org/openstack/api-wg/guidelines/http.html#xx-success-codes