Comment 1 for bug 951499

Revision history for this message
Jason Kölker (jason-koelker) wrote :

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
        }
    ]
}