# Path: monasca_notification/plugins/abstract_notifier.py
# class AbstractNotifier(object, metaclass=abc.ABCMeta):
#     def __init__(self):
#     def statsd_name(self):
#     def config(self, config):
#     def send_notification(self, notification):


import email.header
import email.mime.text
import email.utils
import smtplib
import time
from debtcollector import removals
from oslo_config import cfg
from monasca_notification.plugins import abstract_notifier
Link to Grafana: {grafana_url}

With dimensions:
{metric_dimensions}'''

EMAIL_MULTIPLE_HOST_BASE = u'''On host "{hostname}" {message}

Alarm "{alarm_name}" transitioned to the {state} state at {timestamp} UTC
alarm_id: {alarm_id}

Lifecycle state: {lifecycle_state}
Link: {link}
Link to Grafana: {grafana_url}

With dimensions:
{metric_dimensions}'''

EMAIL_NO_HOST_BASE = u'''On multiple hosts {message}

Alarm "{alarm_name}" transitioned to the {state} state at {timestamp} UTC
Alarm_id: {alarm_id}

Lifecycle state: {lifecycle_state}
Link: {link}
Link to Grafana: {grafana_url}

With dimensions
{metric_dimensions}'''



# Path: monasca_notification/plugins/abstract_notifier.py
# class AbstractNotifier(object, metaclass=abc.ABCMeta):
#     def __init__(self):
#     def statsd_name(self):
#     def config(self, config):
#     def send_notification(self, notification):


# Path: monasca_notification/plugins/email_notifier.py
import email.header
import email.mime.text
import email.utils
import smtplib
import time
from debtcollector import removals
from oslo_config import cfg
from monasca_notification.plugins import abstract_notifier

Link to Grafana: {grafana_url}

With dimensions:
{metric_dimensions}'''

EMAIL_MULTIPLE_HOST_BASE = u'''On host "{hostname}" {message}

Alarm "{alarm_name}" transitioned to the {state} state at {timestamp} UTC
alarm_id: {alarm_id}

Lifecycle state: {lifecycle_state}
Link: {link}
Link to Grafana: {grafana_url}

With dimensions:
{metric_dimensions}'''

EMAIL_NO_HOST_BASE = u'''On multiple hosts {message}

Alarm "{alarm_name}" transitioned to the {state} state at {timestamp} UTC
Alarm_id: {alarm_id}

Lifecycle state: {lifecycle_state}
Link: {link}
Link to Grafana: {grafana_url}

With dimensions
{metric_dimensions}'''



class EmailNotifier(abstract_notifier.AbstractNotifier):