)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"31c357a0f2f4dae2d73800b40a04326a67779832","unresolved":false,"context_lines":[{"line_number":24,"context_line":"********************************"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Date: Thu, 13 Aug 2015 17:43:32 +0000 (UTC)"},{"line_number":27,"context_line":"From: hpcs.mon@hp.com"},{"line_number":28,"context_line":"To: root@localhost"},{"line_number":29,"context_line":"Subject: [e32979] UNDET \"Host Status \" on DEVSTACK"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"da20952f_28242e5e","line":27,"updated":"2015-08-28 20:44:56.000000000","message":"I\u0027d really like to see an example for the ALARM state","commit_id":"55cb2ca2f0617328356fa5cb86acfb4017c5a1b6"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"97f31f19e58ba162e4c84a2418b60de8ec904561","unresolved":false,"context_lines":[{"line_number":24,"context_line":"********************************"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Date: Thu, 13 Aug 2015 17:43:32 +0000 (UTC)"},{"line_number":27,"context_line":"From: hpcs.mon@hp.com"},{"line_number":28,"context_line":"To: root@localhost"},{"line_number":29,"context_line":"Subject: [e32979] UNDET \"Host Status \" on DEVSTACK"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"da20952f_4b85dc04","line":27,"in_reply_to":"da20952f_0bdda46e","updated":"2015-08-28 21:16:31.000000000","message":"The other difference would be in the Sub Alarm string and ALARM is the most interesting one. So, I would change this one to be ALARM or add an ALARM one","commit_id":"55cb2ca2f0617328356fa5cb86acfb4017c5a1b6"},{"author":{"_account_id":12149,"name":"Dexter Fryar","email":"dexter.fryar@protonmail.com","username":"dlfryar"},"change_message_id":"5021464821fca954a1cf90790c3fc7a0f7e8da37","unresolved":false,"context_lines":[{"line_number":24,"context_line":"********************************"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Date: Thu, 13 Aug 2015 17:43:32 +0000 (UTC)"},{"line_number":27,"context_line":"From: hpcs.mon@hp.com"},{"line_number":28,"context_line":"To: root@localhost"},{"line_number":29,"context_line":"Subject: [e32979] UNDET \"Host Status \" on DEVSTACK"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"da20952f_0bdda46e","line":27,"in_reply_to":"da20952f_28242e5e","updated":"2015-08-28 21:07:38.000000000","message":"There are three examples on line 20-22 above which show OK, ALARM, and UNDETERMINED.  Is that what you were looking for, or do you also want to see the body?  The body and subject should only differ in the alarm state string.","commit_id":"55cb2ca2f0617328356fa5cb86acfb4017c5a1b6"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"31c357a0f2f4dae2d73800b40a04326a67779832","unresolved":false,"context_lines":[{"line_number":28,"context_line":"To: root@localhost"},{"line_number":29,"context_line":"Subject: [e32979] UNDET \"Host Status \" on DEVSTACK"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"[u\u0027No Data Was Present For The Sub-Alarms: Max(Host_Alive_Status) \u003e 0.0\u0027]"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"Alarm \"Host Status\" transitioned to the UNDETERMINED state at Thu Aug 13 17:43:32 2015 UTC"},{"line_number":34,"context_line":"Alarm_id: \"e32979f4-ee35-4dd9-be3c-72024d974731\""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"da20952f_4885e204","line":31,"updated":"2015-08-28 20:44:56.000000000","message":"I think this should be after the transition message and the Alarm_id","commit_id":"55cb2ca2f0617328356fa5cb86acfb4017c5a1b6"},{"author":{"_account_id":12149,"name":"Dexter Fryar","email":"dexter.fryar@protonmail.com","username":"dlfryar"},"change_message_id":"5021464821fca954a1cf90790c3fc7a0f7e8da37","unresolved":false,"context_lines":[{"line_number":28,"context_line":"To: root@localhost"},{"line_number":29,"context_line":"Subject: [e32979] UNDET \"Host Status \" on DEVSTACK"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"[u\u0027No Data Was Present For The Sub-Alarms: Max(Host_Alive_Status) \u003e 0.0\u0027]"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"Alarm \"Host Status\" transitioned to the UNDETERMINED state at Thu Aug 13 17:43:32 2015 UTC"},{"line_number":34,"context_line":"Alarm_id: \"e32979f4-ee35-4dd9-be3c-72024d974731\""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"da20952f_ebc63099","line":31,"in_reply_to":"da20952f_4885e204","updated":"2015-08-28 21:07:38.000000000","message":"I\u0027ll make that change.","commit_id":"55cb2ca2f0617328356fa5cb86acfb4017c5a1b6"}],"monasca_notification/types/email_notifier.py":[{"author":{"_account_id":11094,"name":"Tim Kuhlman","email":"timothy.kuhlman@canonical.com","username":"kuhlmant"},"change_message_id":"a22828321fed1b64ae8421192b6f82309833a511","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        msg \u003d email.mime.text.MIMEText(body)"},{"line_number":127,"context_line":"        msg[\u0027Subject\u0027] \u003d u\u0027Alarm_id \"{}\" \"{}\" transitioned to the \"{}\" state\u0027\\"},{"line_number":128,"context_line":"            .format(notification.alarm_id[:4] + \u0027...\u0027 + notification.alarm_id[-4:],"},{"line_number":129,"context_line":"                    notification.alarm_name, notification.state).encode(\"utf-8\")"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        msg[\u0027From\u0027] \u003d self._config[\u0027from_addr\u0027]"},{"line_number":132,"context_line":"        msg[\u0027To\u0027] \u003d notification.address"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_7ba014a6","line":129,"updated":"2015-07-24 15:06:00.000000000","message":"The subject of notification leading with the state and including the alarm name was the result of a fair amount of debate. The primary motivation being that alerts needed to be easily recognizable for their basic importance even on small screen such as phones. Basically in the middle of the night when you phone wakes you up with an email alert you want to know if it is some backup job recovery or critical host down.\n\nThe alarm id in the message isn\u0027t helpful for determining anything about the alarm. Having it in the body so you can filter message by it is nice but it isn\u0027t helpful in the subject.","commit_id":"f259b2888070409ccd22f014a3262f7a10da8477"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"31c357a0f2f4dae2d73800b40a04326a67779832","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        if hostlist:"},{"line_number":123,"context_line":"            # add \"for host1, host2, host3, ...\""},{"line_number":124,"context_line":"            # and truncate anything longer than 78 characters"},{"line_number":125,"context_line":"            subject \u003d (subject + \u0027 on \u0027 + \u0027, \u0027.join(set(hostlist)).upper())"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        # Get the first 4 and last 4 of the alarm_id so we can use it in the subject since the subject is limited to"},{"line_number":128,"context_line":"        # 78 characters per rfc2822 without doing and cr/lf trickery.  This will allow some sorting and filtering"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_a8327ef0","line":125,"updated":"2015-08-28 20:44:56.000000000","message":"Why upper case the hostnames? They are unlikely to be Windows systems","commit_id":"55cb2ca2f0617328356fa5cb86acfb4017c5a1b6"},{"author":{"_account_id":12149,"name":"Dexter Fryar","email":"dexter.fryar@protonmail.com","username":"dlfryar"},"change_message_id":"907c510b754090ba05016095321db337481f9c10","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        if hostlist:"},{"line_number":123,"context_line":"            # add \"for host1, host2, host3, ...\""},{"line_number":124,"context_line":"            # and truncate anything longer than 78 characters"},{"line_number":125,"context_line":"            subject \u003d (subject + \u0027 on \u0027 + \u0027, \u0027.join(set(hostlist)).upper())"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        # Get the first 4 and last 4 of the alarm_id so we can use it in the subject since the subject is limited to"},{"line_number":128,"context_line":"        # 78 characters per rfc2822 without doing and cr/lf trickery.  This will allow some sorting and filtering"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_ebfb90bf","line":125,"in_reply_to":"da20952f_a8327ef0","updated":"2015-08-28 21:10:25.000000000","message":"I only did this to make them consistent and differentiate them from the sentence.  I can leave them alone or lowercase them if that makes it more readable.","commit_id":"55cb2ca2f0617328356fa5cb86acfb4017c5a1b6"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"97f31f19e58ba162e4c84a2418b60de8ec904561","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        if hostlist:"},{"line_number":123,"context_line":"            # add \"for host1, host2, host3, ...\""},{"line_number":124,"context_line":"            # and truncate anything longer than 78 characters"},{"line_number":125,"context_line":"            subject \u003d (subject + \u0027 on \u0027 + \u0027, \u0027.join(set(hostlist)).upper())"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        # Get the first 4 and last 4 of the alarm_id so we can use it in the subject since the subject is limited to"},{"line_number":128,"context_line":"        # 78 characters per rfc2822 without doing and cr/lf trickery.  This will allow some sorting and filtering"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_2ba98890","line":125,"in_reply_to":"da20952f_ebfb90bf","updated":"2015-08-28 21:16:31.000000000","message":"lower case is my vote but I think you should get feedback from others before changing it","commit_id":"55cb2ca2f0617328356fa5cb86acfb4017c5a1b6"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"31c357a0f2f4dae2d73800b40a04326a67779832","unresolved":false,"context_lines":[{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        # Get the first 4 and last 4 of the alarm_id so we can use it in the subject since the subject is limited to"},{"line_number":128,"context_line":"        # 78 characters per rfc2822 without doing and cr/lf trickery.  This will allow some sorting and filtering"},{"line_number":129,"context_line":"        # uniqueness"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        pretty_dims \u003d json.dumps(dimlist, sort_keys\u003dTrue, indent\u003d2, separators\u003d(\u0027,\u0027, \u0027: \u0027))"},{"line_number":132,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_887bfa8b","line":129,"updated":"2015-08-28 20:44:56.000000000","message":"I don\u0027t see any code that goes with this comment","commit_id":"55cb2ca2f0617328356fa5cb86acfb4017c5a1b6"},{"author":{"_account_id":12149,"name":"Dexter Fryar","email":"dexter.fryar@protonmail.com","username":"dlfryar"},"change_message_id":"5021464821fca954a1cf90790c3fc7a0f7e8da37","unresolved":false,"context_lines":[{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        # Get the first 4 and last 4 of the alarm_id so we can use it in the subject since the subject is limited to"},{"line_number":128,"context_line":"        # 78 characters per rfc2822 without doing and cr/lf trickery.  This will allow some sorting and filtering"},{"line_number":129,"context_line":"        # uniqueness"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        pretty_dims \u003d json.dumps(dimlist, sort_keys\u003dTrue, indent\u003d2, separators\u003d(\u0027,\u0027, \u0027: \u0027))"},{"line_number":132,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_0b6844b8","line":129,"in_reply_to":"da20952f_887bfa8b","updated":"2015-08-28 21:07:38.000000000","message":"Goes above line 143.  Probably a cut and paste issue.","commit_id":"55cb2ca2f0617328356fa5cb86acfb4017c5a1b6"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"31c357a0f2f4dae2d73800b40a04326a67779832","unresolved":false,"context_lines":[{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        pretty_dims \u003d json.dumps(dimlist, sort_keys\u003dTrue, indent\u003d2, separators\u003d(\u0027,\u0027, \u0027: \u0027))"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        body \u003d u\u0027\u0027\u0027{}\\n\\nAlarm \"{}\" transitioned to the {} state at {} UTC\\nAlarm_id: \"{}\"\\n\\nAlarm dimensions:\\n{}\u0027\u0027\u0027\\"},{"line_number":134,"context_line":"            .format(notification.message,"},{"line_number":135,"context_line":"                    notification.alarm_name,"},{"line_number":136,"context_line":"                    notification.state,"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_e8971646","line":133,"updated":"2015-08-28 20:44:56.000000000","message":"Take off the double quotes around the Alarm Id","commit_id":"55cb2ca2f0617328356fa5cb86acfb4017c5a1b6"},{"author":{"_account_id":12149,"name":"Dexter Fryar","email":"dexter.fryar@protonmail.com","username":"dlfryar"},"change_message_id":"5021464821fca954a1cf90790c3fc7a0f7e8da37","unresolved":false,"context_lines":[{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        pretty_dims \u003d json.dumps(dimlist, sort_keys\u003dTrue, indent\u003d2, separators\u003d(\u0027,\u0027, \u0027: \u0027))"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        body \u003d u\u0027\u0027\u0027{}\\n\\nAlarm \"{}\" transitioned to the {} state at {} UTC\\nAlarm_id: \"{}\"\\n\\nAlarm dimensions:\\n{}\u0027\u0027\u0027\\"},{"line_number":134,"context_line":"            .format(notification.message,"},{"line_number":135,"context_line":"                    notification.alarm_name,"},{"line_number":136,"context_line":"                    notification.state,"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_ab6038d0","line":133,"in_reply_to":"da20952f_e8971646","updated":"2015-08-28 21:07:38.000000000","message":"Will do.","commit_id":"55cb2ca2f0617328356fa5cb86acfb4017c5a1b6"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"31c357a0f2f4dae2d73800b40a04326a67779832","unresolved":false,"context_lines":[{"line_number":136,"context_line":"                    notification.state,"},{"line_number":137,"context_line":"                    timestamp,"},{"line_number":138,"context_line":"                    notification.alarm_id,"},{"line_number":139,"context_line":"                    pretty_dims).encode(\"utf-8\")"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        msg \u003d email.mime.text.MIMEText(body)"},{"line_number":142,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_08c4ca8e","line":139,"updated":"2015-08-28 20:44:56.000000000","message":"Seems like the body should have the host list especially since it may have been truncated in the subject","commit_id":"55cb2ca2f0617328356fa5cb86acfb4017c5a1b6"},{"author":{"_account_id":12149,"name":"Dexter Fryar","email":"dexter.fryar@protonmail.com","username":"dlfryar"},"change_message_id":"5021464821fca954a1cf90790c3fc7a0f7e8da37","unresolved":false,"context_lines":[{"line_number":136,"context_line":"                    notification.state,"},{"line_number":137,"context_line":"                    timestamp,"},{"line_number":138,"context_line":"                    notification.alarm_id,"},{"line_number":139,"context_line":"                    pretty_dims).encode(\"utf-8\")"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        msg \u003d email.mime.text.MIMEText(body)"},{"line_number":142,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_ab8ef876","line":139,"in_reply_to":"da20952f_08c4ca8e","updated":"2015-08-28 21:07:38.000000000","message":"I can repeat the subject in the body, or just add the host names.  Although, the host names appear in the dimensions that are printed in the body.","commit_id":"55cb2ca2f0617328356fa5cb86acfb4017c5a1b6"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"97f31f19e58ba162e4c84a2418b60de8ec904561","unresolved":false,"context_lines":[{"line_number":136,"context_line":"                    notification.state,"},{"line_number":137,"context_line":"                    timestamp,"},{"line_number":138,"context_line":"                    notification.alarm_id,"},{"line_number":139,"context_line":"                    pretty_dims).encode(\"utf-8\")"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        msg \u003d email.mime.text.MIMEText(body)"},{"line_number":142,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_abd91824","line":139,"in_reply_to":"da20952f_ab8ef876","updated":"2015-08-28 21:16:31.000000000","message":"hostnames are one of the most important pieces of information which is why the old code put it in the body so I think you should make hostnames easy to see.","commit_id":"55cb2ca2f0617328356fa5cb86acfb4017c5a1b6"},{"author":{"_account_id":15799,"name":"Ben Motz","email":"ben.launchpad@ouat.co.uk","username":"bmotz"},"change_message_id":"096e8bbd84c8eb8b032ebdd2813c7074e1852ad5","unresolved":false,"context_lines":[{"line_number":141,"context_line":"            # add \"for host1, host2, host3, ...\" in the body"},{"line_number":142,"context_line":"            body \u003d (\u0027host: \u0027 + \u0027, \u0027.join(set(hostlist)).lower()).encode(\"utf-8\") + \"\\n\\n\" + body"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        msg \u003d email.mime.text.MIMEText(body)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        # Truncate anything longer than 78 characters on the subject"},{"line_number":147,"context_line":"        msg[\u0027Subject\u0027] \u003d subject[:78].encode(\"utf-8\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_90f6588d","line":144,"updated":"2015-09-01 11:13:55.000000000","message":"As the body can contain UTF-8 bytes this should pass in the charset argument\n\ni.e. this should be email.mime.text.MIMEText(body, \"plain\", \"utf-8\")","commit_id":"647743be2a4e0e48a055ce4ec88348ec8f1bd030"},{"author":{"_account_id":15799,"name":"Ben Motz","email":"ben.launchpad@ouat.co.uk","username":"bmotz"},"change_message_id":"096e8bbd84c8eb8b032ebdd2813c7074e1852ad5","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        msg \u003d email.mime.text.MIMEText(body)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        # Truncate anything longer than 78 characters on the subject"},{"line_number":147,"context_line":"        msg[\u0027Subject\u0027] \u003d subject[:78].encode(\"utf-8\")"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        msg[\u0027From\u0027] \u003d self._config[\u0027from_addr\u0027]"},{"line_number":150,"context_line":"        msg[\u0027To\u0027] \u003d notification.address"}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_150a3a8a","line":147,"updated":"2015-09-01 11:13:55.000000000","message":"I think it\u0027s not valid to have a Subject that\u0027s just a UTF-8 sequence. The subject should be ASCII, or encoded as per (I think) RFC2047.\n\nIf you just set msg[\u0027Subject\u0027] to the unicode string then the python library will handle this correctly.\n\n(And, incidentally, if the subject did include any non-ASCII characters then the current code would result in the Subject header having \u003e 78 bytes.)","commit_id":"647743be2a4e0e48a055ce4ec88348ec8f1bd030"}]}
