]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Pass volume_id in request_spec for manage_existing
authorMichał Dulko <michal.dulko@intel.com>
Wed, 16 Dec 2015 12:08:01 +0000 (13:08 +0100)
committerMichał Dulko <michal.dulko@intel.com>
Wed, 16 Dec 2015 12:27:48 +0000 (13:27 +0100)
commitb285cac66335b676c6c0f89e0badd5617d2e49a4
tree113829578cb3795690792489bb22f65f1ed5380a
parente8efa5b364a0a473866cf5ded0d8c6f42568d301
Pass volume_id in request_spec for manage_existing

In order to _set_volume_state_and_notify in scheduler.manager to work
correctly and error out volume on failure we need to pass volume_id in
the request_spec from c-api to c-sch. This commit implements that and
adds check for it in the unit tests for manage_existing flow.

Apart from that it removes unnecessary test that was setting volume to
MagicMock(return_value=None), which isn't actually testing anything
(volume() will return None, but we're never doing calls on volume
object).

Closes-Bug: 1526771
Change-Id: I93e16e281e952433870077309547e0ce09356a60
cinder/tests/unit/volume/flows/test_manage_volume_flow.py
cinder/volume/flows/api/manage_existing.py