summaryrefslogtreecommitdiffstats
path: root/nova/notifier
diff options
context:
space:
mode:
authorSandy Walsh <sandy.walsh@rackspace.com>2011-06-28 21:04:50 -0700
committerSandy Walsh <sandy.walsh@rackspace.com>2011-06-28 21:04:50 -0700
commita0f968235332e5400d507bbafa99bc0728aa8479 (patch)
treeef67f6404ed19906d0129adb73de220e45e3661c /nova/notifier
parent4c98425ba7a53c8b966317444abe2d4f7b6556d8 (diff)
moved to wrap_exception decorator
Diffstat (limited to 'nova/notifier')
-rw-r--r--nova/notifier/api.py26
1 files changed, 0 insertions, 26 deletions
diff --git a/nova/notifier/api.py b/nova/notifier/api.py
index 027aa7cc3..89527be16 100644
--- a/nova/notifier/api.py
+++ b/nova/notifier/api.py
@@ -43,11 +43,6 @@ def publisher_id(service, host=None):
return "%s.%s" % (service, host)
-def msgkeys(event_type, instance_id, level, publisher_id):
- return dict(event_type=event_type, instance_id=instance_id,
- notification_level=level, publisher_id=publisher_id)
-
-
def safe_notify(publisher_id, event_type, priority, payload):
try:
notify(publisher_id, event_type, notification_level, payload)
@@ -55,27 +50,6 @@ def safe_notify(publisher_id, event_type, priority, payload):
LOG.exception(_("Problem '%(e)' attempting to "
"send to notification system." % locals()))
-
-def instance_safe_notify(publisher_id, event_type, priority, instance_id,
- extra_payload=None):
- payload = dict(instance_id = instance_id)
- if extra_payload:
- payload.extend(extra_payload)
- safe_notify(publisher_id, event_type, priority, payload)
-
-
-def exception_to_notification(self, ex):
- required = ['instance_id', 'publisher_id', 'notification_level',
- 'event_type']
- for key in required:
- if not (hasattr(ex, key) and ex.key):
- return # Doesn't have everything we need. Skip it.
- instance_id = ex.instance_id
- publisher_id = ex.publisher_id
- notification_level = ex.notification_level
- event_type = ex.event_type
- instance_safe_notify(publisher_id, event_type, priority, instance_id)
-
def notify(publisher_id, event_type, priority, payload):
"""
Sends a notification using the specified driver