)]}'
{"cloudkitty/api/v1/controllers/report.py":[{"author":{"_account_id":7923,"name":"Gauvain Pocentek","email":"gauvainpocentek@gmail.com","username":"gpocentek"},"change_message_id":"84e03435020d27b252e39784c18f6bd77460b1f8","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        tenants \u003d storage.get_tenants(begin, end)"},{"line_number":49,"context_line":"        return tenants"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    @wsme_pecan.wsexpose(report_models.ReportModelCollection,"},{"line_number":52,"context_line":"                         datetime.datetime,"},{"line_number":53,"context_line":"                         datetime.datetime,"},{"line_number":54,"context_line":"                         wtypes.text,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6eadb0_80721be4","line":51,"range":{"start_line":51,"start_character":25,"end_line":51,"end_character":61},"updated":"2016-12-13 10:54:16.000000000","message":"I\u0027m afraid this breaks the API, so this probably needs to stay unmodified.\n\nWe\u0027ve discussed this with Maxime, we believe that it would make sense to provide a new custom action. Maybe a \u0027summary\u0027 method/endpoint? Happy to discuss with on IRC/mailing list of course :)","commit_id":"2df620c6612b75ef132c47b383f7d071b1befd36"},{"author":{"_account_id":7923,"name":"Gauvain Pocentek","email":"gauvainpocentek@gmail.com","username":"gpocentek"},"change_message_id":"c8de926eae0323d3bf751ea8c9955b810cdbb193","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        tenants \u003d storage.get_tenants(begin, end)"},{"line_number":49,"context_line":"        return tenants"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    @wsme_pecan.wsexpose(report_models.ReportModelCollection,"},{"line_number":52,"context_line":"                         datetime.datetime,"},{"line_number":53,"context_line":"                         datetime.datetime,"},{"line_number":54,"context_line":"                         wtypes.text,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6eadb0_b4a9d0e1","line":51,"range":{"start_line":51,"start_character":25,"end_line":51,"end_character":61},"in_reply_to":"1a6eadb0_3ba4e0a4","updated":"2016-12-14 14:26:49.000000000","message":"Exactly what we had in maind, thanks!","commit_id":"2df620c6612b75ef132c47b383f7d071b1befd36"},{"author":{"_account_id":15917,"name":"Aaron-DH","email":"344677472@qq.com","username":"aaron"},"change_message_id":"8969fb10628fa5a65d96a2907b1fdfbf7439c179","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        tenants \u003d storage.get_tenants(begin, end)"},{"line_number":49,"context_line":"        return tenants"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    @wsme_pecan.wsexpose(report_models.ReportModelCollection,"},{"line_number":52,"context_line":"                         datetime.datetime,"},{"line_number":53,"context_line":"                         datetime.datetime,"},{"line_number":54,"context_line":"                         wtypes.text,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6eadb0_3ba4e0a4","line":51,"range":{"start_line":51,"start_character":25,"end_line":51,"end_character":61},"in_reply_to":"1a6eadb0_80721be4","updated":"2016-12-14 09:03:36.000000000","message":"hi, Gauvain Pocentek, thanks for your review.\nit\u0027s also a good idea to add a summary method/endpoint and keep the total api unchanged. i think we need to clear the difference between \u0027total\u0027 and \u0027summary\u0027,\nmaybe \u0027summary\u0027 can hold or contains all the function of \u0027total\u0027:)","commit_id":"2df620c6612b75ef132c47b383f7d071b1befd36"},{"author":{"_account_id":7923,"name":"Gauvain Pocentek","email":"gauvainpocentek@gmail.com","username":"gpocentek"},"change_message_id":"c4ac28beadd090494b7f588dabe38bbddb879a92","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        # Use keystone token information by default but make it overridable and"},{"line_number":66,"context_line":"        # enforce it by policy engine"},{"line_number":67,"context_line":"        total \u003d storage.get_total(begin, end, tenant_id, service)"},{"line_number":68,"context_line":"        return total if total else decimal.Decimal(\u00270\u0027)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    @wsme_pecan.wsexpose(report_models.SummaryModelCollection,"},{"line_number":71,"context_line":"                         datetime.datetime,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a6eadb0_878e3ace","line":68,"updated":"2016-12-16 07:41:48.000000000","message":"storage.get_total() returns a dict now, you should return its \u0027rate\u0027 attribute.","commit_id":"72260679c30b89fbe990fed3bc825109b515b85f"},{"author":{"_account_id":15917,"name":"Aaron-DH","email":"344677472@qq.com","username":"aaron"},"change_message_id":"e5cf63f38a611526b6e8a420685e0cd31d802993","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        # Use keystone token information by default but make it overridable and"},{"line_number":66,"context_line":"        # enforce it by policy engine"},{"line_number":67,"context_line":"        total \u003d storage.get_total(begin, end, tenant_id, service)"},{"line_number":68,"context_line":"        return total if total else decimal.Decimal(\u00270\u0027)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    @wsme_pecan.wsexpose(report_models.SummaryModelCollection,"},{"line_number":71,"context_line":"                         datetime.datetime,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a6eadb0_5670fc71","line":68,"in_reply_to":"1a6eadb0_878e3ace","updated":"2016-12-17 01:47:13.000000000","message":"thanks, storage.get_total() now returns a list of dict.\nin this method, we just need to get the rate value of index[0] of this list.\nbut I\u0027m curious why test cases passed:)","commit_id":"72260679c30b89fbe990fed3bc825109b515b85f"},{"author":{"_account_id":21797,"name":"Jeremy Liu","display_name":"Jeremy Liu","email":"liujiong.cc@gmail.com","username":"liujiong"},"change_message_id":"2f98e8e0416865914c263ff933934806471f44c6","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        # enforce it by policy engine"},{"line_number":80,"context_line":"        total \u003d storage.get_total(begin, end, tenant_id, service)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        # TODO(Aaron): `get_total` return a list of dict,"},{"line_number":83,"context_line":"        # Get value of rate from index[0]"},{"line_number":84,"context_line":"        total \u003d total[0].get(\u0027rate\u0027, decimal.Decimal(\u00270\u0027))"},{"line_number":85,"context_line":"        return total if total else decimal.Decimal(\u00270\u0027)"},{"line_number":86,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"ba5201f7_2c4b735a","line":83,"range":{"start_line":82,"start_character":8,"end_line":83,"end_character":41},"updated":"2017-01-06 08:05:44.000000000","message":"Is this stilll a valid `TODO` here?","commit_id":"c4cb0cd016c27643ddbb257e7954b5d63783bcd6"}],"cloudkitty/api/v1/datamodels/report.py":[{"author":{"_account_id":7923,"name":"Gauvain Pocentek","email":"gauvainpocentek@gmail.com","username":"gpocentek"},"change_message_id":"84e03435020d27b252e39784c18f6bd77460b1f8","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    \"\"\"Tenant owner of the sample.\"\"\""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    res_type \u003d wtypes.text"},{"line_number":36,"context_line":"    \"\"\"A resource list.\"\"\""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    rate \u003d wtypes.text"},{"line_number":39,"context_line":"    \"\"\"Rate\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6eadb0_d92faa9f","line":36,"range":{"start_line":36,"start_character":18,"end_line":36,"end_character":22},"updated":"2016-12-13 10:54:16.000000000","message":"This resource is not a list, could you update the docstring?","commit_id":"2df620c6612b75ef132c47b383f7d071b1befd36"},{"author":{"_account_id":7923,"name":"Gauvain Pocentek","email":"gauvainpocentek@gmail.com","username":"gpocentek"},"change_message_id":"c4ac28beadd090494b7f588dabe38bbddb879a92","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class SummaryModel(wtypes.Base):"},{"line_number":24,"context_line":"    \"\"\"Type describing a stored data frame.\"\"\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    begin \u003d datetime.datetime"},{"line_number":27,"context_line":"    \"\"\"Begin date for the sample.\"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a6eadb0_b97b2a7a","line":24,"updated":"2016-12-16 07:41:48.000000000","message":"The description should be updated.","commit_id":"72260679c30b89fbe990fed3bc825109b515b85f"},{"author":{"_account_id":15917,"name":"Aaron-DH","email":"344677472@qq.com","username":"aaron"},"change_message_id":"e5cf63f38a611526b6e8a420685e0cd31d802993","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class SummaryModel(wtypes.Base):"},{"line_number":24,"context_line":"    \"\"\"Type describing a stored data frame.\"\"\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    begin \u003d datetime.datetime"},{"line_number":27,"context_line":"    \"\"\"Begin date for the sample.\"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a6eadb0_f624a860","line":24,"in_reply_to":"1a6eadb0_b97b2a7a","updated":"2016-12-17 01:47:13.000000000","message":"Done","commit_id":"72260679c30b89fbe990fed3bc825109b515b85f"},{"author":{"_account_id":7923,"name":"Gauvain Pocentek","email":"gauvainpocentek@gmail.com","username":"gpocentek"},"change_message_id":"c4ac28beadd090494b7f588dabe38bbddb879a92","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    \"\"\"Resource type of the sample.\"\"\""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    rate \u003d wtypes.text"},{"line_number":39,"context_line":"    \"\"\"Rate\"\"\""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def __init__(self, begin\u003dNone, end\u003dNone, tenant_id\u003dNone,"},{"line_number":42,"context_line":"                 res_type\u003dNone, rate\u003dNone):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a6eadb0_59e21630","line":39,"updated":"2016-12-16 07:41:48.000000000","message":"Could you make this docstring a bit more verbose, and end it with a full stop like the other ones?","commit_id":"72260679c30b89fbe990fed3bc825109b515b85f"},{"author":{"_account_id":15917,"name":"Aaron-DH","email":"344677472@qq.com","username":"aaron"},"change_message_id":"e5cf63f38a611526b6e8a420685e0cd31d802993","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    \"\"\"Resource type of the sample.\"\"\""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    rate \u003d wtypes.text"},{"line_number":39,"context_line":"    \"\"\"Rate\"\"\""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def __init__(self, begin\u003dNone, end\u003dNone, tenant_id\u003dNone,"},{"line_number":42,"context_line":"                 res_type\u003dNone, rate\u003dNone):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a6eadb0_76197821","line":39,"in_reply_to":"1a6eadb0_59e21630","updated":"2016-12-17 01:47:13.000000000","message":"Done","commit_id":"72260679c30b89fbe990fed3bc825109b515b85f"},{"author":{"_account_id":7923,"name":"Gauvain Pocentek","email":"gauvainpocentek@gmail.com","username":"gpocentek"},"change_message_id":"c4ac28beadd090494b7f588dabe38bbddb879a92","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        return sample"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"class SummaryModelCollection(wtypes.Base):"},{"line_number":68,"context_line":"    \"\"\"A list of stored data frames.\"\"\""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    summary \u003d [SummaryModel]"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a6eadb0_799ef2b9","line":67,"updated":"2016-12-16 07:41:48.000000000","message":"(nit) I\u0027d call this class SummaryCollectionModel","commit_id":"72260679c30b89fbe990fed3bc825109b515b85f"},{"author":{"_account_id":7923,"name":"Gauvain Pocentek","email":"gauvainpocentek@gmail.com","username":"gpocentek"},"change_message_id":"c4ac28beadd090494b7f588dabe38bbddb879a92","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"class SummaryModelCollection(wtypes.Base):"},{"line_number":68,"context_line":"    \"\"\"A list of stored data frames.\"\"\""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    summary \u003d [SummaryModel]"},{"line_number":71,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a6eadb0_f9c76293","line":68,"updated":"2016-12-16 07:41:48.000000000","message":"This description should also be updated.","commit_id":"72260679c30b89fbe990fed3bc825109b515b85f"}],"cloudkitty/storage/sqlalchemy/__init__.py":[{"author":{"_account_id":7923,"name":"Gauvain Pocentek","email":"gauvainpocentek@gmail.com","username":"gpocentek"},"change_message_id":"84e03435020d27b252e39784c18f6bd77460b1f8","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        if not end:"},{"line_number":97,"context_line":"            end \u003d ck_utils.get_next_month()"},{"line_number":98,"context_line":"        if tenant_id:"},{"line_number":99,"context_line":"            querymodels.append(self.frame_model.tenant_id)"},{"line_number":100,"context_line":"        if service:"},{"line_number":101,"context_line":"            querymodels.append(self.frame_model.res_type)"},{"line_number":102,"context_line":"        if groupby:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6eadb0_940ed932","line":99,"updated":"2016-12-13 10:54:16.000000000","message":"We should add some checks regarding the tenant_id. Non-admin users should not be able to request data for other tenants.\n\nThis problem is not related to your patch, we can handle it in another commit.","commit_id":"2df620c6612b75ef132c47b383f7d071b1befd36"},{"author":{"_account_id":7923,"name":"Gauvain Pocentek","email":"gauvainpocentek@gmail.com","username":"gpocentek"},"change_message_id":"f3d722941d63dbcf9f67b5be912e915e321836de","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        if not end:"},{"line_number":97,"context_line":"            end \u003d ck_utils.get_next_month()"},{"line_number":98,"context_line":"        if tenant_id:"},{"line_number":99,"context_line":"            querymodels.append(self.frame_model.tenant_id)"},{"line_number":100,"context_line":"        if service:"},{"line_number":101,"context_line":"            querymodels.append(self.frame_model.res_type)"},{"line_number":102,"context_line":"        if groupby:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6eadb0_5deffde7","line":99,"in_reply_to":"1a6eadb0_940ed932","updated":"2016-12-13 13:52:17.000000000","message":"There\u0027s a patch already :)\n\nhttps://review.openstack.org/#/c/404680/2","commit_id":"2df620c6612b75ef132c47b383f7d071b1befd36"}],"cloudkitty/tests/gabbi/gabbits/v1_report.yaml":[{"author":{"_account_id":7923,"name":"Gauvain Pocentek","email":"gauvainpocentek@gmail.com","username":"gpocentek"},"change_message_id":"c4ac28beadd090494b7f588dabe38bbddb879a92","unresolved":false,"context_lines":[{"line_number":106,"context_line":"      end: \"2015-02-02T00:00:00\""},{"line_number":107,"context_line":"    status: 200"},{"line_number":108,"context_line":"    response_strings:"},{"line_number":109,"context_line":"      - \"0\""},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"  - name: get summary for a period of each tenant"},{"line_number":112,"context_line":"    url: /v1/report/summary"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"1a6eadb0_7908b2da","line":109,"updated":"2016-12-16 07:41:48.000000000","message":"I\u0027m not sure to understand how this test could succeed. The response is a dict with the current patch...","commit_id":"72260679c30b89fbe990fed3bc825109b515b85f"}]}
