Block Storage API V3 (CURRENT) in cinder - migration_status is optional in volume detail responses

Bug #1828113 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
Matt Riedemann

Bug Description

- [x] This doc is inaccurate in this way:

Showing a specific volume's details has the migration_status response parameter as required when in fact it's optional and only shown to users with the admin role:

https://developer.openstack.org/api-ref/block-storage/v3/?expanded=show-a-volume-s-details-detail#show-a-volume-s-details

https://github.com/openstack/cinder/blob/779979789c12d66686fd1fe163bf963c00502136/cinder/api/v2/views/volumes.py#L95

It looks like update volume might also be wrong:

https://developer.openstack.org/api-ref/block-storage/v3/?expanded=update-a-volume-detail#update-a-volume

and create volume:

https://developer.openstack.org/api-ref/block-storage/v3/?expanded=create-a-volume-detail#create-a-volume

-----------------------------------
Release: on 2019-05-07 15:35:05.361199
SHA: 779979789c12d66686fd1fe163bf963c00502136
Source: https://opendev.org/openstack/cinder/src/api-ref/source/v3/index.rst
URL: https://developer.openstack.org/api-ref/block-storage/v3/

Tags: api-ref
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.opendev.org/658077

Changed in cinder:
assignee: nobody → Matt Riedemann (mriedem)
status: New → In Progress
Matt Riedemann (mriedem)
Changed in cinder:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.opendev.org/658077
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=c549325bd2d9df21af46c2703a55a0ff97f5bfcc
Submitter: Zuul
Branch: master

commit c549325bd2d9df21af46c2703a55a0ff97f5bfcc
Author: Matt Riedemann <email address hidden>
Date: Thu May 9 09:26:09 2019 -0400

    api-ref: mark migration_status parameter as optional

    Everything that goes through the volumes view builder
    detail() method has a strict is_admin check on returning
    the migration_status parameter [1]. This means the
    migration_status parameter in the API reference should
    be optional since it's admin-only and not always shown.

    This fixes the v2 and v3 API references for showing,
    creating, updating, resetting the status of, and creating
    from a managed volume. As a result, the parameter for a
    required migration_status parameter is unused and removed.

    Note that there is no strict policy check on the
    migration_status request parameter when resetting a volume's
    status, but the action itself is admin-only by default
    using the volume_extension:volume_admin_actions:reset_status
    policy rule.

    [1] https://opendev.org/openstack/cinder/src/tag/14.0.0/cinder/api/v2/views/volumes.py#L94

    Change-Id: I82308dc1a6aaf039b675a17e19747f11be574209
    Closes-Bug: #1828113

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 15.0.0.0rc1

This issue was fixed in the openstack/cinder 15.0.0.0rc1 release candidate.

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.