)]}'
{"ceilometer/api/controllers/v2.py":[{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"de1116d5f06165115e346bc0b154bd26533fe28e","unresolved":false,"context_lines":[{"line_number":1394,"context_line":"        data.alarm_id \u003d str(uuid.uuid4())"},{"line_number":1395,"context_line":"        user, project \u003d acl.get_limited_to(pecan.request.headers)"},{"line_number":1396,"context_line":"        data.user_id \u003d user or data.user_id"},{"line_number":1397,"context_line":"        data.project_id \u003d project or data.project_id"},{"line_number":1398,"context_line":"        data.timestamp \u003d now"},{"line_number":1399,"context_line":"        data.state_timestamp \u003d now"},{"line_number":1400,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2FQTY%3D","line":1397,"updated":"2013-10-01 13:36:40.000000000","message":"Rather than making user and project ID mandatory, would it be more friendly and consistent to simply default to the current (admin) user/tenant if these are unset?\n\ne.g. replace lines 1396,1397 above with:\n\n    data.user_id \u003d (user or data.user_id or\n                    pecan.request.headers.get(\u0027X-User-Id\u0027))\n    data.project_id \u003d (project or data.project_id or\n                       pecan.request.headers.get(\u0027X-Project-Id\u0027))\n\nIIUC this defaulting behaviour would have occurred for non-admin users in the previous version of the patch, so might be simplest to extend this logic to the admin user also as above.\n\nOtherwise the ceilometerclient should probably be changed also with something like:\n\n  s/only settable by admin users/must be set all users, for non-admin users cannot refer to another identity/\n\nin the common_alarm_arguments.","commit_id":"9adbd3528e2176b55eecef4eb725ada9f9400a94"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"0e825aaa796811ed19049e4d32153e3adaa3f5bc","unresolved":false,"context_lines":[{"line_number":1394,"context_line":"        data.alarm_id \u003d str(uuid.uuid4())"},{"line_number":1395,"context_line":"        user, project \u003d acl.get_limited_to(pecan.request.headers)"},{"line_number":1396,"context_line":"        data.user_id \u003d user or data.user_id"},{"line_number":1397,"context_line":"        data.project_id \u003d project or data.project_id"},{"line_number":1398,"context_line":"        data.timestamp \u003d now"},{"line_number":1399,"context_line":"        data.state_timestamp \u003d now"},{"line_number":1400,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2FQQ4%3D","line":1397,"in_reply_to":"AAAAS3%2F%2FQTY%3D","updated":"2013-10-01 13:56:43.000000000","message":"Done","commit_id":"9adbd3528e2176b55eecef4eb725ada9f9400a94"}],"tests/api/v2/test_alarm_scenarios.py":[{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"b59c9d1c72eb84fae2ff178e15910a123c6c1e5e","unresolved":false,"context_lines":[{"line_number":341,"context_line":"        alarms \u003d list(self.conn.get_alarms(enabled\u003dFalse))"},{"line_number":342,"context_line":"        self.assertEqual(1, len(alarms))"},{"line_number":343,"context_line":"        self.assertEqual(alarms[0].user_id, \u0027auseridthatisnotmine\u0027)"},{"line_number":344,"context_line":"        self.assertEqual(alarms[0].project_id, \u0027aprojectidthatisnotmine\u0027)"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"    def test_put_alarm(self):"},{"line_number":347,"context_line":"        json \u003d {"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAS3%2F%2FvD4%3D","line":344,"updated":"2013-09-20 10:12:30.000000000","message":"The ThresholdRule add a additional query field for normal user for ensure statistics are done on sample that owned by the project.\n\nPerhaps, you should add a assert to check that it will not added here.","commit_id":"303b18a2ba9a242f4feccb181532348b9be73b23"},{"author":{"_account_id":7368,"name":"Thomas Maddox","email":"me@thomasem.net","username":"thomasm"},"change_message_id":"cc65acddaaf6488780da53a4bbb8ff402a3af0bf","unresolved":false,"context_lines":[{"line_number":553,"context_line":""},{"line_number":554,"context_line":"        self.put_json(\u0027/alarms/%s\u0027 % alarm_id,"},{"line_number":555,"context_line":"                      params\u003djson,"},{"line_number":556,"context_line":"                      headers\u003dheaders)"},{"line_number":557,"context_line":"        alarm \u003d list(self.conn.get_alarms(alarm_id\u003dalarm_id, enabled\u003dFalse))[0]"},{"line_number":558,"context_line":"        self.assertEqual(alarm.user_id, \u0027myuserid\u0027)"},{"line_number":559,"context_line":"        self.assertEqual(alarm.project_id, \u0027myprojectid\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FdAE%3D","line":556,"updated":"2013-09-26 13:41:32.000000000","message":"This pattern is repeated twice now. Should we abstract it to make the tests more readable by focusing on the nuances of what\u0027s being tested, rather than the trivia around it, and make it easier to add tests of this sort in the future? \u003d]","commit_id":"eb38a138acfedf1d24b046b59ed56abbfc332ff4"}]}
