Allow display_name for v2 snapshot-update

Bug #1226398 reported by Ken'ichi Ohmichi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
Ken'ichi Ohmichi
Grizzly
Fix Released
Medium
wanghao

Bug Description

According to the comment in the source code, the snapshot-update of v2 would be able to allow either "name" or "display_name" parameter.
In addiction, snapshot-create of v2 allows both parameters.
However "display_name" parameter of snapshot-update is ignored now like the following:

$ cinder snapshot-list
+--------------------------------------+-----------+-----------+--------------+------+
| ID | Volume ID | Status | Display Name | Size |
+--------------------------------------+-----------+-----------+--------------+------+
| 1c70e9fc-86f1-4ce8-bab6-2897c42aec5e | [..] | available | snap-org | 1 |
+--------------------------------------+-----------+-----------+--------------+------+
$

** "display_name" parameter is ignored" **
$ curl -i http://localhost:8776/v2/[..]/snapshots/1c70e9fc-86f1-4ce8-bab6-2897c42aec5e -X PUT [..] -d '{"snapshot": {"display_name": "snap-new"}}'
$ cinder snapshot-list
+--------------------------------------+-----------+-----------+--------------+------+
| ID | Volume ID | Status | Display Name | Size |
+--------------------------------------+-----------+-----------+--------------+------+
| 1c70e9fc-86f1-4ce8-bab6-2897c42aec5e | [..] | available | snap-org | 1 |
+--------------------------------------+-----------+-----------+--------------+------+
$

** "name" parameter is effective" **
$ curl -i http://localhost:8776/v2/[..]/snapshots/1c70e9fc-86f1-4ce8-bab6-2897c42aec5e -X PUT [..] -d '{"snapshot": {"name": "snap-new"}}'
[..]
$ cinder snapshot-list
+--------------------------------------+-----------+-----------+--------------+------+
| ID | Volume ID | Status | Display Name | Size |
+--------------------------------------+-----------+-----------+--------------+------+
| 1c70e9fc-86f1-4ce8-bab6-2897c42aec5e | [..] | available | snap-new | 1 |
+--------------------------------------+-----------+-----------+--------------+------+
$

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

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

Changed in cinder:
assignee: nobody → Ken'ichi Ohmichi (oomichi)
status: New → In Progress
Mike Perez (thingee)
tags: added: grizzly-backport-potential
Changed in cinder:
milestone: none → havana-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/46877
Committed: http://github.com/openstack/cinder/commit/622f10e87fda5dc439d43543216d953920079282
Submitter: Jenkins
Branch: master

commit 622f10e87fda5dc439d43543216d953920079282
Author: Ken'ichi Ohmichi <email address hidden>
Date: Tue Sep 17 13:29:51 2013 +0900

    Allow display_name for v2 snapshot-update

    According to the comment in the source code, the snapshot-update of
    v2 would be able to allow either "name" or "display_name" parameter.
    And if both paramters are specified, "name" parameter is effective
    over "display_name" like "description" parameter.
    However "display_name" parameter is ignored now, because cinder writes
    over empty dict(update_dict['display_name']).

    This patch fixes the problem.

    Fixes bug #1226398

    Change-Id: Icd48556a26b9346f73b7c1b82ffbcdd469c4d28d

Changed in cinder:
status: In Progress → Fix Committed
Changed in cinder:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/grizzly)

Fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/48555

Thierry Carrez (ttx)
Changed in cinder:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/grizzly)

Reviewed: https://review.openstack.org/48555
Committed: http://github.com/openstack/cinder/commit/1629ab4cd88bcd5f5caafb78fb1339ec57e01ff1
Submitter: Jenkins
Branch: stable/grizzly

commit 1629ab4cd88bcd5f5caafb78fb1339ec57e01ff1
Author: Ken'ichi Ohmichi <email address hidden>
Date: Tue Sep 17 13:29:51 2013 +0900

    Allow display_name for v2 snapshot-update

    According to the comment in the source code, the snapshot-update of
    v2 would be able to allow either "name" or "display_name" parameter.
    And if both paramters are specified, "name" parameter is effective
    over "display_name" like "description" parameter.
    However "display_name" parameter is ignored now, because cinder writes
    over empty dict(update_dict['display_name']).

    This patch fixes the problem.

    Fixes bug #1226398

    Change-Id: Icd48556a26b9346f73b7c1b82ffbcdd469c4d28d
    (cherry picked from commit 622f10e87fda5dc439d43543216d953920079282)

tags: added: in-stable-grizzly
Thierry Carrez (ttx)
Changed in cinder:
milestone: havana-rc1 → 2013.2
Alan Pevec (apevec)
tags: removed: grizzly-backport-potential in-stable-grizzly
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.