Glance server PATCH operations should use 0-based indices for location entries

Bug #1282437 reported by David Koo on 2014-02-20
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Wishlist
David Koo

Bug Description

PATCH indices on the Glance server currently use 1-based index for location entries. This goes against the JSON-pointer RFC (rfc6901) which requires array indices be 0-based.

The glance client should also be fixed to use 0-based indexing.

David Koo (kpublicmail) on 2014-02-20
Changed in glance:
assignee: nobody → David Koo (kpublicmail)
status: New → In Progress
Zhi Yan Liu (lzy-dev) on 2014-02-20
Changed in glance:
importance: Undecided → Wishlist

Reviewed: https://review.openstack.org/75292
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=eafa186b499eb8fd5d37a4c47e99156546e4cab8
Submitter: Jenkins
Branch: master

commit eafa186b499eb8fd5d37a4c47e99156546e4cab8
Author: David Koo <email address hidden>
Date: Fri Feb 21 10:56:27 2014 +0800

    Use 0-based indices for location entries

    Glance server currently uses 1-based indices for indexing location
    entries. This violates the JSON-pointer RFC (RFC 6901) which states that
    indicies should be 0-based. Furthermore, since this deviation is not
    mentioned in the docs any application directly calling the REST APIs
    would trip over it.

    This commit makes Glance use zero-based indexing for location entries.

    Note that the "show_multiple_locations" config option should be set to
    True to expose location related REST operations.

    DocImpact: Since this change modifies user-visible Glance behaviour it
    should be explicitly documented because the previous behaviour (1-based
    indexing), though not explicitly documented, was exposed through the
    REST APIs.

    Change-Id: I6326455874c381fcb0d8babf9cc4fa8311e219d2
    Closes-bug: #1282437

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2014-03-05
Changed in glance:
milestone: none → icehouse-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2014-04-17
Changed in glance:
milestone: icehouse-3 → 2014.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers