)]}'
{"neutron/agent/common/async_process.py":[{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"a15a189bbfbd1920baf3b0742e3e596ebd70f2c8","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        # If using sudo rootwrap as a root_helper, we have to wait until sudo"},{"line_number":100,"context_line":"        # spawns rootwrap and rootwrap spawns the process. self.pid will make"},{"line_number":101,"context_line":"        # sure to get the correct pid."},{"line_number":102,"context_line":"        print(\"NATE: base is neutron.agent.common.aasync_process.AsyncProcess\")"},{"line_number":103,"context_line":"        return utils.pid_invoked_with_cmdline("},{"line_number":104,"context_line":"            self.pid, self.cmd_without_namespace)"},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"9fdfeff1_f8722e7c","line":102,"range":{"start_line":102,"start_character":0,"end_line":102,"end_character":79},"updated":"2019-02-08 13:29:33.000000000","message":"Some debugging leftover","commit_id":"61c5cb2837cabd6d55fb0eddcde98ca23f446ef8"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"ad013a2691deaeab26c8565be7254b4a26f22ee4","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        # If using sudo rootwrap as a root_helper, we have to wait until sudo"},{"line_number":100,"context_line":"        # spawns rootwrap and rootwrap spawns the process. self.pid will make"},{"line_number":101,"context_line":"        # sure to get the correct pid."},{"line_number":102,"context_line":"        print(\"NATE: base is neutron.agent.common.aasync_process.AsyncProcess\")"},{"line_number":103,"context_line":"        return utils.pid_invoked_with_cmdline("},{"line_number":104,"context_line":"            self.pid, self.cmd_without_namespace)"},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"9fdfeff1_c830980a","line":102,"range":{"start_line":102,"start_character":0,"end_line":102,"end_character":79},"in_reply_to":"9fdfeff1_f8722e7c","updated":"2019-02-11 21:10:29.000000000","message":"Ugh!  I hate when I do that.  Fixed.","commit_id":"61c5cb2837cabd6d55fb0eddcde98ca23f446ef8"}],"neutron/db/db_base_plugin_common.py":[{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"16d85e59e2f3df729d67a79bf82885b21fd01d15","unresolved":false,"context_lines":[{"line_number":222,"context_line":"            if isinstance(port, port_obj.Port):"},{"line_number":223,"context_line":"                port_data \u003d port.db_obj"},{"line_number":224,"context_line":"            resource_extend.apply_funcs(port_def.COLLECTION_NAME, res,"},{"line_number":225,"context_line":"                    port_data)"},{"line_number":226,"context_line":"        return db_utils.resource_fields(res, fields)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    def _get_network(self, context, id):"}],"source_content_type":"text/x-python","patch_set":18,"id":"bfdaf3ff_706dda30","line":225,"range":{"start_line":225,"start_character":19,"end_line":225,"end_character":29},"updated":"2019-01-17 03:30:55.000000000","message":"Nit: I think this is under indented","commit_id":"0bde41ed0e93bb349dd3fec94d7026e98442c05f"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"61b6f515af69ced7a66fd442a5f34196360f1bce","unresolved":false,"context_lines":[{"line_number":222,"context_line":"            if isinstance(port, port_obj.Port):"},{"line_number":223,"context_line":"                port_data \u003d port.db_obj"},{"line_number":224,"context_line":"            resource_extend.apply_funcs(port_def.COLLECTION_NAME, res,"},{"line_number":225,"context_line":"                    port_data)"},{"line_number":226,"context_line":"        return db_utils.resource_fields(res, fields)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    def _get_network(self, context, id):"}],"source_content_type":"text/x-python","patch_set":18,"id":"bfdaf3ff_6a171847","line":225,"range":{"start_line":225,"start_character":19,"end_line":225,"end_character":29},"in_reply_to":"bfdaf3ff_706dda30","updated":"2019-01-18 19:16:24.000000000","message":"Done.  I\u0027m surprised pep8 let that pass.","commit_id":"0bde41ed0e93bb349dd3fec94d7026e98442c05f"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"7096a4626dcbf0b4f9d4a623d8914aad9a7b821e","unresolved":false,"context_lines":[{"line_number":208,"context_line":"               \u0027name\u0027: port[\u0027name\u0027],"},{"line_number":209,"context_line":"               \"network_id\": port[\"network_id\"],"},{"line_number":210,"context_line":"               \u0027tenant_id\u0027: port[\u0027tenant_id\u0027],"},{"line_number":211,"context_line":"               \"mac_address\": str(port[\"mac_address\"]),"},{"line_number":212,"context_line":"               \"admin_state_up\": port[\"admin_state_up\"],"},{"line_number":213,"context_line":"               \"status\": port[\"status\"],"},{"line_number":214,"context_line":"               \"fixed_ips\": [{\u0027subnet_id\u0027: ip[\"subnet_id\"],"}],"source_content_type":"text/x-python","patch_set":30,"id":"9fdfeff1_86a15749","line":211,"range":{"start_line":211,"start_character":30,"end_line":211,"end_character":33},"updated":"2019-02-07 17:46:14.000000000","message":"Does this need to be coerced into a string?","commit_id":"61c5cb2837cabd6d55fb0eddcde98ca23f446ef8"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"84a25c4972e4aeb57db80a5ed02631cef2a84d09","unresolved":false,"context_lines":[{"line_number":208,"context_line":"               \u0027name\u0027: port[\u0027name\u0027],"},{"line_number":209,"context_line":"               \"network_id\": port[\"network_id\"],"},{"line_number":210,"context_line":"               \u0027tenant_id\u0027: port[\u0027tenant_id\u0027],"},{"line_number":211,"context_line":"               \"mac_address\": str(port[\"mac_address\"]),"},{"line_number":212,"context_line":"               \"admin_state_up\": port[\"admin_state_up\"],"},{"line_number":213,"context_line":"               \"status\": port[\"status\"],"},{"line_number":214,"context_line":"               \"fixed_ips\": [{\u0027subnet_id\u0027: ip[\"subnet_id\"],"}],"source_content_type":"text/x-python","patch_set":30,"id":"9fdfeff1_6559bb33","line":211,"range":{"start_line":211,"start_character":30,"end_line":211,"end_character":33},"in_reply_to":"9fdfeff1_86a15749","updated":"2019-02-08 11:56:35.000000000","message":"Yes, because it is an EUI.","commit_id":"61c5cb2837cabd6d55fb0eddcde98ca23f446ef8"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"83cecd87af97c904dfa80816fe194fdff87a0237","unresolved":false,"context_lines":[{"line_number":221,"context_line":"            port_data \u003d port"},{"line_number":222,"context_line":"            if isinstance(port, port_obj.Port):"},{"line_number":223,"context_line":"                port_data \u003d port.db_obj"},{"line_number":224,"context_line":"            resource_extend.apply_funcs(port_def.COLLECTION_NAME, res,"},{"line_number":225,"context_line":"                port_data)"},{"line_number":226,"context_line":"        return db_utils.resource_fields(res, fields)"},{"line_number":227,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"9fdfeff1_482b3e94","line":224,"updated":"2019-02-12 09:46:16.000000000","message":"nitty nit: You could move all arguments to the next line :)","commit_id":"719df276d120084a9870bb9875a59d94328d85fc"}],"neutron/db/db_base_plugin_v2.py":[{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"7096a4626dcbf0b4f9d4a623d8914aad9a7b821e","unresolved":false,"context_lines":[{"line_number":1271,"context_line":"    def create_port_bulk(self, context, ports):"},{"line_number":1272,"context_line":"        return self._create_bulk(\u0027port\u0027, context, ports)"},{"line_number":1273,"context_line":""},{"line_number":1274,"context_line":"    def _port_obj_bulk_postcreation(self, context, port_obj):"},{"line_number":1275,"context_line":"        port_dict \u003d self._make_port_dict(port_obj, process_extensions\u003dFalse)"},{"line_number":1276,"context_line":"        port_compat \u003d {\u0027port\u0027: port_dict}"},{"line_number":1277,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"}],"source_content_type":"text/x-python","patch_set":30,"id":"9fdfeff1_c6651f1f","line":1274,"range":{"start_line":1274,"start_character":8,"end_line":1274,"end_character":35},"updated":"2019-02-07 17:46:14.000000000","message":"_port_obj_postcreation() instead? Or perhaps we can turn this into a bulk operation by looping over a list of ports?","commit_id":"61c5cb2837cabd6d55fb0eddcde98ca23f446ef8"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"43b405683b5cd95281f562b83dbbb73ee8628021","unresolved":false,"context_lines":[{"line_number":1271,"context_line":"    def create_port_bulk(self, context, ports):"},{"line_number":1272,"context_line":"        return self._create_bulk(\u0027port\u0027, context, ports)"},{"line_number":1273,"context_line":""},{"line_number":1274,"context_line":"    def _port_obj_bulk_postcreation(self, context, port_obj):"},{"line_number":1275,"context_line":"        port_dict \u003d self._make_port_dict(port_obj, process_extensions\u003dFalse)"},{"line_number":1276,"context_line":"        port_compat \u003d {\u0027port\u0027: port_dict}"},{"line_number":1277,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"}],"source_content_type":"text/x-python","patch_set":30,"id":"9fdfeff1_712ad9e7","line":1274,"range":{"start_line":1274,"start_character":8,"end_line":1274,"end_character":35},"in_reply_to":"9fdfeff1_859a9fc2","updated":"2019-02-08 16:02:52.000000000","message":"After thinking about it, I think it may just be the name of the method throwing me off. This doesn\u0027t actually do anything in bulk, which is what got me thinking about alternatives. I think it makes sense to split this out like you\u0027ve done, it does look cleaner that way.","commit_id":"61c5cb2837cabd6d55fb0eddcde98ca23f446ef8"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"84a25c4972e4aeb57db80a5ed02631cef2a84d09","unresolved":false,"context_lines":[{"line_number":1271,"context_line":"    def create_port_bulk(self, context, ports):"},{"line_number":1272,"context_line":"        return self._create_bulk(\u0027port\u0027, context, ports)"},{"line_number":1273,"context_line":""},{"line_number":1274,"context_line":"    def _port_obj_bulk_postcreation(self, context, port_obj):"},{"line_number":1275,"context_line":"        port_dict \u003d self._make_port_dict(port_obj, process_extensions\u003dFalse)"},{"line_number":1276,"context_line":"        port_compat \u003d {\u0027port\u0027: port_dict}"},{"line_number":1277,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"}],"source_content_type":"text/x-python","patch_set":30,"id":"9fdfeff1_859a9fc2","line":1274,"range":{"start_line":1274,"start_character":8,"end_line":1274,"end_character":35},"in_reply_to":"9fdfeff1_c6651f1f","updated":"2019-02-08 11:56:35.000000000","message":"Yeah, this is an artifact of some of the struggles I had getting this to properly handle all the edge cases represented in the unit tests.  Do you think that this logic should be merged back into _create_db_port_object_bulk then?  That already has the loop going.  What do you think would be a cleaner approach?","commit_id":"61c5cb2837cabd6d55fb0eddcde98ca23f446ef8"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"43b405683b5cd95281f562b83dbbb73ee8628021","unresolved":false,"context_lines":[{"line_number":1274,"context_line":"    def _port_obj_bulk_postcreation(self, context, port_obj):"},{"line_number":1275,"context_line":"        port_dict \u003d self._make_port_dict(port_obj, process_extensions\u003dFalse)"},{"line_number":1276,"context_line":"        port_compat \u003d {\u0027port\u0027: port_dict}"},{"line_number":1277,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":1278,"context_line":"            self.extension_manager.process_create_port(context, port_dict,"},{"line_number":1279,"context_line":"                                                       port_obj)"},{"line_number":1280,"context_line":"            self._portsec_ext_port_create_processing(context, port_dict,"}],"source_content_type":"text/x-python","patch_set":30,"id":"9fdfeff1_3134514a","line":1277,"range":{"start_line":1277,"start_character":41,"end_line":1277,"end_character":48},"updated":"2019-02-08 16:02:52.000000000","message":"context.session?","commit_id":"61c5cb2837cabd6d55fb0eddcde98ca23f446ef8"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"ad013a2691deaeab26c8565be7254b4a26f22ee4","unresolved":false,"context_lines":[{"line_number":1274,"context_line":"    def _port_obj_bulk_postcreation(self, context, port_obj):"},{"line_number":1275,"context_line":"        port_dict \u003d self._make_port_dict(port_obj, process_extensions\u003dFalse)"},{"line_number":1276,"context_line":"        port_compat \u003d {\u0027port\u0027: port_dict}"},{"line_number":1277,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":1278,"context_line":"            self.extension_manager.process_create_port(context, port_dict,"},{"line_number":1279,"context_line":"                                                       port_obj)"},{"line_number":1280,"context_line":"            self._portsec_ext_port_create_processing(context, port_dict,"}],"source_content_type":"text/x-python","patch_set":30,"id":"9fdfeff1_88085028","line":1277,"range":{"start_line":1277,"start_character":41,"end_line":1277,"end_character":48},"in_reply_to":"9fdfeff1_3134514a","updated":"2019-02-11 21:10:29.000000000","message":"Hmm, \"with db_api.CONTEXT_WRITER.using(context)\" is all over the place, I count 126 instances in my neutron repo:\n\nhttp://codesearch.openstack.org/?q\u003dwith%20db_api.CONTEXT_WRITER.using\u0026i\u003dnope\u0026files\u003d\u0026repos\u003dneutron\n\nBut that being said I think it can be contained within the higher level transaction I started in create_port_bulk in the ML2 plugin.  So let\u0027s see if we can do without this.","commit_id":"61c5cb2837cabd6d55fb0eddcde98ca23f446ef8"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"43b405683b5cd95281f562b83dbbb73ee8628021","unresolved":false,"context_lines":[{"line_number":1320,"context_line":"    def _create_db_port_obj_bulk(self, context, port_data):"},{"line_number":1321,"context_line":"        db_ports \u003d []"},{"line_number":1322,"context_line":"        macs \u003d self._generate_macs(len(port_data))"},{"line_number":1323,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":1324,"context_line":"            for port in port_data:"},{"line_number":1325,"context_line":"                raw_mac_address \u003d port.pop(\u0027mac_address\u0027,"},{"line_number":1326,"context_line":"                    constants.ATTR_NOT_SPECIFIED)"}],"source_content_type":"text/x-python","patch_set":30,"id":"9fdfeff1_b12041f9","line":1323,"range":{"start_line":1323,"start_character":41,"end_line":1323,"end_character":48},"updated":"2019-02-08 16:02:52.000000000","message":"context.session?","commit_id":"61c5cb2837cabd6d55fb0eddcde98ca23f446ef8"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"ad013a2691deaeab26c8565be7254b4a26f22ee4","unresolved":false,"context_lines":[{"line_number":1320,"context_line":"    def _create_db_port_obj_bulk(self, context, port_data):"},{"line_number":1321,"context_line":"        db_ports \u003d []"},{"line_number":1322,"context_line":"        macs \u003d self._generate_macs(len(port_data))"},{"line_number":1323,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":1324,"context_line":"            for port in port_data:"},{"line_number":1325,"context_line":"                raw_mac_address \u003d port.pop(\u0027mac_address\u0027,"},{"line_number":1326,"context_line":"                    constants.ATTR_NOT_SPECIFIED)"}],"source_content_type":"text/x-python","patch_set":30,"id":"9fdfeff1_083540da","line":1323,"range":{"start_line":1323,"start_character":41,"end_line":1323,"end_character":48},"in_reply_to":"9fdfeff1_b12041f9","updated":"2019-02-11 21:10:29.000000000","message":"See above.","commit_id":"61c5cb2837cabd6d55fb0eddcde98ca23f446ef8"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"7096a4626dcbf0b4f9d4a623d8914aad9a7b821e","unresolved":false,"context_lines":[{"line_number":1333,"context_line":"                                            id\u003duuidutils.generate_uuid(),"},{"line_number":1334,"context_line":"                                            **port)"},{"line_number":1335,"context_line":"                db_port_obj.create()"},{"line_number":1336,"context_line":"                bound_port \u003d self._port_obj_bulk_postcreation(context,"},{"line_number":1337,"context_line":"                                                              db_port_obj)"},{"line_number":1338,"context_line":"                db_ports.append(bound_port)"},{"line_number":1339,"context_line":"        return db_ports"},{"line_number":1340,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"9fdfeff1_26766bda","line":1337,"range":{"start_line":1336,"start_character":16,"end_line":1337,"end_character":74},"updated":"2019-02-07 17:46:14.000000000","message":"See comment at L1274","commit_id":"61c5cb2837cabd6d55fb0eddcde98ca23f446ef8"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"84a25c4972e4aeb57db80a5ed02631cef2a84d09","unresolved":false,"context_lines":[{"line_number":1333,"context_line":"                                            id\u003duuidutils.generate_uuid(),"},{"line_number":1334,"context_line":"                                            **port)"},{"line_number":1335,"context_line":"                db_port_obj.create()"},{"line_number":1336,"context_line":"                bound_port \u003d self._port_obj_bulk_postcreation(context,"},{"line_number":1337,"context_line":"                                                              db_port_obj)"},{"line_number":1338,"context_line":"                db_ports.append(bound_port)"},{"line_number":1339,"context_line":"        return db_ports"},{"line_number":1340,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"9fdfeff1_253bb3c8","line":1337,"range":{"start_line":1336,"start_character":16,"end_line":1337,"end_character":74},"in_reply_to":"9fdfeff1_26766bda","updated":"2019-02-08 11:56:35.000000000","message":"ibid","commit_id":"61c5cb2837cabd6d55fb0eddcde98ca23f446ef8"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"83cecd87af97c904dfa80816fe194fdff87a0237","unresolved":false,"context_lines":[{"line_number":1285,"context_line":"        # cache network lookups"},{"line_number":1286,"context_line":"        port_network \u003d port_dict[\u0027network_id\u0027]"},{"line_number":1287,"context_line":"        network_cache \u003d dict()"},{"line_number":1288,"context_line":"        if port_network in network_cache:"},{"line_number":1289,"context_line":"            network \u003d network_cache[port_network]"},{"line_number":1290,"context_line":"        else:"},{"line_number":1291,"context_line":"            network \u003d self.get_network(context, port_network)"}],"source_content_type":"text/x-python","patch_set":31,"id":"9fdfeff1_48049e18","line":1288,"updated":"2019-02-12 09:46:16.000000000","message":"how this can be true if You just declared network_cache as empty dict in line above? What am I missing?","commit_id":"719df276d120084a9870bb9875a59d94328d85fc"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"11b70d3a9f1568c45e69de97ce36e9ba3081c0c4","unresolved":false,"context_lines":[{"line_number":1285,"context_line":"        # cache network lookups"},{"line_number":1286,"context_line":"        port_network \u003d port_dict[\u0027network_id\u0027]"},{"line_number":1287,"context_line":"        network_cache \u003d dict()"},{"line_number":1288,"context_line":"        if port_network in network_cache:"},{"line_number":1289,"context_line":"            network \u003d network_cache[port_network]"},{"line_number":1290,"context_line":"        else:"},{"line_number":1291,"context_line":"            network \u003d self.get_network(context, port_network)"}],"source_content_type":"text/x-python","patch_set":31,"id":"9fdfeff1_9d992bc5","line":1288,"in_reply_to":"9fdfeff1_48049e18","updated":"2019-02-15 22:39:01.000000000","message":"OK this is a relic from before I moved this code out to it\u0027s own function; that initialization needs to be outside the for loop obviously.  Thanks for the catch!","commit_id":"719df276d120084a9870bb9875a59d94328d85fc"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"83cecd87af97c904dfa80816fe194fdff87a0237","unresolved":false,"context_lines":[{"line_number":1291,"context_line":"            network \u003d self.get_network(context, port_network)"},{"line_number":1292,"context_line":"            network_cache[port_network] \u003d network"},{"line_number":1293,"context_line":"        # process port binding"},{"line_number":1294,"context_line":"        binding \u003d db.add_port_binding(context, port_dict[\u0027id\u0027])"},{"line_number":1295,"context_line":"        mech_context \u003d driver_context.PortContext(self, context,"},{"line_number":1296,"context_line":"                                                  port_dict, network,"},{"line_number":1297,"context_line":"                                                  binding, None)"},{"line_number":1298,"context_line":"        self._process_port_binding(mech_context, port_dict)"},{"line_number":1299,"context_line":"        # process allowed address pairs"},{"line_number":1300,"context_line":"        port_obj[addr_apidef.ADDRESS_PAIRS] \u003d ("}],"source_content_type":"text/x-python","patch_set":31,"id":"9fdfeff1_cb1e485e","line":1297,"range":{"start_line":1294,"start_character":0,"end_line":1297,"end_character":64},"updated":"2019-02-12 09:46:16.000000000","message":"do we really want to make such dependency between db_base_plugin and ML2 plugin? What about other plugins which may still use db_base_plugin_v2 module from neutron? Will it work for them?","commit_id":"719df276d120084a9870bb9875a59d94328d85fc"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"11b70d3a9f1568c45e69de97ce36e9ba3081c0c4","unresolved":false,"context_lines":[{"line_number":1291,"context_line":"            network \u003d self.get_network(context, port_network)"},{"line_number":1292,"context_line":"            network_cache[port_network] \u003d network"},{"line_number":1293,"context_line":"        # process port binding"},{"line_number":1294,"context_line":"        binding \u003d db.add_port_binding(context, port_dict[\u0027id\u0027])"},{"line_number":1295,"context_line":"        mech_context \u003d driver_context.PortContext(self, context,"},{"line_number":1296,"context_line":"                                                  port_dict, network,"},{"line_number":1297,"context_line":"                                                  binding, None)"},{"line_number":1298,"context_line":"        self._process_port_binding(mech_context, port_dict)"},{"line_number":1299,"context_line":"        # process allowed address pairs"},{"line_number":1300,"context_line":"        port_obj[addr_apidef.ADDRESS_PAIRS] \u003d ("}],"source_content_type":"text/x-python","patch_set":31,"id":"9fdfeff1_c706e2ce","line":1297,"range":{"start_line":1294,"start_character":0,"end_line":1297,"end_character":64},"in_reply_to":"9fdfeff1_cb1e485e","updated":"2019-02-15 22:39:01.000000000","message":"Very good point.  Relocated code into ML2 plugin.","commit_id":"719df276d120084a9870bb9875a59d94328d85fc"}],"neutron/db/extradhcpopt_db.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"83cecd87af97c904dfa80816fe194fdff87a0237","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    @resource_extend.extends([port_def.COLLECTION_NAME])"},{"line_number":122,"context_line":"    def _extend_port_dict_extra_dhcp_opt(res, port):"},{"line_number":123,"context_line":"        if isinstance(port, port_obj.Port):"},{"line_number":124,"context_line":"            port_list \u003d port.get(\u0027dhcp_options\u0027)"},{"line_number":125,"context_line":"        else:"},{"line_number":126,"context_line":"            port_list \u003d port.dhcp_opts"},{"line_number":127,"context_line":"        res[edo_ext.EXTRADHCPOPTS] \u003d [{\u0027opt_name\u0027: dho.opt_name,"}],"source_content_type":"text/x-python","patch_set":31,"id":"9fdfeff1_8b41203c","line":124,"range":{"start_line":124,"start_character":12,"end_line":124,"end_character":21},"updated":"2019-02-12 09:46:16.000000000","message":"nit: I would name it like \"port_dhcp_options\" or something like that","commit_id":"719df276d120084a9870bb9875a59d94328d85fc"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"11b70d3a9f1568c45e69de97ce36e9ba3081c0c4","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    @resource_extend.extends([port_def.COLLECTION_NAME])"},{"line_number":122,"context_line":"    def _extend_port_dict_extra_dhcp_opt(res, port):"},{"line_number":123,"context_line":"        if isinstance(port, port_obj.Port):"},{"line_number":124,"context_line":"            port_list \u003d port.get(\u0027dhcp_options\u0027)"},{"line_number":125,"context_line":"        else:"},{"line_number":126,"context_line":"            port_list \u003d port.dhcp_opts"},{"line_number":127,"context_line":"        res[edo_ext.EXTRADHCPOPTS] \u003d [{\u0027opt_name\u0027: dho.opt_name,"}],"source_content_type":"text/x-python","patch_set":31,"id":"9fdfeff1_3c96e14d","line":124,"range":{"start_line":124,"start_character":12,"end_line":124,"end_character":21},"in_reply_to":"9fdfeff1_8b41203c","updated":"2019-02-15 22:39:01.000000000","message":"Done","commit_id":"719df276d120084a9870bb9875a59d94328d85fc"}],"neutron/db/models/agent.py":[{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"a15a189bbfbd1920baf3b0742e3e596ebd70f2c8","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    @property"},{"line_number":58,"context_line":"    def is_active(self):"},{"line_number":59,"context_line":"        print(\"NATE: base is neutron.db.models.agent.Agent\")"},{"line_number":60,"context_line":"        return not utils.is_agent_down(self.heartbeat_timestamp)"}],"source_content_type":"text/x-python","patch_set":30,"id":"9fdfeff1_d815eae6","line":59,"range":{"start_line":59,"start_character":8,"end_line":59,"end_character":60},"updated":"2019-02-08 13:29:33.000000000","message":"some debug leftover","commit_id":"61c5cb2837cabd6d55fb0eddcde98ca23f446ef8"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"ad013a2691deaeab26c8565be7254b4a26f22ee4","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    @property"},{"line_number":58,"context_line":"    def is_active(self):"},{"line_number":59,"context_line":"        print(\"NATE: base is neutron.db.models.agent.Agent\")"},{"line_number":60,"context_line":"        return not utils.is_agent_down(self.heartbeat_timestamp)"}],"source_content_type":"text/x-python","patch_set":30,"id":"9fdfeff1_681f2c70","line":59,"range":{"start_line":59,"start_character":8,"end_line":59,"end_character":60},"in_reply_to":"9fdfeff1_d815eae6","updated":"2019-02-11 21:10:29.000000000","message":"Done","commit_id":"61c5cb2837cabd6d55fb0eddcde98ca23f446ef8"}],"neutron/db/securitygroups_db.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"83cecd87af97c904dfa80816fe194fdff87a0237","unresolved":false,"context_lines":[{"line_number":794,"context_line":""},{"line_number":795,"context_line":"    def _ensure_default_security_group_on_port(self, context, port):"},{"line_number":796,"context_line":"        # we don\u0027t apply security groups for dhcp, router"},{"line_number":797,"context_line":"        attrs \u003d port[\u0027port\u0027]"},{"line_number":798,"context_line":"        if attrs.get(\u0027device_owner\u0027) and net.is_port_trusted(attrs):"},{"line_number":799,"context_line":"            return"},{"line_number":800,"context_line":"        port_sg \u003d attrs.get(ext_sg.SECURITYGROUPS)"}],"source_content_type":"text/x-python","patch_set":31,"id":"9fdfeff1_eba6ac0f","line":797,"updated":"2019-02-12 09:46:16.000000000","message":"is this change somehow related to this patch?","commit_id":"719df276d120084a9870bb9875a59d94328d85fc"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"11b70d3a9f1568c45e69de97ce36e9ba3081c0c4","unresolved":false,"context_lines":[{"line_number":794,"context_line":""},{"line_number":795,"context_line":"    def _ensure_default_security_group_on_port(self, context, port):"},{"line_number":796,"context_line":"        # we don\u0027t apply security groups for dhcp, router"},{"line_number":797,"context_line":"        attrs \u003d port[\u0027port\u0027]"},{"line_number":798,"context_line":"        if attrs.get(\u0027device_owner\u0027) and net.is_port_trusted(attrs):"},{"line_number":799,"context_line":"            return"},{"line_number":800,"context_line":"        port_sg \u003d attrs.get(ext_sg.SECURITYGROUPS)"}],"source_content_type":"text/x-python","patch_set":31,"id":"9fdfeff1_9c990d6e","line":797,"in_reply_to":"9fdfeff1_eba6ac0f","updated":"2019-02-15 22:39:01.000000000","message":"Hmm, this was an artifact of debugging early on but I think the problem was somewhere else.  Reverting.","commit_id":"719df276d120084a9870bb9875a59d94328d85fc"}],"neutron/objects/agent.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"83cecd87af97c904dfa80816fe194fdff87a0237","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    @property"},{"line_number":84,"context_line":"    def is_active(self):"},{"line_number":85,"context_line":"        print(\"NATE: base is neutron.objects.agent.Agent\")"},{"line_number":86,"context_line":"        return not utils.is_agent_down(self.heartbeat_timestamp)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    # TODO(ihrachys) reuse query builder from"}],"source_content_type":"text/x-python","patch_set":31,"id":"9fdfeff1_0b85305a","line":85,"updated":"2019-02-12 09:46:16.000000000","message":"debug to remove :)","commit_id":"719df276d120084a9870bb9875a59d94328d85fc"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"11b70d3a9f1568c45e69de97ce36e9ba3081c0c4","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    @property"},{"line_number":84,"context_line":"    def is_active(self):"},{"line_number":85,"context_line":"        print(\"NATE: base is neutron.objects.agent.Agent\")"},{"line_number":86,"context_line":"        return not utils.is_agent_down(self.heartbeat_timestamp)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    # TODO(ihrachys) reuse query builder from"}],"source_content_type":"text/x-python","patch_set":31,"id":"9fdfeff1_dcbc75bc","line":85,"in_reply_to":"9fdfeff1_0b85305a","updated":"2019-02-15 22:39:01.000000000","message":"SMH.  done.","commit_id":"719df276d120084a9870bb9875a59d94328d85fc"}],"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"16d85e59e2f3df729d67a79bf82885b21fd01d15","unresolved":false,"context_lines":[{"line_number":1333,"context_line":""},{"line_number":1334,"context_line":"    @utils.transaction_guard"},{"line_number":1335,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1336,"context_line":"    def create_port_bulk(self, context, ports):"},{"line_number":1337,"context_line":"        # In case the bulk port request is the first introduction of ports into"},{"line_number":1338,"context_line":"        # the tenant, make sure that the default security group exists.  This"},{"line_number":1339,"context_line":"        # should not bind the port requests to be in that security group of"}],"source_content_type":"text/x-python","patch_set":18,"id":"bfdaf3ff_107d6ee6","line":1336,"updated":"2019-01-17 03:30:55.000000000","message":"What happens to the precommit, postcommit and _bind_port_if_needed calls for the ports? How are we going to address that functionality?","commit_id":"0bde41ed0e93bb349dd3fec94d7026e98442c05f"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"61b6f515af69ced7a66fd442a5f34196360f1bce","unresolved":false,"context_lines":[{"line_number":1333,"context_line":""},{"line_number":1334,"context_line":"    @utils.transaction_guard"},{"line_number":1335,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1336,"context_line":"    def create_port_bulk(self, context, ports):"},{"line_number":1337,"context_line":"        # In case the bulk port request is the first introduction of ports into"},{"line_number":1338,"context_line":"        # the tenant, make sure that the default security group exists.  This"},{"line_number":1339,"context_line":"        # should not bind the port requests to be in that security group of"}],"source_content_type":"text/x-python","patch_set":18,"id":"bfdaf3ff_5b1a246f","line":1336,"in_reply_to":"bfdaf3ff_107d6ee6","updated":"2019-01-18 19:16:24.000000000","message":"Hmm, I don\u0027t see such a thing as POSTCOMMIT [1].  I changed the code to call _after_create_port, which should handle calling _bind_port_if_needed.  Take a look and make sure I have readded the PRECOMMIT code in the right place.\n\n[1] http://codesearch.openstack.org/?q\u003dPOSTCOMMIT\u0026i\u003dnope\u0026files\u003d\u0026repos\u003dneutron","commit_id":"0bde41ed0e93bb349dd3fec94d7026e98442c05f"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"59329ac295b5b13dc3c91f651a62ae0ffb13b8f0","unresolved":false,"context_lines":[{"line_number":1356,"context_line":"        try:"},{"line_number":1357,"context_line":"            for port_obj in objects:"},{"line_number":1358,"context_line":"                port_dict \u003d self._make_port_dict(port_obj)"},{"line_number":1359,"context_line":"                network \u003d self.get_network(context, port_dict[\u0027network_id\u0027])"},{"line_number":1360,"context_line":"                binding \u003d db.add_port_binding(context, port_dict[\u0027id\u0027])"},{"line_number":1361,"context_line":"                mech_context \u003d driver_context.PortContext(self, context,"},{"line_number":1362,"context_line":"                                                          port_dict, network,"}],"source_content_type":"text/x-python","patch_set":18,"id":"bfdaf3ff_73516162","line":1359,"updated":"2019-01-17 08:36:29.000000000","message":"maybe You can cache network objects which You already get from db for previous ports in this call. That might limit number of db queries if many ports will be created in same network","commit_id":"0bde41ed0e93bb349dd3fec94d7026e98442c05f"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"61b6f515af69ced7a66fd442a5f34196360f1bce","unresolved":false,"context_lines":[{"line_number":1356,"context_line":"        try:"},{"line_number":1357,"context_line":"            for port_obj in objects:"},{"line_number":1358,"context_line":"                port_dict \u003d self._make_port_dict(port_obj)"},{"line_number":1359,"context_line":"                network \u003d self.get_network(context, port_dict[\u0027network_id\u0027])"},{"line_number":1360,"context_line":"                binding \u003d db.add_port_binding(context, port_dict[\u0027id\u0027])"},{"line_number":1361,"context_line":"                mech_context \u003d driver_context.PortContext(self, context,"},{"line_number":1362,"context_line":"                                                          port_dict, network,"}],"source_content_type":"text/x-python","patch_set":18,"id":"bfdaf3ff_3d9cf868","line":1359,"in_reply_to":"bfdaf3ff_73516162","updated":"2019-01-18 19:16:24.000000000","message":"Great idea.  Done.","commit_id":"0bde41ed0e93bb349dd3fec94d7026e98442c05f"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"59329ac295b5b13dc3c91f651a62ae0ffb13b8f0","unresolved":false,"context_lines":[{"line_number":1369,"context_line":"        except exc.NeutronException as e:"},{"line_number":1370,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1371,"context_line":"                LOG.error(\"bulk port binding failed on port \u0027%s\u0027 \""},{"line_number":1372,"context_line":"                        \"for reason %s, cleaning up allocated ports\","},{"line_number":1373,"context_line":"                        port_dict[\u0027id\u0027], str(e))"},{"line_number":1374,"context_line":"                self.delete_port(context, port_dict[\u0027id\u0027], l3_port_check\u003dFalse)"},{"line_number":1375,"context_line":"                for port in results:"}],"source_content_type":"text/x-python","patch_set":18,"id":"bfdaf3ff_d3c7ed11","line":1372,"updated":"2019-01-17 08:36:29.000000000","message":"nit: please align indentation to line above","commit_id":"0bde41ed0e93bb349dd3fec94d7026e98442c05f"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"61b6f515af69ced7a66fd442a5f34196360f1bce","unresolved":false,"context_lines":[{"line_number":1369,"context_line":"        except exc.NeutronException as e:"},{"line_number":1370,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1371,"context_line":"                LOG.error(\"bulk port binding failed on port \u0027%s\u0027 \""},{"line_number":1372,"context_line":"                        \"for reason %s, cleaning up allocated ports\","},{"line_number":1373,"context_line":"                        port_dict[\u0027id\u0027], str(e))"},{"line_number":1374,"context_line":"                self.delete_port(context, port_dict[\u0027id\u0027], l3_port_check\u003dFalse)"},{"line_number":1375,"context_line":"                for port in results:"}],"source_content_type":"text/x-python","patch_set":18,"id":"bfdaf3ff_fd2f503c","line":1372,"in_reply_to":"bfdaf3ff_d3c7ed11","updated":"2019-01-18 19:16:24.000000000","message":"Done","commit_id":"0bde41ed0e93bb349dd3fec94d7026e98442c05f"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"59329ac295b5b13dc3c91f651a62ae0ffb13b8f0","unresolved":false,"context_lines":[{"line_number":1374,"context_line":"                self.delete_port(context, port_dict[\u0027id\u0027], l3_port_check\u003dFalse)"},{"line_number":1375,"context_line":"                for port in results:"},{"line_number":1376,"context_line":"                    LOG.error(\"bulk port binding failed, deleting port \u0027%s\u0027\","},{"line_number":1377,"context_line":"                            port[\u0027id\u0027])"},{"line_number":1378,"context_line":"                    self.delete_port(context, port[\u0027id\u0027], l3_port_check\u003dFalse)"},{"line_number":1379,"context_line":""},{"line_number":1380,"context_line":"        return results"}],"source_content_type":"text/x-python","patch_set":18,"id":"bfdaf3ff_b3d4a9be","line":1377,"updated":"2019-01-17 08:36:29.000000000","message":"nit: indentation","commit_id":"0bde41ed0e93bb349dd3fec94d7026e98442c05f"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"61b6f515af69ced7a66fd442a5f34196360f1bce","unresolved":false,"context_lines":[{"line_number":1374,"context_line":"                self.delete_port(context, port_dict[\u0027id\u0027], l3_port_check\u003dFalse)"},{"line_number":1375,"context_line":"                for port in results:"},{"line_number":1376,"context_line":"                    LOG.error(\"bulk port binding failed, deleting port \u0027%s\u0027\","},{"line_number":1377,"context_line":"                            port[\u0027id\u0027])"},{"line_number":1378,"context_line":"                    self.delete_port(context, port[\u0027id\u0027], l3_port_check\u003dFalse)"},{"line_number":1379,"context_line":""},{"line_number":1380,"context_line":"        return results"}],"source_content_type":"text/x-python","patch_set":18,"id":"bfdaf3ff_3d0078ab","line":1377,"in_reply_to":"bfdaf3ff_b3d4a9be","updated":"2019-01-18 19:16:24.000000000","message":"Done","commit_id":"0bde41ed0e93bb349dd3fec94d7026e98442c05f"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"ab29d18f85147c264fa8c9d0c749667c5da1981d","unresolved":false,"context_lines":[{"line_number":1345,"context_line":"        port_array \u003d ports.get(\u0027ports\u0027)"},{"line_number":1346,"context_line":"        firstport \u003d port_array[0]"},{"line_number":1347,"context_line":"        attrs \u003d firstport[port_def.RESOURCE_NAME]"},{"line_number":1348,"context_line":"        default_sg \u003d self._ensure_default_security_group(context, attrs[\u0027tenant_id\u0027])"},{"line_number":1349,"context_line":"        for port in port_array:"},{"line_number":1350,"context_line":"            attrs \u003d port[port_def.RESOURCE_NAME]"},{"line_number":1351,"context_line":"            if not attrs.get(\u0027status\u0027):"}],"source_content_type":"text/x-python","patch_set":20,"id":"9fdfeff1_582ab1e7","line":1348,"updated":"2019-01-18 20:42:03.000000000","message":"Do you need to do this?  I think it will get done via calls below:\n\nself._portsec_ext_port_create_processing()\n  self._ensure_default_security_group_on_port()\n    default_sg \u003d self._ensure_default_security_group()","commit_id":"85da2b7d34aaa6101c55c0b118dc195e9e3c2352"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"b44e6f47b4334cb9eadee56a19eac56fd41f114e","unresolved":false,"context_lines":[{"line_number":1345,"context_line":"        port_array \u003d ports.get(\u0027ports\u0027)"},{"line_number":1346,"context_line":"        firstport \u003d port_array[0]"},{"line_number":1347,"context_line":"        attrs \u003d firstport[port_def.RESOURCE_NAME]"},{"line_number":1348,"context_line":"        default_sg \u003d self._ensure_default_security_group(context, attrs[\u0027tenant_id\u0027])"},{"line_number":1349,"context_line":"        for port in port_array:"},{"line_number":1350,"context_line":"            attrs \u003d port[port_def.RESOURCE_NAME]"},{"line_number":1351,"context_line":"            if not attrs.get(\u0027status\u0027):"}],"source_content_type":"text/x-python","patch_set":20,"id":"9fdfeff1_0347de1f","line":1348,"in_reply_to":"9fdfeff1_582ab1e7","updated":"2019-01-18 21:40:02.000000000","message":"Then that is a problem; one of the speed optimizations identified at the outset was running _ensure_default_security_group() for every port when it only needed to be run once.  I\u0027ll have to figure out an alternative approach then.","commit_id":"85da2b7d34aaa6101c55c0b118dc195e9e3c2352"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"54ca33e5831bcdcba39ef757511968cc8cd6f23d","unresolved":false,"context_lines":[{"line_number":1371,"context_line":""},{"line_number":1372,"context_line":"                # What are the arguments here?  TODO"},{"line_number":1373,"context_line":"                self.extension_manager.process_create_port(context,"},{"line_number":1374,"context_line":"                                                           port_dict,"},{"line_number":1375,"context_line":"                                                           port_dict)"},{"line_number":1376,"context_line":"                self._portsec_ext_port_create_processing(context, port_dict,"},{"line_number":1377,"context_line":"                                                         port_compat)"}],"source_content_type":"text/x-python","patch_set":20,"id":"9fdfeff1_38124db3","line":1374,"range":{"start_line":1374,"start_character":59,"end_line":1374,"end_character":68},"updated":"2019-01-18 21:23:56.000000000","message":"s/attrs","commit_id":"85da2b7d34aaa6101c55c0b118dc195e9e3c2352"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"b44e6f47b4334cb9eadee56a19eac56fd41f114e","unresolved":false,"context_lines":[{"line_number":1371,"context_line":""},{"line_number":1372,"context_line":"                # What are the arguments here?  TODO"},{"line_number":1373,"context_line":"                self.extension_manager.process_create_port(context,"},{"line_number":1374,"context_line":"                                                           port_dict,"},{"line_number":1375,"context_line":"                                                           port_dict)"},{"line_number":1376,"context_line":"                self._portsec_ext_port_create_processing(context, port_dict,"},{"line_number":1377,"context_line":"                                                         port_compat)"}],"source_content_type":"text/x-python","patch_set":20,"id":"9fdfeff1_4345e616","line":1374,"range":{"start_line":1374,"start_character":59,"end_line":1374,"end_character":68},"in_reply_to":"9fdfeff1_38124db3","updated":"2019-01-18 21:40:02.000000000","message":"attrs doesn\u0027t exist here.  It was defined on L1350, when we went through the ports before running create_port_obj_bulk... but is we assume that ordering is unreliable in the resultant array there\u0027s no easy way to match up the attrs from back there to the port_obj we have here.","commit_id":"85da2b7d34aaa6101c55c0b118dc195e9e3c2352"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"54ca33e5831bcdcba39ef757511968cc8cd6f23d","unresolved":false,"context_lines":[{"line_number":1378,"context_line":""},{"line_number":1379,"context_line":"                # sgids must be got after portsec checked with security group"},{"line_number":1380,"context_line":"                sgids \u003d self._get_security_groups_on_port(context, port)"},{"line_number":1381,"context_line":"                self._process_port_create_security_group(context, port_dict,"},{"line_number":1382,"context_line":"                                                         sgids)"},{"line_number":1383,"context_line":"                binding \u003d db.add_port_binding(context, port_dict[\u0027id\u0027])"},{"line_number":1384,"context_line":"                mech_context \u003d driver_context.PortContext(self, context,"}],"source_content_type":"text/x-python","patch_set":20,"id":"9fdfeff1_c346b650","line":1381,"updated":"2019-01-18 21:23:56.000000000","message":"Should this have an \u0027if sgids\u0027 ?  it could trash the default SG that might have been put into the port already.","commit_id":"85da2b7d34aaa6101c55c0b118dc195e9e3c2352"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"b44e6f47b4334cb9eadee56a19eac56fd41f114e","unresolved":false,"context_lines":[{"line_number":1378,"context_line":""},{"line_number":1379,"context_line":"                # sgids must be got after portsec checked with security group"},{"line_number":1380,"context_line":"                sgids \u003d self._get_security_groups_on_port(context, port)"},{"line_number":1381,"context_line":"                self._process_port_create_security_group(context, port_dict,"},{"line_number":1382,"context_line":"                                                         sgids)"},{"line_number":1383,"context_line":"                binding \u003d db.add_port_binding(context, port_dict[\u0027id\u0027])"},{"line_number":1384,"context_line":"                mech_context \u003d driver_context.PortContext(self, context,"}],"source_content_type":"text/x-python","patch_set":20,"id":"9fdfeff1_6304aac7","line":1381,"in_reply_to":"9fdfeff1_c346b650","updated":"2019-01-18 21:40:02.000000000","message":"Hmm, it works for the non-bulk port methodology at L1283 at what looks like a similar point in the process.","commit_id":"85da2b7d34aaa6101c55c0b118dc195e9e3c2352"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"2f18595a850abbe214e90171edfa47ceabca2e49","unresolved":false,"context_lines":[{"line_number":1372,"context_line":"                else:"},{"line_number":1373,"context_line":"                    network \u003d self.get_network(context, port_network)"},{"line_number":1374,"context_line":""},{"line_number":1375,"context_line":"                # What are the arguments here?  TODO"},{"line_number":1376,"context_line":"                self.extension_manager.process_create_port(context,"},{"line_number":1377,"context_line":"                                                           port_dict,"},{"line_number":1378,"context_line":"                                                           port_dict)"}],"source_content_type":"text/x-python","patch_set":21,"id":"9fdfeff1_97f0b692","line":1375,"range":{"start_line":1375,"start_character":18,"end_line":1375,"end_character":47},"updated":"2019-01-22 19:32:26.000000000","message":"I think the first argument is the dict passed on the request, and the second argument is the result you are returning (this seems to append fields to the result).\n\nFor reference https://github.com/openstack/neutron/blob/430d2afd25f56c7a63081efeed59c1dcfe19548d/neutron/db/portsecurity_db_common.py#L44","commit_id":"f3af0503f76b2b9e31acfdd3fd425b63c0a3a693"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"ca4423121063800cc4a0eda51d1aa77ce257a9e4","unresolved":false,"context_lines":[{"line_number":1372,"context_line":"                else:"},{"line_number":1373,"context_line":"                    network \u003d self.get_network(context, port_network)"},{"line_number":1374,"context_line":""},{"line_number":1375,"context_line":"                # What are the arguments here?  TODO"},{"line_number":1376,"context_line":"                self.extension_manager.process_create_port(context,"},{"line_number":1377,"context_line":"                                                           port_dict,"},{"line_number":1378,"context_line":"                                                           port_dict)"}],"source_content_type":"text/x-python","patch_set":21,"id":"9fdfeff1_c608bfda","line":1375,"range":{"start_line":1375,"start_character":18,"end_line":1375,"end_character":47},"in_reply_to":"9fdfeff1_97f0b692","updated":"2019-01-23 22:28:37.000000000","message":"So since the array of dicts is passed to create_port_obj_bulk() and an array of objects is returned (presumably without any guarantee of ordering) it sounds like the only way is to execute this code while knowing both the request dict \u0027port\u0027 and the result port object at the same time.  To do that means making these calls from lower in the call stack, in _create_db_port_obj_bulk().  See subsequent comment.","commit_id":"f3af0503f76b2b9e31acfdd3fd425b63c0a3a693"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"41ddb3ed13ae4c0d2c404ac95b8f9d5c5662627c","unresolved":false,"context_lines":[{"line_number":1389,"context_line":"                                                          binding, None)"},{"line_number":1390,"context_line":"                self._process_port_binding(mech_context, attrs)"},{"line_number":1391,"context_line":"                kwargs \u003d {\u0027context\u0027: context, \u0027port\u0027: port_dict}"},{"line_number":1392,"context_line":"                registry.notify("},{"line_number":1393,"context_line":"                    resources.PORT, events.PRECOMMIT_CREATE, self, **kwargs)"},{"line_number":1394,"context_line":"                self.mechanism_manager.create_port_precommit(mech_context)"},{"line_number":1395,"context_line":"                self._setup_dhcp_agent_provisioning_component(context,"},{"line_number":1396,"context_line":"                                                              port_dict)"},{"line_number":1397,"context_line":"                bound_port \u003d self._after_create_port(context, port_dict,"}],"source_content_type":"text/x-python","patch_set":21,"id":"9fdfeff1_e4118055","line":1394,"range":{"start_line":1392,"start_character":0,"end_line":1394,"end_character":74},"updated":"2019-01-19 01:41:38.000000000","message":"The problem with the way you are doing the \"pre-commit\" work here is that the transaction has already been committed in L1361 above. What I think needs to happen is that L1361 and the loop up until this point have to be inside a writer transaction and then you need a second loop, outside the transaction, with the lines below","commit_id":"f3af0503f76b2b9e31acfdd3fd425b63c0a3a693"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"2f18595a850abbe214e90171edfa47ceabca2e49","unresolved":false,"context_lines":[{"line_number":1389,"context_line":"                                                          binding, None)"},{"line_number":1390,"context_line":"                self._process_port_binding(mech_context, attrs)"},{"line_number":1391,"context_line":"                kwargs \u003d {\u0027context\u0027: context, \u0027port\u0027: port_dict}"},{"line_number":1392,"context_line":"                registry.notify("},{"line_number":1393,"context_line":"                    resources.PORT, events.PRECOMMIT_CREATE, self, **kwargs)"},{"line_number":1394,"context_line":"                self.mechanism_manager.create_port_precommit(mech_context)"},{"line_number":1395,"context_line":"                self._setup_dhcp_agent_provisioning_component(context,"},{"line_number":1396,"context_line":"                                                              port_dict)"},{"line_number":1397,"context_line":"                bound_port \u003d self._after_create_port(context, port_dict,"}],"source_content_type":"text/x-python","patch_set":21,"id":"9fdfeff1_9719967a","line":1394,"range":{"start_line":1392,"start_character":0,"end_line":1394,"end_character":74},"in_reply_to":"9fdfeff1_e4118055","updated":"2019-01-22 19:32:26.000000000","message":"+1","commit_id":"f3af0503f76b2b9e31acfdd3fd425b63c0a3a693"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"ca4423121063800cc4a0eda51d1aa77ce257a9e4","unresolved":false,"context_lines":[{"line_number":1389,"context_line":"                                                          binding, None)"},{"line_number":1390,"context_line":"                self._process_port_binding(mech_context, attrs)"},{"line_number":1391,"context_line":"                kwargs \u003d {\u0027context\u0027: context, \u0027port\u0027: port_dict}"},{"line_number":1392,"context_line":"                registry.notify("},{"line_number":1393,"context_line":"                    resources.PORT, events.PRECOMMIT_CREATE, self, **kwargs)"},{"line_number":1394,"context_line":"                self.mechanism_manager.create_port_precommit(mech_context)"},{"line_number":1395,"context_line":"                self._setup_dhcp_agent_provisioning_component(context,"},{"line_number":1396,"context_line":"                                                              port_dict)"},{"line_number":1397,"context_line":"                bound_port \u003d self._after_create_port(context, port_dict,"}],"source_content_type":"text/x-python","patch_set":21,"id":"9fdfeff1_5c8a571b","line":1394,"range":{"start_line":1392,"start_character":0,"end_line":1394,"end_character":74},"in_reply_to":"9fdfeff1_e4118055","updated":"2019-01-23 22:28:37.000000000","message":"Seems like these lines should more rightfully go inside the context writer in _create_db_port_obj_bulk() [1] since that is the immediate pre-commit environment for the port.  Once these lines are removed from this area, what is the best way to get the mech_context for each port as I iterate through them?\n\n[1] https://git.openstack.org/cgit/openstack/neutron/tree/neutron/db/db_base_plugin_v2.py#n1270","commit_id":"f3af0503f76b2b9e31acfdd3fd425b63c0a3a693"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"41ddb3ed13ae4c0d2c404ac95b8f9d5c5662627c","unresolved":false,"context_lines":[{"line_number":1394,"context_line":"                self.mechanism_manager.create_port_precommit(mech_context)"},{"line_number":1395,"context_line":"                self._setup_dhcp_agent_provisioning_component(context,"},{"line_number":1396,"context_line":"                                                              port_dict)"},{"line_number":1397,"context_line":"                bound_port \u003d self._after_create_port(context, port_dict,"},{"line_number":1398,"context_line":"                                                     mech_context)"},{"line_number":1399,"context_line":"                results.append(bound_port)"},{"line_number":1400,"context_line":"        except exc.NeutronException as e:"}],"source_content_type":"text/x-python","patch_set":21,"id":"9fdfeff1_a906f11f","line":1397,"updated":"2019-01-19 01:41:38.000000000","message":"By calling this, you are calling create_port_postcommit and _bind_port_if_needed which is what I meant in my previous review: https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/plugin.py#L1314:L1321","commit_id":"f3af0503f76b2b9e31acfdd3fd425b63c0a3a693"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"ca4423121063800cc4a0eda51d1aa77ce257a9e4","unresolved":false,"context_lines":[{"line_number":1394,"context_line":"                self.mechanism_manager.create_port_precommit(mech_context)"},{"line_number":1395,"context_line":"                self._setup_dhcp_agent_provisioning_component(context,"},{"line_number":1396,"context_line":"                                                              port_dict)"},{"line_number":1397,"context_line":"                bound_port \u003d self._after_create_port(context, port_dict,"},{"line_number":1398,"context_line":"                                                     mech_context)"},{"line_number":1399,"context_line":"                results.append(bound_port)"},{"line_number":1400,"context_line":"        except exc.NeutronException as e:"}],"source_content_type":"text/x-python","patch_set":21,"id":"9fdfeff1_7c8ddb2f","line":1397,"in_reply_to":"9fdfeff1_a906f11f","updated":"2019-01-23 22:28:37.000000000","message":"Gotcha, thanks.","commit_id":"f3af0503f76b2b9e31acfdd3fd425b63c0a3a693"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"41837f7ee4314e458585388b647d85da78b5f74d","unresolved":false,"context_lines":[{"line_number":1346,"context_line":"                default_sg \u003d self._ensure_default_security_group(context,"},{"line_number":1347,"context_line":"                                                                 tenant_id)"},{"line_number":1348,"context_line":"                tenant_id_cache[tenant_id] \u003d default_sg"},{"line_number":1349,"context_line":"            # if not port.get(\u0027device_owner\u0027) or not net.is_port_trusted(port):"},{"line_number":1350,"context_line":"            #    port[ext_sg.SECURITYGROUPS] \u003d [tenant_id_cache[tenant_id]]"},{"line_number":1351,"context_line":""},{"line_number":1352,"context_line":"    @utils.transaction_guard"},{"line_number":1353,"context_line":"    @db_api.retry_if_session_inactive()"}],"source_content_type":"text/x-python","patch_set":25,"id":"9fdfeff1_93570527","line":1350,"range":{"start_line":1349,"start_character":11,"end_line":1350,"end_character":75},"updated":"2019-01-28 23:39:56.000000000","message":"might wanted to remove commented code?","commit_id":"d9b55fd4946ae9a2e2bdf3b4970f450c4421ab66"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"70bd7f3a1e23957b7402c4665a6e4c3975789a29","unresolved":false,"context_lines":[{"line_number":1346,"context_line":"                default_sg \u003d self._ensure_default_security_group(context,"},{"line_number":1347,"context_line":"                                                                 tenant_id)"},{"line_number":1348,"context_line":"                tenant_id_cache[tenant_id] \u003d default_sg"},{"line_number":1349,"context_line":"            # if not port.get(\u0027device_owner\u0027) or not net.is_port_trusted(port):"},{"line_number":1350,"context_line":"            #    port[ext_sg.SECURITYGROUPS] \u003d [tenant_id_cache[tenant_id]]"},{"line_number":1351,"context_line":""},{"line_number":1352,"context_line":"    @utils.transaction_guard"},{"line_number":1353,"context_line":"    @db_api.retry_if_session_inactive()"}],"source_content_type":"text/x-python","patch_set":25,"id":"9fdfeff1_dbb58033","line":1350,"range":{"start_line":1349,"start_character":11,"end_line":1350,"end_character":75},"in_reply_to":"9fdfeff1_93570527","updated":"2019-01-30 16:24:38.000000000","message":"Done","commit_id":"d9b55fd4946ae9a2e2bdf3b4970f450c4421ab66"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"41837f7ee4314e458585388b647d85da78b5f74d","unresolved":false,"context_lines":[{"line_number":1365,"context_line":"        except exc.NeutronException as e:"},{"line_number":1366,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1367,"context_line":"                for port in results:"},{"line_number":1368,"context_line":"                    LOG.error(\"bulk port binding failed, deleting port \u0027%s\u0027\","},{"line_number":1369,"context_line":"                              port[\u0027id\u0027])"},{"line_number":1370,"context_line":"                    self.delete_port(context, port[\u0027id\u0027], l3_port_check\u003dFalse)"},{"line_number":1371,"context_line":"                results \u003d []"}],"source_content_type":"text/x-python","patch_set":25,"id":"9fdfeff1_531c3d77","line":1368,"range":{"start_line":1368,"start_character":41,"end_line":1368,"end_character":48},"updated":"2019-01-28 23:39:56.000000000","message":"IMO, this sounds more like creation rather? as binding depends if backend or mech_driver successfully execute bind_port, so I think \"bulk port creation failed\" would be more meaningful here.","commit_id":"d9b55fd4946ae9a2e2bdf3b4970f450c4421ab66"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"70bd7f3a1e23957b7402c4665a6e4c3975789a29","unresolved":false,"context_lines":[{"line_number":1365,"context_line":"        except exc.NeutronException as e:"},{"line_number":1366,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1367,"context_line":"                for port in results:"},{"line_number":1368,"context_line":"                    LOG.error(\"bulk port binding failed, deleting port \u0027%s\u0027\","},{"line_number":1369,"context_line":"                              port[\u0027id\u0027])"},{"line_number":1370,"context_line":"                    self.delete_port(context, port[\u0027id\u0027], l3_port_check\u003dFalse)"},{"line_number":1371,"context_line":"                results \u003d []"}],"source_content_type":"text/x-python","patch_set":25,"id":"9fdfeff1_3badace8","line":1368,"range":{"start_line":1368,"start_character":41,"end_line":1368,"end_character":48},"in_reply_to":"9fdfeff1_531c3d77","updated":"2019-01-30 16:24:38.000000000","message":"Done","commit_id":"d9b55fd4946ae9a2e2bdf3b4970f450c4421ab66"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"7096a4626dcbf0b4f9d4a623d8914aad9a7b821e","unresolved":false,"context_lines":[{"line_number":1362,"context_line":"            return results"},{"line_number":1363,"context_line":"        except exc.NeutronException as e:"},{"line_number":1364,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1365,"context_line":"                for port in results:"},{"line_number":1366,"context_line":"                    LOG.error(\"bulk port creation failed, deleting port \u0027%s\u0027\","},{"line_number":1367,"context_line":"                              port[\u0027id\u0027])"},{"line_number":1368,"context_line":"                    self.delete_port(context, port[\u0027id\u0027], l3_port_check\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":30,"id":"9fdfeff1_a94c6c76","line":1365,"range":{"start_line":1365,"start_character":16,"end_line":1365,"end_character":35},"updated":"2019-02-07 17:46:14.000000000","message":"Here we\u0027re looping over results to clean up, but results will be an empty list if create_port_obj_bulk() raises an exception. That means that we wouldn\u0027t end up cleaning up anything if an exception is raised.\n\nAs an aside: it may not be possible, but I\u0027m struck by how nice it would be if there were a way to run a bulk create operation in a single transaction that simply rolls back on an error so that this sort of cleanup isn\u0027t required.","commit_id":"61c5cb2837cabd6d55fb0eddcde98ca23f446ef8"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"ad013a2691deaeab26c8565be7254b4a26f22ee4","unresolved":false,"context_lines":[{"line_number":1362,"context_line":"            return results"},{"line_number":1363,"context_line":"        except exc.NeutronException as e:"},{"line_number":1364,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1365,"context_line":"                for port in results:"},{"line_number":1366,"context_line":"                    LOG.error(\"bulk port creation failed, deleting port \u0027%s\u0027\","},{"line_number":1367,"context_line":"                              port[\u0027id\u0027])"},{"line_number":1368,"context_line":"                    self.delete_port(context, port[\u0027id\u0027], l3_port_check\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":30,"id":"9fdfeff1_4d27da13","line":1365,"range":{"start_line":1365,"start_character":16,"end_line":1365,"end_character":35},"in_reply_to":"9fdfeff1_71617939","updated":"2019-02-11 21:10:29.000000000","message":"Giving it a go.","commit_id":"61c5cb2837cabd6d55fb0eddcde98ca23f446ef8"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"43b405683b5cd95281f562b83dbbb73ee8628021","unresolved":false,"context_lines":[{"line_number":1362,"context_line":"            return results"},{"line_number":1363,"context_line":"        except exc.NeutronException as e:"},{"line_number":1364,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1365,"context_line":"                for port in results:"},{"line_number":1366,"context_line":"                    LOG.error(\"bulk port creation failed, deleting port \u0027%s\u0027\","},{"line_number":1367,"context_line":"                              port[\u0027id\u0027])"},{"line_number":1368,"context_line":"                    self.delete_port(context, port[\u0027id\u0027], l3_port_check\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":30,"id":"9fdfeff1_71617939","line":1365,"range":{"start_line":1365,"start_character":16,"end_line":1365,"end_character":35},"in_reply_to":"9fdfeff1_85837f56","updated":"2019-02-08 16:02:52.000000000","message":"See comments at L1323 and L1277 in neutron/db/db_base_plugin_v2.py. I wonder if it\u0027s as simple as 2 trivial changes to get this behavior.","commit_id":"61c5cb2837cabd6d55fb0eddcde98ca23f446ef8"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"07b1e4349e1307b855ab40b74cb596f0d79ee3c3","unresolved":false,"context_lines":[{"line_number":1362,"context_line":"            return results"},{"line_number":1363,"context_line":"        except exc.NeutronException as e:"},{"line_number":1364,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1365,"context_line":"                for port in results:"},{"line_number":1366,"context_line":"                    LOG.error(\"bulk port creation failed, deleting port \u0027%s\u0027\","},{"line_number":1367,"context_line":"                              port[\u0027id\u0027])"},{"line_number":1368,"context_line":"                    self.delete_port(context, port[\u0027id\u0027], l3_port_check\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":30,"id":"9fdfeff1_85837f56","line":1365,"range":{"start_line":1365,"start_character":16,"end_line":1365,"end_character":35},"in_reply_to":"9fdfeff1_a94c6c76","updated":"2019-02-08 12:06:28.000000000","message":"Let me cogitate on that, perhaps it is possible.","commit_id":"61c5cb2837cabd6d55fb0eddcde98ca23f446ef8"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"158632274df01eb47b5639e0667c8cfc0c3e15f1","unresolved":false,"context_lines":[{"line_number":1055,"context_line":"            # in database if needed"},{"line_number":1056,"context_line":"            # TODO(ihrachys) remove in Queens+ when mtu is not nullable"},{"line_number":1057,"context_line":"            net_data \u003d []"},{"line_number":1058,"context_line":"            for network in nets_db:"},{"line_number":1059,"context_line":"                if network.mtu is None:"},{"line_number":1060,"context_line":"                    network.mtu \u003d self._get_network_mtu(network,"},{"line_number":1061,"context_line":"                                                        validate\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":33,"id":"9fdfeff1_24677eed","line":1058,"range":{"start_line":1058,"start_character":19,"end_line":1058,"end_character":23},"updated":"2019-02-19 10:12:05.000000000","message":"nit: I see this as a useless change from net to network.","commit_id":"3eb6951f3f4226dcb453d29e94b975792b54a5a9"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"ef73f8bfb7c6161ea34d401651212d4ca6447aba","unresolved":false,"context_lines":[{"line_number":1055,"context_line":"            # in database if needed"},{"line_number":1056,"context_line":"            # TODO(ihrachys) remove in Queens+ when mtu is not nullable"},{"line_number":1057,"context_line":"            net_data \u003d []"},{"line_number":1058,"context_line":"            for network in nets_db:"},{"line_number":1059,"context_line":"                if network.mtu is None:"},{"line_number":1060,"context_line":"                    network.mtu \u003d self._get_network_mtu(network,"},{"line_number":1061,"context_line":"                                                        validate\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":33,"id":"9fdfeff1_74f0c7fe","line":1058,"range":{"start_line":1058,"start_character":19,"end_line":1058,"end_character":23},"in_reply_to":"9fdfeff1_24677eed","updated":"2019-02-19 19:36:40.000000000","message":"Done","commit_id":"3eb6951f3f4226dcb453d29e94b975792b54a5a9"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"6c7a0f5dfe57bdf92a7ba76adb189519dcfffdd1","unresolved":false,"context_lines":[{"line_number":1407,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":1408,"context_line":"            for port in ports:"},{"line_number":1409,"context_line":"                fixed_ips \u003d port[\u0027port\u0027].get(\u0027fixed_ips\u0027)"},{"line_number":1410,"context_line":"                if fixed_ips is not const.ATTR_NOT_SPECIFIED:"},{"line_number":1411,"context_line":"                    raise ml2_exc.BulkPortCannotHaveFixedIpError()"},{"line_number":1412,"context_line":"                pdata \u003d port[\u0027port\u0027]"},{"line_number":1413,"context_line":"                if pdata.get(\u0027device_owner\u0027):"},{"line_number":1414,"context_line":"                    self._enforce_device_owner_not_router_intf_or_device_id("}],"source_content_type":"text/x-python","patch_set":34,"id":"9fdfeff1_541c9ec0","line":1411,"range":{"start_line":1410,"start_character":16,"end_line":1411,"end_character":66},"updated":"2019-02-19 21:51:57.000000000","message":"Is this a change in behavior from the current implementation of bulk port create? It seems like this should be allowed. allocate_ips_for_port_and_store() at L1439 is capable of handling requests for specific fixed IP\u0027s. This seems like an unnecessary constraint.","commit_id":"43e8f2d113c68076417f2e62d354ff95eed92a6a"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"918517ec72138a0052ebc3b404d46603261609ef","unresolved":false,"context_lines":[{"line_number":1407,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":1408,"context_line":"            for port in ports:"},{"line_number":1409,"context_line":"                fixed_ips \u003d port[\u0027port\u0027].get(\u0027fixed_ips\u0027)"},{"line_number":1410,"context_line":"                if fixed_ips is not const.ATTR_NOT_SPECIFIED:"},{"line_number":1411,"context_line":"                    raise ml2_exc.BulkPortCannotHaveFixedIpError()"},{"line_number":1412,"context_line":"                pdata \u003d port[\u0027port\u0027]"},{"line_number":1413,"context_line":"                if pdata.get(\u0027device_owner\u0027):"},{"line_number":1414,"context_line":"                    self._enforce_device_owner_not_router_intf_or_device_id("}],"source_content_type":"text/x-python","patch_set":34,"id":"9fdfeff1_869c0e6b","line":1411,"range":{"start_line":1410,"start_character":16,"end_line":1411,"end_character":66},"in_reply_to":"9fdfeff1_541c9ec0","updated":"2019-02-20 22:07:33.000000000","message":"Originally this was intended as an optimization, but the way the code ended up I think we can support this.","commit_id":"43e8f2d113c68076417f2e62d354ff95eed92a6a"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"a52aa7940c2efc730e3705bae1d923a61f376074","unresolved":false,"context_lines":[{"line_number":1354,"context_line":""},{"line_number":1355,"context_line":"        return bound_context.current"},{"line_number":1356,"context_line":""},{"line_number":1357,"context_line":"    def _port_obj_bulk_postcreation(self, context, port_obj, network_cache):"},{"line_number":1358,"context_line":"        port_dict \u003d self._make_port_dict(port_obj, process_extensions\u003dFalse)"},{"line_number":1359,"context_line":"        port_compat \u003d {\u0027port\u0027: port_dict}"},{"line_number":1360,"context_line":"        self.extension_manager.process_create_port(context, port_dict,"}],"source_content_type":"text/x-python","patch_set":35,"id":"9fdfeff1_f7a8228d","line":1357,"range":{"start_line":1357,"start_character":18,"end_line":1357,"end_character":22},"updated":"2019-02-20 16:48:36.000000000","message":"nit: there isn\u0027t really anything bulk about this method. If you end up spinning a new patch set maybe we can rename this somehow.","commit_id":"ed4f0c83baabbd33b7b1f9aae1d1c75fc2738c08"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"918517ec72138a0052ebc3b404d46603261609ef","unresolved":false,"context_lines":[{"line_number":1354,"context_line":""},{"line_number":1355,"context_line":"        return bound_context.current"},{"line_number":1356,"context_line":""},{"line_number":1357,"context_line":"    def _port_obj_bulk_postcreation(self, context, port_obj, network_cache):"},{"line_number":1358,"context_line":"        port_dict \u003d self._make_port_dict(port_obj, process_extensions\u003dFalse)"},{"line_number":1359,"context_line":"        port_compat \u003d {\u0027port\u0027: port_dict}"},{"line_number":1360,"context_line":"        self.extension_manager.process_create_port(context, port_dict,"}],"source_content_type":"text/x-python","patch_set":35,"id":"9fdfeff1_ba503a60","line":1357,"range":{"start_line":1357,"start_character":18,"end_line":1357,"end_character":22},"in_reply_to":"9fdfeff1_c61c5115","updated":"2019-02-20 22:07:33.000000000","message":"Yeah, it\u0027s not doing anything bulk... but it only gets called from the bulk flow.  Perhaps if I respin I should rename it _port_obj_postcreation?","commit_id":"ed4f0c83baabbd33b7b1f9aae1d1c75fc2738c08"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"6ec4abe9dbe7f0cd2baea1ce0afeb1335afbe5ed","unresolved":false,"context_lines":[{"line_number":1354,"context_line":""},{"line_number":1355,"context_line":"        return bound_context.current"},{"line_number":1356,"context_line":""},{"line_number":1357,"context_line":"    def _port_obj_bulk_postcreation(self, context, port_obj, network_cache):"},{"line_number":1358,"context_line":"        port_dict \u003d self._make_port_dict(port_obj, process_extensions\u003dFalse)"},{"line_number":1359,"context_line":"        port_compat \u003d {\u0027port\u0027: port_dict}"},{"line_number":1360,"context_line":"        self.extension_manager.process_create_port(context, port_dict,"}],"source_content_type":"text/x-python","patch_set":35,"id":"9fdfeff1_c61c5115","line":1357,"range":{"start_line":1357,"start_character":18,"end_line":1357,"end_character":22},"in_reply_to":"9fdfeff1_f7a8228d","updated":"2019-02-20 19:24:30.000000000","message":"agree this is just handling single port, bulk sounds misleading here.","commit_id":"ed4f0c83baabbd33b7b1f9aae1d1c75fc2738c08"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"311fb438534fe3686406d0579a084de50b4be815","unresolved":false,"context_lines":[{"line_number":1446,"context_line":"            network_id \u003d pdata.get(\u0027network_id\u0027)"},{"line_number":1447,"context_line":"            if network_id not in network_ids:"},{"line_number":1448,"context_line":"                self._get_network(context, network_id)"},{"line_number":1449,"context_line":"                network_ids.add(network_id)"},{"line_number":1450,"context_line":""},{"line_number":1451,"context_line":"            db_ports \u003d self._create_db_port_obj_bulk(context, bulk_port_data)"},{"line_number":1452,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"9fdfeff1_47b056de","line":1449,"updated":"2019-02-21 02:37:46.000000000","message":"Is this block supposed to be under the for loop?  And then maybe there is a missing test for ports with multiple network_id\u0027s, or even a test with no ports since that might have had a problem as well.","commit_id":"ed4f0c83baabbd33b7b1f9aae1d1c75fc2738c08"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"3ae54ceb3ae946a2242b03b032a86fa8e761a1b8","unresolved":false,"context_lines":[{"line_number":1446,"context_line":"            network_id \u003d pdata.get(\u0027network_id\u0027)"},{"line_number":1447,"context_line":"            if network_id not in network_ids:"},{"line_number":1448,"context_line":"                self._get_network(context, network_id)"},{"line_number":1449,"context_line":"                network_ids.add(network_id)"},{"line_number":1450,"context_line":""},{"line_number":1451,"context_line":"            db_ports \u003d self._create_db_port_obj_bulk(context, bulk_port_data)"},{"line_number":1452,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"9fdfeff1_28238da9","line":1449,"updated":"2019-02-21 21:13:14.000000000","message":"Yes, that should have been under the for loop, it should catch the networks for every port.  I\u0027ll add a check for no network.  I don\u0027t think multiple networks is a concern, because in the structure of the object [1] network_id is not a list, it is a single UUID.\n\n[1] https://git.openstack.org/cgit/openstack/neutron/tree/neutron/objects/ports.py#n276","commit_id":"ed4f0c83baabbd33b7b1f9aae1d1c75fc2738c08"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"20b5ac043fe923bb71f070e52975f5d87197f45e","unresolved":false,"context_lines":[{"line_number":1444,"context_line":""},{"line_number":1445,"context_line":"                # Ensure that the networks exist."},{"line_number":1446,"context_line":"                network_id \u003d pdata.get(\u0027network_id\u0027)"},{"line_number":1447,"context_line":"                if network_id and network_id not in network_ids:"},{"line_number":1448,"context_line":"                    self._get_network(context, network_id)"},{"line_number":1449,"context_line":"                    network_ids.add(network_id)"},{"line_number":1450,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"9fdfeff1_f7331461","line":1447,"updated":"2019-02-22 15:02:04.000000000","message":"Just adding a note since I talked to Nate in irc about this.  If there isn\u0027t a network_id here, port creation will fail further down the line since it\u0027s a required field in the API.  An optimization in this code, or in _before_create_port_bulk(), would be good to short-circuit that so we don\u0027t create a bunch of objects that we then toss out.  Good for a follow-on change.","commit_id":"51d6f562c4bfe9406c5f08ac9463c500ca7f2eb5"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"5974af781903ed45e09c4871c87ef71fabf54987","unresolved":false,"context_lines":[{"line_number":733,"context_line":""},{"line_number":734,"context_line":"    @staticmethod"},{"line_number":735,"context_line":"    @resource_extend.extends([port_def.COLLECTION_NAME])"},{"line_number":736,"context_line":"    def _ml2_extend_port_dict_binding(port_res, port_db):"},{"line_number":737,"context_line":"        plugin \u003d directory.get_plugin()"},{"line_number":738,"context_line":"        if isinstance(port_db, ports_obj.Port):"},{"line_number":739,"context_line":"            bindings \u003d port_db.bindings"}],"source_content_type":"text/x-python","patch_set":38,"id":"9fdfeff1_a8b99479","line":736,"range":{"start_line":736,"start_character":48,"end_line":736,"end_character":55},"updated":"2019-02-25 09:00:34.000000000","message":"nitty nit (don\u0027t need to respin): I would personally rename it to \"port\" now as it may not always be \"db object\"","commit_id":"2ea35e26da893923cb84cef10d978733a1044d08"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"5974af781903ed45e09c4871c87ef71fabf54987","unresolved":false,"context_lines":[{"line_number":1079,"context_line":"                    net.mtu \u003d self._get_network_mtu(net,"},{"line_number":1080,"context_line":"                                                    validate\u003dFalse)"},{"line_number":1081,"context_line":"                net_data.append(self._make_network_dict(net,"},{"line_number":1082,"context_line":"                                                        context\u003dcontext))"},{"line_number":1083,"context_line":""},{"line_number":1084,"context_line":"            self.type_manager.extend_networks_dict_provider(context, net_data)"},{"line_number":1085,"context_line":"            nets \u003d self._filter_nets_provider(context, net_data, filters)"}],"source_content_type":"text/x-python","patch_set":38,"id":"9fdfeff1_28a5a447","line":1082,"updated":"2019-02-25 09:00:34.000000000","message":"nit: not related changes","commit_id":"2ea35e26da893923cb84cef10d978733a1044d08"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"5974af781903ed45e09c4871c87ef71fabf54987","unresolved":false,"context_lines":[{"line_number":1444,"context_line":""},{"line_number":1445,"context_line":"                # Ensure that the networks exist."},{"line_number":1446,"context_line":"                network_id \u003d pdata.get(\u0027network_id\u0027)"},{"line_number":1447,"context_line":"                if network_id and network_id not in network_ids:"},{"line_number":1448,"context_line":"                    self._get_network(context, network_id)"},{"line_number":1449,"context_line":"                    network_ids.add(network_id)"},{"line_number":1450,"context_line":""}],"source_content_type":"text/x-python","patch_set":38,"id":"9fdfeff1_43200b4a","line":1447,"range":{"start_line":1447,"start_character":19,"end_line":1447,"end_character":29},"updated":"2019-02-25 09:00:34.000000000","message":"just a question: is it possible that there will be no network_id?","commit_id":"2ea35e26da893923cb84cef10d978733a1044d08"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"7619df1d8d11e4f7d2705c0444fdc9287d33a9c1","unresolved":false,"context_lines":[{"line_number":1444,"context_line":""},{"line_number":1445,"context_line":"                # Ensure that the networks exist."},{"line_number":1446,"context_line":"                network_id \u003d pdata.get(\u0027network_id\u0027)"},{"line_number":1447,"context_line":"                if network_id and network_id not in network_ids:"},{"line_number":1448,"context_line":"                    self._get_network(context, network_id)"},{"line_number":1449,"context_line":"                    network_ids.add(network_id)"},{"line_number":1450,"context_line":""}],"source_content_type":"text/x-python","patch_set":38,"id":"9fdfeff1_7494de44","line":1447,"range":{"start_line":1447,"start_character":19,"end_line":1447,"end_character":29},"in_reply_to":"9fdfeff1_43200b4a","updated":"2019-02-25 15:30:34.000000000","message":"I noticed the same thing, here\u0027s my comment from PS37:\n\n\"Just adding a note since I talked to Nate in irc about this. If there isn\u0027t a network_id here, port creation will fail further down the line since it\u0027s a required field in the API. An optimization in this code, or in _before_create_port_bulk(), would be good to short-circuit that so we don\u0027t create a bunch of objects that we then toss out. Good for a follow-on change.\"","commit_id":"2ea35e26da893923cb84cef10d978733a1044d08"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"f2e38662329fccd1a0bb5e177f937bf1a7131ee2","unresolved":false,"context_lines":[{"line_number":1444,"context_line":""},{"line_number":1445,"context_line":"                # Ensure that the networks exist."},{"line_number":1446,"context_line":"                network_id \u003d pdata.get(\u0027network_id\u0027)"},{"line_number":1447,"context_line":"                if network_id and network_id not in network_ids:"},{"line_number":1448,"context_line":"                    self._get_network(context, network_id)"},{"line_number":1449,"context_line":"                    network_ids.add(network_id)"},{"line_number":1450,"context_line":""}],"source_content_type":"text/x-python","patch_set":38,"id":"9fdfeff1_548f5029","line":1447,"range":{"start_line":1447,"start_character":19,"end_line":1447,"end_character":29},"in_reply_to":"9fdfeff1_7494de44","updated":"2019-02-25 22:21:45.000000000","message":"I agree that this can be optimized in follow-up. @Nate: maybe You can add some todo note here if You will respin this patch?","commit_id":"2ea35e26da893923cb84cef10d978733a1044d08"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"eeb39a29431cc89bf4f00dd1ab787a68b8f97eca","unresolved":false,"context_lines":[{"line_number":1489,"context_line":"        # the tenant, make sure that the default security group exists.  This"},{"line_number":1490,"context_line":"        # should not bind the port requests to be in that security group of"},{"line_number":1491,"context_line":"        # they are requested not to be."},{"line_number":1492,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":1493,"context_line":"            self._before_create_port_bulk(context, ports)"},{"line_number":1494,"context_line":"            return self.create_port_obj_bulk(context, ports.get(\u0027ports\u0027))"},{"line_number":1495,"context_line":""}],"source_content_type":"text/x-python","patch_set":41,"id":"5fc1f717_c10a2489","line":1492,"updated":"2019-03-06 10:21:32.000000000","message":"You have writer session here and also in L1432 and in L1409. Isn\u0027t it too much?","commit_id":"b1c5ea286bd04c550507ac700a047a29836e7106"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"4977817fd92e03704582e1fd504bfe96b11d375e","unresolved":false,"context_lines":[{"line_number":1491,"context_line":"        # they are requested not to be."},{"line_number":1492,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":1493,"context_line":"            self._before_create_port_bulk(context, ports)"},{"line_number":1494,"context_line":"            return self.create_port_obj_bulk(context, ports.get(\u0027ports\u0027))"},{"line_number":1495,"context_line":""},{"line_number":1496,"context_line":"    # TODO(yalei) - will be simplified after security group and address pair be"},{"line_number":1497,"context_line":"    # converted to ext driver too."}],"source_content_type":"text/x-python","patch_set":41,"id":"5fc1f717_c4a552b7","line":1494,"updated":"2019-03-06 10:42:01.000000000","message":"This will get the \u0027before_create_port_bulk\u0027 and the \u0027create_port_obj_bulk\u0027 under the same DB session. Eventually, \u0027create_port_obj_bulk\u0027 will notify of the after_create event which is not true as the transaction hasn\u0027t been commited yet.","commit_id":"b1c5ea286bd04c550507ac700a047a29836e7106"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"12d772b6db519648e5e063ed31137b61d19ba03b","unresolved":false,"context_lines":[{"line_number":1491,"context_line":"        # they are requested not to be."},{"line_number":1492,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":1493,"context_line":"            self._before_create_port_bulk(context, ports)"},{"line_number":1494,"context_line":"            return self.create_port_obj_bulk(context, ports.get(\u0027ports\u0027))"},{"line_number":1495,"context_line":""},{"line_number":1496,"context_line":"    # TODO(yalei) - will be simplified after security group and address pair be"},{"line_number":1497,"context_line":"    # converted to ext driver too."}],"source_content_type":"text/x-python","patch_set":41,"id":"5fc1f717_6f60f733","line":1494,"in_reply_to":"5fc1f717_c4a552b7","updated":"2019-03-06 11:58:58.000000000","message":"Just weighting in Daniel\u0027s comment here.\n\nRight now there\u0027s an assumption in the networking-ovn driver that once we get to the *_postcommit() methods that object will already be committed to the Neutron database (and have a revision number assigned to it etc...). So by notifying AFTER_CREATE before the commit does break the driver\u0027 code*.\n\n** I believe this may break other drivers too. I know that networking-odl makes similar assumptions.","commit_id":"b1c5ea286bd04c550507ac700a047a29836e7106"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"4f1baf1a60fa49b5248adf4dcfd404b414d21760","unresolved":false,"context_lines":[{"line_number":1495,"context_line":"        # should not bind the port requests to be in that security group of"},{"line_number":1496,"context_line":"        # they are requested not to be."},{"line_number":1497,"context_line":"        self._before_create_port_bulk(context, ports)"},{"line_number":1498,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":1499,"context_line":"            port_data \u003d self.create_port_obj_bulk(context, ports.get(\u0027ports\u0027))"},{"line_number":1500,"context_line":"        return self.after_create_port_bulk(context, port_data)"},{"line_number":1501,"context_line":""}],"source_content_type":"text/x-python","patch_set":47,"id":"5fc1f717_e45d6015","line":1498,"updated":"2019-03-13 14:27:24.000000000","message":"This is redundant with the one on line 1447; delete this one.","commit_id":"43dbb0511cf2a6486c193ec97ecd1277f64cc624"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"907de690651c159d338e68ce15e92ef6ae2a3bf3","unresolved":false,"context_lines":[{"line_number":1080,"context_line":"            net_data \u003d []"},{"line_number":1081,"context_line":"            for net in nets_db:"},{"line_number":1082,"context_line":"                if net.mtu is None:"},{"line_number":1083,"context_line":"                    net.mtu \u003d self._get_network_mtu(net,"},{"line_number":1084,"context_line":"                                                    validate\u003dFalse)"},{"line_number":1085,"context_line":"                net_data.append(self._make_network_dict(net,"},{"line_number":1086,"context_line":"                                                        context\u003dcontext))"},{"line_number":1087,"context_line":""},{"line_number":1088,"context_line":"            self.type_manager.extend_networks_dict_provider(context, net_data)"},{"line_number":1089,"context_line":"            nets \u003d self._filter_nets_provider(context, net_data, filters)"}],"source_content_type":"text/x-python","patch_set":48,"id":"5fc1f717_43cd3864","line":1086,"range":{"start_line":1083,"start_character":0,"end_line":1086,"end_character":73},"updated":"2019-03-14 10:22:16.000000000","message":"nit: unrelated changes","commit_id":"84f30029cc33d651df9e872ff9a1d14e3e3d41b3"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"0d1a61d5a1f336e28bfd6e0b0f41b4a35532c965","unresolved":false,"context_lines":[{"line_number":1080,"context_line":"            net_data \u003d []"},{"line_number":1081,"context_line":"            for net in nets_db:"},{"line_number":1082,"context_line":"                if net.mtu is None:"},{"line_number":1083,"context_line":"                    net.mtu \u003d self._get_network_mtu(net,"},{"line_number":1084,"context_line":"                                                    validate\u003dFalse)"},{"line_number":1085,"context_line":"                net_data.append(self._make_network_dict(net,"},{"line_number":1086,"context_line":"                                                        context\u003dcontext))"},{"line_number":1087,"context_line":""},{"line_number":1088,"context_line":"            self.type_manager.extend_networks_dict_provider(context, net_data)"},{"line_number":1089,"context_line":"            nets \u003d self._filter_nets_provider(context, net_data, filters)"}],"source_content_type":"text/x-python","patch_set":48,"id":"5fc1f717_58067922","line":1086,"range":{"start_line":1083,"start_character":0,"end_line":1086,"end_character":73},"in_reply_to":"5fc1f717_43cd3864","updated":"2019-03-14 18:58:56.000000000","message":"I don\u0027t know how those snuck in.","commit_id":"84f30029cc33d651df9e872ff9a1d14e3e3d41b3"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"e0d8a52385952e18710e1915f1f60ed3214140a9","unresolved":false,"context_lines":[{"line_number":1360,"context_line":""},{"line_number":1361,"context_line":"    @utils.transaction_guard"},{"line_number":1362,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1363,"context_line":"    def create_port_bulk(self, context, ports):"},{"line_number":1364,"context_line":"        port_list \u003d ports.get(\u0027ports\u0027)"},{"line_number":1365,"context_line":"        for port in port_list:"},{"line_number":1366,"context_line":"            self._before_create_port(context, port)"}],"source_content_type":"text/x-python","patch_set":48,"id":"5fc1f717_f474256a","line":1363,"updated":"2019-03-14 01:33:42.000000000","message":"Nit: This seems like it could be broken down into 3 or 4 smaller methods for readability, and maybe even re-use in create_port(). I know you\u0027ve been down this path and it\u0027s been painful, so I don\u0027t want to harass you about it too much, so I see this as a nit at the moment. Better to have code that is clean and workable than to bang our heads against the wall over-engineering things.","commit_id":"84f30029cc33d651df9e872ff9a1d14e3e3d41b3"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"0d1a61d5a1f336e28bfd6e0b0f41b4a35532c965","unresolved":false,"context_lines":[{"line_number":1360,"context_line":""},{"line_number":1361,"context_line":"    @utils.transaction_guard"},{"line_number":1362,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1363,"context_line":"    def create_port_bulk(self, context, ports):"},{"line_number":1364,"context_line":"        port_list \u003d ports.get(\u0027ports\u0027)"},{"line_number":1365,"context_line":"        for port in port_list:"},{"line_number":1366,"context_line":"            self._before_create_port(context, port)"}],"source_content_type":"text/x-python","patch_set":48,"id":"5fc1f717_b80bdd27","line":1363,"in_reply_to":"5fc1f717_a3e97cb7","updated":"2019-03-14 18:58:56.000000000","message":"I will definitely add a TODO for it,","commit_id":"84f30029cc33d651df9e872ff9a1d14e3e3d41b3"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"907de690651c159d338e68ce15e92ef6ae2a3bf3","unresolved":false,"context_lines":[{"line_number":1360,"context_line":""},{"line_number":1361,"context_line":"    @utils.transaction_guard"},{"line_number":1362,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1363,"context_line":"    def create_port_bulk(self, context, ports):"},{"line_number":1364,"context_line":"        port_list \u003d ports.get(\u0027ports\u0027)"},{"line_number":1365,"context_line":"        for port in port_list:"},{"line_number":1366,"context_line":"            self._before_create_port(context, port)"}],"source_content_type":"text/x-python","patch_set":48,"id":"5fc1f717_a3e97cb7","line":1363,"in_reply_to":"5fc1f717_f474256a","updated":"2019-03-14 10:22:16.000000000","message":"I agree, that can be improved in follow-up IMO.\n@Nate: maybe if You will respin this patch for any other reason, You can add todo note about that, what You think about it?","commit_id":"84f30029cc33d651df9e872ff9a1d14e3e3d41b3"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"e0d8a52385952e18710e1915f1f60ed3214140a9","unresolved":false,"context_lines":[{"line_number":1449,"context_line":"                self._setup_dhcp_agent_provisioning_component(context,"},{"line_number":1450,"context_line":"                                                              port_dict)"},{"line_number":1451,"context_line":""},{"line_number":1452,"context_line":"                # Call IPAM to allocate IP addresses"},{"line_number":1453,"context_line":"                try:"},{"line_number":1454,"context_line":"                    self.ipam.allocate_ips_for_port_and_store("},{"line_number":1455,"context_line":"                        context, db_port_obj, db_port_obj[\u0027id\u0027])"},{"line_number":1456,"context_line":"                    db_port_obj[\u0027ip_allocation\u0027] \u003d (ipalloc_apidef."},{"line_number":1457,"context_line":"                                                IP_ALLOCATION_IMMEDIATE)"},{"line_number":1458,"context_line":"                except ipam_exc.DeferIpam:"},{"line_number":1459,"context_line":"                    db_port_obj[\u0027ip_allocation\u0027] \u003d (ipalloc_apidef."},{"line_number":1460,"context_line":"                                                IP_ALLOCATION_DEFERRED)"},{"line_number":1461,"context_line":""},{"line_number":1462,"context_line":"                port_data.append("},{"line_number":1463,"context_line":"                        {"}],"source_content_type":"text/x-python","patch_set":48,"id":"5fc1f717_54ce59b4","line":1460,"range":{"start_line":1452,"start_character":16,"end_line":1460,"end_character":71},"updated":"2019-03-14 01:33:42.000000000","message":"I\u0027ve been thinking about bulk IPAM calls. Not that we need to hold this patch up, but I\u0027ve been thinking we could consider attempting the bulk IPAM allocation up front, then we can dole out those allocations as we loop through the ports. We discussed this in previous patch sets, I don\u0027t think we want to attempt using a bulk IPAM request yet. Let\u0027s quantify the performance of things as you have them, then iterate again with a bulk IPAM request. Just some food for thought down the line, and maybe a nice bread crumb to leave as a TODO.","commit_id":"84f30029cc33d651df9e872ff9a1d14e3e3d41b3"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"0d1a61d5a1f336e28bfd6e0b0f41b4a35532c965","unresolved":false,"context_lines":[{"line_number":1449,"context_line":"                self._setup_dhcp_agent_provisioning_component(context,"},{"line_number":1450,"context_line":"                                                              port_dict)"},{"line_number":1451,"context_line":""},{"line_number":1452,"context_line":"                # Call IPAM to allocate IP addresses"},{"line_number":1453,"context_line":"                try:"},{"line_number":1454,"context_line":"                    self.ipam.allocate_ips_for_port_and_store("},{"line_number":1455,"context_line":"                        context, db_port_obj, db_port_obj[\u0027id\u0027])"},{"line_number":1456,"context_line":"                    db_port_obj[\u0027ip_allocation\u0027] \u003d (ipalloc_apidef."},{"line_number":1457,"context_line":"                                                IP_ALLOCATION_IMMEDIATE)"},{"line_number":1458,"context_line":"                except ipam_exc.DeferIpam:"},{"line_number":1459,"context_line":"                    db_port_obj[\u0027ip_allocation\u0027] \u003d (ipalloc_apidef."},{"line_number":1460,"context_line":"                                                IP_ALLOCATION_DEFERRED)"},{"line_number":1461,"context_line":""},{"line_number":1462,"context_line":"                port_data.append("},{"line_number":1463,"context_line":"                        {"}],"source_content_type":"text/x-python","patch_set":48,"id":"5fc1f717_fb0abf1d","line":1460,"range":{"start_line":1452,"start_character":16,"end_line":1460,"end_character":71},"in_reply_to":"5fc1f717_54ce59b4","updated":"2019-03-14 18:58:56.000000000","message":"I\u0027ll add a TODO for it; more commentary after I push a new version.","commit_id":"84f30029cc33d651df9e872ff9a1d14e3e3d41b3"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"1dd6bd7fb97e708d5bb136a0b5cf611e22ae7a1f","unresolved":false,"context_lines":[{"line_number":1449,"context_line":"                self._setup_dhcp_agent_provisioning_component(context,"},{"line_number":1450,"context_line":"                                                              port_dict)"},{"line_number":1451,"context_line":""},{"line_number":1452,"context_line":"                # Call IPAM to allocate IP addresses"},{"line_number":1453,"context_line":"                try:"},{"line_number":1454,"context_line":"                    self.ipam.allocate_ips_for_port_and_store("},{"line_number":1455,"context_line":"                        context, db_port_obj, db_port_obj[\u0027id\u0027])"},{"line_number":1456,"context_line":"                    db_port_obj[\u0027ip_allocation\u0027] \u003d (ipalloc_apidef."},{"line_number":1457,"context_line":"                                                IP_ALLOCATION_IMMEDIATE)"},{"line_number":1458,"context_line":"                except ipam_exc.DeferIpam:"},{"line_number":1459,"context_line":"                    db_port_obj[\u0027ip_allocation\u0027] \u003d (ipalloc_apidef."},{"line_number":1460,"context_line":"                                                IP_ALLOCATION_DEFERRED)"},{"line_number":1461,"context_line":""},{"line_number":1462,"context_line":"                port_data.append("},{"line_number":1463,"context_line":"                        {"}],"source_content_type":"text/x-python","patch_set":48,"id":"5fc1f717_5eabc173","line":1460,"range":{"start_line":1452,"start_character":16,"end_line":1460,"end_character":71},"in_reply_to":"5fc1f717_fb0abf1d","updated":"2019-03-14 20:11:13.000000000","message":"So here are my thoughts about bulk IPAM calls: there is a lot under the hood for allocate_ips_from_port_and_store.  Like, I had to diagram it out, and I ended up with a tree of 14 functions over 6 files [1].  For each of those determining which ones can shift to a bulk type, which only have to be done once, and which have to be done atomically once per item is not the hard part, the hard part is maintaining the state as you pass from parent-operates-on-bulk to child-operates-on-bulk and then you can reassemble it correctly when it gets passed back.\n\nFor example, in 592164 [2] we created a bulk_allocate for IP allocation.  That would replace the allocate in neutron/ipam/drivers/neutrondb_ipam/driver.py at the bottom right of the diagram.  So at a minimum everything up tto that point has to be triaged into one of those three categories and then revamped as needed.\n\nMy goal is to lay out a roadmap of how I see this going; do my thoughts make sense to you?\n\n[1] https://natejohnston.info/stuff/allocate_ips_for_port_and_store.jpeg\n[2] https://review.openstack.org/592164","commit_id":"84f30029cc33d651df9e872ff9a1d14e3e3d41b3"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"061cba1ceaf55e0060dd0d027ce4ae67010237a0","unresolved":false,"context_lines":[{"line_number":1362,"context_line":"        # TODO(njohnston): Break this up into smaller functions."},{"line_number":1363,"context_line":"        port_list \u003d ports.get(\u0027ports\u0027)"},{"line_number":1364,"context_line":"        for port in port_list:"},{"line_number":1365,"context_line":"            self._before_create_port(context, port)"},{"line_number":1366,"context_line":""},{"line_number":1367,"context_line":"        port_data \u003d []"},{"line_number":1368,"context_line":"        network_cache \u003d dict()"}],"source_content_type":"text/x-python","patch_set":49,"id":"5fc1f717_e9a3d5fe","line":1365,"range":{"start_line":1365,"start_character":12,"end_line":1365,"end_character":51},"updated":"2019-03-14 20:33:31.000000000","message":"idk what\u0027s point of having another for loop here but asking in general would it make sense move this line to L1372 right after for loop starts at L1371 ? so that we can avoid iterating twice through same list ?","commit_id":"c2aea7892a91056757f68d246281e8bfa0a43752"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"56dbed2ed0af9e9d92d875c054efb021bd36ae8e","unresolved":false,"context_lines":[{"line_number":1362,"context_line":"        # TODO(njohnston): Break this up into smaller functions."},{"line_number":1363,"context_line":"        port_list \u003d ports.get(\u0027ports\u0027)"},{"line_number":1364,"context_line":"        for port in port_list:"},{"line_number":1365,"context_line":"            self._before_create_port(context, port)"},{"line_number":1366,"context_line":""},{"line_number":1367,"context_line":"        port_data \u003d []"},{"line_number":1368,"context_line":"        network_cache \u003d dict()"}],"source_content_type":"text/x-python","patch_set":49,"id":"5fc1f717_58b42380","line":1365,"range":{"start_line":1365,"start_character":12,"end_line":1365,"end_character":51},"in_reply_to":"5fc1f717_29d6bd29","updated":"2019-03-15 23:24:15.000000000","message":"I agree with Ryan. Semantically, _before_create_port has to happen before the db transaction is started","commit_id":"c2aea7892a91056757f68d246281e8bfa0a43752"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"e720c0c8508719f6e5eef773cb6154dec74ef666","unresolved":false,"context_lines":[{"line_number":1362,"context_line":"        # TODO(njohnston): Break this up into smaller functions."},{"line_number":1363,"context_line":"        port_list \u003d ports.get(\u0027ports\u0027)"},{"line_number":1364,"context_line":"        for port in port_list:"},{"line_number":1365,"context_line":"            self._before_create_port(context, port)"},{"line_number":1366,"context_line":""},{"line_number":1367,"context_line":"        port_data \u003d []"},{"line_number":1368,"context_line":"        network_cache \u003d dict()"}],"source_content_type":"text/x-python","patch_set":49,"id":"5fc1f717_cfce1959","line":1365,"range":{"start_line":1365,"start_character":12,"end_line":1365,"end_character":51},"in_reply_to":"5fc1f717_29d6bd29","updated":"2019-03-15 19:52:19.000000000","message":"ok, Im not worried about it rn, but would be good to include in for loop below if it works well under transaction.","commit_id":"c2aea7892a91056757f68d246281e8bfa0a43752"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"60c4bb44d3eeca56dae042f00000de702702d75f","unresolved":false,"context_lines":[{"line_number":1362,"context_line":"        # TODO(njohnston): Break this up into smaller functions."},{"line_number":1363,"context_line":"        port_list \u003d ports.get(\u0027ports\u0027)"},{"line_number":1364,"context_line":"        for port in port_list:"},{"line_number":1365,"context_line":"            self._before_create_port(context, port)"},{"line_number":1366,"context_line":""},{"line_number":1367,"context_line":"        port_data \u003d []"},{"line_number":1368,"context_line":"        network_cache \u003d dict()"}],"source_content_type":"text/x-python","patch_set":49,"id":"5fc1f717_29d6bd29","line":1365,"range":{"start_line":1365,"start_character":12,"end_line":1365,"end_character":51},"in_reply_to":"5fc1f717_e9a3d5fe","updated":"2019-03-14 20:37:53.000000000","message":"IMO this makes sense for now given the struggles we\u0027ve seen with transaction boundaries and notfications. Moving this to L1371 puts the \"before\" notifications inside the session, which may or may not be fine. I vote to err on the side of caution at this point and refactor this as we come back to deal with bulk IPAM requests and such.","commit_id":"c2aea7892a91056757f68d246281e8bfa0a43752"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"ca642af1d1d549f1464568326aafb20cb5deecb7","unresolved":false,"context_lines":[{"line_number":1454,"context_line":"                try:"},{"line_number":1455,"context_line":"                    # TODO(njohnston): IPAM allocation needs to be revamped to"},{"line_number":1456,"context_line":"                    # be bulk-friendly."},{"line_number":1457,"context_line":"                    self.ipam.allocate_ips_for_port_and_store("},{"line_number":1458,"context_line":"                        context, db_port_obj, db_port_obj[\u0027id\u0027])"},{"line_number":1459,"context_line":"                    db_port_obj[\u0027ip_allocation\u0027] \u003d (ipalloc_apidef."},{"line_number":1460,"context_line":"                                                IP_ALLOCATION_IMMEDIATE)"},{"line_number":1461,"context_line":"                except ipam_exc.DeferIpam:"}],"source_content_type":"text/x-python","patch_set":50,"id":"5fc1f717_bbf17c03","line":1458,"range":{"start_line":1457,"start_character":0,"end_line":1458,"end_character":64},"updated":"2019-03-16 00:01:22.000000000","message":"The order in which the IPAM is being called changes significantly. Let\u0027s say for example the deployment has DNS integration enabled. That extension is going to be called in L1417. Since the port doesn\u0027t have IP addresses, the extension is going to be broken. In the non-bulk case, the port gets ip addresses and then the extensions are called: https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/plugin.py#L1296-L1298.","commit_id":"a0135b3b4efe8c44a1aecb364a4db3b954fc5fe9"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"fb60d91eb302b47816a4048b2447e538808d3d7b","unresolved":false,"context_lines":[{"line_number":1454,"context_line":"                try:"},{"line_number":1455,"context_line":"                    # TODO(njohnston): IPAM allocation needs to be revamped to"},{"line_number":1456,"context_line":"                    # be bulk-friendly."},{"line_number":1457,"context_line":"                    self.ipam.allocate_ips_for_port_and_store("},{"line_number":1458,"context_line":"                        context, db_port_obj, db_port_obj[\u0027id\u0027])"},{"line_number":1459,"context_line":"                    db_port_obj[\u0027ip_allocation\u0027] \u003d (ipalloc_apidef."},{"line_number":1460,"context_line":"                                                IP_ALLOCATION_IMMEDIATE)"},{"line_number":1461,"context_line":"                except ipam_exc.DeferIpam:"}],"source_content_type":"text/x-python","patch_set":50,"id":"5fc1f717_4d2775cb","line":1458,"range":{"start_line":1457,"start_character":0,"end_line":1458,"end_character":64},"in_reply_to":"5fc1f717_bbf17c03","updated":"2019-03-17 19:13:58.000000000","message":"Thanks for catching this.   I relocated the lines, and everything seems happy now.  I will create a follow-on change that adds a test that would have caught this scenario.","commit_id":"a0135b3b4efe8c44a1aecb364a4db3b954fc5fe9"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"32da74a9e5a726ff432da0d359c80e915faa74bd","unresolved":false,"context_lines":[{"line_number":1397,"context_line":"                    network \u003d network_cache[network_id]"},{"line_number":1398,"context_line":""},{"line_number":1399,"context_line":"                # Determine the MAC address"},{"line_number":1400,"context_line":"                raw_mac_address \u003d pdata.get(\u0027mac_address\u0027,"},{"line_number":1401,"context_line":"                    const.ATTR_NOT_SPECIFIED)"},{"line_number":1402,"context_line":"                if raw_mac_address is const.ATTR_NOT_SPECIFIED:"},{"line_number":1403,"context_line":"                    raw_mac_address \u003d macs.pop()"}],"source_content_type":"text/x-python","patch_set":51,"id":"5fc1f717_646fb992","line":1400,"updated":"2019-03-19 21:24:03.000000000","message":"What if the user specifies a mac address and it is in use?","commit_id":"1d90cab97afa58766e132b977eb78c1d0504b63d"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"ff0d75ab691ef2a1ce2cbc46abf44151b8ab7a83","unresolved":false,"context_lines":[{"line_number":1397,"context_line":"                    network \u003d network_cache[network_id]"},{"line_number":1398,"context_line":""},{"line_number":1399,"context_line":"                # Determine the MAC address"},{"line_number":1400,"context_line":"                raw_mac_address \u003d pdata.get(\u0027mac_address\u0027,"},{"line_number":1401,"context_line":"                    const.ATTR_NOT_SPECIFIED)"},{"line_number":1402,"context_line":"                if raw_mac_address is const.ATTR_NOT_SPECIFIED:"},{"line_number":1403,"context_line":"                    raw_mac_address \u003d macs.pop()"}],"source_content_type":"text/x-python","patch_set":51,"id":"5fc1f717_5a65b6e0","line":1400,"in_reply_to":"5fc1f717_646fb992","updated":"2019-03-19 22:24:47.000000000","message":"I believe the unique constraint on the sqlalchemy model will cause the transaction to fail, everything will be rolled back, and an error will be returned to the user [1]. No harm, no foul. I would have to explore how friendly of a message they back. I don\u0027t think this is an expensive test case to cook up though.\n\n[1] https://github.com/openstack/neutron/blob/master/neutron/db/models_v2.py#L101-L111","commit_id":"1d90cab97afa58766e132b977eb78c1d0504b63d"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"37119ce119245dc94955b7589cd26a0c1c98b608","unresolved":false,"context_lines":[{"line_number":1397,"context_line":"                    network \u003d network_cache[network_id]"},{"line_number":1398,"context_line":""},{"line_number":1399,"context_line":"                # Determine the MAC address"},{"line_number":1400,"context_line":"                raw_mac_address \u003d pdata.get(\u0027mac_address\u0027,"},{"line_number":1401,"context_line":"                    const.ATTR_NOT_SPECIFIED)"},{"line_number":1402,"context_line":"                if raw_mac_address is const.ATTR_NOT_SPECIFIED:"},{"line_number":1403,"context_line":"                    raw_mac_address \u003d macs.pop()"}],"source_content_type":"text/x-python","patch_set":51,"id":"5fc1f717_878187c6","line":1400,"in_reply_to":"5fc1f717_646fb992","updated":"2019-03-19 22:28:15.000000000","message":"Restored the logic for mac address dup detection.","commit_id":"1d90cab97afa58766e132b977eb78c1d0504b63d"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"32da74a9e5a726ff432da0d359c80e915faa74bd","unresolved":false,"context_lines":[{"line_number":1423,"context_line":"                                                IP_ALLOCATION_IMMEDIATE)"},{"line_number":1424,"context_line":"                except ipam_exc.DeferIpam:"},{"line_number":1425,"context_line":"                    db_port_obj[\u0027ip_allocation\u0027] \u003d (ipalloc_apidef."},{"line_number":1426,"context_line":"                                                IP_ALLOCATION_DEFERRED)"},{"line_number":1427,"context_line":""},{"line_number":1428,"context_line":"                # Activities immediately post-port-creation"},{"line_number":1429,"context_line":"                self.extension_manager.process_create_port(context, port_dict,"}],"source_content_type":"text/x-python","patch_set":51,"id":"5fc1f717_e4f3a972","line":1426,"updated":"2019-03-19 21:24:03.000000000","message":"It seems we are making the assumption the user is not going to pass [] in fixed fixed IPs: https://github.com/openstack/neutron/blob/master/neutron/db/db_base_plugin_v2.py#L1448-L1451.  Is that correct? Please see https://review.openstack.org/#/c/361455/. If we are indeed making that assumption, we should find a way to fail the request if any of the ports specifies such a thing. Probably the simpler approach is to allow [] in fixed ips from the caller","commit_id":"1d90cab97afa58766e132b977eb78c1d0504b63d"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"37119ce119245dc94955b7589cd26a0c1c98b608","unresolved":false,"context_lines":[{"line_number":1423,"context_line":"                                                IP_ALLOCATION_IMMEDIATE)"},{"line_number":1424,"context_line":"                except ipam_exc.DeferIpam:"},{"line_number":1425,"context_line":"                    db_port_obj[\u0027ip_allocation\u0027] \u003d (ipalloc_apidef."},{"line_number":1426,"context_line":"                                                IP_ALLOCATION_DEFERRED)"},{"line_number":1427,"context_line":""},{"line_number":1428,"context_line":"                # Activities immediately post-port-creation"},{"line_number":1429,"context_line":"                self.extension_manager.process_create_port(context, port_dict,"}],"source_content_type":"text/x-python","patch_set":51,"id":"5fc1f717_27e0d396","line":1426,"in_reply_to":"5fc1f717_e4f3a972","updated":"2019-03-19 22:28:15.000000000","message":"Done","commit_id":"1d90cab97afa58766e132b977eb78c1d0504b63d"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"ff0d75ab691ef2a1ce2cbc46abf44151b8ab7a83","unresolved":false,"context_lines":[{"line_number":1423,"context_line":"                                                IP_ALLOCATION_IMMEDIATE)"},{"line_number":1424,"context_line":"                except ipam_exc.DeferIpam:"},{"line_number":1425,"context_line":"                    db_port_obj[\u0027ip_allocation\u0027] \u003d (ipalloc_apidef."},{"line_number":1426,"context_line":"                                                IP_ALLOCATION_DEFERRED)"},{"line_number":1427,"context_line":""},{"line_number":1428,"context_line":"                # Activities immediately post-port-creation"},{"line_number":1429,"context_line":"                self.extension_manager.process_create_port(context, port_dict,"}],"source_content_type":"text/x-python","patch_set":51,"id":"5fc1f717_da876661","line":1426,"in_reply_to":"5fc1f717_e4f3a972","updated":"2019-03-19 22:24:47.000000000","message":"That\u0027s a good catch, I never considered this case. This probably needs to be looked at.","commit_id":"1d90cab97afa58766e132b977eb78c1d0504b63d"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"32da74a9e5a726ff432da0d359c80e915faa74bd","unresolved":false,"context_lines":[{"line_number":1456,"context_line":"                self.mechanism_manager.create_port_precommit(mech_context)"},{"line_number":1457,"context_line":""},{"line_number":1458,"context_line":"                # handle DHCP setup"},{"line_number":1459,"context_line":"                dhcp_opts \u003d port_dict.get(edo_ext.EXTRADHCPOPTS, [])"},{"line_number":1460,"context_line":"                self._process_port_create_extra_dhcp_opts(context, port_dict,"},{"line_number":1461,"context_line":"                                                          dhcp_opts)"},{"line_number":1462,"context_line":"                self._setup_dhcp_agent_provisioning_component(context,"},{"line_number":1463,"context_line":"                                                              port_dict)"},{"line_number":1464,"context_line":""}],"source_content_type":"text/x-python","patch_set":51,"id":"5fc1f717_04583554","line":1461,"range":{"start_line":1459,"start_character":0,"end_line":1461,"end_character":68},"updated":"2019-03-19 21:24:03.000000000","message":"I would move these two lines just before the notification in L1454, in case there is a notification listener that needs it. This also conforms with the single port creation case. Or is there a reason to do it this way?","commit_id":"1d90cab97afa58766e132b977eb78c1d0504b63d"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"37119ce119245dc94955b7589cd26a0c1c98b608","unresolved":false,"context_lines":[{"line_number":1456,"context_line":"                self.mechanism_manager.create_port_precommit(mech_context)"},{"line_number":1457,"context_line":""},{"line_number":1458,"context_line":"                # handle DHCP setup"},{"line_number":1459,"context_line":"                dhcp_opts \u003d port_dict.get(edo_ext.EXTRADHCPOPTS, [])"},{"line_number":1460,"context_line":"                self._process_port_create_extra_dhcp_opts(context, port_dict,"},{"line_number":1461,"context_line":"                                                          dhcp_opts)"},{"line_number":1462,"context_line":"                self._setup_dhcp_agent_provisioning_component(context,"},{"line_number":1463,"context_line":"                                                              port_dict)"},{"line_number":1464,"context_line":""}],"source_content_type":"text/x-python","patch_set":51,"id":"5fc1f717_e7a40bbc","line":1461,"range":{"start_line":1459,"start_character":0,"end_line":1461,"end_character":68},"in_reply_to":"5fc1f717_04583554","updated":"2019-03-19 22:28:15.000000000","message":"Hmm, I thought I was in conformance with how single port creation did it.  Reorganized to fit.","commit_id":"1d90cab97afa58766e132b977eb78c1d0504b63d"}],"neutron/tests/unit/db/test_db_base_plugin_v2.py":[{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"a15a189bbfbd1920baf3b0742e3e596ebd70f2c8","unresolved":false,"context_lines":[{"line_number":2628,"context_line":"                             \u0027admin_state_up\u0027: True,"},{"line_number":2629,"context_line":"                             \u0027device_id\u0027: \u0027device_id\u0027,"},{"line_number":2630,"context_line":"                             \u0027device_owner\u0027: device_owner,"},{"line_number":2631,"context_line":"                             \u0027project_id\u0027: tenant_id}}"},{"line_number":2632,"context_line":"            ports \u003d [copy.deepcopy(port) for x in range(num_ports)]"},{"line_number":2633,"context_line":"            ports[1][\u0027port\u0027][\u0027mac_address\u0027] \u003d test_mac"},{"line_number":2634,"context_line":"            port_data \u003d plugin.create_port_obj_bulk(ctx, ports)"}],"source_content_type":"text/x-python","patch_set":30,"id":"9fdfeff1_5886da15","line":2631,"range":{"start_line":2631,"start_character":30,"end_line":2631,"end_character":40},"updated":"2019-02-08 13:29:33.000000000","message":"Are you sure that this change from tenant_id to project_id must be in this patch? As I see more than 200 tenant_ids have in this single file, and it is a useless change.\nPerhaps in a separate patch?","commit_id":"61c5cb2837cabd6d55fb0eddcde98ca23f446ef8"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"ad013a2691deaeab26c8565be7254b4a26f22ee4","unresolved":false,"context_lines":[{"line_number":2628,"context_line":"                             \u0027admin_state_up\u0027: True,"},{"line_number":2629,"context_line":"                             \u0027device_id\u0027: \u0027device_id\u0027,"},{"line_number":2630,"context_line":"                             \u0027device_owner\u0027: device_owner,"},{"line_number":2631,"context_line":"                             \u0027project_id\u0027: tenant_id}}"},{"line_number":2632,"context_line":"            ports \u003d [copy.deepcopy(port) for x in range(num_ports)]"},{"line_number":2633,"context_line":"            ports[1][\u0027port\u0027][\u0027mac_address\u0027] \u003d test_mac"},{"line_number":2634,"context_line":"            port_data \u003d plugin.create_port_obj_bulk(ctx, ports)"}],"source_content_type":"text/x-python","patch_set":30,"id":"9fdfeff1_8db70287","line":2631,"range":{"start_line":2631,"start_character":30,"end_line":2631,"end_character":40},"in_reply_to":"9fdfeff1_5886da15","updated":"2019-02-11 21:10:29.000000000","message":"This was in reaction to some unit test failures, but let me try it without this so I can tell if I ultimately addressed the root cause of those failures another way.","commit_id":"61c5cb2837cabd6d55fb0eddcde98ca23f446ef8"},{"author":{"_account_id":21798,"name":"Bernard Cafarelli","email":"bcafarel@redhat.com","username":"bcafarel"},"change_message_id":"f0a1aa865aa83889ca4cbcdf503f84463982d786","unresolved":false,"context_lines":[{"line_number":1159,"context_line":"                patched_plugin.side_effect \u003d side_effect"},{"line_number":1160,"context_line":"                with self.network() as net:"},{"line_number":1161,"context_line":"                    res \u003d self._create_port_bulk(self.fmt, 2,"},{"line_number":1162,"context_line":"                                                net[\u0027network\u0027][\u0027id\u0027],"},{"line_number":1163,"context_line":"                                                \u0027test\u0027,"},{"line_number":1164,"context_line":"                                                True)"},{"line_number":1165,"context_line":"                    # We expect a 500 as we injected a fault in the plugin"}],"source_content_type":"text/x-python","patch_set":33,"id":"9fdfeff1_153942d7","line":1162,"updated":"2019-02-19 10:58:19.000000000","message":"nit: unrelated whitespace change","commit_id":"3eb6951f3f4226dcb453d29e94b975792b54a5a9"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"ef73f8bfb7c6161ea34d401651212d4ca6447aba","unresolved":false,"context_lines":[{"line_number":1159,"context_line":"                patched_plugin.side_effect \u003d side_effect"},{"line_number":1160,"context_line":"                with self.network() as net:"},{"line_number":1161,"context_line":"                    res \u003d self._create_port_bulk(self.fmt, 2,"},{"line_number":1162,"context_line":"                                                net[\u0027network\u0027][\u0027id\u0027],"},{"line_number":1163,"context_line":"                                                \u0027test\u0027,"},{"line_number":1164,"context_line":"                                                True)"},{"line_number":1165,"context_line":"                    # We expect a 500 as we injected a fault in the plugin"}],"source_content_type":"text/x-python","patch_set":33,"id":"9fdfeff1_ae3edb88","line":1162,"in_reply_to":"9fdfeff1_153942d7","updated":"2019-02-19 19:36:40.000000000","message":"Done","commit_id":"3eb6951f3f4226dcb453d29e94b975792b54a5a9"}],"neutron/tests/unit/plugins/ml2/test_plugin.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"59329ac295b5b13dc3c91f651a62ae0ffb13b8f0","unresolved":false,"context_lines":[{"line_number":1160,"context_line":"            m_upd.assert_has_calls("},{"line_number":1161,"context_line":"                [mock.call(ctx, [sg]) for sg in used_sg], any_order\u003dTrue)"},{"line_number":1162,"context_line":""},{"line_number":1163,"context_line":"    def test_create_ports_bulk_with_sec_grp_member_provider_update(self):"},{"line_number":1164,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":1165,"context_line":"        plugin \u003d directory.get_plugin()"},{"line_number":1166,"context_line":"        with self.network() as net,\\"}],"source_content_type":"text/x-python","patch_set":18,"id":"bfdaf3ff_53dbfdeb","side":"PARENT","line":1163,"updated":"2019-01-17 08:36:29.000000000","message":"just a question: why You removed this test?","commit_id":"6e5349963f607122f1de3a4f33556482662a9630"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"61b6f515af69ced7a66fd442a5f34196360f1bce","unresolved":false,"context_lines":[{"line_number":1160,"context_line":"            m_upd.assert_has_calls("},{"line_number":1161,"context_line":"                [mock.call(ctx, [sg]) for sg in used_sg], any_order\u003dTrue)"},{"line_number":1162,"context_line":""},{"line_number":1163,"context_line":"    def test_create_ports_bulk_with_sec_grp_member_provider_update(self):"},{"line_number":1164,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":1165,"context_line":"        plugin \u003d directory.get_plugin()"},{"line_number":1166,"context_line":"        with self.network() as net,\\"}],"source_content_type":"text/x-python","patch_set":18,"id":"bfdaf3ff_dde92cb7","side":"PARENT","line":1163,"in_reply_to":"bfdaf3ff_53dbfdeb","updated":"2019-01-18 19:16:24.000000000","message":"Many patchsets ago, I thought it would be invalid, for a reason I don\u0027t recall.  I readded it, and when testing locally what I found is that the security_groups_member_updated notification is never triggered because that only happens in notify_sg_on_port_changes [1] if the event is PORT_UPDATE.  But these events only ever come through as PORT_CREATE.  There is no extant update_port_bulk functionality, so I am not sure how this worked before with port updates done in a bulk context.\n\nThe test is failing, showing that security_groups_member_updated is not getting called, and I\u0027m still at a loss to explain that.","commit_id":"6e5349963f607122f1de3a4f33556482662a9630"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"11920573dee43dabc64d2e584ccf22c9a5a29ab3","unresolved":false,"context_lines":[{"line_number":1160,"context_line":"            m_upd.assert_has_calls("},{"line_number":1161,"context_line":"                [mock.call(ctx, [sg]) for sg in used_sg], any_order\u003dTrue)"},{"line_number":1162,"context_line":""},{"line_number":1163,"context_line":"    def test_create_ports_bulk_with_sec_grp_member_provider_update(self):"},{"line_number":1164,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":1165,"context_line":"        plugin \u003d directory.get_plugin()"},{"line_number":1166,"context_line":"        with self.network() as net,\\"}],"source_content_type":"text/x-python","patch_set":18,"id":"9fdfeff1_95bea4fd","side":"PARENT","line":1163,"in_reply_to":"bfdaf3ff_dde92cb7","updated":"2019-01-18 19:19:06.000000000","message":"The [1] reference from hefore is here:\n\nhttps://git.openstack.org/cgit/openstack/neutron/tree/neutron/db/securitygroups_rpc_base.py#n48","commit_id":"6e5349963f607122f1de3a4f33556482662a9630"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"ab29d18f85147c264fa8c9d0c749667c5da1981d","unresolved":false,"context_lines":[{"line_number":1124,"context_line":"                    {\u0027floatingip\u0027: {\u0027floating_network_id\u0027: n[\u0027network\u0027][\u0027id\u0027],"},{"line_number":1125,"context_line":"                                    \u0027tenant_id\u0027: n[\u0027network\u0027][\u0027tenant_id\u0027],"},{"line_number":1126,"context_line":"                                    \u0027dns_name\u0027: \u0027\u0027, \u0027dns_domain\u0027: \u0027\u0027}}"},{"line_number":1127,"context_line":"                )"},{"line_number":1128,"context_line":"        self._delete(\u0027networks\u0027, n[\u0027network\u0027][\u0027id\u0027])"},{"line_number":1129,"context_line":"        flips \u003d l3plugin.get_floatingips(context.get_admin_context())"},{"line_number":1130,"context_line":"        self.assertFalse(flips)"}],"source_content_type":"text/x-python","patch_set":18,"id":"9fdfeff1_3588181e","line":1127,"updated":"2019-01-18 20:42:03.000000000","message":"d n","commit_id":"0bde41ed0e93bb349dd3fec94d7026e98442c05f"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"a15a189bbfbd1920baf3b0742e3e596ebd70f2c8","unresolved":false,"context_lines":[{"line_number":1140,"context_line":"                m_upd.assert_has_calls("},{"line_number":1141,"context_line":"                    [mock.call(ctx, [sg]) for sg in used_sg], any_order\u003dTrue)"},{"line_number":1142,"context_line":"            else:"},{"line_number":1143,"context_line":"                print(\"Result of transaction is \" + str(ports))"},{"line_number":1144,"context_line":"                self.assertTrue(\u0027ports\u0027 in ports)"},{"line_number":1145,"context_line":""},{"line_number":1146,"context_line":"    def test_create_ports_bulk_with_sec_grp_member_provider_update(self):"}],"source_content_type":"text/x-python","patch_set":30,"id":"9fdfeff1_5837ba4e","line":1143,"range":{"start_line":1143,"start_character":16,"end_line":1143,"end_character":63},"updated":"2019-02-08 13:29:33.000000000","message":"debug leftover","commit_id":"61c5cb2837cabd6d55fb0eddcde98ca23f446ef8"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"ad013a2691deaeab26c8565be7254b4a26f22ee4","unresolved":false,"context_lines":[{"line_number":1140,"context_line":"                m_upd.assert_has_calls("},{"line_number":1141,"context_line":"                    [mock.call(ctx, [sg]) for sg in used_sg], any_order\u003dTrue)"},{"line_number":1142,"context_line":"            else:"},{"line_number":1143,"context_line":"                print(\"Result of transaction is \" + str(ports))"},{"line_number":1144,"context_line":"                self.assertTrue(\u0027ports\u0027 in ports)"},{"line_number":1145,"context_line":""},{"line_number":1146,"context_line":"    def test_create_ports_bulk_with_sec_grp_member_provider_update(self):"}],"source_content_type":"text/x-python","patch_set":30,"id":"9fdfeff1_2829249a","line":1143,"range":{"start_line":1143,"start_character":16,"end_line":1143,"end_character":63},"in_reply_to":"9fdfeff1_5837ba4e","updated":"2019-02-11 21:10:29.000000000","message":"Done","commit_id":"61c5cb2837cabd6d55fb0eddcde98ca23f446ef8"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"158632274df01eb47b5639e0667c8cfc0c3e15f1","unresolved":false,"context_lines":[{"line_number":1229,"context_line":"            m_upd.assert_called_with(ctx, used_sg)"},{"line_number":1230,"context_line":"            m_upd.reset_mock()"},{"line_number":1231,"context_line":"            data[0][\u0027device_owner\u0027] \u003d constants.DEVICE_OWNER_DHCP"},{"line_number":1232,"context_line":"            self._create_bulk_from_list(self.fmt, \u0027port\u0027, data, context\u003dctx)"},{"line_number":1233,"context_line":"            self.assertFalse(m_upd.called)"},{"line_number":1234,"context_line":""},{"line_number":1235,"context_line":"    def test_create_ports_bulk_with_sec_grp_provider_update_ipv6(self):"}],"source_content_type":"text/x-python","patch_set":33,"id":"9fdfeff1_64cee62e","line":1232,"range":{"start_line":1232,"start_character":56,"end_line":1232,"end_character":75},"updated":"2019-02-19 10:12:05.000000000","message":"nit: useless change","commit_id":"3eb6951f3f4226dcb453d29e94b975792b54a5a9"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"ef73f8bfb7c6161ea34d401651212d4ca6447aba","unresolved":false,"context_lines":[{"line_number":1229,"context_line":"            m_upd.assert_called_with(ctx, used_sg)"},{"line_number":1230,"context_line":"            m_upd.reset_mock()"},{"line_number":1231,"context_line":"            data[0][\u0027device_owner\u0027] \u003d constants.DEVICE_OWNER_DHCP"},{"line_number":1232,"context_line":"            self._create_bulk_from_list(self.fmt, \u0027port\u0027, data, context\u003dctx)"},{"line_number":1233,"context_line":"            self.assertFalse(m_upd.called)"},{"line_number":1234,"context_line":""},{"line_number":1235,"context_line":"    def test_create_ports_bulk_with_sec_grp_provider_update_ipv6(self):"}],"source_content_type":"text/x-python","patch_set":33,"id":"9fdfeff1_8ec0b77e","line":1232,"range":{"start_line":1232,"start_character":56,"end_line":1232,"end_character":75},"in_reply_to":"9fdfeff1_64cee62e","updated":"2019-02-19 19:36:40.000000000","message":"undone","commit_id":"3eb6951f3f4226dcb453d29e94b975792b54a5a9"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"311fb438534fe3686406d0579a084de50b4be815","unresolved":false,"context_lines":[{"line_number":300,"context_line":"        tenant_id \u003d \u0027some_tenant\u0027"},{"line_number":301,"context_line":"        device_owner \u003d \"me\""},{"line_number":302,"context_line":"        ctx \u003d context.Context(\u0027\u0027, tenant_id)"},{"line_number":303,"context_line":"        with self.network(tenant_id\u003dtenant_id) as network_to_use:"},{"line_number":304,"context_line":"            net_id \u003d network_to_use[\u0027network\u0027][\u0027id\u0027]"},{"line_number":305,"context_line":"            port \u003d {\u0027port\u0027: {\u0027name\u0027: \u0027port\u0027,"},{"line_number":306,"context_line":"                             \u0027network_id\u0027: net_id,"}],"source_content_type":"text/x-python","patch_set":35,"id":"9fdfeff1_27caf245","line":303,"updated":"2019-02-21 02:37:46.000000000","message":"Just one network :(","commit_id":"ed4f0c83baabbd33b7b1f9aae1d1c75fc2738c08"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"907de690651c159d338e68ce15e92ef6ae2a3bf3","unresolved":false,"context_lines":[{"line_number":296,"context_line":"        # but the IPAM classes that inherit this test have a weakproxy here and"},{"line_number":297,"context_line":"        # thus fail.  This avoids that error."},{"line_number":298,"context_line":"        if isinstance(plugin, weakref.ProxyTypes):"},{"line_number":299,"context_line":"            return"},{"line_number":300,"context_line":"        tenant_id \u003d \u0027some_tenant\u0027"},{"line_number":301,"context_line":"        device_owner \u003d \"me\""},{"line_number":302,"context_line":"        ctx \u003d context.Context(\u0027\u0027, tenant_id)"}],"source_content_type":"text/x-python","patch_set":48,"id":"5fc1f717_e369c4f8","line":299,"updated":"2019-03-14 10:22:16.000000000","message":"shouldn\u0027t You skip it in such case?","commit_id":"84f30029cc33d651df9e872ff9a1d14e3e3d41b3"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"0d1a61d5a1f336e28bfd6e0b0f41b4a35532c965","unresolved":false,"context_lines":[{"line_number":296,"context_line":"        # but the IPAM classes that inherit this test have a weakproxy here and"},{"line_number":297,"context_line":"        # thus fail.  This avoids that error."},{"line_number":298,"context_line":"        if isinstance(plugin, weakref.ProxyTypes):"},{"line_number":299,"context_line":"            return"},{"line_number":300,"context_line":"        tenant_id \u003d \u0027some_tenant\u0027"},{"line_number":301,"context_line":"        device_owner \u003d \"me\""},{"line_number":302,"context_line":"        ctx \u003d context.Context(\u0027\u0027, tenant_id)"}],"source_content_type":"text/x-python","patch_set":48,"id":"5fc1f717_f88f2eca","line":299,"in_reply_to":"5fc1f717_e369c4f8","updated":"2019-03-14 18:58:56.000000000","message":"Good idea, done.","commit_id":"84f30029cc33d651df9e872ff9a1d14e3e3d41b3"}]}
