)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"809632bf3e2d248b7fde2db4ade68c36f62ece45","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Allow filtering routers by network-ids"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"There is corrently no way to list all the routers who are connected to"},{"line_number":10,"context_line":"a single network. This patch adds an optional \u0027network_id\u0027 filter to"},{"line_number":11,"context_line":"the router-list REST API, which (when used) will allow one to get a"},{"line_number":12,"context_line":"list of all the routers who belong to a specific network."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"baada198_9514da9f","line":9,"updated":"2014-08-04 16:31:34.000000000","message":"typo: currently","commit_id":"b5a0a84770a8f5df93b1c68e0e4caa0feb93589c"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"a7791dd2242898f2c93bbf910660d14e620f9efe","unresolved":false,"context_lines":[{"line_number":12,"context_line":"list of all the routers who belong to a specific network."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I2fe1d4138045cf34e2551d3b82e99071b00daa33"},{"line_number":15,"context_line":"Closes-bug: #1350852"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"baada198_15d7ea4f","line":15,"updated":"2014-08-04 15:57:32.000000000","message":"it\u0027s probably more a feature than a bug, anyway sometimes the border between a feature and a bug is hard to define strictly :)","commit_id":"b5a0a84770a8f5df93b1c68e0e4caa0feb93589c"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"e112c0b3f5efb63dcb526820ba4255a3a84605f4","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"There is corrently no way to list all the routers who are connected to"},{"line_number":10,"context_line":"a single network. This patch adds an optional \u0027network_id\u0027 filter to"},{"line_number":11,"context_line":"the router-list REST API, which (when used) will allow one to get a"},{"line_number":12,"context_line":"list of all the routers who belong to a specific network."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I2fe1d4138045cf34e2551d3b82e99071b00daa33"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"baada198_ef4fa5bd","line":11,"updated":"2014-08-06 19:50:58.000000000","message":"DocImpact?","commit_id":"36034b6a4ece626fa378fba3a103d461413267bd"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"c95e24af52d229aa2d147c65e072f3bbf613985b","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"There is corrently no way to list all the routers who are connected to"},{"line_number":10,"context_line":"a single network. This patch adds an optional \u0027network_id\u0027 filter to"},{"line_number":11,"context_line":"the router-list REST API, which (when used) will allow one to get a"},{"line_number":12,"context_line":"list of all the routers who belong to a specific network."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I2fe1d4138045cf34e2551d3b82e99071b00daa33"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"baada198_21ea8277","line":11,"in_reply_to":"baada198_ef4fa5bd","updated":"2014-08-07 11:18:40.000000000","message":"Added. Thanks for the pickup :)","commit_id":"36034b6a4ece626fa378fba3a103d461413267bd"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"9511b10737be08484e3b783887b02792a00c9a70","unresolved":false,"context_lines":[{"line_number":9,"context_line":"There is currently no way to list all the routers who are connected to"},{"line_number":10,"context_line":"a single network. This patch adds an optional \u0027network_id\u0027 filter to"},{"line_number":11,"context_line":"the router-list REST API, which (when used) will allow one to get"},{"line_number":12,"context_line":"list of all the routers who belong to a specific network."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"DocImpact"},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"baada198_ab8efa2f","line":12,"updated":"2014-08-11 16:14:36.000000000","message":"which instead of who.","commit_id":"58fd45129bc0e067103a046bd0591508e589d860"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"94cbe858c1333a11243324ad4b66b615dd1c1676","unresolved":false,"context_lines":[{"line_number":9,"context_line":"There is currently no way to list all the routers who are connected to"},{"line_number":10,"context_line":"a single network. This patch adds an optional \u0027network_id\u0027 filter to"},{"line_number":11,"context_line":"the router-list REST API, which (when used) will allow one to get"},{"line_number":12,"context_line":"list of all the routers who belong to a specific network."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"DocImpact"},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"baada198_b36bb3b6","line":12,"in_reply_to":"baada198_ab8efa2f","updated":"2014-08-12 08:09:52.000000000","message":"Done","commit_id":"58fd45129bc0e067103a046bd0591508e589d860"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"2a2cfa936463c59da0a57f6cc3bd0ba1d31274d1","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Allow filtering routers by network-ids"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"There is currently no way to list all the routers which are connected to"},{"line_number":10,"context_line":"a single network. This patch adds an optional \u0027network_id\u0027 filter to"},{"line_number":11,"context_line":"the router-list REST API, which (when used) will allow one to get"},{"line_number":12,"context_line":"list of all the routers which belong to a specific network."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"1abeadc6_d3314bee","line":10,"updated":"2014-08-21 11:31:31.000000000","message":"pedantry: s/single/given","commit_id":"e4b8263675831a3cbce9a0efb86fe3d257e2f204"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"df27390de0504da894ce942cc61078d42994692b","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Allow filtering routers by network-ids"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"There is currently no way to list all the routers which are connected to"},{"line_number":10,"context_line":"a single network. This patch adds an optional \u0027network_id\u0027 filter to"},{"line_number":11,"context_line":"the router-list REST API, which (when used) will allow one to get"},{"line_number":12,"context_line":"list of all the routers which belong to a specific network."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"fa98f980_0fefbab1","line":10,"in_reply_to":"1abeadc6_d3314bee","updated":"2014-08-31 14:50:41.000000000","message":"Done","commit_id":"e4b8263675831a3cbce9a0efb86fe3d257e2f204"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"2a2cfa936463c59da0a57f6cc3bd0ba1d31274d1","unresolved":false,"context_lines":[{"line_number":9,"context_line":"There is currently no way to list all the routers which are connected to"},{"line_number":10,"context_line":"a single network. This patch adds an optional \u0027network_id\u0027 filter to"},{"line_number":11,"context_line":"the router-list REST API, which (when used) will allow one to get"},{"line_number":12,"context_line":"list of all the routers which belong to a specific network."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"DocImpact"},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"1abeadc6_735a372b","line":12,"updated":"2014-08-21 11:31:31.000000000","message":"more pedantry: s/belong/attached","commit_id":"e4b8263675831a3cbce9a0efb86fe3d257e2f204"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"df27390de0504da894ce942cc61078d42994692b","unresolved":false,"context_lines":[{"line_number":9,"context_line":"There is currently no way to list all the routers which are connected to"},{"line_number":10,"context_line":"a single network. This patch adds an optional \u0027network_id\u0027 filter to"},{"line_number":11,"context_line":"the router-list REST API, which (when used) will allow one to get"},{"line_number":12,"context_line":"list of all the routers which belong to a specific network."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"DocImpact"},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"fa98f980_2f2b9eec","line":12,"in_reply_to":"1abeadc6_735a372b","updated":"2014-08-31 14:50:41.000000000","message":"Done","commit_id":"e4b8263675831a3cbce9a0efb86fe3d257e2f204"}],"neutron/db/l3_db.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"25802aee99e96de131846afa3d333999f2fd333f","unresolved":false,"context_lines":[{"line_number":366,"context_line":"    def get_routers(self, context, filters\u003dNone, fields\u003dNone,"},{"line_number":367,"context_line":"                    sorts\u003dNone, limit\u003dNone, marker\u003dNone,"},{"line_number":368,"context_line":"                    page_reverse\u003dFalse):"},{"line_number":369,"context_line":"        marker_obj \u003d self._get_marker_obj(context, \u0027router\u0027, limit, marker)"},{"line_number":370,"context_line":"        return self._get_collection(context, Router,"},{"line_number":371,"context_line":"                                    self._make_router_dict,"},{"line_number":372,"context_line":"                                    filters\u003dfilters, fields\u003dfields,"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_1667edb8","side":"PARENT","line":369,"updated":"2014-08-04 18:41:16.000000000","message":"I haven\u0027t gone through the code but I hope you\u0027ve verified that the code you added in lines 398 to 403, and lines 414 to 415 fully replaces the code you\u0027ve removed by no longer calling get_collection.","commit_id":"a566fb79ba2ada52a61ab7b08a632773a48da8d4"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"5a9eb9b38b84de538d484291619e3ecd19804ec9","unresolved":false,"context_lines":[{"line_number":366,"context_line":"    def get_routers(self, context, filters\u003dNone, fields\u003dNone,"},{"line_number":367,"context_line":"                    sorts\u003dNone, limit\u003dNone, marker\u003dNone,"},{"line_number":368,"context_line":"                    page_reverse\u003dFalse):"},{"line_number":369,"context_line":"        marker_obj \u003d self._get_marker_obj(context, \u0027router\u0027, limit, marker)"},{"line_number":370,"context_line":"        return self._get_collection(context, Router,"},{"line_number":371,"context_line":"                                    self._make_router_dict,"},{"line_number":372,"context_line":"                                    filters\u003dfilters, fields\u003dfields,"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_9f269466","side":"PARENT","line":369,"in_reply_to":"baada198_1667edb8","updated":"2014-08-05 13:10:31.000000000","message":"Verified.","commit_id":"a566fb79ba2ada52a61ab7b08a632773a48da8d4"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"a7791dd2242898f2c93bbf910660d14e620f9efe","unresolved":false,"context_lines":[{"line_number":365,"context_line":"        return self._make_router_dict(router, fields)"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"    def _filter_routers_by_network(self, context, query, network_ids):"},{"line_number":368,"context_line":"        \"\"\"Look for all the ports connected to a network, and"},{"line_number":369,"context_line":"        extract those who are connected to a some router by"},{"line_number":370,"context_line":"        looking for all the ports whose device_id matches"},{"line_number":371,"context_line":"        an existing router."}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_7203dc75","line":368,"updated":"2014-08-04 15:57:32.000000000","message":"nit: please follow the hacking guide regarding multi line doc strings, see http://docs.openstack.org/developer/hacking/ . First line summany, then new line.","commit_id":"b5a0a84770a8f5df93b1c68e0e4caa0feb93589c"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"5a9eb9b38b84de538d484291619e3ecd19804ec9","unresolved":false,"context_lines":[{"line_number":365,"context_line":"        return self._make_router_dict(router, fields)"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"    def _filter_routers_by_network(self, context, query, network_ids):"},{"line_number":368,"context_line":"        \"\"\"Look for all the ports connected to a network, and"},{"line_number":369,"context_line":"        extract those who are connected to a some router by"},{"line_number":370,"context_line":"        looking for all the ports whose device_id matches"},{"line_number":371,"context_line":"        an existing router."}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_df172cee","line":368,"in_reply_to":"baada198_7203dc75","updated":"2014-08-05 13:10:31.000000000","message":"Done, thanks a lot :)","commit_id":"b5a0a84770a8f5df93b1c68e0e4caa0feb93589c"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"809632bf3e2d248b7fde2db4ade68c36f62ece45","unresolved":false,"context_lines":[{"line_number":366,"context_line":""},{"line_number":367,"context_line":"    def _filter_routers_by_network(self, context, query, network_ids):"},{"line_number":368,"context_line":"        \"\"\"Look for all the ports connected to a network, and"},{"line_number":369,"context_line":"        extract those who are connected to a some router by"},{"line_number":370,"context_line":"        looking for all the ports whose device_id matches"},{"line_number":371,"context_line":"        an existing router."},{"line_number":372,"context_line":"        The return value will therefor be a list of routers who"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_409a826f","line":369,"updated":"2014-08-04 16:31:34.000000000","message":"typo: you mean \"to a router\"?","commit_id":"b5a0a84770a8f5df93b1c68e0e4caa0feb93589c"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"809632bf3e2d248b7fde2db4ade68c36f62ece45","unresolved":false,"context_lines":[{"line_number":379,"context_line":"                subquery())"},{"line_number":380,"context_line":"        query \u003d query.join("},{"line_number":381,"context_line":"                ports_subquery,"},{"line_number":382,"context_line":"                Router.id \u003d\u003d ports_subquery.columns.device_id)"},{"line_number":383,"context_line":""},{"line_number":384,"context_line":"        return query"},{"line_number":385,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_20766e3f","line":382,"updated":"2014-08-04 16:31:34.000000000","message":"Router not defined here.","commit_id":"b5a0a84770a8f5df93b1c68e0e4caa0feb93589c"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"5a9eb9b38b84de538d484291619e3ecd19804ec9","unresolved":false,"context_lines":[{"line_number":379,"context_line":"                subquery())"},{"line_number":380,"context_line":"        query \u003d query.join("},{"line_number":381,"context_line":"                ports_subquery,"},{"line_number":382,"context_line":"                Router.id \u003d\u003d ports_subquery.columns.device_id)"},{"line_number":383,"context_line":""},{"line_number":384,"context_line":"        return query"},{"line_number":385,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_74580f89","line":382,"in_reply_to":"baada198_20766e3f","updated":"2014-08-05 13:10:31.000000000","message":"Router is a class defined in line 51 of this file.","commit_id":"b5a0a84770a8f5df93b1c68e0e4caa0feb93589c"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"a7791dd2242898f2c93bbf910660d14e620f9efe","unresolved":false,"context_lines":[{"line_number":391,"context_line":"        network_ids \u003d filters.pop(\u0027network_id\u0027, None)"},{"line_number":392,"context_line":""},{"line_number":393,"context_line":"        query \u003d self._model_query(context, Router)"},{"line_number":394,"context_line":"        if network_ids is not None:"},{"line_number":395,"context_line":"            query \u003d self._filter_routers_by_network(context,"},{"line_number":396,"context_line":"                                                    query,"},{"line_number":397,"context_line":"                                                    network_ids)"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_d5073215","line":394,"updated":"2014-08-04 15:57:32.000000000","message":"nit: you can replace this line with \"if network_ids:\"","commit_id":"b5a0a84770a8f5df93b1c68e0e4caa0feb93589c"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"5a9eb9b38b84de538d484291619e3ecd19804ec9","unresolved":false,"context_lines":[{"line_number":391,"context_line":"        network_ids \u003d filters.pop(\u0027network_id\u0027, None)"},{"line_number":392,"context_line":""},{"line_number":393,"context_line":"        query \u003d self._model_query(context, Router)"},{"line_number":394,"context_line":"        if network_ids is not None:"},{"line_number":395,"context_line":"            query \u003d self._filter_routers_by_network(context,"},{"line_number":396,"context_line":"                                                    query,"},{"line_number":397,"context_line":"                                                    network_ids)"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_1ffb64bf","line":394,"in_reply_to":"baada198_d5073215","updated":"2014-08-05 13:10:31.000000000","message":"Done.","commit_id":"b5a0a84770a8f5df93b1c68e0e4caa0feb93589c"},{"author":{"_account_id":490,"name":"Sumit Naiksatam","email":"sumitnaiksatam@gmail.com","username":"snaiksat"},"change_message_id":"20cf0f08c0123a13b3c323c5028d49c95df78abe","unresolved":false,"context_lines":[{"line_number":364,"context_line":"        router \u003d self._get_router(context, id)"},{"line_number":365,"context_line":"        return self._make_router_dict(router, fields)"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"    def _filter_routers_by_network(self, context, query, network_ids):"},{"line_number":368,"context_line":"        \"\"\"Get a list of routers who are connected to specific networks."},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"        This is done by looking for all the ports connected to a network,"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_a8e947e5","line":367,"updated":"2014-08-06 03:07:32.000000000","message":"nit: would have preferred\n\n  _get_routers_by_network_query()","commit_id":"36034b6a4ece626fa378fba3a103d461413267bd"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"33f1813307f0dc5974b5a7a88ecd9f69d633686b","unresolved":false,"context_lines":[{"line_number":364,"context_line":"        router \u003d self._get_router(context, id)"},{"line_number":365,"context_line":"        return self._make_router_dict(router, fields)"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"    def _filter_routers_by_network(self, context, query, network_ids):"},{"line_number":368,"context_line":"        \"\"\"Get a list of routers who are connected to specific networks."},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"        This is done by looking for all the ports connected to a network,"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_db3f20de","line":367,"in_reply_to":"baada198_a8e947e5","updated":"2014-08-06 06:41:59.000000000","message":"Although this isn\u0027t a getter as it accepts a query, filters it down, then returns it. If this function hadn\u0027t had a query argument I\u0027d have agreed Sumit.","commit_id":"36034b6a4ece626fa378fba3a103d461413267bd"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"f05db5df14d3a4faca7c007c0d66f8299644608f","unresolved":false,"context_lines":[{"line_number":364,"context_line":"        router \u003d self._get_router(context, id)"},{"line_number":365,"context_line":"        return self._make_router_dict(router, fields)"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"    def _filter_routers_by_network(self, context, query, network_ids):"},{"line_number":368,"context_line":"        \"\"\"Get a list of routers who are connected to specific networks."},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"        This is done by looking for all the ports connected to a network,"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_0ff4f2ef","line":367,"in_reply_to":"baada198_db3f20de","updated":"2014-08-06 08:19:22.000000000","message":"As Assaf said, the original intention was that this function indeed receives a query and filters what doesn\u0027t matter from it, and doesn\u0027t return a \u0027fresh\u0027 new query (like _get_routers_query does...","commit_id":"36034b6a4ece626fa378fba3a103d461413267bd"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"9511b10737be08484e3b783887b02792a00c9a70","unresolved":false,"context_lines":[{"line_number":365,"context_line":"        return self._make_router_dict(router, fields)"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"    def _filter_routers_by_network(self, context, query, network_ids):"},{"line_number":368,"context_line":"        \"\"\"Get a list of routers who are connected to specific networks."},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"        This is done by looking for all the ports connected to a network,"},{"line_number":371,"context_line":"        and extract those who are connected to some router by"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_6b8062f6","line":368,"updated":"2014-08-11 16:14:36.000000000","message":"which instead of who.","commit_id":"58fd45129bc0e067103a046bd0591508e589d860"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"94cbe858c1333a11243324ad4b66b615dd1c1676","unresolved":false,"context_lines":[{"line_number":365,"context_line":"        return self._make_router_dict(router, fields)"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"    def _filter_routers_by_network(self, context, query, network_ids):"},{"line_number":368,"context_line":"        \"\"\"Get a list of routers who are connected to specific networks."},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"        This is done by looking for all the ports connected to a network,"},{"line_number":371,"context_line":"        and extract those who are connected to some router by"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_a189a026","line":368,"in_reply_to":"baada198_6b8062f6","updated":"2014-08-12 08:09:52.000000000","message":"Thank you for all the spelling corrections :)","commit_id":"58fd45129bc0e067103a046bd0591508e589d860"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"9511b10737be08484e3b783887b02792a00c9a70","unresolved":false,"context_lines":[{"line_number":368,"context_line":"        \"\"\"Get a list of routers who are connected to specific networks."},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"        This is done by looking for all the ports connected to a network,"},{"line_number":371,"context_line":"        and extract those who are connected to some router by"},{"line_number":372,"context_line":"        looking for all the ports whose device_id matches"},{"line_number":373,"context_line":"        an existing router. The return value will therefor be a list of"},{"line_number":374,"context_line":"        routers who have a port connected to the said networks."}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_cb708e43","line":371,"updated":"2014-08-11 16:14:36.000000000","message":"which instead of who","commit_id":"58fd45129bc0e067103a046bd0591508e589d860"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"94cbe858c1333a11243324ad4b66b615dd1c1676","unresolved":false,"context_lines":[{"line_number":368,"context_line":"        \"\"\"Get a list of routers who are connected to specific networks."},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"        This is done by looking for all the ports connected to a network,"},{"line_number":371,"context_line":"        and extract those who are connected to some router by"},{"line_number":372,"context_line":"        looking for all the ports whose device_id matches"},{"line_number":373,"context_line":"        an existing router. The return value will therefor be a list of"},{"line_number":374,"context_line":"        routers who have a port connected to the said networks."}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_c17cd424","line":371,"in_reply_to":"baada198_cb708e43","updated":"2014-08-12 08:09:52.000000000","message":"Done","commit_id":"58fd45129bc0e067103a046bd0591508e589d860"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"9511b10737be08484e3b783887b02792a00c9a70","unresolved":false,"context_lines":[{"line_number":370,"context_line":"        This is done by looking for all the ports connected to a network,"},{"line_number":371,"context_line":"        and extract those who are connected to some router by"},{"line_number":372,"context_line":"        looking for all the ports whose device_id matches"},{"line_number":373,"context_line":"        an existing router. The return value will therefor be a list of"},{"line_number":374,"context_line":"        routers who have a port connected to the said networks."},{"line_number":375,"context_line":"        \"\"\""},{"line_number":376,"context_line":"        Port \u003d models_v2.Port"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_2bdf4a0d","line":373,"updated":"2014-08-11 16:14:36.000000000","message":"therefore instead of therefor","commit_id":"58fd45129bc0e067103a046bd0591508e589d860"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"94cbe858c1333a11243324ad4b66b615dd1c1676","unresolved":false,"context_lines":[{"line_number":370,"context_line":"        This is done by looking for all the ports connected to a network,"},{"line_number":371,"context_line":"        and extract those who are connected to some router by"},{"line_number":372,"context_line":"        looking for all the ports whose device_id matches"},{"line_number":373,"context_line":"        an existing router. The return value will therefor be a list of"},{"line_number":374,"context_line":"        routers who have a port connected to the said networks."},{"line_number":375,"context_line":"        \"\"\""},{"line_number":376,"context_line":"        Port \u003d models_v2.Port"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_e17f1814","line":373,"in_reply_to":"baada198_2bdf4a0d","updated":"2014-08-12 08:09:52.000000000","message":"Done","commit_id":"58fd45129bc0e067103a046bd0591508e589d860"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"9511b10737be08484e3b783887b02792a00c9a70","unresolved":false,"context_lines":[{"line_number":371,"context_line":"        and extract those who are connected to some router by"},{"line_number":372,"context_line":"        looking for all the ports whose device_id matches"},{"line_number":373,"context_line":"        an existing router. The return value will therefor be a list of"},{"line_number":374,"context_line":"        routers who have a port connected to the said networks."},{"line_number":375,"context_line":"        \"\"\""},{"line_number":376,"context_line":"        Port \u003d models_v2.Port"},{"line_number":377,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_cbd5eee6","line":374,"updated":"2014-08-11 16:14:36.000000000","message":"which instead of who","commit_id":"58fd45129bc0e067103a046bd0591508e589d860"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"94cbe858c1333a11243324ad4b66b615dd1c1676","unresolved":false,"context_lines":[{"line_number":371,"context_line":"        and extract those who are connected to some router by"},{"line_number":372,"context_line":"        looking for all the ports whose device_id matches"},{"line_number":373,"context_line":"        an existing router. The return value will therefor be a list of"},{"line_number":374,"context_line":"        routers who have a port connected to the said networks."},{"line_number":375,"context_line":"        \"\"\""},{"line_number":376,"context_line":"        Port \u003d models_v2.Port"},{"line_number":377,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_21759032","line":374,"in_reply_to":"baada198_cbd5eee6","updated":"2014-08-12 08:09:52.000000000","message":"Done","commit_id":"58fd45129bc0e067103a046bd0591508e589d860"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"bccbcc1242e9f4a987c214aa409a76786343eb5c","unresolved":false,"context_lines":[{"line_number":386,"context_line":"                        ports_subquery,"},{"line_number":387,"context_line":"                        Router.id \u003d\u003d ports_subquery.columns.device_id)"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":"        return query"},{"line_number":390,"context_line":""},{"line_number":391,"context_line":"    def _get_routers_query(self, context, filters\u003dNone, sorts\u003dNone, limit\u003dNone,"},{"line_number":392,"context_line":"                         marker_obj\u003dNone, page_reverse\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":10,"id":"7ac7a964_b85c4327","line":389,"updated":"2014-08-14 08:42:00.000000000","message":"This would fail with \"NameError\" if \"not filters\"","commit_id":"e87c9d71e8d4752a008d9329cfae9deb77fde51b"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"a9bbdec5e6cfdf1691ec9899e3de1b8dc2208ff2","unresolved":false,"context_lines":[{"line_number":386,"context_line":"                        ports_subquery,"},{"line_number":387,"context_line":"                        Router.id \u003d\u003d ports_subquery.columns.device_id)"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":"        return query"},{"line_number":390,"context_line":""},{"line_number":391,"context_line":"    def _get_routers_query(self, context, filters\u003dNone, sorts\u003dNone, limit\u003dNone,"},{"line_number":392,"context_line":"                         marker_obj\u003dNone, page_reverse\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":10,"id":"7ac7a964_f8479b1b","line":389,"in_reply_to":"7ac7a964_b85c4327","updated":"2014-08-14 08:44:15.000000000","message":"I\u0027m wrong, sorry, you receive the query as parameter.","commit_id":"e87c9d71e8d4752a008d9329cfae9deb77fde51b"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"5e0d9565b4210afdfc948e1715e180c91695b82a","unresolved":false,"context_lines":[{"line_number":388,"context_line":""},{"line_number":389,"context_line":"        return query"},{"line_number":390,"context_line":""},{"line_number":391,"context_line":"    def _get_routers_query(self, context, filters\u003dNone, sorts\u003dNone, limit\u003dNone,"},{"line_number":392,"context_line":"                         marker_obj\u003dNone, page_reverse\u003dFalse):"},{"line_number":393,"context_line":""},{"line_number":394,"context_line":"        query \u003d self._model_query(context, Router)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7ac7a964_54caef4f","line":391,"updated":"2014-08-15 04:45:00.000000000","message":"This method largely duplicates _get_collection_query().  I\u0027d like to see a refactor of that method to allow a different filter method instead of the copy/paste job I see here.  The key to a successful refactor will be ensuring that the default behavior remains unchanged.\n\nSee: http://c2.com/cgi/wiki?DontRepeatYourself","commit_id":"e87c9d71e8d4752a008d9329cfae9deb77fde51b"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"aebd24e7f76ea2f7951c74845f88790757574630","unresolved":false,"context_lines":[{"line_number":388,"context_line":""},{"line_number":389,"context_line":"        return query"},{"line_number":390,"context_line":""},{"line_number":391,"context_line":"    def _get_routers_query(self, context, filters\u003dNone, sorts\u003dNone, limit\u003dNone,"},{"line_number":392,"context_line":"                         marker_obj\u003dNone, page_reverse\u003dFalse):"},{"line_number":393,"context_line":""},{"line_number":394,"context_line":"        query \u003d self._model_query(context, Router)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1abeadc6_1e77b13b","line":391,"in_reply_to":"7ac7a964_54caef4f","updated":"2014-08-19 07:26:53.000000000","message":"Done. This is a refactor involving an additional optional parameter, pre_filter_callback, which is called prior to _apply_filters_to_query. The implementation can be found in the dependency.\n\nAnother proposed refactor can be found here: https://review.openstack.org/115063","commit_id":"e87c9d71e8d4752a008d9329cfae9deb77fde51b"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"5e0d9565b4210afdfc948e1715e180c91695b82a","unresolved":false,"context_lines":[{"line_number":405,"context_line":"                    sorts\u003dNone, limit\u003dNone, marker\u003dNone,"},{"line_number":406,"context_line":"                    page_reverse\u003dFalse):"},{"line_number":407,"context_line":"        marker_obj \u003d self._get_marker_obj(context, \u0027router\u0027, limit, marker)"},{"line_number":408,"context_line":"        query \u003d self._get_routers_query(context, filters\u003dfilters,"},{"line_number":409,"context_line":"                                        sorts\u003dsorts, limit\u003dlimit,"},{"line_number":410,"context_line":"                                        marker_obj\u003dmarker_obj,"},{"line_number":411,"context_line":"                                        page_reverse\u003dpage_reverse)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7ac7a964_94dba71a","line":408,"updated":"2014-08-15 04:45:00.000000000","message":"DRY - It is preferable to refactor the _get_collection() method to allow substitution of query generation than what appears here.","commit_id":"e87c9d71e8d4752a008d9329cfae9deb77fde51b"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"aebd24e7f76ea2f7951c74845f88790757574630","unresolved":false,"context_lines":[{"line_number":405,"context_line":"                    sorts\u003dNone, limit\u003dNone, marker\u003dNone,"},{"line_number":406,"context_line":"                    page_reverse\u003dFalse):"},{"line_number":407,"context_line":"        marker_obj \u003d self._get_marker_obj(context, \u0027router\u0027, limit, marker)"},{"line_number":408,"context_line":"        query \u003d self._get_routers_query(context, filters\u003dfilters,"},{"line_number":409,"context_line":"                                        sorts\u003dsorts, limit\u003dlimit,"},{"line_number":410,"context_line":"                                        marker_obj\u003dmarker_obj,"},{"line_number":411,"context_line":"                                        page_reverse\u003dpage_reverse)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1abeadc6_5e904943","line":408,"in_reply_to":"7ac7a964_94dba71a","updated":"2014-08-19 07:26:53.000000000","message":"Done","commit_id":"e87c9d71e8d4752a008d9329cfae9deb77fde51b"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"2a2cfa936463c59da0a57f6cc3bd0ba1d31274d1","unresolved":false,"context_lines":[{"line_number":363,"context_line":""},{"line_number":364,"context_line":"            ports_subquery \u003d (self._model_query(context, Port)."},{"line_number":365,"context_line":"                    filter(Port.network_id.in_(network_ids))."},{"line_number":366,"context_line":"                    subquery())"},{"line_number":367,"context_line":"            query \u003d query.join("},{"line_number":368,"context_line":"                    ports_subquery,"},{"line_number":369,"context_line":"                    Router.id \u003d\u003d ports_subquery.columns.device_id)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_d3e4eb3d","line":366,"updated":"2014-08-21 11:31:31.000000000","message":"I wonder if the subquery approach here is the most performance one.\nThis will generate a SELECT statement on the ports table, filtering ports by network ids, and then do a join with the query on the router table.\n\nI wonder whether joining first on router.id \u003d\u003d port.device_id and then filtering by network_id might be more efficient.\n\nHowever, this is a bit like splitting hairs, so no need to address this comment.\nBut your opinion is more then welcome.","commit_id":"e4b8263675831a3cbce9a0efb86fe3d257e2f204"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"df27390de0504da894ce942cc61078d42994692b","unresolved":false,"context_lines":[{"line_number":363,"context_line":""},{"line_number":364,"context_line":"            ports_subquery \u003d (self._model_query(context, Port)."},{"line_number":365,"context_line":"                    filter(Port.network_id.in_(network_ids))."},{"line_number":366,"context_line":"                    subquery())"},{"line_number":367,"context_line":"            query \u003d query.join("},{"line_number":368,"context_line":"                    ports_subquery,"},{"line_number":369,"context_line":"                    Router.id \u003d\u003d ports_subquery.columns.device_id)"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa98f980_aff78e8b","line":366,"in_reply_to":"1abeadc6_d3e4eb3d","updated":"2014-08-31 14:50:41.000000000","message":"Actually I think that the way the code is now is more efficient. Throughout this function, we only deal with unprocessed query statements and I join the routers query with a sub-query of the Ports.\n\nThe solution you\u0027re suggesting means that the join (a Cartesian Product) will be done against the entire Port query (as opposed to a sub-query which only produce ports in interesting networks), so I think it\u0027s more expensive.\n\nHope my answer is understandable :)","commit_id":"e4b8263675831a3cbce9a0efb86fe3d257e2f204"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"c06405363c70013aaea1278f69fb182c0bc315f6","unresolved":false,"context_lines":[{"line_number":360,"context_line":"        network_ids \u003d filters.pop(\u0027network_id\u0027, None)"},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"        if network_ids:"},{"line_number":363,"context_line":"            Port \u003d models_v2.Port"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"            ports_subquery \u003d (self._model_query(context, Port)."},{"line_number":366,"context_line":"                    filter(Port.network_id.in_(network_ids))."}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_212ad8e7","line":363,"updated":"2014-09-07 04:29:58.000000000","message":"why not just put models_v2.Port directly in line 365?","commit_id":"ea199c84f4f560ae7bc85ae263d6e0232e98423d"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"7d5b619600e625189ea569eb574ffef7b6682c0b","unresolved":false,"context_lines":[{"line_number":360,"context_line":"        network_ids \u003d filters.pop(\u0027network_id\u0027, None)"},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"        if network_ids:"},{"line_number":363,"context_line":"            Port \u003d models_v2.Port"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"            ports_subquery \u003d (self._model_query(context, Port)."},{"line_number":366,"context_line":"                    filter(Port.network_id.in_(network_ids))."}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_e79d4068","line":363,"in_reply_to":"fa98f980_212ad8e7","updated":"2014-09-07 08:21:44.000000000","message":"Done","commit_id":"ea199c84f4f560ae7bc85ae263d6e0232e98423d"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"c06405363c70013aaea1278f69fb182c0bc315f6","unresolved":false,"context_lines":[{"line_number":382,"context_line":"        marker_obj \u003d self._get_marker_obj(context, \u0027router\u0027, limit, marker)"},{"line_number":383,"context_line":"        return self._get_collection(context, Router,"},{"line_number":384,"context_line":"                                    self._make_router_dict, filters,"},{"line_number":385,"context_line":"                                    fields, sorts, limit, marker_obj,"},{"line_number":386,"context_line":"                                    page_reverse)"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"    def get_routers_count(self, context, filters\u003dNone):"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_412fdcf6","line":385,"updated":"2014-09-07 04:29:58.000000000","message":"this change seems unrelated, why is it here?","commit_id":"ea199c84f4f560ae7bc85ae263d6e0232e98423d"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"7d5b619600e625189ea569eb574ffef7b6682c0b","unresolved":false,"context_lines":[{"line_number":382,"context_line":"        marker_obj \u003d self._get_marker_obj(context, \u0027router\u0027, limit, marker)"},{"line_number":383,"context_line":"        return self._get_collection(context, Router,"},{"line_number":384,"context_line":"                                    self._make_router_dict, filters,"},{"line_number":385,"context_line":"                                    fields, sorts, limit, marker_obj,"},{"line_number":386,"context_line":"                                    page_reverse)"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"    def get_routers_count(self, context, filters\u003dNone):"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_c7903c51","line":385,"in_reply_to":"fa98f980_412fdcf6","updated":"2014-09-07 08:21:44.000000000","message":"Leftovers from previous iterations... fixed","commit_id":"ea199c84f4f560ae7bc85ae263d6e0232e98423d"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9f4216420ae4bd1c5d9999ecba02228a40d4fa1e","unresolved":false,"context_lines":[{"line_number":410,"context_line":"    def _get_routers_query(self, context, filters\u003dNone, sorts\u003dNone, limit\u003dNone,"},{"line_number":411,"context_line":"                         marker_obj\u003dNone, page_reverse\u003dFalse):"},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"        query \u003d self._model_query(context, Router)"},{"line_number":414,"context_line":"        query \u003d self._filter_routers_by_network(context, query, filters)"},{"line_number":415,"context_line":"        query \u003d self._apply_filters_to_query(query, Router, filters)"},{"line_number":416,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_4ad497bc","line":413,"updated":"2014-11-17 09:36:14.000000000","message":"Just something to consider: I would expect a method called _filter_routers_by_network to actually filter something, and not be entirely dependent on a parameter you pass in. It may make more sense to remove the conditional inside and move it to the caller, but this is an age-old discussion.","commit_id":"f0a9bb058d9c13d3ab7b1d07111a8a36d80d632a"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"46186d37d9d8e178f55d36ba42e9ebc72b31397f","unresolved":false,"context_lines":[{"line_number":410,"context_line":"    def _get_routers_query(self, context, filters\u003dNone, sorts\u003dNone, limit\u003dNone,"},{"line_number":411,"context_line":"                         marker_obj\u003dNone, page_reverse\u003dFalse):"},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"        query \u003d self._model_query(context, Router)"},{"line_number":414,"context_line":"        query \u003d self._filter_routers_by_network(context, query, filters)"},{"line_number":415,"context_line":"        query \u003d self._apply_filters_to_query(query, Router, filters)"},{"line_number":416,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"3a961159_87be2ed3","line":413,"in_reply_to":"5a890539_4ad497bc","updated":"2014-12-16 06:48:22.000000000","message":"The reason the \u0027if\u0027 is inside the function is to minimize the code used to wrap the call. In https://review.openstack.org/#/c/111580/17/neutron/plugins/metaplugin/meta_neutron_plugin.py for example, this function is also called, and I don\u0027t want to check if filters is not empty.\n\nAlso, it\u0027s a slippery slope since then you\u0027d ask \"why not also check if filters contains a \u0027network_id\u0027 key outside the function?\"\n\nAnyway, leaving this as is.","commit_id":"f0a9bb058d9c13d3ab7b1d07111a8a36d80d632a"}],"neutron/plugins/metaplugin/meta_neutron_plugin.py":[{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"9511b10737be08484e3b783887b02792a00c9a70","unresolved":false,"context_lines":[{"line_number":398,"context_line":"        collection \u003d self._model_query(context, l3_db.Router)"},{"line_number":399,"context_line":""},{"line_number":400,"context_line":"        network_ids \u003d filters.pop(\u0027network_id\u0027, None)"},{"line_number":401,"context_line":"        if network_ids is not None:"},{"line_number":402,"context_line":"            collection \u003d self._filter_routers_by_network("},{"line_number":403,"context_line":"                    context, collection, network_ids)"},{"line_number":404,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_0b9446e6","line":401,"updated":"2014-08-11 16:14:36.000000000","message":"network_ids i assume is an array. What if network_ids is an empty array?","commit_id":"58fd45129bc0e067103a046bd0591508e589d860"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"94cbe858c1333a11243324ad4b66b615dd1c1676","unresolved":false,"context_lines":[{"line_number":398,"context_line":"        collection \u003d self._model_query(context, l3_db.Router)"},{"line_number":399,"context_line":""},{"line_number":400,"context_line":"        network_ids \u003d filters.pop(\u0027network_id\u0027, None)"},{"line_number":401,"context_line":"        if network_ids is not None:"},{"line_number":402,"context_line":"            collection \u003d self._filter_routers_by_network("},{"line_number":403,"context_line":"                    context, collection, network_ids)"},{"line_number":404,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_41a4444b","line":401,"in_reply_to":"baada198_0b9446e6","updated":"2014-08-12 08:09:52.000000000","message":"The intended behavior is that the code acts as if the user didn\u0027t enter a network_id parameter. This works as intended in l3_db.py L395, but a fix that was done there was not done here, so this is a bug. Thanks for catching this :)","commit_id":"58fd45129bc0e067103a046bd0591508e589d860"},{"author":{"_account_id":12737,"name":"Jacek Swiderski","email":"jacek.swiderski@codilime.com","username":"Altran"},"change_message_id":"51ebb532ba3c7a6ef625a6bf00d5971794575fed","unresolved":false,"context_lines":[{"line_number":397,"context_line":"                                fields\u003dNone):"},{"line_number":398,"context_line":"        collection \u003d self._model_query(context, l3_db.Router)"},{"line_number":399,"context_line":""},{"line_number":400,"context_line":"        network_ids \u003d filters.pop(\u0027network_id\u0027, None)"},{"line_number":401,"context_line":"        if network_ids:"},{"line_number":402,"context_line":"            collection \u003d self._filter_routers_by_network("},{"line_number":403,"context_line":"                    context, collection, network_ids)"}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_c9003306","line":400,"updated":"2014-08-13 14:49:57.000000000","message":"it will cause AttributeError when filters is none - shouldn\u0027t You add\nif not filters:\n\tfilters \u003d {}\nas in l3_db.py ?\nAlso it seems there is no UT to this function (but since I\u0027m fairly new I\u0027m not sure if its in scope of bug fix)","commit_id":"d3b5db509ff1eb0a43cfef8e4e22a7d567882458"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"1aa8e8b4523bc6c65dca5500dabf798a966dd206","unresolved":false,"context_lines":[{"line_number":397,"context_line":"                                fields\u003dNone):"},{"line_number":398,"context_line":"        collection \u003d self._model_query(context, l3_db.Router)"},{"line_number":399,"context_line":""},{"line_number":400,"context_line":"        network_ids \u003d filters.pop(\u0027network_id\u0027, None)"},{"line_number":401,"context_line":"        if network_ids:"},{"line_number":402,"context_line":"            collection \u003d self._filter_routers_by_network("},{"line_number":403,"context_line":"                    context, collection, network_ids)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7ac7a964_24f1f0cd","line":400,"in_reply_to":"9ab29df4_77f810e6","updated":"2014-08-14 06:49:54.000000000","message":"Good catch Jacek!","commit_id":"d3b5db509ff1eb0a43cfef8e4e22a7d567882458"},{"author":{"_account_id":12737,"name":"Jacek Swiderski","email":"jacek.swiderski@codilime.com","username":"Altran"},"change_message_id":"bad307a18ef4e26a386afa34699319689a0ad4d5","unresolved":false,"context_lines":[{"line_number":397,"context_line":"                                fields\u003dNone):"},{"line_number":398,"context_line":"        collection \u003d self._model_query(context, l3_db.Router)"},{"line_number":399,"context_line":""},{"line_number":400,"context_line":"        network_ids \u003d filters.pop(\u0027network_id\u0027, None)"},{"line_number":401,"context_line":"        if network_ids:"},{"line_number":402,"context_line":"            collection \u003d self._filter_routers_by_network("},{"line_number":403,"context_line":"                    context, collection, network_ids)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9ab29df4_77f810e6","line":400,"in_reply_to":"baada198_9a3837cd","updated":"2014-08-13 18:40:14.000000000","message":"Oh yes - I\u0027ve looked at metaplugin/test_metaplugin.py and this class is in metaplugin/test_basic.py","commit_id":"d3b5db509ff1eb0a43cfef8e4e22a7d567882458"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"94b31a3b3e0d790d1280f80d219b21ca0434d362","unresolved":false,"context_lines":[{"line_number":397,"context_line":"                                fields\u003dNone):"},{"line_number":398,"context_line":"        collection \u003d self._model_query(context, l3_db.Router)"},{"line_number":399,"context_line":""},{"line_number":400,"context_line":"        network_ids \u003d filters.pop(\u0027network_id\u0027, None)"},{"line_number":401,"context_line":"        if network_ids:"},{"line_number":402,"context_line":"            collection \u003d self._filter_routers_by_network("},{"line_number":403,"context_line":"                    context, collection, network_ids)"}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_9a3837cd","line":400,"in_reply_to":"baada198_c9003306","updated":"2014-08-13 15:32:10.000000000","message":"Regarding the AttributeError, you are indeed correct. I will upload another revision tomorrow.\n\nRegarding the UT - there are tests written to this - see the third file I patched in the tests module. Specifically, a class called TestMetaL3NatDBTestCase inherits from the class my tests are in.","commit_id":"d3b5db509ff1eb0a43cfef8e4e22a7d567882458"}],"neutron/tests/unit/test_l3_plugin.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"25802aee99e96de131846afa3d333999f2fd333f","unresolved":false,"context_lines":[{"line_number":623,"context_line":"            query_params \u003d \u0027name\u003drouter3\u0027"},{"line_number":624,"context_line":"            self._test_list_resources(\u0027router\u0027, [],"},{"line_number":625,"context_line":"                                      query_params\u003dquery_params)"},{"line_number":626,"context_line":""},{"line_number":627,"context_line":"    def test_router_list_with_network_id(self):"},{"line_number":628,"context_line":"        \"\"\"Test the \u0027neutron router-list --network_id\u003d...\u0027 feature."},{"line_number":629,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_564c0576","line":626,"updated":"2014-08-04 18:41:16.000000000","message":"The code suggests that --network_id can be a list but you only test for a single network.","commit_id":"b5a0a84770a8f5df93b1c68e0e4caa0feb93589c"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"f8eda1783e371a11ab52ee24320cd7ccb65ab7b9","unresolved":false,"context_lines":[{"line_number":623,"context_line":"            query_params \u003d \u0027name\u003drouter3\u0027"},{"line_number":624,"context_line":"            self._test_list_resources(\u0027router\u0027, [],"},{"line_number":625,"context_line":"                                      query_params\u003dquery_params)"},{"line_number":626,"context_line":""},{"line_number":627,"context_line":"    def test_router_list_with_network_id(self):"},{"line_number":628,"context_line":"        \"\"\"Test the \u0027neutron router-list --network_id\u003d...\u0027 feature."},{"line_number":629,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_5eb16590","line":626,"in_reply_to":"baada198_564c0576","updated":"2014-08-05 10:07:41.000000000","message":"Hmm, but the function name looks clear to me\n\nrouter_list,  with    network_id \n\n:)","commit_id":"b5a0a84770a8f5df93b1c68e0e4caa0feb93589c"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"213e9e389cbc26279126527662bc850b385d07d0","unresolved":false,"context_lines":[{"line_number":623,"context_line":"            query_params \u003d \u0027name\u003drouter3\u0027"},{"line_number":624,"context_line":"            self._test_list_resources(\u0027router\u0027, [],"},{"line_number":625,"context_line":"                                      query_params\u003dquery_params)"},{"line_number":626,"context_line":""},{"line_number":627,"context_line":"    def test_router_list_with_network_id(self):"},{"line_number":628,"context_line":"        \"\"\"Test the \u0027neutron router-list --network_id\u003d...\u0027 feature."},{"line_number":629,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_ec8a9364","line":626,"in_reply_to":"baada198_5eb16590","updated":"2014-08-05 10:46:06.000000000","message":"But the code itself in l3_db assumes that the network_id filter is a list of networks.","commit_id":"b5a0a84770a8f5df93b1c68e0e4caa0feb93589c"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"5a9eb9b38b84de538d484291619e3ecd19804ec9","unresolved":false,"context_lines":[{"line_number":623,"context_line":"            query_params \u003d \u0027name\u003drouter3\u0027"},{"line_number":624,"context_line":"            self._test_list_resources(\u0027router\u0027, [],"},{"line_number":625,"context_line":"                                      query_params\u003dquery_params)"},{"line_number":626,"context_line":""},{"line_number":627,"context_line":"    def test_router_list_with_network_id(self):"},{"line_number":628,"context_line":"        \"\"\"Test the \u0027neutron router-list --network_id\u003d...\u0027 feature."},{"line_number":629,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_5fe95c18","line":626,"in_reply_to":"baada198_ec8a9364","updated":"2014-08-05 13:10:31.000000000","message":"Assaf is right. Refactored the code to be simpler and also check a usage of 2 --network_id parameters.","commit_id":"b5a0a84770a8f5df93b1c68e0e4caa0feb93589c"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"809632bf3e2d248b7fde2db4ade68c36f62ece45","unresolved":false,"context_lines":[{"line_number":627,"context_line":"    def test_router_list_with_network_id(self):"},{"line_number":628,"context_line":"        \"\"\"Test the \u0027neutron router-list --network_id\u003d...\u0027 feature."},{"line_number":629,"context_line":""},{"line_number":630,"context_line":"        The test creates 3 routers, 3 subnets and 3 ports:"},{"line_number":631,"context_line":"        - Router 1 with 3 ports, one in each subnet (one of which"},{"line_number":632,"context_line":"          is an external port)"},{"line_number":633,"context_line":"        - Router 2 with 2 ports, one in subnets 2 and another in 3,"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_a04fde68","line":630,"updated":"2014-08-04 16:31:34.000000000","message":"nit: shouldn\u0027t this be 6 ports?","commit_id":"b5a0a84770a8f5df93b1c68e0e4caa0feb93589c"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"5a9eb9b38b84de538d484291619e3ecd19804ec9","unresolved":false,"context_lines":[{"line_number":627,"context_line":"    def test_router_list_with_network_id(self):"},{"line_number":628,"context_line":"        \"\"\"Test the \u0027neutron router-list --network_id\u003d...\u0027 feature."},{"line_number":629,"context_line":""},{"line_number":630,"context_line":"        The test creates 3 routers, 3 subnets and 3 ports:"},{"line_number":631,"context_line":"        - Router 1 with 3 ports, one in each subnet (one of which"},{"line_number":632,"context_line":"          is an external port)"},{"line_number":633,"context_line":"        - Router 2 with 2 ports, one in subnets 2 and another in 3,"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_1f6444b2","line":630,"in_reply_to":"baada198_a04fde68","updated":"2014-08-05 13:10:31.000000000","message":"Went through all your notes, and changed some of the documentation. Will appreciate it if you could have another run at them :)","commit_id":"b5a0a84770a8f5df93b1c68e0e4caa0feb93589c"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"809632bf3e2d248b7fde2db4ade68c36f62ece45","unresolved":false,"context_lines":[{"line_number":630,"context_line":"        The test creates 3 routers, 3 subnets and 3 ports:"},{"line_number":631,"context_line":"        - Router 1 with 3 ports, one in each subnet (one of which"},{"line_number":632,"context_line":"          is an external port)"},{"line_number":633,"context_line":"        - Router 2 with 2 ports, one in subnets 2 and another in 3,"},{"line_number":634,"context_line":"        - Router 3 with a single port only in subnet 3."},{"line_number":635,"context_line":"        \"\"\""},{"line_number":636,"context_line":"        tenant_id \u003d _uuid()"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_80257aaf","line":633,"updated":"2014-08-04 16:31:34.000000000","message":"nit: \"one in subnet 2\"","commit_id":"b5a0a84770a8f5df93b1c68e0e4caa0feb93589c"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"25802aee99e96de131846afa3d333999f2fd333f","unresolved":false,"context_lines":[{"line_number":635,"context_line":"        \"\"\""},{"line_number":636,"context_line":"        tenant_id \u003d _uuid()"},{"line_number":637,"context_line":"        other_tenant_id \u003d _uuid()"},{"line_number":638,"context_line":""},{"line_number":639,"context_line":"        with contextlib.nested("},{"line_number":640,"context_line":"            self.router(name\u003d\u0027router1\u0027, tenant_id\u003dtenant_id),"},{"line_number":641,"context_line":"            self.router(name\u003d\u0027router2\u0027, tenant_id\u003dtenant_id),"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_76ebc911","line":638,"updated":"2014-08-04 18:41:16.000000000","message":"If I\u0027m not mistaken, according to https://review.openstack.org/#/c/106277/1/specs/juno/remove-unit-test-autodeletion.rst, we should avoid using the context managers in new tests (This is because the DB is discarded after every test so there\u0027s no point in deleting resources we create).\n\nYou can create routers, subnets and ports via the methods that \u0027router\u0027, \u0027subnet\u0027 and \u0027port\u0027 use.","commit_id":"b5a0a84770a8f5df93b1c68e0e4caa0feb93589c"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"25802aee99e96de131846afa3d333999f2fd333f","unresolved":false,"context_lines":[{"line_number":652,"context_line":"                        self.port(subnet\u003ds2, do_delete\u003dFalse),"},{"line_number":653,"context_line":"                        self.port(subnet\u003ds3, do_delete\u003dFalse),"},{"line_number":654,"context_line":"                        self.port(subnet\u003ds3, do_delete\u003dFalse),"},{"line_number":655,"context_line":"                        self.port(subnet\u003ds3, do_delete\u003dFalse)"},{"line_number":656,"context_line":"                                       ) as (p2_1, p2_2, p3_1, p3_2, p3_3):"},{"line_number":657,"context_line":""},{"line_number":658,"context_line":"                    # Connect the ports to the routers"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_b6c801a8","line":655,"updated":"2014-08-04 18:41:16.000000000","message":"I find the port naming scheme confusing. How about network1_port1, network1_port2, and so on? I\u0027m not going to stress this, this is totally up to you.","commit_id":"b5a0a84770a8f5df93b1c68e0e4caa0feb93589c"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"f8eda1783e371a11ab52ee24320cd7ccb65ab7b9","unresolved":false,"context_lines":[{"line_number":660,"context_line":"                    self._add_external_gateway_to_router("},{"line_number":661,"context_line":"                        r1[\u0027router\u0027][\u0027id\u0027],"},{"line_number":662,"context_line":"                        s1[\u0027subnet\u0027][\u0027network_id\u0027])"},{"line_number":663,"context_line":"                    self._router_interface_action("},{"line_number":664,"context_line":"                        \u0027add\u0027, r1[\u0027router\u0027][\u0027id\u0027], None, p2_1[\u0027port\u0027][\u0027id\u0027])"},{"line_number":665,"context_line":"                    self._router_interface_action("},{"line_number":666,"context_line":"                        \u0027add\u0027, r1[\u0027router\u0027][\u0027id\u0027], None, p3_1[\u0027port\u0027][\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_5e36c503","line":663,"updated":"2014-08-05 10:07:41.000000000","message":"May be making a list, and iterating over it for \n_router_interface_action(\u0027add\u0027   would make it cleaner to read.","commit_id":"b5a0a84770a8f5df93b1c68e0e4caa0feb93589c"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"25802aee99e96de131846afa3d333999f2fd333f","unresolved":false,"context_lines":[{"line_number":686,"context_line":"                    self._test_list_resources(\u0027router\u0027, [r1, r2, r3],"},{"line_number":687,"context_line":"                                              query_params\u003dquery_params)"},{"line_number":688,"context_line":""},{"line_number":689,"context_line":"                    # Clean-up"},{"line_number":690,"context_line":"                    self._remove_external_gateway_from_router("},{"line_number":691,"context_line":"                        r1[\u0027router\u0027][\u0027id\u0027],"},{"line_number":692,"context_line":"                        s1[\u0027subnet\u0027][\u0027network_id\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_b6f1e101","line":689,"updated":"2014-08-04 18:41:16.000000000","message":"You can get rid of the clean up since you won\u0027t be deleting the resources that you create in the test.","commit_id":"b5a0a84770a8f5df93b1c68e0e4caa0feb93589c"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"33f1813307f0dc5974b5a7a88ecd9f69d633686b","unresolved":false,"context_lines":[{"line_number":623,"context_line":"            query_params \u003d \u0027name\u003drouter3\u0027"},{"line_number":624,"context_line":"            self._test_list_resources(\u0027router\u0027, [],"},{"line_number":625,"context_line":"                                      query_params\u003dquery_params)"},{"line_number":626,"context_line":""},{"line_number":627,"context_line":"    def test_router_list_with_network_id(self):"},{"line_number":628,"context_line":"        \"\"\"Test the \u0027neutron router-list --network_id\u003d...\u0027 feature."},{"line_number":629,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_3b049c18","line":626,"updated":"2014-08-06 06:41:59.000000000","message":"It looks like you\u0027re testing the entire filtering functionality in a single function, whereas you might want to consider look into case in a separate test. You can reuse the init code between the different tests.","commit_id":"36034b6a4ece626fa378fba3a103d461413267bd"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"f05db5df14d3a4faca7c007c0d66f8299644608f","unresolved":false,"context_lines":[{"line_number":623,"context_line":"            query_params \u003d \u0027name\u003drouter3\u0027"},{"line_number":624,"context_line":"            self._test_list_resources(\u0027router\u0027, [],"},{"line_number":625,"context_line":"                                      query_params\u003dquery_params)"},{"line_number":626,"context_line":""},{"line_number":627,"context_line":"    def test_router_list_with_network_id(self):"},{"line_number":628,"context_line":"        \"\"\"Test the \u0027neutron router-list --network_id\u003d...\u0027 feature."},{"line_number":629,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_94749505","line":626,"in_reply_to":"baada198_3b049c18","updated":"2014-08-06 08:19:22.000000000","message":"I thought about separating the test into a few different ones, but then it would force me to create that huge \u0027init\u0027 block that you talked about, creating code duplication, and I don\u0027t really want to create an init function that returns 7 different parameters (2 routers, 2 subnets, 3 ports)...\nI could create an init function and return a dict containing all the values I need, but the downside to this is that getting the network_id of subnet 1 will be:\n\n   data[\u0027s1\u0027][\u0027subnet\u0027][\u0027network_id\u0027]\n\nand this will only hurt code readability in the long run...\n\nWhat do you think?","commit_id":"36034b6a4ece626fa378fba3a103d461413267bd"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"e112c0b3f5efb63dcb526820ba4255a3a84605f4","unresolved":false,"context_lines":[{"line_number":623,"context_line":"            query_params \u003d \u0027name\u003drouter3\u0027"},{"line_number":624,"context_line":"            self._test_list_resources(\u0027router\u0027, [],"},{"line_number":625,"context_line":"                                      query_params\u003dquery_params)"},{"line_number":626,"context_line":""},{"line_number":627,"context_line":"    def test_router_list_with_network_id(self):"},{"line_number":628,"context_line":"        \"\"\"Test the \u0027neutron router-list --network_id\u003d...\u0027 feature."},{"line_number":629,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_cf82e1c6","line":626,"in_reply_to":"baada198_94749505","updated":"2014-08-06 19:50:58.000000000","message":"Would be better for test isolation with separate test cases. Could you make them instance members, so you can do self.s1_network_id, for example?","commit_id":"36034b6a4ece626fa378fba3a103d461413267bd"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"c95e24af52d229aa2d147c65e072f3bbf613985b","unresolved":false,"context_lines":[{"line_number":623,"context_line":"            query_params \u003d \u0027name\u003drouter3\u0027"},{"line_number":624,"context_line":"            self._test_list_resources(\u0027router\u0027, [],"},{"line_number":625,"context_line":"                                      query_params\u003dquery_params)"},{"line_number":626,"context_line":""},{"line_number":627,"context_line":"    def test_router_list_with_network_id(self):"},{"line_number":628,"context_line":"        \"\"\"Test the \u0027neutron router-list --network_id\u003d...\u0027 feature."},{"line_number":629,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_52281f36","line":626,"in_reply_to":"baada198_cf82e1c6","updated":"2014-08-07 11:18:40.000000000","message":"I think that making them instance members is not a good approach, since the whole class runs for some 1300 lines and quite a bit of tests. Adding instance members hints that the variables are used in other tests, but in fact they are only used in 2-3 tests that were just added.\n\nI began implementing an \u0027init\u0027 function that returns all the needed values (about 7) in a named tuple and divided the test to 2 functions. The result was that one of the tests only used 3 out of 7 variables. Thus, the init function initialized 7 values, but only 3 were used... :(\n\nAny other ideas? I will clean it up some more and remove some non-relevant tests without separating the test until some really good idea will pop up..","commit_id":"36034b6a4ece626fa378fba3a103d461413267bd"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"3f09247807efc70c947409c365e04ec9b1ce047d","unresolved":false,"context_lines":[{"line_number":623,"context_line":"            query_params \u003d \u0027name\u003drouter3\u0027"},{"line_number":624,"context_line":"            self._test_list_resources(\u0027router\u0027, [],"},{"line_number":625,"context_line":"                                      query_params\u003dquery_params)"},{"line_number":626,"context_line":""},{"line_number":627,"context_line":"    def test_router_list_with_network_id_basic(self):"},{"line_number":628,"context_line":"        \"\"\"Test the \u0027neutron router-list --network_id\u003d...\u0027 feature."},{"line_number":629,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_842147b7","line":626,"updated":"2014-08-10 11:03:40.000000000","message":"The test that checks filtering with multiple network_ids must have been forgotten during the revert back to context managers.","commit_id":"b73f0fbeff613bd0fb33634696636fe00543c67d"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"14f95c8e0706f5c2efcfc302b027fac6b2fba3a7","unresolved":false,"context_lines":[{"line_number":623,"context_line":"            query_params \u003d \u0027name\u003drouter3\u0027"},{"line_number":624,"context_line":"            self._test_list_resources(\u0027router\u0027, [],"},{"line_number":625,"context_line":"                                      query_params\u003dquery_params)"},{"line_number":626,"context_line":""},{"line_number":627,"context_line":"    def test_router_list_with_network_id_basic(self):"},{"line_number":628,"context_line":"        \"\"\"Test the \u0027neutron router-list --network_id\u003d...\u0027 feature."},{"line_number":629,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_7f075c17","line":626,"in_reply_to":"baada198_842147b7","updated":"2014-08-10 12:17:17.000000000","message":"Done","commit_id":"b73f0fbeff613bd0fb33634696636fe00543c67d"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"3f09247807efc70c947409c365e04ec9b1ce047d","unresolved":false,"context_lines":[{"line_number":624,"context_line":"            self._test_list_resources(\u0027router\u0027, [],"},{"line_number":625,"context_line":"                                      query_params\u003dquery_params)"},{"line_number":626,"context_line":""},{"line_number":627,"context_line":"    def test_router_list_with_network_id_basic(self):"},{"line_number":628,"context_line":"        \"\"\"Test the \u0027neutron router-list --network_id\u003d...\u0027 feature."},{"line_number":629,"context_line":""},{"line_number":630,"context_line":"        The test creates 2 routers, 2 subnets and 2 ports:"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_64427368","line":627,"updated":"2014-08-10 11:03:40.000000000","message":"It\u0027s redundant having both the docstring and the comments mid-test. I\u0027d leave just the comments in the test itself.","commit_id":"b73f0fbeff613bd0fb33634696636fe00543c67d"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"14f95c8e0706f5c2efcfc302b027fac6b2fba3a7","unresolved":false,"context_lines":[{"line_number":624,"context_line":"            self._test_list_resources(\u0027router\u0027, [],"},{"line_number":625,"context_line":"                                      query_params\u003dquery_params)"},{"line_number":626,"context_line":""},{"line_number":627,"context_line":"    def test_router_list_with_network_id_basic(self):"},{"line_number":628,"context_line":"        \"\"\"Test the \u0027neutron router-list --network_id\u003d...\u0027 feature."},{"line_number":629,"context_line":""},{"line_number":630,"context_line":"        The test creates 2 routers, 2 subnets and 2 ports:"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_5f029808","line":627,"in_reply_to":"baada198_64427368","updated":"2014-08-10 12:17:17.000000000","message":"Done","commit_id":"b73f0fbeff613bd0fb33634696636fe00543c67d"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"3f09247807efc70c947409c365e04ec9b1ce047d","unresolved":false,"context_lines":[{"line_number":658,"context_line":"                                                  r2[\u0027router\u0027][\u0027id\u0027],"},{"line_number":659,"context_line":"                                                  None,"},{"line_number":660,"context_line":"                                                  network2_port[\u0027port\u0027][\u0027id\u0027])"},{"line_number":661,"context_line":""},{"line_number":662,"context_line":"                    # Make sure that the API returns the data as it should"},{"line_number":663,"context_line":"                    query_params \u003d \u0027network_id\u003d%s\u0027 % s1[\u0027subnet\u0027][\u0027network_id\u0027]"},{"line_number":664,"context_line":"                    self._test_list_resources(\u0027router\u0027, [r1],"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_a4572b26","line":661,"updated":"2014-08-10 11:03:40.000000000","message":"This comment, as it is, is useless. I think you can either remove it, or make it more explicit.","commit_id":"b73f0fbeff613bd0fb33634696636fe00543c67d"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"14f95c8e0706f5c2efcfc302b027fac6b2fba3a7","unresolved":false,"context_lines":[{"line_number":658,"context_line":"                                                  r2[\u0027router\u0027][\u0027id\u0027],"},{"line_number":659,"context_line":"                                                  None,"},{"line_number":660,"context_line":"                                                  network2_port[\u0027port\u0027][\u0027id\u0027])"},{"line_number":661,"context_line":""},{"line_number":662,"context_line":"                    # Make sure that the API returns the data as it should"},{"line_number":663,"context_line":"                    query_params \u003d \u0027network_id\u003d%s\u0027 % s1[\u0027subnet\u0027][\u0027network_id\u0027]"},{"line_number":664,"context_line":"                    self._test_list_resources(\u0027router\u0027, [r1],"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_3f016404","line":661,"in_reply_to":"baada198_a4572b26","updated":"2014-08-10 12:17:17.000000000","message":"Done","commit_id":"b73f0fbeff613bd0fb33634696636fe00543c67d"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"3f09247807efc70c947409c365e04ec9b1ce047d","unresolved":false,"context_lines":[{"line_number":683,"context_line":"                                                  None,"},{"line_number":684,"context_line":"                                                  network2_port[\u0027port\u0027][\u0027id\u0027])"},{"line_number":685,"context_line":""},{"line_number":686,"context_line":"    def test_router_list_with_network_id_external(self):"},{"line_number":687,"context_line":"        \"\"\"Test the \u0027neutron router-list --network_id\u003d...\u0027 feature."},{"line_number":688,"context_line":""},{"line_number":689,"context_line":"        The test creates 2 router and a subnet:"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_244cfb9c","line":686,"updated":"2014-08-10 11:03:40.000000000","message":"It\u0027s redundant having both the docstring and the comments mid-test. I\u0027d leave just the comments in the test itself.","commit_id":"b73f0fbeff613bd0fb33634696636fe00543c67d"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"14f95c8e0706f5c2efcfc302b027fac6b2fba3a7","unresolved":false,"context_lines":[{"line_number":683,"context_line":"                                                  None,"},{"line_number":684,"context_line":"                                                  network2_port[\u0027port\u0027][\u0027id\u0027])"},{"line_number":685,"context_line":""},{"line_number":686,"context_line":"    def test_router_list_with_network_id_external(self):"},{"line_number":687,"context_line":"        \"\"\"Test the \u0027neutron router-list --network_id\u003d...\u0027 feature."},{"line_number":688,"context_line":""},{"line_number":689,"context_line":"        The test creates 2 router and a subnet:"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_1ffca00b","line":686,"in_reply_to":"baada198_244cfb9c","updated":"2014-08-10 12:17:17.000000000","message":"Done","commit_id":"b73f0fbeff613bd0fb33634696636fe00543c67d"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"3f09247807efc70c947409c365e04ec9b1ce047d","unresolved":false,"context_lines":[{"line_number":695,"context_line":"        with self.router(name\u003d\u0027router1\u0027) as r1:"},{"line_number":696,"context_line":"            with self.subnet(cidr\u003d\u002710.0.0.0/24\u0027) as s1:"},{"line_number":697,"context_line":"                network_id \u003d s1[\u0027subnet\u0027][\u0027network_id\u0027]"},{"line_number":698,"context_line":""},{"line_number":699,"context_line":"                # Make sure that when no connections and ports were made,"},{"line_number":700,"context_line":"                # the router list returned is empty"},{"line_number":701,"context_line":"                query_params \u003d \u0027network_id\u003d%s\u0027 % network_id"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_24331b14","line":698,"updated":"2014-08-10 11:03:40.000000000","message":"How about:\nFiltering routers by a network requires the router to have a port in the network, thus a router with no ports should never return when filtering routers by a network.","commit_id":"b73f0fbeff613bd0fb33634696636fe00543c67d"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"14f95c8e0706f5c2efcfc302b027fac6b2fba3a7","unresolved":false,"context_lines":[{"line_number":695,"context_line":"        with self.router(name\u003d\u0027router1\u0027) as r1:"},{"line_number":696,"context_line":"            with self.subnet(cidr\u003d\u002710.0.0.0/24\u0027) as s1:"},{"line_number":697,"context_line":"                network_id \u003d s1[\u0027subnet\u0027][\u0027network_id\u0027]"},{"line_number":698,"context_line":""},{"line_number":699,"context_line":"                # Make sure that when no connections and ports were made,"},{"line_number":700,"context_line":"                # the router list returned is empty"},{"line_number":701,"context_line":"                query_params \u003d \u0027network_id\u003d%s\u0027 % network_id"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_e4fbe313","line":698,"in_reply_to":"baada198_24331b14","updated":"2014-08-10 12:17:17.000000000","message":"Done","commit_id":"b73f0fbeff613bd0fb33634696636fe00543c67d"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"3f09247807efc70c947409c365e04ec9b1ce047d","unresolved":false,"context_lines":[{"line_number":712,"context_line":""},{"line_number":713,"context_line":"                self._test_list_resources(\u0027router\u0027, [r1],"},{"line_number":714,"context_line":"                                          query_params\u003dquery_params)"},{"line_number":715,"context_line":""},{"line_number":716,"context_line":"                ## Necessary clean-up"},{"line_number":717,"context_line":"                self._remove_external_gateway_from_router("},{"line_number":718,"context_line":"                        r1[\u0027router\u0027][\u0027id\u0027], network_id)"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_e47683d4","line":715,"updated":"2014-08-10 11:03:40.000000000","message":"One \u0027#\u0027 too many.","commit_id":"b73f0fbeff613bd0fb33634696636fe00543c67d"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"14f95c8e0706f5c2efcfc302b027fac6b2fba3a7","unresolved":false,"context_lines":[{"line_number":712,"context_line":""},{"line_number":713,"context_line":"                self._test_list_resources(\u0027router\u0027, [r1],"},{"line_number":714,"context_line":"                                          query_params\u003dquery_params)"},{"line_number":715,"context_line":""},{"line_number":716,"context_line":"                ## Necessary clean-up"},{"line_number":717,"context_line":"                self._remove_external_gateway_from_router("},{"line_number":718,"context_line":"                        r1[\u0027router\u0027][\u0027id\u0027], network_id)"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_c4fedf06","line":715,"in_reply_to":"baada198_e47683d4","updated":"2014-08-10 12:17:17.000000000","message":"Done","commit_id":"b73f0fbeff613bd0fb33634696636fe00543c67d"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"9511b10737be08484e3b783887b02792a00c9a70","unresolved":false,"context_lines":[{"line_number":632,"context_line":"            with contextlib.nested("},{"line_number":633,"context_line":"                self.subnet(cidr\u003d\u002710.0.0.0/24\u0027),"},{"line_number":634,"context_line":"                self.subnet(cidr\u003d\u002720.0.0.0/24\u0027)"},{"line_number":635,"context_line":"                                   ) as (s1, s2):"},{"line_number":636,"context_line":"                with contextlib.nested("},{"line_number":637,"context_line":"                        self.port(subnet\u003ds1, do_delete\u003dFalse),"},{"line_number":638,"context_line":"                        self.port(subnet\u003ds2, do_delete\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_aba99a26","line":635,"updated":"2014-08-11 16:14:36.000000000","message":"why not nest subnets with the routers? They don\u0027t seem to be dependent on each other.","commit_id":"58fd45129bc0e067103a046bd0591508e589d860"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"94cbe858c1333a11243324ad4b66b615dd1c1676","unresolved":false,"context_lines":[{"line_number":632,"context_line":"            with contextlib.nested("},{"line_number":633,"context_line":"                self.subnet(cidr\u003d\u002710.0.0.0/24\u0027),"},{"line_number":634,"context_line":"                self.subnet(cidr\u003d\u002720.0.0.0/24\u0027)"},{"line_number":635,"context_line":"                                   ) as (s1, s2):"},{"line_number":636,"context_line":"                with contextlib.nested("},{"line_number":637,"context_line":"                        self.port(subnet\u003ds1, do_delete\u003dFalse),"},{"line_number":638,"context_line":"                        self.port(subnet\u003ds2, do_delete\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_a1a280aa","line":635,"in_reply_to":"baada198_aba99a26","updated":"2014-08-12 08:09:52.000000000","message":"I like the segregation this creates. IMO joining the routers and subnets together in the same contextmanager effects readability of the code, and the extra level of indentation helps clarify that more than one type of object is initialized.\n\nAlso, most of the other tests are also indenting the initialization this way as well, so the way I did it also contributes to consistency.\n\nThis is also relevant to the comment on L683.","commit_id":"58fd45129bc0e067103a046bd0591508e589d860"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"9511b10737be08484e3b783887b02792a00c9a70","unresolved":false,"context_lines":[{"line_number":680,"context_line":""},{"line_number":681,"context_line":"    def test_router_list_with_network_id_external(self):"},{"line_number":682,"context_line":"        with self.router(name\u003d\u0027router1\u0027) as r1:"},{"line_number":683,"context_line":"            with self.subnet(cidr\u003d\u002710.0.0.0/24\u0027) as s1:"},{"line_number":684,"context_line":"                network_id \u003d s1[\u0027subnet\u0027][\u0027network_id\u0027]"},{"line_number":685,"context_line":""},{"line_number":686,"context_line":"                # Filtering routers by a network requires the router to have"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_2b33ca13","line":683,"updated":"2014-08-11 16:14:36.000000000","message":"hmm, maybe you could use the contextmanager for those 2 with statements, so you\u0027ll have one less indent.","commit_id":"58fd45129bc0e067103a046bd0591508e589d860"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"599b7b7e87b1d8af403f3e395c339079d924f5e2","unresolved":false,"context_lines":[{"line_number":701,"context_line":"                self._test_list_resources(\u0027router\u0027, [r1],"},{"line_number":702,"context_line":"                                          query_params\u003dquery_params)"},{"line_number":703,"context_line":""},{"line_number":704,"context_line":"                # Necessary clean-up"},{"line_number":705,"context_line":"                self._remove_external_gateway_from_router("},{"line_number":706,"context_line":"                        r1[\u0027router\u0027][\u0027id\u0027], network_id)"},{"line_number":707,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_42346dab","line":704,"updated":"2014-08-11 10:36:10.000000000","message":"So, if the _test_list_resources assert fails, this cleanup will never happen, right?\n\nCan an addCleanup() call be used on L700, before the assert?","commit_id":"58fd45129bc0e067103a046bd0591508e589d860"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"511d10892f1a4256a7383403eafa38ae9f82e10d","unresolved":false,"context_lines":[{"line_number":701,"context_line":"                self._test_list_resources(\u0027router\u0027, [r1],"},{"line_number":702,"context_line":"                                          query_params\u003dquery_params)"},{"line_number":703,"context_line":""},{"line_number":704,"context_line":"                # Necessary clean-up"},{"line_number":705,"context_line":"                self._remove_external_gateway_from_router("},{"line_number":706,"context_line":"                        r1[\u0027router\u0027][\u0027id\u0027], network_id)"},{"line_number":707,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_503fd4b4","line":704,"in_reply_to":"baada198_42346dab","updated":"2014-08-11 10:54:33.000000000","message":"This cleanup is only done so that the created subnet (L683) will be able to delete itself at the end of its scope. If there is a port allocation when a deletion of a subnet is attempted, an exception will be raised.\n\nTherefor, an addCleanup will actually cause the test to fail, since the call will only be done after tearDown (and after the deletion of the subnet is attempted). Same goes for the cleanup at L676.","commit_id":"58fd45129bc0e067103a046bd0591508e589d860"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"5e0d9565b4210afdfc948e1715e180c91695b82a","unresolved":false,"context_lines":[{"line_number":624,"context_line":"            self._test_list_resources(\u0027router\u0027, [],"},{"line_number":625,"context_line":"                                      query_params\u003dquery_params)"},{"line_number":626,"context_line":""},{"line_number":627,"context_line":"    def test_router_list_with_network_id_basic(self):"},{"line_number":628,"context_line":"        with contextlib.nested("},{"line_number":629,"context_line":"            self.router(name\u003d\u0027router1\u0027),"},{"line_number":630,"context_line":"            self.router(name\u003d\u0027router2\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7ac7a964_34d733c3","line":627,"updated":"2014-08-15 04:45:00.000000000","message":"These test additions are more complicated than necessary.  I would expect a test for _filter_routers_by_network() that ensures that a router with a port on the specified network is included and one with a port an unspecified network is not.  That the existing tests involving _get_router() still pass should be proof that everything is wired together correctly.","commit_id":"e87c9d71e8d4752a008d9329cfae9deb77fde51b"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"aebd24e7f76ea2f7951c74845f88790757574630","unresolved":false,"context_lines":[{"line_number":624,"context_line":"            self._test_list_resources(\u0027router\u0027, [],"},{"line_number":625,"context_line":"                                      query_params\u003dquery_params)"},{"line_number":626,"context_line":""},{"line_number":627,"context_line":"    def test_router_list_with_network_id_basic(self):"},{"line_number":628,"context_line":"        with contextlib.nested("},{"line_number":629,"context_line":"            self.router(name\u003d\u0027router1\u0027),"},{"line_number":630,"context_line":"            self.router(name\u003d\u0027router2\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1abeadc6_5e2cc902","line":627,"in_reply_to":"7ac7a964_34d733c3","updated":"2014-08-19 07:26:53.000000000","message":"I tried implementing the tests at the plugin level, but was unsuccessful since the current test is implemented in a mixin class, and not all the test classes using this one supports an l3 router plugin.\nI did try to remove what seemed less likely. If you have any further suggestion I will gladly listen.","commit_id":"e87c9d71e8d4752a008d9329cfae9deb77fde51b"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"2a2cfa936463c59da0a57f6cc3bd0ba1d31274d1","unresolved":false,"context_lines":[{"line_number":633,"context_line":"            self._test_list_resources(\u0027router\u0027, [],"},{"line_number":634,"context_line":"                                      query_params\u003dquery_params)"},{"line_number":635,"context_line":""},{"line_number":636,"context_line":"    def test_router_list_with_network_id_basic(self):"},{"line_number":637,"context_line":"        with contextlib.nested("},{"line_number":638,"context_line":"            self.router(name\u003d\u0027router1\u0027),"},{"line_number":639,"context_line":"            self.router(name\u003d\u0027router2\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_33651fb5","line":636,"updated":"2014-08-21 11:31:31.000000000","message":"s/basic/internal","commit_id":"e4b8263675831a3cbce9a0efb86fe3d257e2f204"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"df27390de0504da894ce942cc61078d42994692b","unresolved":false,"context_lines":[{"line_number":633,"context_line":"            self._test_list_resources(\u0027router\u0027, [],"},{"line_number":634,"context_line":"                                      query_params\u003dquery_params)"},{"line_number":635,"context_line":""},{"line_number":636,"context_line":"    def test_router_list_with_network_id_basic(self):"},{"line_number":637,"context_line":"        with contextlib.nested("},{"line_number":638,"context_line":"            self.router(name\u003d\u0027router1\u0027),"},{"line_number":639,"context_line":"            self.router(name\u003d\u0027router2\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa98f980_4f30e256","line":636,"in_reply_to":"1abeadc6_33651fb5","updated":"2014-08-31 14:50:41.000000000","message":"Done","commit_id":"e4b8263675831a3cbce9a0efb86fe3d257e2f204"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"691d2efd32c416f28bb53ac5f35d62ded7bcc328","unresolved":false,"context_lines":[{"line_number":673,"context_line":"                                              query_params\u003dquery_params)"},{"line_number":674,"context_line":""},{"line_number":675,"context_line":"                    # Necessary clean-up"},{"line_number":676,"context_line":"                    self._router_interface_action(\u0027remove\u0027,"},{"line_number":677,"context_line":"                                                  r1[\u0027router\u0027][\u0027id\u0027],"},{"line_number":678,"context_line":"                                                  None,"},{"line_number":679,"context_line":"                                                  network1_port[\u0027port\u0027][\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_e177bad2","line":676,"updated":"2014-08-19 07:59:51.000000000","message":"The cleanups (if trully necessary) are ensured if something fails in the middle?","commit_id":"e4b8263675831a3cbce9a0efb86fe3d257e2f204"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"3ba5e03ad39667051d93862f26e7bffed580869a","unresolved":false,"context_lines":[{"line_number":673,"context_line":"                                              query_params\u003dquery_params)"},{"line_number":674,"context_line":""},{"line_number":675,"context_line":"                    # Necessary clean-up"},{"line_number":676,"context_line":"                    self._router_interface_action(\u0027remove\u0027,"},{"line_number":677,"context_line":"                                                  r1[\u0027router\u0027][\u0027id\u0027],"},{"line_number":678,"context_line":"                                                  None,"},{"line_number":679,"context_line":"                                                  network1_port[\u0027port\u0027][\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_e472687b","line":676,"in_reply_to":"1abeadc6_24e8e00f","updated":"2014-08-19 08:10:40.000000000","message":"Oook, totally understood now.","commit_id":"e4b8263675831a3cbce9a0efb86fe3d257e2f204"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"9e348806dd64d61348d6922a263f9264fcea1c9a","unresolved":false,"context_lines":[{"line_number":673,"context_line":"                                              query_params\u003dquery_params)"},{"line_number":674,"context_line":""},{"line_number":675,"context_line":"                    # Necessary clean-up"},{"line_number":676,"context_line":"                    self._router_interface_action(\u0027remove\u0027,"},{"line_number":677,"context_line":"                                                  r1[\u0027router\u0027][\u0027id\u0027],"},{"line_number":678,"context_line":"                                                  None,"},{"line_number":679,"context_line":"                                                  network1_port[\u0027port\u0027][\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_24e8e00f","line":676,"in_reply_to":"1abeadc6_e177bad2","updated":"2014-08-19 08:08:01.000000000","message":"After each test in completed (successfully or otherwise), the DB is dumped and a new one is initialized before the next test starts, so it doesn\u0027t matter if this cleanup is done when the test fails.\nThe only impact this makes is that when the test is successful, the cleanup of the variables initialized in the \u0027with\u0027 statements will fail if these are not done. In other words, not placing these statements causes a successful test to fail, and the cleanup is done either way.","commit_id":"e4b8263675831a3cbce9a0efb86fe3d257e2f204"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"691d2efd32c416f28bb53ac5f35d62ded7bcc328","unresolved":false,"context_lines":[{"line_number":707,"context_line":""},{"line_number":708,"context_line":"                # Necessary clean-up"},{"line_number":709,"context_line":"                self._remove_external_gateway_from_router("},{"line_number":710,"context_line":"                        r1[\u0027router\u0027][\u0027id\u0027], network_id)"},{"line_number":711,"context_line":""},{"line_number":712,"context_line":"    def test_router_list_with_sort(self):"},{"line_number":713,"context_line":"        with contextlib.nested(self.router(name\u003d\u0027router1\u0027),"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_417dceb0","line":710,"updated":"2014-08-19 07:59:51.000000000","message":"ditto","commit_id":"e4b8263675831a3cbce9a0efb86fe3d257e2f204"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"9e348806dd64d61348d6922a263f9264fcea1c9a","unresolved":false,"context_lines":[{"line_number":707,"context_line":""},{"line_number":708,"context_line":"                # Necessary clean-up"},{"line_number":709,"context_line":"                self._remove_external_gateway_from_router("},{"line_number":710,"context_line":"                        r1[\u0027router\u0027][\u0027id\u0027], network_id)"},{"line_number":711,"context_line":""},{"line_number":712,"context_line":"    def test_router_list_with_sort(self):"},{"line_number":713,"context_line":"        with contextlib.nested(self.router(name\u003d\u0027router1\u0027),"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_64d1f856","line":710,"in_reply_to":"1abeadc6_417dceb0","updated":"2014-08-19 08:08:01.000000000","message":"Done","commit_id":"e4b8263675831a3cbce9a0efb86fe3d257e2f204"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"ce6af581a2558f4ae4cb06e0a5b098bb18c50ff1","unresolved":false,"context_lines":[{"line_number":634,"context_line":"                                      query_params\u003dquery_params)"},{"line_number":635,"context_line":""},{"line_number":636,"context_line":"    def test_router_list_with_network_id_internal(self):"},{"line_number":637,"context_line":"        with contextlib.nested("},{"line_number":638,"context_line":"            self.router(name\u003d\u0027router1\u0027),"},{"line_number":639,"context_line":"            self.router(name\u003d\u0027router2\u0027)"},{"line_number":640,"context_line":"                              ) as (r1, r2):"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_57973790","line":637,"updated":"2014-09-02 15:05:24.000000000","message":"Why 3 nested contextlib.nested instead of one? Only one contextlib.nested would improve readibility","commit_id":"ea199c84f4f560ae7bc85ae263d6e0232e98423d"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"52db6e2bece6aa6175e7400a3fc466f00762827c","unresolved":false,"context_lines":[{"line_number":634,"context_line":"                                      query_params\u003dquery_params)"},{"line_number":635,"context_line":""},{"line_number":636,"context_line":"    def test_router_list_with_network_id_internal(self):"},{"line_number":637,"context_line":"        with contextlib.nested("},{"line_number":638,"context_line":"            self.router(name\u003d\u0027router1\u0027),"},{"line_number":639,"context_line":"            self.router(name\u003d\u0027router2\u0027)"},{"line_number":640,"context_line":"                              ) as (r1, r2):"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_5750145e","line":637,"in_reply_to":"fa98f980_57973790","updated":"2014-09-02 16:22:47.000000000","message":"I like the segregation this creates. IMO joining the routers, subnets and ports together in the same contextmanager negatively effects readability of the code, and the extra level of indentation helps clarify that more than one type of object is initialized.\n\nAlso, most of the other tests are also indenting the initialization this way as well, so the way I did it also contributes to consistency.\n\nThis is also relevant to the comment on L685.","commit_id":"ea199c84f4f560ae7bc85ae263d6e0232e98423d"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"c06405363c70013aaea1278f69fb182c0bc315f6","unresolved":false,"context_lines":[{"line_number":636,"context_line":"    def test_router_list_with_network_id_internal(self):"},{"line_number":637,"context_line":"        with contextlib.nested("},{"line_number":638,"context_line":"            self.router(name\u003d\u0027router1\u0027),"},{"line_number":639,"context_line":"            self.router(name\u003d\u0027router2\u0027)"},{"line_number":640,"context_line":"                              ) as (r1, r2):"},{"line_number":641,"context_line":"            with contextlib.nested("},{"line_number":642,"context_line":"                self.subnet(cidr\u003d\u002710.0.0.0/24\u0027),"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_e1f0d093","line":639,"updated":"2014-09-07 04:29:58.000000000","message":"I don\u0027t see these names used anywhere. Any reason for them?","commit_id":"ea199c84f4f560ae7bc85ae263d6e0232e98423d"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"7d5b619600e625189ea569eb574ffef7b6682c0b","unresolved":false,"context_lines":[{"line_number":636,"context_line":"    def test_router_list_with_network_id_internal(self):"},{"line_number":637,"context_line":"        with contextlib.nested("},{"line_number":638,"context_line":"            self.router(name\u003d\u0027router1\u0027),"},{"line_number":639,"context_line":"            self.router(name\u003d\u0027router2\u0027)"},{"line_number":640,"context_line":"                              ) as (r1, r2):"},{"line_number":641,"context_line":"            with contextlib.nested("},{"line_number":642,"context_line":"                self.subnet(cidr\u003d\u002710.0.0.0/24\u0027),"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_27874814","line":639,"in_reply_to":"fa98f980_e1f0d093","updated":"2014-09-07 08:21:44.000000000","message":"Done","commit_id":"ea199c84f4f560ae7bc85ae263d6e0232e98423d"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"c06405363c70013aaea1278f69fb182c0bc315f6","unresolved":false,"context_lines":[{"line_number":672,"context_line":"                    self._test_list_resources(\u0027router\u0027, [r1, r2],"},{"line_number":673,"context_line":"                                              query_params\u003dquery_params)"},{"line_number":674,"context_line":""},{"line_number":675,"context_line":"                    # Necessary clean-up"},{"line_number":676,"context_line":"                    self._router_interface_action(\u0027remove\u0027,"},{"line_number":677,"context_line":"                                                  r1[\u0027router\u0027][\u0027id\u0027],"},{"line_number":678,"context_line":"                                                  None,"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_01eeb4b4","line":675,"updated":"2014-09-07 04:29:58.000000000","message":"If you disable auto-deletion of the routers and subnets, these shouldn\u0027t be necessary. This test isn\u0027t for verifying cleanup anyway.","commit_id":"ea199c84f4f560ae7bc85ae263d6e0232e98423d"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"7d5b619600e625189ea569eb574ffef7b6682c0b","unresolved":false,"context_lines":[{"line_number":672,"context_line":"                    self._test_list_resources(\u0027router\u0027, [r1, r2],"},{"line_number":673,"context_line":"                                              query_params\u003dquery_params)"},{"line_number":674,"context_line":""},{"line_number":675,"context_line":"                    # Necessary clean-up"},{"line_number":676,"context_line":"                    self._router_interface_action(\u0027remove\u0027,"},{"line_number":677,"context_line":"                                                  r1[\u0027router\u0027][\u0027id\u0027],"},{"line_number":678,"context_line":"                                                  None,"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_478c4c36","line":675,"in_reply_to":"fa98f980_01eeb4b4","updated":"2014-09-07 08:21:44.000000000","message":"This was addressed in Patchset #11:\n\nhttps://review.openstack.org/#/c/111580/11/neutron/tests/unit/test_l3_plugin.py\n\nLong story short, the tests fails without this cleanup.","commit_id":"ea199c84f4f560ae7bc85ae263d6e0232e98423d"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"033d657b790805d5d20822162eb78761175c483e","unresolved":false,"context_lines":[{"line_number":641,"context_line":"                                   ) as (s1, s2):"},{"line_number":642,"context_line":"                with contextlib.nested("},{"line_number":643,"context_line":"                        self.port(subnet\u003ds1, do_delete\u003dFalse),"},{"line_number":644,"context_line":"                        self.port(subnet\u003ds2, do_delete\u003dFalse)"},{"line_number":645,"context_line":"                                       ) as (network1_port, network2_port):"},{"line_number":646,"context_line":""},{"line_number":647,"context_line":"                    # Connect the ports to the routers"}],"source_content_type":"text/x-python","patch_set":16,"id":"baa201ad_43c87d74","line":644,"updated":"2014-10-13 12:16:13.000000000","message":"no more do_delete. Resource cleanup is now explicit.","commit_id":"45f2b948cdb998e7a2bde1f6abf4b21f699d41ff"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"96ad1d5ffb437a919250582228fb46b6406739f2","unresolved":false,"context_lines":[{"line_number":641,"context_line":"                                   ) as (s1, s2):"},{"line_number":642,"context_line":"                with contextlib.nested("},{"line_number":643,"context_line":"                        self.port(subnet\u003ds1, do_delete\u003dFalse),"},{"line_number":644,"context_line":"                        self.port(subnet\u003ds2, do_delete\u003dFalse)"},{"line_number":645,"context_line":"                                       ) as (network1_port, network2_port):"},{"line_number":646,"context_line":""},{"line_number":647,"context_line":"                    # Connect the ports to the routers"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_04cb1a73","line":644,"in_reply_to":"baa201ad_43c87d74","updated":"2014-11-10 12:34:14.000000000","message":"Done","commit_id":"45f2b948cdb998e7a2bde1f6abf4b21f699d41ff"}]}
