aboutsummaryrefslogtreecommitdiff
path: root/rpkid/rpki/gui/app/check_expired.py
diff options
context:
space:
mode:
authorMichael Elkins <melkins@tislabs.com>2013-04-03 18:45:06 +0000
committerMichael Elkins <melkins@tislabs.com>2013-04-03 18:45:06 +0000
commit4a8f6d69c9950fd8509f0f3462ad50ad341d6725 (patch)
tree456c7ea36fd5566cd6995d0a3b4e1871ab2e5fb0 /rpkid/rpki/gui/app/check_expired.py
parentd0e81d8047779b7889e8773c964c2a35c1674dc4 (diff)
remove get_email_list() and replace with calls to Conf.send_alert()
svn path=/branches/tk500/; revision=5260
Diffstat (limited to 'rpkid/rpki/gui/app/check_expired.py')
-rw-r--r--rpkid/rpki/gui/app/check_expired.py22
1 files changed, 9 insertions, 13 deletions
diff --git a/rpkid/rpki/gui/app/check_expired.py b/rpkid/rpki/gui/app/check_expired.py
index 418e031a..fcf5ecae 100644
--- a/rpkid/rpki/gui/app/check_expired.py
+++ b/rpkid/rpki/gui/app/check_expired.py
@@ -22,8 +22,8 @@ import logging
import datetime
from rpki.gui.cacheview.models import Cert
-from rpki.gui.app.models import Conf, ResourceCert, Timestamp
-from rpki.gui.app.glue import list_received_resources, get_email_list
+from rpki.gui.app.models import Conf, ResourceCert, Timestamp, Alert
+from rpki.gui.app.glue import list_received_resources
from rpki.irdb import Zookeeper
from rpki.left_right import report_error_elt, list_published_objects_elt
from rpki.x509 import X509
@@ -200,14 +200,10 @@ def notify_expired(expire_days=14, from_email=None):
if s:
logger.info(s)
- notify_emails = get_email_list(h)
-
- if notify_emails:
- t = """This is an automated notice about the upcoming expiration of RPKI resources for the handle %s on %s. You are receiving this notification because your email address is either registered in a Ghostbuster record, or as the default email address for the account.\n\n""" % (h.handle, host)
-
- send_mail(
- subject='RPKI expiration notice for %s' % h.handle,
- message=t + s,
- from_email=from_email,
- recipient_list=notify_emails
- )
+ t = """This is an automated notice about the upcoming expiration of RPKI resources for the handle %s on %s. You are receiving this notification because your email address is either registered in a Ghostbuster record, or as the default email address for the account.\n\n""" % (h.handle, host)
+ h.send_alert(
+ subject='RPKI expiration notice for %s' % h.handle,
+ message=t + s,
+ from_email=from_email,
+ severity=Alert.WARNING
+ )