)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"b03089fc9a4d28435bc8cd4bee1e8df5e493b922","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The _get_collection and _get_collection_query functions are a bit"},{"line_number":10,"context_line":"messy, naming conventions and extensibility wise. This patch refactors"},{"line_number":11,"context_line":"these function in the purpose of reducing code-duplications and"},{"line_number":12,"context_line":"improving extensibility using a pre-filter function that allows"},{"line_number":13,"context_line":"custom filtering, which is currently not supported by the framework."},{"line_number":14,"context_line":"Also, a missing unregister_model_query_hook is added."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1abeadc6_0a197d21","line":11,"updated":"2014-08-23 13:05:59.000000000","message":"code-duplications -\u003e code duplication","commit_id":"54840fd4d6be43b506cc4d86a5ff458abd0fb1b9"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"70d2c865b64640798d727e19df938bf8592aa6a7","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The _get_collection and _get_collection_query functions are a bit"},{"line_number":10,"context_line":"messy, naming conventions and extensibility wise. This patch refactors"},{"line_number":11,"context_line":"these function in the purpose of reducing code-duplications and"},{"line_number":12,"context_line":"improving extensibility using a pre-filter function that allows"},{"line_number":13,"context_line":"custom filtering, which is currently not supported by the framework."},{"line_number":14,"context_line":"Also, a missing unregister_model_query_hook is added."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1abeadc6_f9c1744e","line":11,"in_reply_to":"1abeadc6_0a197d21","updated":"2014-08-24 10:58:48.000000000","message":"Done","commit_id":"54840fd4d6be43b506cc4d86a5ff458abd0fb1b9"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"22a0d8175b98e309296259d4c6025aeb1d9d84c9","unresolved":false,"context_lines":[{"line_number":9,"context_line":"The _get_collection and _get_collection_query functions are a bit"},{"line_number":10,"context_line":"messy, naming conventions and extensibility wise. This patch refactors"},{"line_number":11,"context_line":"these function in the purpose of reducing code-duplications and"},{"line_number":12,"context_line":"improving extensibility using a pre-filter function that allows"},{"line_number":13,"context_line":"custom filtering, which is currently not supported by the framework."},{"line_number":14,"context_line":"Also, a missing unregister_model_query_hook is added."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1abeadc6_c127ba10","line":12,"updated":"2014-08-21 11:33:29.000000000","message":"Well, let\u0027s say the pre-filter function was the actual reason for this patch, and then the refactor came later ;)","commit_id":"54840fd4d6be43b506cc4d86a5ff458abd0fb1b9"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"70d2c865b64640798d727e19df938bf8592aa6a7","unresolved":false,"context_lines":[{"line_number":9,"context_line":"The _get_collection and _get_collection_query functions are a bit"},{"line_number":10,"context_line":"messy, naming conventions and extensibility wise. This patch refactors"},{"line_number":11,"context_line":"these function in the purpose of reducing code-duplications and"},{"line_number":12,"context_line":"improving extensibility using a pre-filter function that allows"},{"line_number":13,"context_line":"custom filtering, which is currently not supported by the framework."},{"line_number":14,"context_line":"Also, a missing unregister_model_query_hook is added."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1abeadc6_59342849","line":12,"in_reply_to":"1abeadc6_c127ba10","updated":"2014-08-24 10:58:48.000000000","message":"Done","commit_id":"54840fd4d6be43b506cc4d86a5ff458abd0fb1b9"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"22a0d8175b98e309296259d4c6025aeb1d9d84c9","unresolved":false,"context_lines":[{"line_number":11,"context_line":"these function in the purpose of reducing code-duplications and"},{"line_number":12,"context_line":"improving extensibility using a pre-filter function that allows"},{"line_number":13,"context_line":"custom filtering, which is currently not supported by the framework."},{"line_number":14,"context_line":"Also, a missing unregister_model_query_hook is added."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"1. Naming conventions: There is a mixup in the code as to what a"},{"line_number":17,"context_line":"                       collection is and what a query is. A query"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1abeadc6_611986d6","line":14,"updated":"2014-08-21 11:33:29.000000000","message":"I think there is a reason for this. We would like to avoid that once a hook is added is removed at runtime thus potentially changing response format","commit_id":"54840fd4d6be43b506cc4d86a5ff458abd0fb1b9"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"70d2c865b64640798d727e19df938bf8592aa6a7","unresolved":false,"context_lines":[{"line_number":11,"context_line":"these function in the purpose of reducing code-duplications and"},{"line_number":12,"context_line":"improving extensibility using a pre-filter function that allows"},{"line_number":13,"context_line":"custom filtering, which is currently not supported by the framework."},{"line_number":14,"context_line":"Also, a missing unregister_model_query_hook is added."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"1. Naming conventions: There is a mixup in the code as to what a"},{"line_number":17,"context_line":"                       collection is and what a query is. A query"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1abeadc6_b9a0dc90","line":14,"in_reply_to":"1abeadc6_611986d6","updated":"2014-08-24 10:58:48.000000000","message":"once we decide if we want to remove this, I will change the commit message accordingly.","commit_id":"54840fd4d6be43b506cc4d86a5ff458abd0fb1b9"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"22a0d8175b98e309296259d4c6025aeb1d9d84c9","unresolved":false,"context_lines":[{"line_number":17,"context_line":"                       collection is and what a query is. A query"},{"line_number":18,"context_line":"                       is a proper SQL query (model.query().select()),"},{"line_number":19,"context_line":"                       and a collection is the actual result of the"},{"line_number":20,"context_line":"                       given query (my_query.all())"},{"line_number":21,"context_line":"2. Custom filtering: When retrieving all resources of a model (for"},{"line_number":22,"context_line":"                     example, all ports), one can filter by a certain"},{"line_number":23,"context_line":"                     column (for example, by a specific port name)."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1abeadc6_017532f9","line":20,"updated":"2014-08-21 11:33:29.000000000","message":"In the commit message please state what are you doing to improve this.","commit_id":"54840fd4d6be43b506cc4d86a5ff458abd0fb1b9"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"70d2c865b64640798d727e19df938bf8592aa6a7","unresolved":false,"context_lines":[{"line_number":17,"context_line":"                       collection is and what a query is. A query"},{"line_number":18,"context_line":"                       is a proper SQL query (model.query().select()),"},{"line_number":19,"context_line":"                       and a collection is the actual result of the"},{"line_number":20,"context_line":"                       given query (my_query.all())"},{"line_number":21,"context_line":"2. Custom filtering: When retrieving all resources of a model (for"},{"line_number":22,"context_line":"                     example, all ports), one can filter by a certain"},{"line_number":23,"context_line":"                     column (for example, by a specific port name)."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1abeadc6_398e8c2e","line":20,"in_reply_to":"1abeadc6_017532f9","updated":"2014-08-24 10:58:48.000000000","message":"I will once we decide (see other comment in this regard)","commit_id":"54840fd4d6be43b506cc4d86a5ff458abd0fb1b9"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"4107a0639c17d8e5836514935ac9043284634756","unresolved":false,"context_lines":[{"line_number":17,"context_line":"                       collection is and what a query is. A query"},{"line_number":18,"context_line":"                       is a proper SQL query (model.query().select()),"},{"line_number":19,"context_line":"                       and a collection is the actual result of the"},{"line_number":20,"context_line":"                       given query (my_query.all())"},{"line_number":21,"context_line":"2. Custom filtering: When retrieving all resources of a model (for"},{"line_number":22,"context_line":"                     example, all ports), one can filter by a certain"},{"line_number":23,"context_line":"                     column (for example, by a specific port name)."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa98f980_5c098294","line":20,"in_reply_to":"1abeadc6_398e8c2e","updated":"2014-08-31 13:53:43.000000000","message":"Done","commit_id":"54840fd4d6be43b506cc4d86a5ff458abd0fb1b9"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"b03089fc9a4d28435bc8cd4bee1e8df5e493b922","unresolved":false,"context_lines":[{"line_number":30,"context_line":"                     inserted prior the normal filtering. The"},{"line_number":31,"context_line":"                     pre-filter callback feature eliminates the need"},{"line_number":32,"context_line":"                     for such code duplication, by using a"},{"line_number":33,"context_line":"                     straight-forward implementation."},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"Change-Id: Ib1b56984ee1bb1f1f9fc0f141ad7b65cd3e500c2"},{"line_number":36,"context_line":"Closes-bug: #1350852"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1abeadc6_2a1479e7","line":33,"updated":"2014-08-23 13:05:59.000000000","message":"straight-forward -\u003e straightforward","commit_id":"54840fd4d6be43b506cc4d86a5ff458abd0fb1b9"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"70d2c865b64640798d727e19df938bf8592aa6a7","unresolved":false,"context_lines":[{"line_number":30,"context_line":"                     inserted prior the normal filtering. The"},{"line_number":31,"context_line":"                     pre-filter callback feature eliminates the need"},{"line_number":32,"context_line":"                     for such code duplication, by using a"},{"line_number":33,"context_line":"                     straight-forward implementation."},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"Change-Id: Ib1b56984ee1bb1f1f9fc0f141ad7b65cd3e500c2"},{"line_number":36,"context_line":"Closes-bug: #1350852"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1abeadc6_198b901f","line":33,"in_reply_to":"1abeadc6_2a1479e7","updated":"2014-08-24 10:58:48.000000000","message":"Done","commit_id":"54840fd4d6be43b506cc4d86a5ff458abd0fb1b9"}],"neutron/db/common_db_mixin.py":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"22a0d8175b98e309296259d4c6025aeb1d9d84c9","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                             \u0027result_filters\u0027: result_filters}"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @classmethod"},{"line_number":64,"context_line":"    def unregister_model_query_hook(cls, model, name):"},{"line_number":65,"context_line":"        \"\"\"Unregisters a hook."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        Returns the hook that was removed, or return None if it was not found."}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_5024515f","line":64,"updated":"2014-08-21 11:33:29.000000000","message":"I am not sure we need a call to unregister a hook.\nHowever, it\u0027s not doing any harm I think","commit_id":"54840fd4d6be43b506cc4d86a5ff458abd0fb1b9"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"70d2c865b64640798d727e19df938bf8592aa6a7","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                             \u0027result_filters\u0027: result_filters}"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @classmethod"},{"line_number":64,"context_line":"    def unregister_model_query_hook(cls, model, name):"},{"line_number":65,"context_line":"        \"\"\"Unregisters a hook."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        Returns the hook that was removed, or return None if it was not found."}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_b9e45c0d","line":64,"in_reply_to":"1abeadc6_5024515f","updated":"2014-08-24 10:58:48.000000000","message":"If we decide to remove this function (and the associated documentation at L29) in a later revision, it will be easy enough - so I\u0027ll keep this here for now.","commit_id":"54840fd4d6be43b506cc4d86a5ff458abd0fb1b9"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"4107a0639c17d8e5836514935ac9043284634756","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                             \u0027result_filters\u0027: result_filters}"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @classmethod"},{"line_number":64,"context_line":"    def unregister_model_query_hook(cls, model, name):"},{"line_number":65,"context_line":"        \"\"\"Unregisters a hook."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        Returns the hook that was removed, or return None if it was not found."}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_f94888ce","line":64,"in_reply_to":"1abeadc6_b9e45c0d","updated":"2014-08-31 13:53:43.000000000","message":"The function is needed - see https://github.com/openstack/neutron/blob/master/neutron/tests/unit/metaplugin/test_metaplugin.py#L65 for example.\nI reverted this issue in this patch because I\u0027m handling this in another change request (#117142)","commit_id":"54840fd4d6be43b506cc4d86a5ff458abd0fb1b9"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"22a0d8175b98e309296259d4c6025aeb1d9d84c9","unresolved":false,"context_lines":[{"line_number":170,"context_line":"            sorts \u003d [(s[0], not s[1]) for s in sorts]"},{"line_number":171,"context_line":"        query \u003d sqlalchemyutils.paginate_query(query, model, limit,"},{"line_number":172,"context_line":"                                               sorts, marker_obj)"},{"line_number":173,"context_line":"        return query"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    def _get_collection_query(self, context, model,"},{"line_number":176,"context_line":"                              filters\u003dNone, pre_filter_callback\u003dNone,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_3067d54e","line":173,"updated":"2014-08-21 11:33:29.000000000","message":"in the spirit of refactoring perhaps you can merge the stmts at linest 171 and 173 and just return paginate_query results","commit_id":"54840fd4d6be43b506cc4d86a5ff458abd0fb1b9"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"70d2c865b64640798d727e19df938bf8592aa6a7","unresolved":false,"context_lines":[{"line_number":170,"context_line":"            sorts \u003d [(s[0], not s[1]) for s in sorts]"},{"line_number":171,"context_line":"        query \u003d sqlalchemyutils.paginate_query(query, model, limit,"},{"line_number":172,"context_line":"                                               sorts, marker_obj)"},{"line_number":173,"context_line":"        return query"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    def _get_collection_query(self, context, model,"},{"line_number":176,"context_line":"                              filters\u003dNone, pre_filter_callback\u003dNone,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_42d9de20","line":173,"in_reply_to":"1abeadc6_3067d54e","updated":"2014-08-24 10:58:48.000000000","message":"Done","commit_id":"54840fd4d6be43b506cc4d86a5ff458abd0fb1b9"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"22a0d8175b98e309296259d4c6025aeb1d9d84c9","unresolved":false,"context_lines":[{"line_number":183,"context_line":""},{"line_number":184,"context_line":"        # pre_filter_callback is a function which returns a query and has the"},{"line_number":185,"context_line":"        # following prototype: def callback(context, query, filters)"},{"line_number":186,"context_line":"        if filters and pre_filter_callback:"},{"line_number":187,"context_line":"            query \u003d pre_filter_callback(context, query, filters)"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        query \u003d self._apply_filters_to_query(query, model, filters)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_f3172743","line":186,"updated":"2014-08-21 11:33:29.000000000","message":"how a pre filter callback differs from a model hook?\nI think you\u0027ve tried to use model hooks but they did not work for you. Is that because you need the current filters as well?\n\nIn that case I would consider adapting model hooks to support that.\nI think there should be only one way of inserting \"hooks\" in the way queries are built.\nIf model hooks are not flexible enough or turn out to require to much \"black magic\" then I would rather get rid of them and follow an approach similar to the filter callback.\n\nSummarizing, the gist of my concern here is that we should have only one way of doing thing. If we allow model query extension get both through the model hook and the prefilter callback, it\u0027s going to be confusing and will eventually cause maintainability problems","commit_id":"54840fd4d6be43b506cc4d86a5ff458abd0fb1b9"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"22a0d8175b98e309296259d4c6025aeb1d9d84c9","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        # pre_filter_callback is a function which returns a query and has the"},{"line_number":185,"context_line":"        # following prototype: def callback(context, query, filters)"},{"line_number":186,"context_line":"        if filters and pre_filter_callback:"},{"line_number":187,"context_line":"            query \u003d pre_filter_callback(context, query, filters)"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        query \u003d self._apply_filters_to_query(query, model, filters)"},{"line_number":190,"context_line":"        query \u003d self._sort_and_paginate_query(query, model,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_70d4edbc","line":187,"updated":"2014-08-21 11:33:29.000000000","message":"I reckon it is a reasonable use case to use pre_filter_callback even without filters.","commit_id":"54840fd4d6be43b506cc4d86a5ff458abd0fb1b9"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"70d2c865b64640798d727e19df938bf8592aa6a7","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        # pre_filter_callback is a function which returns a query and has the"},{"line_number":185,"context_line":"        # following prototype: def callback(context, query, filters)"},{"line_number":186,"context_line":"        if filters and pre_filter_callback:"},{"line_number":187,"context_line":"            query \u003d pre_filter_callback(context, query, filters)"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        query \u003d self._apply_filters_to_query(query, model, filters)"},{"line_number":190,"context_line":"        query \u003d self._sort_and_paginate_query(query, model,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_1c94ab41","line":187,"in_reply_to":"1abeadc6_70d4edbc","updated":"2014-08-24 10:58:48.000000000","message":"I think that if one wants to use pre_filter_callback with no filters, one should use the hook query (ie. model_hook[name][\u0027query\u0027])","commit_id":"54840fd4d6be43b506cc4d86a5ff458abd0fb1b9"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"22a0d8175b98e309296259d4c6025aeb1d9d84c9","unresolved":false,"context_lines":[{"line_number":210,"context_line":"                                           limit\u003dlimit,"},{"line_number":211,"context_line":"                                           marker_obj\u003dmarker_obj,"},{"line_number":212,"context_line":"                                           page_reverse\u003dpage_reverse)"},{"line_number":213,"context_line":"        return self._convert_collection_to_list(query, dict_func, fields,"},{"line_number":214,"context_line":"                                                limit, page_reverse)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def _get_collection_count(self, context, model,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_108ad91a","line":213,"updated":"2014-08-21 11:33:29.000000000","message":"You stated that you wanted to make naming better, but I find the above rather confusing - isn\u0027t a collection a list? What you\u0027re doing here is building a collection (in this case a list) from the query\u0027s generator. \n\nPerhaps build_collection_from_query is a more suitable name.","commit_id":"54840fd4d6be43b506cc4d86a5ff458abd0fb1b9"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"70d2c865b64640798d727e19df938bf8592aa6a7","unresolved":false,"context_lines":[{"line_number":210,"context_line":"                                           limit\u003dlimit,"},{"line_number":211,"context_line":"                                           marker_obj\u003dmarker_obj,"},{"line_number":212,"context_line":"                                           page_reverse\u003dpage_reverse)"},{"line_number":213,"context_line":"        return self._convert_collection_to_list(query, dict_func, fields,"},{"line_number":214,"context_line":"                                                limit, page_reverse)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def _get_collection_count(self, context, model,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_dc85d307","line":213,"in_reply_to":"1abeadc6_108ad91a","updated":"2014-08-24 10:58:48.000000000","message":"I agree that the naming conventions are still problematic. I will change the code like so:\n\n _get_collection_query -\u003e _get_query\n _get_collection -\u003e _get_query_result\n\nThis will create a status que where variables named \u0027query\u0027 are actual sqlalchemy query objects (SELECT, JOIN...), and variables named \u0027query_results\u0027 (was \u0027collection\u0027) holds the... query results.\n\nWhat do you think?","commit_id":"54840fd4d6be43b506cc4d86a5ff458abd0fb1b9"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"4107a0639c17d8e5836514935ac9043284634756","unresolved":false,"context_lines":[{"line_number":210,"context_line":"                                           limit\u003dlimit,"},{"line_number":211,"context_line":"                                           marker_obj\u003dmarker_obj,"},{"line_number":212,"context_line":"                                           page_reverse\u003dpage_reverse)"},{"line_number":213,"context_line":"        return self._convert_collection_to_list(query, dict_func, fields,"},{"line_number":214,"context_line":"                                                limit, page_reverse)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def _get_collection_count(self, context, model,"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_7cfe466d","line":213,"in_reply_to":"1abeadc6_dc85d307","updated":"2014-08-31 13:53:43.000000000","message":"Considering silence as agreement","commit_id":"54840fd4d6be43b506cc4d86a5ff458abd0fb1b9"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"22a0d8175b98e309296259d4c6025aeb1d9d84c9","unresolved":false,"context_lines":[{"line_number":217,"context_line":"                              filters\u003dNone, pre_filter_callback\u003dNone):"},{"line_number":218,"context_line":"        query \u003d self._get_collection_query(context, model,"},{"line_number":219,"context_line":"                                           filters, pre_filter_callback)"},{"line_number":220,"context_line":"        return query.count()"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"    def _get_marker_obj(self, context, resource, limit, marker):"},{"line_number":223,"context_line":"        if limit and marker:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_50429168","line":220,"updated":"2014-08-21 11:33:29.000000000","message":"consider merging these two lines as well","commit_id":"54840fd4d6be43b506cc4d86a5ff458abd0fb1b9"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"4107a0639c17d8e5836514935ac9043284634756","unresolved":false,"context_lines":[{"line_number":217,"context_line":"                              filters\u003dNone, pre_filter_callback\u003dNone):"},{"line_number":218,"context_line":"        query \u003d self._get_collection_query(context, model,"},{"line_number":219,"context_line":"                                           filters, pre_filter_callback)"},{"line_number":220,"context_line":"        return query.count()"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"    def _get_marker_obj(self, context, resource, limit, marker):"},{"line_number":223,"context_line":"        if limit and marker:"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_5cd50242","line":220,"in_reply_to":"1abeadc6_22d062f5","updated":"2014-08-31 13:53:43.000000000","message":"Changed my mind :) Done.","commit_id":"54840fd4d6be43b506cc4d86a5ff458abd0fb1b9"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"70d2c865b64640798d727e19df938bf8592aa6a7","unresolved":false,"context_lines":[{"line_number":217,"context_line":"                              filters\u003dNone, pre_filter_callback\u003dNone):"},{"line_number":218,"context_line":"        query \u003d self._get_collection_query(context, model,"},{"line_number":219,"context_line":"                                           filters, pre_filter_callback)"},{"line_number":220,"context_line":"        return query.count()"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"    def _get_marker_obj(self, context, resource, limit, marker):"},{"line_number":223,"context_line":"        if limit and marker:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_22d062f5","line":220,"in_reply_to":"1abeadc6_50429168","updated":"2014-08-24 10:58:48.000000000","message":"In this case I disagree since there are actually 2 different function calls here, so I\u0027d like to keep them separated...\nAny objections?","commit_id":"54840fd4d6be43b506cc4d86a5ff458abd0fb1b9"}],"neutron/plugins/metaplugin/meta_neutron_plugin.py":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"22a0d8175b98e309296259d4c6025aeb1d9d84c9","unresolved":false,"context_lines":[{"line_number":394,"context_line":"        collection \u003d self._model_query(context, l3_db.Router)"},{"line_number":395,"context_line":"        r_model \u003d meta_models_v2.RouterFlavor"},{"line_number":396,"context_line":"        collection \u003d collection.join(r_model,"},{"line_number":397,"context_line":"                                     l3_db.Router.id \u003d\u003d r_model.router_id)"},{"line_number":398,"context_line":"        if filters:"},{"line_number":399,"context_line":"            for key, value in filters.iteritems():"},{"line_number":400,"context_line":"                if key \u003d\u003d ext_flavor.FLAVOR_ROUTER:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_f070fd41","side":"PARENT","line":397,"updated":"2014-08-21 11:33:29.000000000","message":"Ah I see now why you made the statement about incorrect use of the term collection","commit_id":"738472643c4fade3504b4fa55b300d1c145432d5"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"70d2c865b64640798d727e19df938bf8592aa6a7","unresolved":false,"context_lines":[{"line_number":394,"context_line":"        collection \u003d self._model_query(context, l3_db.Router)"},{"line_number":395,"context_line":"        r_model \u003d meta_models_v2.RouterFlavor"},{"line_number":396,"context_line":"        collection \u003d collection.join(r_model,"},{"line_number":397,"context_line":"                                     l3_db.Router.id \u003d\u003d r_model.router_id)"},{"line_number":398,"context_line":"        if filters:"},{"line_number":399,"context_line":"            for key, value in filters.iteritems():"},{"line_number":400,"context_line":"                if key \u003d\u003d ext_flavor.FLAVOR_ROUTER:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_d9ef58e7","side":"PARENT","line":397,"in_reply_to":"1abeadc6_f070fd41","updated":"2014-08-24 10:58:48.000000000","message":":)","commit_id":"738472643c4fade3504b4fa55b300d1c145432d5"}]}
