)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6670,"name":"Amir Sadoughi","email":"amir.sadoughi@rackspace.com","username":"amir-sadoughi"},"change_message_id":"8982201720ade8a4627ceb2e4e4a399a0a8cc745","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Improve handling of security group updates"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently updates to security group rules or memebership"},{"line_number":10,"context_line":"are handled by immediately triggering a call to refresh_firewall."},{"line_number":11,"context_line":"This call is quite expensive, and it is often executed with a"},{"line_number":12,"context_line":"very high frequency."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAAT3%2F%2Frf0%3D","line":9,"updated":"2014-01-03 16:20:26.000000000","message":"membership","commit_id":"c8a0ba111a1423dd5990059ec7c43f57db258ce6"}],"neutron/agent/securitygroups_rpc.py":[{"author":{"_account_id":2733,"name":"Darragh O\u0027Reilly","email":"doreilly@suse.com","username":"darragh-oreilly"},"change_message_id":"d2ebd4b73584b43af8a13ee7951181638c4db9e1","unresolved":false,"context_lines":[{"line_number":164,"context_line":"    def refresh_firewall(self, devices\u003dNone):"},{"line_number":165,"context_line":"        LOG.info(_(\"Refresh firewall rules\"))"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        if devices:"},{"line_number":168,"context_line":"            device_ids \u003d [d[\u0027device\u0027] for d in devices]"},{"line_number":169,"context_line":"        else:"},{"line_number":170,"context_line":"            device_ids \u003d self.firewall.ports.keys()"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F8vQM%3D","side":"PARENT","line":167,"updated":"2013-12-20 21:04:56.000000000","message":"Maybe I\u0027m missing something here, but is this case (devices!\u003dNone) still backward compatible for other agents that still need it?","commit_id":"4d3060eb4765e1a4eed06855ad11690acd7d1d7f"},{"author":{"_account_id":2733,"name":"Darragh O\u0027Reilly","email":"doreilly@suse.com","username":"darragh-oreilly"},"change_message_id":"1554a96fcb4d52c23669bd30e00ab79cb9de0696","unresolved":false,"context_lines":[{"line_number":164,"context_line":"    def refresh_firewall(self, devices\u003dNone):"},{"line_number":165,"context_line":"        LOG.info(_(\"Refresh firewall rules\"))"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        if devices:"},{"line_number":168,"context_line":"            device_ids \u003d [d[\u0027device\u0027] for d in devices]"},{"line_number":169,"context_line":"        else:"},{"line_number":170,"context_line":"            device_ids \u003d self.firewall.ports.keys()"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F8tmc%3D","side":"PARENT","line":167,"in_reply_to":"AAAATn%2F8vIU%3D","updated":"2013-12-21 17:43:14.000000000","message":"Ok I understand now, thanks. I agree that your new way is better.","commit_id":"4d3060eb4765e1a4eed06855ad11690acd7d1d7f"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"4b7ec287e1cd6fda9e736cd72f3a50f0355373cd","unresolved":false,"context_lines":[{"line_number":164,"context_line":"    def refresh_firewall(self, devices\u003dNone):"},{"line_number":165,"context_line":"        LOG.info(_(\"Refresh firewall rules\"))"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        if devices:"},{"line_number":168,"context_line":"            device_ids \u003d [d[\u0027device\u0027] for d in devices]"},{"line_number":169,"context_line":"        else:"},{"line_number":170,"context_line":"            device_ids \u003d self.firewall.ports.keys()"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F8vIU%3D","side":"PARENT","line":167,"in_reply_to":"AAAATn%2F8vQM%3D","updated":"2013-12-20 21:44:59.000000000","message":"No you\u0027re right.\nI grepped the source code and verified the other agents never called devices with a parameter different from None, so no harm done here.\n\nI honestly think the logic behind doing all ports when none is specified is a bit flawed in the first place. However, that would be outside the scope of this patch.","commit_id":"4d3060eb4765e1a4eed06855ad11690acd7d1d7f"},{"author":{"_account_id":2733,"name":"Darragh O\u0027Reilly","email":"doreilly@suse.com","username":"darragh-oreilly"},"change_message_id":"1554a96fcb4d52c23669bd30e00ab79cb9de0696","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        sec_grp_set \u003d set(security_groups)"},{"line_number":150,"context_line":"        for device in self.firewall.ports.values():"},{"line_number":151,"context_line":"            if sec_grp_set \u0026 set(device.get(attribute, [])):"},{"line_number":152,"context_line":"                devices.append(device)"},{"line_number":153,"context_line":"        if self.defer_refresh_firewall:"},{"line_number":154,"context_line":"            LOG.debug(_(\"Adding %s devices to the list of devices \""},{"line_number":155,"context_line":"                        \"for which firewall needs to be refreshed\"),"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F8tmU%3D","line":152,"updated":"2013-12-21 17:43:14.000000000","message":"so we don\u0027t need to store the whole dict for each device - but just device[\u0027device\u0027] as only a list of ids is needed on lines 157 and 159.","commit_id":"8e7110bd7dbdaf7eae40729778dcaa90f58dfef7"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"9b794557fca8e60d046e5858a7fa0a9f82fbae36","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        sec_grp_set \u003d set(security_groups)"},{"line_number":150,"context_line":"        for device in self.firewall.ports.values():"},{"line_number":151,"context_line":"            if sec_grp_set \u0026 set(device.get(attribute, [])):"},{"line_number":152,"context_line":"                devices.append(device)"},{"line_number":153,"context_line":"        if self.defer_refresh_firewall:"},{"line_number":154,"context_line":"            LOG.debug(_(\"Adding %s devices to the list of devices \""},{"line_number":155,"context_line":"                        \"for which firewall needs to be refreshed\"),"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F8tj4%3D","line":152,"in_reply_to":"AAAATn%2F8tmU%3D","updated":"2013-12-21 19:52:20.000000000","message":"makes sense","commit_id":"8e7110bd7dbdaf7eae40729778dcaa90f58dfef7"},{"author":{"_account_id":2733,"name":"Darragh O\u0027Reilly","email":"doreilly@suse.com","username":"darragh-oreilly"},"change_message_id":"d2ebd4b73584b43af8a13ee7951181638c4db9e1","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        # TODO(salv-orlando): consider a solution for ensuring notifications"},{"line_number":211,"context_line":"        # are processed exactly in the same order in which they were"},{"line_number":212,"context_line":"        # received. This is tricky because there are two notification"},{"line_number":213,"context_line":"        # sources: the neutron server, and the ovs db monitor process"},{"line_number":214,"context_line":"        if new_devices:"},{"line_number":215,"context_line":"            LOG.debug(_(\"Preparing device filters for %d new devices\"),"},{"line_number":216,"context_line":"                      len(new_devices))"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F8vPI%3D","line":213,"updated":"2013-12-20 21:04:56.000000000","message":"This comment is specific to the ovs-agent, but this module is not, and ovs_db_monitor is not a source for firewall notifications.","commit_id":"8e7110bd7dbdaf7eae40729778dcaa90f58dfef7"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"4b7ec287e1cd6fda9e736cd72f3a50f0355373cd","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        # TODO(salv-orlando): consider a solution for ensuring notifications"},{"line_number":211,"context_line":"        # are processed exactly in the same order in which they were"},{"line_number":212,"context_line":"        # received. This is tricky because there are two notification"},{"line_number":213,"context_line":"        # sources: the neutron server, and the ovs db monitor process"},{"line_number":214,"context_line":"        if new_devices:"},{"line_number":215,"context_line":"            LOG.debug(_(\"Preparing device filters for %d new devices\"),"},{"line_number":216,"context_line":"                      len(new_devices))"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F8vIA%3D","line":213,"in_reply_to":"AAAATn%2F8vPI%3D","updated":"2013-12-20 21:44:59.000000000","message":"Correct. I put this comment in the wrong place.","commit_id":"8e7110bd7dbdaf7eae40729778dcaa90f58dfef7"},{"author":{"_account_id":2733,"name":"Darragh O\u0027Reilly","email":"doreilly@suse.com","username":"darragh-oreilly"},"change_message_id":"05ee62704dc12a3c2c09c108ca3e7bf6caaaf148","unresolved":false,"context_lines":[{"line_number":227,"context_line":"                          len(updated_devices))"},{"line_number":228,"context_line":"                self.refresh_firewall(updated_devices)"},{"line_number":229,"context_line":"        # Clear data structures for devices to refresh"},{"line_number":230,"context_line":"        self.devices_to_refilter.clear()"},{"line_number":231,"context_line":"        self.global_refresh_firewall \u003d False"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F8tAw%3D","line":230,"updated":"2013-12-22 14:24:52.000000000","message":"so during the time when refresh_firewall() is running, new updates could come in, and then this line will clear them too. So I think this line needs to be moved to immediately after 224 (or something).","commit_id":"f694e7830bff0a3cc5d5a83fa2abe8b4b6cdb432"},{"author":{"_account_id":2733,"name":"Darragh O\u0027Reilly","email":"doreilly@suse.com","username":"darragh-oreilly"},"change_message_id":"05ee62704dc12a3c2c09c108ca3e7bf6caaaf148","unresolved":false,"context_lines":[{"line_number":228,"context_line":"                self.refresh_firewall(updated_devices)"},{"line_number":229,"context_line":"        # Clear data structures for devices to refresh"},{"line_number":230,"context_line":"        self.devices_to_refilter.clear()"},{"line_number":231,"context_line":"        self.global_refresh_firewall \u003d False"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"class SecurityGroupAgentRpcApiMixin(object):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F8tAk%3D","line":231,"updated":"2013-12-22 14:24:52.000000000","message":"ditto - move to line 218","commit_id":"f694e7830bff0a3cc5d5a83fa2abe8b4b6cdb432"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"c70209f2ed91044377b7c1bf2ea4a49636014b4c","unresolved":false,"context_lines":[{"line_number":228,"context_line":"                self.refresh_firewall(updated_devices)"},{"line_number":229,"context_line":"        # Clear data structures for devices to refresh"},{"line_number":230,"context_line":"        self.devices_to_refilter.clear()"},{"line_number":231,"context_line":"        self.global_refresh_firewall \u003d False"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"class SecurityGroupAgentRpcApiMixin(object):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F8svE%3D","line":231,"in_reply_to":"AAAATn%2F8tAk%3D","updated":"2013-12-22 20:44:00.000000000","message":"That\u0027s a rather good point.\nI\u0027d honestly go for a locking mechanism here, but file based locks are expensive, so your suggestion is welcome.\n\nOn the other hand, my long plan idea is to have a queue of ports to process, which in my opinion would be a lot more robust.","commit_id":"f694e7830bff0a3cc5d5a83fa2abe8b4b6cdb432"},{"author":{"_account_id":2733,"name":"Darragh O\u0027Reilly","email":"doreilly@suse.com","username":"darragh-oreilly"},"change_message_id":"c5af3984c6a35e9e5ba859b16ee7c90c6eb35232","unresolved":false,"context_lines":[{"line_number":211,"context_line":"            LOG.debug(_(\"Preparing device filters for %d new devices\"),"},{"line_number":212,"context_line":"                      len(new_devices))"},{"line_number":213,"context_line":"            self.prepare_devices_filter(new_devices)"},{"line_number":214,"context_line":"        # Clear data structures for devices to refresh"},{"line_number":215,"context_line":"        # These data structures are cleared here in order to avoid"},{"line_number":216,"context_line":"        # risking losing evens occurred during firewall refresh"},{"line_number":217,"context_line":"        devices_to_refilter \u003d self.devices_to_refilter.copy()"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F8r6c%3D","line":214,"updated":"2013-12-23 08:36:07.000000000","message":"I don\u0027t think line 214 is needed.","commit_id":"81e747528a00744a271c21989ad4b2a1e51ff766"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"c523805b97891e362b1138ca03a2f110428d0eff","unresolved":false,"context_lines":[{"line_number":211,"context_line":"            LOG.debug(_(\"Preparing device filters for %d new devices\"),"},{"line_number":212,"context_line":"                      len(new_devices))"},{"line_number":213,"context_line":"            self.prepare_devices_filter(new_devices)"},{"line_number":214,"context_line":"        # Clear data structures for devices to refresh"},{"line_number":215,"context_line":"        # These data structures are cleared here in order to avoid"},{"line_number":216,"context_line":"        # risking losing evens occurred during firewall refresh"},{"line_number":217,"context_line":"        devices_to_refilter \u003d self.devices_to_refilter.copy()"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F8r2I%3D","line":214,"in_reply_to":"AAAATn%2F8r6c%3D","updated":"2013-12-23 08:42:43.000000000","message":"This is what happens when you fix patches on a sunday night :)","commit_id":"81e747528a00744a271c21989ad4b2a1e51ff766"},{"author":{"_account_id":2733,"name":"Darragh O\u0027Reilly","email":"doreilly@suse.com","username":"darragh-oreilly"},"change_message_id":"c5af3984c6a35e9e5ba859b16ee7c90c6eb35232","unresolved":false,"context_lines":[{"line_number":213,"context_line":"            self.prepare_devices_filter(new_devices)"},{"line_number":214,"context_line":"        # Clear data structures for devices to refresh"},{"line_number":215,"context_line":"        # These data structures are cleared here in order to avoid"},{"line_number":216,"context_line":"        # risking losing evens occurred during firewall refresh"},{"line_number":217,"context_line":"        devices_to_refilter \u003d self.devices_to_refilter.copy()"},{"line_number":218,"context_line":"        global_refresh_firewall \u003d self.global_refresh_firewall"},{"line_number":219,"context_line":"        self.devices_to_refilter.clear()"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F8r6Y%3D","line":216,"updated":"2013-12-23 08:36:07.000000000","message":"to avoid losing updates that may happen during refresh_firewall()","commit_id":"81e747528a00744a271c21989ad4b2a1e51ff766"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"c523805b97891e362b1138ca03a2f110428d0eff","unresolved":false,"context_lines":[{"line_number":213,"context_line":"            self.prepare_devices_filter(new_devices)"},{"line_number":214,"context_line":"        # Clear data structures for devices to refresh"},{"line_number":215,"context_line":"        # These data structures are cleared here in order to avoid"},{"line_number":216,"context_line":"        # risking losing evens occurred during firewall refresh"},{"line_number":217,"context_line":"        devices_to_refilter \u003d self.devices_to_refilter.copy()"},{"line_number":218,"context_line":"        global_refresh_firewall \u003d self.global_refresh_firewall"},{"line_number":219,"context_line":"        self.devices_to_refilter.clear()"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F8r2E%3D","line":216,"in_reply_to":"AAAATn%2F8r6Y%3D","updated":"2013-12-23 08:42:43.000000000","message":"Done","commit_id":"81e747528a00744a271c21989ad4b2a1e51ff766"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"5de77a18a1a891d5b455f271db6d3ee7a06cf435","unresolved":false,"context_lines":[{"line_number":227,"context_line":"            # If a device is both in new and updated devices"},{"line_number":228,"context_line":"            # avoid reprocessing it"},{"line_number":229,"context_line":"            updated_devices \u003d (updated_devices - new_devices |"},{"line_number":230,"context_line":"                               devices_to_refilter)"},{"line_number":231,"context_line":"            if updated_devices:"},{"line_number":232,"context_line":"                LOG.debug(_(\"Refreshing firewall for %d devices\"),"},{"line_number":233,"context_line":"                          len(updated_devices))"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2F87E%3D","line":230,"updated":"2014-01-06 10:01:44.000000000","message":"Is it alwasy that new_devices \u0026 devices_to_refilter \u003d\u003d empty set?\nOtherwise updated_devices \u003d (updated_devices | device_to_refilster) - new_devices","commit_id":"c8a0ba111a1423dd5990059ec7c43f57db258ce6"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"c5af6417e2195eb333186cbec8512b82901b00d9","unresolved":false,"context_lines":[{"line_number":227,"context_line":"            # If a device is both in new and updated devices"},{"line_number":228,"context_line":"            # avoid reprocessing it"},{"line_number":229,"context_line":"            updated_devices \u003d (updated_devices - new_devices |"},{"line_number":230,"context_line":"                               devices_to_refilter)"},{"line_number":231,"context_line":"            if updated_devices:"},{"line_number":232,"context_line":"                LOG.debug(_(\"Refreshing firewall for %d devices\"),"},{"line_number":233,"context_line":"                          len(updated_devices))"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2Fwps%3D","line":230,"in_reply_to":"AAAAUH%2F%2F104%3D","updated":"2014-01-08 19:23:03.000000000","message":"Thanks for the suggestion Isaku, make sense.\n\nTo answer the other question, the goal of this check is actually to not do the firewall processing twice. Indeed we are excluding new_devices from the devices for which the firewall rules should be refreshed.\n\nIt is perfectly possible in my opinion to have a device which needs to be filtered again (because of sec group changes or port updates) and is not among the new devices.\n\nPlease let me know if I got your question wrong.","commit_id":"c8a0ba111a1423dd5990059ec7c43f57db258ce6"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"12a86c50bdb6f62d3863645441942cbdb76e2ed8","unresolved":false,"context_lines":[{"line_number":227,"context_line":"            # If a device is both in new and updated devices"},{"line_number":228,"context_line":"            # avoid reprocessing it"},{"line_number":229,"context_line":"            updated_devices \u003d (updated_devices - new_devices |"},{"line_number":230,"context_line":"                               devices_to_refilter)"},{"line_number":231,"context_line":"            if updated_devices:"},{"line_number":232,"context_line":"                LOG.debug(_(\"Refreshing firewall for %d devices\"),"},{"line_number":233,"context_line":"                          len(updated_devices))"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2F104%3D","line":230,"in_reply_to":"AAAAUH%2F%2F87E%3D","updated":"2014-01-07 20:27:15.000000000","message":"I think maybe this should be \"(updated_devices | device_to_refilster) - new_devices\" as Isaku suggested.  My reason is slightly different.\n\nnew_devices and devices_to_refilter are not necessarily disjoint.  A better question is whether we really need to call refresh_firewall for the ports in the intersection.  I think maybe not.\n\nWe just finished calling prepare_devices_filter on all of the new devices above.  That should have prepared the firewall.  Consider not doing it again here.","commit_id":"c8a0ba111a1423dd5990059ec7c43f57db258ce6"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"04aabbe221f6ee0b2da470b5acf38c0745267c71","unresolved":false,"context_lines":[{"line_number":227,"context_line":"            # If a device is both in new and updated devices"},{"line_number":228,"context_line":"            # avoid reprocessing it"},{"line_number":229,"context_line":"            updated_devices \u003d (updated_devices - new_devices |"},{"line_number":230,"context_line":"                               devices_to_refilter)"},{"line_number":231,"context_line":"            if updated_devices:"},{"line_number":232,"context_line":"                LOG.debug(_(\"Refreshing firewall for %d devices\"),"},{"line_number":233,"context_line":"                          len(updated_devices))"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2Fvls%3D","line":230,"in_reply_to":"AAAAUH%2F%2FvsE%3D","updated":"2014-01-08 23:38:41.000000000","message":"Yes Isaku was correct and I\u0027ve updated the patch accordingly","commit_id":"c8a0ba111a1423dd5990059ec7c43f57db258ce6"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"b3a18928ee26cf86aa0c40740e518255a2f6b8d0","unresolved":false,"context_lines":[{"line_number":227,"context_line":"            # If a device is both in new and updated devices"},{"line_number":228,"context_line":"            # avoid reprocessing it"},{"line_number":229,"context_line":"            updated_devices \u003d (updated_devices - new_devices |"},{"line_number":230,"context_line":"                               devices_to_refilter)"},{"line_number":231,"context_line":"            if updated_devices:"},{"line_number":232,"context_line":"                LOG.debug(_(\"Refreshing firewall for %d devices\"),"},{"line_number":233,"context_line":"                          len(updated_devices))"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2FvsE%3D","line":230,"in_reply_to":"AAAAUH%2F%2Fwps%3D","updated":"2014-01-08 23:12:47.000000000","message":"Sorry for the confusion.  I am trying to point out that |\u0027ing in devices_to_refilter after -\u0027ing new_devices may actually bring in some of those new_devices.  This method would then process the firewall for those new devices twice.\n\nIsaku\u0027s suggestion fixes this.  I found it helpful to draw a venn diagram of the two to see the difference.","commit_id":"c8a0ba111a1423dd5990059ec7c43f57db258ce6"},{"author":{"_account_id":5572,"name":"Don Kehn","display_name":"DEKehn","email":"dekehn@gmail.com","username":"dekehn"},"change_message_id":"210ccce830c2938f15346e1441c7c8471be955eb","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        LOG.info(_(\"Refresh firewall rules\"))"},{"line_number":184,"context_line":"        if not device_ids:"},{"line_number":185,"context_line":"            device_ids \u003d self.firewall.ports.keys()"},{"line_number":186,"context_line":"        if not device_ids:"},{"line_number":187,"context_line":"            LOG.info(_(\"No ports here to refresh firewall\"))"},{"line_number":188,"context_line":"            return"},{"line_number":189,"context_line":"        devices \u003d self.plugin_rpc.security_group_rules_for_devices("}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2Frgg%3D","line":186,"updated":"2014-01-09 17:30:03.000000000","message":"wouldn\u0027t be a little cleaner to: \n if not device_ids:\n     device_ids \u003d self.firewall.ports.keys()\n     if not device_ids:\n         LOG.info.............\n\nI understand that either way if (not device_ids) is True then all gets execute, but if device_ids is True then it saves a check.","commit_id":"d21e3f182bff950027e68d02aa36da89c4683859"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"b67821e7281673ef090a94280d35d620d8ed1684","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        LOG.info(_(\"Refresh firewall rules\"))"},{"line_number":184,"context_line":"        if not device_ids:"},{"line_number":185,"context_line":"            device_ids \u003d self.firewall.ports.keys()"},{"line_number":186,"context_line":"        if not device_ids:"},{"line_number":187,"context_line":"            LOG.info(_(\"No ports here to refresh firewall\"))"},{"line_number":188,"context_line":"            return"},{"line_number":189,"context_line":"        devices \u003d self.plugin_rpc.security_group_rules_for_devices("}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2FoCs%3D","line":186,"in_reply_to":"AAAAUH%2F%2Frgg%3D","updated":"2014-01-10 11:06:17.000000000","message":"Done","commit_id":"d21e3f182bff950027e68d02aa36da89c4683859"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"5744bbfa3fee841a8d6175563d8cd2e474ae0c4c","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        # losing updates occurring during firewall refresh"},{"line_number":216,"context_line":"        devices_to_refilter \u003d self.devices_to_refilter"},{"line_number":217,"context_line":"        global_refresh_firewall \u003d self.global_refresh_firewall"},{"line_number":218,"context_line":"        self.devices_to_refilter \u003d set() "},{"line_number":219,"context_line":"        self.global_refresh_firewall \u003d False"},{"line_number":220,"context_line":"        # TODO(salv-orlando): Avoid if possible ever performing the global"},{"line_number":221,"context_line":"        # refresh providing a precise list of devices for which firewall"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F%2FQDM%3D","line":218,"updated":"2014-01-15 21:39:57.000000000","message":"Looks like a space at end of line - PEP will warn on this.","commit_id":"768b42a9b7cad2b41cf0ca3649cebbe98e407376"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"b8b038123448a4e709c3b4b7f190176a643b7e74","unresolved":false,"context_lines":[{"line_number":154,"context_line":"            LOG.debug(_(\"Adding %s devices to the list of devices \""},{"line_number":155,"context_line":"                        \"for which firewall needs to be refreshed\"),"},{"line_number":156,"context_line":"                      devices)"},{"line_number":157,"context_line":"            self.devices_to_refilter |\u003d set(devices)"},{"line_number":158,"context_line":"        elif devices:"},{"line_number":159,"context_line":"            self.refresh_firewall(devices)"},{"line_number":160,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAUX%2F%2F7PI%3D","line":157,"updated":"2014-02-09 16:08:45.000000000","message":"Can avoid executing lines 153-157 if devices is empty.","commit_id":"3046c4ae22b10f9e4fa83a47bfe089554d4a4681"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"1dadd2a43555bbfe95e6bccebf425aa91baf3bd8","unresolved":false,"context_lines":[{"line_number":154,"context_line":"            LOG.debug(_(\"Adding %s devices to the list of devices \""},{"line_number":155,"context_line":"                        \"for which firewall needs to be refreshed\"),"},{"line_number":156,"context_line":"                      devices)"},{"line_number":157,"context_line":"            self.devices_to_refilter |\u003d set(devices)"},{"line_number":158,"context_line":"        elif devices:"},{"line_number":159,"context_line":"            self.refresh_firewall(devices)"},{"line_number":160,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAUX%2F%2F5lM%3D","line":157,"in_reply_to":"AAAAUX%2F%2F7PI%3D","updated":"2014-02-10 04:12:27.000000000","message":"I think this can be fixed in a follow up bug patch.  I\u0027ve filed this bug to track.  \n\nhttps://bugs.launchpad.net/neutron/+bug/1278271","commit_id":"3046c4ae22b10f9e4fa83a47bfe089554d4a4681"}],"neutron/tests/unit/test_security_groups_rpc.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"a645b64f26fb0b9292ef5487ef2ab48516400ddb","unresolved":false,"context_lines":[{"line_number":689,"context_line":"        self.agent.global_refresh_firewall \u003d False"},{"line_number":690,"context_line":"        self.agent.setup_port_filters(set([\u0027fake_new_device\u0027]), set())"},{"line_number":691,"context_line":"        self.assertEqual(set(), self.agent.devices_to_refilter)"},{"line_number":692,"context_line":"        self.assertEqual(False, self.agent.global_refresh_firewall)"},{"line_number":693,"context_line":"        self.agent.prepare_devices_filter.assert_called_once_with("},{"line_number":694,"context_line":"            set([\u0027fake_new_device\u0027]))"},{"line_number":695,"context_line":"        self.assertFalse(self.agent.refresh_firewall.called)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F83EI%3D","line":692,"updated":"2013-12-19 13:48:44.000000000","message":"assertFalse() here and several other UT cases below...","commit_id":"11e38951256cb8f868d7909077fe91c1f8fff607"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"4e4e0ab674eddb6437d1ee12f1ae7713d7b8fd5d","unresolved":false,"context_lines":[{"line_number":689,"context_line":"        self.agent.global_refresh_firewall \u003d False"},{"line_number":690,"context_line":"        self.agent.setup_port_filters(set([\u0027fake_new_device\u0027]), set())"},{"line_number":691,"context_line":"        self.assertEqual(set(), self.agent.devices_to_refilter)"},{"line_number":692,"context_line":"        self.assertEqual(False, self.agent.global_refresh_firewall)"},{"line_number":693,"context_line":"        self.agent.prepare_devices_filter.assert_called_once_with("},{"line_number":694,"context_line":"            set([\u0027fake_new_device\u0027]))"},{"line_number":695,"context_line":"        self.assertFalse(self.agent.refresh_firewall.called)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F82Ic%3D","line":692,"in_reply_to":"AAAATn%2F83EI%3D","updated":"2013-12-19 16:15:36.000000000","message":"Done","commit_id":"11e38951256cb8f868d7909077fe91c1f8fff607"},{"author":{"_account_id":2733,"name":"Darragh O\u0027Reilly","email":"doreilly@suse.com","username":"darragh-oreilly"},"change_message_id":"1554a96fcb4d52c23669bd30e00ab79cb9de0696","unresolved":false,"context_lines":[{"line_number":612,"context_line":"                                                 \u0027fake_sgid2\u0027}]}"},{"line_number":613,"context_line":"        self.firewall.ports[device] \u003d fake_device"},{"line_number":614,"context_line":"        yield"},{"line_number":615,"context_line":"        del self.firewall.ports[device]"},{"line_number":616,"context_line":""},{"line_number":617,"context_line":"    def test_security_groups_rule_updated(self):"},{"line_number":618,"context_line":"        self.agent.security_groups_rule_updated([\u0027fake_sgid1\u0027, \u0027fake_sgid3\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F8tmw%3D","line":615,"updated":"2013-12-21 17:43:14.000000000","message":"I don\u0027t understand why a contextmanager is needed here. You get a new self.firewall for each test anyway.","commit_id":"8e7110bd7dbdaf7eae40729778dcaa90f58dfef7"},{"author":{"_account_id":2733,"name":"Darragh O\u0027Reilly","email":"doreilly@suse.com","username":"darragh-oreilly"},"change_message_id":"0f65512fcd94c24a528d3de12fdc99cdc78be0a4","unresolved":false,"context_lines":[{"line_number":612,"context_line":"                                                 \u0027fake_sgid2\u0027}]}"},{"line_number":613,"context_line":"        self.firewall.ports[device] \u003d fake_device"},{"line_number":614,"context_line":"        yield"},{"line_number":615,"context_line":"        del self.firewall.ports[device]"},{"line_number":616,"context_line":""},{"line_number":617,"context_line":"    def test_security_groups_rule_updated(self):"},{"line_number":618,"context_line":"        self.agent.security_groups_rule_updated([\u0027fake_sgid1\u0027, \u0027fake_sgid3\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F8tBQ%3D","line":615,"in_reply_to":"AAAATn%2F8tj8%3D","updated":"2013-12-22 13:58:32.000000000","message":"Ok, thanks. Maybe if you are doing another patchset you could add a comment to say that because it is not obvious (to me anyway). I initially thought that there must be something peculiar about the SUT that necessitated this unusual additional complexity. I gave up trying to understand it after a while and just asked you. I\u0027m thinking about future readers here.","commit_id":"8e7110bd7dbdaf7eae40729778dcaa90f58dfef7"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"9b794557fca8e60d046e5858a7fa0a9f82fbae36","unresolved":false,"context_lines":[{"line_number":612,"context_line":"                                                 \u0027fake_sgid2\u0027}]}"},{"line_number":613,"context_line":"        self.firewall.ports[device] \u003d fake_device"},{"line_number":614,"context_line":"        yield"},{"line_number":615,"context_line":"        del self.firewall.ports[device]"},{"line_number":616,"context_line":""},{"line_number":617,"context_line":"    def test_security_groups_rule_updated(self):"},{"line_number":618,"context_line":"        self.agent.security_groups_rule_updated([\u0027fake_sgid1\u0027, \u0027fake_sgid3\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F8tj8%3D","line":615,"in_reply_to":"AAAATn%2F8tmw%3D","updated":"2013-12-21 19:52:20.000000000","message":"The context manager is just for adding and removing the resource. It is correct that the firewall is anyway destroyed and recreated at each test, but it looked a bit cleaner this way.","commit_id":"8e7110bd7dbdaf7eae40729778dcaa90f58dfef7"}]}
