enabled attribute missing from GET /v3/endpoints

Bug #1282266 reported by Dolph Mathews
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
High
Brant Knudson
tempest
Fix Released
Undecided
Brant Knudson

Bug Description

response from current master:

RESP BODY: {"endpoints": [{"links": {"self": "http://localhost:5000/v3/endpoints/7237fc3ba1ec460595e8de463a5c7132"}, "url": "http://localhost:35357/v3", "region": "regionOne", "interface": "admin", "service_id": "0c8a9efdeada49d689c4d3ef29ecb3d7", "id": "7237fc3ba1ec460595e8de463a5c7132"}], "links": {"self": "http://localhost:5000/v3/endpoints", "previous": null, "next": null}}

response from stable/havana (this is correct):

RESP BODY: {"endpoints": [{"links": {"self": "http://localhost:5000/v3/endpoints/6e1b54c3423347f1bafb20030dabb412"}, "url": "http://127.0.0.1:35357/", "region": null, "enabled": true, "interface": "admin", "service_id": "f43f1d5cb2e04edda9316077421062c8", "id": "6e1b54c3423347f1bafb20030dabb412"}], "links": {"self": "http://localhost:5000/v3/endpoints", "previous": null, "next": null}}

Revision history for this message
Dolph Mathews (dolph) wrote :

This likely shares a root cause with bug 1273867.

Changed in keystone:
assignee: nobody → Brant Knudson (blk-u)
status: Triaged → In Progress
Changed in tempest:
status: New → Invalid
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

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

Changed in tempest:
assignee: nobody → Brant Knudson (blk-u)
status: Invalid → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tempest (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/77006

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to keystone (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/77038

Revision history for this message
Brant Knudson (blk-u) wrote :

There's tempest tests that create or update endpoints and they pass enabled='True' or enabled='False'. Turns out Keystone's XML parser only accepts 'true' and 'false' (the lowercase versions) as Booleans, so 'True' is still 'True' and not True.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to keystone (master)

Reviewed: https://review.openstack.org/77038
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=ad5a7a1d274c3c6b2051850b9cf1b5979d069570
Submitter: Jenkins
Branch: master

commit ad5a7a1d274c3c6b2051850b9cf1b5979d069570
Author: Brant Knudson <email address hidden>
Date: Thu Feb 27 19:16:02 2014 -0600

    Add tests for endpoint enabled.

    There were no tests that show what happens when you create or
    update the 'enabled' field in endpoints with different types of
    values. There were also no tests that show what happens when the
    'enabled' field isn't specified when an endpoint is created.

    The new tests show that you can set the 'enabled' field to
    any type of value even though the identity API specification says
    that it's a Boolean. The new tests also show that if the 'enabled'
    field isn't set explicitly then it's not returned on the response.

    Change-Id: Iadc2a0ed3d6aaaa89b82f4caa8829ecd1d8f2712
    Related-Bug: #1282266

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.openstack.org/76949
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=3340299e0554c8b07d07bfbeb47dee45d47d3ab2
Submitter: Jenkins
Branch: master

commit 3340299e0554c8b07d07bfbeb47dee45d47d3ab2
Author: Brant Knudson <email address hidden>
Date: Thu Feb 27 13:31:37 2014 -0600

    XML endpoint client use correct string for enabled

    The XML endpoint client was passing enabled='True' or
    enabled='False' when creating or updating an endpoint.

    The Keystone XML parser expects 'true' and 'false' for the
    'enabled' attribute and only converts those strings to a Boolean
    value, other values are passed through as strings.

    Note that the XML identity_client correctly converts the Boolean
    values to lowercase strings already.

    Change-Id: I2f1374430d186959aca8fb90b4f7730044ec0c65
    Closes-Bug: #1282266

Changed in tempest:
status: In Progress → Fix Released
Revision history for this message
Dolph Mathews (dolph) wrote :
Thierry Carrez (ttx)
Changed in keystone:
milestone: icehouse-3 → icehouse-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/75727
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=ed635f9fbb99f856e0c543105790a1e578858cc2
Submitter: Jenkins
Branch: master

commit ed635f9fbb99f856e0c543105790a1e578858cc2
Author: Brant Knudson <email address hidden>
Date: Sun Feb 23 14:18:31 2014 -0600

    Always include 'enabled' field in endpoint response

    The 'enabled' field wasn't always returned in an endpoint response.

    The 'enabled' attribute for endpoints was stored in the 'extra'
    column as part of a JSON string. Now the 'enabled' attribute is in
    its own column. It will also be easier to filter out disabled
    endpoints now that enabled is a separate column.

    With the 'enabled' field being a Boolean column in the database,
    the server also needs to validate that the value is a Boolean (if
    it's present). This is done in the same way that the server checks
    the type of the 'enabled' value when creating users.

    Closes-Bug: #1282266

    Change-Id: I9b9379f4531c298c14508418dbfb629bdd6c2850

Changed in keystone:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to tempest (master)

Reviewed: https://review.openstack.org/77006
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=3a9bdf9e49c196344cffc5ea56ada0361362d917
Submitter: Jenkins
Branch: master

commit 3a9bdf9e49c196344cffc5ea56ada0361362d917
Author: Brant Knudson <email address hidden>
Date: Thu Feb 27 17:09:50 2014 -0600

    Add negative tests for endpoints

    There were no negative tests that showed that the identity API
    returns 400 Bad Request if an attempt is made to create or
    update an endpoint with a non-Boolean value for the enabled
    attribute.

    Change-Id: I45db202c8231e02b5cf0514133976339e3a2f200
    Related-Bug: #1282266

Thierry Carrez (ttx)
Changed in keystone:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: icehouse-rc1 → 2014.1
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.