From 02f4b1b9f674a074a91c30585a190e3e5ed85c7a Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Wed, 5 Dec 2012 10:51:17 -0500 Subject: [PATCH] Ensure prep_resize arguments can be serialized. This should fix the unit test failures observed in: https://review.openstack.org/#/c/17539/ Change-Id: I75463a9ea9557f669b701c778bf24eb00502f47a --- nova/scheduler/rpcapi.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nova/scheduler/rpcapi.py b/nova/scheduler/rpcapi.py index 1c5db939b0f3..f368e95a06d1 100644 --- a/nova/scheduler/rpcapi.py +++ b/nova/scheduler/rpcapi.py @@ -77,11 +77,13 @@ class SchedulerAPI(nova.openstack.common.rpc.proxy.RpcProxy): request_spec, filter_properties, reservations): instance_p = jsonutils.to_primitive(instance) instance_type_p = jsonutils.to_primitive(instance_type) + reservations_p = jsonutils.to_primitive(reservations) + image_p = jsonutils.to_primitive(image) self.cast(ctxt, self.make_msg('prep_resize', instance=instance_p, instance_type=instance_type_p, - image=image, request_spec=request_spec, + image=image_p, request_spec=request_spec, filter_properties=filter_properties, - reservations=reservations)) + reservations=reservations_p)) def show_host_resources(self, ctxt, host): return self.call(ctxt, self.make_msg('show_host_resources', host=host))