]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Modify check for volume-type-id to a get w/default
authorJohn Griffith <john.griffith@solidfire.com>
Wed, 19 Jun 2013 23:33:59 +0000 (17:33 -0600)
committerJohn Griffith <john.griffith@solidfire.com>
Wed, 19 Jun 2013 23:33:59 +0000 (17:33 -0600)
commit48389857d15c5cda860fa8f9914d62b148bfd17a
tree89b4d68513ca517d209b5a0963c16bc27be48364
parent1482c4045b94319aff0bd5999a52eb892152773b
Modify check for volume-type-id to a get w/default

While implementing Fix for a previous bug to enable setting
volume type on a cloned volume and reading it's info we added
a vref['volume_type_id'], problem is that the _do_clone method
is shared for both clone and create from snapshot.

In the create from snapshot case however that key doesn't exist
in the vref (which is a snapshot object).

This change turns this into a key.get with a default return.

Fixes bug: 1192745

Change-Id: I1a6d38de614f54fcaa31ea7cc4250aacc85b0796
cinder/volume/drivers/solidfire.py