)]}'
{"monasca_notification/notification_engine.py":[{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"a62f3d845f2b9ef4296c4ca69fe8b6291bd17ff9","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        self._producer \u003d KafkaProducer(config[\u0027kafka\u0027][\u0027url\u0027])"},{"line_number":42,"context_line":"        self._alarm_ttl \u003d config[\u0027processors\u0027][\u0027alarm\u0027][\u0027ttl\u0027]"},{"line_number":43,"context_line":"        self._alarms \u003d AlarmProcessor(self._alarm_ttl, config)"},{"line_number":44,"context_line":"        self._notifier \u003d NotificationProcessor(config)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        self._config \u003d config"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"fad55976_3bb6e58a","line":44,"range":{"start_line":44,"start_character":47,"end_line":44,"end_character":53},"updated":"2016-07-15 21:01:58.000000000","message":"I\u0027m not sure I understand the reason for this change.  Can you explain it?","commit_id":"4a8ed8f3b8fa5ef70241255e78d36879d55e7926"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"6f430276971d8ecc75023b4e26e1cf115decc19c","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        self._producer \u003d KafkaProducer(config[\u0027kafka\u0027][\u0027url\u0027])"},{"line_number":42,"context_line":"        self._alarm_ttl \u003d config[\u0027processors\u0027][\u0027alarm\u0027][\u0027ttl\u0027]"},{"line_number":43,"context_line":"        self._alarms \u003d AlarmProcessor(self._alarm_ttl, config)"},{"line_number":44,"context_line":"        self._notifier \u003d NotificationProcessor(config)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        self._config \u003d config"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"fad55976_cd2f07f5","line":44,"range":{"start_line":44,"start_character":47,"end_line":44,"end_character":53},"in_reply_to":"fad55976_3bb6e58a","updated":"2016-07-15 21:56:12.000000000","message":"We need access to mysql details in notification processor. So I\u0027m passing the full config, instead of a section","commit_id":"4a8ed8f3b8fa5ef70241255e78d36879d55e7926"}],"monasca_notification/plugins/slack_notifier.py":[{"author":{"_account_id":8126,"name":"Bradley Klein","email":"bradley.klein@charter.com","username":"bklei"},"change_message_id":"e8a6217afd9817aa703ce8c6e60a8c228f203283","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        slack_message \u003d self._build_slack_message(notification)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        address \u003d notification.address"},{"line_number":76,"context_line":"        #  \"#\" is reserverd character and replace it with ascii equivalent"},{"line_number":77,"context_line":"        #  Slack room has \"#\" as first character"},{"line_number":78,"context_line":"        address \u003d address.replace(\"#\", \"%23\")"},{"line_number":79,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"bacf61ea_0220de9a","line":76,"updated":"2016-07-27 15:33:55.000000000","message":"reserved spelling..","commit_id":"30fe9811805f278518913d64a9016dbbade53989"}],"monasca_notification/processors/notification_processor.py":[{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"4cde024e0e14e193915e6c4edb662c4d1f3736eb","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        \"\"\"Persists configured plugin types in DB"},{"line_number":38,"context_line":"             For each notification type configured add it in db, if it is not there"},{"line_number":39,"context_line":"        \"\"\""},{"line_number":40,"context_line":"        configured_plugin_types \u003d notifiers.configured_notifiers.keys()"},{"line_number":41,"context_line":"        persisted_plguin_types \u003d self._db_repo.fetch_notification_method_types()"},{"line_number":42,"context_line":"        remaining_plugin_types \u003d set(configured_plugin_types) - set(persisted_plguin_types)"},{"line_number":43,"context_line":"        self._db_repo.insert_notification_method_types(remaining_plugin_types)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1aa78d24_2c402f07","line":40,"range":{"start_line":40,"start_character":44,"end_line":40,"end_character":64},"updated":"2016-07-14 20:10:58.000000000","message":"Do you want this to be the set of notification plugins that have been instantiated or than have been configured by the notification engine?  If it\u0027s configured there is a notifiers.enabled_notifications() function available.  If it is instantiated plugins then you should be accessing notifiers.possible_notifiers.keys().","commit_id":"e7b9dffa028f1299cad954e5c62adcdd5033cd80"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"775807f1aa0a45495df607e39e1b733e091e3585","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        \"\"\"Persists configured plugin types in DB"},{"line_number":38,"context_line":"             For each notification type configured add it in db, if it is not there"},{"line_number":39,"context_line":"        \"\"\""},{"line_number":40,"context_line":"        configured_plugin_types \u003d notifiers.configured_notifiers.keys()"},{"line_number":41,"context_line":"        persisted_plguin_types \u003d self._db_repo.fetch_notification_method_types()"},{"line_number":42,"context_line":"        remaining_plugin_types \u003d set(configured_plugin_types) - set(persisted_plguin_types)"},{"line_number":43,"context_line":"        self._db_repo.insert_notification_method_types(remaining_plugin_types)"}],"source_content_type":"text/x-python","patch_set":9,"id":"fad55976_9b9c316b","line":40,"range":{"start_line":40,"start_character":44,"end_line":40,"end_character":64},"in_reply_to":"1aa78d24_2c402f07","updated":"2016-07-15 20:45:06.000000000","message":"Done","commit_id":"e7b9dffa028f1299cad954e5c62adcdd5033cd80"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"a62f3d845f2b9ef4296c4ca69fe8b6291bd17ff9","unresolved":false,"context_lines":[{"line_number":38,"context_line":"             For each notification type configured add it in db, if it is not there"},{"line_number":39,"context_line":"        \"\"\""},{"line_number":40,"context_line":"        configured_plugin_types \u003d notifiers.enabled_notifications()"},{"line_number":41,"context_line":"        configured_plugin_types \u003d [plugin.upper() for plugin in configured_plugin_types]"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        persisted_plguin_types \u003d self._db_repo.fetch_notification_method_types()"},{"line_number":44,"context_line":"        remaining_plugin_types \u003d set(configured_plugin_types) - set(persisted_plguin_types)"}],"source_content_type":"text/x-python","patch_set":10,"id":"fad55976_fe255bae","line":41,"range":{"start_line":41,"start_character":35,"end_line":41,"end_character":41},"updated":"2016-07-15 21:01:58.000000000","message":"What is the need for upper casing here?  If we need the data in a particular format why not specify that format in the enabbled_notifications, fetch_notification_method_types, and insert_notification_method_types functions?  I don\u0027t think we want code using those functions to be deciding what the case of the plugin name should be.","commit_id":"4a8ed8f3b8fa5ef70241255e78d36879d55e7926"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"6f430276971d8ecc75023b4e26e1cf115decc19c","unresolved":false,"context_lines":[{"line_number":38,"context_line":"             For each notification type configured add it in db, if it is not there"},{"line_number":39,"context_line":"        \"\"\""},{"line_number":40,"context_line":"        configured_plugin_types \u003d notifiers.enabled_notifications()"},{"line_number":41,"context_line":"        configured_plugin_types \u003d [plugin.upper() for plugin in configured_plugin_types]"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        persisted_plguin_types \u003d self._db_repo.fetch_notification_method_types()"},{"line_number":44,"context_line":"        remaining_plugin_types \u003d set(configured_plugin_types) - set(persisted_plguin_types)"}],"source_content_type":"text/x-python","patch_set":10,"id":"fad55976_dff20e9a","line":41,"range":{"start_line":41,"start_character":35,"end_line":41,"end_character":41},"in_reply_to":"fad55976_fe255bae","updated":"2016-07-15 21:56:12.000000000","message":"There are existing installation which has that in lower case.  ( Direct mysql insert ) Every where in the code we use upper case (monasca-api code base).\n \nname of the plugin is primary key. I don\u0027t want to insert two plugins with the name \"Email\" and \"EMAIL\"\n\nhttps://github.com/openstack/monasca-notification/blob/master/monasca_notification/types/email_notifier.py#L63  -- In lower case\n\nhttps://github.com/openstack/monasca-api/blob/master/devstack/files/schema/mon_mysql.sql#L274 -- Upper case","commit_id":"4a8ed8f3b8fa5ef70241255e78d36879d55e7926"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"a62f3d845f2b9ef4296c4ca69fe8b6291bd17ff9","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        persisted_plguin_types \u003d self._db_repo.fetch_notification_method_types()"},{"line_number":44,"context_line":"        remaining_plugin_types \u003d set(configured_plugin_types) - set(persisted_plguin_types)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        if len(remaining_plugin_types):"},{"line_number":47,"context_line":"            remaining_plugin_types \u003d [plugin.upper() for plugin in remaining_plugin_types]"},{"line_number":48,"context_line":"            log.info(\"Inserting new plugins {0}\".format(remaining_plugin_types))"},{"line_number":49,"context_line":"            self._db_repo.insert_notification_method_types(remaining_plugin_types)"}],"source_content_type":"text/x-python","patch_set":10,"id":"fad55976_5e10e74e","line":46,"range":{"start_line":46,"start_character":15,"end_line":46,"end_character":37},"updated":"2016-07-15 21:01:58.000000000","message":"You should be able to do \"if remaining_plugin_types\" here without the len call.","commit_id":"4a8ed8f3b8fa5ef70241255e78d36879d55e7926"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"6f430276971d8ecc75023b4e26e1cf115decc19c","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        persisted_plguin_types \u003d self._db_repo.fetch_notification_method_types()"},{"line_number":44,"context_line":"        remaining_plugin_types \u003d set(configured_plugin_types) - set(persisted_plguin_types)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        if len(remaining_plugin_types):"},{"line_number":47,"context_line":"            remaining_plugin_types \u003d [plugin.upper() for plugin in remaining_plugin_types]"},{"line_number":48,"context_line":"            log.info(\"Inserting new plugins {0}\".format(remaining_plugin_types))"},{"line_number":49,"context_line":"            self._db_repo.insert_notification_method_types(remaining_plugin_types)"}],"source_content_type":"text/x-python","patch_set":10,"id":"fad55976_2d6d0305","line":46,"range":{"start_line":46,"start_character":15,"end_line":46,"end_character":37},"in_reply_to":"fad55976_5e10e74e","updated":"2016-07-15 21:56:12.000000000","message":"Will do it","commit_id":"4a8ed8f3b8fa5ef70241255e78d36879d55e7926"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"a62f3d845f2b9ef4296c4ca69fe8b6291bd17ff9","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        if len(remaining_plugin_types):"},{"line_number":47,"context_line":"            remaining_plugin_types \u003d [plugin.upper() for plugin in remaining_plugin_types]"},{"line_number":48,"context_line":"            log.info(\"Inserting new plugins {0}\".format(remaining_plugin_types))"},{"line_number":49,"context_line":"            self._db_repo.insert_notification_method_types(remaining_plugin_types)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def send(self, notifications):"}],"source_content_type":"text/x-python","patch_set":10,"id":"fad55976_7eddeb6f","line":48,"range":{"start_line":48,"start_character":22,"end_line":48,"end_character":43},"updated":"2016-07-15 21:01:58.000000000","message":"This log message could be more informative.  Should we specify that we\u0027re added the plugins to the DB at this point?","commit_id":"4a8ed8f3b8fa5ef70241255e78d36879d55e7926"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"6f430276971d8ecc75023b4e26e1cf115decc19c","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        if len(remaining_plugin_types):"},{"line_number":47,"context_line":"            remaining_plugin_types \u003d [plugin.upper() for plugin in remaining_plugin_types]"},{"line_number":48,"context_line":"            log.info(\"Inserting new plugins {0}\".format(remaining_plugin_types))"},{"line_number":49,"context_line":"            self._db_repo.insert_notification_method_types(remaining_plugin_types)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def send(self, notifications):"}],"source_content_type":"text/x-python","patch_set":10,"id":"fad55976_2db6a38a","line":48,"range":{"start_line":48,"start_character":22,"end_line":48,"end_character":43},"in_reply_to":"fad55976_7eddeb6f","updated":"2016-07-15 21:56:12.000000000","message":"Agree","commit_id":"4a8ed8f3b8fa5ef70241255e78d36879d55e7926"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"6ccc65114b6f8183dad36a96fc5b8d6138f6136e","unresolved":false,"context_lines":[{"line_number":38,"context_line":"             For each notification type configured add it in db, if it is not there"},{"line_number":39,"context_line":"        \"\"\""},{"line_number":40,"context_line":"        configured_plugin_types \u003d notifiers.enabled_notifications()"},{"line_number":41,"context_line":"        configured_plugin_types \u003d [plugin.upper() for plugin in configured_plugin_types]"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        persisted_plguin_types \u003d self._db_repo.fetch_notification_method_types()"},{"line_number":44,"context_line":"        remaining_plugin_types \u003d set(configured_plugin_types) - set(persisted_plguin_types)"}],"source_content_type":"text/x-python","patch_set":12,"id":"dada55a8_bc73cbb0","line":41,"range":{"start_line":41,"start_character":35,"end_line":41,"end_character":41},"updated":"2016-07-18 19:22:41.000000000","message":"Haneef, responding to your earlier comments if we have a spec for what the data should look like going into the database we should be enforcing that in the pieces that interact with the database.","commit_id":"90e7fa44c2a39fe90006bd26f490a7ce071484ec"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"9b3986f9f49f38117b23e59fede6a6f1c255507a","unresolved":false,"context_lines":[{"line_number":38,"context_line":"             For each notification type configured add it in db, if it is not there"},{"line_number":39,"context_line":"        \"\"\""},{"line_number":40,"context_line":"        configured_plugin_types \u003d notifiers.enabled_notifications()"},{"line_number":41,"context_line":"        configured_plugin_types \u003d [plugin.upper() for plugin in configured_plugin_types]"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        persisted_plguin_types \u003d self._db_repo.fetch_notification_method_types()"},{"line_number":44,"context_line":"        remaining_plugin_types \u003d set(configured_plugin_types) - set(persisted_plguin_types)"}],"source_content_type":"text/x-python","patch_set":12,"id":"dada55a8_ef3a6ccc","line":41,"range":{"start_line":41,"start_character":35,"end_line":41,"end_character":41},"in_reply_to":"dada55a8_021cfc11","updated":"2016-07-25 17:10:46.000000000","message":"Alternatively you could bump the type property up to the super class and return a consistent format.  We do use that type name to define metric names though so if you change the format there from what we currently have you\u0027re going to be generating new metric names.","commit_id":"90e7fa44c2a39fe90006bd26f490a7ce071484ec"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"031c97f8fc8f9fefd1c4a09fdd21060d5b3e0919","unresolved":false,"context_lines":[{"line_number":38,"context_line":"             For each notification type configured add it in db, if it is not there"},{"line_number":39,"context_line":"        \"\"\""},{"line_number":40,"context_line":"        configured_plugin_types \u003d notifiers.enabled_notifications()"},{"line_number":41,"context_line":"        configured_plugin_types \u003d [plugin.upper() for plugin in configured_plugin_types]"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        persisted_plguin_types \u003d self._db_repo.fetch_notification_method_types()"},{"line_number":44,"context_line":"        remaining_plugin_types \u003d set(configured_plugin_types) - set(persisted_plguin_types)"}],"source_content_type":"text/x-python","patch_set":12,"id":"dada55a8_f272877b","line":41,"range":{"start_line":41,"start_character":35,"end_line":41,"end_character":41},"in_reply_to":"dada55a8_1c9132f1","updated":"2016-07-18 22:22:40.000000000","message":"This is insert_notification_method_types method.  This is where we are inserting the notification method types in db\n\nSo assume the first time this code is deployed\n   -- Current installation has email, webhook, pagerduty in db in lowercase\n   -- new plugins configured are HipChat, slack\n   -- So here the insert is going to happen for HipChat, Slack. This method is going to insert HipChat and Slack in uppercase.  If I don\u0027t convert the existing value  in db to upper case and do comparison, I will insert EMAIL, WEBHOOK, PAGERDUTY","commit_id":"90e7fa44c2a39fe90006bd26f490a7ce071484ec"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"dbf86e7c64043cdf44ffcd922f30c08df1d3c5da","unresolved":false,"context_lines":[{"line_number":38,"context_line":"             For each notification type configured add it in db, if it is not there"},{"line_number":39,"context_line":"        \"\"\""},{"line_number":40,"context_line":"        configured_plugin_types \u003d notifiers.enabled_notifications()"},{"line_number":41,"context_line":"        configured_plugin_types \u003d [plugin.upper() for plugin in configured_plugin_types]"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        persisted_plguin_types \u003d self._db_repo.fetch_notification_method_types()"},{"line_number":44,"context_line":"        remaining_plugin_types \u003d set(configured_plugin_types) - set(persisted_plguin_types)"}],"source_content_type":"text/x-python","patch_set":12,"id":"dada55a8_1c9132f1","line":41,"range":{"start_line":41,"start_character":35,"end_line":41,"end_character":41},"in_reply_to":"dada55a8_4d59375a","updated":"2016-07-18 21:34:30.000000000","message":"What I\u0027m getting at is I don\u0027t think this is the right place to be doing the upper casing if you want a consistent format.  Why not in fetch_notification_method_types and insert_notification_method_types?  Why should this function care how people have inserted data into the DB?","commit_id":"90e7fa44c2a39fe90006bd26f490a7ce071484ec"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"6dda93fcd0bff8bb656bc764d9d2b38c4d61a041","unresolved":false,"context_lines":[{"line_number":38,"context_line":"             For each notification type configured add it in db, if it is not there"},{"line_number":39,"context_line":"        \"\"\""},{"line_number":40,"context_line":"        configured_plugin_types \u003d notifiers.enabled_notifications()"},{"line_number":41,"context_line":"        configured_plugin_types \u003d [plugin.upper() for plugin in configured_plugin_types]"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        persisted_plguin_types \u003d self._db_repo.fetch_notification_method_types()"},{"line_number":44,"context_line":"        remaining_plugin_types \u003d set(configured_plugin_types) - set(persisted_plguin_types)"}],"source_content_type":"text/x-python","patch_set":12,"id":"dada55a8_021cfc11","line":41,"range":{"start_line":41,"start_character":35,"end_line":41,"end_character":41},"in_reply_to":"dada55a8_67d41c47","updated":"2016-07-25 16:14:00.000000000","message":"You\u0027re using the enabled_notifications function at https://github.com/openstack/monasca-notification/blob/master/monasca_notification/types/notifiers.py#L43\n\nI would suggest you enforce any formatting you want in that function and the two DB functions.","commit_id":"90e7fa44c2a39fe90006bd26f490a7ce071484ec"},{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"a3db1616cf15b9ce6b0049f4ce12455d53cb352a","unresolved":false,"context_lines":[{"line_number":38,"context_line":"             For each notification type configured add it in db, if it is not there"},{"line_number":39,"context_line":"        \"\"\""},{"line_number":40,"context_line":"        configured_plugin_types \u003d notifiers.enabled_notifications()"},{"line_number":41,"context_line":"        configured_plugin_types \u003d [plugin.upper() for plugin in configured_plugin_types]"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        persisted_plguin_types \u003d self._db_repo.fetch_notification_method_types()"},{"line_number":44,"context_line":"        remaining_plugin_types \u003d set(configured_plugin_types) - set(persisted_plguin_types)"}],"source_content_type":"text/x-python","patch_set":12,"id":"dada55a8_a5a9b5e1","line":41,"range":{"start_line":41,"start_character":35,"end_line":41,"end_character":41},"in_reply_to":"dada55a8_92e22b02","updated":"2016-07-19 18:09:14.000000000","message":"I agree with Joe, it makes more sense to me to put the storage formatting in the code closest to the database.","commit_id":"90e7fa44c2a39fe90006bd26f490a7ce071484ec"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"ab4d1186a827e468ea7fb113c8a7eb13abf9e9cc","unresolved":false,"context_lines":[{"line_number":38,"context_line":"             For each notification type configured add it in db, if it is not there"},{"line_number":39,"context_line":"        \"\"\""},{"line_number":40,"context_line":"        configured_plugin_types \u003d notifiers.enabled_notifications()"},{"line_number":41,"context_line":"        configured_plugin_types \u003d [plugin.upper() for plugin in configured_plugin_types]"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        persisted_plguin_types \u003d self._db_repo.fetch_notification_method_types()"},{"line_number":44,"context_line":"        remaining_plugin_types \u003d set(configured_plugin_types) - set(persisted_plguin_types)"}],"source_content_type":"text/x-python","patch_set":12,"id":"dada55a8_67d41c47","line":41,"range":{"start_line":41,"start_character":35,"end_line":41,"end_character":41},"in_reply_to":"dada55a8_a5a9b5e1","updated":"2016-07-23 02:52:18.000000000","message":"I understand what you are saying. But if you look at the this line \n\nconfigured_plugin_types \u003d [plugin.upper() for plugin in configured_plugin_types]\n\nconfigured_plugins is not coming from the database. It is coming from the code. I can change the code. Do you want me to change the code?\n\nIt is coming from : https://github.com/openstack/monasca-notification/blob/master/monasca_notification/types/email_notifier.py#L64","commit_id":"90e7fa44c2a39fe90006bd26f490a7ce071484ec"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"d77cbee756eecb34c1fc7f5d4564ae519f03812b","unresolved":false,"context_lines":[{"line_number":38,"context_line":"             For each notification type configured add it in db, if it is not there"},{"line_number":39,"context_line":"        \"\"\""},{"line_number":40,"context_line":"        configured_plugin_types \u003d notifiers.enabled_notifications()"},{"line_number":41,"context_line":"        configured_plugin_types \u003d [plugin.upper() for plugin in configured_plugin_types]"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        persisted_plguin_types \u003d self._db_repo.fetch_notification_method_types()"},{"line_number":44,"context_line":"        remaining_plugin_types \u003d set(configured_plugin_types) - set(persisted_plguin_types)"}],"source_content_type":"text/x-python","patch_set":12,"id":"dada55a8_4d59375a","line":41,"range":{"start_line":41,"start_character":35,"end_line":41,"end_character":41},"in_reply_to":"dada55a8_bc73cbb0","updated":"2016-07-18 20:42:56.000000000","message":"Agree. While inserting data, I make sure I enter in upppercase.  This conversion is for those existing data which are entered via direct sql. I know how they are entered. In devstack test, I know it is uppercase, if some one is doing via puppet or other tools, we don\u0027t know how they have entered.\n\nThis is just a safeguard.","commit_id":"90e7fa44c2a39fe90006bd26f490a7ce071484ec"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"97b769bc671ac567966cb058811ee2da6c01a111","unresolved":false,"context_lines":[{"line_number":38,"context_line":"             For each notification type configured add it in db, if it is not there"},{"line_number":39,"context_line":"        \"\"\""},{"line_number":40,"context_line":"        configured_plugin_types \u003d notifiers.enabled_notifications()"},{"line_number":41,"context_line":"        configured_plugin_types \u003d [plugin.upper() for plugin in configured_plugin_types]"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        persisted_plguin_types \u003d self._db_repo.fetch_notification_method_types()"},{"line_number":44,"context_line":"        remaining_plugin_types \u003d set(configured_plugin_types) - set(persisted_plguin_types)"}],"source_content_type":"text/x-python","patch_set":12,"id":"dada55a8_92e22b02","line":41,"range":{"start_line":41,"start_character":35,"end_line":41,"end_character":41},"in_reply_to":"dada55a8_f272877b","updated":"2016-07-18 22:28:03.000000000","message":"That\u0027s fine.  My point is that at this point where we\u0027re doing comparisons we shouldn\u0027t have to care about the data format.  The three lower level functions you\u0027re using here to insert, query, and check configuration should be returning data and inserting data in the proper format.  Doing it this way opens the possibility that you can use the DB level functions without properly formatting the data or that we could inadvertently damage the formatting if those functions were extracted to another library like monascsa-common.","commit_id":"90e7fa44c2a39fe90006bd26f490a7ce071484ec"},{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"c025461d15c2cf8e22da3c353598aeca8462814d","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        configured_plugin_types \u003d notifiers.enabled_notifications()"},{"line_number":41,"context_line":"        configured_plugin_types \u003d [plugin.upper() for plugin in configured_plugin_types]"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        persisted_plguin_types \u003d self._db_repo.fetch_notification_method_types()"},{"line_number":44,"context_line":"        remaining_plugin_types \u003d set(configured_plugin_types) - set(persisted_plguin_types)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        if remaining_plugin_types:"}],"source_content_type":"text/x-python","patch_set":12,"id":"dada55a8_4a08c62c","line":43,"range":{"start_line":43,"start_character":18,"end_line":43,"end_character":24},"updated":"2016-07-19 18:05:54.000000000","message":"typo","commit_id":"90e7fa44c2a39fe90006bd26f490a7ce071484ec"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"ab4d1186a827e468ea7fb113c8a7eb13abf9e9cc","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        configured_plugin_types \u003d notifiers.enabled_notifications()"},{"line_number":41,"context_line":"        configured_plugin_types \u003d [plugin.upper() for plugin in configured_plugin_types]"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        persisted_plguin_types \u003d self._db_repo.fetch_notification_method_types()"},{"line_number":44,"context_line":"        remaining_plugin_types \u003d set(configured_plugin_types) - set(persisted_plguin_types)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        if remaining_plugin_types:"}],"source_content_type":"text/x-python","patch_set":12,"id":"dada55a8_c7c988ae","line":43,"range":{"start_line":43,"start_character":18,"end_line":43,"end_character":24},"in_reply_to":"dada55a8_4a08c62c","updated":"2016-07-23 02:52:18.000000000","message":"Will fix this","commit_id":"90e7fa44c2a39fe90006bd26f490a7ce071484ec"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"2c3f4d80d2e101e74495de945a23bbfbde8694a1","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        persisted_plugin_types \u003d self._db_repo.fetch_notification_method_types()"},{"line_number":43,"context_line":"        remaining_plugin_types \u003d set(configured_plugin_types) - set(persisted_plugin_types)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        if remaining_plugin_types:"},{"line_number":46,"context_line":"            log.info(\"New plugins detected: Adding new notification types {} to database\""},{"line_number":47,"context_line":"                     .format(remaining_plugin_types))"},{"line_number":48,"context_line":"            self._db_repo.insert_notification_method_types(remaining_plugin_types)"}],"source_content_type":"text/x-python","patch_set":15,"id":"dada55a8_1857e326","line":45,"updated":"2016-07-27 12:00:58.000000000","message":"I got little behind with this review.\nSo this is just a question - will this code support something similar to what was discussed some time ago - meaning to say, enabled flag in notification_method_types to also support the case that someone removes notifier after some time therefore it should be not possible to specify this particular method anymore ? or is it too complex to be handled here ?","commit_id":"30fe9811805f278518913d64a9016dbbade53989"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"6119905b76e03d800a26d2af6838a84b8e4c64db","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        persisted_plugin_types \u003d self._db_repo.fetch_notification_method_types()"},{"line_number":43,"context_line":"        remaining_plugin_types \u003d set(configured_plugin_types) - set(persisted_plugin_types)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        if remaining_plugin_types:"},{"line_number":46,"context_line":"            log.info(\"New plugins detected: Adding new notification types {} to database\""},{"line_number":47,"context_line":"                     .format(remaining_plugin_types))"},{"line_number":48,"context_line":"            self._db_repo.insert_notification_method_types(remaining_plugin_types)"}],"source_content_type":"text/x-python","patch_set":15,"id":"bacf61ea_97beced2","line":45,"in_reply_to":"bacf61ea_1c516563","updated":"2016-07-27 15:15:35.000000000","message":"You can always make sure that topic is the same for changes in multiple topics + add depends-on hint in commit message pointing at monasca-api change. That way someone has bigger chance to see that stuff need to be tested alltogether","commit_id":"30fe9811805f278518913d64a9016dbbade53989"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"15d739349b0beceb542a19fc467ec72167f09d57","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        persisted_plugin_types \u003d self._db_repo.fetch_notification_method_types()"},{"line_number":43,"context_line":"        remaining_plugin_types \u003d set(configured_plugin_types) - set(persisted_plugin_types)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        if remaining_plugin_types:"},{"line_number":46,"context_line":"            log.info(\"New plugins detected: Adding new notification types {} to database\""},{"line_number":47,"context_line":"                     .format(remaining_plugin_types))"},{"line_number":48,"context_line":"            self._db_repo.insert_notification_method_types(remaining_plugin_types)"}],"source_content_type":"text/x-python","patch_set":15,"id":"bacf61ea_1c516563","line":45,"in_reply_to":"bacf61ea_9c86f563","updated":"2016-07-27 15:08:24.000000000","message":"With the current validation in the API, where it\u0027s validating against the notification types in the DB, I think adding the enable/disable column really needs to happen now instead of waiting for later.","commit_id":"30fe9811805f278518913d64a9016dbbade53989"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"e13f412c70b546e33611ae105266661934dc7ccc","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        persisted_plugin_types \u003d self._db_repo.fetch_notification_method_types()"},{"line_number":43,"context_line":"        remaining_plugin_types \u003d set(configured_plugin_types) - set(persisted_plugin_types)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        if remaining_plugin_types:"},{"line_number":46,"context_line":"            log.info(\"New plugins detected: Adding new notification types {} to database\""},{"line_number":47,"context_line":"                     .format(remaining_plugin_types))"},{"line_number":48,"context_line":"            self._db_repo.insert_notification_method_types(remaining_plugin_types)"}],"source_content_type":"text/x-python","patch_set":15,"id":"bacf61ea_9c86f563","line":45,"in_reply_to":"dada55a8_1857e326","updated":"2016-07-27 14:56:50.000000000","message":"Enabled flag is not part of this review as it requires DB schema change.\n\nIdeally we like to have the table having notification_method_type, and enabled flag. We should be able to enable/disable notification type on the fly using REST API.\n\nSupport for enabled will be part of new review as most of the changes are part of monasa-api\n\nAlso this needs little more discussion, as whether we want to support enable/disable for notification method or notification type or both via api","commit_id":"30fe9811805f278518913d64a9016dbbade53989"}],"monasca_notification/types/hipchat_notifier.py":[{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"e596dfe25f43e8136c143dffd4846da936344a4d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# (C) Copyright 2015 Hewlett Packard Enterprise Development Company LP"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"# you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_049c4a68","line":1,"range":{"start_line":1,"start_character":16,"end_line":1,"end_character":20},"updated":"2016-06-27 22:50:36.000000000","message":"Wrong year for copyright","commit_id":"2c5c89f85f0d934e61ecc48f6437c52c3e4ab7f8"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"c2f255d4c42850a0f4fb0275883926baecb6b080","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# (C) Copyright 2015 Hewlett Packard Enterprise Development Company LP"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"# you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_ebc931ae","line":1,"range":{"start_line":1,"start_character":16,"end_line":1,"end_character":20},"updated":"2016-07-01 22:05:31.000000000","message":"Copyrights all still have the wrong year.","commit_id":"cf25869975118464bbf767dae9086351cc0ae4a2"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"e019a73314dcd151051aa64be04a5770ff85d029","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# (C) Copyright 2015 Hewlett Packard Enterprise Development Company LP"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"# you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_8b67cd24","line":1,"range":{"start_line":1,"start_character":16,"end_line":1,"end_character":20},"in_reply_to":"1aa78d24_ebc931ae","updated":"2016-07-01 23:10:34.000000000","message":"Will fix it","commit_id":"cf25869975118464bbf767dae9086351cc0ae4a2"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"406cfd2bae3d801c83126d9fd8a1845b9f5ec246","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        proxyDict \u003d {\"https\": self._config.get(\"https_proxy\", None), }"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        query_params \u003d {}"},{"line_number":69,"context_line":"        query_params[\u0027auth_token\u0027] \u003d self._config[\u0027token\u0027]"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        url_format \u003d \u0027https://{0}/v2/room/{1}/notification\u0027"},{"line_number":72,"context_line":"        url \u003d url_format.format(notification.address, self._config[\"room_id\"])"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_0b6abd1a","line":69,"range":{"start_line":69,"start_character":22,"end_line":69,"end_character":32},"updated":"2016-07-01 22:11:21.000000000","message":"Can you explain how the auth_token works?  It seems like something that would be specific to a single notification method.","commit_id":"cf25869975118464bbf767dae9086351cc0ae4a2"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"e019a73314dcd151051aa64be04a5770ff85d029","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        proxyDict \u003d {\"https\": self._config.get(\"https_proxy\", None), }"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        query_params \u003d {}"},{"line_number":69,"context_line":"        query_params[\u0027auth_token\u0027] \u003d self._config[\u0027token\u0027]"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        url_format \u003d \u0027https://{0}/v2/room/{1}/notification\u0027"},{"line_number":72,"context_line":"        url \u003d url_format.format(notification.address, self._config[\"room_id\"])"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_0e1dab0f","line":69,"range":{"start_line":69,"start_character":22,"end_line":69,"end_character":32},"in_reply_to":"1aa78d24_0b6abd1a","updated":"2016-07-01 23:10:34.000000000","message":"It is an OATH2 token. You can go to their setting page and get the token with certain capabilities.\n\ne.g http://hipchat.hpcloud.net/account -- Click ApiAccess and you can get the token","commit_id":"cf25869975118464bbf767dae9086351cc0ae4a2"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"c2f255d4c42850a0f4fb0275883926baecb6b080","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        query_params[\u0027auth_token\u0027] \u003d self._config[\u0027token\u0027]"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        url_format \u003d \u0027https://{0}/v2/room/{1}/notification\u0027"},{"line_number":72,"context_line":"        url \u003d url_format.format(notification.address, self._config[\"room_id\"])"},{"line_number":73,"context_line":"        self._log.debug(hipchat_message)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_0b1d9d0f","line":72,"range":{"start_line":72,"start_character":68,"end_line":72,"end_character":75},"updated":"2016-07-01 22:05:31.000000000","message":"This does not appear to allow for configuration of more than one room id.  I would have expected this to be part of the notification method.","commit_id":"cf25869975118464bbf767dae9086351cc0ae4a2"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"e019a73314dcd151051aa64be04a5770ff85d029","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        query_params[\u0027auth_token\u0027] \u003d self._config[\u0027token\u0027]"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        url_format \u003d \u0027https://{0}/v2/room/{1}/notification\u0027"},{"line_number":72,"context_line":"        url \u003d url_format.format(notification.address, self._config[\"room_id\"])"},{"line_number":73,"context_line":"        self._log.debug(hipchat_message)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_2ee7c713","line":72,"range":{"start_line":72,"start_character":68,"end_line":72,"end_character":75},"in_reply_to":"1aa78d24_0b1d9d0f","updated":"2016-07-01 23:10:34.000000000","message":"Yes. I think I need to move url to configuration and room_id for registering notification types with monasca_api.  So you can create many notification_types for hipchat with different room id","commit_id":"cf25869975118464bbf767dae9086351cc0ae4a2"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"c2f255d4c42850a0f4fb0275883926baecb6b080","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        url_format \u003d \u0027https://{0}/v2/room/{1}/notification\u0027"},{"line_number":72,"context_line":"        url \u003d url_format.format(notification.address, self._config[\"room_id\"])"},{"line_number":73,"context_line":"        self._log.debug(hipchat_message)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        try:"},{"line_number":76,"context_line":"            # Posting on the given URL"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_0b6f5d93","line":73,"range":{"start_line":73,"start_character":18,"end_line":73,"end_character":23},"updated":"2016-07-01 22:05:31.000000000","message":"This seems like an unnecessary debug message.","commit_id":"cf25869975118464bbf767dae9086351cc0ae4a2"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"e019a73314dcd151051aa64be04a5770ff85d029","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        url_format \u003d \u0027https://{0}/v2/room/{1}/notification\u0027"},{"line_number":72,"context_line":"        url \u003d url_format.format(notification.address, self._config[\"room_id\"])"},{"line_number":73,"context_line":"        self._log.debug(hipchat_message)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        try:"},{"line_number":76,"context_line":"            # Posting on the given URL"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_0ee48b0b","line":73,"range":{"start_line":73,"start_character":18,"end_line":73,"end_character":23},"in_reply_to":"1aa78d24_0b6f5d93","updated":"2016-07-01 23:10:34.000000000","message":"Will remove it","commit_id":"cf25869975118464bbf767dae9086351cc0ae4a2"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"c2f255d4c42850a0f4fb0275883926baecb6b080","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        try:"},{"line_number":76,"context_line":"            # Posting on the given URL"},{"line_number":77,"context_line":"            result \u003d requests.post(url\u003durl, data\u003dhipchat_message,"},{"line_number":78,"context_line":"                                   verify\u003dFalse,"},{"line_number":79,"context_line":"                                   proxies\u003dproxyDict, params\u003dquery_params,"},{"line_number":80,"context_line":"                                   timeout\u003dself._config[\u0027timeout\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_6bbee100","line":77,"range":{"start_line":77,"start_character":44,"end_line":77,"end_character":48},"updated":"2016-07-01 22:05:31.000000000","message":"I prefer the single entry per line rather than mixing single argument and multi argument lines.","commit_id":"cf25869975118464bbf767dae9086351cc0ae4a2"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"ff013d120d616a97599283624e6d910783600294","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        try:"},{"line_number":76,"context_line":"            # Posting on the given URL"},{"line_number":77,"context_line":"            result \u003d requests.post(url\u003durl, data\u003dhipchat_message,"},{"line_number":78,"context_line":"                                   verify\u003dFalse,"},{"line_number":79,"context_line":"                                   proxies\u003dproxyDict, params\u003dquery_params,"},{"line_number":80,"context_line":"                                   timeout\u003dself._config[\u0027timeout\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_9fc0a3e2","line":77,"range":{"start_line":77,"start_character":44,"end_line":77,"end_character":48},"in_reply_to":"1aa78d24_0e512b63","updated":"2016-07-02 02:03:58.000000000","message":"Done","commit_id":"cf25869975118464bbf767dae9086351cc0ae4a2"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"e019a73314dcd151051aa64be04a5770ff85d029","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        try:"},{"line_number":76,"context_line":"            # Posting on the given URL"},{"line_number":77,"context_line":"            result \u003d requests.post(url\u003durl, data\u003dhipchat_message,"},{"line_number":78,"context_line":"                                   verify\u003dFalse,"},{"line_number":79,"context_line":"                                   proxies\u003dproxyDict, params\u003dquery_params,"},{"line_number":80,"context_line":"                                   timeout\u003dself._config[\u0027timeout\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_aeb9f7ee","line":77,"range":{"start_line":77,"start_character":44,"end_line":77,"end_character":48},"in_reply_to":"1aa78d24_6bbee100","updated":"2016-07-01 23:10:34.000000000","message":"Will collapse it. Just want to stick with 79 char column limit","commit_id":"cf25869975118464bbf767dae9086351cc0ae4a2"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"86fef6b8e70376074e4b66f4cedf8b11dc00d848","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        try:"},{"line_number":76,"context_line":"            # Posting on the given URL"},{"line_number":77,"context_line":"            result \u003d requests.post(url\u003durl, data\u003dhipchat_message,"},{"line_number":78,"context_line":"                                   verify\u003dFalse,"},{"line_number":79,"context_line":"                                   proxies\u003dproxyDict, params\u003dquery_params,"},{"line_number":80,"context_line":"                                   timeout\u003dself._config[\u0027timeout\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_0e512b63","line":77,"range":{"start_line":77,"start_character":44,"end_line":77,"end_character":48},"in_reply_to":"1aa78d24_aeb9f7ee","updated":"2016-07-01 23:18:26.000000000","message":"Sorry, by single entry per line I mean a single A\u003dB piece per line.  I\u0027d prefer all of the keyword arguments be on individual lines.","commit_id":"cf25869975118464bbf767dae9086351cc0ae4a2"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"c2f255d4c42850a0f4fb0275883926baecb6b080","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                                   proxies\u003dproxyDict, params\u003dquery_params,"},{"line_number":80,"context_line":"                                   timeout\u003dself._config[\u0027timeout\u0027])"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"            self._log.debug(\"Response from the server {}\".format(result.text))"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"            if result.status_code in range(200, 300):"},{"line_number":85,"context_line":"                self._log.info(\"Notification successfully posted.\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_eb5771c8","line":82,"range":{"start_line":82,"start_character":22,"end_line":82,"end_character":27},"updated":"2016-07-01 22:05:31.000000000","message":"We seem to cover all response cases below.  Do we need the extra debug here?","commit_id":"cf25869975118464bbf767dae9086351cc0ae4a2"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"e019a73314dcd151051aa64be04a5770ff85d029","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                                   proxies\u003dproxyDict, params\u003dquery_params,"},{"line_number":80,"context_line":"                                   timeout\u003dself._config[\u0027timeout\u0027])"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"            self._log.debug(\"Response from the server {}\".format(result.text))"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"            if result.status_code in range(200, 300):"},{"line_number":85,"context_line":"                self._log.info(\"Notification successfully posted.\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_2ecea783","line":82,"range":{"start_line":82,"start_character":22,"end_line":82,"end_character":27},"in_reply_to":"1aa78d24_eb5771c8","updated":"2016-07-01 23:10:34.000000000","message":"Will remove it","commit_id":"cf25869975118464bbf767dae9086351cc0ae4a2"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"772918ae27e6a3414e996a72bccea1c45f5e2e68","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        hipchat_message \u003d self.build_hipchat_message(notification)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        proxyDict \u003d {\"https\": self._config.get(\"https_proxy\", None), }"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        query_params \u003d {}"},{"line_number":69,"context_line":"        query_params[\u0027auth_token\u0027] \u003d self._config[\u0027token\u0027]"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_883c7de3","line":66,"range":{"start_line":66,"start_character":8,"end_line":66,"end_character":17},"updated":"2016-07-05 18:20:15.000000000","message":"I still think this is the wrong way to set the proxy.  If you do have a system proxy available here will not setting an https_proxy in the config cause you to not use the system proxy settings??","commit_id":"a9e0a8a49425e6cb0f6eca3eceb0770e33febad8"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"9915f63c8201b87c74cf3115cfad2458e4573b37","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        hipchat_message \u003d self.build_hipchat_message(notification)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        proxyDict \u003d {\"https\": self._config.get(\"https_proxy\", None), }"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        query_params \u003d {}"},{"line_number":69,"context_line":"        query_params[\u0027auth_token\u0027] \u003d self._config[\u0027token\u0027]"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_93214ea2","line":66,"range":{"start_line":66,"start_character":8,"end_line":66,"end_character":17},"in_reply_to":"1aa78d24_883c7de3","updated":"2016-07-05 18:22:28.000000000","message":"Sorry forgot to remove it. I thought I did it","commit_id":"a9e0a8a49425e6cb0f6eca3eceb0770e33febad8"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"af44d5fa232a1a88c74ac5ab0fcd7fdaae287b45","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from abstract_notifier import AbstractNotifier"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"class HipChatNotifier(AbstractNotifier):"},{"line_number":23,"context_line":"    def __init__(self, log):"},{"line_number":24,"context_line":"        self._log \u003d log"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_30e00bfa","line":22,"range":{"start_line":22,"start_character":6,"end_line":22,"end_character":21},"updated":"2016-07-06 20:18:31.000000000","message":"It might be good to add some comments with the links to the HipChat docs, such as https://developer.atlassian.com/hipchat/guide/hipchat-rest-api?_ga\u003d1.112131588.1610300069.1462806243 and https://developer.atlassian.com/confdev/tutorials/posting-notifications-in-confluence.\n\nI\u0027m assuming the same applies to Slack too.","commit_id":"0788f6e25d0f724ffc14a40a3b9a9d8988722d85"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"dce5cc71533e88e05fe8fa9945e5a1dd286ace81","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from abstract_notifier import AbstractNotifier"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"class HipChatNotifier(AbstractNotifier):"},{"line_number":23,"context_line":"    def __init__(self, log):"},{"line_number":24,"context_line":"        self._log \u003d log"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_5dc0f97c","line":22,"range":{"start_line":22,"start_character":6,"end_line":22,"end_character":21},"in_reply_to":"1aa78d24_30e00bfa","updated":"2016-07-08 06:43:44.000000000","message":"Will add in next patchset","commit_id":"0788f6e25d0f724ffc14a40a3b9a9d8988722d85"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"af44d5fa232a1a88c74ac5ab0fcd7fdaae287b45","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    def statsd_name(self):"},{"line_number":36,"context_line":"        return \u0027sent_hipchat_count\u0027"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def build_hipchat_message(self, notification):"},{"line_number":39,"context_line":"        \"\"\"Builds hipchat messge body"},{"line_number":40,"context_line":"        \"\"\""},{"line_number":41,"context_line":"        body \u003d {\u0027alarm_id\u0027: notification.alarm_id,"}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_d05387e0","line":38,"range":{"start_line":38,"start_character":8,"end_line":38,"end_character":29},"updated":"2016-07-06 20:18:31.000000000","message":"Since this method is private, might be good to specify the \"_\" prefix, which is one of the conventions we try and follow.","commit_id":"0788f6e25d0f724ffc14a40a3b9a9d8988722d85"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"5140b13287de9469daa3fc1a0ecde7256050dc93","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    def statsd_name(self):"},{"line_number":36,"context_line":"        return \u0027sent_hipchat_count\u0027"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def build_hipchat_message(self, notification):"},{"line_number":39,"context_line":"        \"\"\"Builds hipchat messge body"},{"line_number":40,"context_line":"        \"\"\""},{"line_number":41,"context_line":"        body \u003d {\u0027alarm_id\u0027: notification.alarm_id,"}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_f871260d","line":38,"range":{"start_line":38,"start_character":8,"end_line":38,"end_character":29},"in_reply_to":"1aa78d24_d05387e0","updated":"2016-07-07 11:58:18.000000000","message":"+1","commit_id":"0788f6e25d0f724ffc14a40a3b9a9d8988722d85"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"dce5cc71533e88e05fe8fa9945e5a1dd286ace81","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    def statsd_name(self):"},{"line_number":36,"context_line":"        return \u0027sent_hipchat_count\u0027"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def build_hipchat_message(self, notification):"},{"line_number":39,"context_line":"        \"\"\"Builds hipchat messge body"},{"line_number":40,"context_line":"        \"\"\""},{"line_number":41,"context_line":"        body \u003d {\u0027alarm_id\u0027: notification.alarm_id,"}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_9dba6109","line":38,"range":{"start_line":38,"start_character":8,"end_line":38,"end_character":29},"in_reply_to":"1aa78d24_f871260d","updated":"2016-07-08 06:43:44.000000000","message":"Will do in next patch","commit_id":"0788f6e25d0f724ffc14a40a3b9a9d8988722d85"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"af44d5fa232a1a88c74ac5ab0fcd7fdaae287b45","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        query_params[\u0027auth_token\u0027] \u003d self._config[\u0027token\u0027]"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        # Note: notification.address is room_id"},{"line_number":70,"context_line":"        url_format \u003d \u0027https://{0}/v2/room/{1}/notification\u0027"},{"line_number":71,"context_line":"        url \u003d url_format.format(self._config[\"host\"], notification.address)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        # Default option is to do cert verification"}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_93cc696b","line":70,"range":{"start_line":70,"start_character":8,"end_line":70,"end_character":18},"updated":"2016-07-06 20:18:31.000000000","message":"See my comments in notification.yaml that would be applicable here.","commit_id":"0788f6e25d0f724ffc14a40a3b9a9d8988722d85"}],"monasca_notification/types/notifiers.py":[{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"c2f255d4c42850a0f4fb0275883926baecb6b080","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        available_plugins \u003d config[\"plugins\"]"},{"line_number":46,"context_line":"    else:"},{"line_number":47,"context_line":"        # Backward compatibility"},{"line_number":48,"context_line":"        available_plugins \u003d [\"monasca_notification.types.email_notifier:EmailNotifier\","},{"line_number":49,"context_line":"                             \"monasca_notification.types.webhook_notifier:WebhookNotifier\","},{"line_number":50,"context_line":"                             \"monasca_notification.types.pagerduty_notifier:PagerdutyNotifier\"]"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_6bc8a175","line":48,"range":{"start_line":48,"start_character":30,"end_line":48,"end_character":50},"updated":"2016-07-01 22:05:31.000000000","message":"Should the three default types that are currently inherent to the notification engine always be potentially available?  Actual availability of these plugins is already controlled by having configuration specific to that plugin in the config file.  I\u0027m not sure I see the need to specify the default ones twice.","commit_id":"cf25869975118464bbf767dae9086351cc0ae4a2"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"e019a73314dcd151051aa64be04a5770ff85d029","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        available_plugins \u003d config[\"plugins\"]"},{"line_number":46,"context_line":"    else:"},{"line_number":47,"context_line":"        # Backward compatibility"},{"line_number":48,"context_line":"        available_plugins \u003d [\"monasca_notification.types.email_notifier:EmailNotifier\","},{"line_number":49,"context_line":"                             \"monasca_notification.types.webhook_notifier:WebhookNotifier\","},{"line_number":50,"context_line":"                             \"monasca_notification.types.pagerduty_notifier:PagerdutyNotifier\"]"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_8ea51bb7","line":48,"range":{"start_line":48,"start_character":30,"end_line":48,"end_character":50},"in_reply_to":"1aa78d24_6bc8a175","updated":"2016-07-01 23:10:34.000000000","message":"I think we need this for backward compatibility. If some one deploy this new code base without updating the configuration we are in trouble. It covers that case","commit_id":"cf25869975118464bbf767dae9086351cc0ae4a2"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"ff013d120d616a97599283624e6d910783600294","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        available_plugins \u003d config[\"plugins\"]"},{"line_number":46,"context_line":"    else:"},{"line_number":47,"context_line":"        # Backward compatibility"},{"line_number":48,"context_line":"        available_plugins \u003d [\"monasca_notification.types.email_notifier:EmailNotifier\","},{"line_number":49,"context_line":"                             \"monasca_notification.types.webhook_notifier:WebhookNotifier\","},{"line_number":50,"context_line":"                             \"monasca_notification.types.pagerduty_notifier:PagerdutyNotifier\"]"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_3fb08f8b","line":48,"range":{"start_line":48,"start_character":30,"end_line":48,"end_character":50},"in_reply_to":"1aa78d24_6efc2f3f","updated":"2016-07-02 02:03:58.000000000","message":"done","commit_id":"cf25869975118464bbf767dae9086351cc0ae4a2"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"86fef6b8e70376074e4b66f4cedf8b11dc00d848","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        available_plugins \u003d config[\"plugins\"]"},{"line_number":46,"context_line":"    else:"},{"line_number":47,"context_line":"        # Backward compatibility"},{"line_number":48,"context_line":"        available_plugins \u003d [\"monasca_notification.types.email_notifier:EmailNotifier\","},{"line_number":49,"context_line":"                             \"monasca_notification.types.webhook_notifier:WebhookNotifier\","},{"line_number":50,"context_line":"                             \"monasca_notification.types.pagerduty_notifier:PagerdutyNotifier\"]"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_6efc2f3f","line":48,"range":{"start_line":48,"start_character":30,"end_line":48,"end_character":50},"in_reply_to":"1aa78d24_8ea51bb7","updated":"2016-07-01 23:18:26.000000000","message":"That\u0027s fine.  I\u0027m saying since they\u0027re a permanent part of the notification engine, unless we\u0027re planning to move them out, they should always be available.  So you would add them to where you instantiate the available_plugins list and allow the existing configuration mechanism to disable them if necessary.","commit_id":"cf25869975118464bbf767dae9086351cc0ae4a2"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"772918ae27e6a3414e996a72bccea1c45f5e2e68","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"def load_plugins(config):"},{"line_number":45,"context_line":"    if config and \"plugins\" in config:"},{"line_number":46,"context_line":"        for plugin_class in config[\"plugins\"]:"},{"line_number":47,"context_line":"            try:"},{"line_number":48,"context_line":"                possible_notifiers.append(simport.load(plugin_class)(log))"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_08c6cd47","line":45,"range":{"start_line":45,"start_character":7,"end_line":45,"end_character":13},"updated":"2016-07-05 18:20:15.000000000","message":"You\u0027re guaranteed to have a config dictionary at this point.  This could be rewritten as:\n\nfor plugin_class in config.get(\u0027plugins\u0027, []):","commit_id":"a9e0a8a49425e6cb0f6eca3eceb0770e33febad8"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"9915f63c8201b87c74cf3115cfad2458e4573b37","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"def load_plugins(config):"},{"line_number":45,"context_line":"    if config and \"plugins\" in config:"},{"line_number":46,"context_line":"        for plugin_class in config[\"plugins\"]:"},{"line_number":47,"context_line":"            try:"},{"line_number":48,"context_line":"                possible_notifiers.append(simport.load(plugin_class)(log))"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_f33092ea","line":45,"range":{"start_line":45,"start_character":7,"end_line":45,"end_character":13},"in_reply_to":"1aa78d24_08c6cd47","updated":"2016-07-05 18:22:28.000000000","message":"Yes. Will fix it","commit_id":"a9e0a8a49425e6cb0f6eca3eceb0770e33febad8"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"af44d5fa232a1a88c74ac5ab0fcd7fdaae287b45","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        try:"},{"line_number":47,"context_line":"            possible_notifiers.append(simport.load(plugin_class)(log))"},{"line_number":48,"context_line":"        except Exception:"},{"line_number":49,"context_line":"            log.warn(\"unable to load the class {} , ignoring it\".format(plugin_class))"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"def enabled_notifications():"}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_f3cded31","line":49,"range":{"start_line":49,"start_character":16,"end_line":49,"end_character":20},"updated":"2016-07-06 20:18:31.000000000","message":"I was wondering if you should make this log.error, it seems like more than a warning would be recommended.","commit_id":"0788f6e25d0f724ffc14a40a3b9a9d8988722d85"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"b443f3ef1e78664563bc9043febad39a557e7eed","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        try:"},{"line_number":47,"context_line":"            possible_notifiers.append(simport.load(plugin_class)(log))"},{"line_number":48,"context_line":"        except Exception:"},{"line_number":49,"context_line":"            log.warn(\"unable to load the class {} , ignoring it\".format(plugin_class))"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"def enabled_notifications():"}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_c0455043","line":49,"range":{"start_line":49,"start_character":16,"end_line":49,"end_character":20},"in_reply_to":"1aa78d24_189352fb","updated":"2016-07-07 13:11:29.000000000","message":"Yes, I see your point. If a plugin has been configured and it can\u0027t be loaded then there is a more serious problem and running the notification engine shouldn\u0027t be allowed. Logging the error and continuing on seems a bit lax and just waiting for problems to occur down the road.","commit_id":"0788f6e25d0f724ffc14a40a3b9a9d8988722d85"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"dce5cc71533e88e05fe8fa9945e5a1dd286ace81","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        try:"},{"line_number":47,"context_line":"            possible_notifiers.append(simport.load(plugin_class)(log))"},{"line_number":48,"context_line":"        except Exception:"},{"line_number":49,"context_line":"            log.warn(\"unable to load the class {} , ignoring it\".format(plugin_class))"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"def enabled_notifications():"}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_7dc3358b","line":49,"range":{"start_line":49,"start_character":16,"end_line":49,"end_character":20},"in_reply_to":"1aa78d24_c0455043","updated":"2016-07-08 06:43:44.000000000","message":"I will fix this","commit_id":"0788f6e25d0f724ffc14a40a3b9a9d8988722d85"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"5140b13287de9469daa3fc1a0ecde7256050dc93","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        try:"},{"line_number":47,"context_line":"            possible_notifiers.append(simport.load(plugin_class)(log))"},{"line_number":48,"context_line":"        except Exception:"},{"line_number":49,"context_line":"            log.warn(\"unable to load the class {} , ignoring it\".format(plugin_class))"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"def enabled_notifications():"}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_189352fb","line":49,"range":{"start_line":49,"start_character":16,"end_line":49,"end_character":20},"in_reply_to":"1aa78d24_f3cded31","updated":"2016-07-07 11:58:18.000000000","message":"Shouldn\u0027t it actually throw exception here.\n\nAfter all, if given plugin couldn\u0027t be loaded using it monasca-{cli,ui,api} will not make any sense. So potential unavailability of certain plugin should explicitly prevent notification from running IMHO.\n\nOtherwise user can select such type and notifications will be sent nowhere, right ?","commit_id":"0788f6e25d0f724ffc14a40a3b9a9d8988722d85"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"9b45dc687315578193691dcaaf779b186721699a","unresolved":false,"context_lines":[{"line_number":52,"context_line":"def enabled_notifications():"},{"line_number":53,"context_line":"    results \u003d []"},{"line_number":54,"context_line":"    for key in configured_notifiers:"},{"line_number":55,"context_line":"        results.append(key.upper())"},{"line_number":56,"context_line":"    return results"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"bacf61ea_13738b16","line":55,"updated":"2016-07-29 19:51:23.000000000","message":"This upper should be removed.","commit_id":"be6fb21e19f2208cb984e7d5584bbba2ee8a2b7f"}],"monasca_notification/types/slack_notifier.py":[{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"e596dfe25f43e8136c143dffd4846da936344a4d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# (C) Copyright 2015 Hewlett Packard Enterprise Development Company LP"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"# you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_642a6ee9","line":1,"range":{"start_line":1,"start_character":16,"end_line":1,"end_character":20},"updated":"2016-06-27 22:50:36.000000000","message":"Wrong year for the copyright","commit_id":"2c5c89f85f0d934e61ecc48f6437c52c3e4ab7f8"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"c2f255d4c42850a0f4fb0275883926baecb6b080","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# (C) Copyright 2015 Hewlett Packard Enterprise Development Company LP"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"# you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_6b6c219d","line":1,"range":{"start_line":1,"start_character":16,"end_line":1,"end_character":20},"updated":"2016-07-01 22:05:31.000000000","message":"See comments on the hipchat notification type.","commit_id":"cf25869975118464bbf767dae9086351cc0ae4a2"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"e019a73314dcd151051aa64be04a5770ff85d029","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# (C) Copyright 2015 Hewlett Packard Enterprise Development Company LP"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"# you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_0e92cb57","line":1,"range":{"start_line":1,"start_character":16,"end_line":1,"end_character":20},"in_reply_to":"1aa78d24_6b6c219d","updated":"2016-07-01 23:10:34.000000000","message":"Will fix it","commit_id":"cf25869975118464bbf767dae9086351cc0ae4a2"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"c2f255d4c42850a0f4fb0275883926baecb6b080","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        query_params \u003d {}"},{"line_number":67,"context_line":"        query_params[\u0027token\u0027] \u003d self._config[\u0027token\u0027]"},{"line_number":68,"context_line":"        query_params[\u0027channel\u0027] \u003d self._config[\u0027channel_name\u0027]"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        url_format \u003d \u0027https://{0}/api/chat.postMessage\u0027"},{"line_number":71,"context_line":"        url \u003d url_format.format(notification.address)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_2be7b913","line":68,"range":{"start_line":68,"start_character":48,"end_line":68,"end_character":60},"updated":"2016-07-01 22:05:31.000000000","message":"Similar to the hipchat notification type I would have thought this would be part of the notification method.","commit_id":"cf25869975118464bbf767dae9086351cc0ae4a2"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"e019a73314dcd151051aa64be04a5770ff85d029","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        query_params \u003d {}"},{"line_number":67,"context_line":"        query_params[\u0027token\u0027] \u003d self._config[\u0027token\u0027]"},{"line_number":68,"context_line":"        query_params[\u0027channel\u0027] \u003d self._config[\u0027channel_name\u0027]"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        url_format \u003d \u0027https://{0}/api/chat.postMessage\u0027"},{"line_number":71,"context_line":"        url \u003d url_format.format(notification.address)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_8e8cfb36","line":68,"range":{"start_line":68,"start_character":48,"end_line":68,"end_character":60},"in_reply_to":"1aa78d24_2be7b913","updated":"2016-07-01 23:10:34.000000000","message":"Wil fix this.  Channel name is used for creating notification types","commit_id":"cf25869975118464bbf767dae9086351cc0ae4a2"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"276eef57cc07c080eafd77eeea87601bcd68db37","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"            self._log.debug(\"Response from the server {}\".format(result.text))"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"            response \u003d json.loads(result.text)"},{"line_number":88,"context_line":"            if response.get(\u0027ok\u0027):"},{"line_number":89,"context_line":"                self._log.info(\"Notification successfully posted.\")"},{"line_number":90,"context_line":"                return True"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_2bd179fc","line":87,"range":{"start_line":87,"start_character":12,"end_line":87,"end_character":20},"updated":"2016-07-01 22:05:50.000000000","message":"In the hipchat notification you\u0027re trusting the HTTP return code to signify success.  Does the slack protocol not use that?","commit_id":"cf25869975118464bbf767dae9086351cc0ae4a2"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"e019a73314dcd151051aa64be04a5770ff85d029","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"            self._log.debug(\"Response from the server {}\".format(result.text))"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"            response \u003d json.loads(result.text)"},{"line_number":88,"context_line":"            if response.get(\u0027ok\u0027):"},{"line_number":89,"context_line":"                self._log.info(\"Notification successfully posted.\")"},{"line_number":90,"context_line":"                return True"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_ee981f6d","line":87,"range":{"start_line":87,"start_character":12,"end_line":87,"end_character":20},"in_reply_to":"1aa78d24_2bd179fc","updated":"2016-07-01 23:10:34.000000000","message":"Sorry to say this, but slack api design is crap. Even for invalid auth, they return 200 ok, but the response body has error message. So I need to parse it to find out the error","commit_id":"cf25869975118464bbf767dae9086351cc0ae4a2"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"86fef6b8e70376074e4b66f4cedf8b11dc00d848","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"            self._log.debug(\"Response from the server {}\".format(result.text))"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"            response \u003d json.loads(result.text)"},{"line_number":88,"context_line":"            if response.get(\u0027ok\u0027):"},{"line_number":89,"context_line":"                self._log.info(\"Notification successfully posted.\")"},{"line_number":90,"context_line":"                return True"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_cea3a34e","line":87,"range":{"start_line":87,"start_character":12,"end_line":87,"end_character":20},"in_reply_to":"1aa78d24_ee981f6d","updated":"2016-07-01 23:18:26.000000000","message":"Wow, that is crap.","commit_id":"cf25869975118464bbf767dae9086351cc0ae4a2"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"27781be53a477525f2890c0724e35bd8d928b748","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        slack_message \u003d self.build_slack_message(notification)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        query_params \u003d {}"},{"line_number":65,"context_line":"        query_params[\u0027token\u0027] \u003d self._config[\u0027token\u0027]"},{"line_number":66,"context_line":"        query_params[\u0027channel\u0027] \u003d notification.address"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        url_format \u003d \u0027https://{0}/api/chat.postMessage\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_9407ea80","line":65,"range":{"start_line":65,"start_character":8,"end_line":65,"end_character":20},"updated":"2016-07-07 22:05:56.000000000","message":"So, this looks like token is sent as a http query parameter and will be in the url. I think my comments on Hipchat integration then are relevant here. However, in the case of Slack, I don\u0027t see where the auth token can be provided in the http header.","commit_id":"0788f6e25d0f724ffc14a40a3b9a9d8988722d85"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"dce5cc71533e88e05fe8fa9945e5a1dd286ace81","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        slack_message \u003d self.build_slack_message(notification)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        query_params \u003d {}"},{"line_number":65,"context_line":"        query_params[\u0027token\u0027] \u003d self._config[\u0027token\u0027]"},{"line_number":66,"context_line":"        query_params[\u0027channel\u0027] \u003d notification.address"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        url_format \u003d \u0027https://{0}/api/chat.postMessage\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_fd8d652b","line":65,"range":{"start_line":65,"start_character":8,"end_line":65,"end_character":20},"in_reply_to":"1aa78d24_9407ea80","updated":"2016-07-08 06:43:44.000000000","message":"This is one way of implementing it.  If query param has some problem for some operator, they can always extend and create a new plugin which uses some other auth. Both slack/hipchat supports OAUTH2. Token is one of the grant type and it supports other grant types which requires lot of out of bound configuration.\n\nhttps://www.hipchat.com/docs/apiv2/method/generate_token\n\nOther grant types are \npersonal\nclient_credentials\npassword\nrefresh_token\nauthorization_code","commit_id":"0788f6e25d0f724ffc14a40a3b9a9d8988722d85"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"27781be53a477525f2890c0724e35bd8d928b748","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        query_params[\u0027token\u0027] \u003d self._config[\u0027token\u0027]"},{"line_number":66,"context_line":"        query_params[\u0027channel\u0027] \u003d notification.address"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        url_format \u003d \u0027https://{0}/api/chat.postMessage\u0027"},{"line_number":69,"context_line":"        url \u003d url_format.format(self._config[\u0027host\u0027])"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        # Default option is to do cert verification"}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_d48692da","line":68,"range":{"start_line":68,"start_character":8,"end_line":68,"end_character":18},"updated":"2016-07-07 22:05:56.000000000","message":"In the case of PagerDuty I don\u0027t think they have an on premise or priage deployment model. Obviously, in the case of Hipchat they do. Not sure what Slack supports.\n\nJust wondering if we the entire URL should be supplied as the address, similar to my comments on Hipchat. That would provide the most flexibilty going forward if something like private/on-premise Slack is supported.","commit_id":"0788f6e25d0f724ffc14a40a3b9a9d8988722d85"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"65389a85290c69c3a8d643b82016e83b3c33f42c","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        query_params[\u0027token\u0027] \u003d self._config[\u0027token\u0027]"},{"line_number":66,"context_line":"        query_params[\u0027channel\u0027] \u003d notification.address"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        url_format \u003d \u0027https://{0}/api/chat.postMessage\u0027"},{"line_number":69,"context_line":"        url \u003d url_format.format(self._config[\u0027host\u0027])"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        # Default option is to do cert verification"}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_d3661fec","line":68,"range":{"start_line":68,"start_character":8,"end_line":68,"end_character":18},"in_reply_to":"1aa78d24_5de3d905","updated":"2016-07-13 22:08:22.000000000","message":"I understand the usability arguments. My subjective instinct is to go with  flexibility in this case. I don\u0027t think typing in that whole URL will be that bad. It will only be done once as in a single notification method will be used over and over.","commit_id":"0788f6e25d0f724ffc14a40a3b9a9d8988722d85"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"f24787a96a66fbd772c36c3e74659399adbe152e","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        query_params[\u0027token\u0027] \u003d self._config[\u0027token\u0027]"},{"line_number":66,"context_line":"        query_params[\u0027channel\u0027] \u003d notification.address"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        url_format \u003d \u0027https://{0}/api/chat.postMessage\u0027"},{"line_number":69,"context_line":"        url \u003d url_format.format(self._config[\u0027host\u0027])"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        # Default option is to do cert verification"}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_cc2ef941","line":68,"range":{"start_line":68,"start_character":8,"end_line":68,"end_character":18},"in_reply_to":"1aa78d24_d3661fec","updated":"2016-07-14 01:55:07.000000000","message":"I will go with the suggestion of using full url","commit_id":"0788f6e25d0f724ffc14a40a3b9a9d8988722d85"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"dce5cc71533e88e05fe8fa9945e5a1dd286ace81","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        query_params[\u0027token\u0027] \u003d self._config[\u0027token\u0027]"},{"line_number":66,"context_line":"        query_params[\u0027channel\u0027] \u003d notification.address"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        url_format \u003d \u0027https://{0}/api/chat.postMessage\u0027"},{"line_number":69,"context_line":"        url \u003d url_format.format(self._config[\u0027host\u0027])"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        # Default option is to do cert verification"}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_5de3d905","line":68,"range":{"start_line":68,"start_character":8,"end_line":68,"end_character":18},"in_reply_to":"1aa78d24_d48692da","updated":"2016-07-08 06:43:44.000000000","message":"There are many ways to do it.\n   1) If we go with the option of entire url, then user need to give entire url for the address which is more error prone. Imagine user need to type http://someteam.slack.com/api/chat.postMessage?#general for each room. So I went with the simpler option where user need to give just room name.\n\n   Also IMO hipchat and slack or just one sample implementation.  Any operator can implement custom  implementation and define it as \"CompanyYHipChatNotificaitonType\".","commit_id":"0788f6e25d0f724ffc14a40a3b9a9d8988722d85"}],"notification.yaml":[{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"c2f255d4c42850a0f4fb0275883926baecb6b080","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        timeout: 5"},{"line_number":55,"context_line":"        url: \"https://events.pagerduty.com/generic/2010-04-15/create_event.json\""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    hipchat:"},{"line_number":58,"context_line":"        token: 2kjfdsdlfkj3m"},{"line_number":59,"context_line":"        room_id: 123"},{"line_number":60,"context_line":"        ca_certs: \"/etc/ssl/certs/ca-certificate.crt\""}],"source_content_type":"text/x-yaml","patch_set":4,"id":"1aa78d24_2bddf970","line":57,"range":{"start_line":57,"start_character":4,"end_line":57,"end_character":11},"updated":"2016-07-01 22:05:31.000000000","message":"Why was timeout removed from this configuration and the slack configuration?","commit_id":"cf25869975118464bbf767dae9086351cc0ae4a2"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"e019a73314dcd151051aa64be04a5770ff85d029","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        timeout: 5"},{"line_number":55,"context_line":"        url: \"https://events.pagerduty.com/generic/2010-04-15/create_event.json\""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    hipchat:"},{"line_number":58,"context_line":"        token: 2kjfdsdlfkj3m"},{"line_number":59,"context_line":"        room_id: 123"},{"line_number":60,"context_line":"        ca_certs: \"/etc/ssl/certs/ca-certificate.crt\""}],"source_content_type":"text/x-yaml","patch_set":4,"id":"1aa78d24_6ead4f88","line":57,"range":{"start_line":57,"start_character":4,"end_line":57,"end_character":11},"in_reply_to":"1aa78d24_2bddf970","updated":"2016-07-01 23:10:34.000000000","message":"I will add those things. Cut an paste error","commit_id":"cf25869975118464bbf767dae9086351cc0ae4a2"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"c2f255d4c42850a0f4fb0275883926baecb6b080","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        channel_name: \u0027#general\u0027"},{"line_number":67,"context_line":"        ca_certs: \"/etc/ssl/certs/ca-certificate.crt\""},{"line_number":68,"context_line":"        insecure: False"},{"line_number":69,"context_line":"        https_proxy: http://ourproxy.com:8080"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"processors:"},{"line_number":72,"context_line":"    alarm:"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"1aa78d24_0bdabd78","line":69,"range":{"start_line":69,"start_character":8,"end_line":69,"end_character":19},"updated":"2016-07-01 22:05:31.000000000","message":"Why define a proxy here rather than at the system level?","commit_id":"cf25869975118464bbf767dae9086351cc0ae4a2"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"e019a73314dcd151051aa64be04a5770ff85d029","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        channel_name: \u0027#general\u0027"},{"line_number":67,"context_line":"        ca_certs: \"/etc/ssl/certs/ca-certificate.crt\""},{"line_number":68,"context_line":"        insecure: False"},{"line_number":69,"context_line":"        https_proxy: http://ourproxy.com:8080"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"processors:"},{"line_number":72,"context_line":"    alarm:"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"1aa78d24_ae11f7b1","line":69,"range":{"start_line":69,"start_character":8,"end_line":69,"end_character":19},"in_reply_to":"1aa78d24_0bdabd78","updated":"2016-07-01 23:10:34.000000000","message":"This I need to investigate bit. I\u0027m still not sure about this\n\nConsider two case\n  hipchat.hpcloud.net -- internal deployment, don\u0027t need internal to reach it\n  slack.com  --  Using hipchat server\n\nIn a typical control plane, control plane doesn\u0027t need internet access, so there is no necessity to have system wide proxy.  For those case, per service proxy may make sense.\n\nI will investigate couple more cases and get back to you","commit_id":"cf25869975118464bbf767dae9086351cc0ae4a2"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"86fef6b8e70376074e4b66f4cedf8b11dc00d848","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        channel_name: \u0027#general\u0027"},{"line_number":67,"context_line":"        ca_certs: \"/etc/ssl/certs/ca-certificate.crt\""},{"line_number":68,"context_line":"        insecure: False"},{"line_number":69,"context_line":"        https_proxy: http://ourproxy.com:8080"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"processors:"},{"line_number":72,"context_line":"    alarm:"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"1aa78d24_0e864bb9","line":69,"range":{"start_line":69,"start_character":8,"end_line":69,"end_character":19},"in_reply_to":"1aa78d24_ae11f7b1","updated":"2016-07-01 23:18:26.000000000","message":"We\u0027ve been defining proxies at the init level where the notification system has needed them to reach the outside world.","commit_id":"cf25869975118464bbf767dae9086351cc0ae4a2"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"4ebee887ba0a1a3f59e3e6e81ff5460ddcb2c749","unresolved":false,"context_lines":[{"line_number":33,"context_line":"  host: 127.0.0.1"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"notification_types:"},{"line_number":36,"context_line":"    plugins:"},{"line_number":37,"context_line":"     - monasca_notification.types.hipchat_notifier:HipChatNotifier"},{"line_number":38,"context_line":"     - monasca_notification.types.slack_notifier:SlackNotifier"},{"line_number":39,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":8,"id":"1aa78d24_8b232ebe","line":36,"updated":"2016-07-14 08:22:04.000000000","message":"Couldn\u0027t it be implemented that all the notification processor are handled the same way, especially in configuration. So you write down everything here and that gives you unified approach to the topic.\n\nWhat do you think ?","commit_id":"0788f6e25d0f724ffc14a40a3b9a9d8988722d85"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"9fb3d3229c76b0ab267af981af25f222127dc74e","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    hipchat:"},{"line_number":56,"context_line":"        timeout: 5"},{"line_number":57,"context_line":"        token: 2kjfdsdlfkj3m"},{"line_number":58,"context_line":"        host: hipchat.hpcloud.net"},{"line_number":59,"context_line":"        ca_certs: \"/etc/ssl/certs/ca-certificate.crt\""},{"line_number":60,"context_line":"        insecure: False"}],"source_content_type":"text/x-yaml","patch_set":8,"id":"1aa78d24_3a9c6a5c","line":57,"range":{"start_line":57,"start_character":15,"end_line":57,"end_character":28},"updated":"2016-07-06 19:36:05.000000000","message":"Reviewing, https://developer.atlassian.com/hipchat/guide/hipchat-rest-api?_ga\u003d1.112131588.1610300069.1462806243, there are two forms for sending auth tokens in the hipchat http room notification request documented at, https://developer.atlassian.com/hipchat/guide/hipchat-rest-api?_ga\u003d1.112131588.1610300069.1462806243\n\n1. As a query parameter\n2. In the http header.\n\nThere is public HipChat and private Hipchat. There can also be multiple private Hipchat servers, similar to what we have at HPE. The Hipchat server that the user wants to use/specify should be something that the user should select. Note, in the case of PagerDuty, as far as I know, there is only public PagerDuty. The option to deploy a PagerDUty on premise is not an option.\n\nIf we allow the user to specify the full URL, rather than just the room ID for the address of the notification method, then the user would have the ability to send to any Hipchat server.\n\nI\u0027m also wondering if the address that the user specifies for the notifcation method should specify the auth token as a query parameter. In the plugin, we can parse the address/url and get the auth token, and then specify it in the http header, so we use the more secure form of sending the http request, even though the user specified the less secure form where the auth_token in the URL.\n\nIn the future we could add support for specifying http headers in the webhook, but until then, i think the proposal above would allow us more flexibility, while still getting the same level of security.","commit_id":"0788f6e25d0f724ffc14a40a3b9a9d8988722d85"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"dce5cc71533e88e05fe8fa9945e5a1dd286ace81","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    hipchat:"},{"line_number":56,"context_line":"        timeout: 5"},{"line_number":57,"context_line":"        token: 2kjfdsdlfkj3m"},{"line_number":58,"context_line":"        host: hipchat.hpcloud.net"},{"line_number":59,"context_line":"        ca_certs: \"/etc/ssl/certs/ca-certificate.crt\""},{"line_number":60,"context_line":"        insecure: False"}],"source_content_type":"text/x-yaml","patch_set":8,"id":"1aa78d24_9df8a14b","line":57,"range":{"start_line":57,"start_character":15,"end_line":57,"end_character":28},"in_reply_to":"1aa78d24_3a9c6a5c","updated":"2016-07-08 06:43:44.000000000","message":"I prefer supporting two hipchat servers by extending the plugin and creating notification type of  \"hipchat_public\" and hipchat_private\".\n\nSingle plugin supporting both public and private is more error prone \n\n1) Entering the whole url is error prone.  e.g for hipchat the url will be something like  https://hipchat.hpcloud.net/v2/rooms/\u003croom name\u003e/notificaiton?token\u003dxoxp-49170167043-49208213188-49171538499-fcefd12f84\n\nI don\u0027t think an operator will like creating a notification for each room using such a big url.  Even though tokens are valid for years ( default rule), what will happen if the token expires?  If the token is not in the url, it is just a matter of updating config and restarting monasca notification.","commit_id":"0788f6e25d0f724ffc14a40a3b9a9d8988722d85"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"f11407a775d79d5405e2fd2c00eeb798951f17ac","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    hipchat:"},{"line_number":56,"context_line":"        timeout: 5"},{"line_number":57,"context_line":"        token: 2kjfdsdlfkj3m"},{"line_number":58,"context_line":"        host: hipchat.hpcloud.net"},{"line_number":59,"context_line":"        ca_certs: \"/etc/ssl/certs/ca-certificate.crt\""},{"line_number":60,"context_line":"        insecure: False"}],"source_content_type":"text/x-yaml","patch_set":8,"id":"1aa78d24_29c4bd3e","line":57,"range":{"start_line":57,"start_character":15,"end_line":57,"end_character":28},"in_reply_to":"1aa78d24_9df8a14b","updated":"2016-07-08 13:59:39.000000000","message":"You\u0027re not necessarily supporting just two servers though.  There may be a server that the admins use but there could be N servers for N tenants.  I think you need to be able to specify N servers, with N rooms, and N tokens.","commit_id":"0788f6e25d0f724ffc14a40a3b9a9d8988722d85"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"af44d5fa232a1a88c74ac5ab0fcd7fdaae287b45","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"     slack:"},{"line_number":63,"context_line":"        timeout: 5"},{"line_number":64,"context_line":"        token: 2kjfdsdlfkj3m"},{"line_number":65,"context_line":"        host: slack.com"},{"line_number":66,"context_line":"        ca_certs: \"/etc/ssl/certs/ca-certificate.crt\""},{"line_number":67,"context_line":"        insecure: False"}],"source_content_type":"text/x-yaml","patch_set":8,"id":"1aa78d24_90b1ff49","line":64,"range":{"start_line":64,"start_character":15,"end_line":64,"end_character":28},"updated":"2016-07-06 20:18:31.000000000","message":"I\u0027m didn\u0027t review the Slack http API yet, but I think the same comments would be applicable.","commit_id":"0788f6e25d0f724ffc14a40a3b9a9d8988722d85"}]}
