summaryrefslogtreecommitdiffstats
path: root/nova/notifier
diff options
context:
space:
mode:
authorRussell Bryant <rbryant@redhat.com>2012-05-15 12:54:16 -0400
committerRussell Bryant <rbryant@redhat.com>2012-05-15 15:44:14 -0400
commitba76b954e69de56f76f9db5cade1780bc351be67 (patch)
tree981706789636899cb13739a9f8942d882232b72c /nova/notifier
parentc8cafc6e9df3a389330da08cbcbf60fb6ca1b238 (diff)
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
Diffstat (limited to 'nova/notifier')
-rw-r--r--nova/notifier/api.py3
1 files changed, 2 insertions, 1 deletions
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()),