)]}'
{"neutron/db/_model_query.py":[{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"7d203e64413a8f1f12a37be91b180054aaca6c99","unresolved":false,"context_lines":[{"line_number":191,"context_line":"                    # do multiple equals matches"},{"line_number":192,"context_line":"                    query \u003d query.filter("},{"line_number":193,"context_line":"                        or_(*[column \u003d\u003d v for v in value]))"},{"line_number":194,"context_line":"                elif None in value:"},{"line_number":195,"context_line":"                    query \u003d query.filter("},{"line_number":196,"context_line":"                        or_(*[column \u003d\u003d v for v in value]))"},{"line_number":197,"context_line":"                elif isinstance(value, obj_utils.StringMatchingFilterObj):"}],"source_content_type":"text/x-python","patch_set":36,"id":"3f4b6375_77cd365c","line":194,"updated":"2017-10-19 08:28:44.000000000","message":"This part will be addressed by https://review.openstack.org/#/c/512908/","commit_id":"60ac9512212d8ae257f3b37b91462d3913f2ae25"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"c0ed9e1e86703ad022f0c90dcc51d9b5e71127d4","unresolved":false,"context_lines":[{"line_number":191,"context_line":"                    # do multiple equals matches"},{"line_number":192,"context_line":"                    query \u003d query.filter("},{"line_number":193,"context_line":"                        or_(*[column \u003d\u003d v for v in value]))"},{"line_number":194,"context_line":"                elif None in value:"},{"line_number":195,"context_line":"                    query \u003d query.filter("},{"line_number":196,"context_line":"                        or_(*[column \u003d\u003d v for v in value]))"},{"line_number":197,"context_line":"                elif isinstance(value, obj_utils.StringMatchingFilterObj):"}],"source_content_type":"text/x-python","patch_set":37,"id":"3f4b6375_78c5490a","line":194,"updated":"2017-10-27 18:26:33.000000000","message":"I assume it won\u0027t be part of this patch but will come from https://review.openstack.org/#/c/512908/ ? Can we rebase then?","commit_id":"efb48961d042688c654c085bf0b9bf7385c0dd12"}],"neutron/db/dns_db.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"3c6cac185fa7a2313c97704f435ce9163130d772","unresolved":false,"context_lines":[{"line_number":208,"context_line":"                                                     dns_name, records):"},{"line_number":209,"context_line":"        try:"},{"line_number":210,"context_line":"            self.dns_driver.delete_record_set(context, dns_domain, dns_name,"},{"line_number":211,"context_line":"                                              [str(r) for r in records])"},{"line_number":212,"context_line":"        except (dns.DNSDomainNotFound, dns.DuplicateRecordSet) as e:"},{"line_number":213,"context_line":"            LOG.exception(\"Error deleting Floating IP data from external \""},{"line_number":214,"context_line":"                          \"DNS service. Name: \u0027%(name)s\u0027. Domain: \""}],"source_content_type":"text/x-python","patch_set":24,"id":"9f436f4f_74b547cd","line":211,"updated":"2017-08-18 10:02:43.000000000","message":"I don\u0027t think this conversion is needed. There are other calls to \"delete_record_set\" using a list of netaddr.IPAddress instead a list of strings [1].\n\n\"delete_record_set\" implementation uses those records here: [2]. netaddre.IPAddress acepts both an string or another IPAddress object.\n\n[1] http://codesearch.openstack.org/?q\u003ddelete_record_set\u0026i\u003dnope\u0026files\u003d\u0026repos\u003dneutron\n[2] http://git.openstack.org/cgit/openstack/neutron/tree/neutron/services/externaldns/drivers/designate/driver.py#n158","commit_id":"b15cd995a8f8aa7af911b16f5ccc325012a2f60e"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"a22ac535e421f9e06c4c01fbd35e4653bf6af5fc","unresolved":false,"context_lines":[{"line_number":208,"context_line":"                                                     dns_name, records):"},{"line_number":209,"context_line":"        try:"},{"line_number":210,"context_line":"            self.dns_driver.delete_record_set(context, dns_domain, dns_name,"},{"line_number":211,"context_line":"                                              [str(r) for r in records])"},{"line_number":212,"context_line":"        except (dns.DNSDomainNotFound, dns.DuplicateRecordSet) as e:"},{"line_number":213,"context_line":"            LOG.exception(\"Error deleting Floating IP data from external \""},{"line_number":214,"context_line":"                          \"DNS service. Name: \u0027%(name)s\u0027. Domain: \""}],"source_content_type":"text/x-python","patch_set":24,"id":"9f436f4f_db675bb7","line":211,"in_reply_to":"9f436f4f_74b547cd","updated":"2017-08-21 02:30:29.000000000","message":"The reason I have to make this change is because of the comparison in [1]. \"records\" here is netaddress.IPAddress but \"ips\" is still string. I have to change either here or [1], otherwise we will encounter duplicate exception all the time. \n\nI will check which is better, to make \"ips\" netaddress.IPAddress or \"records\" strings. \n\n[1] http://git.openstack.org/cgit/openstack/neutron/tree/neutron/services/externaldns/drivers/designate/driver.py#n171","commit_id":"b15cd995a8f8aa7af911b16f5ccc325012a2f60e"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"ef078bd64ea3390dccc2b3e39df62f41fc86ce7e","unresolved":false,"context_lines":[{"line_number":208,"context_line":"                                                     dns_name, records):"},{"line_number":209,"context_line":"        try:"},{"line_number":210,"context_line":"            self.dns_driver.delete_record_set(context, dns_domain, dns_name,"},{"line_number":211,"context_line":"                                              [str(r) for r in records])"},{"line_number":212,"context_line":"        except (dns.DNSDomainNotFound, dns.DuplicateRecordSet) as e:"},{"line_number":213,"context_line":"            LOG.exception(\"Error deleting Floating IP data from external \""},{"line_number":214,"context_line":"                          \"DNS service. Name: \u0027%(name)s\u0027. Domain: \""}],"source_content_type":"text/x-python","patch_set":24,"id":"7f287b81_9c0d7c92","line":211,"in_reply_to":"9f436f4f_db675bb7","updated":"2017-08-23 02:18:10.000000000","message":"I am reverting back to the change of \"records\" instead of \"ips\", because delete_record_set() is also called by PortDNS and at this moment Port integration is not implemented, which is to say, \"records\" in PortDNS is still string. Change of \"ips\" to netaddr.IPAddress will propagate many test failures related to PortDNS (examples in PS 25) \n\nWe may be able to revisit if we would prefer the comparison being hold in netaddr.IPAddress after Port OVO is integrated.","commit_id":"b15cd995a8f8aa7af911b16f5ccc325012a2f60e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"3c6cac185fa7a2313c97704f435ce9163130d772","unresolved":false,"context_lines":[{"line_number":239,"context_line":"                                         records):"},{"line_number":240,"context_line":"        try:"},{"line_number":241,"context_line":"            self.dns_driver.create_record_set(context, dns_domain, dns_name,"},{"line_number":242,"context_line":"                                              [str(r) for r in records])"},{"line_number":243,"context_line":"        except (dns.DNSDomainNotFound, dns.DuplicateRecordSet) as e:"},{"line_number":244,"context_line":"            LOG.exception(\"Error publishing floating IP data in external \""},{"line_number":245,"context_line":"                          \"DNS service. Name: \u0027%(name)s\u0027. Domain: \""}],"source_content_type":"text/x-python","patch_set":24,"id":"9f436f4f_34c7bf48","line":242,"range":{"start_line":242,"start_character":46,"end_line":242,"end_character":71},"updated":"2017-08-18 10:02:43.000000000","message":"ditto","commit_id":"b15cd995a8f8aa7af911b16f5ccc325012a2f60e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"49e16dd5227db4afe8f0bc017a7862edd8229c18","unresolved":false,"context_lines":[{"line_number":208,"context_line":"                                                     dns_name, records):"},{"line_number":209,"context_line":"        try:"},{"line_number":210,"context_line":"            self.dns_driver.delete_record_set(context, dns_domain, dns_name,"},{"line_number":211,"context_line":"                                              [str(r) for r in records])"},{"line_number":212,"context_line":"        except (dns.DNSDomainNotFound, dns.DuplicateRecordSet) as e:"},{"line_number":213,"context_line":"            LOG.exception(\"Error deleting Floating IP data from external \""},{"line_number":214,"context_line":"                          \"DNS service. Name: \u0027%(name)s\u0027. Domain: \""}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_05582f85","line":211,"range":{"start_line":211,"start_character":46,"end_line":211,"end_character":71},"updated":"2017-08-31 13:38:20.000000000","message":"nit: since you need this list here and in line 220, consider calculating it before try: ...","commit_id":"f09902d96094cee4415e0a6aec1cf609cb981db3"},{"author":{"_account_id":15471,"name":"Nguyen Phuong An","email":"annp.cs51@gmail.com","username":"An-FVL"},"change_message_id":"836a4345f1eb6a268e34ef3b06cd553ef4a180e6","unresolved":false,"context_lines":[{"line_number":208,"context_line":"                                                     dns_name, records):"},{"line_number":209,"context_line":"        try:"},{"line_number":210,"context_line":"            self.dns_driver.delete_record_set(context, dns_domain, dns_name,"},{"line_number":211,"context_line":"                                              [str(r) for r in records])"},{"line_number":212,"context_line":"        except (dns.DNSDomainNotFound, dns.DuplicateRecordSet) as e:"},{"line_number":213,"context_line":"            LOG.exception(\"Error deleting Floating IP data from external \""},{"line_number":214,"context_line":"                          \"DNS service. Name: \u0027%(name)s\u0027. Domain: \""}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_c54b2e5d","line":211,"range":{"start_line":211,"start_character":46,"end_line":211,"end_character":71},"in_reply_to":"7f287b81_05582f85","updated":"2017-09-01 10:00:21.000000000","message":"+1","commit_id":"f09902d96094cee4415e0a6aec1cf609cb981db3"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"cbb48f1f922f0d55495120c2186695b2fd16948a","unresolved":false,"context_lines":[{"line_number":208,"context_line":"                                                     dns_name, records):"},{"line_number":209,"context_line":"        try:"},{"line_number":210,"context_line":"            self.dns_driver.delete_record_set(context, dns_domain, dns_name,"},{"line_number":211,"context_line":"                                              [str(r) for r in records])"},{"line_number":212,"context_line":"        except (dns.DNSDomainNotFound, dns.DuplicateRecordSet) as e:"},{"line_number":213,"context_line":"            LOG.exception(\"Error deleting Floating IP data from external \""},{"line_number":214,"context_line":"                          \"DNS service. Name: \u0027%(name)s\u0027. Domain: \""}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_0e6ba01f","line":211,"range":{"start_line":211,"start_character":46,"end_line":211,"end_character":71},"in_reply_to":"7f287b81_05582f85","updated":"2017-09-04 08:34:35.000000000","message":"Done. Also ditto to Line 220 and Line 242.","commit_id":"f09902d96094cee4415e0a6aec1cf609cb981db3"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f742c4b571bb43b017fad86eef3d23c315243209","unresolved":false,"context_lines":[{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    def _delete_floatingip_from_external_dns_service(self, context, dns_domain,"},{"line_number":208,"context_line":"                                                     dns_name, records):"},{"line_number":209,"context_line":"        records_string \u003d [str(r) for r in records]"},{"line_number":210,"context_line":"        try:"},{"line_number":211,"context_line":"            self.dns_driver.delete_record_set(context, dns_domain, dns_name,"},{"line_number":212,"context_line":"                                              records_string)"}],"source_content_type":"text/x-python","patch_set":34,"id":"9f5c4f37_83e63a16","line":209,"range":{"start_line":209,"start_character":8,"end_line":209,"end_character":22},"updated":"2017-09-21 19:57:02.000000000","message":"it\u0027s not a string, it\u0027s a list of strings (addresses). maybe -\u003e ips?","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9ddc23d159d9e9006618639484f4d99c5dbcdfbb","unresolved":false,"context_lines":[{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    def _delete_floatingip_from_external_dns_service(self, context, dns_domain,"},{"line_number":208,"context_line":"                                                     dns_name, records):"},{"line_number":209,"context_line":"        records_string \u003d [str(r) for r in records]"},{"line_number":210,"context_line":"        try:"},{"line_number":211,"context_line":"            self.dns_driver.delete_record_set(context, dns_domain, dns_name,"},{"line_number":212,"context_line":"                                              records_string)"}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_4da5d403","line":209,"range":{"start_line":209,"start_character":8,"end_line":209,"end_character":22},"in_reply_to":"9f5c4f37_83e63a16","updated":"2017-10-11 07:38:50.000000000","message":"Done","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f742c4b571bb43b017fad86eef3d23c315243209","unresolved":false,"context_lines":[{"line_number":238,"context_line":""},{"line_number":239,"context_line":"    def _add_ips_to_external_dns_service(self, context, dns_domain, dns_name,"},{"line_number":240,"context_line":"                                         records):"},{"line_number":241,"context_line":"        records_string \u003d [str(r) for r in records]"},{"line_number":242,"context_line":"        try:"},{"line_number":243,"context_line":"            self.dns_driver.create_record_set(context, dns_domain, dns_name,"},{"line_number":244,"context_line":"                                              records_string)"}],"source_content_type":"text/x-python","patch_set":34,"id":"9f5c4f37_e3c05653","line":241,"updated":"2017-09-21 19:57:02.000000000","message":"ditto","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9ddc23d159d9e9006618639484f4d99c5dbcdfbb","unresolved":false,"context_lines":[{"line_number":238,"context_line":""},{"line_number":239,"context_line":"    def _add_ips_to_external_dns_service(self, context, dns_domain, dns_name,"},{"line_number":240,"context_line":"                                         records):"},{"line_number":241,"context_line":"        records_string \u003d [str(r) for r in records]"},{"line_number":242,"context_line":"        try:"},{"line_number":243,"context_line":"            self.dns_driver.create_record_set(context, dns_domain, dns_name,"},{"line_number":244,"context_line":"                                              records_string)"}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_0dafdce3","line":241,"in_reply_to":"9f5c4f37_e3c05653","updated":"2017-10-11 07:38:50.000000000","message":"Done","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"}],"neutron/db/l3_db.py":[{"author":{"_account_id":20246,"name":"Aradhana Singh","email":"aradhanamailbox@gmail.com","username":"asingh"},"change_message_id":"4587d01926de77f8f819c655730102d8e75be7ce","unresolved":false,"context_lines":[{"line_number":142,"context_line":"                              port_id)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def _fix_or_kill_floating_port(self, context, port_id):"},{"line_number":145,"context_line":"        fip \u003d l3_objs.FloatingIP.get_objects("},{"line_number":146,"context_line":"            context, floating_port_id\u003dport_id)"},{"line_number":147,"context_line":"        if fip:"},{"line_number":148,"context_line":"            LOG.warning(_LW(\"Found incorrect device_id on floating port \""},{"line_number":149,"context_line":"                            \"%(pid)s, correcting to %(fip)s.\"),"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a30ddce_0d8915cb","line":146,"range":{"start_line":145,"start_character":0,"end_line":146,"end_character":46},"updated":"2017-03-06 22:50:34.000000000","message":"nit: can fit in one line\nfip_objs \u003d l3_objs.FloatingIP.get_objects(context, router_id\u003drouter_id)","commit_id":"17d3ce49ef583069cd8c664e6382a878d31398f0"},{"author":{"_account_id":22774,"name":"Shashank Kumar Shankar","email":"shashank.kumar.shankar@intel.com","username":"skshankar"},"change_message_id":"abd4fc77aa52c1a96349cf6398ff20edd02dae5a","unresolved":false,"context_lines":[{"line_number":142,"context_line":"                              port_id)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def _fix_or_kill_floating_port(self, context, port_id):"},{"line_number":145,"context_line":"        fip \u003d l3_objs.FloatingIP.get_objects("},{"line_number":146,"context_line":"            context, floating_port_id\u003dport_id)"},{"line_number":147,"context_line":"        if fip:"},{"line_number":148,"context_line":"            LOG.warning(_LW(\"Found incorrect device_id on floating port \""},{"line_number":149,"context_line":"                            \"%(pid)s, correcting to %(fip)s.\"),"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a1ced50_d76b0cf0","line":146,"range":{"start_line":145,"start_character":0,"end_line":146,"end_character":46},"in_reply_to":"9a30ddce_0d8915cb","updated":"2017-03-23 17:59:32.000000000","message":"Done","commit_id":"17d3ce49ef583069cd8c664e6382a878d31398f0"},{"author":{"_account_id":20246,"name":"Aradhana Singh","email":"aradhanamailbox@gmail.com","username":"asingh"},"change_message_id":"4587d01926de77f8f819c655730102d8e75be7ce","unresolved":false,"context_lines":[{"line_number":1398,"context_line":""},{"line_number":1399,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1400,"context_line":"    def delete_disassociated_floatingips(self, context, network_id):"},{"line_number":1401,"context_line":""},{"line_number":1402,"context_line":"        fip_objs \u003d l3_objs.FloatingIP.get_objects("},{"line_number":1403,"context_line":"            context, floating_network_id\u003dnetwork_id)"},{"line_number":1404,"context_line":""},{"line_number":1405,"context_line":"        if fip_objs:"},{"line_number":1406,"context_line":"            for fip in fip_objs:"},{"line_number":1407,"context_line":"                if fip.fixed_ip_address is None and fip.fixed_port_id is None:"},{"line_number":1408,"context_line":"                    self.delete_floatingip(context, fip.id)"},{"line_number":1409,"context_line":""},{"line_number":1410,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1411,"context_line":"    def get_floatingips_count(self, context, filters\u003dNone):"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a30ddce_0ddbd5ee","line":1408,"range":{"start_line":1401,"start_character":0,"end_line":1408,"end_character":59},"updated":"2017-03-06 22:50:34.000000000","message":"Can be replaced by following\nfip_objs \u003d l3_objs.FloatingIP.get_objects(context,\n    floating_network_id\u003dnetwork_id, fixed_port_id\u003dNone, router_id\u003dNone)\nfor fip in fip_objs:\n    self.delete_floatingip(context, fip.id)","commit_id":"17d3ce49ef583069cd8c664e6382a878d31398f0"},{"author":{"_account_id":22774,"name":"Shashank Kumar Shankar","email":"shashank.kumar.shankar@intel.com","username":"skshankar"},"change_message_id":"abd4fc77aa52c1a96349cf6398ff20edd02dae5a","unresolved":false,"context_lines":[{"line_number":1398,"context_line":""},{"line_number":1399,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1400,"context_line":"    def delete_disassociated_floatingips(self, context, network_id):"},{"line_number":1401,"context_line":""},{"line_number":1402,"context_line":"        fip_objs \u003d l3_objs.FloatingIP.get_objects("},{"line_number":1403,"context_line":"            context, floating_network_id\u003dnetwork_id)"},{"line_number":1404,"context_line":""},{"line_number":1405,"context_line":"        if fip_objs:"},{"line_number":1406,"context_line":"            for fip in fip_objs:"},{"line_number":1407,"context_line":"                if fip.fixed_ip_address is None and fip.fixed_port_id is None:"},{"line_number":1408,"context_line":"                    self.delete_floatingip(context, fip.id)"},{"line_number":1409,"context_line":""},{"line_number":1410,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1411,"context_line":"    def get_floatingips_count(self, context, filters\u003dNone):"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a1ced50_377380e9","line":1408,"range":{"start_line":1401,"start_character":0,"end_line":1408,"end_character":59},"in_reply_to":"9a30ddce_0ddbd5ee","updated":"2017-03-23 17:59:32.000000000","message":"The None filter isn\u0027t supported yet. I needs to be handled explicitly.","commit_id":"17d3ce49ef583069cd8c664e6382a878d31398f0"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"e1f629617b0295facc9df6164204b9437a081ef4","unresolved":false,"context_lines":[{"line_number":1399,"context_line":"    def delete_disassociated_floatingips(self, context, network_id):"},{"line_number":1400,"context_line":""},{"line_number":1401,"context_line":"        fip_objs \u003d l3_objs.FloatingIP.get_objects("},{"line_number":1402,"context_line":"            context, floating_network_id\u003dnetwork_id)"},{"line_number":1403,"context_line":""},{"line_number":1404,"context_line":"        if fip_objs:"},{"line_number":1405,"context_line":"            for fip in fip_objs:"}],"source_content_type":"text/x-python","patch_set":16,"id":"7ffa3b31_ec629e16","line":1402,"updated":"2017-04-14 23:45:29.000000000","message":"does get_objects not support filtering by \u0027None\u0027?","commit_id":"5dbc10cbfa3fcdaecba78e4e921abdd0d23acc5c"},{"author":{"_account_id":22774,"name":"Shashank Kumar Shankar","email":"shashank.kumar.shankar@intel.com","username":"skshankar"},"change_message_id":"921b088ef5c03b32f0007777983cb1b4ed88c9ab","unresolved":false,"context_lines":[{"line_number":1399,"context_line":"    def delete_disassociated_floatingips(self, context, network_id):"},{"line_number":1400,"context_line":""},{"line_number":1401,"context_line":"        fip_objs \u003d l3_objs.FloatingIP.get_objects("},{"line_number":1402,"context_line":"            context, floating_network_id\u003dnetwork_id)"},{"line_number":1403,"context_line":""},{"line_number":1404,"context_line":"        if fip_objs:"},{"line_number":1405,"context_line":"            for fip in fip_objs:"}],"source_content_type":"text/x-python","patch_set":16,"id":"7ffa3b31_271bff1b","line":1402,"in_reply_to":"7ffa3b31_ec629e16","updated":"2017-04-15 00:34:08.000000000","message":"Yes. It doesn\u0027t. When I pass None, it runs into errors.","commit_id":"5dbc10cbfa3fcdaecba78e4e921abdd0d23acc5c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"31b969deb425643e0ebee154eab300f6257d7ef2","unresolved":false,"context_lines":[{"line_number":148,"context_line":"                              port_id)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    def _fix_or_kill_floating_port(self, context, port_id):"},{"line_number":151,"context_line":"        fip \u003d l3_objs.FloatingIP.get_objects(context, floating_port_id\u003dport_id)"},{"line_number":152,"context_line":"        if fip:"},{"line_number":153,"context_line":"            LOG.warning(_LW(\"Found incorrect device_id on floating port \""},{"line_number":154,"context_line":"                            \"%(pid)s, correcting to %(fip)s.\"),"}],"source_content_type":"text/x-python","patch_set":18,"id":"ff346bd7_d2347295","line":151,"range":{"start_line":151,"start_character":8,"end_line":151,"end_character":11},"updated":"2017-07-27 15:54:28.000000000","message":"fips, to reflect it\u0027s a list","commit_id":"bc861a28e4774f5273e3f99b052d26ab91baf465"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"ee109ca51f90d77add54a4f656919bd8c1e66d5f","unresolved":false,"context_lines":[{"line_number":148,"context_line":"                              port_id)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    def _fix_or_kill_floating_port(self, context, port_id):"},{"line_number":151,"context_line":"        fip \u003d l3_objs.FloatingIP.get_objects(context, floating_port_id\u003dport_id)"},{"line_number":152,"context_line":"        if fip:"},{"line_number":153,"context_line":"            LOG.warning(_LW(\"Found incorrect device_id on floating port \""},{"line_number":154,"context_line":"                            \"%(pid)s, correcting to %(fip)s.\"),"}],"source_content_type":"text/x-python","patch_set":18,"id":"ff346bd7_f47f5063","line":151,"range":{"start_line":151,"start_character":8,"end_line":151,"end_character":11},"in_reply_to":"ff346bd7_d2347295","updated":"2017-07-28 10:52:12.000000000","message":"Done","commit_id":"bc861a28e4774f5273e3f99b052d26ab91baf465"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"31b969deb425643e0ebee154eab300f6257d7ef2","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        if fip:"},{"line_number":153,"context_line":"            LOG.warning(_LW(\"Found incorrect device_id on floating port \""},{"line_number":154,"context_line":"                            \"%(pid)s, correcting to %(fip)s.\"),"},{"line_number":155,"context_line":"                        {\u0027pid\u0027: port_id, \u0027fip\u0027: fip[0].id})"},{"line_number":156,"context_line":"            self._core_plugin.update_port("},{"line_number":157,"context_line":"                context, port_id, {\u0027port\u0027: {\u0027device_id\u0027: fip[0].id}})"},{"line_number":158,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":18,"id":"ff346bd7_b2b32e0a","line":155,"range":{"start_line":155,"start_character":51,"end_line":155,"end_character":55},"updated":"2017-07-27 15:54:28.000000000","message":"since you are interested in a single result, please limit get_objects() with a _Pager(limit\u003d1)","commit_id":"bc861a28e4774f5273e3f99b052d26ab91baf465"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"ee109ca51f90d77add54a4f656919bd8c1e66d5f","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        if fip:"},{"line_number":153,"context_line":"            LOG.warning(_LW(\"Found incorrect device_id on floating port \""},{"line_number":154,"context_line":"                            \"%(pid)s, correcting to %(fip)s.\"),"},{"line_number":155,"context_line":"                        {\u0027pid\u0027: port_id, \u0027fip\u0027: fip[0].id})"},{"line_number":156,"context_line":"            self._core_plugin.update_port("},{"line_number":157,"context_line":"                context, port_id, {\u0027port\u0027: {\u0027device_id\u0027: fip[0].id}})"},{"line_number":158,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":18,"id":"ff346bd7_d49a0cb7","line":155,"range":{"start_line":155,"start_character":51,"end_line":155,"end_character":55},"in_reply_to":"ff346bd7_b2b32e0a","updated":"2017-07-28 10:52:12.000000000","message":"Done","commit_id":"bc861a28e4774f5273e3f99b052d26ab91baf465"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"31b969deb425643e0ebee154eab300f6257d7ef2","unresolved":false,"context_lines":[{"line_number":910,"context_line":"                raise e.errors[0].error"},{"line_number":911,"context_line":"            raise l3.RouterInUse(router_id\u003drouter_id, reason\u003de)"},{"line_number":912,"context_line":"        for fip_obj in fip_objs:"},{"line_number":913,"context_line":"            if netaddr.IPAddress(fip_obj[\u0027fixed_ip_address\u0027]) in subnet_cidr:"},{"line_number":914,"context_line":"                raise l3.RouterInterfaceInUseByFloatingIP("},{"line_number":915,"context_line":"                    router_id\u003drouter_id, subnet_id\u003dsubnet_id)"},{"line_number":916,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"ff346bd7_72fb8678","line":913,"range":{"start_line":913,"start_character":15,"end_line":913,"end_character":61},"updated":"2017-07-27 15:54:28.000000000","message":"the field should already be IPAddress I believe","commit_id":"bc861a28e4774f5273e3f99b052d26ab91baf465"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"ee109ca51f90d77add54a4f656919bd8c1e66d5f","unresolved":false,"context_lines":[{"line_number":910,"context_line":"                raise e.errors[0].error"},{"line_number":911,"context_line":"            raise l3.RouterInUse(router_id\u003drouter_id, reason\u003de)"},{"line_number":912,"context_line":"        for fip_obj in fip_objs:"},{"line_number":913,"context_line":"            if netaddr.IPAddress(fip_obj[\u0027fixed_ip_address\u0027]) in subnet_cidr:"},{"line_number":914,"context_line":"                raise l3.RouterInterfaceInUseByFloatingIP("},{"line_number":915,"context_line":"                    router_id\u003drouter_id, subnet_id\u003dsubnet_id)"},{"line_number":916,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"ff346bd7_140e54e4","line":913,"range":{"start_line":913,"start_character":15,"end_line":913,"end_character":61},"in_reply_to":"ff346bd7_72fb8678","updated":"2017-07-28 10:52:12.000000000","message":"Done","commit_id":"bc861a28e4774f5273e3f99b052d26ab91baf465"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"31b969deb425643e0ebee154eab300f6257d7ef2","unresolved":false,"context_lines":[{"line_number":1186,"context_line":"                    context,"},{"line_number":1187,"context_line":"                    fixed_port_id\u003dfip[\u0027port_id\u0027],"},{"line_number":1188,"context_line":"                    floating_network_id\u003dfloatingip_db[\u0027floating_network_id\u0027],"},{"line_number":1189,"context_line":"                    fixed_ip_address\u003dinternal_ip_address):"},{"line_number":1190,"context_line":"                raise l3.FloatingIPPortAlreadyAssociated("},{"line_number":1191,"context_line":"                    port_id\u003dfip[\u0027port_id\u0027],"},{"line_number":1192,"context_line":"                    fip_id\u003dfloatingip_db[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":18,"id":"ff346bd7_92e94ab8","line":1189,"range":{"start_line":1189,"start_character":37,"end_line":1189,"end_character":56},"updated":"2017-07-27 15:54:28.000000000","message":"netaddr.IPAddress?","commit_id":"bc861a28e4774f5273e3f99b052d26ab91baf465"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"ee109ca51f90d77add54a4f656919bd8c1e66d5f","unresolved":false,"context_lines":[{"line_number":1186,"context_line":"                    context,"},{"line_number":1187,"context_line":"                    fixed_port_id\u003dfip[\u0027port_id\u0027],"},{"line_number":1188,"context_line":"                    floating_network_id\u003dfloatingip_db[\u0027floating_network_id\u0027],"},{"line_number":1189,"context_line":"                    fixed_ip_address\u003dinternal_ip_address):"},{"line_number":1190,"context_line":"                raise l3.FloatingIPPortAlreadyAssociated("},{"line_number":1191,"context_line":"                    port_id\u003dfip[\u0027port_id\u0027],"},{"line_number":1192,"context_line":"                    fip_id\u003dfloatingip_db[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":18,"id":"ff346bd7_3434b892","line":1189,"range":{"start_line":1189,"start_character":37,"end_line":1189,"end_character":56},"in_reply_to":"ff346bd7_92e94ab8","updated":"2017-07-28 10:52:12.000000000","message":"Done","commit_id":"bc861a28e4774f5273e3f99b052d26ab91baf465"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"31b969deb425643e0ebee154eab300f6257d7ef2","unresolved":false,"context_lines":[{"line_number":1360,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1361,"context_line":"    def update_floatingip_status(self, context, floatingip_id, status):"},{"line_number":1362,"context_line":"        \"\"\"Update operational status for floating IP in neutron DB.\"\"\""},{"line_number":1363,"context_line":"        fip_objs \u003d l3_objs.FloatingIP.get_objects(context, id\u003dfloatingip_id)"},{"line_number":1364,"context_line":"        for fip in fip_objs:"},{"line_number":1365,"context_line":"            fip.status \u003d status"},{"line_number":1366,"context_line":"            fip.update()"},{"line_number":1367,"context_line":""},{"line_number":1368,"context_line":"    def _delete_floatingip(self, context, id):"},{"line_number":1369,"context_line":"        floatingip \u003d self._get_floatingip(context, id)"}],"source_content_type":"text/x-python","patch_set":18,"id":"ff346bd7_523d2229","line":1366,"range":{"start_line":1363,"start_character":8,"end_line":1366,"end_character":24},"updated":"2017-07-27 15:54:28.000000000","message":"I think we can use update_objects() to avoid object construction","commit_id":"bc861a28e4774f5273e3f99b052d26ab91baf465"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"ee109ca51f90d77add54a4f656919bd8c1e66d5f","unresolved":false,"context_lines":[{"line_number":1360,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1361,"context_line":"    def update_floatingip_status(self, context, floatingip_id, status):"},{"line_number":1362,"context_line":"        \"\"\"Update operational status for floating IP in neutron DB.\"\"\""},{"line_number":1363,"context_line":"        fip_objs \u003d l3_objs.FloatingIP.get_objects(context, id\u003dfloatingip_id)"},{"line_number":1364,"context_line":"        for fip in fip_objs:"},{"line_number":1365,"context_line":"            fip.status \u003d status"},{"line_number":1366,"context_line":"            fip.update()"},{"line_number":1367,"context_line":""},{"line_number":1368,"context_line":"    def _delete_floatingip(self, context, id):"},{"line_number":1369,"context_line":"        floatingip \u003d self._get_floatingip(context, id)"}],"source_content_type":"text/x-python","patch_set":18,"id":"ff346bd7_949da467","line":1366,"range":{"start_line":1363,"start_character":8,"end_line":1366,"end_character":24},"in_reply_to":"ff346bd7_523d2229","updated":"2017-07-28 10:52:12.000000000","message":"Done","commit_id":"bc861a28e4774f5273e3f99b052d26ab91baf465"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"31b969deb425643e0ebee154eab300f6257d7ef2","unresolved":false,"context_lines":[{"line_number":1409,"context_line":""},{"line_number":1410,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1411,"context_line":"    def delete_disassociated_floatingips(self, context, network_id):"},{"line_number":1412,"context_line":"        fip_objs \u003d l3_objs.FloatingIP.get_objects("},{"line_number":1413,"context_line":"            context, floating_network_id\u003dnetwork_id)"},{"line_number":1414,"context_line":""},{"line_number":1415,"context_line":"        if fip_objs:"},{"line_number":1416,"context_line":"            for fip in fip_objs:"},{"line_number":1417,"context_line":"                if fip.fixed_ip_address is None and fip.fixed_port_id is None:"},{"line_number":1418,"context_line":"                    self.delete_floatingip(context, fip.id)"},{"line_number":1419,"context_line":""},{"line_number":1420,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1421,"context_line":"    def get_floatingips_count(self, context, filters\u003dNone):"}],"source_content_type":"text/x-python","patch_set":18,"id":"ff346bd7_f27ad6ee","line":1418,"range":{"start_line":1412,"start_character":8,"end_line":1418,"end_character":59},"updated":"2017-07-27 15:54:28.000000000","message":"should we use delete_objects() instead?","commit_id":"bc861a28e4774f5273e3f99b052d26ab91baf465"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"ee109ca51f90d77add54a4f656919bd8c1e66d5f","unresolved":false,"context_lines":[{"line_number":1409,"context_line":""},{"line_number":1410,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1411,"context_line":"    def delete_disassociated_floatingips(self, context, network_id):"},{"line_number":1412,"context_line":"        fip_objs \u003d l3_objs.FloatingIP.get_objects("},{"line_number":1413,"context_line":"            context, floating_network_id\u003dnetwork_id)"},{"line_number":1414,"context_line":""},{"line_number":1415,"context_line":"        if fip_objs:"},{"line_number":1416,"context_line":"            for fip in fip_objs:"},{"line_number":1417,"context_line":"                if fip.fixed_ip_address is None and fip.fixed_port_id is None:"},{"line_number":1418,"context_line":"                    self.delete_floatingip(context, fip.id)"},{"line_number":1419,"context_line":""},{"line_number":1420,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1421,"context_line":"    def get_floatingips_count(self, context, filters\u003dNone):"}],"source_content_type":"text/x-python","patch_set":18,"id":"ff346bd7_9476c43d","line":1418,"range":{"start_line":1412,"start_character":8,"end_line":1418,"end_character":59},"in_reply_to":"ff346bd7_f27ad6ee","updated":"2017-07-28 10:52:12.000000000","message":"It seems that delete_objects() does not acknowledge \"None\" as a filter. When I tried to pass fixed_ip_address\u003dNone abd fixed_port_id\u003dNone, even though we have a db record as:\n\n[\u003cneutron.db.models.l3.FloatingIP[object at 7fa9a514d290] {project_id\u003du\u002746f70361-ba71-4bd0-9769-3573fd227c4b\u0027, id\u003du\u00273a1da3b3-6684-4e7c-a1be-53c2c628b98d\u0027, floating_ip_address\u003du\u0027200.0.0.4\u0027, floating_network_id\u003du\u0027a4c3f4df-e334-48bc-b037-1dae80321fb1\u0027, floating_port_id\u003du\u00273efec321-79fa-4145-bc47-50b690e52d7c\u0027, fixed_port_id\u003dNone, fixed_ip_address\u003dNone, router_id\u003dNone, last_known_router_id\u003dNone, status\u003du\u0027ACTIVE\u0027, standard_attr_id\u003d15}\u003e]\n\nafter we apply the filter in \u003chttps://github.com/openstack/neutron/blob/master/neutron/db/_model_query.py#L205\u003e, we lose track of this db record.","commit_id":"bc861a28e4774f5273e3f99b052d26ab91baf465"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"31b969deb425643e0ebee154eab300f6257d7ef2","unresolved":false,"context_lines":[{"line_number":1429,"context_line":"        except l3.RouterNotFound:"},{"line_number":1430,"context_line":"            return False"},{"line_number":1431,"context_line":""},{"line_number":1432,"context_line":"    def _floating_ip_exists(self, context, floating_ip_id):"},{"line_number":1433,"context_line":"        return True if l3_objs.FloatingIP.objects_exist("},{"line_number":1434,"context_line":"            context, id\u003dfloating_ip_id) else False"},{"line_number":1435,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"ff346bd7_124afaaa","line":1432,"range":{"start_line":1432,"start_character":8,"end_line":1432,"end_character":27},"updated":"2017-07-27 15:54:28.000000000","message":"(No action required) this helper because useless, we may want to remove it in a follow up.","commit_id":"bc861a28e4774f5273e3f99b052d26ab91baf465"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"31b969deb425643e0ebee154eab300f6257d7ef2","unresolved":false,"context_lines":[{"line_number":1430,"context_line":"            return False"},{"line_number":1431,"context_line":""},{"line_number":1432,"context_line":"    def _floating_ip_exists(self, context, floating_ip_id):"},{"line_number":1433,"context_line":"        return True if l3_objs.FloatingIP.objects_exist("},{"line_number":1434,"context_line":"            context, id\u003dfloating_ip_id) else False"},{"line_number":1435,"context_line":""},{"line_number":1436,"context_line":"    def prevent_l3_port_deletion(self, context, port_id):"},{"line_number":1437,"context_line":"        \"\"\"Checks to make sure a port is allowed to be deleted."}],"source_content_type":"text/x-python","patch_set":18,"id":"ff346bd7_726ee62f","line":1434,"range":{"start_line":1433,"start_character":8,"end_line":1434,"end_character":50},"updated":"2017-07-27 15:54:28.000000000","message":"-\u003e return l3_objs.FloatingIP.objects_exist(...)","commit_id":"bc861a28e4774f5273e3f99b052d26ab91baf465"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"ee109ca51f90d77add54a4f656919bd8c1e66d5f","unresolved":false,"context_lines":[{"line_number":1430,"context_line":"            return False"},{"line_number":1431,"context_line":""},{"line_number":1432,"context_line":"    def _floating_ip_exists(self, context, floating_ip_id):"},{"line_number":1433,"context_line":"        return True if l3_objs.FloatingIP.objects_exist("},{"line_number":1434,"context_line":"            context, id\u003dfloating_ip_id) else False"},{"line_number":1435,"context_line":""},{"line_number":1436,"context_line":"    def prevent_l3_port_deletion(self, context, port_id):"},{"line_number":1437,"context_line":"        \"\"\"Checks to make sure a port is allowed to be deleted."}],"source_content_type":"text/x-python","patch_set":18,"id":"ff346bd7_d4a56ca3","line":1434,"range":{"start_line":1433,"start_character":8,"end_line":1434,"end_character":50},"in_reply_to":"ff346bd7_726ee62f","updated":"2017-07-28 10:52:12.000000000","message":"Done","commit_id":"bc861a28e4774f5273e3f99b052d26ab91baf465"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"bf2ff51efcbc0cdaa826a2460e2c8695f425d63d","unresolved":false,"context_lines":[{"line_number":914,"context_line":"                raise e.errors[0].error"},{"line_number":915,"context_line":"            raise l3.RouterInUse(router_id\u003drouter_id, reason\u003de)"},{"line_number":916,"context_line":"        for fip_obj in fip_objs:"},{"line_number":917,"context_line":"            if fip_obj[\u0027fixed_ip_address\u0027] in subnet_cidr:"},{"line_number":918,"context_line":"                raise l3.RouterInterfaceInUseByFloatingIP("},{"line_number":919,"context_line":"                    router_id\u003drouter_id, subnet_id\u003dsubnet_id)"},{"line_number":920,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"bf3e73b7_a90d8e91","line":917,"range":{"start_line":917,"start_character":15,"end_line":917,"end_character":42},"updated":"2017-08-07 18:09:01.000000000","message":"fip_obj.fixed_ip_address","commit_id":"70057da1d334c39b3b6f4e98bfd16a0504ff9cb8"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"4e1c27afac48bfff206bc05a1ff65ca022077a50","unresolved":false,"context_lines":[{"line_number":914,"context_line":"                raise e.errors[0].error"},{"line_number":915,"context_line":"            raise l3.RouterInUse(router_id\u003drouter_id, reason\u003de)"},{"line_number":916,"context_line":"        for fip_obj in fip_objs:"},{"line_number":917,"context_line":"            if fip_obj[\u0027fixed_ip_address\u0027] in subnet_cidr:"},{"line_number":918,"context_line":"                raise l3.RouterInterfaceInUseByFloatingIP("},{"line_number":919,"context_line":"                    router_id\u003drouter_id, subnet_id\u003dsubnet_id)"},{"line_number":920,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"9f436f4f_a44de53b","line":917,"range":{"start_line":917,"start_character":15,"end_line":917,"end_character":42},"in_reply_to":"bf3e73b7_a90d8e91","updated":"2017-08-17 08:15:28.000000000","message":"Done","commit_id":"70057da1d334c39b3b6f4e98bfd16a0504ff9cb8"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"bf2ff51efcbc0cdaa826a2460e2c8695f425d63d","unresolved":false,"context_lines":[{"line_number":1027,"context_line":""},{"line_number":1028,"context_line":"    def _get_floatingip(self, context, id):"},{"line_number":1029,"context_line":"        try:"},{"line_number":1030,"context_line":"            floatingip \u003d model_query.get_by_id("},{"line_number":1031,"context_line":"                context, l3_models.FloatingIP, id)"},{"line_number":1032,"context_line":"        except exc.NoResultFound:"},{"line_number":1033,"context_line":"            raise l3.FloatingIPNotFound(floatingip_id\u003did)"},{"line_number":1034,"context_line":"        return floatingip"}],"source_content_type":"text/x-python","patch_set":22,"id":"bf3e73b7_29807e8b","line":1031,"range":{"start_line":1030,"start_character":25,"end_line":1031,"end_character":50},"updated":"2017-08-07 18:09:01.000000000","message":"l3_obj.FloatingIp.get_object(context, id\u003did)","commit_id":"70057da1d334c39b3b6f4e98bfd16a0504ff9cb8"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"4e1c27afac48bfff206bc05a1ff65ca022077a50","unresolved":false,"context_lines":[{"line_number":1027,"context_line":""},{"line_number":1028,"context_line":"    def _get_floatingip(self, context, id):"},{"line_number":1029,"context_line":"        try:"},{"line_number":1030,"context_line":"            floatingip \u003d model_query.get_by_id("},{"line_number":1031,"context_line":"                context, l3_models.FloatingIP, id)"},{"line_number":1032,"context_line":"        except exc.NoResultFound:"},{"line_number":1033,"context_line":"            raise l3.FloatingIPNotFound(floatingip_id\u003did)"},{"line_number":1034,"context_line":"        return floatingip"}],"source_content_type":"text/x-python","patch_set":22,"id":"9f436f4f_8462e1ac","line":1031,"range":{"start_line":1030,"start_character":25,"end_line":1031,"end_character":50},"in_reply_to":"bf3e73b7_29807e8b","updated":"2017-08-17 08:15:28.000000000","message":"Done","commit_id":"70057da1d334c39b3b6f4e98bfd16a0504ff9cb8"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"025d4a8ae0a0ed295a632206a234b1411c91bc86","unresolved":false,"context_lines":[{"line_number":1220,"context_line":"                  \u0027last_known_router_id\u0027: previous_router_id}"},{"line_number":1221,"context_line":"        if \u0027description\u0027 in fip:"},{"line_number":1222,"context_line":"            update[\u0027description\u0027] \u003d fip[\u0027description\u0027]"},{"line_number":1223,"context_line":"        floatingip_db.update(update)"},{"line_number":1224,"context_line":"        return {\u0027fixed_ip_address\u0027: internal_ip_address,"},{"line_number":1225,"context_line":"                \u0027fixed_port_id\u0027: port_id,"},{"line_number":1226,"context_line":"                \u0027router_id\u0027: router_id,"}],"source_content_type":"text/x-python","patch_set":22,"id":"9f436f4f_df12c762","line":1223,"range":{"start_line":1223,"start_character":8,"end_line":1223,"end_character":36},"updated":"2017-08-18 13:22:32.000000000","message":"Did you forget this line? I think you need to call floatingip_obj.update() here","commit_id":"70057da1d334c39b3b6f4e98bfd16a0504ff9cb8"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"d88975cf1a4e5248e9f0717c380f1e8fb3afc1c1","unresolved":false,"context_lines":[{"line_number":1220,"context_line":"                  \u0027last_known_router_id\u0027: previous_router_id}"},{"line_number":1221,"context_line":"        if \u0027description\u0027 in fip:"},{"line_number":1222,"context_line":"            update[\u0027description\u0027] \u003d fip[\u0027description\u0027]"},{"line_number":1223,"context_line":"        floatingip_db.update(update)"},{"line_number":1224,"context_line":"        return {\u0027fixed_ip_address\u0027: internal_ip_address,"},{"line_number":1225,"context_line":"                \u0027fixed_port_id\u0027: port_id,"},{"line_number":1226,"context_line":"                \u0027router_id\u0027: router_id,"}],"source_content_type":"text/x-python","patch_set":22,"id":"9f436f4f_9bbe73d2","line":1223,"range":{"start_line":1223,"start_character":8,"end_line":1223,"end_character":36},"in_reply_to":"9f436f4f_df12c762","updated":"2017-08-21 02:35:28.000000000","message":"As what I commented in [1], I think we have to move it outside of this method. \n\n[1] https://review.openstack.org/#/c/396351/24/neutron/db/l3_db.py@1334","commit_id":"70057da1d334c39b3b6f4e98bfd16a0504ff9cb8"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"bf2ff51efcbc0cdaa826a2460e2c8695f425d63d","unresolved":false,"context_lines":[{"line_number":1285,"context_line":""},{"line_number":1286,"context_line":"            floating_fixed_ip \u003d external_ipv4_ips[0]"},{"line_number":1287,"context_line":"            floating_ip_address \u003d floating_fixed_ip[\u0027ip_address\u0027]"},{"line_number":1288,"context_line":"            floatingip_db \u003d l3_models.FloatingIP("},{"line_number":1289,"context_line":"                id\u003dfip_id,"},{"line_number":1290,"context_line":"                tenant_id\u003dfip[\u0027tenant_id\u0027],"},{"line_number":1291,"context_line":"                status\u003dinitial_status,"}],"source_content_type":"text/x-python","patch_set":22,"id":"bf3e73b7_6927a614","line":1288,"range":{"start_line":1288,"start_character":28,"end_line":1288,"end_character":37},"updated":"2017-08-07 18:09:01.000000000","message":"l3_obj","commit_id":"70057da1d334c39b3b6f4e98bfd16a0504ff9cb8"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"4e1c27afac48bfff206bc05a1ff65ca022077a50","unresolved":false,"context_lines":[{"line_number":1285,"context_line":""},{"line_number":1286,"context_line":"            floating_fixed_ip \u003d external_ipv4_ips[0]"},{"line_number":1287,"context_line":"            floating_ip_address \u003d floating_fixed_ip[\u0027ip_address\u0027]"},{"line_number":1288,"context_line":"            floatingip_db \u003d l3_models.FloatingIP("},{"line_number":1289,"context_line":"                id\u003dfip_id,"},{"line_number":1290,"context_line":"                tenant_id\u003dfip[\u0027tenant_id\u0027],"},{"line_number":1291,"context_line":"                status\u003dinitial_status,"}],"source_content_type":"text/x-python","patch_set":22,"id":"9f436f4f_445879f8","line":1288,"range":{"start_line":1288,"start_character":28,"end_line":1288,"end_character":37},"in_reply_to":"bf3e73b7_6927a614","updated":"2017-08-17 08:15:28.000000000","message":"Done","commit_id":"70057da1d334c39b3b6f4e98bfd16a0504ff9cb8"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"bf2ff51efcbc0cdaa826a2460e2c8695f425d63d","unresolved":false,"context_lines":[{"line_number":1297,"context_line":"            # and define external IP address"},{"line_number":1298,"context_line":"            assoc_result \u003d self._update_fip_assoc(context, fip,"},{"line_number":1299,"context_line":"                                                  floatingip_db, external_port)"},{"line_number":1300,"context_line":"            context.session.add(floatingip_db)"},{"line_number":1301,"context_line":"            floatingip_dict \u003d self._make_floatingip_dict("},{"line_number":1302,"context_line":"                floatingip_db, process_extensions\u003dFalse)"},{"line_number":1303,"context_line":"            if self._is_dns_integration_supported:"}],"source_content_type":"text/x-python","patch_set":22,"id":"bf3e73b7_4924e20d","line":1300,"range":{"start_line":1300,"start_character":12,"end_line":1300,"end_character":46},"updated":"2017-08-07 18:09:01.000000000","message":"floatingip_db.create() ?","commit_id":"70057da1d334c39b3b6f4e98bfd16a0504ff9cb8"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"4e1c27afac48bfff206bc05a1ff65ca022077a50","unresolved":false,"context_lines":[{"line_number":1297,"context_line":"            # and define external IP address"},{"line_number":1298,"context_line":"            assoc_result \u003d self._update_fip_assoc(context, fip,"},{"line_number":1299,"context_line":"                                                  floatingip_db, external_port)"},{"line_number":1300,"context_line":"            context.session.add(floatingip_db)"},{"line_number":1301,"context_line":"            floatingip_dict \u003d self._make_floatingip_dict("},{"line_number":1302,"context_line":"                floatingip_db, process_extensions\u003dFalse)"},{"line_number":1303,"context_line":"            if self._is_dns_integration_supported:"}],"source_content_type":"text/x-python","patch_set":22,"id":"9f436f4f_0476f170","line":1300,"range":{"start_line":1300,"start_character":12,"end_line":1300,"end_character":46},"in_reply_to":"bf3e73b7_4924e20d","updated":"2017-08-17 08:15:28.000000000","message":"Done","commit_id":"70057da1d334c39b3b6f4e98bfd16a0504ff9cb8"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"bf2ff51efcbc0cdaa826a2460e2c8695f425d63d","unresolved":false,"context_lines":[{"line_number":1377,"context_line":"        # a transaction first to remove it ourselves because the delete_port"},{"line_number":1378,"context_line":"        # method will yield in its post-commit activities."},{"line_number":1379,"context_line":"        self._core_plugin.delete_port(context.elevated(),"},{"line_number":1380,"context_line":"                                      floatingip[\u0027floating_port_id\u0027],"},{"line_number":1381,"context_line":"                                      l3_port_check\u003dFalse)"},{"line_number":1382,"context_line":"        return floatingip_dict"},{"line_number":1383,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"bf3e73b7_a9e6aee7","line":1380,"range":{"start_line":1380,"start_character":38,"end_line":1380,"end_character":68},"updated":"2017-08-07 18:09:01.000000000","message":"floatingip.floating_port_id","commit_id":"70057da1d334c39b3b6f4e98bfd16a0504ff9cb8"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"4e1c27afac48bfff206bc05a1ff65ca022077a50","unresolved":false,"context_lines":[{"line_number":1377,"context_line":"        # a transaction first to remove it ourselves because the delete_port"},{"line_number":1378,"context_line":"        # method will yield in its post-commit activities."},{"line_number":1379,"context_line":"        self._core_plugin.delete_port(context.elevated(),"},{"line_number":1380,"context_line":"                                      floatingip[\u0027floating_port_id\u0027],"},{"line_number":1381,"context_line":"                                      l3_port_check\u003dFalse)"},{"line_number":1382,"context_line":"        return floatingip_dict"},{"line_number":1383,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"9f436f4f_a46605ba","line":1380,"range":{"start_line":1380,"start_character":38,"end_line":1380,"end_character":68},"in_reply_to":"bf3e73b7_a9e6aee7","updated":"2017-08-17 08:15:28.000000000","message":"Done","commit_id":"70057da1d334c39b3b6f4e98bfd16a0504ff9cb8"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"bf2ff51efcbc0cdaa826a2460e2c8695f425d63d","unresolved":false,"context_lines":[{"line_number":1401,"context_line":"                if key in filters:"},{"line_number":1402,"context_line":"                    filters[val] \u003d filters.pop(key)"},{"line_number":1403,"context_line":""},{"line_number":1404,"context_line":"        return model_query.get_collection(context, l3_models.FloatingIP,"},{"line_number":1405,"context_line":"                                          self._make_floatingip_dict,"},{"line_number":1406,"context_line":"                                          filters\u003dfilters, fields\u003dfields,"},{"line_number":1407,"context_line":"                                          sorts\u003dsorts,"},{"line_number":1408,"context_line":"                                          limit\u003dlimit,"},{"line_number":1409,"context_line":"                                          marker_obj\u003dmarker_obj,"},{"line_number":1410,"context_line":"                                          page_reverse\u003dpage_reverse)"},{"line_number":1411,"context_line":""},{"line_number":1412,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1413,"context_line":"    def delete_disassociated_floatingips(self, context, network_id):"}],"source_content_type":"text/x-python","patch_set":22,"id":"bf3e73b7_09749a34","line":1410,"range":{"start_line":1404,"start_character":15,"end_line":1410,"end_character":68},"updated":"2017-08-07 18:09:01.000000000","message":"len(l3_obj.FloatingIP.get_objects(context, **filters)) with a pager?","commit_id":"70057da1d334c39b3b6f4e98bfd16a0504ff9cb8"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"4e1c27afac48bfff206bc05a1ff65ca022077a50","unresolved":false,"context_lines":[{"line_number":1401,"context_line":"                if key in filters:"},{"line_number":1402,"context_line":"                    filters[val] \u003d filters.pop(key)"},{"line_number":1403,"context_line":""},{"line_number":1404,"context_line":"        return model_query.get_collection(context, l3_models.FloatingIP,"},{"line_number":1405,"context_line":"                                          self._make_floatingip_dict,"},{"line_number":1406,"context_line":"                                          filters\u003dfilters, fields\u003dfields,"},{"line_number":1407,"context_line":"                                          sorts\u003dsorts,"},{"line_number":1408,"context_line":"                                          limit\u003dlimit,"},{"line_number":1409,"context_line":"                                          marker_obj\u003dmarker_obj,"},{"line_number":1410,"context_line":"                                          page_reverse\u003dpage_reverse)"},{"line_number":1411,"context_line":""},{"line_number":1412,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1413,"context_line":"    def delete_disassociated_floatingips(self, context, network_id):"}],"source_content_type":"text/x-python","patch_set":22,"id":"9f436f4f_840781ca","line":1410,"range":{"start_line":1404,"start_character":15,"end_line":1410,"end_character":68},"in_reply_to":"bf3e73b7_09749a34","updated":"2017-08-17 08:15:28.000000000","message":"Done","commit_id":"70057da1d334c39b3b6f4e98bfd16a0504ff9cb8"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"bf2ff51efcbc0cdaa826a2460e2c8695f425d63d","unresolved":false,"context_lines":[{"line_number":1421,"context_line":""},{"line_number":1422,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1423,"context_line":"    def get_floatingips_count(self, context, filters\u003dNone):"},{"line_number":1424,"context_line":"        return model_query.get_collection_count(context, l3_models.FloatingIP,"},{"line_number":1425,"context_line":"                                                filters\u003dfilters)"},{"line_number":1426,"context_line":""},{"line_number":1427,"context_line":"    def _router_exists(self, context, router_id):"},{"line_number":1428,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":22,"id":"bf3e73b7_29c99e77","line":1425,"range":{"start_line":1424,"start_character":15,"end_line":1425,"end_character":64},"updated":"2017-08-07 18:09:01.000000000","message":"len(l3_obj.FloatingIP.get_objects(context, **filters)) ?","commit_id":"70057da1d334c39b3b6f4e98bfd16a0504ff9cb8"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"4e1c27afac48bfff206bc05a1ff65ca022077a50","unresolved":false,"context_lines":[{"line_number":1421,"context_line":""},{"line_number":1422,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1423,"context_line":"    def get_floatingips_count(self, context, filters\u003dNone):"},{"line_number":1424,"context_line":"        return model_query.get_collection_count(context, l3_models.FloatingIP,"},{"line_number":1425,"context_line":"                                                filters\u003dfilters)"},{"line_number":1426,"context_line":""},{"line_number":1427,"context_line":"    def _router_exists(self, context, router_id):"},{"line_number":1428,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":22,"id":"9f436f4f_8430a1a0","line":1425,"range":{"start_line":1424,"start_character":15,"end_line":1425,"end_character":64},"in_reply_to":"bf3e73b7_29c99e77","updated":"2017-08-17 08:15:28.000000000","message":"we have .count() which is even better than len()! ;)","commit_id":"70057da1d334c39b3b6f4e98bfd16a0504ff9cb8"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"bf2ff51efcbc0cdaa826a2460e2c8695f425d63d","unresolved":false,"context_lines":[{"line_number":1505,"context_line":""},{"line_number":1506,"context_line":"    def _get_floatingips_by_port_id(self, context, port_id):"},{"line_number":1507,"context_line":"        \"\"\"Helper function to retrieve the fips associated with a port_id.\"\"\""},{"line_number":1508,"context_line":"        fip_qry \u003d context.session.query(l3_models.FloatingIP)"},{"line_number":1509,"context_line":"        return fip_qry.filter_by(fixed_port_id\u003dport_id).all()"},{"line_number":1510,"context_line":""},{"line_number":1511,"context_line":"    def _build_routers_list(self, context, routers, gw_ports):"},{"line_number":1512,"context_line":"        \"\"\"Subclasses can override this to add extra gateway info\"\"\""}],"source_content_type":"text/x-python","patch_set":22,"id":"bf3e73b7_09513ad9","line":1509,"range":{"start_line":1508,"start_character":8,"end_line":1509,"end_character":61},"updated":"2017-08-07 18:09:01.000000000","message":"return l3_obj.FloatingIP.get_objects(context, fixed_port_id\u003dport_id)","commit_id":"70057da1d334c39b3b6f4e98bfd16a0504ff9cb8"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"4e1c27afac48bfff206bc05a1ff65ca022077a50","unresolved":false,"context_lines":[{"line_number":1505,"context_line":""},{"line_number":1506,"context_line":"    def _get_floatingips_by_port_id(self, context, port_id):"},{"line_number":1507,"context_line":"        \"\"\"Helper function to retrieve the fips associated with a port_id.\"\"\""},{"line_number":1508,"context_line":"        fip_qry \u003d context.session.query(l3_models.FloatingIP)"},{"line_number":1509,"context_line":"        return fip_qry.filter_by(fixed_port_id\u003dport_id).all()"},{"line_number":1510,"context_line":""},{"line_number":1511,"context_line":"    def _build_routers_list(self, context, routers, gw_ports):"},{"line_number":1512,"context_line":"        \"\"\"Subclasses can override this to add extra gateway info\"\"\""}],"source_content_type":"text/x-python","patch_set":22,"id":"9f436f4f_64337dac","line":1509,"range":{"start_line":1508,"start_character":8,"end_line":1509,"end_character":61},"in_reply_to":"bf3e73b7_09513ad9","updated":"2017-08-17 08:15:28.000000000","message":"Done","commit_id":"70057da1d334c39b3b6f4e98bfd16a0504ff9cb8"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"bf2ff51efcbc0cdaa826a2460e2c8695f425d63d","unresolved":false,"context_lines":[{"line_number":1575,"context_line":"        if not router_ids:"},{"line_number":1576,"context_line":"            return []"},{"line_number":1577,"context_line":""},{"line_number":1578,"context_line":"        query \u003d context.session.query(l3_models.FloatingIP,"},{"line_number":1579,"context_line":"                                      models_v2.SubnetPool.address_scope_id)"},{"line_number":1580,"context_line":"        query \u003d query.join(models_v2.Port,"},{"line_number":1581,"context_line":"            l3_models.FloatingIP.fixed_port_id \u003d\u003d models_v2.Port.id)"},{"line_number":1582,"context_line":"        # Outer join of Subnet can cause each ip to have more than one row."},{"line_number":1583,"context_line":"        query \u003d query.outerjoin(models_v2.Subnet,"},{"line_number":1584,"context_line":"            models_v2.Subnet.network_id \u003d\u003d models_v2.Port.network_id)"},{"line_number":1585,"context_line":"        query \u003d query.filter(models_v2.Subnet.ip_version \u003d\u003d 4)"},{"line_number":1586,"context_line":"        query \u003d query.outerjoin(models_v2.SubnetPool,"},{"line_number":1587,"context_line":"            models_v2.Subnet.subnetpool_id \u003d\u003d models_v2.SubnetPool.id)"},{"line_number":1588,"context_line":""},{"line_number":1589,"context_line":"        # Filter out on router_ids"},{"line_number":1590,"context_line":"        query \u003d query.filter(l3_models.FloatingIP.router_id.in_(router_ids))"},{"line_number":1591,"context_line":""},{"line_number":1592,"context_line":"        return [self._make_floatingip_dict_with_scope(*row)"},{"line_number":1593,"context_line":"                for row in self._unique_floatingip_iterator(query)]"}],"source_content_type":"text/x-python","patch_set":22,"id":"bf3e73b7_6997a692","line":1590,"range":{"start_line":1578,"start_character":8,"end_line":1590,"end_character":76},"updated":"2017-08-07 18:09:01.000000000","message":"can we modify any of the following? and then then _unique_floatingip_iterator() ?","commit_id":"70057da1d334c39b3b6f4e98bfd16a0504ff9cb8"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"b550ec0413d5c619ad71c506ad1300017dc691c6","unresolved":false,"context_lines":[{"line_number":1575,"context_line":"        if not router_ids:"},{"line_number":1576,"context_line":"            return []"},{"line_number":1577,"context_line":""},{"line_number":1578,"context_line":"        query \u003d context.session.query(l3_models.FloatingIP,"},{"line_number":1579,"context_line":"                                      models_v2.SubnetPool.address_scope_id)"},{"line_number":1580,"context_line":"        query \u003d query.join(models_v2.Port,"},{"line_number":1581,"context_line":"            l3_models.FloatingIP.fixed_port_id \u003d\u003d models_v2.Port.id)"},{"line_number":1582,"context_line":"        # Outer join of Subnet can cause each ip to have more than one row."},{"line_number":1583,"context_line":"        query \u003d query.outerjoin(models_v2.Subnet,"},{"line_number":1584,"context_line":"            models_v2.Subnet.network_id \u003d\u003d models_v2.Port.network_id)"},{"line_number":1585,"context_line":"        query \u003d query.filter(models_v2.Subnet.ip_version \u003d\u003d 4)"},{"line_number":1586,"context_line":"        query \u003d query.outerjoin(models_v2.SubnetPool,"},{"line_number":1587,"context_line":"            models_v2.Subnet.subnetpool_id \u003d\u003d models_v2.SubnetPool.id)"},{"line_number":1588,"context_line":""},{"line_number":1589,"context_line":"        # Filter out on router_ids"},{"line_number":1590,"context_line":"        query \u003d query.filter(l3_models.FloatingIP.router_id.in_(router_ids))"},{"line_number":1591,"context_line":""},{"line_number":1592,"context_line":"        return [self._make_floatingip_dict_with_scope(*row)"},{"line_number":1593,"context_line":"                for row in self._unique_floatingip_iterator(query)]"}],"source_content_type":"text/x-python","patch_set":22,"id":"9f436f4f_7f519b62","line":1590,"range":{"start_line":1578,"start_character":8,"end_line":1590,"end_character":76},"in_reply_to":"9f436f4f_0424b15c","updated":"2017-08-18 13:01:39.000000000","message":"sorry the comment was not very well written lol! MY fault.\n\nThese are all queries on models that have OVO objects available. I believe the reason we did not modify any of the highlighted code because the query is passed into the function _unique_floatingip_iterator() which also uses the l3_models.FloatingIP. Now that we have OVO for FloatingIP, I believe we now can make these changes. What do you think?","commit_id":"70057da1d334c39b3b6f4e98bfd16a0504ff9cb8"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"d88975cf1a4e5248e9f0717c380f1e8fb3afc1c1","unresolved":false,"context_lines":[{"line_number":1575,"context_line":"        if not router_ids:"},{"line_number":1576,"context_line":"            return []"},{"line_number":1577,"context_line":""},{"line_number":1578,"context_line":"        query \u003d context.session.query(l3_models.FloatingIP,"},{"line_number":1579,"context_line":"                                      models_v2.SubnetPool.address_scope_id)"},{"line_number":1580,"context_line":"        query \u003d query.join(models_v2.Port,"},{"line_number":1581,"context_line":"            l3_models.FloatingIP.fixed_port_id \u003d\u003d models_v2.Port.id)"},{"line_number":1582,"context_line":"        # Outer join of Subnet can cause each ip to have more than one row."},{"line_number":1583,"context_line":"        query \u003d query.outerjoin(models_v2.Subnet,"},{"line_number":1584,"context_line":"            models_v2.Subnet.network_id \u003d\u003d models_v2.Port.network_id)"},{"line_number":1585,"context_line":"        query \u003d query.filter(models_v2.Subnet.ip_version \u003d\u003d 4)"},{"line_number":1586,"context_line":"        query \u003d query.outerjoin(models_v2.SubnetPool,"},{"line_number":1587,"context_line":"            models_v2.Subnet.subnetpool_id \u003d\u003d models_v2.SubnetPool.id)"},{"line_number":1588,"context_line":""},{"line_number":1589,"context_line":"        # Filter out on router_ids"},{"line_number":1590,"context_line":"        query \u003d query.filter(l3_models.FloatingIP.router_id.in_(router_ids))"},{"line_number":1591,"context_line":""},{"line_number":1592,"context_line":"        return [self._make_floatingip_dict_with_scope(*row)"},{"line_number":1593,"context_line":"                for row in self._unique_floatingip_iterator(query)]"}],"source_content_type":"text/x-python","patch_set":22,"id":"9f436f4f_1b39633e","line":1590,"range":{"start_line":1578,"start_character":8,"end_line":1590,"end_character":76},"in_reply_to":"9f436f4f_7f519b62","updated":"2017-08-21 02:35:28.000000000","message":"Thanks for the explanation. Hmm, I am not sure if we can replace outerjoin with OVO manipulations, but I will try if there is anything I can do in the next PS.","commit_id":"70057da1d334c39b3b6f4e98bfd16a0504ff9cb8"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"4e1c27afac48bfff206bc05a1ff65ca022077a50","unresolved":false,"context_lines":[{"line_number":1575,"context_line":"        if not router_ids:"},{"line_number":1576,"context_line":"            return []"},{"line_number":1577,"context_line":""},{"line_number":1578,"context_line":"        query \u003d context.session.query(l3_models.FloatingIP,"},{"line_number":1579,"context_line":"                                      models_v2.SubnetPool.address_scope_id)"},{"line_number":1580,"context_line":"        query \u003d query.join(models_v2.Port,"},{"line_number":1581,"context_line":"            l3_models.FloatingIP.fixed_port_id \u003d\u003d models_v2.Port.id)"},{"line_number":1582,"context_line":"        # Outer join of Subnet can cause each ip to have more than one row."},{"line_number":1583,"context_line":"        query \u003d query.outerjoin(models_v2.Subnet,"},{"line_number":1584,"context_line":"            models_v2.Subnet.network_id \u003d\u003d models_v2.Port.network_id)"},{"line_number":1585,"context_line":"        query \u003d query.filter(models_v2.Subnet.ip_version \u003d\u003d 4)"},{"line_number":1586,"context_line":"        query \u003d query.outerjoin(models_v2.SubnetPool,"},{"line_number":1587,"context_line":"            models_v2.Subnet.subnetpool_id \u003d\u003d models_v2.SubnetPool.id)"},{"line_number":1588,"context_line":""},{"line_number":1589,"context_line":"        # Filter out on router_ids"},{"line_number":1590,"context_line":"        query \u003d query.filter(l3_models.FloatingIP.router_id.in_(router_ids))"},{"line_number":1591,"context_line":""},{"line_number":1592,"context_line":"        return [self._make_floatingip_dict_with_scope(*row)"},{"line_number":1593,"context_line":"                for row in self._unique_floatingip_iterator(query)]"}],"source_content_type":"text/x-python","patch_set":22,"id":"9f436f4f_0424b15c","line":1590,"range":{"start_line":1578,"start_character":8,"end_line":1590,"end_character":76},"in_reply_to":"bf3e73b7_6997a692","updated":"2017-08-17 08:15:28.000000000","message":"I do not think I understand what you comment here? I thought we would need SubnetPool and Port here. Would you mind elaborating a bit?","commit_id":"70057da1d334c39b3b6f4e98bfd16a0504ff9cb8"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"edd249194a1bf5a68b6bb140e0f5de8f93b53058","unresolved":false,"context_lines":[{"line_number":1300,"context_line":"            if self._is_dns_integration_supported:"},{"line_number":1301,"context_line":"                dns_data \u003d self._process_dns_floatingip_create_precommit("},{"line_number":1302,"context_line":"                    context, floatingip_dict, fip)"},{"line_number":1303,"context_line":"                floatingip_obj.update()"},{"line_number":1304,"context_line":""},{"line_number":1305,"context_line":"        self._core_plugin.update_port(context.elevated(), external_port[\u0027id\u0027],"},{"line_number":1306,"context_line":"                                      {\u0027port\u0027: {\u0027device_id\u0027: fip_id}})"}],"source_content_type":"text/x-python","patch_set":24,"id":"9f436f4f_da20959e","line":1303,"range":{"start_line":1303,"start_character":16,"end_line":1303,"end_character":39},"updated":"2017-08-18 13:22:05.000000000","message":"I\u0027m not sure if you moved the update here I referred to earlier (line 1223 PS 22).. but You should at least move it before the create on line 1297","commit_id":"b15cd995a8f8aa7af911b16f5ccc325012a2f60e"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"a22ac535e421f9e06c4c01fbd35e4653bf6af5fc","unresolved":false,"context_lines":[{"line_number":1300,"context_line":"            if self._is_dns_integration_supported:"},{"line_number":1301,"context_line":"                dns_data \u003d self._process_dns_floatingip_create_precommit("},{"line_number":1302,"context_line":"                    context, floatingip_dict, fip)"},{"line_number":1303,"context_line":"                floatingip_obj.update()"},{"line_number":1304,"context_line":""},{"line_number":1305,"context_line":"        self._core_plugin.update_port(context.elevated(), external_port[\u0027id\u0027],"},{"line_number":1306,"context_line":"                                      {\u0027port\u0027: {\u0027device_id\u0027: fip_id}})"}],"source_content_type":"text/x-python","patch_set":24,"id":"9f436f4f_1bf3a3e9","line":1303,"range":{"start_line":1303,"start_character":16,"end_line":1303,"end_character":39},"in_reply_to":"9f436f4f_da20959e","updated":"2017-08-21 02:30:29.000000000","message":"This update is actually for dns synthetic field. In _process_dns_floatingip_create_precommit(), we add dns to floatingip.dns, and if we do not update here, the floatingip.dns field will not be reflected in floatingip OVO object.","commit_id":"b15cd995a8f8aa7af911b16f5ccc325012a2f60e"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"edd249194a1bf5a68b6bb140e0f5de8f93b53058","unresolved":false,"context_lines":[{"line_number":1325,"context_line":"    def _update_floatingip(self, context, id, floatingip):"},{"line_number":1326,"context_line":"        fip \u003d floatingip[\u0027floatingip\u0027]"},{"line_number":1327,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":1328,"context_line":"            floatingip_db \u003d self._get_floatingip(context, id)"},{"line_number":1329,"context_line":"            old_floatingip \u003d self._make_floatingip_dict(floatingip_db)"},{"line_number":1330,"context_line":"            fip_port_id \u003d floatingip_db[\u0027floating_port_id\u0027]"},{"line_number":1331,"context_line":"            assoc_result \u003d self._update_fip_assoc("}],"source_content_type":"text/x-python","patch_set":24,"id":"9f436f4f_daa3f5ff","line":1328,"range":{"start_line":1328,"start_character":23,"end_line":1328,"end_character":25},"updated":"2017-08-18 13:22:05.000000000","message":"this should be obj because we call get_object in _get_floatingip now","commit_id":"b15cd995a8f8aa7af911b16f5ccc325012a2f60e"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"a22ac535e421f9e06c4c01fbd35e4653bf6af5fc","unresolved":false,"context_lines":[{"line_number":1325,"context_line":"    def _update_floatingip(self, context, id, floatingip):"},{"line_number":1326,"context_line":"        fip \u003d floatingip[\u0027floatingip\u0027]"},{"line_number":1327,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":1328,"context_line":"            floatingip_db \u003d self._get_floatingip(context, id)"},{"line_number":1329,"context_line":"            old_floatingip \u003d self._make_floatingip_dict(floatingip_db)"},{"line_number":1330,"context_line":"            fip_port_id \u003d floatingip_db[\u0027floating_port_id\u0027]"},{"line_number":1331,"context_line":"            assoc_result \u003d self._update_fip_assoc("}],"source_content_type":"text/x-python","patch_set":24,"id":"9f436f4f_fb01ffb0","line":1328,"range":{"start_line":1328,"start_character":23,"end_line":1328,"end_character":25},"in_reply_to":"9f436f4f_daa3f5ff","updated":"2017-08-21 02:30:29.000000000","message":"Done","commit_id":"b15cd995a8f8aa7af911b16f5ccc325012a2f60e"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"edd249194a1bf5a68b6bb140e0f5de8f93b53058","unresolved":false,"context_lines":[{"line_number":1331,"context_line":"            assoc_result \u003d self._update_fip_assoc("},{"line_number":1332,"context_line":"                context, fip, floatingip_db,"},{"line_number":1333,"context_line":"                self._core_plugin.get_port(context.elevated(), fip_port_id))"},{"line_number":1334,"context_line":"            floatingip_db.update()"},{"line_number":1335,"context_line":"            floatingip_dict \u003d self._make_floatingip_dict(floatingip_db)"},{"line_number":1336,"context_line":"            if self._is_dns_integration_supported:"},{"line_number":1337,"context_line":"                dns_data \u003d self._process_dns_floatingip_update_precommit("}],"source_content_type":"text/x-python","patch_set":24,"id":"9f436f4f_1a75fd98","line":1334,"range":{"start_line":1334,"start_character":12,"end_line":1334,"end_character":34},"updated":"2017-08-18 13:22:05.000000000","message":"Can we move the update into the function _update_fip_assoc() ?","commit_id":"b15cd995a8f8aa7af911b16f5ccc325012a2f60e"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"a22ac535e421f9e06c4c01fbd35e4653bf6af5fc","unresolved":false,"context_lines":[{"line_number":1331,"context_line":"            assoc_result \u003d self._update_fip_assoc("},{"line_number":1332,"context_line":"                context, fip, floatingip_db,"},{"line_number":1333,"context_line":"                self._core_plugin.get_port(context.elevated(), fip_port_id))"},{"line_number":1334,"context_line":"            floatingip_db.update()"},{"line_number":1335,"context_line":"            floatingip_dict \u003d self._make_floatingip_dict(floatingip_db)"},{"line_number":1336,"context_line":"            if self._is_dns_integration_supported:"},{"line_number":1337,"context_line":"                dns_data \u003d self._process_dns_floatingip_update_precommit("}],"source_content_type":"text/x-python","patch_set":24,"id":"9f436f4f_5bdfeb39","line":1334,"range":{"start_line":1334,"start_character":12,"end_line":1334,"end_character":34},"in_reply_to":"9f436f4f_1a75fd98","updated":"2017-08-21 02:30:29.000000000","message":"I do not think we can move it inside. Because _update_fip_assoc() is also called in _create_floatingip() in [1], and at the moment floatingip_obj is not created. We cannot update a not-yet-created OVO object. So i have to move the update() after _update_fip_assoc() is called. \n\n[1] https://review.openstack.org/#/c/396351/24/neutron/db/l3_db.py@1295","commit_id":"b15cd995a8f8aa7af911b16f5ccc325012a2f60e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"aefe8c423cef01c6aca2a5235c6582586bc70a00","unresolved":false,"context_lines":[{"line_number":1035,"context_line":"                              process_extensions\u003dTrue):"},{"line_number":1036,"context_line":"        res \u003d {\u0027id\u0027: floatingip.id,"},{"line_number":1037,"context_line":"               \u0027tenant_id\u0027: floatingip.project_id,"},{"line_number":1038,"context_line":"               \u0027project_id\u0027: floatingip.project_id,"},{"line_number":1039,"context_line":"               \u0027floating_ip_address\u0027: floatingip.floating_ip_address,"},{"line_number":1040,"context_line":"               \u0027floating_network_id\u0027: floatingip.floating_network_id,"},{"line_number":1041,"context_line":"               \u0027router_id\u0027: floatingip.router_id,"}],"source_content_type":"text/x-python","patch_set":30,"id":"7f287b81_1b96b940","line":1038,"range":{"start_line":1038,"start_character":15,"end_line":1038,"end_character":51},"updated":"2017-08-28 09:27:32.000000000","message":"Why do you need this?\n\nIn [1], called in L1050, you have this conversion:\n\n    if \u0027tenant_id\u0027 in attributes and \u0027project_id\u0027 not in attributes:\n        attributes[\u0027project_id\u0027] \u003d attributes[\u0027tenant_id\u0027]\n    elif \u0027project_id\u0027 in attributes and \u0027tenant_id\u0027 not in attributes:\n        # Backward compatibility for code still using tenant_id\n        attributes[\u0027tenant_id\u0027] \u003d attributes[\u0027project_id\u0027]\n\nYou don\u0027t need to add both tenant and project id.\n\n[1] https://github.com/openstack/neutron-lib/blob/master/neutron_lib/api/attributes.py#L48","commit_id":"0e76ae9e49b17d611d7648ceeec204dcdbca64f6"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"539fc32b029e23e27e1bb32f252a74f32a6f2164","unresolved":false,"context_lines":[{"line_number":1035,"context_line":"                              process_extensions\u003dTrue):"},{"line_number":1036,"context_line":"        res \u003d {\u0027id\u0027: floatingip.id,"},{"line_number":1037,"context_line":"               \u0027tenant_id\u0027: floatingip.project_id,"},{"line_number":1038,"context_line":"               \u0027project_id\u0027: floatingip.project_id,"},{"line_number":1039,"context_line":"               \u0027floating_ip_address\u0027: floatingip.floating_ip_address,"},{"line_number":1040,"context_line":"               \u0027floating_network_id\u0027: floatingip.floating_network_id,"},{"line_number":1041,"context_line":"               \u0027router_id\u0027: floatingip.router_id,"}],"source_content_type":"text/x-python","patch_set":30,"id":"7f287b81_7f2c7401","line":1038,"range":{"start_line":1038,"start_character":15,"end_line":1038,"end_character":51},"in_reply_to":"7f287b81_1b96b940","updated":"2017-08-29 00:34:50.000000000","message":"Oh, thanks! I will remove project_id then.","commit_id":"0e76ae9e49b17d611d7648ceeec204dcdbca64f6"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"49e16dd5227db4afe8f0bc017a7862edd8229c18","unresolved":false,"context_lines":[{"line_number":1292,"context_line":"                floating_network_id\u003dfip[\u0027floating_network_id\u0027],"},{"line_number":1293,"context_line":"                floating_ip_address\u003dfloating_ip_address,"},{"line_number":1294,"context_line":"                floating_port_id\u003dexternal_port[\u0027id\u0027],"},{"line_number":1295,"context_line":"                description\u003dfip.get(\u0027description\u0027))"},{"line_number":1296,"context_line":"            # Update association with internal port"},{"line_number":1297,"context_line":"            # and define external IP address"},{"line_number":1298,"context_line":"            assoc_result \u003d self._update_fip_assoc(context, fip,"}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_058b8fc2","side":"PARENT","line":1295,"updated":"2017-08-31 13:38:20.000000000","message":"why is it that we now don\u0027t store description?","commit_id":"f9838f40aba9c7d945c12de4c5b6c78abf18859b"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"cbb48f1f922f0d55495120c2186695b2fd16948a","unresolved":false,"context_lines":[{"line_number":1292,"context_line":"                floating_network_id\u003dfip[\u0027floating_network_id\u0027],"},{"line_number":1293,"context_line":"                floating_ip_address\u003dfloating_ip_address,"},{"line_number":1294,"context_line":"                floating_port_id\u003dexternal_port[\u0027id\u0027],"},{"line_number":1295,"context_line":"                description\u003dfip.get(\u0027description\u0027))"},{"line_number":1296,"context_line":"            # Update association with internal port"},{"line_number":1297,"context_line":"            # and define external IP address"},{"line_number":1298,"context_line":"            assoc_result \u003d self._update_fip_assoc(context, fip,"}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_b446f620","side":"PARENT","line":1295,"in_reply_to":"7f287b81_058b8fc2","updated":"2017-09-04 08:34:35.000000000","message":"Because in _update_fip_assoc(), we are also checking description in Line 1222. Is it really necessary to store it here too?","commit_id":"f9838f40aba9c7d945c12de4c5b6c78abf18859b"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"49e16dd5227db4afe8f0bc017a7862edd8229c18","unresolved":false,"context_lines":[{"line_number":1415,"context_line":"    def delete_disassociated_floatingips(self, context, network_id):"},{"line_number":1416,"context_line":"        query \u003d model_query.query_with_hooks(context, l3_models.FloatingIP)"},{"line_number":1417,"context_line":"        query \u003d query.filter_by(floating_network_id\u003dnetwork_id,"},{"line_number":1418,"context_line":"                                fixed_port_id\u003dNone,"},{"line_number":1419,"context_line":"                                router_id\u003dNone)"},{"line_number":1420,"context_line":"        for fip in query:"},{"line_number":1421,"context_line":"            self.delete_floatingip(context, fip.id)"},{"line_number":1422,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_e83dfaba","side":"PARENT","line":1419,"range":{"start_line":1418,"start_character":32,"end_line":1419,"end_character":47},"updated":"2017-08-31 13:38:20.000000000","message":"why can\u0027t we filter on that right away?","commit_id":"f9838f40aba9c7d945c12de4c5b6c78abf18859b"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"1836c945b4b11e83ecec5d245c31e43fb204b37e","unresolved":false,"context_lines":[{"line_number":1415,"context_line":"    def delete_disassociated_floatingips(self, context, network_id):"},{"line_number":1416,"context_line":"        query \u003d model_query.query_with_hooks(context, l3_models.FloatingIP)"},{"line_number":1417,"context_line":"        query \u003d query.filter_by(floating_network_id\u003dnetwork_id,"},{"line_number":1418,"context_line":"                                fixed_port_id\u003dNone,"},{"line_number":1419,"context_line":"                                router_id\u003dNone)"},{"line_number":1420,"context_line":"        for fip in query:"},{"line_number":1421,"context_line":"            self.delete_floatingip(context, fip.id)"},{"line_number":1422,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_d0dcd919","side":"PARENT","line":1419,"range":{"start_line":1418,"start_character":32,"end_line":1419,"end_character":47},"in_reply_to":"7f287b81_0a135e68","updated":"2017-09-05 01:11:09.000000000","message":"Hmm, it seems that get_object() does not support passing \"None\" as filters. I cannot receive any objects if I pass \n\nfixed_port_id\u003dNone,\nrouter_id\u003dNone","commit_id":"f9838f40aba9c7d945c12de4c5b6c78abf18859b"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"cbb48f1f922f0d55495120c2186695b2fd16948a","unresolved":false,"context_lines":[{"line_number":1415,"context_line":"    def delete_disassociated_floatingips(self, context, network_id):"},{"line_number":1416,"context_line":"        query \u003d model_query.query_with_hooks(context, l3_models.FloatingIP)"},{"line_number":1417,"context_line":"        query \u003d query.filter_by(floating_network_id\u003dnetwork_id,"},{"line_number":1418,"context_line":"                                fixed_port_id\u003dNone,"},{"line_number":1419,"context_line":"                                router_id\u003dNone)"},{"line_number":1420,"context_line":"        for fip in query:"},{"line_number":1421,"context_line":"            self.delete_floatingip(context, fip.id)"},{"line_number":1422,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_0a135e68","side":"PARENT","line":1419,"range":{"start_line":1418,"start_character":32,"end_line":1419,"end_character":47},"in_reply_to":"7f287b81_e83dfaba","updated":"2017-09-04 08:34:35.000000000","message":"This is carried from previous patch set. I add revise it.","commit_id":"f9838f40aba9c7d945c12de4c5b6c78abf18859b"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"49e16dd5227db4afe8f0bc017a7862edd8229c18","unresolved":false,"context_lines":[{"line_number":900,"context_line":"                                             subnet_id):"},{"line_number":901,"context_line":"        subnet \u003d self._core_plugin.get_subnet(context, subnet_id)"},{"line_number":902,"context_line":"        subnet_cidr \u003d netaddr.IPNetwork(subnet[\u0027cidr\u0027])"},{"line_number":903,"context_line":"        fip_objs \u003d l3_obj.FloatingIP.get_objects("},{"line_number":904,"context_line":"            context, router_id\u003drouter_id)"},{"line_number":905,"context_line":"        try:"},{"line_number":906,"context_line":"            kwargs \u003d {\u0027context\u0027: context, \u0027router_id\u0027: router_id,"}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_05ddcfde","line":903,"updated":"2017-08-31 13:38:20.000000000","message":"nit: I think it\u0027s better to move it closer to where the objects are used (after line 915), so that if we need to bail out from the method in the except-block, we avoid fetching the objects","commit_id":"f09902d96094cee4415e0a6aec1cf609cb981db3"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"cbb48f1f922f0d55495120c2186695b2fd16948a","unresolved":false,"context_lines":[{"line_number":900,"context_line":"                                             subnet_id):"},{"line_number":901,"context_line":"        subnet \u003d self._core_plugin.get_subnet(context, subnet_id)"},{"line_number":902,"context_line":"        subnet_cidr \u003d netaddr.IPNetwork(subnet[\u0027cidr\u0027])"},{"line_number":903,"context_line":"        fip_objs \u003d l3_obj.FloatingIP.get_objects("},{"line_number":904,"context_line":"            context, router_id\u003drouter_id)"},{"line_number":905,"context_line":"        try:"},{"line_number":906,"context_line":"            kwargs \u003d {\u0027context\u0027: context, \u0027router_id\u0027: router_id,"}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_ee673451","line":903,"in_reply_to":"7f287b81_05ddcfde","updated":"2017-09-04 08:34:35.000000000","message":"Done","commit_id":"f09902d96094cee4415e0a6aec1cf609cb981db3"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"49e16dd5227db4afe8f0bc017a7862edd8229c18","unresolved":false,"context_lines":[{"line_number":1217,"context_line":"        floatingip_obj.router_id \u003d router_id"},{"line_number":1218,"context_line":"        floatingip_obj.last_known_router_id \u003d previous_router_id"},{"line_number":1219,"context_line":"        if \u0027description\u0027 in fip:"},{"line_number":1220,"context_line":"            floatingip_obj.description \u003d fip[\u0027description\u0027]"},{"line_number":1221,"context_line":"        return {\u0027fixed_ip_address\u0027: floatingip_obj.fixed_ip_address,"},{"line_number":1222,"context_line":"                \u0027fixed_port_id\u0027: port_id,"},{"line_number":1223,"context_line":"                \u0027router_id\u0027: router_id,"}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_e5008336","line":1220,"updated":"2017-08-31 13:38:20.000000000","message":"after all these manipulations, don\u0027t you need to call floatingip_obj.update()? I don\u0027t think OVO objects track their state and flush it on commit.","commit_id":"f09902d96094cee4415e0a6aec1cf609cb981db3"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"cbb48f1f922f0d55495120c2186695b2fd16948a","unresolved":false,"context_lines":[{"line_number":1217,"context_line":"        floatingip_obj.router_id \u003d router_id"},{"line_number":1218,"context_line":"        floatingip_obj.last_known_router_id \u003d previous_router_id"},{"line_number":1219,"context_line":"        if \u0027description\u0027 in fip:"},{"line_number":1220,"context_line":"            floatingip_obj.description \u003d fip[\u0027description\u0027]"},{"line_number":1221,"context_line":"        return {\u0027fixed_ip_address\u0027: floatingip_obj.fixed_ip_address,"},{"line_number":1222,"context_line":"                \u0027fixed_port_id\u0027: port_id,"},{"line_number":1223,"context_line":"                \u0027router_id\u0027: router_id,"}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_54d23236","line":1220,"in_reply_to":"7f287b81_e5008336","updated":"2017-09-04 08:34:35.000000000","message":"I moved the .update() after where this method is called, eg Line 1336. \n\nThe reason I cannot call .update() here is because of the code flow in _create_floatingip() between Line 1285 and 1297. We do not call .create() until we call _update_fip_assoc() first. In this case, if we have .update() here, we will be updating an not-yet created object. \n\nI also tried to move floatingip_obj.create() before Line 1295 but in the flow of _update_fip_assoc() -\u003e _check_and_get_fip_assoc() -\u003e _get_assoc_data() -\u003e _internal_fip_assoc_data(), the floatingip_obj is lost. Then in _update_fip_assoc(), when .update() is called, an error like object not found is reported. \n\nI am not completely sure why the object is lost but I think it is related to session lost. I assume this is why the original code create db object after _update_fip_assoc(), so I decided to follow the flow of the original codes.","commit_id":"f09902d96094cee4415e0a6aec1cf609cb981db3"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"49e16dd5227db4afe8f0bc017a7862edd8229c18","unresolved":false,"context_lines":[{"line_number":1300,"context_line":"            if self._is_dns_integration_supported:"},{"line_number":1301,"context_line":"                dns_data \u003d self._process_dns_floatingip_create_precommit("},{"line_number":1302,"context_line":"                    context, floatingip_dict, fip)"},{"line_number":1303,"context_line":"                floatingip_obj.update()"},{"line_number":1304,"context_line":""},{"line_number":1305,"context_line":"        self._core_plugin.update_port(context.elevated(), external_port[\u0027id\u0027],"},{"line_number":1306,"context_line":"                                      {\u0027port\u0027: {\u0027device_id\u0027: fip_id}})"}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_656813f4","line":1303,"updated":"2017-08-31 13:38:20.000000000","message":"why do we need this line? I can\u0027t see where _process_dns_floatingip_create_precommit would modify the object attributes.","commit_id":"f09902d96094cee4415e0a6aec1cf609cb981db3"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"cbb48f1f922f0d55495120c2186695b2fd16948a","unresolved":false,"context_lines":[{"line_number":1300,"context_line":"            if self._is_dns_integration_supported:"},{"line_number":1301,"context_line":"                dns_data \u003d self._process_dns_floatingip_create_precommit("},{"line_number":1302,"context_line":"                    context, floatingip_dict, fip)"},{"line_number":1303,"context_line":"                floatingip_obj.update()"},{"line_number":1304,"context_line":""},{"line_number":1305,"context_line":"        self._core_plugin.update_port(context.elevated(), external_port[\u0027id\u0027],"},{"line_number":1306,"context_line":"                                      {\u0027port\u0027: {\u0027device_id\u0027: fip_id}})"}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_6aef82b0","line":1303,"in_reply_to":"7f287b81_656813f4","updated":"2017-09-04 08:34:35.000000000","message":"FloatingIPDNS OVO object is created in _process_dns_floatingip_create_precommit(). Before calling _process_dns_floatingip_create_precommit() floatingip_obj.dns is None and after calling it, floatingip_obj.dns should contain FloatingIPDNS object. If we do not call .update() here, floatingip_obj is not up-to-date.","commit_id":"f09902d96094cee4415e0a6aec1cf609cb981db3"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"49e16dd5227db4afe8f0bc017a7862edd8229c18","unresolved":false,"context_lines":[{"line_number":1313,"context_line":"            self._process_dns_floatingip_create_postcommit(context,"},{"line_number":1314,"context_line":"                                                           floatingip_dict,"},{"line_number":1315,"context_line":"                                                           dns_data)"},{"line_number":1316,"context_line":"        floatingip_obj \u003d l3_obj.FloatingIP.get_object("},{"line_number":1317,"context_line":"            context, id\u003dfloatingip_obj.id)"},{"line_number":1318,"context_line":"        resource_extend.apply_funcs(l3.FLOATINGIPS, floatingip_dict,"},{"line_number":1319,"context_line":"                                    floatingip_obj.db_obj)"}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_8533ff13","line":1316,"updated":"2017-08-31 13:38:20.000000000","message":"is it because some relationship attributes were updated directly via sqlalchemy? do you know which of them?","commit_id":"f09902d96094cee4415e0a6aec1cf609cb981db3"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"cbb48f1f922f0d55495120c2186695b2fd16948a","unresolved":false,"context_lines":[{"line_number":1313,"context_line":"            self._process_dns_floatingip_create_postcommit(context,"},{"line_number":1314,"context_line":"                                                           floatingip_dict,"},{"line_number":1315,"context_line":"                                                           dns_data)"},{"line_number":1316,"context_line":"        floatingip_obj \u003d l3_obj.FloatingIP.get_object("},{"line_number":1317,"context_line":"            context, id\u003dfloatingip_obj.id)"},{"line_number":1318,"context_line":"        resource_extend.apply_funcs(l3.FLOATINGIPS, floatingip_dict,"},{"line_number":1319,"context_line":"                                    floatingip_obj.db_obj)"}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_6a9ae26e","line":1316,"in_reply_to":"7f287b81_8533ff13","updated":"2017-09-04 08:34:35.000000000","message":"No, but if I do not call get_object() here, I am seeing the following error.\n\nDetachedInstanceError: Parent instance \u003cStandardAttribute at 0x7f4e373e3390\u003e is not bound to a Session; lazy load operation of attribute \u0027tags\u0027 cannot proceed\n\nwhen testing neutron.tests.unit.extensions.test_tag.TestResourceTagFilter.test_filter_not_tags_single(Floatingip Tag Test)\n\nI found similar operation in https://github.com/openstack/neutron/blob/master/neutron/db/securitygroups_db.py#L125 where sg is already an OVO object, but it calls get_object() again.","commit_id":"f09902d96094cee4415e0a6aec1cf609cb981db3"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"49e16dd5227db4afe8f0bc017a7862edd8229c18","unresolved":false,"context_lines":[{"line_number":1333,"context_line":"            assoc_result \u003d self._update_fip_assoc("},{"line_number":1334,"context_line":"                context, fip, floatingip_obj,"},{"line_number":1335,"context_line":"                self._core_plugin.get_port(context.elevated(), fip_port_id))"},{"line_number":1336,"context_line":"            floatingip_obj.update()"},{"line_number":1337,"context_line":"            floatingip_dict \u003d self._make_floatingip_dict(floatingip_obj)"},{"line_number":1338,"context_line":"            if self._is_dns_integration_supported:"},{"line_number":1339,"context_line":"                dns_data \u003d self._process_dns_floatingip_update_precommit("}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_a5271bc7","line":1336,"updated":"2017-08-31 13:38:20.000000000","message":"doesn\u0027t _update_fip_assoc (line 1333) already update the object?","commit_id":"f09902d96094cee4415e0a6aec1cf609cb981db3"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"cbb48f1f922f0d55495120c2186695b2fd16948a","unresolved":false,"context_lines":[{"line_number":1333,"context_line":"            assoc_result \u003d self._update_fip_assoc("},{"line_number":1334,"context_line":"                context, fip, floatingip_obj,"},{"line_number":1335,"context_line":"                self._core_plugin.get_port(context.elevated(), fip_port_id))"},{"line_number":1336,"context_line":"            floatingip_obj.update()"},{"line_number":1337,"context_line":"            floatingip_dict \u003d self._make_floatingip_dict(floatingip_obj)"},{"line_number":1338,"context_line":"            if self._is_dns_integration_supported:"},{"line_number":1339,"context_line":"                dns_data \u003d self._process_dns_floatingip_update_precommit("}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_07cb57a5","line":1336,"in_reply_to":"7f287b81_a5271bc7","updated":"2017-09-04 08:34:35.000000000","message":"This one is also answered in Line 1220. We have to call .update(0 after _update_fip_assoc() is called.","commit_id":"f09902d96094cee4415e0a6aec1cf609cb981db3"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"49e16dd5227db4afe8f0bc017a7862edd8229c18","unresolved":false,"context_lines":[{"line_number":1395,"context_line":"    def get_floatingips(self, context, filters\u003dNone, fields\u003dNone,"},{"line_number":1396,"context_line":"                        sorts\u003dNone, limit\u003dNone, marker\u003dNone,"},{"line_number":1397,"context_line":"                        page_reverse\u003dFalse):"},{"line_number":1398,"context_line":"        pager \u003d base_obj.Pager(sorts, limit, page_reverse, marker)"},{"line_number":1399,"context_line":"        if filters is not None:"},{"line_number":1400,"context_line":"            for key, val in API_TO_DB_COLUMN_MAP.items():"},{"line_number":1401,"context_line":"                if key in filters:"},{"line_number":1402,"context_line":"                    filters[val] \u003d filters.pop(key)"},{"line_number":1403,"context_line":"            floatingip_objs \u003d l3_obj.FloatingIP.get_objects("},{"line_number":1404,"context_line":"                context, _pager\u003dpager, validate_filters\u003dFalse, **filters)"},{"line_number":1405,"context_line":"            floatingip_dicts \u003d ["},{"line_number":1406,"context_line":"                self._make_floatingip_dict(floatingip_obj, fields)"},{"line_number":1407,"context_line":"                for floatingip_obj in floatingip_objs"},{"line_number":1408,"context_line":"            ]"},{"line_number":1409,"context_line":"            return floatingip_dicts"},{"line_number":1410,"context_line":"        floatingip_objs \u003d l3_obj.FloatingIP.get_objects("},{"line_number":1411,"context_line":"            context, _pager\u003dpager, validate_filters\u003dFalse)"},{"line_number":1412,"context_line":"        floatingip_dicts \u003d ["},{"line_number":1413,"context_line":"            self._make_floatingip_dict(floatingip_obj, fields)"},{"line_number":1414,"context_line":"            for floatingip_obj in floatingip_objs"},{"line_number":1415,"context_line":"        ]"},{"line_number":1416,"context_line":"        return floatingip_dicts"},{"line_number":1417,"context_line":""},{"line_number":1418,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1419,"context_line":"    def delete_disassociated_floatingips(self, context, network_id):"}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_c8335ef5","line":1416,"range":{"start_line":1398,"start_character":8,"end_line":1416,"end_character":31},"updated":"2017-08-31 13:38:20.000000000","message":"could be smth like:\n\npager \u003d ...\n\nfilters \u003d filters or {}\nfor key, val in API...MAP.items():\n    if key in filters:\n        filters[val] \u003d filters.pop(key)\n\nfip_objs \u003d ...get_objects(context, _pager\u003dpager, validate_filters\u003dFalse, **filters)\nreturn [self._make...dict(...)\n        for fip_obj in fip_objs]","commit_id":"f09902d96094cee4415e0a6aec1cf609cb981db3"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"cbb48f1f922f0d55495120c2186695b2fd16948a","unresolved":false,"context_lines":[{"line_number":1395,"context_line":"    def get_floatingips(self, context, filters\u003dNone, fields\u003dNone,"},{"line_number":1396,"context_line":"                        sorts\u003dNone, limit\u003dNone, marker\u003dNone,"},{"line_number":1397,"context_line":"                        page_reverse\u003dFalse):"},{"line_number":1398,"context_line":"        pager \u003d base_obj.Pager(sorts, limit, page_reverse, marker)"},{"line_number":1399,"context_line":"        if filters is not None:"},{"line_number":1400,"context_line":"            for key, val in API_TO_DB_COLUMN_MAP.items():"},{"line_number":1401,"context_line":"                if key in filters:"},{"line_number":1402,"context_line":"                    filters[val] \u003d filters.pop(key)"},{"line_number":1403,"context_line":"            floatingip_objs \u003d l3_obj.FloatingIP.get_objects("},{"line_number":1404,"context_line":"                context, _pager\u003dpager, validate_filters\u003dFalse, **filters)"},{"line_number":1405,"context_line":"            floatingip_dicts \u003d ["},{"line_number":1406,"context_line":"                self._make_floatingip_dict(floatingip_obj, fields)"},{"line_number":1407,"context_line":"                for floatingip_obj in floatingip_objs"},{"line_number":1408,"context_line":"            ]"},{"line_number":1409,"context_line":"            return floatingip_dicts"},{"line_number":1410,"context_line":"        floatingip_objs \u003d l3_obj.FloatingIP.get_objects("},{"line_number":1411,"context_line":"            context, _pager\u003dpager, validate_filters\u003dFalse)"},{"line_number":1412,"context_line":"        floatingip_dicts \u003d ["},{"line_number":1413,"context_line":"            self._make_floatingip_dict(floatingip_obj, fields)"},{"line_number":1414,"context_line":"            for floatingip_obj in floatingip_objs"},{"line_number":1415,"context_line":"        ]"},{"line_number":1416,"context_line":"        return floatingip_dicts"},{"line_number":1417,"context_line":""},{"line_number":1418,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1419,"context_line":"    def delete_disassociated_floatingips(self, context, network_id):"}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_a746c320","line":1416,"range":{"start_line":1398,"start_character":8,"end_line":1416,"end_character":31},"in_reply_to":"7f287b81_c8335ef5","updated":"2017-09-04 08:34:35.000000000","message":"Done","commit_id":"f09902d96094cee4415e0a6aec1cf609cb981db3"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"49e16dd5227db4afe8f0bc017a7862edd8229c18","unresolved":false,"context_lines":[{"line_number":1420,"context_line":"        fip_objs \u003d l3_obj.FloatingIP.get_objects("},{"line_number":1421,"context_line":"            context, floating_network_id\u003dnetwork_id)"},{"line_number":1422,"context_line":""},{"line_number":1423,"context_line":"        if fip_objs:"},{"line_number":1424,"context_line":"            for fip in fip_objs:"},{"line_number":1425,"context_line":"                if fip.fixed_ip_address is None and fip.fixed_port_id is None:"},{"line_number":1426,"context_line":"                    self.delete_floatingip(context, fip.id)"}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_884f9669","line":1423,"updated":"2017-08-31 13:38:20.000000000","message":"you can remove this line,\n\nfor x in [] is a legit operation (doing nothing).","commit_id":"f09902d96094cee4415e0a6aec1cf609cb981db3"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"cbb48f1f922f0d55495120c2186695b2fd16948a","unresolved":false,"context_lines":[{"line_number":1420,"context_line":"        fip_objs \u003d l3_obj.FloatingIP.get_objects("},{"line_number":1421,"context_line":"            context, floating_network_id\u003dnetwork_id)"},{"line_number":1422,"context_line":""},{"line_number":1423,"context_line":"        if fip_objs:"},{"line_number":1424,"context_line":"            for fip in fip_objs:"},{"line_number":1425,"context_line":"                if fip.fixed_ip_address is None and fip.fixed_port_id is None:"},{"line_number":1426,"context_line":"                    self.delete_floatingip(context, fip.id)"}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_8753c7e2","line":1423,"in_reply_to":"7f287b81_884f9669","updated":"2017-09-04 08:34:35.000000000","message":"Done","commit_id":"f09902d96094cee4415e0a6aec1cf609cb981db3"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"49e16dd5227db4afe8f0bc017a7862edd8229c18","unresolved":false,"context_lines":[{"line_number":1427,"context_line":""},{"line_number":1428,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1429,"context_line":"    def get_floatingips_count(self, context, filters\u003dNone):"},{"line_number":1430,"context_line":"        return l3_obj.FloatingIP.count(context, **filters)"},{"line_number":1431,"context_line":""},{"line_number":1432,"context_line":"    def _router_exists(self, context, router_id):"},{"line_number":1433,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_8878b68f","line":1430,"updated":"2017-08-31 13:38:20.000000000","message":"if filters are None (see line 1429), it will blow up because ** is not supported for None.","commit_id":"f09902d96094cee4415e0a6aec1cf609cb981db3"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"cbb48f1f922f0d55495120c2186695b2fd16948a","unresolved":false,"context_lines":[{"line_number":1427,"context_line":""},{"line_number":1428,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1429,"context_line":"    def get_floatingips_count(self, context, filters\u003dNone):"},{"line_number":1430,"context_line":"        return l3_obj.FloatingIP.count(context, **filters)"},{"line_number":1431,"context_line":""},{"line_number":1432,"context_line":"    def _router_exists(self, context, router_id):"},{"line_number":1433,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_070eb7e4","line":1430,"in_reply_to":"7f287b81_8878b68f","updated":"2017-09-04 08:34:35.000000000","message":"Done","commit_id":"f09902d96094cee4415e0a6aec1cf609cb981db3"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"49e16dd5227db4afe8f0bc017a7862edd8229c18","unresolved":false,"context_lines":[{"line_number":1497,"context_line":"        \"\"\""},{"line_number":1498,"context_line":"        router_ids \u003d set()"},{"line_number":1499,"context_line":""},{"line_number":1500,"context_line":"        floating_ip_objs \u003d l3_obj.FloatingIP.get_objects("},{"line_number":1501,"context_line":"            context, fixed_port_id\u003dport_id)"},{"line_number":1502,"context_line":""},{"line_number":1503,"context_line":"        for floating_ip in floating_ip_objs:"},{"line_number":1504,"context_line":"            router_ids.add(floating_ip.router_id)"},{"line_number":1505,"context_line":"            floating_ip.fixed_port_id \u003d None"},{"line_number":1506,"context_line":"            floating_ip.fixed_ip_address \u003d None"},{"line_number":1507,"context_line":"            floating_ip.router_id \u003d None"},{"line_number":1508,"context_line":"            floating_ip.update()"},{"line_number":1509,"context_line":"        return router_ids"},{"line_number":1510,"context_line":""},{"line_number":1511,"context_line":"    def _get_floatingips_by_port_id(self, context, port_id):"}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_c8bd9e02","line":1508,"range":{"start_line":1500,"start_character":8,"end_line":1508,"end_character":32},"updated":"2017-08-31 13:38:20.000000000","message":"could be:\n\nfip_objs \u003d ...get_objects()\nrouter_ids \u003d {fip_obj.router_id for fip_obj in fip_objs}\n...update_objects(context, {\u0027fixed_port_id\u0027: None, ...}, fixed_port_id\u003dport_id)\n\nThis will use UPDATE WHERE (single statement) instead of UPDATE WHERE (for each object).","commit_id":"f09902d96094cee4415e0a6aec1cf609cb981db3"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"cbb48f1f922f0d55495120c2186695b2fd16948a","unresolved":false,"context_lines":[{"line_number":1497,"context_line":"        \"\"\""},{"line_number":1498,"context_line":"        router_ids \u003d set()"},{"line_number":1499,"context_line":""},{"line_number":1500,"context_line":"        floating_ip_objs \u003d l3_obj.FloatingIP.get_objects("},{"line_number":1501,"context_line":"            context, fixed_port_id\u003dport_id)"},{"line_number":1502,"context_line":""},{"line_number":1503,"context_line":"        for floating_ip in floating_ip_objs:"},{"line_number":1504,"context_line":"            router_ids.add(floating_ip.router_id)"},{"line_number":1505,"context_line":"            floating_ip.fixed_port_id \u003d None"},{"line_number":1506,"context_line":"            floating_ip.fixed_ip_address \u003d None"},{"line_number":1507,"context_line":"            floating_ip.router_id \u003d None"},{"line_number":1508,"context_line":"            floating_ip.update()"},{"line_number":1509,"context_line":"        return router_ids"},{"line_number":1510,"context_line":""},{"line_number":1511,"context_line":"    def _get_floatingips_by_port_id(self, context, port_id):"}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_07b117e2","line":1508,"range":{"start_line":1500,"start_character":8,"end_line":1508,"end_character":32},"in_reply_to":"7f287b81_c8bd9e02","updated":"2017-09-04 08:34:35.000000000","message":"Done","commit_id":"f09902d96094cee4415e0a6aec1cf609cb981db3"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"49e16dd5227db4afe8f0bc017a7862edd8229c18","unresolved":false,"context_lines":[{"line_number":1582,"context_line":"        query \u003d l3_obj.FloatingIP.get_sync_floating_ips_query("},{"line_number":1583,"context_line":"            context, router_ids)"},{"line_number":1584,"context_line":""},{"line_number":1585,"context_line":"        return [self._make_floatingip_dict_with_scope(*("},{"line_number":1586,"context_line":"                l3_obj.FloatingIP._load_object(context, row[0]), row[1]))"},{"line_number":1587,"context_line":"                for row in self._unique_floatingip_iterator(query)]"},{"line_number":1588,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_68658ab4","line":1585,"range":{"start_line":1585,"start_character":54,"end_line":1585,"end_character":56},"updated":"2017-08-31 13:38:20.000000000","message":"not sure why we need that. I think a direct pass of arguments will do the job.","commit_id":"f09902d96094cee4415e0a6aec1cf609cb981db3"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"cbb48f1f922f0d55495120c2186695b2fd16948a","unresolved":false,"context_lines":[{"line_number":1582,"context_line":"        query \u003d l3_obj.FloatingIP.get_sync_floating_ips_query("},{"line_number":1583,"context_line":"            context, router_ids)"},{"line_number":1584,"context_line":""},{"line_number":1585,"context_line":"        return [self._make_floatingip_dict_with_scope(*("},{"line_number":1586,"context_line":"                l3_obj.FloatingIP._load_object(context, row[0]), row[1]))"},{"line_number":1587,"context_line":"                for row in self._unique_floatingip_iterator(query)]"},{"line_number":1588,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_ea3ed2d8","line":1585,"range":{"start_line":1585,"start_character":54,"end_line":1585,"end_character":56},"in_reply_to":"7f287b81_68658ab4","updated":"2017-09-04 08:34:35.000000000","message":"I believe this comes from a typo, since * and ( are next to each other........","commit_id":"f09902d96094cee4415e0a6aec1cf609cb981db3"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"49e16dd5227db4afe8f0bc017a7862edd8229c18","unresolved":false,"context_lines":[{"line_number":1583,"context_line":"            context, router_ids)"},{"line_number":1584,"context_line":""},{"line_number":1585,"context_line":"        return [self._make_floatingip_dict_with_scope(*("},{"line_number":1586,"context_line":"                l3_obj.FloatingIP._load_object(context, row[0]), row[1]))"},{"line_number":1587,"context_line":"                for row in self._unique_floatingip_iterator(query)]"},{"line_number":1588,"context_line":""},{"line_number":1589,"context_line":"    def _get_sync_interfaces(self, context, router_ids, device_owners\u003dNone):"}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_c86b5e82","line":1586,"range":{"start_line":1586,"start_character":34,"end_line":1586,"end_character":47},"updated":"2017-08-31 13:38:20.000000000","message":"any reason why get_sync_floating_ips_query doesn\u0027t do it for us?","commit_id":"f09902d96094cee4415e0a6aec1cf609cb981db3"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"cbb48f1f922f0d55495120c2186695b2fd16948a","unresolved":false,"context_lines":[{"line_number":1583,"context_line":"            context, router_ids)"},{"line_number":1584,"context_line":""},{"line_number":1585,"context_line":"        return [self._make_floatingip_dict_with_scope(*("},{"line_number":1586,"context_line":"                l3_obj.FloatingIP._load_object(context, row[0]), row[1]))"},{"line_number":1587,"context_line":"                for row in self._unique_floatingip_iterator(query)]"},{"line_number":1588,"context_line":""},{"line_number":1589,"context_line":"    def _get_sync_interfaces(self, context, router_ids, device_owners\u003dNone):"}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_273533f8","line":1586,"range":{"start_line":1586,"start_character":34,"end_line":1586,"end_character":47},"in_reply_to":"7f287b81_c86b5e82","updated":"2017-09-04 08:34:35.000000000","message":"Because I kept the returned result of get_sync_floating_ips_query() to be a db query. This is further because the result is then passed to _unique_floatingip_iterator() to be grouped by fip ID in Line 1553.","commit_id":"f09902d96094cee4415e0a6aec1cf609cb981db3"},{"author":{"_account_id":15471,"name":"Nguyen Phuong An","email":"annp.cs51@gmail.com","username":"An-FVL"},"change_message_id":"01203c5bbb0d4bb6c19c31d5b1704dde630a404d","unresolved":false,"context_lines":[{"line_number":1314,"context_line":"            self._process_dns_floatingip_create_postcommit(context,"},{"line_number":1315,"context_line":"                                                           floatingip_dict,"},{"line_number":1316,"context_line":"                                                           dns_data)"},{"line_number":1317,"context_line":"        floatingip_obj \u003d l3_obj.FloatingIP.get_object("},{"line_number":1318,"context_line":"            context, id\u003dfloatingip_obj.id)"},{"line_number":1319,"context_line":"        resource_extend.apply_funcs(l3.FLOATINGIPS, floatingip_dict,"},{"line_number":1320,"context_line":"                                    floatingip_obj.db_obj)"},{"line_number":1321,"context_line":"        return floatingip_dict"}],"source_content_type":"text/x-python","patch_set":33,"id":"7f287b81_7c5cdeec","line":1318,"range":{"start_line":1317,"start_character":7,"end_line":1318,"end_character":42},"updated":"2017-09-05 06:36:55.000000000","message":"Do you really need it?","commit_id":"977211641d38be267b378b5e7adcf96ea74a2253"},{"author":{"_account_id":15471,"name":"Nguyen Phuong An","email":"annp.cs51@gmail.com","username":"An-FVL"},"change_message_id":"55b173f46d44b9dd067ee56e936d2f398e3d1880","unresolved":false,"context_lines":[{"line_number":1314,"context_line":"            self._process_dns_floatingip_create_postcommit(context,"},{"line_number":1315,"context_line":"                                                           floatingip_dict,"},{"line_number":1316,"context_line":"                                                           dns_data)"},{"line_number":1317,"context_line":"        floatingip_obj \u003d l3_obj.FloatingIP.get_object("},{"line_number":1318,"context_line":"            context, id\u003dfloatingip_obj.id)"},{"line_number":1319,"context_line":"        resource_extend.apply_funcs(l3.FLOATINGIPS, floatingip_dict,"},{"line_number":1320,"context_line":"                                    floatingip_obj.db_obj)"},{"line_number":1321,"context_line":"        return floatingip_dict"}],"source_content_type":"text/x-python","patch_set":33,"id":"7f287b81_e79ed905","line":1318,"range":{"start_line":1317,"start_character":7,"end_line":1318,"end_character":42},"in_reply_to":"7f287b81_71762b09","updated":"2017-09-06 02:29:41.000000000","message":"I\u0027m OK with your explanation. Thank you.","commit_id":"977211641d38be267b378b5e7adcf96ea74a2253"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"ca120970a66903e869c2195630d09117b19d7231","unresolved":false,"context_lines":[{"line_number":1314,"context_line":"            self._process_dns_floatingip_create_postcommit(context,"},{"line_number":1315,"context_line":"                                                           floatingip_dict,"},{"line_number":1316,"context_line":"                                                           dns_data)"},{"line_number":1317,"context_line":"        floatingip_obj \u003d l3_obj.FloatingIP.get_object("},{"line_number":1318,"context_line":"            context, id\u003dfloatingip_obj.id)"},{"line_number":1319,"context_line":"        resource_extend.apply_funcs(l3.FLOATINGIPS, floatingip_dict,"},{"line_number":1320,"context_line":"                                    floatingip_obj.db_obj)"},{"line_number":1321,"context_line":"        return floatingip_dict"}],"source_content_type":"text/x-python","patch_set":33,"id":"7f287b81_71762b09","line":1318,"range":{"start_line":1317,"start_character":7,"end_line":1318,"end_character":42},"in_reply_to":"7f287b81_7c5cdeec","updated":"2017-09-06 00:56:21.000000000","message":"Yes, if I do not call get_object() here, I am seeing the following error.\n\nDetachedInstanceError: Parent instance \u003cStandardAttribute at 0x7f4e373e3390\u003e is not bound to a Session; lazy load operation of attribute \u0027tags\u0027 cannot proceed\nwhen testing neutron.tests.unit.extensions.test_tag.TestResourceTagFilter.test_filter_not_tags_single(Floatingip Tag Test)\n\nI found similar operation in https://github.com/openstack/neutron/blob/master/neutron/db/securitygroups_db.py#L125 where sg is already an OVO object, but it calls get_object() again.","commit_id":"977211641d38be267b378b5e7adcf96ea74a2253"},{"author":{"_account_id":15471,"name":"Nguyen Phuong An","email":"annp.cs51@gmail.com","username":"An-FVL"},"change_message_id":"01203c5bbb0d4bb6c19c31d5b1704dde630a404d","unresolved":false,"context_lines":[{"line_number":1495,"context_line":"        floating_ip_objs \u003d l3_obj.FloatingIP.get_objects("},{"line_number":1496,"context_line":"            context, fixed_port_id\u003dport_id)"},{"line_number":1497,"context_line":"        router_ids \u003d {fip.router_id for fip in floating_ip_objs}"},{"line_number":1498,"context_line":"        l3_obj.FloatingIP.update_objects("},{"line_number":1499,"context_line":"            context,"},{"line_number":1500,"context_line":"            {\u0027fixed_port_id\u0027: None,"},{"line_number":1501,"context_line":"             \u0027fixed_ip_address\u0027: None,"},{"line_number":1502,"context_line":"             \u0027router_id\u0027: None},"},{"line_number":1503,"context_line":"            fixed_port_id\u003dport_id)"},{"line_number":1504,"context_line":"        return router_ids"},{"line_number":1505,"context_line":""},{"line_number":1506,"context_line":"    def _get_floatingips_by_port_id(self, context, port_id):"}],"source_content_type":"text/x-python","patch_set":33,"id":"7f287b81_7c9bbe65","line":1503,"range":{"start_line":1498,"start_character":8,"end_line":1503,"end_character":34},"updated":"2017-09-05 06:36:55.000000000","message":"How about:\n\nvalues\u003d{\u0027fixed_port_id\u0027: None,\n        \u0027fixed_ip_address\u0027: None,\n        \u0027router_id\u0027: None}\nl3_obj.FloatingIP.update_objects(\n            context,\n            values,\n            fixed_port_id\u003dport_id)\n\nI think it will look more easier to read.","commit_id":"977211641d38be267b378b5e7adcf96ea74a2253"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"ca120970a66903e869c2195630d09117b19d7231","unresolved":false,"context_lines":[{"line_number":1495,"context_line":"        floating_ip_objs \u003d l3_obj.FloatingIP.get_objects("},{"line_number":1496,"context_line":"            context, fixed_port_id\u003dport_id)"},{"line_number":1497,"context_line":"        router_ids \u003d {fip.router_id for fip in floating_ip_objs}"},{"line_number":1498,"context_line":"        l3_obj.FloatingIP.update_objects("},{"line_number":1499,"context_line":"            context,"},{"line_number":1500,"context_line":"            {\u0027fixed_port_id\u0027: None,"},{"line_number":1501,"context_line":"             \u0027fixed_ip_address\u0027: None,"},{"line_number":1502,"context_line":"             \u0027router_id\u0027: None},"},{"line_number":1503,"context_line":"            fixed_port_id\u003dport_id)"},{"line_number":1504,"context_line":"        return router_ids"},{"line_number":1505,"context_line":""},{"line_number":1506,"context_line":"    def _get_floatingips_by_port_id(self, context, port_id):"}],"source_content_type":"text/x-python","patch_set":33,"id":"7f287b81_5171ef0b","line":1503,"range":{"start_line":1498,"start_character":8,"end_line":1503,"end_character":34},"in_reply_to":"7f287b81_7c9bbe65","updated":"2017-09-06 00:56:21.000000000","message":"Done","commit_id":"977211641d38be267b378b5e7adcf96ea74a2253"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f742c4b571bb43b017fad86eef3d23c315243209","unresolved":false,"context_lines":[{"line_number":911,"context_line":"            if len(e.errors) \u003d\u003d 1:"},{"line_number":912,"context_line":"                raise e.errors[0].error"},{"line_number":913,"context_line":"            raise l3.RouterInUse(router_id\u003drouter_id, reason\u003de)"},{"line_number":914,"context_line":"        fip_objs \u003d l3_obj.FloatingIP.get_objects("},{"line_number":915,"context_line":"            context, router_id\u003drouter_id)"},{"line_number":916,"context_line":"        for fip_obj in fip_objs:"},{"line_number":917,"context_line":"            if fip_obj.fixed_ip_address in subnet_cidr:"},{"line_number":918,"context_line":"                raise l3.RouterInterfaceInUseByFloatingIP("}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_c66582e3","line":915,"range":{"start_line":914,"start_character":7,"end_line":915,"end_character":41},"updated":"2017-09-21 19:57:02.000000000","message":"nit: those lines can be squashed without hitting the 80 chars length limit","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9ddc23d159d9e9006618639484f4d99c5dbcdfbb","unresolved":false,"context_lines":[{"line_number":911,"context_line":"            if len(e.errors) \u003d\u003d 1:"},{"line_number":912,"context_line":"                raise e.errors[0].error"},{"line_number":913,"context_line":"            raise l3.RouterInUse(router_id\u003drouter_id, reason\u003de)"},{"line_number":914,"context_line":"        fip_objs \u003d l3_obj.FloatingIP.get_objects("},{"line_number":915,"context_line":"            context, router_id\u003drouter_id)"},{"line_number":916,"context_line":"        for fip_obj in fip_objs:"},{"line_number":917,"context_line":"            if fip_obj.fixed_ip_address in subnet_cidr:"},{"line_number":918,"context_line":"                raise l3.RouterInterfaceInUseByFloatingIP("}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_4d7ef46b","line":915,"range":{"start_line":914,"start_character":7,"end_line":915,"end_character":41},"in_reply_to":"7f515b1d_c66582e3","updated":"2017-10-11 07:38:50.000000000","message":"Done","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f742c4b571bb43b017fad86eef3d23c315243209","unresolved":false,"context_lines":[{"line_number":1035,"context_line":"                              process_extensions\u003dTrue):"},{"line_number":1036,"context_line":"        res \u003d {\u0027id\u0027: floatingip.id,"},{"line_number":1037,"context_line":"               \u0027tenant_id\u0027: floatingip.project_id,"},{"line_number":1038,"context_line":"               \u0027floating_ip_address\u0027: floatingip.floating_ip_address,"},{"line_number":1039,"context_line":"               \u0027floating_network_id\u0027: floatingip.floating_network_id,"},{"line_number":1040,"context_line":"               \u0027router_id\u0027: floatingip.router_id,"},{"line_number":1041,"context_line":"               \u0027port_id\u0027: floatingip.fixed_port_id,"}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_a6b7263b","line":1038,"range":{"start_line":1038,"start_character":38,"end_line":1038,"end_character":68},"updated":"2017-09-21 19:57:02.000000000","message":"should you str() it before returning?","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9ddc23d159d9e9006618639484f4d99c5dbcdfbb","unresolved":false,"context_lines":[{"line_number":1035,"context_line":"                              process_extensions\u003dTrue):"},{"line_number":1036,"context_line":"        res \u003d {\u0027id\u0027: floatingip.id,"},{"line_number":1037,"context_line":"               \u0027tenant_id\u0027: floatingip.project_id,"},{"line_number":1038,"context_line":"               \u0027floating_ip_address\u0027: floatingip.floating_ip_address,"},{"line_number":1039,"context_line":"               \u0027floating_network_id\u0027: floatingip.floating_network_id,"},{"line_number":1040,"context_line":"               \u0027router_id\u0027: floatingip.router_id,"},{"line_number":1041,"context_line":"               \u0027port_id\u0027: floatingip.fixed_port_id,"}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_ad8c487f","line":1038,"range":{"start_line":1038,"start_character":38,"end_line":1038,"end_character":68},"in_reply_to":"7f515b1d_a6b7263b","updated":"2017-10-11 07:38:50.000000000","message":"Done","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f742c4b571bb43b017fad86eef3d23c315243209","unresolved":false,"context_lines":[{"line_number":1039,"context_line":"               \u0027floating_network_id\u0027: floatingip.floating_network_id,"},{"line_number":1040,"context_line":"               \u0027router_id\u0027: floatingip.router_id,"},{"line_number":1041,"context_line":"               \u0027port_id\u0027: floatingip.fixed_port_id,"},{"line_number":1042,"context_line":"               \u0027fixed_ip_address\u0027: floatingip.fixed_ip_address,"},{"line_number":1043,"context_line":"               \u0027status\u0027: floatingip.status}"},{"line_number":1044,"context_line":"        # NOTE(mlavalle): The following assumes this mixin is used in a"},{"line_number":1045,"context_line":"        # class inheriting from CommonDbMixin, which is true for all existing"}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_66836e58","line":1042,"range":{"start_line":1042,"start_character":35,"end_line":1042,"end_character":62},"updated":"2017-09-21 19:57:02.000000000","message":"ditto","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9ddc23d159d9e9006618639484f4d99c5dbcdfbb","unresolved":false,"context_lines":[{"line_number":1039,"context_line":"               \u0027floating_network_id\u0027: floatingip.floating_network_id,"},{"line_number":1040,"context_line":"               \u0027router_id\u0027: floatingip.router_id,"},{"line_number":1041,"context_line":"               \u0027port_id\u0027: floatingip.fixed_port_id,"},{"line_number":1042,"context_line":"               \u0027fixed_ip_address\u0027: floatingip.fixed_ip_address,"},{"line_number":1043,"context_line":"               \u0027status\u0027: floatingip.status}"},{"line_number":1044,"context_line":"        # NOTE(mlavalle): The following assumes this mixin is used in a"},{"line_number":1045,"context_line":"        # class inheriting from CommonDbMixin, which is true for all existing"}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_8de98c1b","line":1042,"range":{"start_line":1042,"start_character":35,"end_line":1042,"end_character":62},"in_reply_to":"7f515b1d_66836e58","updated":"2017-10-11 07:38:50.000000000","message":"Done","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f742c4b571bb43b017fad86eef3d23c315243209","unresolved":false,"context_lines":[{"line_number":1192,"context_line":"                raise l3.FloatingIPPortAlreadyAssociated("},{"line_number":1193,"context_line":"                    port_id\u003dfip[\u0027port_id\u0027],"},{"line_number":1194,"context_line":"                    fip_id\u003dfloatingip_obj.id,"},{"line_number":1195,"context_line":"                    floating_ip_address\u003dfloatingip_obj.floating_ip_address,"},{"line_number":1196,"context_line":"                    fixed_ip\u003dinternal_ip_address,"},{"line_number":1197,"context_line":"                    net_id\u003dfloatingip_obj.floating_network_id)"},{"line_number":1198,"context_line":""}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_26f21608","line":1195,"range":{"start_line":1195,"start_character":40,"end_line":1195,"end_character":75},"updated":"2017-09-21 19:57:02.000000000","message":"don\u0027t you need to str() it back?","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9ddc23d159d9e9006618639484f4d99c5dbcdfbb","unresolved":false,"context_lines":[{"line_number":1192,"context_line":"                raise l3.FloatingIPPortAlreadyAssociated("},{"line_number":1193,"context_line":"                    port_id\u003dfip[\u0027port_id\u0027],"},{"line_number":1194,"context_line":"                    fip_id\u003dfloatingip_obj.id,"},{"line_number":1195,"context_line":"                    floating_ip_address\u003dfloatingip_obj.floating_ip_address,"},{"line_number":1196,"context_line":"                    fixed_ip\u003dinternal_ip_address,"},{"line_number":1197,"context_line":"                    net_id\u003dfloatingip_obj.floating_network_id)"},{"line_number":1198,"context_line":""}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_edd7e04e","line":1195,"range":{"start_line":1195,"start_character":40,"end_line":1195,"end_character":75},"in_reply_to":"7f515b1d_26f21608","updated":"2017-10-11 07:38:50.000000000","message":"Done","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f742c4b571bb43b017fad86eef3d23c315243209","unresolved":false,"context_lines":[{"line_number":1212,"context_line":"        previous_router_id \u003d floatingip_obj.router_id"},{"line_number":1213,"context_line":"        port_id, internal_ip_address, router_id \u003d ("},{"line_number":1214,"context_line":"            self._check_and_get_fip_assoc(context, fip, floatingip_obj))"},{"line_number":1215,"context_line":"        floatingip_obj.fixed_ip_address \u003d internal_ip_address"},{"line_number":1216,"context_line":"        floatingip_obj.fixed_port_id \u003d port_id"},{"line_number":1217,"context_line":"        floatingip_obj.router_id \u003d router_id"},{"line_number":1218,"context_line":"        floatingip_obj.last_known_router_id \u003d previous_router_id"}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_86e2ea2e","line":1215,"range":{"start_line":1215,"start_character":42,"end_line":1215,"end_character":61},"updated":"2017-09-21 19:57:02.000000000","message":"shouldn\u0027t you convert to netaddr.IPAddress here?","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9ddc23d159d9e9006618639484f4d99c5dbcdfbb","unresolved":false,"context_lines":[{"line_number":1212,"context_line":"        previous_router_id \u003d floatingip_obj.router_id"},{"line_number":1213,"context_line":"        port_id, internal_ip_address, router_id \u003d ("},{"line_number":1214,"context_line":"            self._check_and_get_fip_assoc(context, fip, floatingip_obj))"},{"line_number":1215,"context_line":"        floatingip_obj.fixed_ip_address \u003d internal_ip_address"},{"line_number":1216,"context_line":"        floatingip_obj.fixed_port_id \u003d port_id"},{"line_number":1217,"context_line":"        floatingip_obj.router_id \u003d router_id"},{"line_number":1218,"context_line":"        floatingip_obj.last_known_router_id \u003d previous_router_id"}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_0d223c53","line":1215,"range":{"start_line":1215,"start_character":42,"end_line":1215,"end_character":61},"in_reply_to":"7f515b1d_86e2ea2e","updated":"2017-10-11 07:38:50.000000000","message":"Done","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f742c4b571bb43b017fad86eef3d23c315243209","unresolved":false,"context_lines":[{"line_number":1218,"context_line":"        floatingip_obj.last_known_router_id \u003d previous_router_id"},{"line_number":1219,"context_line":"        if \u0027description\u0027 in fip:"},{"line_number":1220,"context_line":"            floatingip_obj.description \u003d fip[\u0027description\u0027]"},{"line_number":1221,"context_line":"        return {\u0027fixed_ip_address\u0027: floatingip_obj.fixed_ip_address,"},{"line_number":1222,"context_line":"                \u0027fixed_port_id\u0027: port_id,"},{"line_number":1223,"context_line":"                \u0027router_id\u0027: router_id,"},{"line_number":1224,"context_line":"                \u0027last_known_router_id\u0027: previous_router_id,"}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_46d63252","line":1221,"range":{"start_line":1221,"start_character":36,"end_line":1221,"end_character":67},"updated":"2017-09-21 19:57:02.000000000","message":"str()?","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9ddc23d159d9e9006618639484f4d99c5dbcdfbb","unresolved":false,"context_lines":[{"line_number":1218,"context_line":"        floatingip_obj.last_known_router_id \u003d previous_router_id"},{"line_number":1219,"context_line":"        if \u0027description\u0027 in fip:"},{"line_number":1220,"context_line":"            floatingip_obj.description \u003d fip[\u0027description\u0027]"},{"line_number":1221,"context_line":"        return {\u0027fixed_ip_address\u0027: floatingip_obj.fixed_ip_address,"},{"line_number":1222,"context_line":"                \u0027fixed_port_id\u0027: port_id,"},{"line_number":1223,"context_line":"                \u0027router_id\u0027: router_id,"},{"line_number":1224,"context_line":"                \u0027last_known_router_id\u0027: previous_router_id,"}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_ed1c8014","line":1221,"range":{"start_line":1221,"start_character":36,"end_line":1221,"end_character":67},"in_reply_to":"7f515b1d_46d63252","updated":"2017-10-11 07:38:50.000000000","message":"Done","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f742c4b571bb43b017fad86eef3d23c315243209","unresolved":false,"context_lines":[{"line_number":1222,"context_line":"                \u0027fixed_port_id\u0027: port_id,"},{"line_number":1223,"context_line":"                \u0027router_id\u0027: router_id,"},{"line_number":1224,"context_line":"                \u0027last_known_router_id\u0027: previous_router_id,"},{"line_number":1225,"context_line":"                \u0027floating_ip_address\u0027: floatingip_obj.floating_ip_address,"},{"line_number":1226,"context_line":"                \u0027floating_network_id\u0027: floatingip_obj.floating_network_id,"},{"line_number":1227,"context_line":"                \u0027floating_ip_id\u0027: floatingip_obj.id,"},{"line_number":1228,"context_line":"                \u0027context\u0027: context}"}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_6636ceb7","line":1225,"range":{"start_line":1225,"start_character":39,"end_line":1225,"end_character":73},"updated":"2017-09-21 19:57:02.000000000","message":"str()?","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9ddc23d159d9e9006618639484f4d99c5dbcdfbb","unresolved":false,"context_lines":[{"line_number":1222,"context_line":"                \u0027fixed_port_id\u0027: port_id,"},{"line_number":1223,"context_line":"                \u0027router_id\u0027: router_id,"},{"line_number":1224,"context_line":"                \u0027last_known_router_id\u0027: previous_router_id,"},{"line_number":1225,"context_line":"                \u0027floating_ip_address\u0027: floatingip_obj.floating_ip_address,"},{"line_number":1226,"context_line":"                \u0027floating_network_id\u0027: floatingip_obj.floating_network_id,"},{"line_number":1227,"context_line":"                \u0027floating_ip_id\u0027: floatingip_obj.id,"},{"line_number":1228,"context_line":"                \u0027context\u0027: context}"}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_ad1688f0","line":1225,"range":{"start_line":1225,"start_character":39,"end_line":1225,"end_character":73},"in_reply_to":"7f515b1d_6636ceb7","updated":"2017-10-11 07:38:50.000000000","message":"Done","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f742c4b571bb43b017fad86eef3d23c315243209","unresolved":false,"context_lines":[{"line_number":1301,"context_line":"            if self._is_dns_integration_supported:"},{"line_number":1302,"context_line":"                dns_data \u003d self._process_dns_floatingip_create_precommit("},{"line_number":1303,"context_line":"                    context, floatingip_dict, fip)"},{"line_number":1304,"context_line":"                floatingip_obj.update()"},{"line_number":1305,"context_line":""},{"line_number":1306,"context_line":"        self._core_plugin.update_port(context.elevated(), external_port[\u0027id\u0027],"},{"line_number":1307,"context_line":"                                      {\u0027port\u0027: {\u0027device_id\u0027: fip_id}})"}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_e6207e4c","line":1304,"updated":"2017-09-21 19:57:02.000000000","message":"seems like a better place for that would be inside _process_dns_floatingip_create_precommit otherwise the _process_dns_floatingip_create_precommit method will always require an additional call to .update() to apply the changes, which is error prone.","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9ddc23d159d9e9006618639484f4d99c5dbcdfbb","unresolved":false,"context_lines":[{"line_number":1301,"context_line":"            if self._is_dns_integration_supported:"},{"line_number":1302,"context_line":"                dns_data \u003d self._process_dns_floatingip_create_precommit("},{"line_number":1303,"context_line":"                    context, floatingip_dict, fip)"},{"line_number":1304,"context_line":"                floatingip_obj.update()"},{"line_number":1305,"context_line":""},{"line_number":1306,"context_line":"        self._core_plugin.update_port(context.elevated(), external_port[\u0027id\u0027],"},{"line_number":1307,"context_line":"                                      {\u0027port\u0027: {\u0027device_id\u0027: fip_id}})"}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_6d98901a","line":1304,"in_reply_to":"7f515b1d_e6207e4c","updated":"2017-10-11 07:38:50.000000000","message":"After some dig up, I think if we fetch the latest ovo object from db in Line 1317, we do not need to explicitly update floatingip object here, because db layer always contains the most up-to-date records.","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f742c4b571bb43b017fad86eef3d23c315243209","unresolved":false,"context_lines":[{"line_number":1314,"context_line":"            self._process_dns_floatingip_create_postcommit(context,"},{"line_number":1315,"context_line":"                                                           floatingip_dict,"},{"line_number":1316,"context_line":"                                                           dns_data)"},{"line_number":1317,"context_line":"        floatingip_obj \u003d l3_obj.FloatingIP.get_object("},{"line_number":1318,"context_line":"            context, id\u003dfloatingip_obj.id)"},{"line_number":1319,"context_line":"        resource_extend.apply_funcs(l3.FLOATINGIPS, floatingip_dict,"},{"line_number":1320,"context_line":"                                    floatingip_obj.db_obj)"}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_26aa1685","line":1317,"updated":"2017-09-21 19:57:02.000000000","message":"what if at this point the floating ip is already gone? (it could be removed between line 1304 and line 1317) Then floatingip_obj is None, and attempt to extract .db_obj from it in line 1320 will result in AttributeError","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9ddc23d159d9e9006618639484f4d99c5dbcdfbb","unresolved":false,"context_lines":[{"line_number":1314,"context_line":"            self._process_dns_floatingip_create_postcommit(context,"},{"line_number":1315,"context_line":"                                                           floatingip_dict,"},{"line_number":1316,"context_line":"                                                           dns_data)"},{"line_number":1317,"context_line":"        floatingip_obj \u003d l3_obj.FloatingIP.get_object("},{"line_number":1318,"context_line":"            context, id\u003dfloatingip_obj.id)"},{"line_number":1319,"context_line":"        resource_extend.apply_funcs(l3.FLOATINGIPS, floatingip_dict,"},{"line_number":1320,"context_line":"                                    floatingip_obj.db_obj)"}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_a9bd15d9","line":1317,"in_reply_to":"7f515b1d_26aa1685","updated":"2017-10-11 07:38:50.000000000","message":"I will add an if check here, but honestly I do not see how lines between 1304 and line 1317 would remove floatingip. If it is possible that this would happen, don\u0027t we need to raise exception saying that floatingip is gone here?","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f742c4b571bb43b017fad86eef3d23c315243209","unresolved":false,"context_lines":[{"line_number":1413,"context_line":"    def delete_disassociated_floatingips(self, context, network_id):"},{"line_number":1414,"context_line":"        fip_objs \u003d l3_obj.FloatingIP.get_objects("},{"line_number":1415,"context_line":"            context,"},{"line_number":1416,"context_line":"            floating_network_id\u003dnetwork_id)"},{"line_number":1417,"context_line":""},{"line_number":1418,"context_line":"        for fip in fip_objs:"},{"line_number":1419,"context_line":"            if fip.fixed_ip_address is None and fip.fixed_port_id is None:"}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_26ffb668","line":1416,"updated":"2017-09-21 19:57:02.000000000","message":"can\u0027t we also filter by router_id and fixed_port_id here? Then we won\u0027t need filtering in python as in line 1419.","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9ddc23d159d9e9006618639484f4d99c5dbcdfbb","unresolved":false,"context_lines":[{"line_number":1413,"context_line":"    def delete_disassociated_floatingips(self, context, network_id):"},{"line_number":1414,"context_line":"        fip_objs \u003d l3_obj.FloatingIP.get_objects("},{"line_number":1415,"context_line":"            context,"},{"line_number":1416,"context_line":"            floating_network_id\u003dnetwork_id)"},{"line_number":1417,"context_line":""},{"line_number":1418,"context_line":"        for fip in fip_objs:"},{"line_number":1419,"context_line":"            if fip.fixed_ip_address is None and fip.fixed_port_id is None:"}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_e9730d15","line":1416,"in_reply_to":"7f515b1d_26ffb668","updated":"2017-10-11 07:38:50.000000000","message":"No, I have tried in PS32. Without including router_id and fixed_port_id, the filtered object looks like this:\n\n[FloatingIP(created_at\u003d2017-09-28T01:21:09Z,description\u003d\u003c?\u003e,dns\u003dNone,fixed_ip_address\u003d\u003c?\u003e,fixed_port_id\u003d\u003c?\u003e,floating_ip_address\u003d200.0.0.6,floating_network_id\u003d3cc2f26f-fde1-4949-8a1b-fd574aa11a67,floating_port_id\u003da7d4321a-4d45-46a0-8ffb-4b406a03dfdf,id\u003d78e6d7ee-0b26-4e1b-a631-152a333371ed,last_known_router_id\u003d\u003c?\u003e,project_id\u003d\u002746f70361-ba71-4bd0-9769-3573fd227c4b\u0027,revision_number\u003d0,router_id\u003d\u003c?\u003e,status\u003d\u0027ACTIVE\u0027,updated_at\u003d\u003c?\u003e)]\n\nWhere you can see that router_id and fixed_port_id is not literally None but \u003c?\u003e. If I pass router_id\u003dNone and fixed_port_id\u003dNone into get_objects(), I cannot find any matching objects.","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f742c4b571bb43b017fad86eef3d23c315243209","unresolved":false,"context_lines":[{"line_number":1416,"context_line":"            floating_network_id\u003dnetwork_id)"},{"line_number":1417,"context_line":""},{"line_number":1418,"context_line":"        for fip in fip_objs:"},{"line_number":1419,"context_line":"            if fip.fixed_ip_address is None and fip.fixed_port_id is None:"},{"line_number":1420,"context_line":"                self.delete_floatingip(context, fip.id)"},{"line_number":1421,"context_line":""},{"line_number":1422,"context_line":"    @db_api.retry_if_session_inactive()"}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_a6aba673","line":1419,"range":{"start_line":1419,"start_character":15,"end_line":1419,"end_character":43},"updated":"2017-09-21 19:57:02.000000000","message":"is it really functionally identical to the old filter of router_id \u003d\u003d None?..","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9ddc23d159d9e9006618639484f4d99c5dbcdfbb","unresolved":false,"context_lines":[{"line_number":1416,"context_line":"            floating_network_id\u003dnetwork_id)"},{"line_number":1417,"context_line":""},{"line_number":1418,"context_line":"        for fip in fip_objs:"},{"line_number":1419,"context_line":"            if fip.fixed_ip_address is None and fip.fixed_port_id is None:"},{"line_number":1420,"context_line":"                self.delete_floatingip(context, fip.id)"},{"line_number":1421,"context_line":""},{"line_number":1422,"context_line":"    @db_api.retry_if_session_inactive()"}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_c91bb1c7","line":1419,"range":{"start_line":1419,"start_character":15,"end_line":1419,"end_character":43},"in_reply_to":"7f515b1d_a6aba673","updated":"2017-10-11 07:38:50.000000000","message":"My bad. Not sure how it ends up like this...","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f742c4b571bb43b017fad86eef3d23c315243209","unresolved":false,"context_lines":[{"line_number":1490,"context_line":"                          This parameter is ignored."},{"line_number":1491,"context_line":"        @return: set of router-ids that require notification updates"},{"line_number":1492,"context_line":"        \"\"\""},{"line_number":1493,"context_line":"        router_ids \u003d set()"},{"line_number":1494,"context_line":""},{"line_number":1495,"context_line":"        floating_ip_objs \u003d l3_obj.FloatingIP.get_objects("},{"line_number":1496,"context_line":"            context, fixed_port_id\u003dport_id)"}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_462f52f6","line":1493,"updated":"2017-09-21 19:57:02.000000000","message":"I think we can remove this line","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9ddc23d159d9e9006618639484f4d99c5dbcdfbb","unresolved":false,"context_lines":[{"line_number":1490,"context_line":"                          This parameter is ignored."},{"line_number":1491,"context_line":"        @return: set of router-ids that require notification updates"},{"line_number":1492,"context_line":"        \"\"\""},{"line_number":1493,"context_line":"        router_ids \u003d set()"},{"line_number":1494,"context_line":""},{"line_number":1495,"context_line":"        floating_ip_objs \u003d l3_obj.FloatingIP.get_objects("},{"line_number":1496,"context_line":"            context, fixed_port_id\u003dport_id)"}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_e94c2dc9","line":1493,"in_reply_to":"7f515b1d_462f52f6","updated":"2017-10-11 07:38:50.000000000","message":"Done","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f742c4b571bb43b017fad86eef3d23c315243209","unresolved":false,"context_lines":[{"line_number":1498,"context_line":"        values \u003d {\u0027fixed_port_id\u0027: None,"},{"line_number":1499,"context_line":"                  \u0027fixed_ip_address\u0027: None,"},{"line_number":1500,"context_line":"                  \u0027router_id\u0027: None}"},{"line_number":1501,"context_line":"        l3_obj.FloatingIP.update_objects("},{"line_number":1502,"context_line":"            context, values, fixed_port_id\u003dport_id)"},{"line_number":1503,"context_line":"        return router_ids"},{"line_number":1504,"context_line":""},{"line_number":1505,"context_line":"    def _get_floatingips_by_port_id(self, context, port_id):"}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_e66bde1c","line":1502,"range":{"start_line":1501,"start_character":8,"end_line":1502,"end_character":51},"updated":"2017-09-21 19:57:02.000000000","message":"I am not sure it\u0027s identical because if diassociate_floatingips is not called from another transaction, then update_objects() may update more (or less) objects than line 1395 fetched. That could happen if a floating ip was associated in the middle of the method execution.","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9ddc23d159d9e9006618639484f4d99c5dbcdfbb","unresolved":false,"context_lines":[{"line_number":1498,"context_line":"        values \u003d {\u0027fixed_port_id\u0027: None,"},{"line_number":1499,"context_line":"                  \u0027fixed_ip_address\u0027: None,"},{"line_number":1500,"context_line":"                  \u0027router_id\u0027: None}"},{"line_number":1501,"context_line":"        l3_obj.FloatingIP.update_objects("},{"line_number":1502,"context_line":"            context, values, fixed_port_id\u003dport_id)"},{"line_number":1503,"context_line":"        return router_ids"},{"line_number":1504,"context_line":""},{"line_number":1505,"context_line":"    def _get_floatingips_by_port_id(self, context, port_id):"}],"source_content_type":"text/x-python","patch_set":34,"id":"5f4e5783_1a461f7e","line":1502,"range":{"start_line":1501,"start_character":8,"end_line":1502,"end_character":51},"in_reply_to":"7f515b1d_e66bde1c","updated":"2017-10-11 07:38:50.000000000","message":"Yes, this can happen. Then how about we make this part to objects/router.py and keep it in db layer. Other than that, I cannot figure out how we can guarantee not to update more/less objects in OVO layer.","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f742c4b571bb43b017fad86eef3d23c315243209","unresolved":false,"context_lines":[{"line_number":1577,"context_line":"            context, router_ids)"},{"line_number":1578,"context_line":""},{"line_number":1579,"context_line":"        return [self._make_floatingip_dict_with_scope("},{"line_number":1580,"context_line":"                l3_obj.FloatingIP._load_object(context, row[0]), row[1])"},{"line_number":1581,"context_line":"                for row in self._unique_floatingip_iterator(query)]"},{"line_number":1582,"context_line":""},{"line_number":1583,"context_line":"    def _get_sync_interfaces(self, context, router_ids, device_owners\u003dNone):"}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_26e9f67f","line":1580,"range":{"start_line":1580,"start_character":33,"end_line":1580,"end_character":46},"updated":"2017-09-21 19:57:02.000000000","message":"could you please move the call to _load_object into the get_sync... method? we should not expose those details to outside consumers of objects.","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9ddc23d159d9e9006618639484f4d99c5dbcdfbb","unresolved":false,"context_lines":[{"line_number":1577,"context_line":"            context, router_ids)"},{"line_number":1578,"context_line":""},{"line_number":1579,"context_line":"        return [self._make_floatingip_dict_with_scope("},{"line_number":1580,"context_line":"                l3_obj.FloatingIP._load_object(context, row[0]), row[1])"},{"line_number":1581,"context_line":"                for row in self._unique_floatingip_iterator(query)]"},{"line_number":1582,"context_line":""},{"line_number":1583,"context_line":"    def _get_sync_interfaces(self, context, router_ids, device_owners\u003dNone):"}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_14ad60e8","line":1580,"range":{"start_line":1580,"start_character":33,"end_line":1580,"end_character":46},"in_reply_to":"7f515b1d_26e9f67f","updated":"2017-10-11 07:38:50.000000000","message":"OK, but I think it would be better that we still separate this function from what _unique_floatingip_iterator() method does to keep consistency.","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f76263a9240d61a2fe4dfac6b3a1d8a50d9f0f20","unresolved":false,"context_lines":[{"line_number":909,"context_line":"            if len(e.errors) \u003d\u003d 1:"},{"line_number":910,"context_line":"                raise e.errors[0].error"},{"line_number":911,"context_line":"            raise l3.RouterInUse(router_id\u003drouter_id, reason\u003de)"},{"line_number":912,"context_line":"        fip_objs \u003d l3_obj.FloatingIP.get_objects("},{"line_number":913,"context_line":"            context, router_id\u003drouter_id)"},{"line_number":914,"context_line":"        for fip_obj in fip_objs:"},{"line_number":915,"context_line":"            if fip_obj.fixed_ip_address in subnet_cidr:"},{"line_number":916,"context_line":"                raise l3.RouterInterfaceInUseByFloatingIP("}],"source_content_type":"text/x-python","patch_set":35,"id":"5f4e5783_bf0650cd","line":913,"range":{"start_line":912,"start_character":8,"end_line":913,"end_character":41},"updated":"2017-10-16 21:07:50.000000000","message":"nit from the previous patch set: those lines can be squashed","commit_id":"a0701a6b7ea5135e70f1f2c9ac3c1810f4b39644"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9af33007d00e365a749ca5d142d2b2aa6a1b2820","unresolved":false,"context_lines":[{"line_number":909,"context_line":"            if len(e.errors) \u003d\u003d 1:"},{"line_number":910,"context_line":"                raise e.errors[0].error"},{"line_number":911,"context_line":"            raise l3.RouterInUse(router_id\u003drouter_id, reason\u003de)"},{"line_number":912,"context_line":"        fip_objs \u003d l3_obj.FloatingIP.get_objects("},{"line_number":913,"context_line":"            context, router_id\u003drouter_id)"},{"line_number":914,"context_line":"        for fip_obj in fip_objs:"},{"line_number":915,"context_line":"            if fip_obj.fixed_ip_address in subnet_cidr:"},{"line_number":916,"context_line":"                raise l3.RouterInterfaceInUseByFloatingIP("}],"source_content_type":"text/x-python","patch_set":35,"id":"3f4b6375_07c93b77","line":913,"range":{"start_line":912,"start_character":8,"end_line":913,"end_character":41},"in_reply_to":"5f4e5783_bf0650cd","updated":"2017-10-19 05:43:16.000000000","message":"Done","commit_id":"a0701a6b7ea5135e70f1f2c9ac3c1810f4b39644"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f76263a9240d61a2fe4dfac6b3a1d8a50d9f0f20","unresolved":false,"context_lines":[{"line_number":1031,"context_line":""},{"line_number":1032,"context_line":"    def _make_floatingip_dict(self, floatingip, fields\u003dNone,"},{"line_number":1033,"context_line":"                              process_extensions\u003dTrue):"},{"line_number":1034,"context_line":"        floating_ip_address \u003d str(floatingip.floating_ip_address)\\"},{"line_number":1035,"context_line":"            if floatingip.floating_ip_address else None"},{"line_number":1036,"context_line":"        fixed_ip_address \u003d str(floatingip.fixed_ip_address)\\"},{"line_number":1037,"context_line":"            if floatingip.fixed_ip_address else None"},{"line_number":1038,"context_line":"        res \u003d {\u0027id\u0027: floatingip.id,"}],"source_content_type":"text/x-python","patch_set":35,"id":"5f4e5783_7fda184b","line":1035,"range":{"start_line":1034,"start_character":8,"end_line":1035,"end_character":55},"updated":"2017-10-16 21:07:50.000000000","message":"you can also do:\n\nfloating_ip_address \u003d floatingip.floating_ip_address\nfloating_ip_address \u003d floating_ip_address and str(floating_ip_address)\n\nor at least please add a space after closing brace as we do in other places","commit_id":"a0701a6b7ea5135e70f1f2c9ac3c1810f4b39644"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9af33007d00e365a749ca5d142d2b2aa6a1b2820","unresolved":false,"context_lines":[{"line_number":1031,"context_line":""},{"line_number":1032,"context_line":"    def _make_floatingip_dict(self, floatingip, fields\u003dNone,"},{"line_number":1033,"context_line":"                              process_extensions\u003dTrue):"},{"line_number":1034,"context_line":"        floating_ip_address \u003d str(floatingip.floating_ip_address)\\"},{"line_number":1035,"context_line":"            if floatingip.floating_ip_address else None"},{"line_number":1036,"context_line":"        fixed_ip_address \u003d str(floatingip.fixed_ip_address)\\"},{"line_number":1037,"context_line":"            if floatingip.fixed_ip_address else None"},{"line_number":1038,"context_line":"        res \u003d {\u0027id\u0027: floatingip.id,"}],"source_content_type":"text/x-python","patch_set":35,"id":"3f4b6375_b1c2a5e8","line":1035,"range":{"start_line":1034,"start_character":8,"end_line":1035,"end_character":55},"in_reply_to":"5f4e5783_7fda184b","updated":"2017-10-19 05:43:16.000000000","message":"I have a question. Do we need a space before \"\\\" because it follows a closing brace? Cause in Line 1285, there is no space between comma and backslash. I got a bit confused here..","commit_id":"a0701a6b7ea5135e70f1f2c9ac3c1810f4b39644"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f76263a9240d61a2fe4dfac6b3a1d8a50d9f0f20","unresolved":false,"context_lines":[{"line_number":1033,"context_line":"                              process_extensions\u003dTrue):"},{"line_number":1034,"context_line":"        floating_ip_address \u003d str(floatingip.floating_ip_address)\\"},{"line_number":1035,"context_line":"            if floatingip.floating_ip_address else None"},{"line_number":1036,"context_line":"        fixed_ip_address \u003d str(floatingip.fixed_ip_address)\\"},{"line_number":1037,"context_line":"            if floatingip.fixed_ip_address else None"},{"line_number":1038,"context_line":"        res \u003d {\u0027id\u0027: floatingip.id,"},{"line_number":1039,"context_line":"               \u0027tenant_id\u0027: floatingip.project_id,"}],"source_content_type":"text/x-python","patch_set":35,"id":"5f4e5783_3fe820e0","line":1036,"updated":"2017-10-16 21:07:50.000000000","message":"ditto","commit_id":"a0701a6b7ea5135e70f1f2c9ac3c1810f4b39644"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9af33007d00e365a749ca5d142d2b2aa6a1b2820","unresolved":false,"context_lines":[{"line_number":1033,"context_line":"                              process_extensions\u003dTrue):"},{"line_number":1034,"context_line":"        floating_ip_address \u003d str(floatingip.floating_ip_address)\\"},{"line_number":1035,"context_line":"            if floatingip.floating_ip_address else None"},{"line_number":1036,"context_line":"        fixed_ip_address \u003d str(floatingip.fixed_ip_address)\\"},{"line_number":1037,"context_line":"            if floatingip.fixed_ip_address else None"},{"line_number":1038,"context_line":"        res \u003d {\u0027id\u0027: floatingip.id,"},{"line_number":1039,"context_line":"               \u0027tenant_id\u0027: floatingip.project_id,"}],"source_content_type":"text/x-python","patch_set":35,"id":"3f4b6375_4c975a92","line":1036,"in_reply_to":"5f4e5783_3fe820e0","updated":"2017-10-19 05:43:16.000000000","message":"Done","commit_id":"a0701a6b7ea5135e70f1f2c9ac3c1810f4b39644"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f76263a9240d61a2fe4dfac6b3a1d8a50d9f0f20","unresolved":false,"context_lines":[{"line_number":1191,"context_line":"                    fixed_port_id\u003dfip[\u0027port_id\u0027],"},{"line_number":1192,"context_line":"                    floating_network_id\u003dfloatingip_obj.floating_network_id,"},{"line_number":1193,"context_line":"                    fixed_ip_address\u003dnetaddr.IPAddress(internal_ip_address)):"},{"line_number":1194,"context_line":"                floating_ip_address \u003d str(floatingip_obj.floating_ip_address)\\"},{"line_number":1195,"context_line":"                    if floatingip_obj.floating_ip_address else None"},{"line_number":1196,"context_line":"                raise l3.FloatingIPPortAlreadyAssociated("},{"line_number":1197,"context_line":"                    port_id\u003dfip[\u0027port_id\u0027],"}],"source_content_type":"text/x-python","patch_set":35,"id":"5f4e5783_dfea2cd6","line":1194,"updated":"2017-10-16 21:07:50.000000000","message":"ditto","commit_id":"a0701a6b7ea5135e70f1f2c9ac3c1810f4b39644"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9af33007d00e365a749ca5d142d2b2aa6a1b2820","unresolved":false,"context_lines":[{"line_number":1191,"context_line":"                    fixed_port_id\u003dfip[\u0027port_id\u0027],"},{"line_number":1192,"context_line":"                    floating_network_id\u003dfloatingip_obj.floating_network_id,"},{"line_number":1193,"context_line":"                    fixed_ip_address\u003dnetaddr.IPAddress(internal_ip_address)):"},{"line_number":1194,"context_line":"                floating_ip_address \u003d str(floatingip_obj.floating_ip_address)\\"},{"line_number":1195,"context_line":"                    if floatingip_obj.floating_ip_address else None"},{"line_number":1196,"context_line":"                raise l3.FloatingIPPortAlreadyAssociated("},{"line_number":1197,"context_line":"                    port_id\u003dfip[\u0027port_id\u0027],"}],"source_content_type":"text/x-python","patch_set":35,"id":"3f4b6375_e7c5ff5c","line":1194,"in_reply_to":"5f4e5783_dfea2cd6","updated":"2017-10-19 05:43:16.000000000","message":"Done","commit_id":"a0701a6b7ea5135e70f1f2c9ac3c1810f4b39644"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f76263a9240d61a2fe4dfac6b3a1d8a50d9f0f20","unresolved":false,"context_lines":[{"line_number":1216,"context_line":"        previous_router_id \u003d floatingip_obj.router_id"},{"line_number":1217,"context_line":"        port_id, internal_ip_address, router_id \u003d ("},{"line_number":1218,"context_line":"            self._check_and_get_fip_assoc(context, fip, floatingip_obj))"},{"line_number":1219,"context_line":"        floatingip_obj.fixed_ip_address \u003d netaddr.IPAddress("},{"line_number":1220,"context_line":"            internal_ip_address) if internal_ip_address else None"},{"line_number":1221,"context_line":"        floatingip_obj.fixed_port_id \u003d port_id"},{"line_number":1222,"context_line":"        floatingip_obj.router_id \u003d router_id"}],"source_content_type":"text/x-python","patch_set":35,"id":"5f4e5783_7fa8d88a","line":1219,"updated":"2017-10-16 21:07:50.000000000","message":"nit: this choice of style is a bit hard to understand. Consider:\n\nfloating_obj.fixed_ip_address \u003d (\n    netaddr.IPAddress(internal_ip_address)\n    if internal_ip_address else None)","commit_id":"a0701a6b7ea5135e70f1f2c9ac3c1810f4b39644"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9af33007d00e365a749ca5d142d2b2aa6a1b2820","unresolved":false,"context_lines":[{"line_number":1216,"context_line":"        previous_router_id \u003d floatingip_obj.router_id"},{"line_number":1217,"context_line":"        port_id, internal_ip_address, router_id \u003d ("},{"line_number":1218,"context_line":"            self._check_and_get_fip_assoc(context, fip, floatingip_obj))"},{"line_number":1219,"context_line":"        floatingip_obj.fixed_ip_address \u003d netaddr.IPAddress("},{"line_number":1220,"context_line":"            internal_ip_address) if internal_ip_address else None"},{"line_number":1221,"context_line":"        floatingip_obj.fixed_port_id \u003d port_id"},{"line_number":1222,"context_line":"        floatingip_obj.router_id \u003d router_id"}],"source_content_type":"text/x-python","patch_set":35,"id":"3f4b6375_31aeb52e","line":1219,"in_reply_to":"5f4e5783_7fa8d88a","updated":"2017-10-19 05:43:16.000000000","message":"Done","commit_id":"a0701a6b7ea5135e70f1f2c9ac3c1810f4b39644"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f76263a9240d61a2fe4dfac6b3a1d8a50d9f0f20","unresolved":false,"context_lines":[{"line_number":1223,"context_line":"        floatingip_obj.last_known_router_id \u003d previous_router_id"},{"line_number":1224,"context_line":"        if \u0027description\u0027 in fip:"},{"line_number":1225,"context_line":"            floatingip_obj.description \u003d fip[\u0027description\u0027]"},{"line_number":1226,"context_line":"        fixed_ip_address \u003d str(floatingip_obj.fixed_ip_address)\\"},{"line_number":1227,"context_line":"            if floatingip_obj.fixed_ip_address else None"},{"line_number":1228,"context_line":"        floating_ip_address \u003d str(floatingip_obj.floating_ip_address)\\"},{"line_number":1229,"context_line":"            if floatingip_obj.floating_ip_address else None"},{"line_number":1230,"context_line":"        return {\u0027fixed_ip_address\u0027: fixed_ip_address,"}],"source_content_type":"text/x-python","patch_set":35,"id":"5f4e5783_df98ec75","line":1227,"range":{"start_line":1226,"start_character":27,"end_line":1227,"end_character":56},"updated":"2017-10-16 21:07:50.000000000","message":"can\u0027t we just use \u0027internal_ip_address\u0027 value here?","commit_id":"a0701a6b7ea5135e70f1f2c9ac3c1810f4b39644"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9af33007d00e365a749ca5d142d2b2aa6a1b2820","unresolved":false,"context_lines":[{"line_number":1223,"context_line":"        floatingip_obj.last_known_router_id \u003d previous_router_id"},{"line_number":1224,"context_line":"        if \u0027description\u0027 in fip:"},{"line_number":1225,"context_line":"            floatingip_obj.description \u003d fip[\u0027description\u0027]"},{"line_number":1226,"context_line":"        fixed_ip_address \u003d str(floatingip_obj.fixed_ip_address)\\"},{"line_number":1227,"context_line":"            if floatingip_obj.fixed_ip_address else None"},{"line_number":1228,"context_line":"        floating_ip_address \u003d str(floatingip_obj.floating_ip_address)\\"},{"line_number":1229,"context_line":"            if floatingip_obj.floating_ip_address else None"},{"line_number":1230,"context_line":"        return {\u0027fixed_ip_address\u0027: fixed_ip_address,"}],"source_content_type":"text/x-python","patch_set":35,"id":"3f4b6375_ac7a4e85","line":1227,"range":{"start_line":1226,"start_character":27,"end_line":1227,"end_character":56},"in_reply_to":"5f4e5783_df98ec75","updated":"2017-10-19 05:43:16.000000000","message":"Oops, you are right. Sometimes I get used to one style easily ;)","commit_id":"a0701a6b7ea5135e70f1f2c9ac3c1810f4b39644"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f76263a9240d61a2fe4dfac6b3a1d8a50d9f0f20","unresolved":false,"context_lines":[{"line_number":1225,"context_line":"            floatingip_obj.description \u003d fip[\u0027description\u0027]"},{"line_number":1226,"context_line":"        fixed_ip_address \u003d str(floatingip_obj.fixed_ip_address)\\"},{"line_number":1227,"context_line":"            if floatingip_obj.fixed_ip_address else None"},{"line_number":1228,"context_line":"        floating_ip_address \u003d str(floatingip_obj.floating_ip_address)\\"},{"line_number":1229,"context_line":"            if floatingip_obj.floating_ip_address else None"},{"line_number":1230,"context_line":"        return {\u0027fixed_ip_address\u0027: fixed_ip_address,"},{"line_number":1231,"context_line":"                \u0027fixed_port_id\u0027: port_id,"}],"source_content_type":"text/x-python","patch_set":35,"id":"5f4e5783_9f90344c","line":1228,"updated":"2017-10-16 21:07:50.000000000","message":"ditto as above","commit_id":"a0701a6b7ea5135e70f1f2c9ac3c1810f4b39644"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9af33007d00e365a749ca5d142d2b2aa6a1b2820","unresolved":false,"context_lines":[{"line_number":1225,"context_line":"            floatingip_obj.description \u003d fip[\u0027description\u0027]"},{"line_number":1226,"context_line":"        fixed_ip_address \u003d str(floatingip_obj.fixed_ip_address)\\"},{"line_number":1227,"context_line":"            if floatingip_obj.fixed_ip_address else None"},{"line_number":1228,"context_line":"        floating_ip_address \u003d str(floatingip_obj.floating_ip_address)\\"},{"line_number":1229,"context_line":"            if floatingip_obj.floating_ip_address else None"},{"line_number":1230,"context_line":"        return {\u0027fixed_ip_address\u0027: fixed_ip_address,"},{"line_number":1231,"context_line":"                \u0027fixed_port_id\u0027: port_id,"}],"source_content_type":"text/x-python","patch_set":35,"id":"3f4b6375_8c6f92c4","line":1228,"in_reply_to":"5f4e5783_9f90344c","updated":"2017-10-19 05:43:16.000000000","message":"Done","commit_id":"a0701a6b7ea5135e70f1f2c9ac3c1810f4b39644"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f76263a9240d61a2fe4dfac6b3a1d8a50d9f0f20","unresolved":false,"context_lines":[{"line_number":1322,"context_line":"            self._process_dns_floatingip_create_postcommit(context,"},{"line_number":1323,"context_line":"                                                           floatingip_dict,"},{"line_number":1324,"context_line":"                                                           dns_data)"},{"line_number":1325,"context_line":"        floatingip_obj \u003d l3_obj.FloatingIP.get_object("},{"line_number":1326,"context_line":"            context, id\u003dfloatingip_obj.id)"},{"line_number":1327,"context_line":"        if floatingip_obj:"},{"line_number":1328,"context_line":"            floatingip_db \u003d floatingip_obj.db_obj"}],"source_content_type":"text/x-python","patch_set":35,"id":"5f4e5783_7ffd786c","line":1325,"updated":"2017-10-16 21:07:50.000000000","message":"so you fetch the data after the previous transaction is closed, meaning that the floating IP object may not exist at this point. In which case, we may no longer include extension attributes into the payload returned to the caller, which would be in violation with what Neutron server API claims (that those extensions are indeed supported, meaning corresponding attributes will be included in the port payload returned).\n\nI think what we should do is fetch the latest state of the database before closing the transaction in line 1313+ (when context manager is closed). Then you will have the latest data and will be able to pass it into extensions despite the floating IP object may have been removed at that point. We would still return full payload with all attributes to the caller.","commit_id":"a0701a6b7ea5135e70f1f2c9ac3c1810f4b39644"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f76263a9240d61a2fe4dfac6b3a1d8a50d9f0f20","unresolved":false,"context_lines":[{"line_number":1426,"context_line":"            floating_network_id\u003dnetwork_id)"},{"line_number":1427,"context_line":""},{"line_number":1428,"context_line":"        for fip in fip_objs:"},{"line_number":1429,"context_line":"            if fip.router_id is None and fip.fixed_port_id is None:"},{"line_number":1430,"context_line":"                self.delete_floatingip(context, fip.id)"},{"line_number":1431,"context_line":""},{"line_number":1432,"context_line":"    @db_api.retry_if_session_inactive()"}],"source_content_type":"text/x-python","patch_set":35,"id":"5f4e5783_7f9c580d","line":1429,"updated":"2017-10-16 21:07:50.000000000","message":"I am still hesitant about it. It doesn\u0027t seem to make sense that floating_network_id filter works but not router_id or fixed_port_id. It sounds like some bug that we should have a closer look at. Would you mind adding a test case that would validate those filters, to see if they indeed don\u0027t work, and to be able to debug the issue?","commit_id":"a0701a6b7ea5135e70f1f2c9ac3c1810f4b39644"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"a7b62305c8b0f06ab4e5631e64b8f8271d00fde5","unresolved":false,"context_lines":[{"line_number":1426,"context_line":"            floating_network_id\u003dnetwork_id)"},{"line_number":1427,"context_line":""},{"line_number":1428,"context_line":"        for fip in fip_objs:"},{"line_number":1429,"context_line":"            if fip.router_id is None and fip.fixed_port_id is None:"},{"line_number":1430,"context_line":"                self.delete_floatingip(context, fip.id)"},{"line_number":1431,"context_line":""},{"line_number":1432,"context_line":"    @db_api.retry_if_session_inactive()"}],"source_content_type":"text/x-python","patch_set":35,"id":"5f4e5783_bba99b90","line":1429,"in_reply_to":"5f4e5783_7f9c580d","updated":"2017-10-18 02:08:17.000000000","message":"I think you are right. I filed a bug report here [1] and corresponding fix is available here [2] (which I have already added you as a review :)). Please take a look to see if I located the correct root cause. \n\n[1] https://bugs.launchpad.net/neutron/+bug/1724177\n[2] https://review.openstack.org/#/c/512908","commit_id":"a0701a6b7ea5135e70f1f2c9ac3c1810f4b39644"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f76263a9240d61a2fe4dfac6b3a1d8a50d9f0f20","unresolved":false,"context_lines":[{"line_number":1500,"context_line":"                          This parameter is ignored."},{"line_number":1501,"context_line":"        @return: set of router-ids that require notification updates"},{"line_number":1502,"context_line":"        \"\"\""},{"line_number":1503,"context_line":"        floating_ip_objs \u003d l3_obj.FloatingIP.get_objects("},{"line_number":1504,"context_line":"            context, fixed_port_id\u003dport_id)"},{"line_number":1505,"context_line":"        router_ids \u003d {fip.router_id for fip in floating_ip_objs}"},{"line_number":1506,"context_line":"        values \u003d {\u0027fixed_port_id\u0027: None,"}],"source_content_type":"text/x-python","patch_set":35,"id":"5f4e5783_1fb0c489","line":1503,"updated":"2017-10-16 21:07:50.000000000","message":"to guarantee that update_objects operates on the same objects as fetching here, you probably should open a (sub)transaction before fetching objects, and keep it open till update_objects() completed.","commit_id":"a0701a6b7ea5135e70f1f2c9ac3c1810f4b39644"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f76263a9240d61a2fe4dfac6b3a1d8a50d9f0f20","unresolved":false,"context_lines":[{"line_number":1570,"context_line":"            return []"},{"line_number":1571,"context_line":""},{"line_number":1572,"context_line":"        return [self._make_floatingip_dict_with_scope(*row)"},{"line_number":1573,"context_line":"                for row in l3_obj.FloatingIP.get_scoped_floating_ips("},{"line_number":1574,"context_line":"                context, router_ids)]"},{"line_number":1575,"context_line":""},{"line_number":1576,"context_line":"    def _get_sync_interfaces(self, context, router_ids, device_owners\u003dNone):"}],"source_content_type":"text/x-python","patch_set":35,"id":"5f4e5783_5f163c57","line":1573,"range":{"start_line":1573,"start_character":20,"end_line":1573,"end_character":23},"updated":"2017-10-16 21:07:50.000000000","message":"the get_scoped_floating_ips should not return \u0027rows\u0027 (it\u0027s a database layer term). What it returns is","commit_id":"a0701a6b7ea5135e70f1f2c9ac3c1810f4b39644"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9af33007d00e365a749ca5d142d2b2aa6a1b2820","unresolved":false,"context_lines":[{"line_number":1570,"context_line":"            return []"},{"line_number":1571,"context_line":""},{"line_number":1572,"context_line":"        return [self._make_floatingip_dict_with_scope(*row)"},{"line_number":1573,"context_line":"                for row in l3_obj.FloatingIP.get_scoped_floating_ips("},{"line_number":1574,"context_line":"                context, router_ids)]"},{"line_number":1575,"context_line":""},{"line_number":1576,"context_line":"    def _get_sync_interfaces(self, context, router_ids, device_owners\u003dNone):"}],"source_content_type":"text/x-python","patch_set":35,"id":"3f4b6375_2c21beb5","line":1573,"range":{"start_line":1573,"start_character":20,"end_line":1573,"end_character":23},"in_reply_to":"5f4e5783_5f163c57","updated":"2017-10-19 05:43:16.000000000","message":"I guess somehow you left the remaining sentence out...?\nBut I got your idea, will rename this parameter.","commit_id":"a0701a6b7ea5135e70f1f2c9ac3c1810f4b39644"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f76263a9240d61a2fe4dfac6b3a1d8a50d9f0f20","unresolved":false,"context_lines":[{"line_number":1571,"context_line":""},{"line_number":1572,"context_line":"        return [self._make_floatingip_dict_with_scope(*row)"},{"line_number":1573,"context_line":"                for row in l3_obj.FloatingIP.get_scoped_floating_ips("},{"line_number":1574,"context_line":"                context, router_ids)]"},{"line_number":1575,"context_line":""},{"line_number":1576,"context_line":"    def _get_sync_interfaces(self, context, router_ids, device_owners\u003dNone):"},{"line_number":1577,"context_line":"        \"\"\"Query router interfaces that relate to list of router_ids.\"\"\""}],"source_content_type":"text/x-python","patch_set":35,"id":"5f4e5783_3f7820c2","line":1574,"updated":"2017-10-16 21:07:50.000000000","message":"nit: please at least shift this line to the right to make it clear it belongs to a nested call and not the list comprehension. Or:\n\nreturn [\n    self._make_floatingip_dict_with_scope(*row)\n    for ...()\n]","commit_id":"a0701a6b7ea5135e70f1f2c9ac3c1810f4b39644"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9af33007d00e365a749ca5d142d2b2aa6a1b2820","unresolved":false,"context_lines":[{"line_number":1571,"context_line":""},{"line_number":1572,"context_line":"        return [self._make_floatingip_dict_with_scope(*row)"},{"line_number":1573,"context_line":"                for row in l3_obj.FloatingIP.get_scoped_floating_ips("},{"line_number":1574,"context_line":"                context, router_ids)]"},{"line_number":1575,"context_line":""},{"line_number":1576,"context_line":"    def _get_sync_interfaces(self, context, router_ids, device_owners\u003dNone):"},{"line_number":1577,"context_line":"        \"\"\"Query router interfaces that relate to list of router_ids.\"\"\""}],"source_content_type":"text/x-python","patch_set":35,"id":"3f4b6375_6c18d680","line":1574,"in_reply_to":"5f4e5783_3f7820c2","updated":"2017-10-19 05:43:16.000000000","message":"Done","commit_id":"a0701a6b7ea5135e70f1f2c9ac3c1810f4b39644"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"7d203e64413a8f1f12a37be91b180054aaca6c99","unresolved":false,"context_lines":[{"line_number":1423,"context_line":"            floating_network_id\u003dnetwork_id, router_id\u003dNone, fixed_port_id\u003dNone)"},{"line_number":1424,"context_line":""},{"line_number":1425,"context_line":"        for fip in fip_objs:"},{"line_number":1426,"context_line":"            #if fip.router_id is None and fip.fixed_port_id is None:"},{"line_number":1427,"context_line":"            self.delete_floatingip(context, fip.id)"},{"line_number":1428,"context_line":""},{"line_number":1429,"context_line":"    @db_api.retry_if_session_inactive()"}],"source_content_type":"text/x-python","patch_set":36,"id":"3f4b6375_d7b18ae3","line":1426,"updated":"2017-10-19 08:28:44.000000000","message":"ditto to db/_model_query.py","commit_id":"60ac9512212d8ae257f3b37b91462d3913f2ae25"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"c0ed9e1e86703ad022f0c90dcc51d9b5e71127d4","unresolved":false,"context_lines":[{"line_number":1429,"context_line":"            floating_network_id\u003dnetwork_id, router_id\u003dNone, fixed_port_id\u003dNone)"},{"line_number":1430,"context_line":""},{"line_number":1431,"context_line":"        for fip in fip_objs:"},{"line_number":1432,"context_line":"            #if fip.router_id is None and fip.fixed_port_id is None:"},{"line_number":1433,"context_line":"            self.delete_floatingip(context, fip.id)"},{"line_number":1434,"context_line":""},{"line_number":1435,"context_line":"    @db_api.retry_if_session_inactive()"}],"source_content_type":"text/x-python","patch_set":37,"id":"3f4b6375_58c16de4","line":1432,"updated":"2017-10-27 18:26:33.000000000","message":"remove?","commit_id":"efb48961d042688c654c085bf0b9bf7385c0dd12"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"c0ed9e1e86703ad022f0c90dcc51d9b5e71127d4","unresolved":false,"context_lines":[{"line_number":1574,"context_line":"            return []"},{"line_number":1575,"context_line":""},{"line_number":1576,"context_line":"        return ["},{"line_number":1577,"context_line":"                self._make_floatingip_dict_with_scope(*scoped_fip)"},{"line_number":1578,"context_line":"                for scoped_fip in l3_obj.FloatingIP.get_scoped_floating_ips("},{"line_number":1579,"context_line":"                    context, router_ids)"},{"line_number":1580,"context_line":"        ]"}],"source_content_type":"text/x-python","patch_set":37,"id":"3f4b6375_d871dde0","line":1577,"updated":"2017-10-27 18:26:33.000000000","message":"(nit) usually we give it 4chars of indent when using this style, not 8chars.","commit_id":"efb48961d042688c654c085bf0b9bf7385c0dd12"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"7a71c1f734bae82fdfc9e909ff9c5e5c01e29b69","unresolved":false,"context_lines":[{"line_number":1036,"context_line":""},{"line_number":1037,"context_line":"    def _make_floatingip_dict(self, floatingip, fields\u003dNone,"},{"line_number":1038,"context_line":"                              process_extensions\u003dTrue):"},{"line_number":1039,"context_line":"        floating_ip_address \u003d str(floatingip.floating_ip_address) \\"},{"line_number":1040,"context_line":"            if floatingip.floating_ip_address else None"},{"line_number":1041,"context_line":"        fixed_ip_address \u003d str(floatingip.fixed_ip_address) \\"},{"line_number":1042,"context_line":"            if floatingip.fixed_ip_address else None"},{"line_number":1043,"context_line":"        res \u003d {\u0027id\u0027: floatingip.id,"}],"source_content_type":"text/x-python","patch_set":39,"id":"3f4b6375_476d5730","line":1040,"range":{"start_line":1039,"start_character":30,"end_line":1040,"end_character":55},"updated":"2017-11-05 05:45:58.000000000","message":"Why not enclose this expression in () and we can get rid of the \\","commit_id":"4c34d9471c23d6f5ac35426ffd64e30d5b103f89"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"f090e7c824fb3c31f305fce1106c4a5eb1c20cf5","unresolved":false,"context_lines":[{"line_number":1036,"context_line":""},{"line_number":1037,"context_line":"    def _make_floatingip_dict(self, floatingip, fields\u003dNone,"},{"line_number":1038,"context_line":"                              process_extensions\u003dTrue):"},{"line_number":1039,"context_line":"        floating_ip_address \u003d str(floatingip.floating_ip_address) \\"},{"line_number":1040,"context_line":"            if floatingip.floating_ip_address else None"},{"line_number":1041,"context_line":"        fixed_ip_address \u003d str(floatingip.fixed_ip_address) \\"},{"line_number":1042,"context_line":"            if floatingip.fixed_ip_address else None"},{"line_number":1043,"context_line":"        res \u003d {\u0027id\u0027: floatingip.id,"}],"source_content_type":"text/x-python","patch_set":39,"id":"1f485f77_e2271a12","line":1040,"range":{"start_line":1039,"start_character":30,"end_line":1040,"end_character":55},"in_reply_to":"3f4b6375_476d5730","updated":"2017-11-13 05:25:51.000000000","message":"Done","commit_id":"4c34d9471c23d6f5ac35426ffd64e30d5b103f89"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"7a71c1f734bae82fdfc9e909ff9c5e5c01e29b69","unresolved":false,"context_lines":[{"line_number":1038,"context_line":"                              process_extensions\u003dTrue):"},{"line_number":1039,"context_line":"        floating_ip_address \u003d str(floatingip.floating_ip_address) \\"},{"line_number":1040,"context_line":"            if floatingip.floating_ip_address else None"},{"line_number":1041,"context_line":"        fixed_ip_address \u003d str(floatingip.fixed_ip_address) \\"},{"line_number":1042,"context_line":"            if floatingip.fixed_ip_address else None"},{"line_number":1043,"context_line":"        res \u003d {\u0027id\u0027: floatingip.id,"},{"line_number":1044,"context_line":"               \u0027tenant_id\u0027: floatingip.project_id,"},{"line_number":1045,"context_line":"               \u0027floating_ip_address\u0027: floating_ip_address,"}],"source_content_type":"text/x-python","patch_set":39,"id":"3f4b6375_276a5b19","line":1042,"range":{"start_line":1041,"start_character":0,"end_line":1042,"end_character":52},"updated":"2017-11-05 05:45:58.000000000","message":"Ditto","commit_id":"4c34d9471c23d6f5ac35426ffd64e30d5b103f89"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"f090e7c824fb3c31f305fce1106c4a5eb1c20cf5","unresolved":false,"context_lines":[{"line_number":1038,"context_line":"                              process_extensions\u003dTrue):"},{"line_number":1039,"context_line":"        floating_ip_address \u003d str(floatingip.floating_ip_address) \\"},{"line_number":1040,"context_line":"            if floatingip.floating_ip_address else None"},{"line_number":1041,"context_line":"        fixed_ip_address \u003d str(floatingip.fixed_ip_address) \\"},{"line_number":1042,"context_line":"            if floatingip.fixed_ip_address else None"},{"line_number":1043,"context_line":"        res \u003d {\u0027id\u0027: floatingip.id,"},{"line_number":1044,"context_line":"               \u0027tenant_id\u0027: floatingip.project_id,"},{"line_number":1045,"context_line":"               \u0027floating_ip_address\u0027: floating_ip_address,"}],"source_content_type":"text/x-python","patch_set":39,"id":"1f485f77_6279eafa","line":1042,"range":{"start_line":1041,"start_character":0,"end_line":1042,"end_character":52},"in_reply_to":"3f4b6375_276a5b19","updated":"2017-11-13 05:25:51.000000000","message":"Done","commit_id":"4c34d9471c23d6f5ac35426ffd64e30d5b103f89"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"cf805b0c61a59992d585e816675e6c8cb2b0e924","unresolved":false,"context_lines":[{"line_number":1052,"context_line":"        # class inheriting from CommonDbMixin, which is true for all existing"},{"line_number":1053,"context_line":"        # plugins."},{"line_number":1054,"context_line":"        if process_extensions:"},{"line_number":1055,"context_line":"            resource_extend.apply_funcs(l3.FLOATINGIPS, res, floatingip.db_obj)"},{"line_number":1056,"context_line":"        return db_utils.resource_fields(res, fields)"},{"line_number":1057,"context_line":""},{"line_number":1058,"context_line":"    def _get_router_for_floatingip(self, context, internal_port,"}],"source_content_type":"text/x-python","patch_set":39,"id":"3f4b6375_1139cef0","line":1055,"updated":"2017-11-05 20:29:23.000000000","message":"maybe You should add some TODO note here to get rid of this \"db_obj\" when all code will be migrated to use floating ip OVO?","commit_id":"4c34d9471c23d6f5ac35426ffd64e30d5b103f89"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"f090e7c824fb3c31f305fce1106c4a5eb1c20cf5","unresolved":false,"context_lines":[{"line_number":1052,"context_line":"        # class inheriting from CommonDbMixin, which is true for all existing"},{"line_number":1053,"context_line":"        # plugins."},{"line_number":1054,"context_line":"        if process_extensions:"},{"line_number":1055,"context_line":"            resource_extend.apply_funcs(l3.FLOATINGIPS, res, floatingip.db_obj)"},{"line_number":1056,"context_line":"        return db_utils.resource_fields(res, fields)"},{"line_number":1057,"context_line":""},{"line_number":1058,"context_line":"    def _get_router_for_floatingip(self, context, internal_port,"}],"source_content_type":"text/x-python","patch_set":39,"id":"1f485f77_427eeee4","line":1055,"in_reply_to":"3f4b6375_1139cef0","updated":"2017-11-13 05:25:51.000000000","message":"Done","commit_id":"4c34d9471c23d6f5ac35426ffd64e30d5b103f89"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"7a71c1f734bae82fdfc9e909ff9c5e5c01e29b69","unresolved":false,"context_lines":[{"line_number":1196,"context_line":"                    fixed_port_id\u003dfip[\u0027port_id\u0027],"},{"line_number":1197,"context_line":"                    floating_network_id\u003dfloatingip_obj.floating_network_id,"},{"line_number":1198,"context_line":"                    fixed_ip_address\u003dnetaddr.IPAddress(internal_ip_address)):"},{"line_number":1199,"context_line":"                floating_ip_address \u003d str(floatingip_obj.floating_ip_address) \\"},{"line_number":1200,"context_line":"                    if floatingip_obj.floating_ip_address else None"},{"line_number":1201,"context_line":"                raise l3.FloatingIPPortAlreadyAssociated("},{"line_number":1202,"context_line":"                    port_id\u003dfip[\u0027port_id\u0027],"},{"line_number":1203,"context_line":"                    fip_id\u003dfloatingip_obj.id,"}],"source_content_type":"text/x-python","patch_set":39,"id":"3f4b6375_67473379","line":1200,"range":{"start_line":1199,"start_character":38,"end_line":1200,"end_character":67},"updated":"2017-11-05 05:45:58.000000000","message":"This expression can also be enclosed in () and we can get rid of the \\","commit_id":"4c34d9471c23d6f5ac35426ffd64e30d5b103f89"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"f090e7c824fb3c31f305fce1106c4a5eb1c20cf5","unresolved":false,"context_lines":[{"line_number":1196,"context_line":"                    fixed_port_id\u003dfip[\u0027port_id\u0027],"},{"line_number":1197,"context_line":"                    floating_network_id\u003dfloatingip_obj.floating_network_id,"},{"line_number":1198,"context_line":"                    fixed_ip_address\u003dnetaddr.IPAddress(internal_ip_address)):"},{"line_number":1199,"context_line":"                floating_ip_address \u003d str(floatingip_obj.floating_ip_address) \\"},{"line_number":1200,"context_line":"                    if floatingip_obj.floating_ip_address else None"},{"line_number":1201,"context_line":"                raise l3.FloatingIPPortAlreadyAssociated("},{"line_number":1202,"context_line":"                    port_id\u003dfip[\u0027port_id\u0027],"},{"line_number":1203,"context_line":"                    fip_id\u003dfloatingip_obj.id,"}],"source_content_type":"text/x-python","patch_set":39,"id":"1f485f77_42670e4f","line":1200,"range":{"start_line":1199,"start_character":38,"end_line":1200,"end_character":67},"in_reply_to":"3f4b6375_67473379","updated":"2017-11-13 05:25:51.000000000","message":"Done","commit_id":"4c34d9471c23d6f5ac35426ffd64e30d5b103f89"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"7a71c1f734bae82fdfc9e909ff9c5e5c01e29b69","unresolved":false,"context_lines":[{"line_number":1229,"context_line":"        floatingip_obj.last_known_router_id \u003d previous_router_id"},{"line_number":1230,"context_line":"        if \u0027description\u0027 in fip:"},{"line_number":1231,"context_line":"            floatingip_obj.description \u003d fip[\u0027description\u0027]"},{"line_number":1232,"context_line":"        floating_ip_address \u003d str(floatingip_obj.floating_ip_address) \\"},{"line_number":1233,"context_line":"            if floatingip_obj.floating_ip_address else None"},{"line_number":1234,"context_line":"        return {\u0027fixed_ip_address\u0027: internal_ip_address,"},{"line_number":1235,"context_line":"                \u0027fixed_port_id\u0027: port_id,"},{"line_number":1236,"context_line":"                \u0027router_id\u0027: router_id,"}],"source_content_type":"text/x-python","patch_set":39,"id":"3f4b6375_8a6c76d0","line":1233,"range":{"start_line":1232,"start_character":30,"end_line":1233,"end_character":59},"updated":"2017-11-05 05:45:58.000000000","message":"This expression can be enclosed in () and we can get rid of the \\. Just like it was done in L1224-1226 above","commit_id":"4c34d9471c23d6f5ac35426ffd64e30d5b103f89"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"f090e7c824fb3c31f305fce1106c4a5eb1c20cf5","unresolved":false,"context_lines":[{"line_number":1229,"context_line":"        floatingip_obj.last_known_router_id \u003d previous_router_id"},{"line_number":1230,"context_line":"        if \u0027description\u0027 in fip:"},{"line_number":1231,"context_line":"            floatingip_obj.description \u003d fip[\u0027description\u0027]"},{"line_number":1232,"context_line":"        floating_ip_address \u003d str(floatingip_obj.floating_ip_address) \\"},{"line_number":1233,"context_line":"            if floatingip_obj.floating_ip_address else None"},{"line_number":1234,"context_line":"        return {\u0027fixed_ip_address\u0027: internal_ip_address,"},{"line_number":1235,"context_line":"                \u0027fixed_port_id\u0027: port_id,"},{"line_number":1236,"context_line":"                \u0027router_id\u0027: router_id,"}],"source_content_type":"text/x-python","patch_set":39,"id":"1f485f77_02611637","line":1233,"range":{"start_line":1232,"start_character":30,"end_line":1233,"end_character":59},"in_reply_to":"3f4b6375_8a6c76d0","updated":"2017-11-13 05:25:51.000000000","message":"Done","commit_id":"4c34d9471c23d6f5ac35426ffd64e30d5b103f89"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"dfb2c879f7acd6738801c428fd9a021f5a11b86c","unresolved":false,"context_lines":[{"line_number":1298,"context_line":"            floatingip_obj \u003d l3_obj.FloatingIP("},{"line_number":1299,"context_line":"                context,"},{"line_number":1300,"context_line":"                id\u003dfip_id,"},{"line_number":1301,"context_line":"                project_id\u003dfip[\u0027tenant_id\u0027],"},{"line_number":1302,"context_line":"                status\u003dinitial_status,"},{"line_number":1303,"context_line":"                floating_network_id\u003dfip[\u0027floating_network_id\u0027],"},{"line_number":1304,"context_line":"                floating_ip_address\u003dfloating_ip_address,"}],"source_content_type":"text/x-python","patch_set":39,"id":"3f4b6375_edb7d685","line":1301,"range":{"start_line":1301,"start_character":0,"end_line":1301,"end_character":44},"updated":"2017-11-01 13:07:53.000000000","message":"the field should be match. project_id \u003c-\u003e project_id. tenant_id \u003c-\u003e tenant_id.","commit_id":"4c34d9471c23d6f5ac35426ffd64e30d5b103f89"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"fbe064d7b8be55240c825433dcae8bf0aa2c61c3","unresolved":false,"context_lines":[{"line_number":1298,"context_line":"            floatingip_obj \u003d l3_obj.FloatingIP("},{"line_number":1299,"context_line":"                context,"},{"line_number":1300,"context_line":"                id\u003dfip_id,"},{"line_number":1301,"context_line":"                project_id\u003dfip[\u0027tenant_id\u0027],"},{"line_number":1302,"context_line":"                status\u003dinitial_status,"},{"line_number":1303,"context_line":"                floating_network_id\u003dfip[\u0027floating_network_id\u0027],"},{"line_number":1304,"context_line":"                floating_ip_address\u003dfloating_ip_address,"}],"source_content_type":"text/x-python","patch_set":39,"id":"3f4b6375_37c08c2a","line":1301,"range":{"start_line":1301,"start_character":0,"end_line":1301,"end_character":44},"in_reply_to":"3f4b6375_edb7d685","updated":"2017-11-01 19:48:08.000000000","message":"No. It\u0027s project_id in the object, but tenant_id in api.","commit_id":"4c34d9471c23d6f5ac35426ffd64e30d5b103f89"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"cf805b0c61a59992d585e816675e6c8cb2b0e924","unresolved":false,"context_lines":[{"line_number":1444,"context_line":"            return False"},{"line_number":1445,"context_line":""},{"line_number":1446,"context_line":"    def _floating_ip_exists(self, context, floating_ip_id):"},{"line_number":1447,"context_line":"        return l3_obj.FloatingIP.objects_exist(context, id\u003dfloating_ip_id)"},{"line_number":1448,"context_line":""},{"line_number":1449,"context_line":"    def prevent_l3_port_deletion(self, context, port_id):"},{"line_number":1450,"context_line":"        \"\"\"Checks to make sure a port is allowed to be deleted."}],"source_content_type":"text/x-python","patch_set":39,"id":"3f4b6375_f13bd2e6","line":1447,"updated":"2017-11-05 20:29:23.000000000","message":"do You really need this private method? Maybe You could use l3_obj.FloatingIP.objects_exist() directly instead of _floating_ip_exists() in code?","commit_id":"4c34d9471c23d6f5ac35426ffd64e30d5b103f89"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"f090e7c824fb3c31f305fce1106c4a5eb1c20cf5","unresolved":false,"context_lines":[{"line_number":1444,"context_line":"            return False"},{"line_number":1445,"context_line":""},{"line_number":1446,"context_line":"    def _floating_ip_exists(self, context, floating_ip_id):"},{"line_number":1447,"context_line":"        return l3_obj.FloatingIP.objects_exist(context, id\u003dfloating_ip_id)"},{"line_number":1448,"context_line":""},{"line_number":1449,"context_line":"    def prevent_l3_port_deletion(self, context, port_id):"},{"line_number":1450,"context_line":"        \"\"\"Checks to make sure a port is allowed to be deleted."}],"source_content_type":"text/x-python","patch_set":39,"id":"1f485f77_42f5ce56","line":1447,"in_reply_to":"3f4b6375_f13bd2e6","updated":"2017-11-13 05:25:51.000000000","message":"I think normally we will keep the original method, not to break some codes in plugins. But I have checked this method is only called in db/l3_db.py. Thus I will made the change accordingly.","commit_id":"4c34d9471c23d6f5ac35426ffd64e30d5b103f89"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"dfb2c879f7acd6738801c428fd9a021f5a11b86c","unresolved":false,"context_lines":[{"line_number":1505,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":1506,"context_line":"            floating_ip_objs \u003d l3_obj.FloatingIP.get_objects("},{"line_number":1507,"context_line":"                context, fixed_port_id\u003dport_id)"},{"line_number":1508,"context_line":"            router_ids \u003d {fip.router_id for fip in floating_ip_objs}"},{"line_number":1509,"context_line":"            values \u003d {\u0027fixed_port_id\u0027: None,"},{"line_number":1510,"context_line":"                      \u0027fixed_ip_address\u0027: None,"},{"line_number":1511,"context_line":"                      \u0027router_id\u0027: None}"}],"source_content_type":"text/x-python","patch_set":39,"id":"3f4b6375_302e6143","line":1508,"range":{"start_line":1508,"start_character":0,"end_line":1508,"end_character":68},"updated":"2017-11-01 13:07:53.000000000","message":"Does it works? check \u0027{}\u0027, dict ? the previous is a Set type of router_ids.","commit_id":"4c34d9471c23d6f5ac35426ffd64e30d5b103f89"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"fbe064d7b8be55240c825433dcae8bf0aa2c61c3","unresolved":false,"context_lines":[{"line_number":1505,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":1506,"context_line":"            floating_ip_objs \u003d l3_obj.FloatingIP.get_objects("},{"line_number":1507,"context_line":"                context, fixed_port_id\u003dport_id)"},{"line_number":1508,"context_line":"            router_ids \u003d {fip.router_id for fip in floating_ip_objs}"},{"line_number":1509,"context_line":"            values \u003d {\u0027fixed_port_id\u0027: None,"},{"line_number":1510,"context_line":"                      \u0027fixed_ip_address\u0027: None,"},{"line_number":1511,"context_line":"                      \u0027router_id\u0027: None}"}],"source_content_type":"text/x-python","patch_set":39,"id":"3f4b6375_37d52ce6","line":1508,"range":{"start_line":1508,"start_character":0,"end_line":1508,"end_character":68},"in_reply_to":"3f4b6375_302e6143","updated":"2017-11-01 19:48:08.000000000","message":"this is a set comprehension","commit_id":"4c34d9471c23d6f5ac35426ffd64e30d5b103f89"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"cf805b0c61a59992d585e816675e6c8cb2b0e924","unresolved":false,"context_lines":[{"line_number":1515,"context_line":""},{"line_number":1516,"context_line":"    def _get_floatingips_by_port_id(self, context, port_id):"},{"line_number":1517,"context_line":"        \"\"\"Helper function to retrieve the fips associated with a port_id.\"\"\""},{"line_number":1518,"context_line":"        return l3_obj.FloatingIP.get_objects(context, fixed_port_id\u003dport_id)"},{"line_number":1519,"context_line":""},{"line_number":1520,"context_line":"    def _build_routers_list(self, context, routers, gw_ports):"},{"line_number":1521,"context_line":"        \"\"\"Subclasses can override this to add extra gateway info\"\"\""}],"source_content_type":"text/x-python","patch_set":39,"id":"3f4b6375_d12696ce","line":1518,"updated":"2017-11-05 20:29:23.000000000","message":"same here, do we really still need this private method?","commit_id":"4c34d9471c23d6f5ac35426ffd64e30d5b103f89"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"f090e7c824fb3c31f305fce1106c4a5eb1c20cf5","unresolved":false,"context_lines":[{"line_number":1515,"context_line":""},{"line_number":1516,"context_line":"    def _get_floatingips_by_port_id(self, context, port_id):"},{"line_number":1517,"context_line":"        \"\"\"Helper function to retrieve the fips associated with a port_id.\"\"\""},{"line_number":1518,"context_line":"        return l3_obj.FloatingIP.get_objects(context, fixed_port_id\u003dport_id)"},{"line_number":1519,"context_line":""},{"line_number":1520,"context_line":"    def _build_routers_list(self, context, routers, gw_ports):"},{"line_number":1521,"context_line":"        \"\"\"Subclasses can override this to add extra gateway info\"\"\""}],"source_content_type":"text/x-python","patch_set":39,"id":"1f485f77_a2fda23b","line":1518,"in_reply_to":"3f4b6375_d12696ce","updated":"2017-11-13 05:25:51.000000000","message":"I am concerning if I can call the private method directly. I am seeing dragonflow calling _get_floatingips_by_port_id(). Check http://codesearch.openstack.org/?q\u003d_get_floatingips_by_port_id\u0026i\u003dnope\u0026files\u003d\u0026repos\u003d","commit_id":"4c34d9471c23d6f5ac35426ffd64e30d5b103f89"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"51b9475c014a9f2afb4dbc45aa4a7362d108115f","unresolved":false,"context_lines":[{"line_number":147,"context_line":"                              port_id)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def _fix_or_kill_floating_port(self, context, port_id):"},{"line_number":150,"context_line":"        pager \u003d base_obj.Pager(limit\u003d1)"},{"line_number":151,"context_line":"        fips \u003d l3_obj.FloatingIP.get_objects("},{"line_number":152,"context_line":"            context, _pager\u003dpager, floating_port_id\u003dport_id)"},{"line_number":153,"context_line":"        if fips:"}],"source_content_type":"text/x-python","patch_set":43,"id":"1f485f77_4f294988","line":150,"updated":"2017-11-14 14:29:13.000000000","message":"do You really need this \"pager\" object here? Can\u0027t You just call \"get_object()\" method or call get_objects() and get only first element from returned list?","commit_id":"2f8bcce24bb82812af939b9d06861000039b1a84"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"1b46a4ddc4a667ad1b4efa914c2717decde446df","unresolved":false,"context_lines":[{"line_number":147,"context_line":"                              port_id)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def _fix_or_kill_floating_port(self, context, port_id):"},{"line_number":150,"context_line":"        pager \u003d base_obj.Pager(limit\u003d1)"},{"line_number":151,"context_line":"        fips \u003d l3_obj.FloatingIP.get_objects("},{"line_number":152,"context_line":"            context, _pager\u003dpager, floating_port_id\u003dport_id)"},{"line_number":153,"context_line":"        if fips:"}],"source_content_type":"text/x-python","patch_set":43,"id":"1f485f77_615acc4f","line":150,"in_reply_to":"1f485f77_4f294988","updated":"2017-11-15 02:27:23.000000000","message":"Yes, because calling \"get_object()\" requires passing primary key (\"id\" in floatingip\u0027s case), but here we are passing \"floating_port_id\", which is not primary key. \n\nAlso calling get_objects() to get all objects and then getting only the first element from returned list was the original proposal. Ihar suggested to use pager and as I understand this eases the requests on db\u0027s side, since we do not need to finish querying all results but only the first one. Thus I adopted this way.","commit_id":"2f8bcce24bb82812af939b9d06861000039b1a84"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"51b9475c014a9f2afb4dbc45aa4a7362d108115f","unresolved":false,"context_lines":[{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def _fix_or_kill_floating_port(self, context, port_id):"},{"line_number":150,"context_line":"        pager \u003d base_obj.Pager(limit\u003d1)"},{"line_number":151,"context_line":"        fips \u003d l3_obj.FloatingIP.get_objects("},{"line_number":152,"context_line":"            context, _pager\u003dpager, floating_port_id\u003dport_id)"},{"line_number":153,"context_line":"        if fips:"},{"line_number":154,"context_line":"            LOG.warning(\"Found incorrect device_id on floating port \""}],"source_content_type":"text/x-python","patch_set":43,"id":"1f485f77_2f2ccd97","line":151,"updated":"2017-11-14 14:29:13.000000000","message":"nit: it is more \"fip\" rahter than \"fips\" if You are always ask only for first element","commit_id":"2f8bcce24bb82812af939b9d06861000039b1a84"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"1b46a4ddc4a667ad1b4efa914c2717decde446df","unresolved":false,"context_lines":[{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def _fix_or_kill_floating_port(self, context, port_id):"},{"line_number":150,"context_line":"        pager \u003d base_obj.Pager(limit\u003d1)"},{"line_number":151,"context_line":"        fips \u003d l3_obj.FloatingIP.get_objects("},{"line_number":152,"context_line":"            context, _pager\u003dpager, floating_port_id\u003dport_id)"},{"line_number":153,"context_line":"        if fips:"},{"line_number":154,"context_line":"            LOG.warning(\"Found incorrect device_id on floating port \""}],"source_content_type":"text/x-python","patch_set":43,"id":"1f485f77_412a3090","line":151,"in_reply_to":"1f485f77_2f2ccd97","updated":"2017-11-15 02:27:23.000000000","message":"As you see, what get_objects() returns is a list (although it only contains one element), I feel it is more appropriate to use the plural form.","commit_id":"2f8bcce24bb82812af939b9d06861000039b1a84"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"51b9475c014a9f2afb4dbc45aa4a7362d108115f","unresolved":false,"context_lines":[{"line_number":913,"context_line":"            if len(e.errors) \u003d\u003d 1:"},{"line_number":914,"context_line":"                raise e.errors[0].error"},{"line_number":915,"context_line":"            raise l3.RouterInUse(router_id\u003drouter_id, reason\u003de)"},{"line_number":916,"context_line":"        fip_objs \u003d l3_obj.FloatingIP.get_objects(context, router_id\u003drouter_id)"},{"line_number":917,"context_line":"        for fip_obj in fip_objs:"},{"line_number":918,"context_line":"            if fip_obj.fixed_ip_address in subnet_cidr:"},{"line_number":919,"context_line":"                raise l3.RouterInterfaceInUseByFloatingIP("}],"source_content_type":"text/x-python","patch_set":43,"id":"1f485f77_0f2351aa","line":916,"updated":"2017-11-14 14:29:13.000000000","message":"nit: in L151 You are using \"fips\" as name so why here You are adding \"objs\" suffix?","commit_id":"2f8bcce24bb82812af939b9d06861000039b1a84"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"1b46a4ddc4a667ad1b4efa914c2717decde446df","unresolved":false,"context_lines":[{"line_number":913,"context_line":"            if len(e.errors) \u003d\u003d 1:"},{"line_number":914,"context_line":"                raise e.errors[0].error"},{"line_number":915,"context_line":"            raise l3.RouterInUse(router_id\u003drouter_id, reason\u003de)"},{"line_number":916,"context_line":"        fip_objs \u003d l3_obj.FloatingIP.get_objects(context, router_id\u003drouter_id)"},{"line_number":917,"context_line":"        for fip_obj in fip_objs:"},{"line_number":918,"context_line":"            if fip_obj.fixed_ip_address in subnet_cidr:"},{"line_number":919,"context_line":"                raise l3.RouterInterfaceInUseByFloatingIP("}],"source_content_type":"text/x-python","patch_set":43,"id":"1f485f77_840ef62f","line":916,"in_reply_to":"1f485f77_0f2351aa","updated":"2017-11-15 02:27:23.000000000","message":"Because I want to keep the most of what the original codes look like. If the original code uses \"floatingip/fip/fip_db\", I keep it but only change the suffix from \"db\" to \"obj\".","commit_id":"2f8bcce24bb82812af939b9d06861000039b1a84"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"1d38a94a52212ef86c462b8a1909a5a2b12e30bd","unresolved":false,"context_lines":[{"line_number":913,"context_line":"            if len(e.errors) \u003d\u003d 1:"},{"line_number":914,"context_line":"                raise e.errors[0].error"},{"line_number":915,"context_line":"            raise l3.RouterInUse(router_id\u003drouter_id, reason\u003de)"},{"line_number":916,"context_line":"        fip_objs \u003d l3_obj.FloatingIP.get_objects(context, router_id\u003drouter_id)"},{"line_number":917,"context_line":"        for fip_obj in fip_objs:"},{"line_number":918,"context_line":"            if fip_obj.fixed_ip_address in subnet_cidr:"},{"line_number":919,"context_line":"                raise l3.RouterInterfaceInUseByFloatingIP("}],"source_content_type":"text/x-python","patch_set":43,"id":"1f485f77_a174f2cf","line":916,"in_reply_to":"1f485f77_840ef62f","updated":"2017-11-17 09:54:36.000000000","message":"ok, that makes sense for me","commit_id":"2f8bcce24bb82812af939b9d06861000039b1a84"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"51b9475c014a9f2afb4dbc45aa4a7362d108115f","unresolved":false,"context_lines":[{"line_number":1029,"context_line":"                                                    subnets])"},{"line_number":1030,"context_line":""},{"line_number":1031,"context_line":"    def _get_floatingip(self, context, id):"},{"line_number":1032,"context_line":"        floatingip \u003d l3_obj.FloatingIP.get_object(context, id\u003did)"},{"line_number":1033,"context_line":"        if not floatingip:"},{"line_number":1034,"context_line":"            raise l3.FloatingIPNotFound(floatingip_id\u003did)"},{"line_number":1035,"context_line":"        return floatingip"}],"source_content_type":"text/x-python","patch_set":43,"id":"1f485f77_ef2595ac","line":1032,"updated":"2017-11-14 14:29:13.000000000","message":"nit: here again You are using different name of variable. I know that it will work properly but maybe You could use same/similar names in different methods? What You think about it?","commit_id":"2f8bcce24bb82812af939b9d06861000039b1a84"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"1d38a94a52212ef86c462b8a1909a5a2b12e30bd","unresolved":false,"context_lines":[{"line_number":1029,"context_line":"                                                    subnets])"},{"line_number":1030,"context_line":""},{"line_number":1031,"context_line":"    def _get_floatingip(self, context, id):"},{"line_number":1032,"context_line":"        floatingip \u003d l3_obj.FloatingIP.get_object(context, id\u003did)"},{"line_number":1033,"context_line":"        if not floatingip:"},{"line_number":1034,"context_line":"            raise l3.FloatingIPNotFound(floatingip_id\u003did)"},{"line_number":1035,"context_line":"        return floatingip"}],"source_content_type":"text/x-python","patch_set":43,"id":"1f485f77_617a7aba","line":1032,"in_reply_to":"1f485f77_e4224aa4","updated":"2017-11-17 09:54:36.000000000","message":"ok","commit_id":"2f8bcce24bb82812af939b9d06861000039b1a84"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"1b46a4ddc4a667ad1b4efa914c2717decde446df","unresolved":false,"context_lines":[{"line_number":1029,"context_line":"                                                    subnets])"},{"line_number":1030,"context_line":""},{"line_number":1031,"context_line":"    def _get_floatingip(self, context, id):"},{"line_number":1032,"context_line":"        floatingip \u003d l3_obj.FloatingIP.get_object(context, id\u003did)"},{"line_number":1033,"context_line":"        if not floatingip:"},{"line_number":1034,"context_line":"            raise l3.FloatingIPNotFound(floatingip_id\u003did)"},{"line_number":1035,"context_line":"        return floatingip"}],"source_content_type":"text/x-python","patch_set":43,"id":"1f485f77_e4224aa4","line":1032,"in_reply_to":"1f485f77_ef2595ac","updated":"2017-11-15 02:27:23.000000000","message":"As I replied in previous comment, normally I try to make the least changes to original codes.","commit_id":"2f8bcce24bb82812af939b9d06861000039b1a84"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"51b9475c014a9f2afb4dbc45aa4a7362d108115f","unresolved":false,"context_lines":[{"line_number":1318,"context_line":"                    context, floatingip_dict, fip)"},{"line_number":1319,"context_line":"            floatingip_obj \u003d l3_obj.FloatingIP.get_object("},{"line_number":1320,"context_line":"                context, id\u003dfloatingip_obj.id)"},{"line_number":1321,"context_line":"            floatingip_db \u003d floatingip_obj.db_obj"},{"line_number":1322,"context_line":""},{"line_number":1323,"context_line":"        self._core_plugin.update_port(context.elevated(), external_port[\u0027id\u0027],"},{"line_number":1324,"context_line":"                                      {\u0027port\u0027: {\u0027device_id\u0027: fip_id}})"}],"source_content_type":"text/x-python","patch_set":43,"id":"1f485f77_cf3c19ca","line":1321,"updated":"2017-11-14 14:29:13.000000000","message":"why You need this additional variable?","commit_id":"2f8bcce24bb82812af939b9d06861000039b1a84"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"1d38a94a52212ef86c462b8a1909a5a2b12e30bd","unresolved":false,"context_lines":[{"line_number":1318,"context_line":"                    context, floatingip_dict, fip)"},{"line_number":1319,"context_line":"            floatingip_obj \u003d l3_obj.FloatingIP.get_object("},{"line_number":1320,"context_line":"                context, id\u003dfloatingip_obj.id)"},{"line_number":1321,"context_line":"            floatingip_db \u003d floatingip_obj.db_obj"},{"line_number":1322,"context_line":""},{"line_number":1323,"context_line":"        self._core_plugin.update_port(context.elevated(), external_port[\u0027id\u0027],"},{"line_number":1324,"context_line":"                                      {\u0027port\u0027: {\u0027device_id\u0027: fip_id}})"}],"source_content_type":"text/x-python","patch_set":43,"id":"1f485f77_414f7e92","line":1321,"in_reply_to":"1f485f77_4446be51","updated":"2017-11-17 09:54:36.000000000","message":"ok","commit_id":"2f8bcce24bb82812af939b9d06861000039b1a84"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"1b46a4ddc4a667ad1b4efa914c2717decde446df","unresolved":false,"context_lines":[{"line_number":1318,"context_line":"                    context, floatingip_dict, fip)"},{"line_number":1319,"context_line":"            floatingip_obj \u003d l3_obj.FloatingIP.get_object("},{"line_number":1320,"context_line":"                context, id\u003dfloatingip_obj.id)"},{"line_number":1321,"context_line":"            floatingip_db \u003d floatingip_obj.db_obj"},{"line_number":1322,"context_line":""},{"line_number":1323,"context_line":"        self._core_plugin.update_port(context.elevated(), external_port[\u0027id\u0027],"},{"line_number":1324,"context_line":"                                      {\u0027port\u0027: {\u0027device_id\u0027: fip_id}})"}],"source_content_type":"text/x-python","patch_set":43,"id":"1f485f77_4446be51","line":1321,"in_reply_to":"1f485f77_cf3c19ca","updated":"2017-11-15 02:27:23.000000000","message":"This is because I need to pass \"floatingip_db\" in Line 1335. \nAnd some codes between Line 1314 and 1318 may have made changes to floatingip_obj, thus I need to query the latest OVO object first, and then get the db object from it.","commit_id":"2f8bcce24bb82812af939b9d06861000039b1a84"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"51b9475c014a9f2afb4dbc45aa4a7362d108115f","unresolved":false,"context_lines":[{"line_number":1517,"context_line":""},{"line_number":1518,"context_line":"    def _get_floatingips_by_port_id(self, context, port_id):"},{"line_number":1519,"context_line":"        \"\"\"Helper function to retrieve the fips associated with a port_id.\"\"\""},{"line_number":1520,"context_line":"        return l3_obj.FloatingIP.get_objects(context, fixed_port_id\u003dport_id)"},{"line_number":1521,"context_line":""},{"line_number":1522,"context_line":"    def _build_routers_list(self, context, routers, gw_ports):"},{"line_number":1523,"context_line":"        \"\"\"Subclasses can override this to add extra gateway info\"\"\""}],"source_content_type":"text/x-python","patch_set":43,"id":"1f485f77_af379de3","line":1520,"updated":"2017-11-14 14:29:13.000000000","message":"do You really still need this private method? Can\u0027t You just use l3_obj.FloatingIP.get_objects() in places where now _get_floatingips_by_port_id() is called?","commit_id":"2f8bcce24bb82812af939b9d06861000039b1a84"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"5b6472dcc1dbaba8fae84d5a346d355a2852cb07","unresolved":false,"context_lines":[{"line_number":1517,"context_line":""},{"line_number":1518,"context_line":"    def _get_floatingips_by_port_id(self, context, port_id):"},{"line_number":1519,"context_line":"        \"\"\"Helper function to retrieve the fips associated with a port_id.\"\"\""},{"line_number":1520,"context_line":"        return l3_obj.FloatingIP.get_objects(context, fixed_port_id\u003dport_id)"},{"line_number":1521,"context_line":""},{"line_number":1522,"context_line":"    def _build_routers_list(self, context, routers, gw_ports):"},{"line_number":1523,"context_line":"        \"\"\"Subclasses can override this to add extra gateway info\"\"\""}],"source_content_type":"text/x-python","patch_set":43,"id":"1f485f77_73683186","line":1520,"in_reply_to":"1f485f77_448d9e79","updated":"2017-11-16 10:05:40.000000000","message":"Ah, I made a mistake in the previous reply. I do not think I can use the private method directly here. I am seeing dragonflow calling _get_floatingips_by_port_id(). Check http://codesearch.openstack.org/?q\u003d_get_floatingips_by_port_id\u0026i\u003dnope\u0026files\u003d\u0026repos\u003d","commit_id":"2f8bcce24bb82812af939b9d06861000039b1a84"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"1d38a94a52212ef86c462b8a1909a5a2b12e30bd","unresolved":false,"context_lines":[{"line_number":1517,"context_line":""},{"line_number":1518,"context_line":"    def _get_floatingips_by_port_id(self, context, port_id):"},{"line_number":1519,"context_line":"        \"\"\"Helper function to retrieve the fips associated with a port_id.\"\"\""},{"line_number":1520,"context_line":"        return l3_obj.FloatingIP.get_objects(context, fixed_port_id\u003dport_id)"},{"line_number":1521,"context_line":""},{"line_number":1522,"context_line":"    def _build_routers_list(self, context, routers, gw_ports):"},{"line_number":1523,"context_line":"        \"\"\"Subclasses can override this to add extra gateway info\"\"\""}],"source_content_type":"text/x-python","patch_set":43,"id":"1f485f77_61a5da46","line":1520,"in_reply_to":"1f485f77_73683186","updated":"2017-11-17 09:54:36.000000000","message":"Ok, but maybe You can mark this method as deprecated to be removed in future?\nIt\u0027s not big deal for me and it can stay like that, I just feel that it\u0027s not really necessary :)","commit_id":"2f8bcce24bb82812af939b9d06861000039b1a84"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"1b46a4ddc4a667ad1b4efa914c2717decde446df","unresolved":false,"context_lines":[{"line_number":1517,"context_line":""},{"line_number":1518,"context_line":"    def _get_floatingips_by_port_id(self, context, port_id):"},{"line_number":1519,"context_line":"        \"\"\"Helper function to retrieve the fips associated with a port_id.\"\"\""},{"line_number":1520,"context_line":"        return l3_obj.FloatingIP.get_objects(context, fixed_port_id\u003dport_id)"},{"line_number":1521,"context_line":""},{"line_number":1522,"context_line":"    def _build_routers_list(self, context, routers, gw_ports):"},{"line_number":1523,"context_line":"        \"\"\"Subclasses can override this to add extra gateway info\"\"\""}],"source_content_type":"text/x-python","patch_set":43,"id":"1f485f77_448d9e79","line":1520,"in_reply_to":"1f485f77_af379de3","updated":"2017-11-15 02:27:23.000000000","message":"I tried in previous patches and I will adopt this suggestion eventually. It is a change in line 210 in tests/unit/db/test_l3_db.py breaks other UTs that I am working on it now, so I reverted this change to double check it is the root cause of those failures.","commit_id":"2f8bcce24bb82812af939b9d06861000039b1a84"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"2177a31b8e47ce997d99a6fafcc8dde1572723ea","unresolved":false,"context_lines":[{"line_number":1036,"context_line":""},{"line_number":1037,"context_line":"    def _make_floatingip_dict(self, floatingip, fields\u003dNone,"},{"line_number":1038,"context_line":"                              process_extensions\u003dTrue):"},{"line_number":1039,"context_line":"        floating_ip_address \u003d (str(floatingip.floating_ip_address)"},{"line_number":1040,"context_line":"            if floatingip.floating_ip_address else None)"},{"line_number":1041,"context_line":"        fixed_ip_address \u003d (str(floatingip.fixed_ip_address)"},{"line_number":1042,"context_line":"            if floatingip.fixed_ip_address else None)"}],"source_content_type":"text/x-python","patch_set":44,"id":"ff82abbf_83bd2ab8","line":1039,"updated":"2017-11-29 22:41:27.000000000","message":"stylistically, I prefer:\n\n... \u003d (\n    ...\n    if ...\n    else ...)\n\nbut that\u0027s just me","commit_id":"69ab159774745b9a339bf2ececf7241036bb38c3"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"0f958e238aea382b7c78c19d451b28729d419160","unresolved":false,"context_lines":[{"line_number":1181,"context_line":"        \"\"\""},{"line_number":1182,"context_line":"        (internal_port, internal_subnet_id,"},{"line_number":1183,"context_line":"         internal_ip_address) \u003d self._internal_fip_assoc_data("},{"line_number":1184,"context_line":"            context, fip, floatingip_obj.tenant_id)"},{"line_number":1185,"context_line":"        router_id \u003d self._get_router_for_floatingip("},{"line_number":1186,"context_line":"            context, internal_port,"},{"line_number":1187,"context_line":"            internal_subnet_id, floatingip_obj.floating_network_id)"}],"source_content_type":"text/x-python","patch_set":46,"id":"ff82abbf_68c5570a","line":1184,"updated":"2017-11-30 12:05:00.000000000","message":"nit: I think that in new code we should use \"project_id\" instead of \"tenant_id\" even if object has got both fields and both are the same\nBut please don\u0027t resin only because of that :)","commit_id":"f2965406699fb9fdb8d6f73c74c19089df1f30f8"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"c072b69edbd3a8f74dfb55b140b3741f7f4a7ace","unresolved":false,"context_lines":[{"line_number":1181,"context_line":"        \"\"\""},{"line_number":1182,"context_line":"        (internal_port, internal_subnet_id,"},{"line_number":1183,"context_line":"         internal_ip_address) \u003d self._internal_fip_assoc_data("},{"line_number":1184,"context_line":"            context, fip, floatingip_obj.tenant_id)"},{"line_number":1185,"context_line":"        router_id \u003d self._get_router_for_floatingip("},{"line_number":1186,"context_line":"            context, internal_port,"},{"line_number":1187,"context_line":"            internal_subnet_id, floatingip_obj.floating_network_id)"}],"source_content_type":"text/x-python","patch_set":46,"id":"ff82abbf_e1bba7c1","line":1184,"in_reply_to":"ff82abbf_68c5570a","updated":"2017-12-01 06:37:45.000000000","message":"I think this is a good point! I will respin. ;)","commit_id":"f2965406699fb9fdb8d6f73c74c19089df1f30f8"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"0f958e238aea382b7c78c19d451b28729d419160","unresolved":false,"context_lines":[{"line_number":1207,"context_line":"                    context,"},{"line_number":1208,"context_line":"                    fixed_port_id\u003dfip[\u0027port_id\u0027],"},{"line_number":1209,"context_line":"                    floating_network_id\u003dfloatingip_obj.floating_network_id,"},{"line_number":1210,"context_line":"                    fixed_ip_address\u003dnetaddr.IPAddress(internal_ip_address)):"},{"line_number":1211,"context_line":"                floating_ip_address \u003d (str(floatingip_obj.floating_ip_address)"},{"line_number":1212,"context_line":"                    if floatingip_obj.floating_ip_address else None)"},{"line_number":1213,"context_line":"                raise l3.FloatingIPPortAlreadyAssociated("}],"source_content_type":"text/x-python","patch_set":46,"id":"ff82abbf_289d0f0a","line":1210,"updated":"2017-11-30 12:05:00.000000000","message":"for me more readable would be if additional variable would be used, like:\n\nfip_exists \u003d l3_obj.FloatingIP.objects_exists(...)\nif fip_exists:\n    raise l3.FloatingIPPortAlreadyAssociated()\n\nbut it\u0027s only my opinion","commit_id":"f2965406699fb9fdb8d6f73c74c19089df1f30f8"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"c072b69edbd3a8f74dfb55b140b3741f7f4a7ace","unresolved":false,"context_lines":[{"line_number":1207,"context_line":"                    context,"},{"line_number":1208,"context_line":"                    fixed_port_id\u003dfip[\u0027port_id\u0027],"},{"line_number":1209,"context_line":"                    floating_network_id\u003dfloatingip_obj.floating_network_id,"},{"line_number":1210,"context_line":"                    fixed_ip_address\u003dnetaddr.IPAddress(internal_ip_address)):"},{"line_number":1211,"context_line":"                floating_ip_address \u003d (str(floatingip_obj.floating_ip_address)"},{"line_number":1212,"context_line":"                    if floatingip_obj.floating_ip_address else None)"},{"line_number":1213,"context_line":"                raise l3.FloatingIPPortAlreadyAssociated("}],"source_content_type":"text/x-python","patch_set":46,"id":"ff82abbf_01c80b72","line":1210,"in_reply_to":"ff82abbf_289d0f0a","updated":"2017-12-01 06:37:45.000000000","message":"I prefer yours too. Will respin.","commit_id":"f2965406699fb9fdb8d6f73c74c19089df1f30f8"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"0f958e238aea382b7c78c19d451b28729d419160","unresolved":false,"context_lines":[{"line_number":1365,"context_line":"            floatingip_dict \u003d self._make_floatingip_dict(floatingip_obj)"},{"line_number":1366,"context_line":"            if self._is_dns_integration_supported:"},{"line_number":1367,"context_line":"                dns_data \u003d self._process_dns_floatingip_update_precommit("},{"line_number":1368,"context_line":"                    context, floatingip_dict)"},{"line_number":1369,"context_line":"            if self._is_fip_qos_supported:"},{"line_number":1370,"context_line":"                self._process_extra_fip_qos_update(context,"},{"line_number":1371,"context_line":"                                                   floatingip_obj,"}],"source_content_type":"text/x-python","patch_set":46,"id":"ff82abbf_2b5509fb","line":1368,"range":{"start_line":1368,"start_character":29,"end_line":1368,"end_character":44},"updated":"2017-11-30 12:05:00.000000000","message":"shouldn\u0027t You add some TODO note to change here to pass object if all other things will be migrated?","commit_id":"f2965406699fb9fdb8d6f73c74c19089df1f30f8"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"c072b69edbd3a8f74dfb55b140b3741f7f4a7ace","unresolved":false,"context_lines":[{"line_number":1365,"context_line":"            floatingip_dict \u003d self._make_floatingip_dict(floatingip_obj)"},{"line_number":1366,"context_line":"            if self._is_dns_integration_supported:"},{"line_number":1367,"context_line":"                dns_data \u003d self._process_dns_floatingip_update_precommit("},{"line_number":1368,"context_line":"                    context, floatingip_dict)"},{"line_number":1369,"context_line":"            if self._is_fip_qos_supported:"},{"line_number":1370,"context_line":"                self._process_extra_fip_qos_update(context,"},{"line_number":1371,"context_line":"                                                   floatingip_obj,"}],"source_content_type":"text/x-python","patch_set":46,"id":"ff82abbf_46a14995","line":1368,"range":{"start_line":1368,"start_character":29,"end_line":1368,"end_character":44},"in_reply_to":"ff82abbf_2b5509fb","updated":"2017-12-01 06:37:45.000000000","message":"I am not sure I get what you mean here. We are passing floatingip_dict here instead of SQLA object. The migration from SQLA to OVO object should not affect it.","commit_id":"f2965406699fb9fdb8d6f73c74c19089df1f30f8"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"b6cc5a6141dbfe135d2b62d5a545e8946c946056","unresolved":false,"context_lines":[{"line_number":1365,"context_line":"            floatingip_dict \u003d self._make_floatingip_dict(floatingip_obj)"},{"line_number":1366,"context_line":"            if self._is_dns_integration_supported:"},{"line_number":1367,"context_line":"                dns_data \u003d self._process_dns_floatingip_update_precommit("},{"line_number":1368,"context_line":"                    context, floatingip_dict)"},{"line_number":1369,"context_line":"            if self._is_fip_qos_supported:"},{"line_number":1370,"context_line":"                self._process_extra_fip_qos_update(context,"},{"line_number":1371,"context_line":"                                                   floatingip_obj,"}],"source_content_type":"text/x-python","patch_set":46,"id":"ff82abbf_7ee5f509","line":1368,"range":{"start_line":1368,"start_character":29,"end_line":1368,"end_character":44},"in_reply_to":"ff82abbf_46a14995","updated":"2017-12-01 08:10:43.000000000","message":"sorry, my mistake. It\u0027s fine here","commit_id":"f2965406699fb9fdb8d6f73c74c19089df1f30f8"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"0f958e238aea382b7c78c19d451b28729d419160","unresolved":false,"context_lines":[{"line_number":1381,"context_line":"                                                           floatingip_dict,"},{"line_number":1382,"context_line":"                                                           dns_data)"},{"line_number":1383,"context_line":"        resource_extend.apply_funcs(l3.FLOATINGIPS, floatingip_dict,"},{"line_number":1384,"context_line":"                                    floatingip_obj.db_obj)"},{"line_number":1385,"context_line":"        return old_floatingip, floatingip_dict"},{"line_number":1386,"context_line":""},{"line_number":1387,"context_line":"    def _floatingips_to_router_ids(self, floatingips):"}],"source_content_type":"text/x-python","patch_set":46,"id":"ff82abbf_cb4fbd32","line":1384,"updated":"2017-11-30 12:05:00.000000000","message":"maybe some TODO note like in L1064 would be useful here?","commit_id":"f2965406699fb9fdb8d6f73c74c19089df1f30f8"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"c072b69edbd3a8f74dfb55b140b3741f7f4a7ace","unresolved":false,"context_lines":[{"line_number":1381,"context_line":"                                                           floatingip_dict,"},{"line_number":1382,"context_line":"                                                           dns_data)"},{"line_number":1383,"context_line":"        resource_extend.apply_funcs(l3.FLOATINGIPS, floatingip_dict,"},{"line_number":1384,"context_line":"                                    floatingip_obj.db_obj)"},{"line_number":1385,"context_line":"        return old_floatingip, floatingip_dict"},{"line_number":1386,"context_line":""},{"line_number":1387,"context_line":"    def _floatingips_to_router_ids(self, floatingips):"}],"source_content_type":"text/x-python","patch_set":46,"id":"ff82abbf_26a8c575","line":1384,"in_reply_to":"ff82abbf_cb4fbd32","updated":"2017-12-01 06:37:45.000000000","message":"I will respin and add it.","commit_id":"f2965406699fb9fdb8d6f73c74c19089df1f30f8"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"9cfaf34a3a842453487053c5213a1792fa5558f0","unresolved":false,"context_lines":[{"line_number":1208,"context_line":"                    fixed_port_id\u003dfip[\u0027port_id\u0027],"},{"line_number":1209,"context_line":"                    floating_network_id\u003dfloatingip_obj.floating_network_id,"},{"line_number":1210,"context_line":"                    fixed_ip_address\u003dnetaddr.IPAddress(internal_ip_address))"},{"line_number":1211,"context_line":"            if fip_exists:"},{"line_number":1212,"context_line":"                floating_ip_address \u003d (str(floatingip_obj.floating_ip_address)"},{"line_number":1213,"context_line":"                    if floatingip_obj.floating_ip_address else None)"},{"line_number":1214,"context_line":"                raise l3.FloatingIPPortAlreadyAssociated("}],"source_content_type":"text/x-python","patch_set":50,"id":"df87a7cf_062545c2","line":1211,"updated":"2017-12-05 21:18:23.000000000","message":"Nice!","commit_id":"9566810b38156d36e87489953114c52f4af622e2"}],"neutron/db/l3_dvr_db.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"9b7d383a3d4c0f6a9cf571f143da237a630aef51","unresolved":false,"context_lines":[{"line_number":304,"context_line":"        \"\"\"Helper function to retrieve the fip associated with port.\"\"\""},{"line_number":305,"context_line":"        floating_ip \u003d l3_objs.FloatingIP.get_objects("},{"line_number":306,"context_line":"            context, fixed_port_id\u003dport_id)"},{"line_number":307,"context_line":"        return floating_ip[0] if floating_ip else floating_ip"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":310,"context_line":"    def _add_csnat_on_interface_create(self, resource, event, trigger,"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a461143_4b303a9f","line":307,"range":{"start_line":307,"start_character":50,"end_line":307,"end_character":61},"updated":"2017-02-02 12:27:20.000000000","message":"Can we do else None here?\nIt is easier to read","commit_id":"3e679f2d9c4b5514b65ea13dcbcaded4d6685b76"},{"author":{"_account_id":22774,"name":"Shashank Kumar Shankar","email":"shashank.kumar.shankar@intel.com","username":"skshankar"},"change_message_id":"c61ab3d4b7bd69a207292a666567112f20700d54","unresolved":false,"context_lines":[{"line_number":304,"context_line":"        \"\"\"Helper function to retrieve the fip associated with port.\"\"\""},{"line_number":305,"context_line":"        floating_ip \u003d l3_objs.FloatingIP.get_objects("},{"line_number":306,"context_line":"            context, fixed_port_id\u003dport_id)"},{"line_number":307,"context_line":"        return floating_ip[0] if floating_ip else floating_ip"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":310,"context_line":"    def _add_csnat_on_interface_create(self, resource, event, trigger,"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a430d35_7b406657","line":307,"range":{"start_line":307,"start_character":50,"end_line":307,"end_character":61},"in_reply_to":"3a461143_4b303a9f","updated":"2017-02-03 20:38:06.000000000","message":"Oops. Missed this. Will update in the upcoming PS.","commit_id":"3e679f2d9c4b5514b65ea13dcbcaded4d6685b76"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"31b969deb425643e0ebee154eab300f6257d7ef2","unresolved":false,"context_lines":[{"line_number":926,"context_line":"        if not port_valid_state:"},{"line_number":927,"context_line":"            return"},{"line_number":928,"context_line":"        fip \u003d l3_objs.FloatingIP.get_objects("},{"line_number":929,"context_line":"            context, fixed_ip_address\u003dport_addr_pair_ip)"},{"line_number":930,"context_line":"        return self._core_plugin.get_port("},{"line_number":931,"context_line":"            context, fip[0].fixed_port_id) if fip else None"},{"line_number":932,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"ff346bd7_12c0ba29","line":929,"range":{"start_line":929,"start_character":38,"end_line":929,"end_character":55},"updated":"2017-07-27 15:54:28.000000000","message":"should we convert it to netaddr.IPAddress?","commit_id":"bc861a28e4774f5273e3f99b052d26ab91baf465"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"ee109ca51f90d77add54a4f656919bd8c1e66d5f","unresolved":false,"context_lines":[{"line_number":926,"context_line":"        if not port_valid_state:"},{"line_number":927,"context_line":"            return"},{"line_number":928,"context_line":"        fip \u003d l3_objs.FloatingIP.get_objects("},{"line_number":929,"context_line":"            context, fixed_ip_address\u003dport_addr_pair_ip)"},{"line_number":930,"context_line":"        return self._core_plugin.get_port("},{"line_number":931,"context_line":"            context, fip[0].fixed_port_id) if fip else None"},{"line_number":932,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"ff346bd7_54097c93","line":929,"range":{"start_line":929,"start_character":38,"end_line":929,"end_character":55},"in_reply_to":"ff346bd7_12c0ba29","updated":"2017-07-28 10:52:12.000000000","message":"Done","commit_id":"bc861a28e4774f5273e3f99b052d26ab91baf465"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"31b969deb425643e0ebee154eab300f6257d7ef2","unresolved":false,"context_lines":[{"line_number":928,"context_line":"        fip \u003d l3_objs.FloatingIP.get_objects("},{"line_number":929,"context_line":"            context, fixed_ip_address\u003dport_addr_pair_ip)"},{"line_number":930,"context_line":"        return self._core_plugin.get_port("},{"line_number":931,"context_line":"            context, fip[0].fixed_port_id) if fip else None"},{"line_number":932,"context_line":""},{"line_number":933,"context_line":""},{"line_number":934,"context_line":"class L3_NAT_with_dvr_db_mixin(_DVRAgentInterfaceMixin,"}],"source_content_type":"text/x-python","patch_set":18,"id":"ff346bd7_d2a7d2bc","line":931,"range":{"start_line":931,"start_character":24,"end_line":931,"end_character":27},"updated":"2017-07-27 15:54:28.000000000","message":"you care about a single fip, so please limit get_objects() with _Pager(limit\u003d1)","commit_id":"bc861a28e4774f5273e3f99b052d26ab91baf465"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"ee109ca51f90d77add54a4f656919bd8c1e66d5f","unresolved":false,"context_lines":[{"line_number":928,"context_line":"        fip \u003d l3_objs.FloatingIP.get_objects("},{"line_number":929,"context_line":"            context, fixed_ip_address\u003dport_addr_pair_ip)"},{"line_number":930,"context_line":"        return self._core_plugin.get_port("},{"line_number":931,"context_line":"            context, fip[0].fixed_port_id) if fip else None"},{"line_number":932,"context_line":""},{"line_number":933,"context_line":""},{"line_number":934,"context_line":"class L3_NAT_with_dvr_db_mixin(_DVRAgentInterfaceMixin,"}],"source_content_type":"text/x-python","patch_set":18,"id":"ff346bd7_14ff7467","line":931,"range":{"start_line":931,"start_character":24,"end_line":931,"end_character":27},"in_reply_to":"ff346bd7_d2a7d2bc","updated":"2017-07-28 10:52:12.000000000","message":"Done. Also changing \"fip\" to \"fips\".","commit_id":"bc861a28e4774f5273e3f99b052d26ab91baf465"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f742c4b571bb43b017fad86eef3d23c315243209","unresolved":false,"context_lines":[{"line_number":960,"context_line":"            (port_dict[\u0027status\u0027] \u003d\u003d const.PORT_STATUS_ACTIVE))"},{"line_number":961,"context_line":"        if not port_valid_state:"},{"line_number":962,"context_line":"            return"},{"line_number":963,"context_line":"        pager \u003d base_obj.Pager(limit\u003d1)"},{"line_number":964,"context_line":"        fips \u003d l3_obj.FloatingIP.get_objects("},{"line_number":965,"context_line":"            context,"},{"line_number":966,"context_line":"            _pager\u003dpager,"}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_66948ee9","line":963,"range":{"start_line":963,"start_character":16,"end_line":963,"end_character":39},"updated":"2017-09-21 19:57:02.000000000","message":"nit: you could move this into line 966 and define the pager in place. then you would save this line here.","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9ddc23d159d9e9006618639484f4d99c5dbcdfbb","unresolved":false,"context_lines":[{"line_number":960,"context_line":"            (port_dict[\u0027status\u0027] \u003d\u003d const.PORT_STATUS_ACTIVE))"},{"line_number":961,"context_line":"        if not port_valid_state:"},{"line_number":962,"context_line":"            return"},{"line_number":963,"context_line":"        pager \u003d base_obj.Pager(limit\u003d1)"},{"line_number":964,"context_line":"        fips \u003d l3_obj.FloatingIP.get_objects("},{"line_number":965,"context_line":"            context,"},{"line_number":966,"context_line":"            _pager\u003dpager,"}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_f48e4477","line":963,"range":{"start_line":963,"start_character":16,"end_line":963,"end_character":39},"in_reply_to":"7f515b1d_66948ee9","updated":"2017-10-11 07:38:50.000000000","message":"Done","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f742c4b571bb43b017fad86eef3d23c315243209","unresolved":false,"context_lines":[{"line_number":962,"context_line":"            return"},{"line_number":963,"context_line":"        pager \u003d base_obj.Pager(limit\u003d1)"},{"line_number":964,"context_line":"        fips \u003d l3_obj.FloatingIP.get_objects("},{"line_number":965,"context_line":"            context,"},{"line_number":966,"context_line":"            _pager\u003dpager,"},{"line_number":967,"context_line":"            fixed_ip_address\u003dnetaddr.IPAddress(port_addr_pair_ip))"},{"line_number":968,"context_line":"        return self._core_plugin.get_port("},{"line_number":969,"context_line":"            context, fips[0].fixed_port_id) if fips else None"}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_269e9607","line":966,"range":{"start_line":965,"start_character":12,"end_line":966,"end_character":25},"updated":"2017-09-21 19:57:02.000000000","message":"nit: please squash those lines to save screen space","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9ddc23d159d9e9006618639484f4d99c5dbcdfbb","unresolved":false,"context_lines":[{"line_number":962,"context_line":"            return"},{"line_number":963,"context_line":"        pager \u003d base_obj.Pager(limit\u003d1)"},{"line_number":964,"context_line":"        fips \u003d l3_obj.FloatingIP.get_objects("},{"line_number":965,"context_line":"            context,"},{"line_number":966,"context_line":"            _pager\u003dpager,"},{"line_number":967,"context_line":"            fixed_ip_address\u003dnetaddr.IPAddress(port_addr_pair_ip))"},{"line_number":968,"context_line":"        return self._core_plugin.get_port("},{"line_number":969,"context_line":"            context, fips[0].fixed_port_id) if fips else None"}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_d48b4865","line":966,"range":{"start_line":965,"start_character":12,"end_line":966,"end_character":25},"in_reply_to":"7f515b1d_269e9607","updated":"2017-10-11 07:38:50.000000000","message":"Done","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"51b9475c014a9f2afb4dbc45aa4a7362d108115f","unresolved":false,"context_lines":[{"line_number":961,"context_line":"        if not port_valid_state:"},{"line_number":962,"context_line":"            return"},{"line_number":963,"context_line":"        fips \u003d l3_obj.FloatingIP.get_objects("},{"line_number":964,"context_line":"            context, _pager\u003dbase_obj.Pager(limit\u003d1),"},{"line_number":965,"context_line":"            fixed_ip_address\u003dnetaddr.IPAddress(port_addr_pair_ip))"},{"line_number":966,"context_line":"        return self._core_plugin.get_port("},{"line_number":967,"context_line":"            context, fips[0].fixed_port_id) if fips else None"}],"source_content_type":"text/x-python","patch_set":43,"id":"1f485f77_6f188574","line":964,"updated":"2017-11-14 14:29:13.000000000","message":"why You need this Pager object here?","commit_id":"2f8bcce24bb82812af939b9d06861000039b1a84"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"1b46a4ddc4a667ad1b4efa914c2717decde446df","unresolved":false,"context_lines":[{"line_number":961,"context_line":"        if not port_valid_state:"},{"line_number":962,"context_line":"            return"},{"line_number":963,"context_line":"        fips \u003d l3_obj.FloatingIP.get_objects("},{"line_number":964,"context_line":"            context, _pager\u003dbase_obj.Pager(limit\u003d1),"},{"line_number":965,"context_line":"            fixed_ip_address\u003dnetaddr.IPAddress(port_addr_pair_ip))"},{"line_number":966,"context_line":"        return self._core_plugin.get_port("},{"line_number":967,"context_line":"            context, fips[0].fixed_port_id) if fips else None"}],"source_content_type":"text/x-python","patch_set":43,"id":"1f485f77_e4cc8abd","line":964,"in_reply_to":"1f485f77_6f188574","updated":"2017-11-15 02:27:23.000000000","message":"This is the same reason that I replied in db/l3_db.py. It comes from 2 reasons:\n1) we cannot call get_object() because \"fixed_ip_address\" is not primary key.\n2) calling get_objects() without pager will query all db records which adds unnecessary burden to db.","commit_id":"2f8bcce24bb82812af939b9d06861000039b1a84"}],"neutron/db/l3_fip_qos.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"5d8afbb7d0f11e81f5315706d50a5500666e621c","unresolved":false,"context_lines":[{"line_number":75,"context_line":"                                    old_qos_policy_id)"},{"line_number":76,"context_line":"        if floatingip_obj.db_obj.qos_policy_binding:"},{"line_number":77,"context_line":"            floatingip_obj.db_obj.qos_policy_binding["},{"line_number":78,"context_line":"                \u0027policy_id\u0027] \u003d new_qos_policy_id"},{"line_number":79,"context_line":"            floatingip_obj.update()"},{"line_number":80,"context_line":"        if not new_qos_policy_id:"},{"line_number":81,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":46,"id":"ff82abbf_773532a8","line":78,"updated":"2017-11-30 14:37:47.000000000","message":"this wrapping, could we make it like:\n\n...[...] \u003d (\n    ...)\n\nthat\u0027s a bit cleaner","commit_id":"f2965406699fb9fdb8d6f73c74c19089df1f30f8"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"c072b69edbd3a8f74dfb55b140b3741f7f4a7ace","unresolved":false,"context_lines":[{"line_number":75,"context_line":"                                    old_qos_policy_id)"},{"line_number":76,"context_line":"        if floatingip_obj.db_obj.qos_policy_binding:"},{"line_number":77,"context_line":"            floatingip_obj.db_obj.qos_policy_binding["},{"line_number":78,"context_line":"                \u0027policy_id\u0027] \u003d new_qos_policy_id"},{"line_number":79,"context_line":"            floatingip_obj.update()"},{"line_number":80,"context_line":"        if not new_qos_policy_id:"},{"line_number":81,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":46,"id":"ff82abbf_c6b6b9dd","line":78,"in_reply_to":"ff82abbf_773532a8","updated":"2017-12-01 06:37:45.000000000","message":"Will do.","commit_id":"f2965406699fb9fdb8d6f73c74c19089df1f30f8"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"965b5c6581a8d3f57c07d1c798a928a91707d84d","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            floatingip_obj[\u0027id\u0027],"},{"line_number":85,"context_line":"            new_qos_policy_id)"},{"line_number":86,"context_line":"        if not floatingip_obj.db_obj.qos_policy_binding:"},{"line_number":87,"context_line":"            floatingip_obj.db_obj.qos_policy_binding \u003d qos_policy_binding"},{"line_number":88,"context_line":"            floatingip_obj.update()"}],"source_content_type":"text/x-python","patch_set":46,"id":"ff82abbf_771212b7","line":88,"range":{"start_line":87,"start_character":13,"end_line":88,"end_character":35},"updated":"2017-11-30 14:44:49.000000000","message":"this won\u0027t do what you probably think it will do. update() operates on OVO object fields; your setting of db_obj.\u003cattr\u003e doesn\u0027t affect it.","commit_id":"f2965406699fb9fdb8d6f73c74c19089df1f30f8"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"e8583ab3a7dc6556795833be5a9f1e7e84d92991","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            floatingip_obj[\u0027id\u0027],"},{"line_number":85,"context_line":"            new_qos_policy_id)"},{"line_number":86,"context_line":"        if not floatingip_obj.db_obj.qos_policy_binding:"},{"line_number":87,"context_line":"            floatingip_obj.db_obj.qos_policy_binding \u003d qos_policy_binding"},{"line_number":88,"context_line":"            floatingip_obj.update()"}],"source_content_type":"text/x-python","patch_set":46,"id":"df87a7cf_2d2ba6eb","line":88,"range":{"start_line":87,"start_character":13,"end_line":88,"end_character":35},"in_reply_to":"ff82abbf_41cff356","updated":"2017-12-04 22:04:39.000000000","message":"In the old code, if you don\u0027t update the parent model, then later the caller would pass the model without the binding attribute initialized to the newly created binding model. Since you now fetch FIP object again before closing the transaction, we can safely pass fip.db_obj since it should contain the new binding attribute value.","commit_id":"f2965406699fb9fdb8d6f73c74c19089df1f30f8"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"c072b69edbd3a8f74dfb55b140b3741f7f4a7ace","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            floatingip_obj[\u0027id\u0027],"},{"line_number":85,"context_line":"            new_qos_policy_id)"},{"line_number":86,"context_line":"        if not floatingip_obj.db_obj.qos_policy_binding:"},{"line_number":87,"context_line":"            floatingip_obj.db_obj.qos_policy_binding \u003d qos_policy_binding"},{"line_number":88,"context_line":"            floatingip_obj.update()"}],"source_content_type":"text/x-python","patch_set":46,"id":"ff82abbf_41cff356","line":88,"range":{"start_line":87,"start_character":13,"end_line":88,"end_character":35},"in_reply_to":"ff82abbf_771212b7","updated":"2017-12-01 06:37:45.000000000","message":"Hmm. So I double checked, we do not need .update() here. But I honestly do not understand why the original codes exist in the first place.","commit_id":"f2965406699fb9fdb8d6f73c74c19089df1f30f8"}],"neutron/objects/router.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"49e16dd5227db4afe8f0bc017a7862edd8229c18","unresolved":false,"context_lines":[{"line_number":245,"context_line":""},{"line_number":246,"context_line":"        # Filter out on router_ids"},{"line_number":247,"context_line":"        query \u003d query.filter(l3.FloatingIP.router_id.in_(router_ids))"},{"line_number":248,"context_line":"        return query"}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_88baf6bd","line":248,"updated":"2017-08-31 13:38:20.000000000","message":"can we return objects here instead of a query?","commit_id":"f09902d96094cee4415e0a6aec1cf609cb981db3"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"cbb48f1f922f0d55495120c2186695b2fd16948a","unresolved":false,"context_lines":[{"line_number":245,"context_line":""},{"line_number":246,"context_line":"        # Filter out on router_ids"},{"line_number":247,"context_line":"        query \u003d query.filter(l3.FloatingIP.router_id.in_(router_ids))"},{"line_number":248,"context_line":"        return query"}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_c70c2f44","line":248,"in_reply_to":"7f287b81_88baf6bd","updated":"2017-09-04 08:34:35.000000000","message":"Unfortunately we cannot. Because _unique_floatingip_iterator() requires a db query to group the result by floating_ip ids.","commit_id":"f09902d96094cee4415e0a6aec1cf609cb981db3"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"a60cf8057c7ec184ac1fb371f3cd6663cf4c29c9","unresolved":false,"context_lines":[{"line_number":201,"context_line":"        \u0027router_id\u0027: common_types.UUIDField(nullable\u003dTrue),"},{"line_number":202,"context_line":"        \u0027last_known_router_id\u0027: common_types.UUIDField(nullable\u003dTrue),"},{"line_number":203,"context_line":"        \u0027status\u0027: common_types.FloatingIPStatusEnumField(nullable\u003dTrue),"},{"line_number":204,"context_line":"        \u0027dns\u0027: obj_fields.ObjectField(\u0027FloatingIPDNS\u0027, nullable\u003dTrue),"},{"line_number":205,"context_line":"    }"},{"line_number":206,"context_line":"    fields_no_update \u003d [\u0027project_id\u0027, \u0027floating_ip_address\u0027,"},{"line_number":207,"context_line":"                        \u0027floating_network_id\u0027, \u0027floating_port_id\u0027]"}],"source_content_type":"text/x-python","patch_set":33,"id":"7f287b81_4167f952","line":204,"updated":"2017-09-05 05:26:27.000000000","message":"this requires that the object number be bumped","commit_id":"977211641d38be267b378b5e7adcf96ea74a2253"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"ca120970a66903e869c2195630d09117b19d7231","unresolved":false,"context_lines":[{"line_number":201,"context_line":"        \u0027router_id\u0027: common_types.UUIDField(nullable\u003dTrue),"},{"line_number":202,"context_line":"        \u0027last_known_router_id\u0027: common_types.UUIDField(nullable\u003dTrue),"},{"line_number":203,"context_line":"        \u0027status\u0027: common_types.FloatingIPStatusEnumField(nullable\u003dTrue),"},{"line_number":204,"context_line":"        \u0027dns\u0027: obj_fields.ObjectField(\u0027FloatingIPDNS\u0027, nullable\u003dTrue),"},{"line_number":205,"context_line":"    }"},{"line_number":206,"context_line":"    fields_no_update \u003d [\u0027project_id\u0027, \u0027floating_ip_address\u0027,"},{"line_number":207,"context_line":"                        \u0027floating_network_id\u0027, \u0027floating_port_id\u0027]"}],"source_content_type":"text/x-python","patch_set":33,"id":"7f287b81_319543e5","line":204,"in_reply_to":"7f287b81_4167f952","updated":"2017-09-06 00:56:21.000000000","message":"Instead of bumping object number, I modified the hash number in \u003chttps://review.openstack.org/#/c/396351/33/neutron/tests/unit/objects/test_objects.py\u003e, because this synthetic filed is not newly added but a miss-out in creation phase. \n\nWould you prefer to see a version bump?","commit_id":"977211641d38be267b378b5e7adcf96ea74a2253"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f742c4b571bb43b017fad86eef3d23c315243209","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        return result"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"    @classmethod"},{"line_number":234,"context_line":"    def get_sync_floating_ips_query(cls, context, router_ids):"},{"line_number":235,"context_line":"        query \u003d context.session.query(l3.FloatingIP,"},{"line_number":236,"context_line":"                                      models_v2.SubnetPool.address_scope_id)"},{"line_number":237,"context_line":"        query \u003d query.join(models_v2.Port,"}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_e6751ece","line":234,"range":{"start_line":234,"start_character":30,"end_line":234,"end_character":35},"updated":"2017-09-21 19:57:02.000000000","message":"I prefer we don\u0027t expose anything sqlalchemy specific to object consumers. please convert the method to return objects (+scope?) instead of a query.\n\nConsider the new name for the method: get_scoped_floating_ips?","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9ddc23d159d9e9006618639484f4d99c5dbcdfbb","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        return result"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"    @classmethod"},{"line_number":234,"context_line":"    def get_sync_floating_ips_query(cls, context, router_ids):"},{"line_number":235,"context_line":"        query \u003d context.session.query(l3.FloatingIP,"},{"line_number":236,"context_line":"                                      models_v2.SubnetPool.address_scope_id)"},{"line_number":237,"context_line":"        query \u003d query.join(models_v2.Port,"}],"source_content_type":"text/x-python","patch_set":34,"id":"5f4e5783_c24443ba","line":234,"range":{"start_line":234,"start_character":30,"end_line":234,"end_character":35},"in_reply_to":"7f515b1d_e6751ece","updated":"2017-10-11 07:38:50.000000000","message":"Done.","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f76263a9240d61a2fe4dfac6b3a1d8a50d9f0f20","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        return cls._unique_floatingip_iterator(context, query)"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"    @classmethod"},{"line_number":254,"context_line":"    def _unique_floatingip_iterator(cls, context, query):"},{"line_number":255,"context_line":"        \"\"\"Iterates over only one row per floating ip. Ignores others.\"\"\""},{"line_number":256,"context_line":"        # Group rows by fip id. They must be sorted by same."},{"line_number":257,"context_line":"        q \u003d query.order_by(l3.FloatingIP.id)"}],"source_content_type":"text/x-python","patch_set":35,"id":"5f4e5783_ba29be8a","line":254,"updated":"2017-10-16 21:07:50.000000000","message":"why do we need it as a separate method? can\u0027t we squash those two?","commit_id":"a0701a6b7ea5135e70f1f2c9ac3c1810f4b39644"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9af33007d00e365a749ca5d142d2b2aa6a1b2820","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        return cls._unique_floatingip_iterator(context, query)"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"    @classmethod"},{"line_number":254,"context_line":"    def _unique_floatingip_iterator(cls, context, query):"},{"line_number":255,"context_line":"        \"\"\"Iterates over only one row per floating ip. Ignores others.\"\"\""},{"line_number":256,"context_line":"        # Group rows by fip id. They must be sorted by same."},{"line_number":257,"context_line":"        q \u003d query.order_by(l3.FloatingIP.id)"}],"source_content_type":"text/x-python","patch_set":35,"id":"3f4b6375_87408b09","line":254,"in_reply_to":"5f4e5783_ba29be8a","updated":"2017-10-19 05:43:16.000000000","message":"Yes, we can. But I separated them for 2 reasons.\n\n1) This is how the original codes are written. I think it would be better not to change the structure. \n\n2) I would like to keep the tests of _unique_floatingip_iterator(). But due to my lack of knowledge, when I tried to squash them into one, I have difficulty mocking local values inside a function, to be more specific, I need to mock query in Line 250 to:\n\n        query.order_by().__iter__.return_value \u003d [\n            ({\u0027id\u0027: \u0027id1\u0027}, \u0027scope1\u0027),\n            ({\u0027id\u0027: \u0027id1\u0027}, \u0027scope1\u0027),\n            ({\u0027id\u0027: \u0027id2\u0027}, \u0027scope2\u0027),\n            ({\u0027id\u0027: \u0027id2\u0027}, \u0027scope2\u0027),\n            ({\u0027id\u0027: \u0027id2\u0027}, \u0027scope2\u0027),\n            ({\u0027id\u0027: \u0027id3\u0027}, \u0027scope3\u0027)]\n\nI am not sure how we can do something like this. Your suggestions would be appreciated.","commit_id":"a0701a6b7ea5135e70f1f2c9ac3c1810f4b39644"}],"neutron/tests/unit/db/test_db_base_plugin_v2.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"9b7d383a3d4c0f6a9cf571f143da237a630aef51","unresolved":false,"context_lines":[{"line_number":56,"context_line":"from neutron.db import models_v2"},{"line_number":57,"context_line":"from neutron.db import standard_attr"},{"line_number":58,"context_line":"from neutron.ipam import exceptions as ipam_exc"},{"line_number":59,"context_line":"# from neutron.objects import router as l3_objs"},{"line_number":60,"context_line":"from neutron.tests import base"},{"line_number":61,"context_line":"from neutron.tests import tools"},{"line_number":62,"context_line":"from neutron.tests.unit.api import test_extensions"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a461143_cb6eea95","line":59,"updated":"2017-02-02 12:27:20.000000000","message":"can you delete this?","commit_id":"3e679f2d9c4b5514b65ea13dcbcaded4d6685b76"},{"author":{"_account_id":22774,"name":"Shashank Kumar Shankar","email":"shashank.kumar.shankar@intel.com","username":"skshankar"},"change_message_id":"c61ab3d4b7bd69a207292a666567112f20700d54","unresolved":false,"context_lines":[{"line_number":56,"context_line":"from neutron.db import models_v2"},{"line_number":57,"context_line":"from neutron.db import standard_attr"},{"line_number":58,"context_line":"from neutron.ipam import exceptions as ipam_exc"},{"line_number":59,"context_line":"# from neutron.objects import router as l3_objs"},{"line_number":60,"context_line":"from neutron.tests import base"},{"line_number":61,"context_line":"from neutron.tests import tools"},{"line_number":62,"context_line":"from neutron.tests.unit.api import test_extensions"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a430d35_9b2512c4","line":59,"in_reply_to":"3a461143_cb6eea95","updated":"2017-02-03 20:38:06.000000000","message":"Done","commit_id":"3e679f2d9c4b5514b65ea13dcbcaded4d6685b76"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"9b7d383a3d4c0f6a9cf571f143da237a630aef51","unresolved":false,"context_lines":[{"line_number":6243,"context_line":"        port \u003d self._make_port(ctx, network.id)"},{"line_number":6244,"context_line":"        flip \u003d self._make_floating_ip(ctx, port.id)"},{"line_number":6245,"context_line":"        self._test_standardattr_removed_on_obj_delete(ctx, flip)"},{"line_number":6246,"context_line":"        # attr_id \u003d flip.standard_attr_id"},{"line_number":6247,"context_line":"        # self.assertEqual("},{"line_number":6248,"context_line":"        #     flip.__class__.__name__,"},{"line_number":6249,"context_line":"        #     self._get_neutron_attr(ctx, attr_id).resource_type)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a461143_2b04cec4","line":6246,"updated":"2017-02-02 12:27:20.000000000","message":"why is this commected out - why not delete it if not necesary","commit_id":"3e679f2d9c4b5514b65ea13dcbcaded4d6685b76"},{"author":{"_account_id":22774,"name":"Shashank Kumar Shankar","email":"shashank.kumar.shankar@intel.com","username":"skshankar"},"change_message_id":"c61ab3d4b7bd69a207292a666567112f20700d54","unresolved":false,"context_lines":[{"line_number":6243,"context_line":"        port \u003d self._make_port(ctx, network.id)"},{"line_number":6244,"context_line":"        flip \u003d self._make_floating_ip(ctx, port.id)"},{"line_number":6245,"context_line":"        self._test_standardattr_removed_on_obj_delete(ctx, flip)"},{"line_number":6246,"context_line":"        # attr_id \u003d flip.standard_attr_id"},{"line_number":6247,"context_line":"        # self.assertEqual("},{"line_number":6248,"context_line":"        #     flip.__class__.__name__,"},{"line_number":6249,"context_line":"        #     self._get_neutron_attr(ctx, attr_id).resource_type)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a430d35_1b184284","line":6246,"in_reply_to":"3a461143_2b04cec4","updated":"2017-02-03 20:38:06.000000000","message":"Done","commit_id":"3e679f2d9c4b5514b65ea13dcbcaded4d6685b76"},{"author":{"_account_id":20246,"name":"Aradhana Singh","email":"aradhanamailbox@gmail.com","username":"asingh"},"change_message_id":"4587d01926de77f8f819c655730102d8e75be7ce","unresolved":false,"context_lines":[{"line_number":6070,"context_line":"        return sg, rule"},{"line_number":6071,"context_line":""},{"line_number":6072,"context_line":"    def _make_floating_ip(self, ctx, port_id):"},{"line_number":6073,"context_line":"        flip \u003d l3_objs.FloatingIP("},{"line_number":6074,"context_line":"            ctx, floating_ip_address\u003d\u00271.2.3.4\u0027,"},{"line_number":6075,"context_line":"            floating_network_id\u003duuidutils.generate_uuid(),"},{"line_number":6076,"context_line":"            floating_port_id\u003dport_id)"},{"line_number":6077,"context_line":"        flip.create()"},{"line_number":6078,"context_line":"        return flip"},{"line_number":6079,"context_line":""},{"line_number":6080,"context_line":"    def _make_router(self, ctx):"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a30ddce_8dbb4575","line":6077,"range":{"start_line":6073,"start_character":0,"end_line":6077,"end_character":21},"updated":"2017-03-06 22:50:34.000000000","message":"how about?\n        return l3_objs.FloatingIP(ctx, floating_ip_address\u003d\u00271.2.3.4\u0027,\n            floating_network_id\u003duuidutils.generate_uuid(),\n            floating_port_id\u003dport_id).create()","commit_id":"17d3ce49ef583069cd8c664e6382a878d31398f0"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"31b969deb425643e0ebee154eab300f6257d7ef2","unresolved":false,"context_lines":[{"line_number":6245,"context_line":""},{"line_number":6246,"context_line":"    def _make_floating_ip(self, ctx, port_id):"},{"line_number":6247,"context_line":"        flip \u003d l3_objs.FloatingIP("},{"line_number":6248,"context_line":"            ctx, floating_ip_address\u003d\u00271.2.3.4\u0027,"},{"line_number":6249,"context_line":"            floating_network_id\u003duuidutils.generate_uuid(),"},{"line_number":6250,"context_line":"            floating_port_id\u003dport_id)"},{"line_number":6251,"context_line":"        flip.create()"}],"source_content_type":"text/x-python","patch_set":18,"id":"ff346bd7_72cdc664","line":6248,"range":{"start_line":6248,"start_character":37,"end_line":6248,"end_character":46},"updated":"2017-07-27 15:54:28.000000000","message":"netaddr.IPAddress?","commit_id":"bc861a28e4774f5273e3f99b052d26ab91baf465"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"ee109ca51f90d77add54a4f656919bd8c1e66d5f","unresolved":false,"context_lines":[{"line_number":6245,"context_line":""},{"line_number":6246,"context_line":"    def _make_floating_ip(self, ctx, port_id):"},{"line_number":6247,"context_line":"        flip \u003d l3_objs.FloatingIP("},{"line_number":6248,"context_line":"            ctx, floating_ip_address\u003d\u00271.2.3.4\u0027,"},{"line_number":6249,"context_line":"            floating_network_id\u003duuidutils.generate_uuid(),"},{"line_number":6250,"context_line":"            floating_port_id\u003dport_id)"},{"line_number":6251,"context_line":"        flip.create()"}],"source_content_type":"text/x-python","patch_set":18,"id":"ff346bd7_f40f5085","line":6248,"range":{"start_line":6248,"start_character":37,"end_line":6248,"end_character":46},"in_reply_to":"ff346bd7_72cdc664","updated":"2017-07-28 10:52:12.000000000","message":"Done","commit_id":"bc861a28e4774f5273e3f99b052d26ab91baf465"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"0f958e238aea382b7c78c19d451b28729d419160","unresolved":false,"context_lines":[{"line_number":6428,"context_line":"        network \u003d self._make_network(ctx)"},{"line_number":6429,"context_line":"        port \u003d self._make_port(ctx, network.id)"},{"line_number":6430,"context_line":"        flip \u003d self._make_floating_ip(ctx, port.id)"},{"line_number":6431,"context_line":"        self._test_standardattr_removed_on_obj_delete(ctx, flip.db_obj)"},{"line_number":6432,"context_line":""},{"line_number":6433,"context_line":"    def test_standardattr_removed_on_router_delete(self):"},{"line_number":6434,"context_line":"        ctx \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":46,"id":"ff82abbf_2b97493d","line":6431,"updated":"2017-11-30 12:05:00.000000000","message":"Maybe TODO note to change it object when all code will be migrated?","commit_id":"f2965406699fb9fdb8d6f73c74c19089df1f30f8"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"c072b69edbd3a8f74dfb55b140b3741f7f4a7ace","unresolved":false,"context_lines":[{"line_number":6428,"context_line":"        network \u003d self._make_network(ctx)"},{"line_number":6429,"context_line":"        port \u003d self._make_port(ctx, network.id)"},{"line_number":6430,"context_line":"        flip \u003d self._make_floating_ip(ctx, port.id)"},{"line_number":6431,"context_line":"        self._test_standardattr_removed_on_obj_delete(ctx, flip.db_obj)"},{"line_number":6432,"context_line":""},{"line_number":6433,"context_line":"    def test_standardattr_removed_on_router_delete(self):"},{"line_number":6434,"context_line":"        ctx \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":46,"id":"ff82abbf_01d9eb20","line":6431,"in_reply_to":"ff82abbf_2b97493d","updated":"2017-12-01 06:37:45.000000000","message":"Done","commit_id":"f2965406699fb9fdb8d6f73c74c19089df1f30f8"}],"neutron/tests/unit/db/test_l3_db.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f742c4b571bb43b017fad86eef3d23c315243209","unresolved":false,"context_lines":[{"line_number":219,"context_line":"            context,"},{"line_number":220,"context_line":"            id\u003duuidutils.generate_uuid(),"},{"line_number":221,"context_line":"            floating_network_id\u003duuidutils.generate_uuid(),"},{"line_number":222,"context_line":"            floating_ip_address\u003d\u00278.8.8.8\u0027,"},{"line_number":223,"context_line":"            fixed_port_id\u003duuidutils.generate_uuid(),"},{"line_number":224,"context_line":"            floating_port_id\u003duuidutils.generate_uuid())"},{"line_number":225,"context_line":"        with mock.patch.object("}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_e623debd","line":222,"updated":"2017-09-21 19:57:02.000000000","message":"should be converted to netaddr.IPAddress, no?","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9ddc23d159d9e9006618639484f4d99c5dbcdfbb","unresolved":false,"context_lines":[{"line_number":219,"context_line":"            context,"},{"line_number":220,"context_line":"            id\u003duuidutils.generate_uuid(),"},{"line_number":221,"context_line":"            floating_network_id\u003duuidutils.generate_uuid(),"},{"line_number":222,"context_line":"            floating_ip_address\u003d\u00278.8.8.8\u0027,"},{"line_number":223,"context_line":"            fixed_port_id\u003duuidutils.generate_uuid(),"},{"line_number":224,"context_line":"            floating_port_id\u003duuidutils.generate_uuid())"},{"line_number":225,"context_line":"        with mock.patch.object("}],"source_content_type":"text/x-python","patch_set":34,"id":"5f4e5783_1db19e90","line":222,"in_reply_to":"7f515b1d_e623debd","updated":"2017-10-11 07:38:50.000000000","message":"Done","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f76263a9240d61a2fe4dfac6b3a1d8a50d9f0f20","unresolved":false,"context_lines":[{"line_number":134,"context_line":"            \u0027fixed_ip_address_scope\u0027: mock.sentinel.address_scope_id,"},{"line_number":135,"context_line":"            \u0027id\u0027: mock.sentinel.fip_ip}, result)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def test__unique_floatingip_iterator(self):"},{"line_number":138,"context_line":"        context \u003d mock.MagicMock()"},{"line_number":139,"context_line":"        query \u003d mock.MagicMock()"},{"line_number":140,"context_line":"        query.order_by().__iter__.return_value \u003d ["}],"source_content_type":"text/x-python","patch_set":35,"id":"5f4e5783_9a34c294","line":137,"updated":"2017-10-16 21:07:50.000000000","message":"since you moved the code to another module, there should the test case that targets it move. (we maintain strict file structure where x/y/zzz.py has test cases in tests/unit/x/y/test_zzz.py).","commit_id":"a0701a6b7ea5135e70f1f2c9ac3c1810f4b39644"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9af33007d00e365a749ca5d142d2b2aa6a1b2820","unresolved":false,"context_lines":[{"line_number":134,"context_line":"            \u0027fixed_ip_address_scope\u0027: mock.sentinel.address_scope_id,"},{"line_number":135,"context_line":"            \u0027id\u0027: mock.sentinel.fip_ip}, result)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def test__unique_floatingip_iterator(self):"},{"line_number":138,"context_line":"        context \u003d mock.MagicMock()"},{"line_number":139,"context_line":"        query \u003d mock.MagicMock()"},{"line_number":140,"context_line":"        query.order_by().__iter__.return_value \u003d ["}],"source_content_type":"text/x-python","patch_set":35,"id":"3f4b6375_474a9327","line":137,"in_reply_to":"5f4e5783_9a34c294","updated":"2017-10-19 05:43:16.000000000","message":"I see. Will move this part too.","commit_id":"a0701a6b7ea5135e70f1f2c9ac3c1810f4b39644"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"51b9475c014a9f2afb4dbc45aa4a7362d108115f","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        query.reset_mock()"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        def side_effect(fip_db):"},{"line_number":150,"context_line":"            return fip_db"},{"line_number":151,"context_line":"        with mock.patch.object("},{"line_number":152,"context_line":"                l3_obj.FloatingIP, \u0027_load_object\u0027,"},{"line_number":153,"context_line":"                side_effect\u003d({\u0027id\u0027: \u0027id1\u0027}, {\u0027id\u0027: \u0027id2\u0027}, {\u0027id\u0027: \u0027id3\u0027})):"}],"source_content_type":"text/x-python","patch_set":43,"id":"1f485f77_8f1d0168","line":150,"updated":"2017-11-14 14:29:13.000000000","message":"shoudn\u0027t You add empty line above L151?","commit_id":"2f8bcce24bb82812af939b9d06861000039b1a84"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"1b46a4ddc4a667ad1b4efa914c2717decde446df","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        query.reset_mock()"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        def side_effect(fip_db):"},{"line_number":150,"context_line":"            return fip_db"},{"line_number":151,"context_line":"        with mock.patch.object("},{"line_number":152,"context_line":"                l3_obj.FloatingIP, \u0027_load_object\u0027,"},{"line_number":153,"context_line":"                side_effect\u003d({\u0027id\u0027: \u0027id1\u0027}, {\u0027id\u0027: \u0027id2\u0027}, {\u0027id\u0027: \u0027id3\u0027})):"}],"source_content_type":"text/x-python","patch_set":43,"id":"1f485f77_8446f620","line":150,"in_reply_to":"1f485f77_8f1d0168","updated":"2017-11-15 02:27:23.000000000","message":"I will add it. Thanks.","commit_id":"2f8bcce24bb82812af939b9d06861000039b1a84"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"288d8d65f1b481c8b0c898b69fb300b696830d98","unresolved":false,"context_lines":[{"line_number":207,"context_line":"            \u0027device_owner\u0027: n_const.DEVICE_OWNER_FLOATINGIP,"},{"line_number":208,"context_line":"            \u0027device_id\u0027: \u0027some_flip\u0027, \u0027id\u0027: \u0027f\u0027,"},{"line_number":209,"context_line":"            \u0027fixed_ips\u0027: [{\u0027ip_address\u0027: \u00271.1.1.1\u0027, \u0027subnet_id\u0027: \u00274\u0027}]}"},{"line_number":210,"context_line":"        self.db._floating_ip_exists \u003d mock.Mock()"},{"line_number":211,"context_line":"        with testtools.ExpectedException(n_exc.ServicePortInUse):"},{"line_number":212,"context_line":"            self.db.prevent_l3_port_deletion(ctx, None)"},{"line_number":213,"context_line":""}],"source_content_type":"text/x-python","patch_set":43,"id":"1f485f77_a3bf71a8","line":210,"updated":"2017-11-16 15:04:31.000000000","message":"you should mock it (mock.patch.object(self.db, \u0027_floating_ip_exists\u0027), otherwise you modify the actual class forever.","commit_id":"2f8bcce24bb82812af939b9d06861000039b1a84"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"0f958e238aea382b7c78c19d451b28729d419160","unresolved":false,"context_lines":[{"line_number":146,"context_line":"            ({\u0027id\u0027: \u0027id3\u0027}, \u0027scope3\u0027)]"},{"line_number":147,"context_line":"        query.reset_mock()"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        def side_effect(fip_db):"},{"line_number":150,"context_line":"            return fip_db"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        with mock.patch.object("}],"source_content_type":"text/x-python","patch_set":46,"id":"ff82abbf_eba08194","line":149,"updated":"2017-11-30 12:05:00.000000000","message":"where this function is used?","commit_id":"f2965406699fb9fdb8d6f73c74c19089df1f30f8"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"20ccf8e5f21d58ae19dd56dc19abce9ad3a62578","unresolved":false,"context_lines":[{"line_number":146,"context_line":"            ({\u0027id\u0027: \u0027id3\u0027}, \u0027scope3\u0027)]"},{"line_number":147,"context_line":"        query.reset_mock()"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        def side_effect(fip_db):"},{"line_number":150,"context_line":"            return fip_db"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        with mock.patch.object("}],"source_content_type":"text/x-python","patch_set":46,"id":"df87a7cf_3c476c4e","line":149,"in_reply_to":"df87a7cf_f20db237","updated":"2017-12-04 10:31:39.000000000","message":"Oh, I see. Thanks! I will remove this function in latest patch.","commit_id":"f2965406699fb9fdb8d6f73c74c19089df1f30f8"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"9ea3333485ce2a55aab69e755badb5a2998cab68","unresolved":false,"context_lines":[{"line_number":146,"context_line":"            ({\u0027id\u0027: \u0027id3\u0027}, \u0027scope3\u0027)]"},{"line_number":147,"context_line":"        query.reset_mock()"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        def side_effect(fip_db):"},{"line_number":150,"context_line":"            return fip_db"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        with mock.patch.object("}],"source_content_type":"text/x-python","patch_set":46,"id":"df87a7cf_f20db237","line":149,"in_reply_to":"ff82abbf_61f55783","updated":"2017-12-04 08:34:12.000000000","message":"In L 154 You are not using this function but You are just passing some tuple as side_effect parameter to mock.patch.object() method.\nI made simple test locally and I removed this \"side_effect\" function from here - all tests passes :)","commit_id":"f2965406699fb9fdb8d6f73c74c19089df1f30f8"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"c072b69edbd3a8f74dfb55b140b3741f7f4a7ace","unresolved":false,"context_lines":[{"line_number":146,"context_line":"            ({\u0027id\u0027: \u0027id3\u0027}, \u0027scope3\u0027)]"},{"line_number":147,"context_line":"        query.reset_mock()"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        def side_effect(fip_db):"},{"line_number":150,"context_line":"            return fip_db"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        with mock.patch.object("}],"source_content_type":"text/x-python","patch_set":46,"id":"ff82abbf_61f55783","line":149,"in_reply_to":"ff82abbf_eba08194","updated":"2017-12-01 06:37:45.000000000","message":"In Line 154. I use this function to make l3_obj.FloatingIP._load_object() return {\u0027id\u0027: \u0027id1\u0027}, {\u0027id\u0027: \u0027id2\u0027}, {\u0027id\u0027: \u0027id3\u0027}, because this is merely what we want to test.","commit_id":"f2965406699fb9fdb8d6f73c74c19089df1f30f8"}],"neutron/tests/unit/extensions/test_l3.py":[{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9d8f41e8556841a002115317fb6d825509e4e8f6","unresolved":false,"context_lines":[{"line_number":3898,"context_line":""},{"line_number":3899,"context_line":"            self._assert_object_list_queries_constant(router_maker, \u0027routers\u0027)"},{"line_number":3900,"context_line":""},{"line_number":3901,"context_line":"    def test_floatingip_list_queries_constant(self):"},{"line_number":3902,"context_line":"        with self.floatingip_with_assoc(**self.kwargs) as flip:"},{"line_number":3903,"context_line":"            internal_port \u003d self._show(\u0027ports\u0027, flip[\u0027floatingip\u0027][\u0027port_id\u0027])"},{"line_number":3904,"context_line":"            internal_net_id \u003d internal_port[\u0027port\u0027][\u0027network_id\u0027]"},{"line_number":3905,"context_line":""},{"line_number":3906,"context_line":"            def float_maker():"},{"line_number":3907,"context_line":"                port \u003d self._make_port("},{"line_number":3908,"context_line":"                    self.fmt, internal_net_id, **self.kwargs)"},{"line_number":3909,"context_line":"                return self._make_floatingip("},{"line_number":3910,"context_line":"                    self.fmt, flip[\u0027floatingip\u0027][\u0027floating_network_id\u0027],"},{"line_number":3911,"context_line":"                    port_id\u003dport[\u0027port\u0027][\u0027id\u0027],"},{"line_number":3912,"context_line":"                    **self.kwargs)"},{"line_number":3913,"context_line":""},{"line_number":3914,"context_line":"            self._assert_object_list_queries_constant(float_maker,"},{"line_number":3915,"context_line":"                                                      \u0027floatingips\u0027)"},{"line_number":3916,"context_line":""},{"line_number":3917,"context_line":""},{"line_number":3918,"context_line":"class TestL3DbOperationBoundsTenant(TestL3DbOperationBounds):"}],"source_content_type":"text/x-python","patch_set":28,"id":"7f287b81_8fc195e7","side":"PARENT","line":3915,"range":{"start_line":3901,"start_character":0,"end_line":3915,"end_character":68},"updated":"2017-08-24 08:03:10.000000000","message":"I deleted this test because after the switch to OVO, the number of queries is not constant any more. Every time we list up all floating ips, we will query floating ip\u0027s synthetic field - DNS once. \n\nThe test case\u0027s flow is to create one floating ip, list all floating ips. And repeat once. In this flow, after every CREATE, the number of query to DB increases by 1 in LIST action.","commit_id":"f9838f40aba9c7d945c12de4c5b6c78abf18859b"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"3d49347a6c5cbbbf58ab49103ef2a4d269291952","unresolved":false,"context_lines":[{"line_number":3898,"context_line":""},{"line_number":3899,"context_line":"            self._assert_object_list_queries_constant(router_maker, \u0027routers\u0027)"},{"line_number":3900,"context_line":""},{"line_number":3901,"context_line":"    def test_floatingip_list_queries_constant(self):"},{"line_number":3902,"context_line":"        with self.floatingip_with_assoc(**self.kwargs) as flip:"},{"line_number":3903,"context_line":"            internal_port \u003d self._show(\u0027ports\u0027, flip[\u0027floatingip\u0027][\u0027port_id\u0027])"},{"line_number":3904,"context_line":"            internal_net_id \u003d internal_port[\u0027port\u0027][\u0027network_id\u0027]"},{"line_number":3905,"context_line":""},{"line_number":3906,"context_line":"            def float_maker():"},{"line_number":3907,"context_line":"                port \u003d self._make_port("},{"line_number":3908,"context_line":"                    self.fmt, internal_net_id, **self.kwargs)"},{"line_number":3909,"context_line":"                return self._make_floatingip("},{"line_number":3910,"context_line":"                    self.fmt, flip[\u0027floatingip\u0027][\u0027floating_network_id\u0027],"},{"line_number":3911,"context_line":"                    port_id\u003dport[\u0027port\u0027][\u0027id\u0027],"},{"line_number":3912,"context_line":"                    **self.kwargs)"},{"line_number":3913,"context_line":""},{"line_number":3914,"context_line":"            self._assert_object_list_queries_constant(float_maker,"},{"line_number":3915,"context_line":"                                                      \u0027floatingips\u0027)"},{"line_number":3916,"context_line":""},{"line_number":3917,"context_line":""},{"line_number":3918,"context_line":"class TestL3DbOperationBoundsTenant(TestL3DbOperationBounds):"}],"source_content_type":"text/x-python","patch_set":28,"id":"7f287b81_3bd4d547","side":"PARENT","line":3915,"range":{"start_line":3901,"start_character":0,"end_line":3915,"end_character":68},"in_reply_to":"7f287b81_8fc195e7","updated":"2017-08-28 09:19:24.000000000","message":"nit: because of your arguments, you can use \"_list_and_record_queries\" to check your assessment.\n\nBut this is just a nit.","commit_id":"f9838f40aba9c7d945c12de4c5b6c78abf18859b"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"49e16dd5227db4afe8f0bc017a7862edd8229c18","unresolved":false,"context_lines":[{"line_number":3898,"context_line":""},{"line_number":3899,"context_line":"            self._assert_object_list_queries_constant(router_maker, \u0027routers\u0027)"},{"line_number":3900,"context_line":""},{"line_number":3901,"context_line":"    def test_floatingip_list_queries_constant(self):"},{"line_number":3902,"context_line":"        with self.floatingip_with_assoc(**self.kwargs) as flip:"},{"line_number":3903,"context_line":"            internal_port \u003d self._show(\u0027ports\u0027, flip[\u0027floatingip\u0027][\u0027port_id\u0027])"},{"line_number":3904,"context_line":"            internal_net_id \u003d internal_port[\u0027port\u0027][\u0027network_id\u0027]"}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_68190ad5","side":"PARENT","line":3901,"updated":"2017-08-31 13:38:20.000000000","message":"wait, we can\u0027t just remove the test, it catches legit performance regressions.","commit_id":"f9838f40aba9c7d945c12de4c5b6c78abf18859b"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"cbb48f1f922f0d55495120c2186695b2fd16948a","unresolved":false,"context_lines":[{"line_number":3898,"context_line":""},{"line_number":3899,"context_line":"            self._assert_object_list_queries_constant(router_maker, \u0027routers\u0027)"},{"line_number":3900,"context_line":""},{"line_number":3901,"context_line":"    def test_floatingip_list_queries_constant(self):"},{"line_number":3902,"context_line":"        with self.floatingip_with_assoc(**self.kwargs) as flip:"},{"line_number":3903,"context_line":"            internal_port \u003d self._show(\u0027ports\u0027, flip[\u0027floatingip\u0027][\u0027port_id\u0027])"},{"line_number":3904,"context_line":"            internal_net_id \u003d internal_port[\u0027port\u0027][\u0027network_id\u0027]"}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_ea0c923c","side":"PARENT","line":3901,"in_reply_to":"7f287b81_68190ad5","updated":"2017-09-04 08:34:35.000000000","message":"Hmm, but this test does not make any sense anymore. We added DNS as a synthetic field of floatingips. Everytime we LIST floatingips, we query DNS field of each floating_ip, thus the number of queries made to database is not constant but added by 1.","commit_id":"f9838f40aba9c7d945c12de4c5b6c78abf18859b"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f742c4b571bb43b017fad86eef3d23c315243209","unresolved":false,"context_lines":[{"line_number":3898,"context_line":""},{"line_number":3899,"context_line":"            self._assert_object_list_queries_constant(router_maker, \u0027routers\u0027)"},{"line_number":3900,"context_line":""},{"line_number":3901,"context_line":"    def test_floatingip_list_queries_constant(self):"},{"line_number":3902,"context_line":"        with self.floatingip_with_assoc(**self.kwargs) as flip:"},{"line_number":3903,"context_line":"            internal_port \u003d self._show(\u0027ports\u0027, flip[\u0027floatingip\u0027][\u0027port_id\u0027])"},{"line_number":3904,"context_line":"            internal_net_id \u003d internal_port[\u0027port\u0027][\u0027network_id\u0027]"}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_0913ad0f","side":"PARENT","line":3901,"updated":"2017-09-21 19:57:02.000000000","message":"I assume you removed it because get_objects has its own test in test_base for constant queries number?","commit_id":"f9838f40aba9c7d945c12de4c5b6c78abf18859b"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f742c4b571bb43b017fad86eef3d23c315243209","unresolved":false,"context_lines":[{"line_number":2469,"context_line":"                    fip_id \u003d fip[\u0027floatingip\u0027][\u0027id\u0027]"},{"line_number":2470,"context_line":"                    router_id \u003d body[\u0027floatingip\u0027][\u0027router_id\u0027]"},{"line_number":2471,"context_line":"                    body \u003d self._show(\u0027routers\u0027, router_id)"},{"line_number":2472,"context_line":"                    notify.assert_any_call("},{"line_number":2473,"context_line":"                        resources.FLOATING_IP,"},{"line_number":2474,"context_line":"                        events.AFTER_UPDATE,"},{"line_number":2475,"context_line":"                        mock.ANY,"}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_a96c999c","line":2472,"updated":"2017-09-21 19:57:02.000000000","message":"I don\u0027t think that payload passed to notify() should change [extensions may assume those IP addresses are strings not IPAddress objects], so those conversions to IPAddress probably hide the fact that you miss str() in several places in the production code.","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9ddc23d159d9e9006618639484f4d99c5dbcdfbb","unresolved":false,"context_lines":[{"line_number":2469,"context_line":"                    fip_id \u003d fip[\u0027floatingip\u0027][\u0027id\u0027]"},{"line_number":2470,"context_line":"                    router_id \u003d body[\u0027floatingip\u0027][\u0027router_id\u0027]"},{"line_number":2471,"context_line":"                    body \u003d self._show(\u0027routers\u0027, router_id)"},{"line_number":2472,"context_line":"                    notify.assert_any_call("},{"line_number":2473,"context_line":"                        resources.FLOATING_IP,"},{"line_number":2474,"context_line":"                        events.AFTER_UPDATE,"},{"line_number":2475,"context_line":"                        mock.ANY,"}],"source_content_type":"text/x-python","patch_set":34,"id":"5f4e5783_dd5306e2","line":2472,"in_reply_to":"7f515b1d_a96c999c","updated":"2017-10-11 07:38:50.000000000","message":"Exactly. Will revert the changes here.","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f742c4b571bb43b017fad86eef3d23c315243209","unresolved":false,"context_lines":[{"line_number":2506,"context_line":"                        context\u003dmock.ANY,"},{"line_number":2507,"context_line":"                        fixed_ip_address\u003dNone,"},{"line_number":2508,"context_line":"                        fixed_port_id\u003dNone,"},{"line_number":2509,"context_line":"                        floating_ip_address\u003dnetaddr.IPAddress(fip_addr),"},{"line_number":2510,"context_line":"                        floating_network_id\u003dfip_network_id,"},{"line_number":2511,"context_line":"                        last_known_router_id\u003drouter_id,"},{"line_number":2512,"context_line":"                        floating_ip_id\u003dfip_id,"}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_8969dd8c","line":2509,"updated":"2017-09-21 19:57:02.000000000","message":"ditto","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9ddc23d159d9e9006618639484f4d99c5dbcdfbb","unresolved":false,"context_lines":[{"line_number":2506,"context_line":"                        context\u003dmock.ANY,"},{"line_number":2507,"context_line":"                        fixed_ip_address\u003dNone,"},{"line_number":2508,"context_line":"                        fixed_port_id\u003dNone,"},{"line_number":2509,"context_line":"                        floating_ip_address\u003dnetaddr.IPAddress(fip_addr),"},{"line_number":2510,"context_line":"                        floating_network_id\u003dfip_network_id,"},{"line_number":2511,"context_line":"                        last_known_router_id\u003drouter_id,"},{"line_number":2512,"context_line":"                        floating_ip_id\u003dfip_id,"}],"source_content_type":"text/x-python","patch_set":34,"id":"5f4e5783_1d73de82","line":2509,"in_reply_to":"7f515b1d_8969dd8c","updated":"2017-10-11 07:38:50.000000000","message":"Done","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f76263a9240d61a2fe4dfac6b3a1d8a50d9f0f20","unresolved":false,"context_lines":[{"line_number":3898,"context_line":""},{"line_number":3899,"context_line":"            self._assert_object_list_queries_constant(router_maker, \u0027routers\u0027)"},{"line_number":3900,"context_line":""},{"line_number":3901,"context_line":"    def test_floatingip_list_queries_constant(self):"},{"line_number":3902,"context_line":"        with self.floatingip_with_assoc(**self.kwargs) as flip:"},{"line_number":3903,"context_line":"            internal_port \u003d self._show(\u0027ports\u0027, flip[\u0027floatingip\u0027][\u0027port_id\u0027])"},{"line_number":3904,"context_line":"            internal_net_id \u003d internal_port[\u0027port\u0027][\u0027network_id\u0027]"}],"source_content_type":"text/x-python","patch_set":35,"id":"5f4e5783_bad41e21","side":"PARENT","line":3901,"updated":"2017-10-16 21:07:50.000000000","message":"and why exactly do we get rid of the test case?","commit_id":"f9838f40aba9c7d945c12de4c5b6c78abf18859b"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9af33007d00e365a749ca5d142d2b2aa6a1b2820","unresolved":false,"context_lines":[{"line_number":3898,"context_line":""},{"line_number":3899,"context_line":"            self._assert_object_list_queries_constant(router_maker, \u0027routers\u0027)"},{"line_number":3900,"context_line":""},{"line_number":3901,"context_line":"    def test_floatingip_list_queries_constant(self):"},{"line_number":3902,"context_line":"        with self.floatingip_with_assoc(**self.kwargs) as flip:"},{"line_number":3903,"context_line":"            internal_port \u003d self._show(\u0027ports\u0027, flip[\u0027floatingip\u0027][\u0027port_id\u0027])"},{"line_number":3904,"context_line":"            internal_net_id \u003d internal_port[\u0027port\u0027][\u0027network_id\u0027]"}],"source_content_type":"text/x-python","patch_set":35,"id":"3f4b6375_27e31708","side":"PARENT","line":3901,"in_reply_to":"5f4e5783_bad41e21","updated":"2017-10-19 05:43:16.000000000","message":"Oops, I forgot to address your comment in last PS. \nThis is because what this test wants to do is not valid now.\n\nHow this test works is to create 1st floatingip, then run a LIST API call and note down the number of queries, num_of_query_1. \n\nThen create 2nd floatingip, run a LIST API call and note down the number of queries, num_of_query_2.\n\nFloatingIP has FloatingIPDNS as a synthetic field now. Everytime, we LIST the current available FloatingIPs, we make additional db query to FloatingIPDNS of this FloatingIP. \n\nnum_of_query_1 \u003d num_of_floatingip_db_query + num_of_floatingip*num_of_floatingipdns_db_query\n\nnum_of_query_2 \u003d num_of_floatingip_db_query + num_of_floatingip(we add one floatingip in each iteration, so this number increments by 1)*num_of_floatingipdns_db_query\n\nthus, it should be expected that num_of_query_1 !\u003d num_of_query_2","commit_id":"f9838f40aba9c7d945c12de4c5b6c78abf18859b"}],"neutron/tests/unit/extensions/test_l3_ext_gw_mode.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"31b969deb425643e0ebee154eab300f6257d7ef2","unresolved":false,"context_lines":[{"line_number":228,"context_line":"        self.fip \u003d l3_objs.FloatingIP("},{"line_number":229,"context_line":"            self.context,"},{"line_number":230,"context_line":"            id\u003d_uuid(),"},{"line_number":231,"context_line":"            floating_ip_address\u003d\u00271.1.1.2\u0027,"},{"line_number":232,"context_line":"            floating_network_id\u003dself.ext_net_id,"},{"line_number":233,"context_line":"            floating_port_id\u003dFAKE_FIP_EXT_PORT_ID,"},{"line_number":234,"context_line":"            fixed_port_id\u003dNone,"}],"source_content_type":"text/x-python","patch_set":18,"id":"ff346bd7_12a79aa9","line":231,"range":{"start_line":231,"start_character":32,"end_line":231,"end_character":41},"updated":"2017-07-27 15:54:28.000000000","message":"netaddr.IPAddress?","commit_id":"bc861a28e4774f5273e3f99b052d26ab91baf465"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"ee109ca51f90d77add54a4f656919bd8c1e66d5f","unresolved":false,"context_lines":[{"line_number":228,"context_line":"        self.fip \u003d l3_objs.FloatingIP("},{"line_number":229,"context_line":"            self.context,"},{"line_number":230,"context_line":"            id\u003d_uuid(),"},{"line_number":231,"context_line":"            floating_ip_address\u003d\u00271.1.1.2\u0027,"},{"line_number":232,"context_line":"            floating_network_id\u003dself.ext_net_id,"},{"line_number":233,"context_line":"            floating_port_id\u003dFAKE_FIP_EXT_PORT_ID,"},{"line_number":234,"context_line":"            fixed_port_id\u003dNone,"}],"source_content_type":"text/x-python","patch_set":18,"id":"ff346bd7_b46ae816","line":231,"range":{"start_line":231,"start_character":32,"end_line":231,"end_character":41},"in_reply_to":"ff346bd7_12a79aa9","updated":"2017-07-28 10:52:12.000000000","message":"Done","commit_id":"bc861a28e4774f5273e3f99b052d26ab91baf465"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"31b969deb425643e0ebee154eab300f6257d7ef2","unresolved":false,"context_lines":[{"line_number":232,"context_line":"            floating_network_id\u003dself.ext_net_id,"},{"line_number":233,"context_line":"            floating_port_id\u003dFAKE_FIP_EXT_PORT_ID,"},{"line_number":234,"context_line":"            fixed_port_id\u003dNone,"},{"line_number":235,"context_line":"            fixed_ip_address\u003d\u00273.3.3.3\u0027,"},{"line_number":236,"context_line":"            router_id\u003dNone)"},{"line_number":237,"context_line":"        self.fip_int_port.create()"},{"line_number":238,"context_line":"        self.fip_int_ip_info.create()"}],"source_content_type":"text/x-python","patch_set":18,"id":"ff346bd7_b2968e3d","line":235,"range":{"start_line":235,"start_character":29,"end_line":235,"end_character":39},"updated":"2017-07-27 15:54:28.000000000","message":"should it be a netaddr.IPAddress?","commit_id":"bc861a28e4774f5273e3f99b052d26ab91baf465"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"ee109ca51f90d77add54a4f656919bd8c1e66d5f","unresolved":false,"context_lines":[{"line_number":232,"context_line":"            floating_network_id\u003dself.ext_net_id,"},{"line_number":233,"context_line":"            floating_port_id\u003dFAKE_FIP_EXT_PORT_ID,"},{"line_number":234,"context_line":"            fixed_port_id\u003dNone,"},{"line_number":235,"context_line":"            fixed_ip_address\u003d\u00273.3.3.3\u0027,"},{"line_number":236,"context_line":"            router_id\u003dNone)"},{"line_number":237,"context_line":"        self.fip_int_port.create()"},{"line_number":238,"context_line":"        self.fip_int_ip_info.create()"}],"source_content_type":"text/x-python","patch_set":18,"id":"ff346bd7_9475a4fc","line":235,"range":{"start_line":235,"start_character":29,"end_line":235,"end_character":39},"in_reply_to":"ff346bd7_b2968e3d","updated":"2017-07-28 10:52:12.000000000","message":"Done","commit_id":"bc861a28e4774f5273e3f99b052d26ab91baf465"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"bf2ff51efcbc0cdaa826a2460e2c8695f425d63d","unresolved":false,"context_lines":[{"line_number":232,"context_line":"            floating_network_id\u003dself.ext_net_id,"},{"line_number":233,"context_line":"            floating_port_id\u003dFAKE_FIP_EXT_PORT_ID,"},{"line_number":234,"context_line":"            fixed_port_id\u003dNone,"},{"line_number":235,"context_line":"            fixed_ip_address\u003dnetaddr.IPAddress(\u00273.3.3.3\u0027),"},{"line_number":236,"context_line":"            router_id\u003dNone)"},{"line_number":237,"context_line":"        self.fip_int_port.create()"},{"line_number":238,"context_line":"        self.fip_int_ip_info.create()"}],"source_content_type":"text/x-python","patch_set":22,"id":"bf3e73b7_f6eff184","line":235,"range":{"start_line":235,"start_character":29,"end_line":235,"end_character":57},"updated":"2017-08-07 18:09:01.000000000","message":"This can be None now that you have an if statement checking for it being None in objects/router.py","commit_id":"70057da1d334c39b3b6f4e98bfd16a0504ff9cb8"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"4e1c27afac48bfff206bc05a1ff65ca022077a50","unresolved":false,"context_lines":[{"line_number":232,"context_line":"            floating_network_id\u003dself.ext_net_id,"},{"line_number":233,"context_line":"            floating_port_id\u003dFAKE_FIP_EXT_PORT_ID,"},{"line_number":234,"context_line":"            fixed_port_id\u003dNone,"},{"line_number":235,"context_line":"            fixed_ip_address\u003dnetaddr.IPAddress(\u00273.3.3.3\u0027),"},{"line_number":236,"context_line":"            router_id\u003dNone)"},{"line_number":237,"context_line":"        self.fip_int_port.create()"},{"line_number":238,"context_line":"        self.fip_int_ip_info.create()"}],"source_content_type":"text/x-python","patch_set":22,"id":"9f436f4f_84d5411e","line":235,"range":{"start_line":235,"start_character":29,"end_line":235,"end_character":57},"in_reply_to":"bf3e73b7_f6eff184","updated":"2017-08-17 08:15:28.000000000","message":"Will address this one in next PS..","commit_id":"70057da1d334c39b3b6f4e98bfd16a0504ff9cb8"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"51b9475c014a9f2afb4dbc45aa4a7362d108115f","unresolved":false,"context_lines":[{"line_number":234,"context_line":"            floating_network_id\u003dself.ext_net_id,"},{"line_number":235,"context_line":"            floating_port_id\u003dFAKE_FIP_EXT_PORT_ID,"},{"line_number":236,"context_line":"            fixed_port_id\u003dNone,"},{"line_number":237,"context_line":"            fixed_ip_address\u003dnetaddr.IPAddress(\u00273.3.3.3\u0027),"},{"line_number":238,"context_line":"            router_id\u003dNone)"},{"line_number":239,"context_line":"        self.fip_int_port.create()"},{"line_number":240,"context_line":"        self.fip_int_ip_info.create()"}],"source_content_type":"text/x-python","patch_set":43,"id":"1f485f77_af0e7d2f","line":237,"updated":"2017-11-14 14:29:13.000000000","message":"why this change is necessary? can be still passed None as fixed_ip_address?","commit_id":"2f8bcce24bb82812af939b9d06861000039b1a84"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"1d38a94a52212ef86c462b8a1909a5a2b12e30bd","unresolved":false,"context_lines":[{"line_number":234,"context_line":"            floating_network_id\u003dself.ext_net_id,"},{"line_number":235,"context_line":"            floating_port_id\u003dFAKE_FIP_EXT_PORT_ID,"},{"line_number":236,"context_line":"            fixed_port_id\u003dNone,"},{"line_number":237,"context_line":"            fixed_ip_address\u003dnetaddr.IPAddress(\u00273.3.3.3\u0027),"},{"line_number":238,"context_line":"            router_id\u003dNone)"},{"line_number":239,"context_line":"        self.fip_int_port.create()"},{"line_number":240,"context_line":"        self.fip_int_ip_info.create()"}],"source_content_type":"text/x-python","patch_set":43,"id":"1f485f77_a15d1248","line":237,"in_reply_to":"1f485f77_753cc2be","updated":"2017-11-17 09:54:36.000000000","message":"thx","commit_id":"2f8bcce24bb82812af939b9d06861000039b1a84"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"1b46a4ddc4a667ad1b4efa914c2717decde446df","unresolved":false,"context_lines":[{"line_number":234,"context_line":"            floating_network_id\u003dself.ext_net_id,"},{"line_number":235,"context_line":"            floating_port_id\u003dFAKE_FIP_EXT_PORT_ID,"},{"line_number":236,"context_line":"            fixed_port_id\u003dNone,"},{"line_number":237,"context_line":"            fixed_ip_address\u003dnetaddr.IPAddress(\u00273.3.3.3\u0027),"},{"line_number":238,"context_line":"            router_id\u003dNone)"},{"line_number":239,"context_line":"        self.fip_int_port.create()"},{"line_number":240,"context_line":"        self.fip_int_ip_info.create()"}],"source_content_type":"text/x-python","patch_set":43,"id":"1f485f77_753cc2be","line":237,"in_reply_to":"1f485f77_af0e7d2f","updated":"2017-11-15 02:27:23.000000000","message":"This was originally carried from previous author. I am double checking if it is necessary.","commit_id":"2f8bcce24bb82812af939b9d06861000039b1a84"}],"neutron/tests/unit/objects/test_base.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f742c4b571bb43b017fad86eef3d23c315243209","unresolved":false,"context_lines":[{"line_number":1422,"context_line":"        fake_fip \u003d \u0027172.23.3.0\u0027"},{"line_number":1423,"context_line":"        ext_net_id \u003d self._create_external_network_id()"},{"line_number":1424,"context_line":"        attrs \u003d {"},{"line_number":1425,"context_line":"            \u0027floating_ip_address\u0027: fake_fip,"},{"line_number":1426,"context_line":"            \u0027floating_network_id\u0027: ext_net_id,"},{"line_number":1427,"context_line":"            \u0027floating_port_id\u0027: self._create_test_port_id("},{"line_number":1428,"context_line":"                network_id\u003dext_net_id)"}],"source_content_type":"text/x-python","patch_set":34,"id":"7f515b1d_692d8145","line":1425,"range":{"start_line":1425,"start_character":35,"end_line":1425,"end_character":43},"updated":"2017-09-21 19:57:02.000000000","message":"shouldn\u0027t we convert to netaddr.IPAddress first?","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"9ddc23d159d9e9006618639484f4d99c5dbcdfbb","unresolved":false,"context_lines":[{"line_number":1422,"context_line":"        fake_fip \u003d \u0027172.23.3.0\u0027"},{"line_number":1423,"context_line":"        ext_net_id \u003d self._create_external_network_id()"},{"line_number":1424,"context_line":"        attrs \u003d {"},{"line_number":1425,"context_line":"            \u0027floating_ip_address\u0027: fake_fip,"},{"line_number":1426,"context_line":"            \u0027floating_network_id\u0027: ext_net_id,"},{"line_number":1427,"context_line":"            \u0027floating_port_id\u0027: self._create_test_port_id("},{"line_number":1428,"context_line":"                network_id\u003dext_net_id)"}],"source_content_type":"text/x-python","patch_set":34,"id":"5f4e5783_ddfc2640","line":1425,"range":{"start_line":1425,"start_character":35,"end_line":1425,"end_character":43},"in_reply_to":"7f515b1d_692d8145","updated":"2017-10-11 07:38:50.000000000","message":"Done","commit_id":"2b8ef89b6f01a8b6de0adab38d66419b584d59ac"}],"neutron/tests/unit/objects/test_objects.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"0f958e238aea382b7c78c19d451b28729d419160","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    \u0027FlatAllocation\u0027: \u00271.0-bf666f24f4642b047eeca62311fbcb41\u0027,"},{"line_number":40,"context_line":"    \u0027Flavor\u0027: \u00271.0-82194de5c9aafce08e8527bb7977f5c6\u0027,"},{"line_number":41,"context_line":"    \u0027FlavorServiceProfileBinding\u0027: \u00271.0-a2c8731e16cefdac4571f80abf1f8930\u0027,"},{"line_number":42,"context_line":"    \u0027FloatingIP\u0027: \u00271.0-0205cc99ec79e8089d641ed1b565ddae\u0027,"},{"line_number":43,"context_line":"    \u0027FloatingIPDNS\u0027: \u00271.0-ee3db848500fa1825235f701828c06d5\u0027,"},{"line_number":44,"context_line":"    \u0027GeneveAllocation\u0027: \u00271.0-d5f76e8eac60a778914d61dd8e23e90f\u0027,"},{"line_number":45,"context_line":"    \u0027GeneveEndpoint\u0027: \u00271.0-040f026996b5952e2ae4ccd40ac61ca6\u0027,"}],"source_content_type":"text/x-python","patch_set":46,"id":"ff82abbf_4b03ad74","line":42,"updated":"2017-11-30 12:05:00.000000000","message":"according to comment in L25-L27, shouldn\u0027t version be bumped if hash is changed?","commit_id":"f2965406699fb9fdb8d6f73c74c19089df1f30f8"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"9ea3333485ce2a55aab69e755badb5a2998cab68","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    \u0027FlatAllocation\u0027: \u00271.0-bf666f24f4642b047eeca62311fbcb41\u0027,"},{"line_number":40,"context_line":"    \u0027Flavor\u0027: \u00271.0-82194de5c9aafce08e8527bb7977f5c6\u0027,"},{"line_number":41,"context_line":"    \u0027FlavorServiceProfileBinding\u0027: \u00271.0-a2c8731e16cefdac4571f80abf1f8930\u0027,"},{"line_number":42,"context_line":"    \u0027FloatingIP\u0027: \u00271.0-0205cc99ec79e8089d641ed1b565ddae\u0027,"},{"line_number":43,"context_line":"    \u0027FloatingIPDNS\u0027: \u00271.0-ee3db848500fa1825235f701828c06d5\u0027,"},{"line_number":44,"context_line":"    \u0027GeneveAllocation\u0027: \u00271.0-d5f76e8eac60a778914d61dd8e23e90f\u0027,"},{"line_number":45,"context_line":"    \u0027GeneveEndpoint\u0027: \u00271.0-040f026996b5952e2ae4ccd40ac61ca6\u0027,"}],"source_content_type":"text/x-python","patch_set":46,"id":"df87a7cf_923b06d0","line":42,"in_reply_to":"ff82abbf_0147abbe","updated":"2017-12-04 08:34:12.000000000","message":"ok, thx for explanation","commit_id":"f2965406699fb9fdb8d6f73c74c19089df1f30f8"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"c072b69edbd3a8f74dfb55b140b3741f7f4a7ace","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    \u0027FlatAllocation\u0027: \u00271.0-bf666f24f4642b047eeca62311fbcb41\u0027,"},{"line_number":40,"context_line":"    \u0027Flavor\u0027: \u00271.0-82194de5c9aafce08e8527bb7977f5c6\u0027,"},{"line_number":41,"context_line":"    \u0027FlavorServiceProfileBinding\u0027: \u00271.0-a2c8731e16cefdac4571f80abf1f8930\u0027,"},{"line_number":42,"context_line":"    \u0027FloatingIP\u0027: \u00271.0-0205cc99ec79e8089d641ed1b565ddae\u0027,"},{"line_number":43,"context_line":"    \u0027FloatingIPDNS\u0027: \u00271.0-ee3db848500fa1825235f701828c06d5\u0027,"},{"line_number":44,"context_line":"    \u0027GeneveAllocation\u0027: \u00271.0-d5f76e8eac60a778914d61dd8e23e90f\u0027,"},{"line_number":45,"context_line":"    \u0027GeneveEndpoint\u0027: \u00271.0-040f026996b5952e2ae4ccd40ac61ca6\u0027,"}],"source_content_type":"text/x-python","patch_set":46,"id":"ff82abbf_0147abbe","line":42,"in_reply_to":"ff82abbf_4b03ad74","updated":"2017-12-01 06:37:45.000000000","message":"This is a trick. Before integration finishes, we normally updates the hash only to avoid unnecessary version bump. In this patch, I added (missed) synthetic filed, FloatingIPDNS to FloatingIP, which should be originally taken care of by creation patch. \n\nThis is not adding new parameters etc.","commit_id":"f2965406699fb9fdb8d6f73c74c19089df1f30f8"}]}
