Fix request_spec conversion from o.vo to dict

Turns out I7dae83667a1aca92c552fbfaa1e90c6558e293bf had a mistake and
was unconditionally converting RequestSpec o.vo to dictionary just
before sending it to the scheduler. This wasn't noticed as scheduler
manager has compatibility shim in place that converts the dictionary
back into o.vo when it's received.

The problem this produces is that we cannot drop the compatibility
shim from manager until 4.0 scheduler RPC API. This commit fixes that.

Change-Id: I7beaaddcff079dfe7a0032e2cf2afa75a5e88522
Closes-Bug: 1625170
(cherry picked from commit 32bfddf841)
This commit is contained in:
Michał Dulko 2016-09-19 14:42:35 +02:00 committed by Michal Dulko
parent 5eee3b8627
commit 42effa4ca6
1 changed files with 1 additions and 2 deletions

View File

@ -112,9 +112,8 @@ class SchedulerAPI(rpc.RPCAPI):
def create_volume(self, ctxt, topic, volume_id, snapshot_id=None,
image_id=None, request_spec=None,
filter_properties=None, volume=None):
request_spec_p = jsonutils.to_primitive(request_spec)
msg_args = {'snapshot_id': snapshot_id, 'image_id': image_id,
'request_spec': request_spec_p,
'request_spec': request_spec,
'filter_properties': filter_properties, 'volume': volume}
version = self._compat_ver('3.0', '2.2', '2.0')
if version in ('2.2', '2.0'):