Comment 0 for bug 1067959

Revision history for this message
y-kawajiri (y-kawajiri) wrote :

Now, when create subnet, you con set up the value as cidr (the value isn't cidr form).

<condition>
invalid value is not cidr
create subnet

<supposed>
We get error.

<log>
curl -v -H "X-Auth-Token:cbf9d14369ad41db831df0a3ad98ec7f" -H "Content-type: application/json" -X POST -d '{"subnet": {"name": "test_subnet9", "ip_version":4, "network_id": "67aef1b0-201c-4270-a024-5601687fa70a", "cidr": "10.0.9.0", "gateway_ip": "10.0.9.9"}}' http://192.168.122.1:9696/v2.0/subnets

 POST /v2.0/subnets HTTP/1.1
 User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
 Host: 192.168.122.1:9696
 Accept: */*
 X-Auth-Token:cbf9d14369ad41db831df0a3ad98ec7f
 Content-type: application/json
 Content-Length: 152

 HTTP/1.1 201 Created
 Content-Type: application/json
 Content-Length: 335
 Date: Wed, 12 Sep 2012 08:40:30 GMT

{"subnet": {"name": "test_subnet9", "enable_dhcp": true, "network_id": "67aef1b0-201c-4270-a024-5601687fa70a", "tenant_id": "0e4a71389759499eb1f27d3caac6fc98", "dns_nameservers": [], "allocation_pools": [], "host_routes": [], "ip_version": 4, "gateway_ip": "10.0.9.9", "cidr": "10.0.9.0", "id": "fb8df679-3546-4f3a-a19b-5825fdf99

<result>
We get cidr value.