)]}'
{"ceilometer/api/controllers/v2.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"76b72b95609ef10bd1d0ba31e205cede6caade87","unresolved":false,"context_lines":[{"line_number":1480,"context_line":""},{"line_number":1481,"context_line":"        #note(sileht): workaround for"},{"line_number":1482,"context_line":"        #https://bugs.launchpad.net/wsme/+bug/1220678"},{"line_number":1483,"context_line":"        Alarm.validate(data)"},{"line_number":1484,"context_line":""},{"line_number":1485,"context_line":"        change \u003d data.as_dict(storage.models.Alarm)"},{"line_number":1486,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATH%2F%2FV8U%3D","side":"PARENT","line":1483,"updated":"2013-10-17 14:28:06.000000000","message":"is there a reason we pull this out here but kept it in AlarmController? was this just always the wrong place?","commit_id":"c0b7e4984ada7c6b72889eecf1a970f7e0ef8caf"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"079c59235ebf9bf6ff00408a0b41355d2eeccf84","unresolved":false,"context_lines":[{"line_number":1480,"context_line":""},{"line_number":1481,"context_line":"        #note(sileht): workaround for"},{"line_number":1482,"context_line":"        #https://bugs.launchpad.net/wsme/+bug/1220678"},{"line_number":1483,"context_line":"        Alarm.validate(data)"},{"line_number":1484,"context_line":""},{"line_number":1485,"context_line":"        change \u003d data.as_dict(storage.models.Alarm)"},{"line_number":1486,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATH%2F%2FU6U%3D","side":"PARENT","line":1483,"in_reply_to":"AAAATH%2F%2FV8U%3D","updated":"2013-10-17 17:30:18.000000000","message":"Done","commit_id":"c0b7e4984ada7c6b72889eecf1a970f7e0ef8caf"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"76b72b95609ef10bd1d0ba31e205cede6caade87","unresolved":false,"context_lines":[{"line_number":1067,"context_line":""},{"line_number":1068,"context_line":"    @staticmethod"},{"line_number":1069,"context_line":"    def validate(combination_rule):"},{"line_number":1070,"context_line":"        #note(sileht): wsme mandatory doesn\u0027t works as expected"},{"line_number":1071,"context_line":"        #workaround for https://bugs.launchpad.net/wsme/+bug/1227004"},{"line_number":1072,"context_line":"        if not combination_rule.alarm_ids:"},{"line_number":1073,"context_line":"            error \u003d _(\"combination_rule/alarm_ids is mandatory\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATH%2F%2FV88%3D","line":1070,"updated":"2013-10-17 14:28:06.000000000","message":"could probably pull this out too.","commit_id":"2160e16c19c184ffa615005f251b0e9d6e6320ed"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"079c59235ebf9bf6ff00408a0b41355d2eeccf84","unresolved":false,"context_lines":[{"line_number":1067,"context_line":""},{"line_number":1068,"context_line":"    @staticmethod"},{"line_number":1069,"context_line":"    def validate(combination_rule):"},{"line_number":1070,"context_line":"        #note(sileht): wsme mandatory doesn\u0027t works as expected"},{"line_number":1071,"context_line":"        #workaround for https://bugs.launchpad.net/wsme/+bug/1227004"},{"line_number":1072,"context_line":"        if not combination_rule.alarm_ids:"},{"line_number":1073,"context_line":"            error \u003d _(\"combination_rule/alarm_ids is mandatory\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATH%2F%2FU8I%3D","line":1070,"in_reply_to":"AAAATH%2F%2FV88%3D","updated":"2013-10-17 17:30:18.000000000","message":"Done","commit_id":"2160e16c19c184ffa615005f251b0e9d6e6320ed"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"6ade53f3a1e632c11e602a5a7189f70b37199b71","unresolved":false,"context_lines":[{"line_number":1176,"context_line":"            if project is None:"},{"line_number":1177,"context_line":"                # No limit, this guy\u0027s an admin."},{"line_number":1178,"context_line":"                if alarm.project_id \u003d\u003d wtypes.Unset:"},{"line_number":1179,"context_line":"                    project \u003d pecan.request.headers.get(\u0027X-Project-Id\u0027)"},{"line_number":1180,"context_line":"                else:"},{"line_number":1181,"context_line":"                    project \u003d alarm.project_id"},{"line_number":1182,"context_line":"            for id in alarm.combination_rule.alarm_ids:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATH%2F%2FWcI%3D","line":1179,"updated":"2013-10-17 12:02:50.000000000","message":"The guy is an admin and doesn\u0027t act on behalf an other user, so the project must be None here. This allow the admin to create alarm that combine the state of alarms of other projects.\n\nAnd this is what _get_auth_project does previously.","commit_id":"2160e16c19c184ffa615005f251b0e9d6e6320ed"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"079c59235ebf9bf6ff00408a0b41355d2eeccf84","unresolved":false,"context_lines":[{"line_number":1176,"context_line":"            if project is None:"},{"line_number":1177,"context_line":"                # No limit, this guy\u0027s an admin."},{"line_number":1178,"context_line":"                if alarm.project_id \u003d\u003d wtypes.Unset:"},{"line_number":1179,"context_line":"                    project \u003d pecan.request.headers.get(\u0027X-Project-Id\u0027)"},{"line_number":1180,"context_line":"                else:"},{"line_number":1181,"context_line":"                    project \u003d alarm.project_id"},{"line_number":1182,"context_line":"            for id in alarm.combination_rule.alarm_ids:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATH%2F%2FU70%3D","line":1179,"in_reply_to":"AAAATH%2F%2FWcI%3D","updated":"2013-10-17 17:30:18.000000000","message":"Done, but _get_auth_project returned Unset, not None in such a case, which is not valid…","commit_id":"2160e16c19c184ffa615005f251b0e9d6e6320ed"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"76b72b95609ef10bd1d0ba31e205cede6caade87","unresolved":false,"context_lines":[{"line_number":1189,"context_line":""},{"line_number":1190,"context_line":"        if alarm.threshold_rule and alarm.combination_rule:"},{"line_number":1191,"context_line":"            error \u003d _(\"threshold_rule and combination_rule \""},{"line_number":1192,"context_line":"                      \"cannot be set at the same time\")"},{"line_number":1193,"context_line":"            pecan.response.translatable_error \u003d error"},{"line_number":1194,"context_line":"            raise wsme.exc.ClientSideError(unicode(error))"},{"line_number":1195,"context_line":"        return alarm"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATH%2F%2FV8E%3D","line":1192,"updated":"2013-10-17 14:28:06.000000000","message":"might be out of scope of this patch but we can probably merge this error with the new one above.","commit_id":"2160e16c19c184ffa615005f251b0e9d6e6320ed"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"079c59235ebf9bf6ff00408a0b41355d2eeccf84","unresolved":false,"context_lines":[{"line_number":1189,"context_line":""},{"line_number":1190,"context_line":"        if alarm.threshold_rule and alarm.combination_rule:"},{"line_number":1191,"context_line":"            error \u003d _(\"threshold_rule and combination_rule \""},{"line_number":1192,"context_line":"                      \"cannot be set at the same time\")"},{"line_number":1193,"context_line":"            pecan.response.translatable_error \u003d error"},{"line_number":1194,"context_line":"            raise wsme.exc.ClientSideError(unicode(error))"},{"line_number":1195,"context_line":"        return alarm"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATH%2F%2FU7c%3D","line":1192,"in_reply_to":"AAAATH%2F%2FV8E%3D","updated":"2013-10-17 17:30:18.000000000","message":"Done","commit_id":"2160e16c19c184ffa615005f251b0e9d6e6320ed"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"d8393c3996f4593c5385bc6b8700832d307ceb21","unresolved":false,"context_lines":[{"line_number":1462,"context_line":"        payload[\u0027detail\u0027] \u003d scrubbed_data"},{"line_number":1463,"context_line":"        _send_notification(type, payload)"},{"line_number":1464,"context_line":""},{"line_number":1465,"context_line":"    @wsme.validate(Alarm)"},{"line_number":1466,"context_line":"    @wsme_pecan.wsexpose(Alarm, body\u003dAlarm, status_code\u003d201)"},{"line_number":1467,"context_line":"    def post(self, data):"},{"line_number":1468,"context_line":"        \"\"\"Create a new alarm.\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATH%2F%2FTjw%3D","side":"PARENT","line":1465,"updated":"2013-10-18 01:11:21.000000000","message":"why removing this while the wsme.validate(Sample) is still there for SampleController.post()?","commit_id":"c0b7e4984ada7c6b72889eecf1a970f7e0ef8caf"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"52d40770b50e21ca33b4c6cab80a2e4fae46ca27","unresolved":false,"context_lines":[{"line_number":1462,"context_line":"        payload[\u0027detail\u0027] \u003d scrubbed_data"},{"line_number":1463,"context_line":"        _send_notification(type, payload)"},{"line_number":1464,"context_line":""},{"line_number":1465,"context_line":"    @wsme.validate(Alarm)"},{"line_number":1466,"context_line":"    @wsme_pecan.wsexpose(Alarm, body\u003dAlarm, status_code\u003d201)"},{"line_number":1467,"context_line":"    def post(self, data):"},{"line_number":1468,"context_line":"        \"\"\"Create a new alarm.\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATH%2F%2FS%2BM%3D","side":"PARENT","line":1465,"in_reply_to":"AAAATH%2F%2FTjw%3D","updated":"2013-10-18 07:42:29.000000000","message":"Because wsme_pecan.wsexpose already call wsme.validate","commit_id":"c0b7e4984ada7c6b72889eecf1a970f7e0ef8caf"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"52d40770b50e21ca33b4c6cab80a2e4fae46ca27","unresolved":false,"context_lines":[{"line_number":712,"context_line":"                for e in pecan.request.storage_conn.get_samples(f, limit\u003dlimit)"},{"line_number":713,"context_line":"                ]"},{"line_number":714,"context_line":""},{"line_number":715,"context_line":"    @wsme.validate([Sample])"},{"line_number":716,"context_line":"    @wsme_pecan.wsexpose([Sample], body\u003d[Sample])"},{"line_number":717,"context_line":"    def post(self, samples):"},{"line_number":718,"context_line":"        \"\"\"Post a list of new Samples to Ceilometer."}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATH%2F%2FS98%3D","line":715,"updated":"2013-10-18 07:42:29.000000000","message":"this validate can be removed too","commit_id":"08366305c503921e45aff6aef9992ac54d970266"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"fb90ef92378c5dbfaf786714df92a68e1ea09947","unresolved":false,"context_lines":[{"line_number":712,"context_line":"                for e in pecan.request.storage_conn.get_samples(f, limit\u003dlimit)"},{"line_number":713,"context_line":"                ]"},{"line_number":714,"context_line":""},{"line_number":715,"context_line":"    @wsme.validate([Sample])"},{"line_number":716,"context_line":"    @wsme_pecan.wsexpose([Sample], body\u003d[Sample])"},{"line_number":717,"context_line":"    def post(self, samples):"},{"line_number":718,"context_line":"        \"\"\"Post a list of new Samples to Ceilometer."}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATH%2F%2FSyA%3D","line":715,"in_reply_to":"AAAATH%2F%2FS98%3D","updated":"2013-10-18 09:02:15.000000000","message":"Done","commit_id":"08366305c503921e45aff6aef9992ac54d970266"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"d8393c3996f4593c5385bc6b8700832d307ceb21","unresolved":false,"context_lines":[{"line_number":720,"context_line":"        :param samples: a list of samples within the request body."},{"line_number":721,"context_line":"        \"\"\""},{"line_number":722,"context_line":"        # Note:"},{"line_number":723,"context_line":"        #  1) the above validate decorator seems to do nothing. LP#1220678"},{"line_number":724,"context_line":""},{"line_number":725,"context_line":"        now \u003d timeutils.utcnow()"},{"line_number":726,"context_line":"        auth_project \u003d acl.get_limited_to_project(pecan.request.headers)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATH%2F%2FTkQ%3D","line":723,"updated":"2013-10-18 01:11:21.000000000","message":"Is this note still valid for WSME 0.5b6?","commit_id":"08366305c503921e45aff6aef9992ac54d970266"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"fb90ef92378c5dbfaf786714df92a68e1ea09947","unresolved":false,"context_lines":[{"line_number":720,"context_line":"        :param samples: a list of samples within the request body."},{"line_number":721,"context_line":"        \"\"\""},{"line_number":722,"context_line":"        # Note:"},{"line_number":723,"context_line":"        #  1) the above validate decorator seems to do nothing. LP#1220678"},{"line_number":724,"context_line":""},{"line_number":725,"context_line":"        now \u003d timeutils.utcnow()"},{"line_number":726,"context_line":"        auth_project \u003d acl.get_limited_to_project(pecan.request.headers)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATH%2F%2FSx8%3D","line":723,"in_reply_to":"AAAATH%2F%2FTkQ%3D","updated":"2013-10-18 09:02:15.000000000","message":"Done","commit_id":"08366305c503921e45aff6aef9992ac54d970266"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"52d40770b50e21ca33b4c6cab80a2e4fae46ca27","unresolved":false,"context_lines":[{"line_number":1002,"context_line":"    @staticmethod"},{"line_number":1003,"context_line":"    def validate(threshold_rule):"},{"line_number":1004,"context_line":"        #note(sileht): wsme default doesn\u0027t work in some case"},{"line_number":1005,"context_line":"        #workaround for https://bugs.launchpad.net/wsme/+bug/1227039"},{"line_number":1006,"context_line":"        if not threshold_rule.query:"},{"line_number":1007,"context_line":"            threshold_rule.query \u003d []"},{"line_number":1008,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATH%2F%2FS9Y%3D","line":1005,"updated":"2013-10-18 07:42:29.000000000","message":"This one is marked at fixed in wsme 0.5b6, too, but If you just want unblock gate. I\u0027m ok to do a other review for wsme workaround cleanup.","commit_id":"08366305c503921e45aff6aef9992ac54d970266"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"fb90ef92378c5dbfaf786714df92a68e1ea09947","unresolved":false,"context_lines":[{"line_number":1002,"context_line":"    @staticmethod"},{"line_number":1003,"context_line":"    def validate(threshold_rule):"},{"line_number":1004,"context_line":"        #note(sileht): wsme default doesn\u0027t work in some case"},{"line_number":1005,"context_line":"        #workaround for https://bugs.launchpad.net/wsme/+bug/1227039"},{"line_number":1006,"context_line":"        if not threshold_rule.query:"},{"line_number":1007,"context_line":"            threshold_rule.query \u003d []"},{"line_number":1008,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATH%2F%2FSx4%3D","line":1005,"in_reply_to":"AAAATH%2F%2FS9Y%3D","updated":"2013-10-18 09:02:15.000000000","message":"Yay, I\u0027m not trying to fix everything :)","commit_id":"08366305c503921e45aff6aef9992ac54d970266"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"681a3f7e655b2812158ef62a0d3698a1986e8b3a","unresolved":false,"context_lines":[{"line_number":1173,"context_line":"                if alarm.project_id \u003d\u003d wtypes.Unset:"},{"line_number":1174,"context_line":"                    project \u003d None"},{"line_number":1175,"context_line":"                else:"},{"line_number":1176,"context_line":"                    project \u003d alarm.project_id"},{"line_number":1177,"context_line":"            for id in alarm.combination_rule.alarm_ids:"},{"line_number":1178,"context_line":"                alarms \u003d list(pecan.request.storage_conn.get_alarms("},{"line_number":1179,"context_line":"                    alarm_id\u003did, project\u003dproject))"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATH%2F%2FUqE%3D","line":1176,"updated":"2013-10-17 18:43:44.000000000","message":"An other case is missing, if alarm.project_id is set to the admin project-id, the admin must have no limit, too.\n\nPerhaps that can be:\n\n   project \u003d _get_auth_project(alarm.project_id if alarm.project_id !\u003d wtypes.Unset else None)","commit_id":"08366305c503921e45aff6aef9992ac54d970266"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"69d6f44839c7c2c2686a72deb131411586b5216e","unresolved":false,"context_lines":[{"line_number":1173,"context_line":"                if alarm.project_id \u003d\u003d wtypes.Unset:"},{"line_number":1174,"context_line":"                    project \u003d None"},{"line_number":1175,"context_line":"                else:"},{"line_number":1176,"context_line":"                    project \u003d alarm.project_id"},{"line_number":1177,"context_line":"            for id in alarm.combination_rule.alarm_ids:"},{"line_number":1178,"context_line":"                alarms \u003d list(pecan.request.storage_conn.get_alarms("},{"line_number":1179,"context_line":"                    alarm_id\u003did, project\u003dproject))"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATH%2F%2FSsc%3D","line":1176,"in_reply_to":"AAAATH%2F%2FSxQ%3D","updated":"2013-10-18 09:14:15.000000000","message":"I have added the test case: https://review.openstack.org/52595","commit_id":"08366305c503921e45aff6aef9992ac54d970266"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"fb90ef92378c5dbfaf786714df92a68e1ea09947","unresolved":false,"context_lines":[{"line_number":1173,"context_line":"                if alarm.project_id \u003d\u003d wtypes.Unset:"},{"line_number":1174,"context_line":"                    project \u003d None"},{"line_number":1175,"context_line":"                else:"},{"line_number":1176,"context_line":"                    project \u003d alarm.project_id"},{"line_number":1177,"context_line":"            for id in alarm.combination_rule.alarm_ids:"},{"line_number":1178,"context_line":"                alarms \u003d list(pecan.request.storage_conn.get_alarms("},{"line_number":1179,"context_line":"                    alarm_id\u003did, project\u003dproject))"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATH%2F%2FSxQ%3D","line":1176,"in_reply_to":"AAAATH%2F%2FUqE%3D","updated":"2013-10-18 09:02:15.000000000","message":"Damn, I blame the test for not being complete then!","commit_id":"08366305c503921e45aff6aef9992ac54d970266"}]}
