I cannot reproduce this with master, can you confirm it and provide a reproducible case?
$ curl --stderr /dev/null -H 'Content-type: application/json' -XPOST -d '{"ip_block": {"type": "private", "cidr": "10.1.1.0/24"}}' http://localhost:9898/v1.0/ipam/tenants/default/ip_blocks | python -m json.tool { "ip_block": { "broadcast": "10.1.1.255", "cidr": "10.1.1.0/24", "created_at": "2012-03-21T03:05:01", "dns1": "8.8.8.8", "dns2": "8.8.4.4", "gateway": null, "id": "a78ca80c-242c-401c-854c-a2655ff5c3aa", "netmask": "255.255.255.0", "network_id": null, "parent_id": null, "policy_id": null, "tenant_id": "default", "type": "private", "updated_at": "2012-03-21T03:05:01" } }
$ curl --stderr /dev/null -H 'Content-type: applicatoin/json' -XGET http://localhost:9898/v1.0/ipam/tenants/default/ip_blocks/a78ca80c-242c-401c-854c-a2655ff5c3aa/ip_addresses | python -m json.tool { "ip_addresses": [] }
$ curl --stderr /dev/null -XPOST -H 'Content-type: application/json' -d '{"ip_address": {"interface_id": "vifid"}}' http://localhost:9898/v1.0/ipam/tenants/default/ip_blocks/a78ca80c-242c-401c-854c-a2655ff5c3aa/ip_addresses | python -m json.tool { "ip_address": { "address": "10.1.1.0", "created_at": "2012-03-21T03:05:57", "id": "d29a173d-de75-4a9e-a62a-ee150851fc58", "interface_id": "vifid", "ip_block_id": "a78ca80c-242c-401c-854c-a2655ff5c3aa", "updated_at": "2012-03-21T03:05:57", "used_by_device": null, "used_by_tenant": "default", "version": 4 } }
$ curl --stderr /dev/null -H 'Content-type: applicatoin/json' -XGET http://localhost:9898/v1.0/ipam/tenants/default/ip_blocks/a78ca80c-242c-401c-854c-a2655ff5c3aa/ip_addresses | python -m json.tool { "ip_addresses": [ { "address": "10.1.1.0", "created_at": "2012-03-21T03:05:57", "id": "d29a173d-de75-4a9e-a62a-ee150851fc58", "interface_id": "vifid", "ip_block_id": "a78ca80c-242c-401c-854c-a2655ff5c3aa", "updated_at": "2012-03-21T03:05:57", "used_by_device": null, "used_by_tenant": "default", "version": 4 } ] }
I cannot reproduce this with master, can you confirm it and provide a reproducible case?
$ curl --stderr /dev/null -H 'Content-type: application/json' -XPOST -d '{"ip_block": {"type": "private", "cidr": "10.1.1.0/24"}}' http:// localhost: 9898/v1. 0/ipam/ tenants/ default/ ip_blocks | python -m json.tool
"broadcast" : "10.1.1.255",
"created_ at": "2012-03- 21T03:05: 01", 242c-401c- 854c-a2655ff5c3 aa",
"network_ id": null,
"parent_ id": null,
"policy_ id": null,
"tenant_ id": "default",
"updated_ at": "2012-03- 21T03:05: 01"
{
"ip_block": {
"cidr": "10.1.1.0/24",
"dns1": "8.8.8.8",
"dns2": "8.8.4.4",
"gateway": null,
"id": "a78ca80c-
"netmask": "255.255.255.0",
"type": "private",
}
}
$ curl --stderr /dev/null -H 'Content-type: applicatoin/json' -XGET http:// localhost: 9898/v1. 0/ipam/ tenants/ default/ ip_blocks/ a78ca80c- 242c-401c- 854c-a2655ff5c3 aa/ip_addresses | python -m json.tool
{
"ip_addresses": []
}
$ curl --stderr /dev/null -XPOST -H 'Content-type: application/json' -d '{"ip_address": {"interface_id": "vifid"}}' http:// localhost: 9898/v1. 0/ipam/ tenants/ default/ ip_blocks/ a78ca80c- 242c-401c- 854c-a2655ff5c3 aa/ip_addresses | python -m json.tool
"created_ at": "2012-03- 21T03:05: 57", de75-4a9e- a62a-ee150851fc 58",
"interface_ id": "vifid",
"ip_block_ id": "a78ca80c- 242c-401c- 854c-a2655ff5c3 aa",
"updated_ at": "2012-03- 21T03:05: 57",
"used_ by_device" : null,
"used_ by_tenant" : "default",
{
"ip_address": {
"address": "10.1.1.0",
"id": "d29a173d-
"version": 4
}
}
$ curl --stderr /dev/null -H 'Content-type: applicatoin/json' -XGET http:// localhost: 9898/v1. 0/ipam/ tenants/ default/ ip_blocks/ a78ca80c- 242c-401c- 854c-a2655ff5c3 aa/ip_addresses | python -m json.tool
"address" : "10.1.1.0",
"created_ at": "2012-03- 21T03:05: 57", de75-4a9e- a62a-ee150851fc 58",
"interface _id": "vifid",
"ip_ block_id" : "a78ca80c- 242c-401c- 854c-a2655ff5c3 aa",
"updated_ at": "2012-03- 21T03:05: 57",
"used_ by_device" : null,
"used_ by_tenant" : "default",
"version" : 4
{
"ip_addresses": [
{
"id": "d29a173d-
}
]
}