)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"f54880fff4dd707551376b14924010968fa0cdb8","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix exceptions occuring in the DNAT log"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Use case: Creating a VM, associating a floatin IP with it, and then"},{"line_number":10,"context_line":"deleting that VM, multiple exceptions occured."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Two issues found:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1f485f77_80f7958b","line":9,"range":{"start_line":9,"start_character":39,"end_line":9,"end_character":46},"updated":"2017-11-19 06:15:37.000000000","message":"typo","commit_id":"095c81e0ad1ee018aae3ecc248b43b142415c95d"}],"dragonflow/controller/apps/dnat.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"bb637f2bc6dff11520ae5ab774c20d6a6a967687","unresolved":false,"context_lines":[{"line_number":547,"context_line":"        for floatingip in self._get_floatingips_by_lport(lport):"},{"line_number":548,"context_line":"            self._install_local_floatingip(floatingip)"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"    def _pop_in_process(self, lport_id):"},{"line_number":551,"context_line":"        if lport_id in self.lports_in_process:"},{"line_number":552,"context_line":"            self.lports_in_process.remove(lport_id)"},{"line_number":553,"context_line":"            return lport_id"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f485f77_dbccc5bd","line":550,"updated":"2017-11-15 04:43:59.000000000","message":"I think the following is better (saves a lookup):\n    try:\n        return self.lports_in_process.pop(lport_id)\n    except KeyError:\n        return None","commit_id":"781717e8124c87d39fba068c8aba381491850c77"},{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"79a62a831f023b2af2ee3c5297b540d3bbe55114","unresolved":false,"context_lines":[{"line_number":547,"context_line":"        for floatingip in self._get_floatingips_by_lport(lport):"},{"line_number":548,"context_line":"            self._install_local_floatingip(floatingip)"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"    def _pop_in_process(self, lport_id):"},{"line_number":551,"context_line":"        if lport_id in self.lports_in_process:"},{"line_number":552,"context_line":"            self.lports_in_process.remove(lport_id)"},{"line_number":553,"context_line":"            return lport_id"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f485f77_aa3e54d7","line":550,"in_reply_to":"1f485f77_dbccc5bd","updated":"2017-11-15 07:36:24.000000000","message":"Done","commit_id":"781717e8124c87d39fba068c8aba381491850c77"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"247b02a904093ba2ee034c1bdb31e8a6ca20b131","unresolved":false,"context_lines":[{"line_number":549,"context_line":""},{"line_number":550,"context_line":"    def _pop_in_process(self, lport_id):"},{"line_number":551,"context_line":"        try:"},{"line_number":552,"context_line":"            self.lports_in_process.remove(lport_id)"},{"line_number":553,"context_line":"            return lport_id"},{"line_number":554,"context_line":"        except KeyError:"},{"line_number":555,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_23184f73","line":552,"updated":"2017-11-15 09:22:06.000000000","message":"this function do 2 things : \n1.  return true if port in the set \n2. remove port from the set \n\nI think that better that the remove will be outside of this function even it\u0027s require 2 lookup..","commit_id":"095c81e0ad1ee018aae3ecc248b43b142415c95d"},{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"fe56155081d1fa7032d7f4e94a8c8f8abd84069c","unresolved":false,"context_lines":[{"line_number":549,"context_line":""},{"line_number":550,"context_line":"    def _pop_in_process(self, lport_id):"},{"line_number":551,"context_line":"        try:"},{"line_number":552,"context_line":"            self.lports_in_process.remove(lport_id)"},{"line_number":553,"context_line":"            return lport_id"},{"line_number":554,"context_line":"        except KeyError:"},{"line_number":555,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_d4bb6fc1","line":552,"in_reply_to":"1f485f77_23184f73","updated":"2017-11-15 11:17:17.000000000","message":"The idea is to have an atomic way of understanding if the port is in process or not. There is no use-case for just checking if the port is in process without removing it. separating it would just make the code bigger with no real benefit.","commit_id":"095c81e0ad1ee018aae3ecc248b43b142415c95d"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"247b02a904093ba2ee034c1bdb31e8a6ca20b131","unresolved":false,"context_lines":[{"line_number":557,"context_line":"    @df_base_app.register_event(l2.LogicalPort, l2.EVENT_UNBIND_LOCAL)"},{"line_number":558,"context_line":"    def _local_port_unbound(self, lport):"},{"line_number":559,"context_line":"        # In case the port is flagged as in process, remove flag and ignore"},{"line_number":560,"context_line":"        if self._pop_in_process(lport.id):"},{"line_number":561,"context_line":"            return"},{"line_number":562,"context_line":""},{"line_number":563,"context_line":"        for floatingip in self._get_floatingips_by_lport(lport):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_43558bc5","line":560,"updated":"2017-11-15 09:22:06.000000000","message":"If i understand it right the _pop_in_process use to distinguish between port update on \"vm port\" , then we need to delete all associated  floting-ips ports - \nand floating-ips port - that we don\u0027t need to do with them any unbound operation.  \nJust ask if there is no other way to make a distinguish between the ports ? (maybe device_owner or something like that.)","commit_id":"095c81e0ad1ee018aae3ecc248b43b142415c95d"},{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"fe56155081d1fa7032d7f4e94a8c8f8abd84069c","unresolved":false,"context_lines":[{"line_number":557,"context_line":"    @df_base_app.register_event(l2.LogicalPort, l2.EVENT_UNBIND_LOCAL)"},{"line_number":558,"context_line":"    def _local_port_unbound(self, lport):"},{"line_number":559,"context_line":"        # In case the port is flagged as in process, remove flag and ignore"},{"line_number":560,"context_line":"        if self._pop_in_process(lport.id):"},{"line_number":561,"context_line":"            return"},{"line_number":562,"context_line":""},{"line_number":563,"context_line":"        for floatingip in self._get_floatingips_by_lport(lport):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_b484730d","line":560,"in_reply_to":"1f485f77_43558bc5","updated":"2017-11-15 11:17:17.000000000","message":"The _pop_in_process is used to understand if the port is already in the process of uninstall.\nThe port_unbound will call the uninstall, so if we arrived from the uninstall context, there is no need to do anything.\nPersonally I believe that the code of local_port_unbound is too complicated (though short), but it is a matter for another patch and not this one.","commit_id":"095c81e0ad1ee018aae3ecc248b43b142415c95d"}]}
