Bookmark url for chassis links are incorrect

Bug #1304564 reported by Daryl Walleck
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Low
Lucas Alvares Gomes

Bug Description

While tinkering around, I noticed that the self and bookmark link URLs are the same. The bookmark link should not have the version in the URL:

{"description": "ironic test chassis", "links": [{"href": "http://127.0.0.1:6385/v1/chassis/9744f1ad-0e53-4e89-872d-f2ec4e0aaef2", "rel": "self"}, {"href": "http://127.0.0.1:6385/v1/chassis/9744f1ad-0e53-4e89-872d-f2ec4e0aaef2", "rel": "bookmark"}], "extra": {}, "created_at": "2014-04-08T17:02:56+00:00", "updated_at": null, "nodes": [{"href": "http://127.0.0.1:6385/v1/chassis/9744f1ad-0e53-4e89-872d-f2ec4e0aaef2/nodes", "rel": "self"}, {"href": "http://127.0.0.1:6385/chassis/9744f1ad-0e53-4e89-872d-f2ec4e0aaef2/nodes", "rel": "bookmark"}], "uuid": "9744f1ad-0e53-4e89-872d-f2ec4e0aaef2"}

The problem appears to be in the chassis controller (https://github.com/openstack/ironic/blob/master/ironic/api/controllers/v1/chassis.py). The call to create the bookmark link is missing the bookmark=True param:

(from line 84)

chassis.links = [link.Link.make_link('self',
                                             url,
                                             'chassis', chassis.uuid),
                         link.Link.make_link('bookmark',
                                             url,
                                             'chassis', chassis.uuid)
                        ]

Changed in ironic:
assignee: nobody → Lucas Alvares Gomes (lucasagomes)
importance: Undecided → Medium
Changed in ironic:
importance: Medium → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

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

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

Reviewed: https://review.openstack.org/94597
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=69fd52f03d7e3585dceb7cc1655c52c7088929e3
Submitter: Jenkins
Branch: master

commit 69fd52f03d7e3585dceb7cc1655c52c7088929e3
Author: Lucas Alvares Gomes <email address hidden>
Date: Wed May 21 12:48:27 2014 +0100

    Fix chassis bookmark link url

    Fix the chassis bookmark link url and modify the validate_link() at
    tests/api/base.py to enable it to validate bookmark links. The tests on
    all the resources were also updated to check if the bookmark link was
    generated correctly.

    Closes-Bug: #1304564
    Change-Id: I8383dd1d48569dadbbafb4587c89973f8440b396

Changed in ironic:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ironic:
milestone: none → juno-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ironic:
milestone: juno-1 → 2014.2
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.