)]}'
{"ceilometer/api/controllers/v2.py":[{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"2dbe36784eebb3654cc0ee4c618bcf1aa843f834","unresolved":false,"context_lines":[{"line_number":1443,"context_line":"        if not resources:"},{"line_number":1444,"context_line":"            raise EntityNotFound(_(\u0027Resource\u0027), resource_id)"},{"line_number":1445,"context_line":"        return Resource.from_db_and_links(resources[0],"},{"line_number":1446,"context_line":"                                          self._resource_links(resource_id))"},{"line_number":1447,"context_line":""},{"line_number":1448,"context_line":"    @wsme_pecan.wsexpose([Resource], [Query], int)"},{"line_number":1449,"context_line":"    def get_all(self, q\u003d[], meter_links\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F%2FPA8%3D","line":1446,"updated":"2014-03-19 08:25:56.000000000","message":"I assume there is no \u0027meter_links\u0027 option here, as it does not affect the performance significantly, when only one resource is requested. Am I right?","commit_id":"a565aad13d42932edf715a061791b997bc897cb8"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"c503c34aafec6b4938fd59e3dd1c5e7d3dba6348","unresolved":false,"context_lines":[{"line_number":1443,"context_line":"        if not resources:"},{"line_number":1444,"context_line":"            raise EntityNotFound(_(\u0027Resource\u0027), resource_id)"},{"line_number":1445,"context_line":"        return Resource.from_db_and_links(resources[0],"},{"line_number":1446,"context_line":"                                          self._resource_links(resource_id))"},{"line_number":1447,"context_line":""},{"line_number":1448,"context_line":"    @wsme_pecan.wsexpose([Resource], [Query], int)"},{"line_number":1449,"context_line":"    def get_all(self, q\u003d[], meter_links\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F%2FJnk%3D","line":1446,"in_reply_to":"AAAAWH%2F%2FMoE%3D","updated":"2014-03-19 21:56:57.000000000","message":"so i gave this a try but it seems like get_one can\u0027t take the extra param... seems like all the get_one methods are pretty generic..\n\nDoug, Ryan, you guys have any ideas if this is possible?","commit_id":"a565aad13d42932edf715a061791b997bc897cb8"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"b061f05cc75fd125200f5c435aab75a88f8692e4","unresolved":false,"context_lines":[{"line_number":1443,"context_line":"        if not resources:"},{"line_number":1444,"context_line":"            raise EntityNotFound(_(\u0027Resource\u0027), resource_id)"},{"line_number":1445,"context_line":"        return Resource.from_db_and_links(resources[0],"},{"line_number":1446,"context_line":"                                          self._resource_links(resource_id))"},{"line_number":1447,"context_line":""},{"line_number":1448,"context_line":"    @wsme_pecan.wsexpose([Resource], [Query], int)"},{"line_number":1449,"context_line":"    def get_all(self, q\u003d[], meter_links\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F%2FMoE%3D","line":1446,"in_reply_to":"AAAAWH%2F%2FNBQ%3D","updated":"2014-03-19 14:57:23.000000000","message":"In my opinion it would be better to keep this endpoint consistent, even if \u0027meter_links\u0027 here would actually not serve the \u0027better performance\u0027 goal as much as in case of get_all.","commit_id":"a565aad13d42932edf715a061791b997bc897cb8"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"d79fd268a71d0915f8d7cdfe191d8f974f7526f5","unresolved":false,"context_lines":[{"line_number":1443,"context_line":"        if not resources:"},{"line_number":1444,"context_line":"            raise EntityNotFound(_(\u0027Resource\u0027), resource_id)"},{"line_number":1445,"context_line":"        return Resource.from_db_and_links(resources[0],"},{"line_number":1446,"context_line":"                                          self._resource_links(resource_id))"},{"line_number":1447,"context_line":""},{"line_number":1448,"context_line":"    @wsme_pecan.wsexpose([Resource], [Query], int)"},{"line_number":1449,"context_line":"    def get_all(self, q\u003d[], meter_links\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F%2FNBQ%3D","line":1446,"in_reply_to":"AAAAWH%2F%2FPA8%3D","updated":"2014-03-19 13:42:55.000000000","message":"yep, i can add it if you think it\u0027s more consistent","commit_id":"a565aad13d42932edf715a061791b997bc897cb8"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"d79fd268a71d0915f8d7cdfe191d8f974f7526f5","unresolved":false,"context_lines":[{"line_number":1445,"context_line":"        return Resource.from_db_and_links(resources[0],"},{"line_number":1446,"context_line":"                                          self._resource_links(resource_id))"},{"line_number":1447,"context_line":""},{"line_number":1448,"context_line":"    @wsme_pecan.wsexpose([Resource], [Query], int)"},{"line_number":1449,"context_line":"    def get_all(self, q\u003d[], meter_links\u003dTrue):"},{"line_number":1450,"context_line":"        \"\"\"Retrieve definitions of all of the resources."},{"line_number":1451,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F%2FNBo%3D","line":1448,"updated":"2014-03-19 13:42:55.000000000","message":"Doug, if i put bool here instead of int...and i test \u0027v2/resources?meter_links\u003dFalse\u0027 it returns true...can bool not be an option here?","commit_id":"a565aad13d42932edf715a061791b997bc897cb8"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"2dbe36784eebb3654cc0ee4c618bcf1aa843f834","unresolved":false,"context_lines":[{"line_number":1449,"context_line":"    def get_all(self, q\u003d[], meter_links\u003dTrue):"},{"line_number":1450,"context_line":"        \"\"\"Retrieve definitions of all of the resources."},{"line_number":1451,"context_line":""},{"line_number":1452,"context_line":"        :param q: Filter rules for the resources to be returned."},{"line_number":1453,"context_line":"        \"\"\""},{"line_number":1454,"context_line":"        kwargs \u003d _query_to_kwargs(q, pecan.request.storage_conn.get_resources)"},{"line_number":1455,"context_line":"        resources \u003d ["}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F%2FPFw%3D","line":1452,"updated":"2014-03-19 08:25:56.000000000","message":"\u0027meter_links\u0027 is missing from doc string.","commit_id":"a565aad13d42932edf715a061791b997bc897cb8"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"d79fd268a71d0915f8d7cdfe191d8f974f7526f5","unresolved":false,"context_lines":[{"line_number":1449,"context_line":"    def get_all(self, q\u003d[], meter_links\u003dTrue):"},{"line_number":1450,"context_line":"        \"\"\"Retrieve definitions of all of the resources."},{"line_number":1451,"context_line":""},{"line_number":1452,"context_line":"        :param q: Filter rules for the resources to be returned."},{"line_number":1453,"context_line":"        \"\"\""},{"line_number":1454,"context_line":"        kwargs \u003d _query_to_kwargs(q, pecan.request.storage_conn.get_resources)"},{"line_number":1455,"context_line":"        resources \u003d ["}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F%2FNA0%3D","line":1452,"in_reply_to":"AAAAWH%2F%2FPFw%3D","updated":"2014-03-19 13:42:55.000000000","message":"will do","commit_id":"a565aad13d42932edf715a061791b997bc897cb8"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"9e6e1ea22a5813d8010853bd757445fc7dd22f22","unresolved":false,"context_lines":[{"line_number":1445,"context_line":"        return Resource.from_db_and_links(resources[0],"},{"line_number":1446,"context_line":"                                          self._resource_links(resource_id))"},{"line_number":1447,"context_line":""},{"line_number":1448,"context_line":"    @wsme_pecan.wsexpose([Resource], [Query], int)"},{"line_number":1449,"context_line":"    def get_all(self, q\u003d[], meter_links\u003dTrue):"},{"line_number":1450,"context_line":"        \"\"\"Retrieve definitions of all of the resources."},{"line_number":1451,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAWH%2F%2Bi1M%3D","line":1448,"updated":"2014-03-26 02:03:49.000000000","message":"Should we make the exposed type consistent with the meter_links? Maybe set both of them to either int or bool.","commit_id":"8f73df69f14dd36fa74ae32886c01e4533d73712"}],"ceilometer/storage/impl_sqlalchemy.py":[{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"2dbe36784eebb3654cc0ee4c618bcf1aa843f834","unresolved":false,"context_lines":[{"line_number":537,"context_line":"        if pagination:"},{"line_number":538,"context_line":"            raise NotImplementedError(_(\u0027Pagination not implemented\u0027))"},{"line_number":539,"context_line":""},{"line_number":540,"context_line":"        def _apply_filters(query):"},{"line_number":541,"context_line":"            for column, value in [(models.Sample.resource_id, resource),"},{"line_number":542,"context_line":"                                  (models.Sample.user_id, user),"},{"line_number":543,"context_line":"                                  (models.Sample.project_id, project)]:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F%2FO%2F4%3D","line":540,"updated":"2014-03-19 08:25:56.000000000","message":"This function and the other _apply_filters above is almost the same, the upper one has some additional checks, but the common parts are the same. Would it be possible to have one _apply_filters function that could be called from get_resources and get_meters too as a helper method?","commit_id":"a565aad13d42932edf715a061791b997bc897cb8"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"c503c34aafec6b4938fd59e3dd1c5e7d3dba6348","unresolved":false,"context_lines":[{"line_number":537,"context_line":"        if pagination:"},{"line_number":538,"context_line":"            raise NotImplementedError(_(\u0027Pagination not implemented\u0027))"},{"line_number":539,"context_line":""},{"line_number":540,"context_line":"        def _apply_filters(query):"},{"line_number":541,"context_line":"            for column, value in [(models.Sample.resource_id, resource),"},{"line_number":542,"context_line":"                                  (models.Sample.user_id, user),"},{"line_number":543,"context_line":"                                  (models.Sample.project_id, project)]:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F%2FJm0%3D","line":540,"in_reply_to":"AAAAWH%2F%2FNAQ%3D","updated":"2014-03-19 21:56:57.000000000","message":"just realised this is simliar to make_query_from_filter... i\u0027ve added TODOs instead to merge it all together.","commit_id":"a565aad13d42932edf715a061791b997bc897cb8"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"d79fd268a71d0915f8d7cdfe191d8f974f7526f5","unresolved":false,"context_lines":[{"line_number":537,"context_line":"        if pagination:"},{"line_number":538,"context_line":"            raise NotImplementedError(_(\u0027Pagination not implemented\u0027))"},{"line_number":539,"context_line":""},{"line_number":540,"context_line":"        def _apply_filters(query):"},{"line_number":541,"context_line":"            for column, value in [(models.Sample.resource_id, resource),"},{"line_number":542,"context_line":"                                  (models.Sample.user_id, user),"},{"line_number":543,"context_line":"                                  (models.Sample.project_id, project)]:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F%2FNAQ%3D","line":540,"in_reply_to":"AAAAWH%2F%2FO%2F4%3D","updated":"2014-03-19 13:42:55.000000000","message":"sure. i can make this common.","commit_id":"a565aad13d42932edf715a061791b997bc897cb8"}]}
