clean up API versions

Bug #1627921 reported by John Griffith
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
Sean McGinnis

Bug Description

Cinder's API is a bit confusing and there's an awful lot of duplicate code currently. Over the years we've done .../api/v1|v2 and now v3 as well as keeping contrib items around forever (including some overlapping extension modules).

Nova did a pretty clean migration to micro versions and serves as a pretty clean example of how we might be able to clean things up, remove duplicate code and make things a bit easier to understand and maintain.

Rather than have independent V1, V2, V3 and contrib directories we should move all manager files under a new .../api/openstack/volume directory (analogous to nova/api/openstack/compute). We can use the versioning decorators and the route/map file as well as reuse views without all the duplication and confusion that we currently have.

Changed in cinder:
milestone: none → ocata-3
Ivan Kolodyazhny (e0ne)
Changed in cinder:
status: New → Confirmed
Ivan Kolodyazhny (e0ne)
Changed in cinder:
importance: Undecided → Medium
Changed in cinder:
milestone: ocata-3 → ongoing
Changed in cinder:
assignee: nobody → Sean McGinnis (sean-mcginnis)
Revision history for this message
Sean McGinnis (sean-mcginnis) wrote :

https://review.openstack.org/#/c/438230/ is a start of cleaning up some of the code before we think about moving any of it somewhere else.

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

Reviewed: https://review.openstack.org/438230
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=c50e4b2e6a40217097220f03109080e4a0982213
Submitter: Jenkins
Branch: master

commit c50e4b2e6a40217097220f03109080e4a0982213
Author: Sean McGinnis <email address hidden>
Date: Sun Feb 26 04:04:50 2017 +0000

    Reuse identical API v2 code for v1

    There are a couple modules that are virtually identical between
    API v1 and v2. This cleans up some of the v1 API code to just
    use the v2 API code.

    More clean up can be done for other API modules, but there are
    subtle differences (returning 200 vs 202) between the two. The
    code can still be reused, but some v1 specific handling will
    need to be put in place to make that optimization.

    Change-Id: Ice3b2819b65c55cb189a0c16c0d7ef2795bd20dd
    Partial-bug: #1627921

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/440794
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=d6980a55754686b4231c29cdfe1b9d425faf7653
Submitter: Jenkins
Branch: master

commit d6980a55754686b4231c29cdfe1b9d425faf7653
Author: Sean McGinnis <email address hidden>
Date: Thu Mar 2 03:59:05 2017 +0000

    Reuse API v2 for v1 calls

    The v2 API code can be reused for the v1 API with just minor
    tweaks to the returned JSON and a couple changes in the HTTP
    response code.

    Change-Id: I852a383bf8041220490abde74dfe0a65376b924e
    Closes-bug: #1627921

Changed in cinder:
status: Confirmed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 11.0.0.0b1

This issue was fixed in the openstack/cinder 11.0.0.0b1 development milestone.

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.