From b01c266c5d0250197147f276d5edf7215e6fb510 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Mon, 18 Feb 2013 20:07:47 -0500 Subject: Ensure rpc result is primitive types. This new rpc method was not ensuring that the result was converted to primitive types. This would cause it to break when using an rpc backend other than impl_kombu. Change-Id: I0a21b559d12ff7d0c96341fcec887b2436753eda --- nova/scheduler/manager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nova/scheduler/manager.py b/nova/scheduler/manager.py index 176d1f014..6b47f37f8 100644 --- a/nova/scheduler/manager.py +++ b/nova/scheduler/manager.py @@ -36,6 +36,7 @@ from nova import notifications from nova.openstack.common import cfg from nova.openstack.common import excutils from nova.openstack.common import importutils +from nova.openstack.common import jsonutils from nova.openstack.common import log as logging from nova.openstack.common.notifier import api as notifier from nova import quota @@ -291,4 +292,4 @@ class SchedulerManager(manager.Manager): filter_properties""" hosts = self.driver.select_hosts(context, request_spec, filter_properties) - return hosts + return jsonutils.to_primitive(hosts) -- cgit