)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"f5e3ca79f2b9e9f6c9e94a99e9db6f293a77d7fb","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Manjeet Singh Bhatia \u003cmanjeet.s.bhatia@intel.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2018-01-12 01:25:12 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add notification for floatingip delete"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"As neutron now allows L3 Flavors, but when other backends use L3"},{"line_number":10,"context_line":"flavors, the floating delete only commits db transaction therefore"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7f96bb07_a9553d1f","line":7,"range":{"start_line":7,"start_character":32,"end_line":7,"end_character":38},"updated":"2018-01-15 10:31:12.000000000","message":"FYI update also doesn\u0027t have a precommit notification, only a postcommit one","commit_id":"e6189b7df7fe8cbc648dae4b690fda2bf422d8e3"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"0b7ba2ebc4bce24998d1ed126b60d99e74bd942c","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Manjeet Singh Bhatia \u003cmanjeet.s.bhatia@intel.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2018-01-12 01:25:12 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add notification for floatingip delete"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"As neutron now allows L3 Flavors, but when other backends use L3"},{"line_number":10,"context_line":"flavors, the floating delete only commits db transaction therefore"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7f96bb07_083e72d9","line":7,"range":{"start_line":7,"start_character":32,"end_line":7,"end_character":38},"in_reply_to":"7f96bb07_a9553d1f","updated":"2018-01-16 19:36:09.000000000","message":"It has after_update which can subscribed for precommit","commit_id":"e6189b7df7fe8cbc648dae4b690fda2bf422d8e3"}],"neutron/db/l3_db.py":[{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"47cd313f1e4315de2b249e738c8cfe952b4e29f6","unresolved":false,"context_lines":[{"line_number":1437,"context_line":"        self._core_plugin.delete_port(context.elevated(),"},{"line_number":1438,"context_line":"                                      floatingip.floating_port_id,"},{"line_number":1439,"context_line":"                                      l3_port_check\u003dFalse)"},{"line_number":1440,"context_line":"        registry.notify(resources.FLOATING_IP, events.PRECOMMIT_DELETE,"},{"line_number":1441,"context_line":"                        self, context\u003dcontext, floatingip\u003dfloatingip)"},{"line_number":1442,"context_line":"        return floatingip_dict"},{"line_number":1443,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f96bb07_bf2ccc47","line":1440,"updated":"2018-01-11 23:36:31.000000000","message":"At this point, the FIP might be gone from the DB because the floating ip port was deleted in L1437 and the cascade delete might have already happened. Your notify should be before L1437 if you want to comply with the PRECOMMIT_DELETE semantics","commit_id":"2aac0a3c9b703a63a3a5228b4825502a0f4804f1"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"0e5cbba4b0ddbe4cc855d9c0765458cbf59f279d","unresolved":false,"context_lines":[{"line_number":1437,"context_line":"        self._core_plugin.delete_port(context.elevated(),"},{"line_number":1438,"context_line":"                                      floatingip.floating_port_id,"},{"line_number":1439,"context_line":"                                      l3_port_check\u003dFalse)"},{"line_number":1440,"context_line":"        registry.notify(resources.FLOATING_IP, events.PRECOMMIT_DELETE,"},{"line_number":1441,"context_line":"                        self, context\u003dcontext, floatingip\u003dfloatingip)"},{"line_number":1442,"context_line":"        return floatingip_dict"},{"line_number":1443,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f96bb07_9df6b88f","line":1440,"in_reply_to":"7f96bb07_bf2ccc47","updated":"2018-01-12 01:18:51.000000000","message":"Done","commit_id":"2aac0a3c9b703a63a3a5228b4825502a0f4804f1"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"a0a071a3e078e7442eb79d9e6fd70c7ba2514688","unresolved":false,"context_lines":[{"line_number":1437,"context_line":"        self._core_plugin.delete_port(context.elevated(),"},{"line_number":1438,"context_line":"                                      floatingip.floating_port_id,"},{"line_number":1439,"context_line":"                                      l3_port_check\u003dFalse)"},{"line_number":1440,"context_line":"        registry.notify(resources.FLOATING_IP, events.PRECOMMIT_DELETE,"},{"line_number":1441,"context_line":"                        self, context\u003dcontext, floatingip\u003dfloatingip)"},{"line_number":1442,"context_line":"        return floatingip_dict"},{"line_number":1443,"context_line":""},{"line_number":1444,"context_line":"    @db_api.retry_if_session_inactive()"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f96bb07_ff6494bb","line":1441,"range":{"start_line":1440,"start_character":8,"end_line":1441,"end_character":69},"updated":"2018-01-11 23:33:17.000000000","message":"actually this should be done before deleting port so that if something goes wrong with callback then transaction should be reversed.","commit_id":"2aac0a3c9b703a63a3a5228b4825502a0f4804f1"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"8d7a824efaf1807e99c0fd1689535a94b853e5c3","unresolved":false,"context_lines":[{"line_number":1431,"context_line":"        if self._is_dns_integration_supported:"},{"line_number":1432,"context_line":"            self._process_dns_floatingip_delete(context, floatingip_dict)"},{"line_number":1433,"context_line":"        registry.notify(resources.FLOATING_IP, events.PRECOMMIT_DELETE,"},{"line_number":1434,"context_line":"                        self, context\u003dcontext, floatingip\u003dfloatingip)"},{"line_number":1435,"context_line":"        # Foreign key cascade will take care of the removal of the"},{"line_number":1436,"context_line":"        # floating IP record once the port is deleted. We can\u0027t start"},{"line_number":1437,"context_line":"        # a transaction first to remove it ourselves because the delete_port"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f96bb07_5d735016","line":1434,"range":{"start_line":1434,"start_character":58,"end_line":1434,"end_character":69},"updated":"2018-01-12 01:22:51.000000000","message":"this should be dict as other callbacks pass dict not object","commit_id":"7fb4c21e5a0a9efcfd477225b6ad5fdab5907e25"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"abae7eb66026d4fc41dc60dafc4febbf276b5c06","unresolved":false,"context_lines":[{"line_number":1430,"context_line":"        floatingip_dict \u003d self._make_floatingip_dict(floatingip)"},{"line_number":1431,"context_line":"        if self._is_dns_integration_supported:"},{"line_number":1432,"context_line":"            self._process_dns_floatingip_delete(context, floatingip_dict)"},{"line_number":1433,"context_line":"        registry.notify(resources.FLOATING_IP, events.PRECOMMIT_DELETE,"},{"line_number":1434,"context_line":"                        self, context\u003dcontext, floatingip\u003dfloatingip_dict)"},{"line_number":1435,"context_line":"        # Foreign key cascade will take care of the removal of the"},{"line_number":1436,"context_line":"        # floating IP record once the port is deleted. We can\u0027t start"},{"line_number":1437,"context_line":"        # a transaction first to remove it ourselves because the delete_port"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f96bb07_dda3e04e","line":1434,"range":{"start_line":1433,"start_character":0,"end_line":1434,"end_character":74},"updated":"2018-01-12 01:28:42.000000000","message":"this is executed out side of db transaction.\nwe would have two choices.\n- l3 flavor driver subscribe (PORT, PRECOMMIT_DELETE) and check if it\u0027s floatingip or\n- add callback to ml2 plugin. If the port is for floatingip, trigger callback within db transaction.","commit_id":"e6189b7df7fe8cbc648dae4b690fda2bf422d8e3"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"bcc6933b007b4056c4896082308f7d0ac44e8ee0","unresolved":false,"context_lines":[{"line_number":1430,"context_line":"        floatingip_dict \u003d self._make_floatingip_dict(floatingip)"},{"line_number":1431,"context_line":"        if self._is_dns_integration_supported:"},{"line_number":1432,"context_line":"            self._process_dns_floatingip_delete(context, floatingip_dict)"},{"line_number":1433,"context_line":"        registry.notify(resources.FLOATING_IP, events.PRECOMMIT_DELETE,"},{"line_number":1434,"context_line":"                        self, context\u003dcontext, floatingip\u003dfloatingip_dict)"},{"line_number":1435,"context_line":"        # Foreign key cascade will take care of the removal of the"},{"line_number":1436,"context_line":"        # floating IP record once the port is deleted. We can\u0027t start"},{"line_number":1437,"context_line":"        # a transaction first to remove it ourselves because the delete_port"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f96bb07_9141a30e","line":1434,"range":{"start_line":1433,"start_character":0,"end_line":1434,"end_character":74},"in_reply_to":"7f96bb07_dda3e04e","updated":"2018-01-12 23:41:39.000000000","message":"create and update precommit notify trigger, I think are also outside of db transaction ?","commit_id":"e6189b7df7fe8cbc648dae4b690fda2bf422d8e3"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"7ad32b7c31204fe6c51688816397839b7f981e39","unresolved":false,"context_lines":[{"line_number":172,"context_line":"            LOG.warning(\"Found floating IP port %s without floating IP, \""},{"line_number":173,"context_line":"                        \"deleting.\", port_id)"},{"line_number":174,"context_line":"            self._core_plugin.delete_port("},{"line_number":175,"context_line":"                context, port_id, l3_port_check\u003dFalse)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    def _get_dead_floating_port_candidates(self, context):"},{"line_number":178,"context_line":"        filters \u003d {\u0027device_id\u0027: [\u0027PENDING\u0027],"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f93b717_cd06ac87","line":175,"updated":"2018-01-26 21:36:10.000000000","message":"This would need an AFTER_DELETE notification as well.","commit_id":"abc45f9b15c092825743a826ce5b069f290a1b96"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"7ad32b7c31204fe6c51688816397839b7f981e39","unresolved":false,"context_lines":[{"line_number":1436,"context_line":"        floatingip \u003d self._get_floatingip(context, id)"},{"line_number":1437,"context_line":"        floatingip_dict \u003d self._make_floatingip_dict(floatingip)"},{"line_number":1438,"context_line":"        if self._is_dns_integration_supported:"},{"line_number":1439,"context_line":"            self._process_dns_floatingip_delete(context, floatingip_dict)"},{"line_number":1440,"context_line":"        # Foreign key cascade will take care of the removal of the"},{"line_number":1441,"context_line":"        # floating IP record once the port is deleted. We can\u0027t start"},{"line_number":1442,"context_line":"        # a transaction first to remove it ourselves because the delete_port"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f93b717_0d50145d","line":1439,"updated":"2018-01-26 21:36:10.000000000","message":"A BEFORE_DELETE could go here","commit_id":"abc45f9b15c092825743a826ce5b069f290a1b96"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"466c03e2b926fe5f73a35d63733394b2929be109","unresolved":false,"context_lines":[{"line_number":1436,"context_line":"        floatingip \u003d self._get_floatingip(context, id)"},{"line_number":1437,"context_line":"        floatingip_dict \u003d self._make_floatingip_dict(floatingip)"},{"line_number":1438,"context_line":"        if self._is_dns_integration_supported:"},{"line_number":1439,"context_line":"            self._process_dns_floatingip_delete(context, floatingip_dict)"},{"line_number":1440,"context_line":"        # Foreign key cascade will take care of the removal of the"},{"line_number":1441,"context_line":"        # floating IP record once the port is deleted. We can\u0027t start"},{"line_number":1442,"context_line":"        # a transaction first to remove it ourselves because the delete_port"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f93b717_a838ee3c","line":1439,"in_reply_to":"5f93b717_0d50145d","updated":"2018-01-26 22:22:18.000000000","message":"I think in PS1 It had it here, but for cascade delete thing I guess it had to be in same transaction as port_delete.","commit_id":"abc45f9b15c092825743a826ce5b069f290a1b96"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"7ad32b7c31204fe6c51688816397839b7f981e39","unresolved":false,"context_lines":[{"line_number":1443,"context_line":"        # method will yield in its post-commit activities."},{"line_number":1444,"context_line":"        self._core_plugin.delete_port(context.elevated(),"},{"line_number":1445,"context_line":"                                      floatingip.floating_port_id,"},{"line_number":1446,"context_line":"                                      l3_port_check\u003dFalse)"},{"line_number":1447,"context_line":"        return floatingip_dict"},{"line_number":1448,"context_line":""},{"line_number":1449,"context_line":"    @db_api.retry_if_session_inactive()"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f93b717_adb560cf","line":1446,"updated":"2018-01-26 21:36:10.000000000","message":"The AFTER_DELETE could go here","commit_id":"abc45f9b15c092825743a826ce5b069f290a1b96"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"08b3a7ada441f410ba11ca08649cad11e0d55239","unresolved":false,"context_lines":[{"line_number":1561,"context_line":"            values \u003d {\u0027fixed_port_id\u0027: None,"},{"line_number":1562,"context_line":"                      \u0027fixed_ip_address\u0027: None,"},{"line_number":1563,"context_line":"                      \u0027router_id\u0027: None}"},{"line_number":1564,"context_line":"            l3_obj.FloatingIP.update_objects("},{"line_number":1565,"context_line":"                context, values, fixed_port_id\u003dport_id)"},{"line_number":1566,"context_line":"            return router_ids"},{"line_number":1567,"context_line":""},{"line_number":1568,"context_line":"    def _get_floatingips_by_port_id(self, context, port_id):"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f93b717_e6cf067d","line":1565,"range":{"start_line":1564,"start_character":0,"end_line":1565,"end_character":55},"updated":"2018-01-27 02:04:37.000000000","message":"(FLOATINGIP, PRECOMMIT_UPDATE) is needed.","commit_id":"c04c049298c90b0986d0467f2ac3119fc86ca434"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"f21910ab290d657c24fa1fd3b96181f213005552","unresolved":false,"context_lines":[{"line_number":1561,"context_line":"            values \u003d {\u0027fixed_port_id\u0027: None,"},{"line_number":1562,"context_line":"                      \u0027fixed_ip_address\u0027: None,"},{"line_number":1563,"context_line":"                      \u0027router_id\u0027: None}"},{"line_number":1564,"context_line":"            l3_obj.FloatingIP.update_objects("},{"line_number":1565,"context_line":"                context, values, fixed_port_id\u003dport_id)"},{"line_number":1566,"context_line":"            return router_ids"},{"line_number":1567,"context_line":""},{"line_number":1568,"context_line":"    def _get_floatingips_by_port_id(self, context, port_id):"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f93b717_0a65111e","line":1565,"range":{"start_line":1564,"start_character":0,"end_line":1565,"end_character":55},"in_reply_to":"5f93b717_e6cf067d","updated":"2018-01-30 17:20:01.000000000","message":"Done","commit_id":"c04c049298c90b0986d0467f2ac3119fc86ca434"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"08b3a7ada441f410ba11ca08649cad11e0d55239","unresolved":false,"context_lines":[{"line_number":1563,"context_line":"                      \u0027router_id\u0027: None}"},{"line_number":1564,"context_line":"            l3_obj.FloatingIP.update_objects("},{"line_number":1565,"context_line":"                context, values, fixed_port_id\u003dport_id)"},{"line_number":1566,"context_line":"            return router_ids"},{"line_number":1567,"context_line":""},{"line_number":1568,"context_line":"    def _get_floatingips_by_port_id(self, context, port_id):"},{"line_number":1569,"context_line":"        \"\"\"Helper function to retrieve the fips associated with a port_id.\"\"\""}],"source_content_type":"text/x-python","patch_set":14,"id":"5f93b717_a6c9fe78","line":1566,"range":{"start_line":1566,"start_character":0,"end_line":1566,"end_character":29},"updated":"2018-01-27 02:04:37.000000000","message":"(FLOATINGIP, AFTER_UPDATE) is needed","commit_id":"c04c049298c90b0986d0467f2ac3119fc86ca434"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"f21910ab290d657c24fa1fd3b96181f213005552","unresolved":false,"context_lines":[{"line_number":1563,"context_line":"                      \u0027router_id\u0027: None}"},{"line_number":1564,"context_line":"            l3_obj.FloatingIP.update_objects("},{"line_number":1565,"context_line":"                context, values, fixed_port_id\u003dport_id)"},{"line_number":1566,"context_line":"            return router_ids"},{"line_number":1567,"context_line":""},{"line_number":1568,"context_line":"    def _get_floatingips_by_port_id(self, context, port_id):"},{"line_number":1569,"context_line":"        \"\"\"Helper function to retrieve the fips associated with a port_id.\"\"\""}],"source_content_type":"text/x-python","patch_set":14,"id":"5f93b717_2a6a4ded","line":1566,"range":{"start_line":1566,"start_character":0,"end_line":1566,"end_character":29},"in_reply_to":"5f93b717_a6c9fe78","updated":"2018-01-30 17:20:01.000000000","message":"Done","commit_id":"c04c049298c90b0986d0467f2ac3119fc86ca434"}],"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"7ad32b7c31204fe6c51688816397839b7f981e39","unresolved":false,"context_lines":[{"line_number":1525,"context_line":"            device_owner \u003d port[\u0027device_owner\u0027]"},{"line_number":1526,"context_line":"            if device_owner \u003d\u003d const.DEVICE_OWNER_FLOATINGIP:"},{"line_number":1527,"context_line":"                registry.notify(resources.FLOATING_IP, events.PRECOMMIT_DELETE,"},{"line_number":1528,"context_line":"                                self, port\u003dport)"},{"line_number":1529,"context_line":"            if device_owner \u003d\u003d const.DEVICE_OWNER_DVR_INTERFACE:"},{"line_number":1530,"context_line":"                bindings \u003d db.get_distributed_port_bindings(context,"},{"line_number":1531,"context_line":"                                                            id)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f93b717_8dd184d0","line":1528,"updated":"2018-01-26 21:36:10.000000000","message":"This one is tricky.  We can\u0027t really put a PRECOMMIT_DELETE in the caller, since it\u0027s not in the writer context, but perhaps a BEFORE_DELETE is enough?","commit_id":"abc45f9b15c092825743a826ce5b069f290a1b96"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"2951dedd55a17908f064eb893e38f0b57ec911b9","unresolved":false,"context_lines":[{"line_number":1525,"context_line":"            device_owner \u003d port[\u0027device_owner\u0027]"},{"line_number":1526,"context_line":"            if device_owner \u003d\u003d const.DEVICE_OWNER_FLOATINGIP:"},{"line_number":1527,"context_line":"                registry.notify(resources.FLOATING_IP, events.PRECOMMIT_DELETE,"},{"line_number":1528,"context_line":"                                self, port\u003dport)"},{"line_number":1529,"context_line":"            if device_owner \u003d\u003d const.DEVICE_OWNER_DVR_INTERFACE:"},{"line_number":1530,"context_line":"                bindings \u003d db.get_distributed_port_bindings(context,"},{"line_number":1531,"context_line":"                                                            id)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f93b717_a8b9cee9","line":1528,"in_reply_to":"5f93b717_8dd184d0","updated":"2018-01-26 22:13:31.000000000","message":"i think before_delete will work as well, it just need a change @ backend level.","commit_id":"abc45f9b15c092825743a826ce5b069f290a1b96"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"ff0ccd23dce148ab3274b162125099e097231bcf","unresolved":false,"context_lines":[{"line_number":1525,"context_line":"            device_owner \u003d port[\u0027device_owner\u0027]"},{"line_number":1526,"context_line":"            if device_owner \u003d\u003d const.DEVICE_OWNER_FLOATINGIP:"},{"line_number":1527,"context_line":"                registry.notify(resources.FLOATING_IP, events.PRECOMMIT_DELETE,"},{"line_number":1528,"context_line":"                                self, port\u003dport)"},{"line_number":1529,"context_line":"            if device_owner \u003d\u003d const.DEVICE_OWNER_DVR_INTERFACE:"},{"line_number":1530,"context_line":"                bindings \u003d db.get_distributed_port_bindings(context,"},{"line_number":1531,"context_line":"                                                            id)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f93b717_c3d3dd37","line":1528,"in_reply_to":"5f93b717_a8b9cee9","updated":"2018-01-26 23:15:26.000000000","message":"before_delete doesn\u0027t work. What if before_delete notification called and neutron crashes before this db transaction?\nwe need the callback that is called within the db transaction that deletes floatingip address.\nso before_delete doesn\u0027t work because it\u0027s called outside of the db transaction.","commit_id":"abc45f9b15c092825743a826ce5b069f290a1b96"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"7ad32b7c31204fe6c51688816397839b7f981e39","unresolved":false,"context_lines":[{"line_number":1564,"context_line":"        registry.notify(resources.PORT, events.AFTER_DELETE, self, **kwargs)"},{"line_number":1565,"context_line":"        if port[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_FLOATINGIP:"},{"line_number":1566,"context_line":"            registry.notify(resources.FLOATING_IP, events.AFTER_DELETE,"},{"line_number":1567,"context_line":"                            self, **kwargs)"},{"line_number":1568,"context_line":"        try:"},{"line_number":1569,"context_line":"            # Note that DVR Interface ports will have bindings on"},{"line_number":1570,"context_line":"            # multiple hosts, and so will have multiple mech_contexts,"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f93b717_8d00a469","line":1567,"updated":"2018-01-26 21:36:10.000000000","message":"Actually, looking at this again, seems this should live over in the L3 code since floating IPs are an L3 thing.","commit_id":"abc45f9b15c092825743a826ce5b069f290a1b96"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"2951dedd55a17908f064eb893e38f0b57ec911b9","unresolved":false,"context_lines":[{"line_number":1564,"context_line":"        registry.notify(resources.PORT, events.AFTER_DELETE, self, **kwargs)"},{"line_number":1565,"context_line":"        if port[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_FLOATINGIP:"},{"line_number":1566,"context_line":"            registry.notify(resources.FLOATING_IP, events.AFTER_DELETE,"},{"line_number":1567,"context_line":"                            self, **kwargs)"},{"line_number":1568,"context_line":"        try:"},{"line_number":1569,"context_line":"            # Note that DVR Interface ports will have bindings on"},{"line_number":1570,"context_line":"            # multiple hosts, and so will have multiple mech_contexts,"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f93b717_88b2d2e5","line":1567,"in_reply_to":"5f93b717_8d00a469","updated":"2018-01-26 22:13:31.000000000","message":"Done","commit_id":"abc45f9b15c092825743a826ce5b069f290a1b96"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"4b476c3855aa1cb9139822dc996b78a4f5eac1f0","unresolved":false,"context_lines":[{"line_number":1524,"context_line":"            bound_mech_contexts \u003d []"},{"line_number":1525,"context_line":"            device_owner \u003d port[\u0027device_owner\u0027]"},{"line_number":1526,"context_line":"            if device_owner \u003d\u003d const.DEVICE_OWNER_FLOATINGIP:"},{"line_number":1527,"context_line":"                registry.notify(resources.FLOATING_IP, events.BEFORE_DELETE,"},{"line_number":1528,"context_line":"                                self, port\u003dport)"},{"line_number":1529,"context_line":"            if device_owner \u003d\u003d const.DEVICE_OWNER_DVR_INTERFACE:"},{"line_number":1530,"context_line":"                bindings \u003d db.get_distributed_port_bindings(context,"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f93b717_e3a4d9bb","line":1527,"range":{"start_line":1527,"start_character":62,"end_line":1527,"end_character":76},"updated":"2018-01-26 23:16:43.000000000","message":"PRECOMMIT_DELETE is necessary.","commit_id":"106c607badf7c40b2e1be2ffc0ff9df11b5ef795"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"043e4fdc24f1a3af79336a836aead1d707917ac4","unresolved":false,"context_lines":[{"line_number":1556,"context_line":"            network \u003d self.get_network(context, port[\u0027network_id\u0027])"},{"line_number":1557,"context_line":"            bound_mech_contexts \u003d []"},{"line_number":1558,"context_line":"            device_owner \u003d port[\u0027device_owner\u0027]"},{"line_number":1559,"context_line":"            if device_owner \u003d\u003d const.DEVICE_OWNER_FLOATINGIP:"},{"line_number":1560,"context_line":"                registry.notify(resources.FLOATING_IP, events.PRECOMMIT_DELETE,"},{"line_number":1561,"context_line":"                                self, port\u003dport)"},{"line_number":1562,"context_line":"            if device_owner \u003d\u003d const.DEVICE_OWNER_DVR_INTERFACE:"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f93b717_9cd38a60","line":1559,"updated":"2018-01-31 19:51:29.000000000","message":"Is there a reason not to notify the PRECOMMIT_DELETE event for the port and have a callback in l3_db that receives this event and notifies PRECOMMIT_DELETE for floating IP if device_owner \u003d\u003d const.DEVICE_OWNER_FLOATINGIP:","commit_id":"2d63c1439c6033aea7b0324c813383c06c3d969c"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"85c92347f531c25833e0ad175fb1fa8d77a61577","unresolved":false,"context_lines":[{"line_number":1556,"context_line":"            network \u003d self.get_network(context, port[\u0027network_id\u0027])"},{"line_number":1557,"context_line":"            bound_mech_contexts \u003d []"},{"line_number":1558,"context_line":"            device_owner \u003d port[\u0027device_owner\u0027]"},{"line_number":1559,"context_line":"            if device_owner \u003d\u003d const.DEVICE_OWNER_FLOATINGIP:"},{"line_number":1560,"context_line":"                registry.notify(resources.FLOATING_IP, events.PRECOMMIT_DELETE,"},{"line_number":1561,"context_line":"                                self, port\u003dport)"},{"line_number":1562,"context_line":"            if device_owner \u003d\u003d const.DEVICE_OWNER_DVR_INTERFACE:"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f93b717_d21edbb9","line":1559,"in_reply_to":"5f93b717_9cd38a60","updated":"2018-01-31 21:30:35.000000000","message":"Yes, there is.\n\ndelete_floatingip in l3_db doesn\u0027t begin db transaction.\n_delete_floatingip() just calls self._core_plugin.delete_port() without beginning db transaction. top level api of core plugin assumes that db transaction doesn\u0027t started. so we can\u0027t call core_plugin.delete_port() under db transaction.\n\n\n\nOn the other hand, PRECOMMIT_DELETE needs to be called within db transaction that deletes floatingip.\nThe db transaction begun by line 1543 is the one where floatingip is deleted by cascading.","commit_id":"2d63c1439c6033aea7b0324c813383c06c3d969c"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"f8012da4286316b3f75ced74b452c327acfef316","unresolved":false,"context_lines":[{"line_number":1556,"context_line":"            network \u003d self.get_network(context, port[\u0027network_id\u0027])"},{"line_number":1557,"context_line":"            bound_mech_contexts \u003d []"},{"line_number":1558,"context_line":"            device_owner \u003d port[\u0027device_owner\u0027]"},{"line_number":1559,"context_line":"            if device_owner \u003d\u003d const.DEVICE_OWNER_FLOATINGIP:"},{"line_number":1560,"context_line":"                registry.notify(resources.FLOATING_IP, events.PRECOMMIT_DELETE,"},{"line_number":1561,"context_line":"                                self, port\u003dport)"},{"line_number":1562,"context_line":"            if device_owner \u003d\u003d const.DEVICE_OWNER_DVR_INTERFACE:"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f93b717_c7be04d4","line":1559,"in_reply_to":"5f93b717_b14d433f","updated":"2018-02-01 14:48:57.000000000","message":"Done","commit_id":"2d63c1439c6033aea7b0324c813383c06c3d969c"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"fe62a7b1a52ac3324fed778ad53a87a5421b6fd2","unresolved":false,"context_lines":[{"line_number":1556,"context_line":"            network \u003d self.get_network(context, port[\u0027network_id\u0027])"},{"line_number":1557,"context_line":"            bound_mech_contexts \u003d []"},{"line_number":1558,"context_line":"            device_owner \u003d port[\u0027device_owner\u0027]"},{"line_number":1559,"context_line":"            if device_owner \u003d\u003d const.DEVICE_OWNER_FLOATINGIP:"},{"line_number":1560,"context_line":"                registry.notify(resources.FLOATING_IP, events.PRECOMMIT_DELETE,"},{"line_number":1561,"context_line":"                                self, port\u003dport)"},{"line_number":1562,"context_line":"            if device_owner \u003d\u003d const.DEVICE_OWNER_DVR_INTERFACE:"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f93b717_b14d433f","line":1559,"in_reply_to":"5f93b717_d21edbb9","updated":"2018-02-01 08:05:12.000000000","message":"Isaku, I think Miguel meant that l3_db module can have a method accepting the PORT PRECOMMIT_DELETE notification that will be sent from here (instead of a FIP PRECOMMIT_DELETE as you\u0027ve added), and that method will then have this logic there.\n\nTo me that seems like a good idea since it keeps the FIP related logic in the l3_db module.","commit_id":"2d63c1439c6033aea7b0324c813383c06c3d969c"}],"neutron/tests/unit/plugins/ml2/test_plugin.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"64796f0e65ecd2fe95eb991e3f1783c5991b0bab","unresolved":false,"context_lines":[{"line_number":1546,"context_line":"                                       mock.ANY, context\u003dself.context,"},{"line_number":1547,"context_line":"                                       port\u003dport[\u0027port\u0027],"},{"line_number":1548,"context_line":"                                       router_ids\u003drouter_ids)]"},{"line_number":1549,"context_line":"                expected \u003d expected + fip_calls"},{"line_number":1550,"context_line":"            notify.assert_has_calls(expected, any_order\u003dTrue)"},{"line_number":1551,"context_line":""},{"line_number":1552,"context_line":"    def test_delete_port_with_floatingip_notifies_l3_plugin(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f96bb07_4d3b909b","line":1549,"updated":"2018-01-22 14:47:11.000000000","message":"Should use expected.extend([...])","commit_id":"df192dba43b676cf69fb6d23b7a8a0db8fa75ef9"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"595b67a1e0b7d9b142344cfdab050b46c5f0956d","unresolved":false,"context_lines":[{"line_number":1538,"context_line":"                                  port\u003dport[\u0027port\u0027],"},{"line_number":1539,"context_line":"                                  router_ids\u003drouter_ids)]"},{"line_number":1540,"context_line":"            if floating_ip:"},{"line_number":1541,"context_line":"                fip_calls \u003d [mock.call(resources.FLOATING_IP,"},{"line_number":1542,"context_line":"                                       events.PRECOMMIT_DELETE, mock.ANY,"},{"line_number":1543,"context_line":"                                       port\u003dport[\u0027port\u0027]),"},{"line_number":1544,"context_line":"                             mock.call(resources.FLOATING_IP,"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_e0927a9f","line":1541,"updated":"2018-01-23 14:28:18.000000000","message":"nit: could just put expected.extend([...]) instead of using fip_calls since it isn\u0027t used again.","commit_id":"8ba2f40fb6a44a779c67bd84f508683ec6a92089"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"94acc2a7cde32b7830165ae1039bcd44f5ca8b07","unresolved":false,"context_lines":[{"line_number":1538,"context_line":"                                  port\u003dport[\u0027port\u0027],"},{"line_number":1539,"context_line":"                                  router_ids\u003drouter_ids)]"},{"line_number":1540,"context_line":"            if floating_ip:"},{"line_number":1541,"context_line":"                fip_calls \u003d [mock.call(resources.FLOATING_IP,"},{"line_number":1542,"context_line":"                                       events.PRECOMMIT_DELETE, mock.ANY,"},{"line_number":1543,"context_line":"                                       port\u003dport[\u0027port\u0027]),"},{"line_number":1544,"context_line":"                             mock.call(resources.FLOATING_IP,"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_44bb3bc3","line":1541,"in_reply_to":"7f96bb07_e0927a9f","updated":"2018-01-23 17:51:53.000000000","message":"Done","commit_id":"8ba2f40fb6a44a779c67bd84f508683ec6a92089"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"595b67a1e0b7d9b142344cfdab050b46c5f0956d","unresolved":false,"context_lines":[{"line_number":1547,"context_line":"                                       port\u003dport[\u0027port\u0027],"},{"line_number":1548,"context_line":"                                       router_ids\u003drouter_ids)]"},{"line_number":1549,"context_line":"                expected.extend(fip_calls)"},{"line_number":1550,"context_line":"            notify.assert_has_calls(expected, any_order\u003dTrue)"},{"line_number":1551,"context_line":""},{"line_number":1552,"context_line":"    def test_delete_port_with_floatingip_notifies_l3_plugin(self):"},{"line_number":1553,"context_line":"        self.test_delete_port_notifies_l3_plugin(floating_ip\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_2044e21a","line":1550,"updated":"2018-01-23 14:28:18.000000000","message":"Why any_order\u003dTrue?  Oh, is it because you have BEFORE_DELETE, AFTER_DELETE and then these two?  I think you should put them in order in the test.","commit_id":"8ba2f40fb6a44a779c67bd84f508683ec6a92089"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"94acc2a7cde32b7830165ae1039bcd44f5ca8b07","unresolved":false,"context_lines":[{"line_number":1547,"context_line":"                                       port\u003dport[\u0027port\u0027],"},{"line_number":1548,"context_line":"                                       router_ids\u003drouter_ids)]"},{"line_number":1549,"context_line":"                expected.extend(fip_calls)"},{"line_number":1550,"context_line":"            notify.assert_has_calls(expected, any_order\u003dTrue)"},{"line_number":1551,"context_line":""},{"line_number":1552,"context_line":"    def test_delete_port_with_floatingip_notifies_l3_plugin(self):"},{"line_number":1553,"context_line":"        self.test_delete_port_notifies_l3_plugin(floating_ip\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_c49d0b58","line":1550,"in_reply_to":"7f96bb07_2044e21a","updated":"2018-01-23 17:51:53.000000000","message":"yes, precommit_delete for fip is called before after_delete of port, order of calls can be assured by maintaining the order in expected list. I\u0027ll add a comment as well.","commit_id":"8ba2f40fb6a44a779c67bd84f508683ec6a92089"}]}
