]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Verify requested size in volume.api create
authorJohn Griffith <john.griffith@solidfire.com>
Thu, 18 Sep 2014 03:16:18 +0000 (21:16 -0600)
committerJohn Griffith <john.griffith8@gmail.com>
Thu, 18 Sep 2014 19:31:35 +0000 (13:31 -0600)
commit7ed28d1c1eea6f6394a412b6a6634a7eb9585753
tree2f882735969cfdc82e77f55474345ad5d90fd2e4
parent5aec78f8849c7454117ec0fd8f6b711163e859a9
Verify requested size in volume.api create

Currently we're not checking that the input value requested
for size on volume create is valid, but taskflow portion of
the code expects it to be and as a result when it receives invalid
input we litter the logs with Trace messages.

This patch adds a check that verifies that if we pass in a
size to create_volume in the volume.api that it is in fact
an int or a string representation of an int.

Worst commit ever

Change-Id: I81bf515360eacf63e6f3cdb672ec7f37001aa4fb
Closes-Bug: 1370773
cinder/tests/test_volume.py
cinder/utils.py
cinder/volume/api.py