Error when specifying volume type on create

Bug #1045777 reported by Avishay Traeger
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-cinderclient
Fix Released
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)
Changed in python-cinderclient:
assignee: nobody → Rongze Zhu (zrzhit)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-cinderclient (master)

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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-cinderclient (master)

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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.