Cannot filter on pools.

Bug #1478487 reported by Keisuke Yamamoto
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Designate
Fix Released
High
Keisuke Yamamoto

Bug Description

Get Pools API is not worked, when filtering by name.

* Reproduce the bug:
 1. Create Pool
   - POST /v2/pools
     - name: example pool
   - POST /v2/pools
     - name: dummy pool

 2. GET Pools with filter.
   - GET /v2/pools?name=dummy%20pool
   - GET /v2/pools?name=dum*

* Actual Result:
  All pools are returned.

* Expected Result:
  List of pools is "dummy pool" only.

* Additional note:

# curl -s -X GET http://127.0.0.1:9001/v2/pools?name=dum* -H "Accept: application/json" -H "Content-Type: application/json" | python -mjson.tool
{
    "links": {
        "self": "http://127.0.0.1:9001/v2/pools?name=dum%2A"
    },
    "pools": [
        {
            "attributes": {},
            "created_at": "2015-07-24T01:09:55.000000",
            "description": null,
            "id": "794ccc2c-d751-44fe-b57f-8894c9f5c842",
            "links": {
                "self": "http://127.0.0.1:9001/v2/pools/794ccc2c-d751-44fe-b57f-8894c9f5c842"
            },
            "name": "default",
            "ns_records": [
                {
                    "hostname": "ns2.example.org.",
                    "priority": 10
                }
            ],
            "project_id": null,
            "updated_at": "2015-07-27T05:48:39.000000"
        },
        {
            "attributes": {},
            "created_at": "2015-07-27T07:45:38.000000",
            "description": null,
            "id": "6b73f7ce-d2db-4586-b5e2-507d2fe1c800",
            "links": {
                "self": "http://127.0.0.1:9001/v2/pools/6b73f7ce-d2db-4586-b5e2-507d2fe1c800"
            },
            "name": "example pool",
            "ns_records": [
                {
                    "hostname": "ns1.exmple.org.",
                    "priority": 2
                },
                {
                    "hostname": "ns2.exmple.org.",
                    "priority": 3
                }
            ],
            "project_id": "noauth-project",
            "updated_at": null
        },
        {
            "attributes": {},
            "created_at": "2015-07-27T07:47:45.000000",
            "description": null,
            "id": "96134ce5-dd50-4e7f-bcb2-1fdb649888ea",
            "links": {
                "self": "http://127.0.0.1:9001/v2/pools/96134ce5-dd50-4e7f-bcb2-1fdb649888ea"
            },
            "name": "dummy pool",
            "ns_records": [
                {
                    "hostname": "ns2.exmple.org.",
                    "priority": 3
                },
                {
                    "hostname": "ns1.exmple.org.",
                    "priority": 2
                }
            ],
            "project_id": "noauth-project",
            "updated_at": null
        }
    ]
}

Changed in designate:
assignee: nobody → Keisuke Yamamoto (keisuk-yamamoto)
Tim Simmons (timsim)
Changed in designate:
importance: Undecided → High
status: New → Triaged
milestone: none → liberty-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to designate (master)

Fix proposed to branch: master
Review: https://review.openstack.org/207452

Changed in designate:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to designate (master)

Reviewed: https://review.openstack.org/207452
Committed: https://git.openstack.org/cgit/openstack/designate/commit/?id=2c7c03f73b8f474a436373e429253b8f706522e3
Submitter: Jenkins
Branch: master

commit 2c7c03f73b8f474a436373e429253b8f706522e3
Author: keisuke_yamamoto <email address hidden>
Date: Thu Jul 30 22:07:32 2015 +0900

    Enable filter on get pools

    Can filter on Get Pools API by name.

    Change-Id: I90d0f0b8aebf511141fbb79e1c79745276e0b791
    Closes-Bug: #1478487

Changed in designate:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in designate:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in designate:
milestone: liberty-3 → 1.0.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.