)]}'
{"neutron/db/l3_db.py":[{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"a1f145917f6de28f978a9223442717e8b7ca6325","unresolved":false,"context_lines":[{"line_number":663,"context_line":"            return port, subnets"},{"line_number":664,"context_line":""},{"line_number":665,"context_line":"    def _add_interface_by_port(self, context, router, port_id, owner):"},{"line_number":666,"context_line":"        # Update owner before actual process in order to avoid the"},{"line_number":667,"context_line":"        # case where a port might get attached to a router without the"},{"line_number":668,"context_line":"        # owner successfully updating due to an unavailable backend."},{"line_number":669,"context_line":"        port \u003d self._check_router_port(context, port_id, \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a9d85d2_f4239c03","line":666,"updated":"2016-06-20 20:25:29.000000000","message":"So, if we will get Exception while updating port, old owner will be reasigned? Is it possible to change owner for port? What\u0027s the use case?","commit_id":"96865d94176ddf3eca65519157149cae4c6eff5b"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"174c0c9bbb9ef95e3594ea89ff027e84f41ec141","unresolved":false,"context_lines":[{"line_number":663,"context_line":"            return port, subnets"},{"line_number":664,"context_line":""},{"line_number":665,"context_line":"    def _add_interface_by_port(self, context, router, port_id, owner):"},{"line_number":666,"context_line":"        # Update owner before actual process in order to avoid the"},{"line_number":667,"context_line":"        # case where a port might get attached to a router without the"},{"line_number":668,"context_line":"        # owner successfully updating due to an unavailable backend."},{"line_number":669,"context_line":"        port \u003d self._check_router_port(context, port_id, \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_914a2882","line":666,"in_reply_to":"5a9d85d2_f4239c03","updated":"2016-06-22 12:00:26.000000000","message":"Yes, old device_owner and device_id will be restored. The id is checked for \u0027\u0027, otherwise it wouldn\u0027t have come till __add_interface_by_port().\n\nI am not sure if the owner can be changed directly. But I thought, from this routine\u0027s perspective it\u0027s apt to restore it back.","commit_id":"96865d94176ddf3eca65519157149cae4c6eff5b"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"7a69447ab85cc9e8e11e2062fbb3ddfb86dbced4","unresolved":false,"context_lines":[{"line_number":625,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":626,"context_line":"        return port"},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"    def __add_interface_by_port(self, context, router, port_id):"},{"line_number":629,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":630,"context_line":"            # check again within transaction to mitigate race"},{"line_number":631,"context_line":"            port \u003d self._check_router_port(context, port_id, router.id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_74ef7187","line":628,"updated":"2016-06-23 10:36:26.000000000","message":"Actually, this method is not related to adding interface, it only makes some checks. I guess, it\u0027s better to rename this method (and I\u0027d prefer not to use double leading underscores in method name)","commit_id":"568b7313e9c7e985eadd274821463259f6b76479"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"eafd30cef6375346fed3f355ec597f6036ae0245","unresolved":false,"context_lines":[{"line_number":625,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":626,"context_line":"        return port"},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"    def __add_interface_by_port(self, context, router, port_id):"},{"line_number":629,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":630,"context_line":"            # check again within transaction to mitigate race"},{"line_number":631,"context_line":"            port \u003d self._check_router_port(context, port_id, router.id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_630696cf","line":628,"in_reply_to":"3aaa91ec_74ef7187","updated":"2016-06-23 11:40:40.000000000","message":"OK. Done.","commit_id":"568b7313e9c7e985eadd274821463259f6b76479"}],"neutron/tests/unit/extensions/test_l3.py":[{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"a1f145917f6de28f978a9223442717e8b7ca6325","unresolved":false,"context_lines":[{"line_number":1252,"context_line":"                 self.subnet(network\u003dn, cidr\u003d\u002710.0.1.0/24\u0027)) as s2:"},{"line_number":1253,"context_line":"                fixed_ips \u003d [{\u0027subnet_id\u0027: s1[\u0027subnet\u0027][\u0027id\u0027]},"},{"line_number":1254,"context_line":"                             {\u0027subnet_id\u0027: s2[\u0027subnet\u0027][\u0027id\u0027]}]"},{"line_number":1255,"context_line":"                orig_update_port \u003d self.plugin.update_port"},{"line_number":1256,"context_line":"                with self.port(subnet\u003ds1, fixed_ips\u003dfixed_ips) as p, ("},{"line_number":1257,"context_line":"                        mock.patch.object(self.plugin,"},{"line_number":1258,"context_line":"                                          \u0027update_port\u0027)) as update_port:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a9d85d2_54c5503a","line":1255,"updated":"2016-06-20 20:25:29.000000000","message":"It\u0027s very hard to read this code. Could you assign couple variables and reuse them? `r[\u0027router\u0027][\u0027id\u0027]` and `p[\u0027port\u0027][\u0027id\u0027]` seem to be couple times repeated.","commit_id":"96865d94176ddf3eca65519157149cae4c6eff5b"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"b80e5f7e5af8bde72274fc270e570b16bf4d4447","unresolved":false,"context_lines":[{"line_number":1252,"context_line":"                 self.subnet(network\u003dn, cidr\u003d\u002710.0.1.0/24\u0027)) as s2:"},{"line_number":1253,"context_line":"                fixed_ips \u003d [{\u0027subnet_id\u0027: s1[\u0027subnet\u0027][\u0027id\u0027]},"},{"line_number":1254,"context_line":"                             {\u0027subnet_id\u0027: s2[\u0027subnet\u0027][\u0027id\u0027]}]"},{"line_number":1255,"context_line":"                orig_update_port \u003d self.plugin.update_port"},{"line_number":1256,"context_line":"                with self.port(subnet\u003ds1, fixed_ips\u003dfixed_ips) as p, ("},{"line_number":1257,"context_line":"                        mock.patch.object(self.plugin,"},{"line_number":1258,"context_line":"                                          \u0027update_port\u0027)) as update_port:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_375216de","line":1255,"in_reply_to":"3aaa91ec_3156d429","updated":"2016-06-23 07:01:16.000000000","message":"Done","commit_id":"96865d94176ddf3eca65519157149cae4c6eff5b"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"174c0c9bbb9ef95e3594ea89ff027e84f41ec141","unresolved":false,"context_lines":[{"line_number":1252,"context_line":"                 self.subnet(network\u003dn, cidr\u003d\u002710.0.1.0/24\u0027)) as s2:"},{"line_number":1253,"context_line":"                fixed_ips \u003d [{\u0027subnet_id\u0027: s1[\u0027subnet\u0027][\u0027id\u0027]},"},{"line_number":1254,"context_line":"                             {\u0027subnet_id\u0027: s2[\u0027subnet\u0027][\u0027id\u0027]}]"},{"line_number":1255,"context_line":"                orig_update_port \u003d self.plugin.update_port"},{"line_number":1256,"context_line":"                with self.port(subnet\u003ds1, fixed_ips\u003dfixed_ips) as p, ("},{"line_number":1257,"context_line":"                        mock.patch.object(self.plugin,"},{"line_number":1258,"context_line":"                                          \u0027update_port\u0027)) as update_port:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_3156d429","line":1255,"in_reply_to":"5a9d85d2_54c5503a","updated":"2016-06-22 12:00:26.000000000","message":"OK. I\u0027ll do that with the next PS.","commit_id":"96865d94176ddf3eca65519157149cae4c6eff5b"}]}
