From ba76b954e69de56f76f9db5cade1780bc351be67 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Tue, 15 May 2012 12:54:16 -0400 Subject: Make use of openstack.common.jsonutils. This patch imports jsonutils from openstack-common. It removes the equivalent code from nova.utils and then converts the code base to use jsonutils. The primary motivator for this change was to remove the rest of the dependencies from nova.rpc on nova.utils. Change-Id: If43658b9b098ed56cba018c81be268b8c3e2916a --- nova/notifier/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'nova/notifier') diff --git a/nova/notifier/api.py b/nova/notifier/api.py index b3bfbf9c4..bc2690077 100644 --- a/nova/notifier/api.py +++ b/nova/notifier/api.py @@ -21,6 +21,7 @@ from nova import flags from nova import log as logging from nova.openstack.common import cfg from nova.openstack.common import importutils +from nova.openstack.common import jsonutils from nova import utils @@ -121,7 +122,7 @@ def notify(context, publisher_id, event_type, priority, payload): _('%s not in valid priorities') % priority) # Ensure everything is JSON serializable. - payload = utils.to_primitive(payload, convert_instances=True) + payload = jsonutils.to_primitive(payload, convert_instances=True) driver = importutils.import_module(FLAGS.notification_driver) msg = dict(message_id=str(uuid.uuid4()), -- cgit