)]}'
{"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2817eb6ef63df1b24226ff882ce491e999aadca9","unresolved":false,"context_lines":[{"line_number":1053,"context_line":"                                           for ip in a.port.fixed_ips"},{"line_number":1054,"context_line":"                                           if ip.subnet_id !\u003d id]}}"},{"line_number":1055,"context_line":"                    try:"},{"line_number":1056,"context_line":"                        port_id \u003d a.port_id"},{"line_number":1057,"context_line":"                        self.update_port(context, port_id, data)"},{"line_number":1058,"context_line":"                    except exc.PortNotFound:"},{"line_number":1059,"context_line":"                        LOG.debug(\"Port %s deleted concurrently\", port_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_902e8240","line":1056,"range":{"start_line":1056,"start_character":24,"end_line":1056,"end_character":31},"updated":"2016-06-28 17:17:49.000000000","message":"I\u0027ll add a note here to keep others from trying to inline this later.","commit_id":"b24e01089616af350f4fe2607c8cdc0fcfda491f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"deccbd5beca112a1f49fdccde579691b187fa6be","unresolved":false,"context_lines":[{"line_number":1056,"context_line":"                        port_id \u003d a.port_id"},{"line_number":1057,"context_line":"                        self.update_port(context, port_id, data)"},{"line_number":1058,"context_line":"                    except exc.PortNotFound:"},{"line_number":1059,"context_line":"                        LOG.debug(\"Port %s deleted concurrently\", port_id)"},{"line_number":1060,"context_line":"                    except Exception:"},{"line_number":1061,"context_line":"                        with excutils.save_and_reraise_exception():"},{"line_number":1062,"context_line":"                            LOG.exception(_LE(\"Exception deleting fixed_ip \""}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_988f8829","line":1059,"updated":"2016-06-23 22:00:47.000000000","message":"Any suggestions how to unit test this?  The patch that introduced this didn\u0027t have any unit tests either [1].  Honestly, I don\u0027t see much unit testing for this code at all.  That scares me a little bit.\n\nIf there were existing unit tests for this area of code, I\u0027d add a test that mocks update_port, invalidates a.port_id, and then raises PortNotFound.  Then, it would assert that doesn\u0027t blow up.  But, adding such a unit test is no small undertaking right now because I can\u0027t find existing tests for this method and this method is so huge that it will take more time than I have right now to write a test.\n\n [1] https://review.openstack.org/#/c/219477/","commit_id":"b24e01089616af350f4fe2607c8cdc0fcfda491f"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"1016c16833c1b1b4d91d9e59c1c3077bb2d5582f","unresolved":false,"context_lines":[{"line_number":1052,"context_line":"                                            \u0027ip_address\u0027: ip.ip_address}"},{"line_number":1053,"context_line":"                                           for ip in a.port.fixed_ips"},{"line_number":1054,"context_line":"                                           if ip.subnet_id !\u003d id]}}"},{"line_number":1055,"context_line":"                    try:"},{"line_number":1056,"context_line":"                        port_id \u003d a.port_id"},{"line_number":1057,"context_line":"                        self.update_port(context, port_id, data)"},{"line_number":1058,"context_line":"                    except exc.PortNotFound:"},{"line_number":1059,"context_line":"                        LOG.debug(\"Port %s deleted concurrently\", port_id)"},{"line_number":1060,"context_line":"                    except Exception:"},{"line_number":1061,"context_line":"                        with excutils.save_and_reraise_exception():"},{"line_number":1062,"context_line":"                            LOG.exception(_LE(\"Exception deleting fixed_ip \""}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_9b29148d","line":1059,"range":{"start_line":1055,"start_character":20,"end_line":1059,"end_character":74},"updated":"2016-06-24 17:52:16.000000000","message":"at the moment I also feel no test is required. the other way i see is to wrap this into a another function write a test upon that if after update the id still persists? not sure how useful that will be.","commit_id":"b24e01089616af350f4fe2607c8cdc0fcfda491f"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"2cb0d7c29a8067d7f08c28638f0f5b0307d879d1","unresolved":false,"context_lines":[{"line_number":1052,"context_line":"                                            \u0027ip_address\u0027: ip.ip_address}"},{"line_number":1053,"context_line":"                                           for ip in a.port.fixed_ips"},{"line_number":1054,"context_line":"                                           if ip.subnet_id !\u003d id]}}"},{"line_number":1055,"context_line":"                    try:"},{"line_number":1056,"context_line":"                        port_id \u003d a.port_id"},{"line_number":1057,"context_line":"                        self.update_port(context, port_id, data)"},{"line_number":1058,"context_line":"                    except exc.PortNotFound:"},{"line_number":1059,"context_line":"                        LOG.debug(\"Port %s deleted concurrently\", port_id)"},{"line_number":1060,"context_line":"                    except Exception:"},{"line_number":1061,"context_line":"                        with excutils.save_and_reraise_exception():"},{"line_number":1062,"context_line":"                            LOG.exception(_LE(\"Exception deleting fixed_ip \""}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_30722e7d","line":1059,"range":{"start_line":1055,"start_character":20,"end_line":1059,"end_character":74},"in_reply_to":"3aaa91ec_9b29148d","updated":"2016-06-28 17:21:35.000000000","message":"OK, it seems the best approach would be to refactor this code to make it more modular and easier to test. I am fine with that being done in a follow-up patch, so we can unwedge the current patches now.","commit_id":"b24e01089616af350f4fe2607c8cdc0fcfda491f"}]}
