$ curl -i -X POST -H "content-type:application/json" -d '{"subnet": { "name": "badsub", "cidr" : "192.168.0.0/32", "ip_version": 4, "network_id": "8 8143cda-5fe7-45b6-9245-b1e8b75d28d8"}}' -H "x-auth-token:$TOKEN" http://192.168.122.130:9696/v2.0/subnets HTTP/1.1 400 Bad Request Content-Type: application/json; charset=UTF-8 Content-Length: 131 X-Openstack-Request-Id: req-a7294ad2-d507-4eb9-82e5-743d51bb546d Date: Fri, 17 Apr 2015 00:31:04 GMT {"NeutronError": {"message": "Invalid input for operation: Netmask is not valid on subnet.", "type": "InvalidInput", "detail": ""}} $ curl -i -X POST -H "content-type:application/json" -d '{"subnet": { "name": "badsub", "cidr" : "192.168.0.0/31", "ip_version": 4, "network_id": "8 8143cda-5fe7-45b6-9245-b1e8b75d28d8"}}' -H "x-auth-token:$TOKEN" http://192.168.122.130:9696/v2.0/subnets HTTP/1.1 400 Bad Request Content-Type: application/json; charset=UTF-8 Content-Length: 131 X-Openstack-Request-Id: req-47131be3-0fd2-488b-a061-7a3670d73ad3 Date: Fri, 17 Apr 2015 00:31:14 GMT {"NeutronError": {"message": "Invalid input for operation: Netmask is not valid on subnet.", "type": "InvalidInput", "detail": ""}} $ curl -i -X POST -H "content-type:application/json" -d '{"subnet": { "name": "badsub", "cidr" : "192.168.0.0/31", "ip_version": 4, "network_id": "88143cda-5fe7-45b6-9245-b1e8b75d28d8", "enable_dhcp": false}}' -H "x-auth-token:$TOKEN" http://192.168.122.130:9696/v2.0/subnets HTTP/1.1 201 Created Content-Type: application/json; charset=UTF-8 Content-Length: 411 X-Openstack-Request-Id: req-490b72f2-b350-4499-89cb-48f31be045ae Date: Fri, 17 Apr 2015 00:31:36 GMT {"subnet": {"name": "badsub", "enable_dhcp": false, "network_id": "88143cda-5fe7-45b6-9245-b1e8b75d28d8", "tenant_id": "4ffb89e718d346b48fdce2ac61537bce", "dns_nameservers": [], "gateway_ip": "192.168.0.1", "ipv6_ra_mode": null, "allocation_pools": [], "host_routes": [], "ip_version": 4, "ipv6_address_mode": null, "cidr": "192.168.0.0/31", "id": "2da8fef4-6e7a-4694-8b3c-8189936c13a9", "subnetpool_id": null}} $ curl -i -X PUT -H "content-type:application/json" -d '{"subnet": {"enable_dhcp": true}}' -H "x-auth-token:$TOKEN" http://192.168.122.130:9696/v2.0/subnets/2da8fef4-6e7a-4694-8b3c-8189936c13a9 HTTP/1.1 409 Conflict Content-Type: application/json; charset=UTF-8 Content-Length: 164 X-Openstack-Request-Id: req-6cd4f151-23b7-4c8c-934c-a861adaec512 Date: Fri, 17 Apr 2015 00:32:25 GMT {"NeutronError": {"message": "No more IP addresses available on network 88143cda-5fe7-45b6-9245-b1e8b75d28d8.", "type": "IpAddressGenerationFailure", "detail": ""}} $ curl -i -X GET -H "content-type:application/json" -H "x-auth-token:$TOKEN" http://192.168.122.130:9696/v2.0/subnets/2da8fef4-6e7a-4694-8b3c-8189936c13a9 HTTP/1.1 200 OK Content-Type: application/json; charset=UTF-8 Content-Length: 411 X-Openstack-Request-Id: req-f8328a01-a145-4c86-b3e3-89ae32ab0a24 Date: Fri, 17 Apr 2015 00:32:55 GMT {"subnet": {"name": "badsub", "enable_dhcp": false, "network_id": "88143cda-5fe7-45b6-9245-b1e8b75d28d8", "tenant_id": "4ffb89e718d346b48fdce2ac61537bce", "dns_nameservers": [], "gateway_ip": "192.168.0.1", "ipv6_ra_mode": null, "allocation_pools": [], "host_routes": [], "ip_version": 4, "ipv6_address_mode": null, "cidr": "192.168.0.0/31", "id": "2da8fef4-6e7a-4694-8b3c-8189936c13a9", "subnetpool_id": null}}