]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
ConsistencyGroup: Return 400 instead of 500 for invalid body
authorPranaliDeore <pranali11.deore@nttdata.com>
Mon, 25 May 2015 09:14:26 +0000 (02:14 -0700)
committerPranali Deore <pranali11.deore@nttdata.com>
Mon, 8 Jun 2015 11:27:38 +0000 (11:27 +0000)
commit299b99437c2de84222fd585f06c2d05ca213225b
treef8bd140836e1183b346c3a3933d3d511a601c7d5
parent8ae4bdc8f3d04e47a839f8187dbd955ab2528189
ConsistencyGroup: Return 400 instead of 500 for invalid body

If invalid request body is passed to the delete
consistencygroups api, then it returns 500 error.

Validated request body using 'is_valid_body()' method
and also added validation to check 'force' is of bool type.

APIImpact

Closes-Bug: #1458868
Change-Id: Iaaa4409233bfed6ae3e67be5df8cc5ada28e054f
cinder/api/contrib/consistencygroups.py
cinder/tests/unit/api/contrib/test_consistencygroups.py