]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Check for empty attributes on SF volume
authorJohn Griffith <john.griffith8@gmail.com>
Sun, 13 Sep 2015 14:52:53 +0000 (08:52 -0600)
committerJohn Griffith <john.griffith8@gmail.com>
Mon, 14 Sep 2015 13:51:07 +0000 (07:51 -0600)
commit1c0e67996375e91878bf433877aab80d7227bf28
tree1d37a4ae524e034103867fb4a7db7fcdc0711bf6
parent8bb84e2031db2c7c9e4f26db4aba8f666a7897f9
Check for empty attributes on SF volume

This should not happen, but; we should be more strict
about our dict reading/checking and always make sure
the key item actually comes back and exists.

In the case of volume['attributes'] we were always
assuming this to be present which should be "ok", but
it's better to verify if rather than assuming, so this
patch adds a simple verification step before trying to
fetch on volume['attributes'].

Change-Id: I37a134a735aaf043aed1230d57fe458bb3a60240
Closes-Bug: #1495247
cinder/tests/unit/test_solidfire.py
cinder/volume/drivers/solidfire.py