# 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 requests
import simplejson as json
import urllib
from debtcollector import removals
from oslo_config import cfg
from monasca_notification.plugins import abstract_notifier
# limitations under the License.




CONF = cfg.CONF

"""
notification.address = https://hipchat.hpcloud.net/v2/room/<room_id>/notification?auth_token=432432

How to get access token?
    1) Login to Hipchat with the user account which is used for notification
    2) Go to this page. https://hipchat.hpcloud.net/account/api (Replace your hipchat server name)
    3) You can see option to "Create token". Use the capability "SendNotification"

How to get the Room ID?
    1) Login to Hipchat with the user account which is used for notification
    2) Go to this page. https://hipchat.hpcloud.net/account/api (Replace your hipchat server name)
    3) Click on the Rooms tab
    4) Click on any Room of your choice.
    5) Room ID is the API ID field

"""

SEVERITY_COLORS = {"low": 'green',
                   'medium': 'gray',
                   'high': 'yellow',
                   'critical': 'red'}



# 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/hipchat_notifier.py
import requests
import simplejson as json
import urllib
from debtcollector import removals
from oslo_config import cfg
from monasca_notification.plugins import abstract_notifier

# limitations under the License.




CONF = cfg.CONF

"""
notification.address = https://hipchat.hpcloud.net/v2/room/<room_id>/notification?auth_token=432432

How to get access token?
    1) Login to Hipchat with the user account which is used for notification
    2) Go to this page. https://hipchat.hpcloud.net/account/api (Replace your hipchat server name)
    3) You can see option to "Create token". Use the capability "SendNotification"

How to get the Room ID?
    1) Login to Hipchat with the user account which is used for notification
    2) Go to this page. https://hipchat.hpcloud.net/account/api (Replace your hipchat server name)
    3) Click on the Rooms tab
    4) Click on any Room of your choice.
    5) Room ID is the API ID field

"""

SEVERITY_COLORS = {"low": 'green',
                   'medium': 'gray',
                   'high': 'yellow',
                   'critical': 'red'}



class HipChatNotifier(abstract_notifier.AbstractNotifier):