]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Dell SC: update_volume_stats could use uninitialized vars
authorTom Swanson <tom_swanson@dell.com>
Tue, 2 Jun 2015 19:20:55 +0000 (14:20 -0500)
committerTom Swanson <tom_swanson@dell.com>
Tue, 2 Jun 2015 21:58:18 +0000 (16:58 -0500)
commita9be9c9735a07db163e843222cae9075864e1ef0
treee27cbec9b6c884d31566d5e996736c3683fdfed8
parentc470c850f0b995a524bde317e24d6c604338215b
Dell SC: update_volume_stats could use uninitialized vars

In _update_volume_stats in dell_storagecenter_common.py totalcapacitygb
and freespacegb are not necessarily initialized in the LOG.debug call.
Changed to data['total_capacity_gb'] and data['free_capacity_gb'].

Also initialized to total_capacity_gb and free_capacity_gb dict entries
to 'unavailable' which allowed the removal of two conditionals in the
same function.

Change-Id: Ib699e0d1cf67645298628aa96656888193843509
Closes-Bug: #1461230
cinder/volume/drivers/dell/dell_storagecenter_common.py