Can not update volume by display_name, display_description in cinder Block api v2

Bug #1301172 reported by zhuozhe on 2014-04-02
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
High
Mike Perez

Bug Description

Can not update volume by display_name, display_description in cinder Block api v2.
reason:
when updating volume , v2 API allows name instead of display_name,description Instead of display_description. but hasn't get
display_name,display_description,so cann't update volume by the two prameters ,should get the two prameters value first.

filepath:
cinder/api/v2/volumes.py
function :
@wsgi.serializers(xml=VolumeTemplate)
    def update(self, req, id, body):
add code:
        # NOTE(zhuozhe) fix bug : v2 API allows name instead of display_name
        # description Instead of display_description, so should get old parameter first
        valid_update_keys_v1 = (
            'display_name',
            'display_description',
        )

        for key in valid_update_keys_v1:
            if key in volume:
                update_dict[key] = volume[key]

zhuozhe (zhuozhe) wrote :
Huang Zhiteng (zhiteng-huang) wrote :
Changed in cinder:
status: New → Incomplete
Mike Perez (thingee) on 2014-04-02
Changed in cinder:
status: Incomplete → Triaged
importance: Undecided → Critical
tags: added: api icehouse-rc-potential
removed: display-name update volume
Changed in cinder:
status: Triaged → In Progress
assignee: nobody → Mike Perez (thingee)
Mike Perez (thingee) on 2014-04-03
Changed in cinder:
importance: Critical → High
Changed in cinder:
milestone: none → icehouse-rc2

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

commit d75a90ec1daff1444f20f6b68255890391bdb4e5
Author: Mike Perez <email address hidden>
Date: Wed Apr 2 17:52:11 2014 -0700

    Allow deprecated volume update keys in v2

    Keys like display_name and display_description were deprecated for other
    actions in v2 like creating volumes, so for consistency they should work
    with updating.

    DocImpact
    Closes-Bug: #1301172
    Change-Id: I19bc7c85352578bb57fa9fdaf1817f78e0ee2f2a

Changed in cinder:
status: In Progress → Fix Committed

Reviewed: https://review.openstack.org/85372
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=e9324decdddf63794ae2e8ba97293c037828045e
Submitter: Jenkins
Branch: milestone-proposed

commit e9324decdddf63794ae2e8ba97293c037828045e
Author: Mike Perez <email address hidden>
Date: Wed Apr 2 17:52:11 2014 -0700

    Allow deprecated volume update keys in v2

    Keys like display_name and display_description were deprecated for other
    actions in v2 like creating volumes, so for consistency they should work
    with updating.

    DocImpact
    Closes-Bug: #1301172
    Change-Id: I19bc7c85352578bb57fa9fdaf1817f78e0ee2f2a
    (cherry picked from commit d75a90ec1daff1444f20f6b68255890391bdb4e5)

Changed in cinder:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2014-04-17
Changed in cinder:
milestone: icehouse-rc2 → 2014.1
zhuozhe (zhuozhe) on 2014-04-23
description: updated
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments