)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"720a3fdc11214a6ffe03b0365b5376a8adee8d6e","unresolved":false,"context_lines":[{"line_number":12,"context_line":"need to get the security group details through RPC from"},{"line_number":13,"context_line":"neutron-server, when the number of l2 agents is large, the"},{"line_number":14,"context_line":"load of neutron-server is heavy."},{"line_number":15,"context_line":"this patch use fanout RPC message with the changed sg details"},{"line_number":16,"context_line":"to notify the l2 agents, then l2 agents which has the related"},{"line_number":17,"context_line":"devices update the sg information in their memory, they do not"},{"line_number":18,"context_line":"need to get the sg details through RPC."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3afb71cf_33bf20fd","line":15,"updated":"2015-06-08 11:57:05.000000000","message":"Can\u0027t find change to fanout in the patch, can you please point? Also seems plugin_rpc.security_group_info_for_devices is still used as before. I must be missing something","commit_id":"d75f3e45136e9caa36437f0a296fc88bc8acf94f"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"dff9edd450aa74fb19dc856cb4c16a5e341b999e","unresolved":false,"context_lines":[{"line_number":12,"context_line":"need to get the security group details through RPC from"},{"line_number":13,"context_line":"neutron-server, when the number of l2 agents is large, the"},{"line_number":14,"context_line":"load of neutron-server is heavy."},{"line_number":15,"context_line":"this patch use fanout RPC message with the changed sg details"},{"line_number":16,"context_line":"to notify the l2 agents, then l2 agents which has the related"},{"line_number":17,"context_line":"devices update the sg information in their memory, they do not"},{"line_number":18,"context_line":"need to get the sg details through RPC."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3afb71cf_0cd3c605","line":15,"in_reply_to":"3afb71cf_33bf20fd","updated":"2015-06-09 02:06:05.000000000","message":"hi Oleg Bondarev, thx for your review!\n1. when the sg members or rules change, the neutron-server will use fanout RPC message to notify the l2 agent, but just the related l2 agents will update these info in their memory.\n\n2. when a port changes its fixed-ip or security group, it will also use \u0027plugin_rpc.security_group_info_for_devices\u0027 to get the details info from neutron-server, this is just for updated port, so the RPC message is very small.\n\nI am adding the unit tests!","commit_id":"d75f3e45136e9caa36437f0a296fc88bc8acf94f"}],"neutron/agent/securitygroups_rpc.py":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"b8b2193b5b83c808185b613c8a84585946a61f9f","unresolved":false,"context_lines":[{"line_number":293,"context_line":"    def refresh_firewall_refilter_ports(self, device_ids\u003dNone):"},{"line_number":294,"context_line":"        with self.firewall.defer_apply():"},{"line_number":295,"context_line":"            for device_id in device_ids:"},{"line_number":296,"context_line":"                if device_id in self.firewall.ports:"},{"line_number":297,"context_line":"                    self.firewall.update_port_filter("},{"line_number":298,"context_line":"                        self.firewall.ports[device_id])"},{"line_number":299,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1af86dd1_fb6d25cd","line":296,"updated":"2015-06-12 09:28:57.000000000","message":"just a suggestion which could lower the length of the loop depending on the amount of ports:\n\nfor device_id in set(device_ids) \u0026 set(self.firewall_ports):\n    self.firewall.update_port_filter(...","commit_id":"f7b2275c58dafeb4d59d44d56038ad50f96426a9"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"2d390effd365cd5bfd952bea5d30f3efb498b5dd","unresolved":false,"context_lines":[{"line_number":293,"context_line":"    def refresh_firewall_refilter_ports(self, device_ids\u003dNone):"},{"line_number":294,"context_line":"        with self.firewall.defer_apply():"},{"line_number":295,"context_line":"            for device_id in device_ids:"},{"line_number":296,"context_line":"                if device_id in self.firewall.ports:"},{"line_number":297,"context_line":"                    self.firewall.update_port_filter("},{"line_number":298,"context_line":"                        self.firewall.ports[device_id])"},{"line_number":299,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_0b82ec00","line":296,"in_reply_to":"1af86dd1_fb6d25cd","updated":"2015-06-15 02:48:14.000000000","message":"good suggestion","commit_id":"f7b2275c58dafeb4d59d44d56038ad50f96426a9"}],"neutron/api/rpc/handlers/securitygroups_rpc.py":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"b8b2193b5b83c808185b613c8a84585946a61f9f","unresolved":false,"context_lines":[{"line_number":125,"context_line":"    \"\"\""},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    # history"},{"line_number":128,"context_line":"    #   1.1 Support Security Group RPC"},{"line_number":129,"context_line":"    SG_RPC_VERSION \u003d \"1.1\""},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def _get_security_group_topic(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1af86dd1_dbf709f4","line":128,"updated":"2015-06-12 09:28:57.000000000","message":"As oleg commented, you may need to bump version here. because you\u0027re accepting dicts instead of lists.\n\nAlso you may need to make it backwards compatible by converting list format into dict when lists arrive.","commit_id":"f7b2275c58dafeb4d59d44d56038ad50f96426a9"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"2d390effd365cd5bfd952bea5d30f3efb498b5dd","unresolved":false,"context_lines":[{"line_number":125,"context_line":"    \"\"\""},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    # history"},{"line_number":128,"context_line":"    #   1.1 Support Security Group RPC"},{"line_number":129,"context_line":"    SG_RPC_VERSION \u003d \"1.1\""},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def _get_security_group_topic(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_cba3a49d","line":128,"in_reply_to":"1af86dd1_33262f69","updated":"2015-06-15 02:48:14.000000000","message":"agree","commit_id":"f7b2275c58dafeb4d59d44d56038ad50f96426a9"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"d0ba0dea6190589efd660baea7f4267355c22632","unresolved":false,"context_lines":[{"line_number":125,"context_line":"    \"\"\""},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    # history"},{"line_number":128,"context_line":"    #   1.1 Support Security Group RPC"},{"line_number":129,"context_line":"    SG_RPC_VERSION \u003d \"1.1\""},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def _get_security_group_topic(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1af86dd1_33262f69","line":128,"in_reply_to":"1af86dd1_dbf709f4","updated":"2015-06-12 18:47:38.000000000","message":"Yes, the change as written is not backwards compatible.  It needs to be able to handle receiving a list from an older client.","commit_id":"f7b2275c58dafeb4d59d44d56038ad50f96426a9"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"2d390effd365cd5bfd952bea5d30f3efb498b5dd","unresolved":false,"context_lines":[{"line_number":125,"context_line":"    \"\"\""},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    # history"},{"line_number":128,"context_line":"    #   1.1 Support Security Group RPC"},{"line_number":129,"context_line":"    SG_RPC_VERSION \u003d \"1.1\""},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def _get_security_group_topic(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_eba0e892","line":128,"in_reply_to":"1af86dd1_dbf709f4","updated":"2015-06-15 02:48:14.000000000","message":"agree","commit_id":"f7b2275c58dafeb4d59d44d56038ad50f96426a9"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"4f252f13aec65ca1bbb51fadac173723f506b09c","unresolved":false,"context_lines":[{"line_number":185,"context_line":"    def security_groups_rule_updated(self, context, **kwargs):"},{"line_number":186,"context_line":"        \"\"\"Callback for security group rule update."},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        :param security_groups: dict of updated security_groups"},{"line_number":189,"context_line":"        \"\"\""},{"line_number":190,"context_line":"        security_groups \u003d kwargs.get(\u0027security_groups\u0027, {})"},{"line_number":191,"context_line":"        if isinstance(security_groups, list):"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a41bdd9_3d0a227a","line":188,"updated":"2015-07-14 18:08:30.000000000","message":"It doesn\u0027t look like this will put us into a situation where the agent and server have to be upgraded at the same time because the notification is no longer compatible. In order to handle this, please use a different kwarg for the dictionary and have the server send both the dict and the list so the new server can support an older client until the upgrade is complete.","commit_id":"4b21dc4e3fb71af41e363ca50e2dac1cb612cc2e"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"0f74dc29616e9bdd738eada7b8a435dbbed67677","unresolved":false,"context_lines":[{"line_number":185,"context_line":"    def security_groups_rule_updated(self, context, **kwargs):"},{"line_number":186,"context_line":"        \"\"\"Callback for security group rule update."},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        :param security_groups: dict of updated security_groups"},{"line_number":189,"context_line":"        \"\"\""},{"line_number":190,"context_line":"        security_groups \u003d kwargs.get(\u0027security_groups\u0027, {})"},{"line_number":191,"context_line":"        if isinstance(security_groups, list):"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a41bdd9_2b1e4dbb","line":188,"in_reply_to":"9a41bdd9_3d0a227a","updated":"2015-07-15 00:55:07.000000000","message":"agree with your suggestion","commit_id":"4b21dc4e3fb71af41e363ca50e2dac1cb612cc2e"}],"neutron/db/securitygroups_rpc_base.py":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"b8b2193b5b83c808185b613c8a84585946a61f9f","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                ethertype \u003d \u0027IPv%d\u0027 % netaddr.IPNetwork(ip).version"},{"line_number":77,"context_line":"                sg_info.setdefault(sg_id, {\u0027IPv4\u0027: [], \u0027IPv6\u0027: []})"},{"line_number":78,"context_line":"                if ip not in sg_info[sg_id][ethertype]:"},{"line_number":79,"context_line":"                    sg_info[sg_id][ethertype].append(ip)"},{"line_number":80,"context_line":"        for sg_id in sg_ids:"},{"line_number":81,"context_line":"            if sg_id not in sg_info:"},{"line_number":82,"context_line":"                sg_info[sg_id] \u003d {\u0027IPv4\u0027: [], \u0027IPv6\u0027: []}"}],"source_content_type":"text/x-python","patch_set":7,"id":"1af86dd1_db45c917","line":79,"updated":"2015-06-12 09:28:57.000000000","message":"If we used sets inside instead of lists you could just add it. But I guess that could require changes in more places and could put this patch out of scope.","commit_id":"f7b2275c58dafeb4d59d44d56038ad50f96426a9"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"2d390effd365cd5bfd952bea5d30f3efb498b5dd","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                ethertype \u003d \u0027IPv%d\u0027 % netaddr.IPNetwork(ip).version"},{"line_number":77,"context_line":"                sg_info.setdefault(sg_id, {\u0027IPv4\u0027: [], \u0027IPv6\u0027: []})"},{"line_number":78,"context_line":"                if ip not in sg_info[sg_id][ethertype]:"},{"line_number":79,"context_line":"                    sg_info[sg_id][ethertype].append(ip)"},{"line_number":80,"context_line":"        for sg_id in sg_ids:"},{"line_number":81,"context_line":"            if sg_id not in sg_info:"},{"line_number":82,"context_line":"                sg_info[sg_id] \u003d {\u0027IPv4\u0027: [], \u0027IPv6\u0027: []}"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_6b65b843","line":79,"in_reply_to":"1af86dd1_db45c917","updated":"2015-06-15 02:48:14.000000000","message":"if we use sets, it will failed when RPC serialize this message, you can thie patch set 5","commit_id":"f7b2275c58dafeb4d59d44d56038ad50f96426a9"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"b8b2193b5b83c808185b613c8a84585946a61f9f","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                sg_info.setdefault(sg_id, {\u0027IPv4\u0027: [], \u0027IPv6\u0027: []})"},{"line_number":78,"context_line":"                if ip not in sg_info[sg_id][ethertype]:"},{"line_number":79,"context_line":"                    sg_info[sg_id][ethertype].append(ip)"},{"line_number":80,"context_line":"        for sg_id in sg_ids:"},{"line_number":81,"context_line":"            if sg_id not in sg_info:"},{"line_number":82,"context_line":"                sg_info[sg_id] \u003d {\u0027IPv4\u0027: [], \u0027IPv6\u0027: []}"},{"line_number":83,"context_line":"        return sg_info"}],"source_content_type":"text/x-python","patch_set":7,"id":"1af86dd1_fb5765c8","line":80,"updated":"2015-06-12 09:28:57.000000000","message":"I was going to suggest this at start:\n\nsg_info \u003d collections.defaultdict(lambda: {\u0027IPv4\u0027: [], \u0027IPv6\u0027: []})\n\nbut I suspect, that if you do that, you may not make explicit later that the other sg_id\u0027s are empty in some cases.\n\nI\u0027d move this loop instead at start, right after sg_info\u003d{}\nand then remove L77","commit_id":"f7b2275c58dafeb4d59d44d56038ad50f96426a9"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"2d390effd365cd5bfd952bea5d30f3efb498b5dd","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                sg_info.setdefault(sg_id, {\u0027IPv4\u0027: [], \u0027IPv6\u0027: []})"},{"line_number":78,"context_line":"                if ip not in sg_info[sg_id][ethertype]:"},{"line_number":79,"context_line":"                    sg_info[sg_id][ethertype].append(ip)"},{"line_number":80,"context_line":"        for sg_id in sg_ids:"},{"line_number":81,"context_line":"            if sg_id not in sg_info:"},{"line_number":82,"context_line":"                sg_info[sg_id] \u003d {\u0027IPv4\u0027: [], \u0027IPv6\u0027: []}"},{"line_number":83,"context_line":"        return sg_info"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_abf9804f","line":80,"in_reply_to":"1af86dd1_fb5765c8","updated":"2015-06-15 02:48:14.000000000","message":"good suggestion","commit_id":"f7b2275c58dafeb4d59d44d56038ad50f96426a9"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"b8b2193b5b83c808185b613c8a84585946a61f9f","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        for sg_id in sec_group_ids:"},{"line_number":88,"context_line":"            sg_rules \u003d self.get_security_group_rules("},{"line_number":89,"context_line":"                context, {\u0027security_group_id\u0027: [sg_id]})"},{"line_number":90,"context_line":"            sec_group_rules.setdefault(sg_id, sg_rules)"},{"line_number":91,"context_line":"        return sec_group_rules"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def _get_remote_sg_ids(self, rules):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1af86dd1_fb34054b","line":90,"updated":"2015-06-12 09:28:57.000000000","message":"Is there any reason why you use .setdefault instead of plain\n\nsec_group_rules[sg_id] \u003d sg_rules   ?","commit_id":"f7b2275c58dafeb4d59d44d56038ad50f96426a9"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"2d390effd365cd5bfd952bea5d30f3efb498b5dd","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        for sg_id in sec_group_ids:"},{"line_number":88,"context_line":"            sg_rules \u003d self.get_security_group_rules("},{"line_number":89,"context_line":"                context, {\u0027security_group_id\u0027: [sg_id]})"},{"line_number":90,"context_line":"            sec_group_rules.setdefault(sg_id, sg_rules)"},{"line_number":91,"context_line":"        return sec_group_rules"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def _get_remote_sg_ids(self, rules):"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_a61a156d","line":90,"in_reply_to":"1af86dd1_fb34054b","updated":"2015-06-15 02:48:14.000000000","message":"you are right, it\u0027s my mistacke","commit_id":"f7b2275c58dafeb4d59d44d56038ad50f96426a9"}]}
