Error when specifying volume type on create

Bug #1045777 reported by Avishay Traeger on 2012-09-04
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-cinderclient
Undecided
Avishay Traeger

Bug Description

Steps to reproduce:
1) cinder type-create "foo"
2) cinder --debug create --display_name ok --volume_type 'foo' 8

Output:
DEBUG (shell:473) 'str' object has no attribute 'get'
Traceback (most recent call last):
File "/opt/stack/python-cinderclient/cinderclient/shell.py", line 470, in main
OpenStackCinderShell().main(sys.argv[1:])
File "/opt/stack/python-cinderclient/cinderclient/shell.py", line 421, in main
args.func(self.cs, args)
File "/opt/stack/python-cinderclient/cinderclient/v1/shell.py", line 217, in do_create
metadata=volume_metadata)
File "/opt/stack/python-cinderclient/cinderclient/v1/volumes.py", line 111, in create
volume_type_id = volume_type.get('id', None)
AttributeError: 'str' object has no attribute 'get'
ERROR: 'str' object has no attribute 'get'

Using latest version from git.

Rongze Zhu (zrzhit) on 2012-09-04
Changed in python-cinderclient:
assignee: nobody → Rongze Zhu (zrzhit)

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

Changed in python-cinderclient:
assignee: Rongze Zhu (zrzhit) → Avishay Traeger (avishay-il)
status: New → In Progress

Reviewed: https://review.openstack.org/12399
Committed: http://github.com/openstack/python-cinderclient/commit/081cc2e572f7a6ae238b82a56f4b52986f9ab2c2
Submitter: Jenkins
Branch: master

commit 081cc2e572f7a6ae238b82a56f4b52986f9ab2c2
Author: Avishay Traeger <email address hidden>
Date: Wed Sep 5 09:49:34 2012 +0300

    Fixes bug 1045777.

    Removed conversion from name to ID, now volume type is properly passed
    to Cinder.

    Change-Id: Idd83af7a5ace58cb062545be221f93db0805438b

Changed in python-cinderclient:
status: In Progress → Fix Committed
Changed in python-cinderclient:
milestone: none → 1.3.1
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers