# 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
# Copyright 2017 Fujitsu LIMITED
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.




CONF = cfg.CONF

EMAIL_SINGLE_HOST_BASE = u'''On host "{hostname}" for target "{target_host}" {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:

# 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

# Copyright 2017 Fujitsu LIMITED
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.




CONF = cfg.CONF

EMAIL_SINGLE_HOST_BASE = u'''On host "{hostname}" for target "{target_host}" {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}'''