)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"c45f3c548da0ab8aeb6aa1ac16add57fd9b9dc6a","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch proposes ConntrackNetlink driver to delete conntrack"},{"line_number":10,"context_line":"entries. Adopt Netlink solution [1] will improve conntrack management performance."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"[1] http://goo.gl/Z0IiZB"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Partial-Bug: #1630832"},{"line_number":15,"context_line":"Co-Authored-By: Cao Xuan Hoang \u003choangcx@vn.fujitsu.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":33,"id":"9f91af0f_31063c1e","line":12,"updated":"2018-01-08 20:23:59.000000000","message":"Going to this doc shows it\u0027s \"in the user\u0027s trash\", so it might be best to copy the performance numbers into the bug, for example the data in the chart at the end.","commit_id":"99c581ff0238e583e8fe637de733d71a0c71335b"},{"author":{"_account_id":15905,"name":"Cao Xuan Hoang","email":"xuanhoangqb@gmail.com","username":"hoangcx"},"change_message_id":"3379b86652eaf0fc36a18bec17eb735a47a14cb0","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch proposes ConntrackNetlink driver to delete conntrack"},{"line_number":10,"context_line":"entries. Adopt Netlink solution [1] will improve conntrack management performance."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"[1] http://goo.gl/Z0IiZB"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Partial-Bug: #1630832"},{"line_number":15,"context_line":"Co-Authored-By: Cao Xuan Hoang \u003choangcx@vn.fujitsu.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":33,"id":"7f96bb07_d7917154","line":12,"in_reply_to":"9f91af0f_31063c1e","updated":"2018-01-12 09:32:11.000000000","message":"Sorry for confused. I will update the link.","commit_id":"99c581ff0238e583e8fe637de733d71a0c71335b"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"c45f3c548da0ab8aeb6aa1ac16add57fd9b9dc6a","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"[1] http://goo.gl/Z0IiZB"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Partial-Bug: #1630832"},{"line_number":15,"context_line":"Co-Authored-By: Cao Xuan Hoang \u003choangcx@vn.fujitsu.com\u003e"},{"line_number":16,"context_line":"Change-Id: Ib02e4768b5af0915d9f11cd1ef66a73b06a611f0"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":33,"id":"9f91af0f_f113f45a","line":14,"updated":"2018-01-08 20:23:59.000000000","message":"Should this be Closes-bug or is there another change to fwaas planned?","commit_id":"99c581ff0238e583e8fe637de733d71a0c71335b"},{"author":{"_account_id":15905,"name":"Cao Xuan Hoang","email":"xuanhoangqb@gmail.com","username":"hoangcx"},"change_message_id":"2ac08e5aa39fbbcbf6f8eb1a5ee5311a779e300e","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"[1] http://goo.gl/Z0IiZB"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Partial-Bug: #1630832"},{"line_number":15,"context_line":"Co-Authored-By: Cao Xuan Hoang \u003choangcx@vn.fujitsu.com\u003e"},{"line_number":16,"context_line":"Change-Id: Ib02e4768b5af0915d9f11cd1ef66a73b06a611f0"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":33,"id":"7f96bb07_17ecb9c5","line":14,"in_reply_to":"7f96bb07_d77ad122","updated":"2018-01-12 09:34:38.000000000","message":"https://review.openstack.org/#/c/527044/","commit_id":"99c581ff0238e583e8fe637de733d71a0c71335b"},{"author":{"_account_id":15905,"name":"Cao Xuan Hoang","email":"xuanhoangqb@gmail.com","username":"hoangcx"},"change_message_id":"3379b86652eaf0fc36a18bec17eb735a47a14cb0","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"[1] http://goo.gl/Z0IiZB"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Partial-Bug: #1630832"},{"line_number":15,"context_line":"Co-Authored-By: Cao Xuan Hoang \u003choangcx@vn.fujitsu.com\u003e"},{"line_number":16,"context_line":"Change-Id: Ib02e4768b5af0915d9f11cd1ef66a73b06a611f0"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":33,"id":"7f96bb07_d77ad122","line":14,"in_reply_to":"9f91af0f_f113f45a","updated":"2018-01-12 09:32:11.000000000","message":"There are another patch in fwaas for IPv6 but I think we can close bug with this change.","commit_id":"99c581ff0238e583e8fe637de733d71a0c71335b"}],"neutron/agent/linux/ip_conntrack.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"77cd33333bd00b8a59cf0d053811d2e6e136f153","unresolved":false,"context_lines":[{"line_number":60,"context_line":"                continue"},{"line_number":61,"context_line":"            self.execute.delete_entries(rules, zone_id)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def delete_conntrack_state_by_rule(self, device_info_list, rules):"},{"line_number":64,"context_line":"        self._delete_conntrack_state(device_info_list, rules)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def delete_conntrack_state_by_remote_ips(self, device_info_list,"},{"line_number":67,"context_line":"                                             ethertype, remote_ips):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f231b9d_e8b9b778","line":64,"range":{"start_line":63,"start_character":0,"end_line":64,"end_character":61},"updated":"2017-06-16 11:38:44.000000000","message":"Do you still need to wrap this function?","commit_id":"13878a6780d890e807a69d1705cc3f2d5cd7c71e"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"6896a01b60bf9a0f0dd4a9614ad8e4a15e45482e","unresolved":false,"context_lines":[{"line_number":60,"context_line":"                continue"},{"line_number":61,"context_line":"            self.execute.delete_entries(rules, zone_id)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def delete_conntrack_state_by_rule(self, device_info_list, rules):"},{"line_number":64,"context_line":"        self._delete_conntrack_state(device_info_list, rules)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def delete_conntrack_state_by_remote_ips(self, device_info_list,"},{"line_number":67,"context_line":"                                             ethertype, remote_ips):"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f201791_fdaa4917","line":64,"range":{"start_line":63,"start_character":0,"end_line":64,"end_character":61},"in_reply_to":"7f231b9d_e8b9b778","updated":"2017-06-21 06:21:27.000000000","message":"yes, i want to keep this wrap to support delete_conntrack_state_by_remote_ips","commit_id":"13878a6780d890e807a69d1705cc3f2d5cd7c71e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"77cd33333bd00b8a59cf0d053811d2e6e136f153","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    def delete_conntrack_state_by_remote_ips(self, device_info_list,"},{"line_number":67,"context_line":"                                             ethertype, remote_ips):"},{"line_number":68,"context_line":"        rules \u003d []"},{"line_number":69,"context_line":"        for direction in [\u0027ingress\u0027, \u0027egress\u0027]:"},{"line_number":70,"context_line":"            rule \u003d {\u0027ethertype\u0027: str(ethertype).lower(),"},{"line_number":71,"context_line":"                    \u0027direction\u0027: direction,"},{"line_number":72,"context_line":"                    \u0027port_range_max\u0027: None,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f231b9d_28be8fb3","line":69,"range":{"start_line":69,"start_character":24,"end_line":69,"end_character":46},"updated":"2017-06-16 11:38:44.000000000","message":"Maybe you should change this for neutron.common.constants.VALID_DIRECTIONS","commit_id":"13878a6780d890e807a69d1705cc3f2d5cd7c71e"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"6896a01b60bf9a0f0dd4a9614ad8e4a15e45482e","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    def delete_conntrack_state_by_remote_ips(self, device_info_list,"},{"line_number":67,"context_line":"                                             ethertype, remote_ips):"},{"line_number":68,"context_line":"        rules \u003d []"},{"line_number":69,"context_line":"        for direction in [\u0027ingress\u0027, \u0027egress\u0027]:"},{"line_number":70,"context_line":"            rule \u003d {\u0027ethertype\u0027: str(ethertype).lower(),"},{"line_number":71,"context_line":"                    \u0027direction\u0027: direction,"},{"line_number":72,"context_line":"                    \u0027port_range_max\u0027: None,"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f201791_7d6cf907","line":69,"range":{"start_line":69,"start_character":24,"end_line":69,"end_character":46},"in_reply_to":"7f231b9d_28be8fb3","updated":"2017-06-21 06:21:27.000000000","message":"Done","commit_id":"13878a6780d890e807a69d1705cc3f2d5cd7c71e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"77cd33333bd00b8a59cf0d053811d2e6e136f153","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                    \u0027port_range_max\u0027: None,"},{"line_number":73,"context_line":"                    \u0027port_range_min\u0027: None,"},{"line_number":74,"context_line":"                    \u0027protocol\u0027: None}"},{"line_number":75,"context_line":"            for remote_ip in remote_ips:"},{"line_number":76,"context_line":"                ipversion \u003d netaddr.IPNetwork(remote_ip).version"},{"line_number":77,"context_line":"                if str(ipversion) in ethertype:"},{"line_number":78,"context_line":"                    if direction \u003d\u003d \u0027ingress\u0027:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f231b9d_c8dddbe0","line":75,"range":{"start_line":75,"start_character":12,"end_line":75,"end_character":40},"updated":"2017-06-16 11:38:44.000000000","message":"Please, check this loop.\n\nIf several \"remote_ips\" exist, you will modify rule without appending \"rules\".\n\nIMO, you should add rules.append(rule) at the end of the loop and only if there are no remote_ips, append the rule without this information.","commit_id":"13878a6780d890e807a69d1705cc3f2d5cd7c71e"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"6896a01b60bf9a0f0dd4a9614ad8e4a15e45482e","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                    \u0027port_range_max\u0027: None,"},{"line_number":73,"context_line":"                    \u0027port_range_min\u0027: None,"},{"line_number":74,"context_line":"                    \u0027protocol\u0027: None}"},{"line_number":75,"context_line":"            for remote_ip in remote_ips:"},{"line_number":76,"context_line":"                ipversion \u003d netaddr.IPNetwork(remote_ip).version"},{"line_number":77,"context_line":"                if str(ipversion) in ethertype:"},{"line_number":78,"context_line":"                    if direction \u003d\u003d \u0027ingress\u0027:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f201791_3d7681da","line":75,"range":{"start_line":75,"start_character":12,"end_line":75,"end_character":40},"in_reply_to":"7f231b9d_c8dddbe0","updated":"2017-06-21 06:21:27.000000000","message":"you\u0027re right. done","commit_id":"13878a6780d890e807a69d1705cc3f2d5cd7c71e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"77cd33333bd00b8a59cf0d053811d2e6e136f153","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                    \u0027protocol\u0027: None}"},{"line_number":75,"context_line":"            for remote_ip in remote_ips:"},{"line_number":76,"context_line":"                ipversion \u003d netaddr.IPNetwork(remote_ip).version"},{"line_number":77,"context_line":"                if str(ipversion) in ethertype:"},{"line_number":78,"context_line":"                    if direction \u003d\u003d \u0027ingress\u0027:"},{"line_number":79,"context_line":"                        rule[\u0027source_prefix_ip\u0027] \u003d remote_ip"},{"line_number":80,"context_line":"                        rule[\u0027dest_prefix_ip\u0027] \u003d None"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f231b9d_a825ff0a","line":77,"range":{"start_line":77,"start_character":16,"end_line":77,"end_character":46},"updated":"2017-06-16 11:38:44.000000000","message":"This check is valid but not very pretty. Can you add something like neutron-lib.constants.IP_ANY, to match int(4) with \u0027IPv4\u0027 and int(6) with \u0027IPv6\u0027?","commit_id":"13878a6780d890e807a69d1705cc3f2d5cd7c71e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"77cd33333bd00b8a59cf0d053811d2e6e136f153","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            if match:"},{"line_number":97,"context_line":"                # strip off any prefix that the interface is using"},{"line_number":98,"context_line":"                short_port_id \u003d (match.group(\u0027dev\u0027)"},{"line_number":99,"context_line":"                                 [n_const.LINUX_DEV_PREFIX_LEN:])"},{"line_number":100,"context_line":"                self._device_zone_map[short_port_id] \u003d int(match.group(\u0027zone\u0027))"},{"line_number":101,"context_line":"        LOG.debug(\"Populated conntrack zone map: %s\", self._device_zone_map)"},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7f231b9d_c86f1b29","line":99,"updated":"2017-06-16 11:38:44.000000000","message":"This looks unrelated","commit_id":"13878a6780d890e807a69d1705cc3f2d5cd7c71e"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"6896a01b60bf9a0f0dd4a9614ad8e4a15e45482e","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            if match:"},{"line_number":97,"context_line":"                # strip off any prefix that the interface is using"},{"line_number":98,"context_line":"                short_port_id \u003d (match.group(\u0027dev\u0027)"},{"line_number":99,"context_line":"                                 [n_const.LINUX_DEV_PREFIX_LEN:])"},{"line_number":100,"context_line":"                self._device_zone_map[short_port_id] \u003d int(match.group(\u0027zone\u0027))"},{"line_number":101,"context_line":"        LOG.debug(\"Populated conntrack zone map: %s\", self._device_zone_map)"},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5f201791_987a4386","line":99,"in_reply_to":"7f231b9d_c86f1b29","updated":"2017-06-21 06:21:27.000000000","message":"Done","commit_id":"13878a6780d890e807a69d1705cc3f2d5cd7c71e"},{"author":{"_account_id":15471,"name":"Nguyen Phuong An","email":"annp.cs51@gmail.com","username":"An-FVL"},"change_message_id":"2c607a14281eb524d5a0333d54965608156ab438","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from oslo_concurrency import lockutils"},{"line_number":18,"context_line":"from oslo_log import log as logging"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from neutron.agent.linux.netlink_conntrack import NetlinkConntrack"},{"line_number":21,"context_line":"from neutron.common import constants as n_const"},{"line_number":22,"context_line":"from neutron.common import exceptions as n_exc"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5f201791_a256e905","line":20,"range":{"start_line":20,"start_character":50,"end_line":20,"end_character":66},"updated":"2017-06-21 07:08:03.000000000","message":"Please don\u0027t include class.","commit_id":"b95a1a97ab6998c509300c9a4edcf2be620951c9"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"1ad8693e5ea0fef470711742842105bb63ef44b0","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from oslo_concurrency import lockutils"},{"line_number":18,"context_line":"from oslo_log import log as logging"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from neutron.agent.linux.netlink_conntrack import NetlinkConntrack"},{"line_number":21,"context_line":"from neutron.common import constants as n_const"},{"line_number":22,"context_line":"from neutron.common import exceptions as n_exc"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5f201791_028fddcc","line":20,"range":{"start_line":20,"start_character":50,"end_line":20,"end_character":66},"in_reply_to":"5f201791_a256e905","updated":"2017-06-21 07:36:45.000000000","message":"Done","commit_id":"b95a1a97ab6998c509300c9a4edcf2be620951c9"},{"author":{"_account_id":15471,"name":"Nguyen Phuong An","email":"annp.cs51@gmail.com","username":"An-FVL"},"change_message_id":"2c607a14281eb524d5a0333d54965608156ab438","unresolved":false,"context_lines":[{"line_number":46,"context_line":"                 unfiltered_ports, execute\u003dNone, namespace\u003dNone,"},{"line_number":47,"context_line":"                 zone_per_port\u003dFalse):"},{"line_number":48,"context_line":"        self.get_rules_for_table_func \u003d get_rules_for_table_func"},{"line_number":49,"context_line":"        self.execute \u003d execute or NetlinkConntrack()"},{"line_number":50,"context_line":"        self.namespace \u003d namespace"},{"line_number":51,"context_line":"        self.filtered_ports \u003d filtered_ports"},{"line_number":52,"context_line":"        self.unfiltered_ports \u003d unfiltered_ports"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f201791_8f18b681","line":49,"range":{"start_line":49,"start_character":13,"end_line":49,"end_character":20},"updated":"2017-06-21 07:08:03.000000000","message":"Shall we remove execute? Because I guess it no need it anymore.","commit_id":"b95a1a97ab6998c509300c9a4edcf2be620951c9"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"1ad8693e5ea0fef470711742842105bb63ef44b0","unresolved":false,"context_lines":[{"line_number":46,"context_line":"                 unfiltered_ports, execute\u003dNone, namespace\u003dNone,"},{"line_number":47,"context_line":"                 zone_per_port\u003dFalse):"},{"line_number":48,"context_line":"        self.get_rules_for_table_func \u003d get_rules_for_table_func"},{"line_number":49,"context_line":"        self.execute \u003d execute or NetlinkConntrack()"},{"line_number":50,"context_line":"        self.namespace \u003d namespace"},{"line_number":51,"context_line":"        self.filtered_ports \u003d filtered_ports"},{"line_number":52,"context_line":"        self.unfiltered_ports \u003d unfiltered_ports"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f201791_e2bd0169","line":49,"range":{"start_line":49,"start_character":13,"end_line":49,"end_character":20},"in_reply_to":"5f201791_8f18b681","updated":"2017-06-21 07:36:45.000000000","message":"agree","commit_id":"b95a1a97ab6998c509300c9a4edcf2be620951c9"},{"author":{"_account_id":15471,"name":"Nguyen Phuong An","email":"annp.cs51@gmail.com","username":"An-FVL"},"change_message_id":"2c607a14281eb524d5a0333d54965608156ab438","unresolved":false,"context_lines":[{"line_number":81,"context_line":"                    conntrack_rules.append(rule)"},{"line_number":82,"context_line":"            self.execute.delete_entries(conntrack_rules, zone_id)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def delete_conntrack_state_by_rule(self, device_info_list, rules):"},{"line_number":85,"context_line":"        self._delete_conntrack_state(device_info_list, rules)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def delete_conntrack_state_by_remote_ips(self, device_info_list,"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f201791_623b31d1","line":84,"range":{"start_line":84,"start_character":8,"end_line":84,"end_character":38},"updated":"2017-06-21 07:08:03.000000000","message":"It be better as: delete_conntrack_state_by_rules","commit_id":"b95a1a97ab6998c509300c9a4edcf2be620951c9"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"1ad8693e5ea0fef470711742842105bb63ef44b0","unresolved":false,"context_lines":[{"line_number":81,"context_line":"                    conntrack_rules.append(rule)"},{"line_number":82,"context_line":"            self.execute.delete_entries(conntrack_rules, zone_id)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def delete_conntrack_state_by_rule(self, device_info_list, rules):"},{"line_number":85,"context_line":"        self._delete_conntrack_state(device_info_list, rules)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def delete_conntrack_state_by_remote_ips(self, device_info_list,"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f201791_82bc0d6a","line":84,"range":{"start_line":84,"start_character":8,"end_line":84,"end_character":38},"in_reply_to":"5f201791_623b31d1","updated":"2017-06-21 07:36:45.000000000","message":"Done","commit_id":"b95a1a97ab6998c509300c9a4edcf2be620951c9"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ae82fc8cfc7db9d5cfdaaee9d638d624497124f2","unresolved":false,"context_lines":[{"line_number":75,"context_line":"                    remote_group_id \u003d rule.get(\u0027remote_group_id\u0027)"},{"line_number":76,"context_line":"                    if remote_group_id:"},{"line_number":77,"context_line":"                        rule[\u0027source_ip_prefix\u0027] \u003d ip"},{"line_number":78,"context_line":"                    if remote_ip and str(netaddr.IPNetwork("},{"line_number":79,"context_line":"                            remote_ip).version) in ethertype:"},{"line_number":80,"context_line":"                        if rule.get(\u0027direction\u0027) \u003d\u003d \u0027ingress\u0027:"},{"line_number":81,"context_line":"                            rule[\u0027dest_ip_prefix\u0027] \u003d remote_ip"},{"line_number":82,"context_line":"                        else:"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f201791_026cd005","line":79,"range":{"start_line":78,"start_character":37,"end_line":79,"end_character":60},"updated":"2017-06-27 14:36:45.000000000","message":"I would prefer something like a dict in common.constants, matching int versions and str versions.","commit_id":"d7a30a127a673d9eb80918b121d1daf530a67d06"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"749f50e2d5598c03543083d14ff622943a1ba45d","unresolved":false,"context_lines":[{"line_number":75,"context_line":"                    remote_group_id \u003d rule.get(\u0027remote_group_id\u0027)"},{"line_number":76,"context_line":"                    if remote_group_id:"},{"line_number":77,"context_line":"                        rule[\u0027source_ip_prefix\u0027] \u003d ip"},{"line_number":78,"context_line":"                    if remote_ip and str(netaddr.IPNetwork("},{"line_number":79,"context_line":"                            remote_ip).version) in ethertype:"},{"line_number":80,"context_line":"                        if rule.get(\u0027direction\u0027) \u003d\u003d \u0027ingress\u0027:"},{"line_number":81,"context_line":"                            rule[\u0027dest_ip_prefix\u0027] \u003d remote_ip"},{"line_number":82,"context_line":"                        else:"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f1d235d_8e7d481e","line":79,"range":{"start_line":78,"start_character":37,"end_line":79,"end_character":60},"in_reply_to":"5f201791_026cd005","updated":"2017-06-30 09:39:13.000000000","message":"i dont get your idea here, mind to elaborate?","commit_id":"d7a30a127a673d9eb80918b121d1daf530a67d06"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ae82fc8cfc7db9d5cfdaaee9d638d624497124f2","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                        rule[\u0027source_ip_prefix\u0027] \u003d ip"},{"line_number":78,"context_line":"                    if remote_ip and str(netaddr.IPNetwork("},{"line_number":79,"context_line":"                            remote_ip).version) in ethertype:"},{"line_number":80,"context_line":"                        if rule.get(\u0027direction\u0027) \u003d\u003d \u0027ingress\u0027:"},{"line_number":81,"context_line":"                            rule[\u0027dest_ip_prefix\u0027] \u003d remote_ip"},{"line_number":82,"context_line":"                        else:"},{"line_number":83,"context_line":"                            rule[\u0027source_ip_prefix\u0027] \u003d remote_ip"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f201791_e2d2f4d0","line":80,"range":{"start_line":80,"start_character":53,"end_line":80,"end_character":60},"updated":"2017-06-27 14:36:45.000000000","message":"nit: better to use neutron.common.constants.INGRESS_DIRECTION","commit_id":"d7a30a127a673d9eb80918b121d1daf530a67d06"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"749f50e2d5598c03543083d14ff622943a1ba45d","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                        rule[\u0027source_ip_prefix\u0027] \u003d ip"},{"line_number":78,"context_line":"                    if remote_ip and str(netaddr.IPNetwork("},{"line_number":79,"context_line":"                            remote_ip).version) in ethertype:"},{"line_number":80,"context_line":"                        if rule.get(\u0027direction\u0027) \u003d\u003d \u0027ingress\u0027:"},{"line_number":81,"context_line":"                            rule[\u0027dest_ip_prefix\u0027] \u003d remote_ip"},{"line_number":82,"context_line":"                        else:"},{"line_number":83,"context_line":"                            rule[\u0027source_ip_prefix\u0027] \u003d remote_ip"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f1d235d_ae82444e","line":80,"range":{"start_line":80,"start_character":53,"end_line":80,"end_character":60},"in_reply_to":"5f201791_e2d2f4d0","updated":"2017-06-30 09:39:13.000000000","message":"Done","commit_id":"d7a30a127a673d9eb80918b121d1daf530a67d06"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"55d3d08921282b462de314e86196c093478ea546","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                          {\u0027dev\u0027: device_info[\u0027device\u0027],"},{"line_number":64,"context_line":"                           \u0027zm\u0027: self._device_zone_map})"},{"line_number":65,"context_line":"                continue"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"            ips \u003d device_info.get(\u0027fixed_ips\u0027, [])"},{"line_number":68,"context_line":"            for ip in ips:"},{"line_number":69,"context_line":"                net \u003d netaddr.IPNetwork(ip)"}],"source_content_type":"text/x-python","patch_set":22,"id":"ff346bd7_57f1be94","line":66,"updated":"2017-07-26 16:30:36.000000000","message":"nit: added blank line","commit_id":"8e6c85b6a22acb6cf9775d5ee8f642b1ea5baca2"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"0ab9926507fad63b95dc6448ef8fc195ff7b5909","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                          {\u0027dev\u0027: device_info[\u0027device\u0027],"},{"line_number":64,"context_line":"                           \u0027zm\u0027: self._device_zone_map})"},{"line_number":65,"context_line":"                continue"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"            ips \u003d device_info.get(\u0027fixed_ips\u0027, [])"},{"line_number":68,"context_line":"            for ip in ips:"},{"line_number":69,"context_line":"                net \u003d netaddr.IPNetwork(ip)"}],"source_content_type":"text/x-python","patch_set":22,"id":"ff346bd7_1a70ecdb","line":66,"in_reply_to":"ff346bd7_57f1be94","updated":"2017-07-27 06:35:37.000000000","message":"Done","commit_id":"8e6c85b6a22acb6cf9775d5ee8f642b1ea5baca2"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"55d3d08921282b462de314e86196c093478ea546","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                        rule[\u0027source_ip_prefix\u0027] \u003d ip"},{"line_number":78,"context_line":"                    if remote_ip and str(netaddr.IPNetwork("},{"line_number":79,"context_line":"                            remote_ip).version) in ethertype:"},{"line_number":80,"context_line":"                        if rule.get(\u0027direction\u0027) \u003d\u003d \\"},{"line_number":81,"context_line":"                                n_const.INGRESS_DIRECTION:"},{"line_number":82,"context_line":"                            rule[\u0027dest_ip_prefix\u0027] \u003d remote_ip"},{"line_number":83,"context_line":"                        else:"}],"source_content_type":"text/x-python","patch_set":22,"id":"ff346bd7_d7afee7a","line":80,"updated":"2017-07-26 16:30:36.000000000","message":"nit: no \u0027\\\u0027 please, just use () around the statement","commit_id":"8e6c85b6a22acb6cf9775d5ee8f642b1ea5baca2"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"0ab9926507fad63b95dc6448ef8fc195ff7b5909","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                        rule[\u0027source_ip_prefix\u0027] \u003d ip"},{"line_number":78,"context_line":"                    if remote_ip and str(netaddr.IPNetwork("},{"line_number":79,"context_line":"                            remote_ip).version) in ethertype:"},{"line_number":80,"context_line":"                        if rule.get(\u0027direction\u0027) \u003d\u003d \\"},{"line_number":81,"context_line":"                                n_const.INGRESS_DIRECTION:"},{"line_number":82,"context_line":"                            rule[\u0027dest_ip_prefix\u0027] \u003d remote_ip"},{"line_number":83,"context_line":"                        else:"}],"source_content_type":"text/x-python","patch_set":22,"id":"ff346bd7_da75c4cc","line":80,"in_reply_to":"ff346bd7_d7afee7a","updated":"2017-07-27 06:35:37.000000000","message":"Done","commit_id":"8e6c85b6a22acb6cf9775d5ee8f642b1ea5baca2"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"55d3d08921282b462de314e86196c093478ea546","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                            rule[\u0027source_ip_prefix\u0027] \u003d remote_ip"},{"line_number":85,"context_line":"                        rule[\u0027remote_ip\u0027] \u003d True"},{"line_number":86,"context_line":"                    conntrack_rules.append(rule)"},{"line_number":87,"context_line":"            self.conntrack_mgr.delete_entries(conntrack_rules, zone_id)"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def delete_conntrack_state_by_rules(self, device_info_list, rules):"},{"line_number":90,"context_line":"        self._delete_conntrack_state(device_info_list, rules)"}],"source_content_type":"text/x-python","patch_set":22,"id":"ff346bd7_57aade70","line":87,"updated":"2017-07-26 16:30:36.000000000","message":"conntrack_rules could be [] here, does delete_entries() handle that?  Also, the old code had a try/except here so that we would continue even if one delete failed, think that is good to keep.","commit_id":"8e6c85b6a22acb6cf9775d5ee8f642b1ea5baca2"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"0ab9926507fad63b95dc6448ef8fc195ff7b5909","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                            rule[\u0027source_ip_prefix\u0027] \u003d remote_ip"},{"line_number":85,"context_line":"                        rule[\u0027remote_ip\u0027] \u003d True"},{"line_number":86,"context_line":"                    conntrack_rules.append(rule)"},{"line_number":87,"context_line":"            self.conntrack_mgr.delete_entries(conntrack_rules, zone_id)"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def delete_conntrack_state_by_rules(self, device_info_list, rules):"},{"line_number":90,"context_line":"        self._delete_conntrack_state(device_info_list, rules)"}],"source_content_type":"text/x-python","patch_set":22,"id":"ff346bd7_3a3970f1","line":87,"in_reply_to":"ff346bd7_57aade70","updated":"2017-07-27 06:35:37.000000000","message":"\u003e conntrack_rules could be [] here, does delete_entries() handle that?\n\nDone\n\n\u003e Also, the old code had a try/except here so that we would continue even if one delete failed, think that is good to keep.\n\nThe old code deletes conntrack rule by rule so handling exception here is good. But with netlink solution, conntrack_rules passed as a list to delete_entries() so no exception handling here, the netlink-lib behind delete_entries() will handle that exception when deleting each rule instead.","commit_id":"8e6c85b6a22acb6cf9775d5ee8f642b1ea5baca2"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"3ae43000fd434c7257c6d958bc1959890bcb99a4","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                        continue"},{"line_number":73,"context_line":"                    # rule has remote security group"},{"line_number":74,"context_line":"                    remote_group_id \u003d rule.get(\u0027remote_group_id\u0027)"},{"line_number":75,"context_line":"                    if remote_group_id:"},{"line_number":76,"context_line":"                        rule[\u0027source_ip_prefix\u0027] \u003d ip"},{"line_number":77,"context_line":"                    if remote_ip and str(netaddr.IPNetwork("},{"line_number":78,"context_line":"                            remote_ip).version) in ethertype:"}],"source_content_type":"text/x-python","patch_set":24,"id":"ff346bd7_b0e54d3a","line":75,"updated":"2017-07-28 07:55:36.000000000","message":"I don\u0027t understand this conditional. Why is source_ip_prefix dependent on remote_group_id being in the rule? Also, this getting set will be wiped out by L83.\n\nIf this logic is correct, it definitely needs a docstring explaining why remote_group_id depends on it.","commit_id":"aaa27cd8e1a06cdfd12d246f4d63fdfea616c96d"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"641823dd9de95e014e4742856da01eb2cdde0811","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                        continue"},{"line_number":73,"context_line":"                    # rule has remote security group"},{"line_number":74,"context_line":"                    remote_group_id \u003d rule.get(\u0027remote_group_id\u0027)"},{"line_number":75,"context_line":"                    if remote_group_id:"},{"line_number":76,"context_line":"                        rule[\u0027source_ip_prefix\u0027] \u003d ip"},{"line_number":77,"context_line":"                    if remote_ip and str(netaddr.IPNetwork("},{"line_number":78,"context_line":"                            remote_ip).version) in ethertype:"}],"source_content_type":"text/x-python","patch_set":24,"id":"df3967d1_ed504ad7","line":75,"in_reply_to":"df3967d1_dc19be88","updated":"2017-07-31 07:09:46.000000000","message":"No, referencing a remote_group shouldn\u0027t be any different than referencing a remote IP address. The source IP should always be set, this is what L90 was doing in the old code.","commit_id":"aaa27cd8e1a06cdfd12d246f4d63fdfea616c96d"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"e1cdc6b2bd6f208754be86213114f6fd005446a8","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                        continue"},{"line_number":73,"context_line":"                    # rule has remote security group"},{"line_number":74,"context_line":"                    remote_group_id \u003d rule.get(\u0027remote_group_id\u0027)"},{"line_number":75,"context_line":"                    if remote_group_id:"},{"line_number":76,"context_line":"                        rule[\u0027source_ip_prefix\u0027] \u003d ip"},{"line_number":77,"context_line":"                    if remote_ip and str(netaddr.IPNetwork("},{"line_number":78,"context_line":"                            remote_ip).version) in ethertype:"}],"source_content_type":"text/x-python","patch_set":24,"id":"df3967d1_7d2f1ea1","line":75,"in_reply_to":"df3967d1_ed504ad7","updated":"2017-08-02 09:05:10.000000000","message":"Done","commit_id":"aaa27cd8e1a06cdfd12d246f4d63fdfea616c96d"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"e8aca6039155fae09179f7dec6367ae8736fdcf0","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                        continue"},{"line_number":73,"context_line":"                    # rule has remote security group"},{"line_number":74,"context_line":"                    remote_group_id \u003d rule.get(\u0027remote_group_id\u0027)"},{"line_number":75,"context_line":"                    if remote_group_id:"},{"line_number":76,"context_line":"                        rule[\u0027source_ip_prefix\u0027] \u003d ip"},{"line_number":77,"context_line":"                    if remote_ip and str(netaddr.IPNetwork("},{"line_number":78,"context_line":"                            remote_ip).version) in ethertype:"}],"source_content_type":"text/x-python","patch_set":24,"id":"df3967d1_dc19be88","line":75,"in_reply_to":"ff346bd7_b0e54d3a","updated":"2017-07-31 06:08:33.000000000","message":"in my understanding, when rule has remote_group_id the source is the fixed_ips, that\u0027s why I made \u0027source_ip_prefix\u0027 value is ip. pls correct if I\u0027m wrong.","commit_id":"aaa27cd8e1a06cdfd12d246f4d63fdfea616c96d"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"3ae43000fd434c7257c6d958bc1959890bcb99a4","unresolved":false,"context_lines":[{"line_number":78,"context_line":"                            remote_ip).version) in ethertype:"},{"line_number":79,"context_line":"                        if (rule.get(\u0027direction\u0027) \u003d\u003d"},{"line_number":80,"context_line":"                                n_const.INGRESS_DIRECTION):"},{"line_number":81,"context_line":"                            rule[\u0027dest_ip_prefix\u0027] \u003d remote_ip"},{"line_number":82,"context_line":"                        else:"},{"line_number":83,"context_line":"                            rule[\u0027source_ip_prefix\u0027] \u003d remote_ip"},{"line_number":84,"context_line":"                        rule[\u0027remote_ip\u0027] \u003d True"}],"source_content_type":"text/x-python","patch_set":24,"id":"ff346bd7_90e00928","line":81,"updated":"2017-07-28 07:55:36.000000000","message":"This seems backwards to me and it\u0027s the opposite of the previous logic being removed. Are you sure it\u0027s correct?\n\nOn an ingress rule, the source of the traffic would be the remote address and on an egress rule the destination should be the remote address.","commit_id":"aaa27cd8e1a06cdfd12d246f4d63fdfea616c96d"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"641823dd9de95e014e4742856da01eb2cdde0811","unresolved":false,"context_lines":[{"line_number":78,"context_line":"                            remote_ip).version) in ethertype:"},{"line_number":79,"context_line":"                        if (rule.get(\u0027direction\u0027) \u003d\u003d"},{"line_number":80,"context_line":"                                n_const.INGRESS_DIRECTION):"},{"line_number":81,"context_line":"                            rule[\u0027dest_ip_prefix\u0027] \u003d remote_ip"},{"line_number":82,"context_line":"                        else:"},{"line_number":83,"context_line":"                            rule[\u0027source_ip_prefix\u0027] \u003d remote_ip"},{"line_number":84,"context_line":"                        rule[\u0027remote_ip\u0027] \u003d True"}],"source_content_type":"text/x-python","patch_set":24,"id":"df3967d1_8d277e65","line":81,"in_reply_to":"df3967d1_171cc168","updated":"2017-07-31 07:09:46.000000000","message":"For an ingress rule that allows TCP port 80 for example, the conntrack entries will have a source IP of the remote IPs that are connecting into the instance. The dest_ip_prefix will always be the instance for ingress rules.\n\nYou need to reverse the logic you have here to set source_ip_prefix to remote_ip on INGRESS rules. That\u0027s why the old code used the \u0027-s\u0027 flag for source on ingress (L93).","commit_id":"aaa27cd8e1a06cdfd12d246f4d63fdfea616c96d"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"e1cdc6b2bd6f208754be86213114f6fd005446a8","unresolved":false,"context_lines":[{"line_number":78,"context_line":"                            remote_ip).version) in ethertype:"},{"line_number":79,"context_line":"                        if (rule.get(\u0027direction\u0027) \u003d\u003d"},{"line_number":80,"context_line":"                                n_const.INGRESS_DIRECTION):"},{"line_number":81,"context_line":"                            rule[\u0027dest_ip_prefix\u0027] \u003d remote_ip"},{"line_number":82,"context_line":"                        else:"},{"line_number":83,"context_line":"                            rule[\u0027source_ip_prefix\u0027] \u003d remote_ip"},{"line_number":84,"context_line":"                        rule[\u0027remote_ip\u0027] \u003d True"}],"source_content_type":"text/x-python","patch_set":24,"id":"df3967d1_3d1bd681","line":81,"in_reply_to":"df3967d1_8d277e65","updated":"2017-08-02 09:05:10.000000000","message":"Done","commit_id":"aaa27cd8e1a06cdfd12d246f4d63fdfea616c96d"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"e8aca6039155fae09179f7dec6367ae8736fdcf0","unresolved":false,"context_lines":[{"line_number":78,"context_line":"                            remote_ip).version) in ethertype:"},{"line_number":79,"context_line":"                        if (rule.get(\u0027direction\u0027) \u003d\u003d"},{"line_number":80,"context_line":"                                n_const.INGRESS_DIRECTION):"},{"line_number":81,"context_line":"                            rule[\u0027dest_ip_prefix\u0027] \u003d remote_ip"},{"line_number":82,"context_line":"                        else:"},{"line_number":83,"context_line":"                            rule[\u0027source_ip_prefix\u0027] \u003d remote_ip"},{"line_number":84,"context_line":"                        rule[\u0027remote_ip\u0027] \u003d True"}],"source_content_type":"text/x-python","patch_set":24,"id":"df3967d1_171cc168","line":81,"in_reply_to":"ff346bd7_90e00928","updated":"2017-07-31 06:08:33.000000000","message":"in the case rule has remote_ip I understand that remote_ip is dest_ip_prefix in the rule, L83 is for this case.\n\nThe reason I append source_ip_prefix and dest_ip_prefix is to have rules have same fields for later processing.\n\n\u003e On an ingress rule, the source of the traffic would be the remote address and on an egress rule the destination should be the remote address.\n\nI\u0027m not sure with this point, pls help to correct me if I misunderstood any point.","commit_id":"aaa27cd8e1a06cdfd12d246f4d63fdfea616c96d"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"94ebdd01ed0580b0c473598b1b33288d5900b320","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                    if str(net.version) not in ethertype:"},{"line_number":72,"context_line":"                        continue"},{"line_number":73,"context_line":"                    # rule has remote security group"},{"line_number":74,"context_line":"                    remote_group_id \u003d rule.get(\u0027remote_group_id\u0027)"},{"line_number":75,"context_line":"                    if remote_group_id:"},{"line_number":76,"context_line":"                        rule[\u0027source_ip_prefix\u0027] \u003d ip"},{"line_number":77,"context_line":"                    if remote_ip and str(netaddr.IPNetwork("}],"source_content_type":"text/x-python","patch_set":25,"id":"df3967d1_faaa2683","line":74,"updated":"2017-07-31 22:15:55.000000000","message":"for rule in rules:\n    ethertype \u003d rule.get(\u0027ethertype\u0027)\n    if str(net.version) not in ethertype:\n        continue\n    rule[\u0027source_ip_prefix\u0027] \u003d ip\n    if remote_ip and str(netaddr.IPNetwork(remote_ip).version)) in ethertype:\n        if rule.get(\u0027direction\u0027) \u003d\u003d n_const.INGRESS_DIRECTION:\n            # for ingress rules we are killing connections from the remote address\n            # to the instance IPs\n            rule[\u0027source_ip_prefix\u0027] \u003d remote_ip\n            rule[\u0027dest_ip_prefix\u0027] \u003d ip\n        else:\n            # for egress rules we are killing connections from the instance to\n            # the remote IP address.\n            rule[\u0027source_ip_prefix\u0027] \u003d ip\n            rule[\u0027dest_ip_prefix\u0027] \u003d remote_ip\n        rule[\u0027remote_ip\u0027] \u003d True\n    conntrack_rules.append(rule)","commit_id":"45171c55e5621abc30ca56e55f16c11730495b5e"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"7b9065b2e75d97ca6eecd3083476b78891283d8d","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                    if str(net.version) not in ethertype:"},{"line_number":72,"context_line":"                        continue"},{"line_number":73,"context_line":"                    # rule has remote security group"},{"line_number":74,"context_line":"                    remote_group_id \u003d rule.get(\u0027remote_group_id\u0027)"},{"line_number":75,"context_line":"                    if remote_group_id:"},{"line_number":76,"context_line":"                        rule[\u0027source_ip_prefix\u0027] \u003d ip"},{"line_number":77,"context_line":"                    if remote_ip and str(netaddr.IPNetwork("}],"source_content_type":"text/x-python","patch_set":25,"id":"df3967d1_dd172a51","line":74,"in_reply_to":"df3967d1_faaa2683","updated":"2017-08-02 09:06:02.000000000","message":":) thanks for this, was busy to push code. I updated code in new ps, pls help to take a look. Thanks.","commit_id":"45171c55e5621abc30ca56e55f16c11730495b5e"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"d655af9bff6c86388a9086b316ee6d4b0676fa87","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    def __init__(self, get_rules_for_table_func, filtered_ports,"},{"line_number":46,"context_line":"                 unfiltered_ports, namespace\u003dNone, zone_per_port\u003dFalse):"},{"line_number":47,"context_line":"        self.get_rules_for_table_func \u003d get_rules_for_table_func"},{"line_number":48,"context_line":"        self.conntrack_mgr \u003d netlink_conntrack.NetlinkConntrack()"},{"line_number":49,"context_line":"        self.namespace \u003d namespace"},{"line_number":50,"context_line":"        self.filtered_ports \u003d filtered_ports"},{"line_number":51,"context_line":"        self.unfiltered_ports \u003d unfiltered_ports"}],"source_content_type":"text/x-python","patch_set":27,"id":"9f436f4f_2be97e19","line":48,"updated":"2017-08-09 20:33:17.000000000","message":"based on the latest incident [1], should we defer this for pike?\n\n[1] https://review.openstack.org/#/c/492068/","commit_id":"ecb3a394d3e619cae4d6d7f1f0fd4671cf9515d9"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"530bc4621029cdcd4655993e08c12cceb935ec65","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"@lockutils.synchronized(\u0027conntrack\u0027)"},{"line_number":30,"context_line":"def get_conntrack(get_rules_for_table_func, filtered_ports,"},{"line_number":31,"context_line":"                  unfiltered_ports, namespace\u003dNone, zone_per_port\u003dFalse):"},{"line_number":32,"context_line":"    try:"},{"line_number":33,"context_line":"        return CONTRACK_MGRS[namespace]"},{"line_number":34,"context_line":"    except KeyError:"}],"source_content_type":"text/x-python","patch_set":30,"id":"7f287b81_5f499fb4","line":31,"range":{"start_line":31,"start_character":18,"end_line":31,"end_character":35},"updated":"2017-08-29 20:21:51.000000000","message":"super nit: no need to change the place of wrapping lines","commit_id":"b4252bbf098be601049ff46e21f79d6c328b2310"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"530bc4621029cdcd4655993e08c12cceb935ec65","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                net \u003d netaddr.IPNetwork(ip)"},{"line_number":69,"context_line":"                for rule in rules:"},{"line_number":70,"context_line":"                    ethertype \u003d rule.get(\u0027ethertype\u0027)"},{"line_number":71,"context_line":"                    if str(net.version) not in ethertype:"},{"line_number":72,"context_line":"                        continue"},{"line_number":73,"context_line":"                    rule[\u0027source_ip_prefix\u0027] \u003d ip"},{"line_number":74,"context_line":"                    if remote_ip and str(netaddr.IPNetwork("}],"source_content_type":"text/x-python","patch_set":30,"id":"7f287b81_2a344f92","line":71,"range":{"start_line":71,"start_character":20,"end_line":71,"end_character":57},"updated":"2017-08-29 20:21:51.000000000","message":"question: is \u0027ethertype\u0027 a string like \u0027IPv4\u0027 or \u0027IPv6\u0027? or is it a string like \u00274\u0027 or \u00276\u0027?\n\nrules is passed from delete_conntrack_state_by_remote_ips() below and delete_conntrack_state_by_remote_ips is called from iptables_firewall.py. In iptables_firewall.py, there are four callers. One of them is [1] and in this case neutron_lib.constatns.IPv4 (which is a string \u0027IPv4\u0027) is passed as ethertype.\n\nOn the other hand, netaddr.IPNetwork(....).version returns an integer 4 or 6.\n\nThus, I wonder this if clause always hits..... am I missing something?\n\n[1] https://github.com/openstack/neutron/blob/5d98e30e5c45e3bda70645c7dfc490d5a9deba76/neutron/agent/linux/iptables_firewall.py#L813","commit_id":"b4252bbf098be601049ff46e21f79d6c328b2310"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"1d7d3281dadabedb60a5bc09f4e37a6074faf1fd","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                net \u003d netaddr.IPNetwork(ip)"},{"line_number":69,"context_line":"                for rule in rules:"},{"line_number":70,"context_line":"                    ethertype \u003d rule.get(\u0027ethertype\u0027)"},{"line_number":71,"context_line":"                    if str(net.version) not in ethertype:"},{"line_number":72,"context_line":"                        continue"},{"line_number":73,"context_line":"                    rule[\u0027source_ip_prefix\u0027] \u003d ip"},{"line_number":74,"context_line":"                    if remote_ip and str(netaddr.IPNetwork("}],"source_content_type":"text/x-python","patch_set":30,"id":"7f287b81_6792854e","line":71,"range":{"start_line":71,"start_character":20,"end_line":71,"end_character":57},"in_reply_to":"7f287b81_2a344f92","updated":"2017-08-30 09:43:25.000000000","message":"\u003e question: is \u0027ethertype\u0027 a string like \u0027IPv4\u0027 or \u0027IPv6\u0027? or is it a string like \u00274\u0027 or \u00276\u0027?\n\nit\u0027s IPv4 or IPv6\n\n\u003e Thus, I wonder this if clause always hits..... am I missing something?\n\nYeah, you\u0027re right, I kept this if from original implementation.","commit_id":"b4252bbf098be601049ff46e21f79d6c328b2310"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"530bc4621029cdcd4655993e08c12cceb935ec65","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                    if str(net.version) not in ethertype:"},{"line_number":72,"context_line":"                        continue"},{"line_number":73,"context_line":"                    rule[\u0027source_ip_prefix\u0027] \u003d ip"},{"line_number":74,"context_line":"                    if remote_ip and str(netaddr.IPNetwork("},{"line_number":75,"context_line":"                            remote_ip).version) in ethertype:"},{"line_number":76,"context_line":"                        if rule.get(\u0027direction\u0027) \u003d\u003d n_const.INGRESS_DIRECTION:"},{"line_number":77,"context_line":"                            # for ingress rules we are killing connections from"},{"line_number":78,"context_line":"                            # the remote address to the instance IPs"}],"source_content_type":"text/x-python","patch_set":30,"id":"7f287b81_9f0b8728","line":75,"range":{"start_line":74,"start_character":20,"end_line":75,"end_character":60},"updated":"2017-08-29 20:21:51.000000000","message":"nit: consider using parentheses to wrap lines\n\n  if (remote_ip and\n      str(netaddr.IPNetwork(remote_ip).version) in ethertype):","commit_id":"b4252bbf098be601049ff46e21f79d6c328b2310"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"1d7d3281dadabedb60a5bc09f4e37a6074faf1fd","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                    if str(net.version) not in ethertype:"},{"line_number":72,"context_line":"                        continue"},{"line_number":73,"context_line":"                    rule[\u0027source_ip_prefix\u0027] \u003d ip"},{"line_number":74,"context_line":"                    if remote_ip and str(netaddr.IPNetwork("},{"line_number":75,"context_line":"                            remote_ip).version) in ethertype:"},{"line_number":76,"context_line":"                        if rule.get(\u0027direction\u0027) \u003d\u003d n_const.INGRESS_DIRECTION:"},{"line_number":77,"context_line":"                            # for ingress rules we are killing connections from"},{"line_number":78,"context_line":"                            # the remote address to the instance IPs"}],"source_content_type":"text/x-python","patch_set":30,"id":"7f287b81_c7a01993","line":75,"range":{"start_line":74,"start_character":20,"end_line":75,"end_character":60},"in_reply_to":"7f287b81_9f0b8728","updated":"2017-08-30 09:43:25.000000000","message":"Done","commit_id":"b4252bbf098be601049ff46e21f79d6c328b2310"}],"neutron/agent/linux/iptables_firewall.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"a6443abd06f8a016ee8d18465e45fee197c9836e","unresolved":false,"context_lines":[{"line_number":794,"context_line":"            device_list \u003d self._find_devices_on_security_group(sg_id)"},{"line_number":795,"context_line":""},{"line_number":796,"context_line":"            self.ipconntrack.delete_conntrack_state_by_rules(device_list,"},{"line_number":797,"context_line":"                                                             del_rules)"},{"line_number":798,"context_line":"            deleted_sg_ids.add(sg_id)"},{"line_number":799,"context_line":"        for id in deleted_sg_ids:"},{"line_number":800,"context_line":"            self.updated_rule_sg_ids.remove(id)"}],"source_content_type":"text/x-python","patch_set":35,"id":"3fa0c359_7c31e358","line":797,"range":{"start_line":797,"start_character":61,"end_line":797,"end_character":71},"updated":"2018-02-22 14:34:54.000000000","message":"nit: it can be probably moved to line above :)","commit_id":"05f949b355eea56cbb0f0b474b3e3725a5154999"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"90cf8ea7cfa3055becec50ccffe62b1fc56ca97d","unresolved":false,"context_lines":[{"line_number":794,"context_line":"            device_list \u003d self._find_devices_on_security_group(sg_id)"},{"line_number":795,"context_line":""},{"line_number":796,"context_line":"            self.ipconntrack.delete_conntrack_state_by_rules(device_list,"},{"line_number":797,"context_line":"                                                             del_rules)"},{"line_number":798,"context_line":"            deleted_sg_ids.add(sg_id)"},{"line_number":799,"context_line":"        for id in deleted_sg_ids:"},{"line_number":800,"context_line":"            self.updated_rule_sg_ids.remove(id)"}],"source_content_type":"text/x-python","patch_set":35,"id":"ff6b8bd7_f9c6f716","line":797,"range":{"start_line":797,"start_character":61,"end_line":797,"end_character":71},"in_reply_to":"3fa0c359_7c31e358","updated":"2018-03-06 18:35:11.000000000","message":"You mean delete the blank line?  done.","commit_id":"05f949b355eea56cbb0f0b474b3e3725a5154999"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"3c3daf8d91cc6325e694b096381b612703f5c206","unresolved":false,"context_lines":[{"line_number":206,"context_line":"                     \u0027filtered %r\u0027, port)"},{"line_number":207,"context_line":"            return"},{"line_number":208,"context_line":"        self._remove_chains()"},{"line_number":209,"context_line":"        self._remove_conntrack_entries_from_port_deleted(port)"},{"line_number":210,"context_line":"        self._unset_ports(port)"},{"line_number":211,"context_line":"        self._setup_chains()"},{"line_number":212,"context_line":"        return self.iptables.apply()"}],"source_content_type":"text/x-python","patch_set":41,"id":"9f6a8fd7_08626f17","line":209,"updated":"2018-04-27 20:36:29.000000000","message":"I wonder if this is the problem.  If we delete conntrack entries before iptables rules are applied, there could be a small window where a new packet arrives and re-creates the entry.  If we moved it after L212 that shouldn\u0027t be a problem.  Let me make that small change and re-test.","commit_id":"c1fcf27a8be1adbe0ca3e62320e6cb6960dc2985"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"3c3daf8d91cc6325e694b096381b612703f5c206","unresolved":false,"context_lines":[{"line_number":886,"context_line":"            self._setup_chains_apply(self.filtered_ports,"},{"line_number":887,"context_line":"                                     self.unfiltered_ports)"},{"line_number":888,"context_line":"            self.iptables.defer_apply_off()"},{"line_number":889,"context_line":"            self._remove_conntrack_entries_from_sg_updates()"},{"line_number":890,"context_line":"            self._remove_unused_security_group_info()"},{"line_number":891,"context_line":"            self._pre_defer_filtered_ports \u003d None"},{"line_number":892,"context_line":"            self._pre_defer_unfiltered_ports \u003d None"}],"source_content_type":"text/x-python","patch_set":41,"id":"9f6a8fd7_e8bb7b6f","line":889,"updated":"2018-04-27 20:36:29.000000000","message":"But here we delete the conntrack entries after iptables apply","commit_id":"c1fcf27a8be1adbe0ca3e62320e6cb6960dc2985"}],"neutron/agent/linux/netlink_conntrack.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"77cd33333bd00b8a59cf0d053811d2e6e136f153","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        entry_index \u003d 0"},{"line_number":49,"context_line":"        entry_number \u003d len(entries)"},{"line_number":50,"context_line":"        for rule_filter in rule_filters:"},{"line_number":51,"context_line":"            while entry_index \u003c entry_number:"},{"line_number":52,"context_line":"                # Compare entry with rule"},{"line_number":53,"context_line":"                comp \u003d self._compare_entry_and_rule(rule_filter,"},{"line_number":54,"context_line":"                                                    entries[entry_index])"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f231b9d_e35b18f3","line":51,"range":{"start_line":51,"start_character":12,"end_line":51,"end_character":45},"updated":"2017-06-16 11:38:44.000000000","message":"You can use\n  for index in range(len(entries))\n\nYou dont\u0027 need entry_index and entry_number; also you can remove L57 and L61","commit_id":"13878a6780d890e807a69d1705cc3f2d5cd7c71e"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"6896a01b60bf9a0f0dd4a9614ad8e4a15e45482e","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        entry_index \u003d 0"},{"line_number":49,"context_line":"        entry_number \u003d len(entries)"},{"line_number":50,"context_line":"        for rule_filter in rule_filters:"},{"line_number":51,"context_line":"            while entry_index \u003c entry_number:"},{"line_number":52,"context_line":"                # Compare entry with rule"},{"line_number":53,"context_line":"                comp \u003d self._compare_entry_and_rule(rule_filter,"},{"line_number":54,"context_line":"                                                    entries[entry_index])"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f201791_582cab46","line":51,"range":{"start_line":51,"start_character":12,"end_line":51,"end_character":45},"in_reply_to":"7f231b9d_e35b18f3","updated":"2017-06-21 06:21:27.000000000","message":"Done","commit_id":"13878a6780d890e807a69d1705cc3f2d5cd7c71e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"77cd33333bd00b8a59cf0d053811d2e6e136f153","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                \u0027port_range_min\u0027, \u0027port_range_max\u0027,"},{"line_number":77,"context_line":"                \u0027source_ip_prefix\u0027, \u0027dest_ip_prefix\u0027]"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        icmp_keys \u003d [\u0027ethertype\u0027, \u0027protocol\u0027,"},{"line_number":80,"context_line":"                     \u0027port_range_max\u0027, \u0027port_range_min\u0027,"},{"line_number":81,"context_line":"                     \u0027source_ip_prefix\u0027, \u0027dest_ip_prefix\u0027, \u0027id\u0027]"},{"line_number":82,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7f231b9d_439e4cb9","line":79,"range":{"start_line":79,"start_character":8,"end_line":79,"end_character":17},"updated":"2017-06-16 11:38:44.000000000","message":"This is the same as \"keys\" but with and extra item, \u0027id\u0027. Is it necessary to create a second variable?","commit_id":"13878a6780d890e807a69d1705cc3f2d5cd7c71e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"8e3a5a4487a5d993789c9ecc0ff2e554d7bc6c30","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                \u0027port_range_min\u0027, \u0027port_range_max\u0027,"},{"line_number":77,"context_line":"                \u0027source_ip_prefix\u0027, \u0027dest_ip_prefix\u0027]"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        icmp_keys \u003d [\u0027ethertype\u0027, \u0027protocol\u0027,"},{"line_number":80,"context_line":"                     \u0027port_range_max\u0027, \u0027port_range_min\u0027,"},{"line_number":81,"context_line":"                     \u0027source_ip_prefix\u0027, \u0027dest_ip_prefix\u0027, \u0027id\u0027]"},{"line_number":82,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5f201791_e5050b7c","line":79,"range":{"start_line":79,"start_character":8,"end_line":79,"end_character":17},"in_reply_to":"5f201791_d85f9b0c","updated":"2017-06-21 08:08:01.000000000","message":"Ok, I didn\u0027t see that","commit_id":"13878a6780d890e807a69d1705cc3f2d5cd7c71e"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"6896a01b60bf9a0f0dd4a9614ad8e4a15e45482e","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                \u0027port_range_min\u0027, \u0027port_range_max\u0027,"},{"line_number":77,"context_line":"                \u0027source_ip_prefix\u0027, \u0027dest_ip_prefix\u0027]"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        icmp_keys \u003d [\u0027ethertype\u0027, \u0027protocol\u0027,"},{"line_number":80,"context_line":"                     \u0027port_range_max\u0027, \u0027port_range_min\u0027,"},{"line_number":81,"context_line":"                     \u0027source_ip_prefix\u0027, \u0027dest_ip_prefix\u0027, \u0027id\u0027]"},{"line_number":82,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5f201791_d85f9b0c","line":79,"range":{"start_line":79,"start_character":8,"end_line":79,"end_character":17},"in_reply_to":"7f231b9d_439e4cb9","updated":"2017-06-21 06:21:27.000000000","message":"actually there is a diff in order of port_range_min and port_range_max","commit_id":"13878a6780d890e807a69d1705cc3f2d5cd7c71e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"77cd33333bd00b8a59cf0d053811d2e6e136f153","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            keys \u003d icmp_keys"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        for key in keys:"},{"line_number":87,"context_line":"            if str(rule.get(key)) \u003d\u003d \u0027IPv4\u0027:"},{"line_number":88,"context_line":"                rule_filter.append(4)"},{"line_number":89,"context_line":"                continue"},{"line_number":90,"context_line":"            if str(rule.get(key)) \u003d\u003d \u0027IPv6\u0027:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f231b9d_c3437c41","line":87,"range":{"start_line":87,"start_character":15,"end_line":87,"end_character":19},"updated":"2017-06-16 11:38:44.000000000","message":"I don\u0027t understand why do you need to convert to a string a string.","commit_id":"13878a6780d890e807a69d1705cc3f2d5cd7c71e"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"6896a01b60bf9a0f0dd4a9614ad8e4a15e45482e","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            keys \u003d icmp_keys"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        for key in keys:"},{"line_number":87,"context_line":"            if str(rule.get(key)) \u003d\u003d \u0027IPv4\u0027:"},{"line_number":88,"context_line":"                rule_filter.append(4)"},{"line_number":89,"context_line":"                continue"},{"line_number":90,"context_line":"            if str(rule.get(key)) \u003d\u003d \u0027IPv6\u0027:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f201791_58a94bdd","line":87,"range":{"start_line":87,"start_character":15,"end_line":87,"end_character":19},"in_reply_to":"7f231b9d_c3437c41","updated":"2017-06-21 06:21:27.000000000","message":"Done","commit_id":"13878a6780d890e807a69d1705cc3f2d5cd7c71e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"77cd33333bd00b8a59cf0d053811d2e6e136f153","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        \"\"\"Define that the entry should be deleted or not"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        :param rule_filter: filter that is parsed from a security group rule"},{"line_number":102,"context_line":"        ex: (4, \u0027tcp\u0027, 22, 22, \u00270.0.0.0/0\u0027, 1)"},{"line_number":103,"context_line":"        :param entry: parsed conntrack entry,"},{"line_number":104,"context_line":"        format: (ipversion, protocol, srcport, destport, srcip, destip, zone)"},{"line_number":105,"context_line":"        ex: (4, \u0027tcp\u0027, 55586, 22, \u0027172.24.4.2\u0027, \u0027172.24.4.10\u0027, 1)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f231b9d_a85dff47","line":102,"updated":"2017-06-16 11:38:44.000000000","message":"can you indent this line to make it easier to read?","commit_id":"13878a6780d890e807a69d1705cc3f2d5cd7c71e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"77cd33333bd00b8a59cf0d053811d2e6e136f153","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        :param rule_filter: filter that is parsed from a security group rule"},{"line_number":102,"context_line":"        ex: (4, \u0027tcp\u0027, 22, 22, \u00270.0.0.0/0\u0027, 1)"},{"line_number":103,"context_line":"        :param entry: parsed conntrack entry,"},{"line_number":104,"context_line":"        format: (ipversion, protocol, srcport, destport, srcip, destip, zone)"},{"line_number":105,"context_line":"        ex: (4, \u0027tcp\u0027, 55586, 22, \u0027172.24.4.2\u0027, \u0027172.24.4.10\u0027, 1)"},{"line_number":106,"context_line":"        :return: -1 if entry is lower than rule, 0 if entry matches rule,"},{"line_number":107,"context_line":"        1 if entry is higher than rule"},{"line_number":108,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"7f231b9d_88580356","line":105,"range":{"start_line":104,"start_character":17,"end_line":105,"end_character":19},"updated":"2017-06-16 11:38:44.000000000","message":"ditto","commit_id":"13878a6780d890e807a69d1705cc3f2d5cd7c71e"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"6896a01b60bf9a0f0dd4a9614ad8e4a15e45482e","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        :param rule_filter: filter that is parsed from a security group rule"},{"line_number":102,"context_line":"        ex: (4, \u0027tcp\u0027, 22, 22, \u00270.0.0.0/0\u0027, 1)"},{"line_number":103,"context_line":"        :param entry: parsed conntrack entry,"},{"line_number":104,"context_line":"        format: (ipversion, protocol, srcport, destport, srcip, destip, zone)"},{"line_number":105,"context_line":"        ex: (4, \u0027tcp\u0027, 55586, 22, \u0027172.24.4.2\u0027, \u0027172.24.4.10\u0027, 1)"},{"line_number":106,"context_line":"        :return: -1 if entry is lower than rule, 0 if entry matches rule,"},{"line_number":107,"context_line":"        1 if entry is higher than rule"},{"line_number":108,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"5f201791_3821ef4e","line":105,"range":{"start_line":104,"start_character":17,"end_line":105,"end_character":19},"in_reply_to":"7f231b9d_88580356","updated":"2017-06-21 06:21:27.000000000","message":"Done","commit_id":"13878a6780d890e807a69d1705cc3f2d5cd7c71e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"77cd33333bd00b8a59cf0d053811d2e6e136f153","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        format: (ipversion, protocol, srcport, destport, srcip, destip, zone)"},{"line_number":105,"context_line":"        ex: (4, \u0027tcp\u0027, 55586, 22, \u0027172.24.4.2\u0027, \u0027172.24.4.10\u0027, 1)"},{"line_number":106,"context_line":"        :return: -1 if entry is lower than rule, 0 if entry matches rule,"},{"line_number":107,"context_line":"        1 if entry is higher than rule"},{"line_number":108,"context_line":"        \"\"\""},{"line_number":109,"context_line":"        ENTRY_IS_LOWER \u003d -1"},{"line_number":110,"context_line":"        ENTRY_MATCHES \u003d 0"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f231b9d_48342bfc","line":107,"updated":"2017-06-16 11:38:44.000000000","message":"ditto","commit_id":"13878a6780d890e807a69d1705cc3f2d5cd7c71e"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"6896a01b60bf9a0f0dd4a9614ad8e4a15e45482e","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        format: (ipversion, protocol, srcport, destport, srcip, destip, zone)"},{"line_number":105,"context_line":"        ex: (4, \u0027tcp\u0027, 55586, 22, \u0027172.24.4.2\u0027, \u0027172.24.4.10\u0027, 1)"},{"line_number":106,"context_line":"        :return: -1 if entry is lower than rule, 0 if entry matches rule,"},{"line_number":107,"context_line":"        1 if entry is higher than rule"},{"line_number":108,"context_line":"        \"\"\""},{"line_number":109,"context_line":"        ENTRY_IS_LOWER \u003d -1"},{"line_number":110,"context_line":"        ENTRY_MATCHES \u003d 0"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f201791_181e330c","line":107,"in_reply_to":"7f231b9d_48342bfc","updated":"2017-06-21 06:21:27.000000000","message":"Done","commit_id":"13878a6780d890e807a69d1705cc3f2d5cd7c71e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"77cd33333bd00b8a59cf0d053811d2e6e136f153","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        :return: -1 if entry is lower than rule, 0 if entry matches rule,"},{"line_number":107,"context_line":"        1 if entry is higher than rule"},{"line_number":108,"context_line":"        \"\"\""},{"line_number":109,"context_line":"        ENTRY_IS_LOWER \u003d -1"},{"line_number":110,"context_line":"        ENTRY_MATCHES \u003d 0"},{"line_number":111,"context_line":"        ENTRY_IS_HIGHER \u003d 1"},{"line_number":112,"context_line":"        if rule_filter[1] \u003d\u003d \u0027icmp\u0027 and rule_filter[4] \u003d\u003d \u00270.0.0.0/0\u0027:"},{"line_number":113,"context_line":"            return ENTRY_MATCHES"},{"line_number":114,"context_line":"        rule_ipversion \u003d rule_filter[0]"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f231b9d_e86e57fe","line":111,"range":{"start_line":109,"start_character":0,"end_line":111,"end_character":27},"updated":"2017-06-16 11:38:44.000000000","message":"You should add these constants as class variables. Doing that, you can use them in \"_get_entries_to_delete\", L56 and L59.","commit_id":"13878a6780d890e807a69d1705cc3f2d5cd7c71e"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"6896a01b60bf9a0f0dd4a9614ad8e4a15e45482e","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        :return: -1 if entry is lower than rule, 0 if entry matches rule,"},{"line_number":107,"context_line":"        1 if entry is higher than rule"},{"line_number":108,"context_line":"        \"\"\""},{"line_number":109,"context_line":"        ENTRY_IS_LOWER \u003d -1"},{"line_number":110,"context_line":"        ENTRY_MATCHES \u003d 0"},{"line_number":111,"context_line":"        ENTRY_IS_HIGHER \u003d 1"},{"line_number":112,"context_line":"        if rule_filter[1] \u003d\u003d \u0027icmp\u0027 and rule_filter[4] \u003d\u003d \u00270.0.0.0/0\u0027:"},{"line_number":113,"context_line":"            return ENTRY_MATCHES"},{"line_number":114,"context_line":"        rule_ipversion \u003d rule_filter[0]"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f201791_f8b7f739","line":111,"range":{"start_line":109,"start_character":0,"end_line":111,"end_character":27},"in_reply_to":"7f231b9d_e86e57fe","updated":"2017-06-21 06:21:27.000000000","message":"agree, thanks for this suggestion","commit_id":"13878a6780d890e807a69d1705cc3f2d5cd7c71e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"78f3fbc5a50a2ef5bd64cc69c2669dbc3feabdfb","unresolved":false,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    @staticmethod"},{"line_number":97,"context_line":"    def _compare_entry_and_rule(rule_filter, entry):"},{"line_number":98,"context_line":"        \"\"\"Define that the entry should be deleted or not"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        :param rule_filter: filter that is parsed from a security group rule"},{"line_number":101,"context_line":"            ex: (4, \u0027tcp\u0027, 22, 22, \u00270.0.0.0/0\u0027, 1)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f201791_656c5b36","line":98,"updated":"2017-06-21 08:07:56.000000000","message":"nit: just take a look at this: https://github.com/openstack/neutron/blob/master/neutron/objects/base.py#L642-L649\n\nThis is how you should document a function:\n  :param val1: blah blah blah\n  :type val1: blah blah blah\n              second line blah blah blah","commit_id":"aa3efc7869faf02529b4192aa9d077872f783f27"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"c6fcdf854aa366d5c68ee9d883bc6473c442fbec","unresolved":false,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    @staticmethod"},{"line_number":97,"context_line":"    def _compare_entry_and_rule(rule_filter, entry):"},{"line_number":98,"context_line":"        \"\"\"Define that the entry should be deleted or not"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        :param rule_filter: filter that is parsed from a security group rule"},{"line_number":101,"context_line":"            ex: (4, \u0027tcp\u0027, 22, 22, \u00270.0.0.0/0\u0027, 1)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f201791_d9dc3748","line":98,"in_reply_to":"5f201791_656c5b36","updated":"2017-06-21 10:36:26.000000000","message":"ok thanks, i\u0027ll update on next revision","commit_id":"aa3efc7869faf02529b4192aa9d077872f783f27"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ae82fc8cfc7db9d5cfdaaee9d638d624497124f2","unresolved":false,"context_lines":[{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        icmp_keys \u003d [\u0027ethertype\u0027, \u0027protocol\u0027,"},{"line_number":87,"context_line":"                     \u0027port_range_max\u0027, \u0027port_range_min\u0027,"},{"line_number":88,"context_line":"                     \u0027source_ip_prefix\u0027, \u0027dest_ip_prefix\u0027, \u0027id\u0027]"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        if rule.get(\u0027protocol\u0027) \u003d\u003d \u0027icmp\u0027:"},{"line_number":91,"context_line":"            keys \u003d icmp_keys"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f201791_16aad583","line":88,"updated":"2017-06-27 14:36:45.000000000","message":"Sorry for make this question again. Does it matter the order of the elements in keys and icmp_keys?\n\nBecause this function, \"_get_filter_from_rule\", returns a tuple which is sorted in L38.\n\nWhat I want to say is you don\u0027t need to almost duplicate both lists, just append one.","commit_id":"d7a30a127a673d9eb80918b121d1daf530a67d06"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"749f50e2d5598c03543083d14ff622943a1ba45d","unresolved":false,"context_lines":[{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        icmp_keys \u003d [\u0027ethertype\u0027, \u0027protocol\u0027,"},{"line_number":87,"context_line":"                     \u0027port_range_max\u0027, \u0027port_range_min\u0027,"},{"line_number":88,"context_line":"                     \u0027source_ip_prefix\u0027, \u0027dest_ip_prefix\u0027, \u0027id\u0027]"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        if rule.get(\u0027protocol\u0027) \u003d\u003d \u0027icmp\u0027:"},{"line_number":91,"context_line":"            keys \u003d icmp_keys"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f1d235d_ceffc065","line":88,"in_reply_to":"5f201791_16aad583","updated":"2017-06-30 09:39:13.000000000","message":"yes, order matters here. in icmp there is no port range but icmp type and code, i want to order these two fields to easily process later in comparing rule filter with entry.","commit_id":"d7a30a127a673d9eb80918b121d1daf530a67d06"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ae82fc8cfc7db9d5cfdaaee9d638d624497124f2","unresolved":false,"context_lines":[{"line_number":87,"context_line":"                     \u0027port_range_max\u0027, \u0027port_range_min\u0027,"},{"line_number":88,"context_line":"                     \u0027source_ip_prefix\u0027, \u0027dest_ip_prefix\u0027, \u0027id\u0027]"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        if rule.get(\u0027protocol\u0027) \u003d\u003d \u0027icmp\u0027:"},{"line_number":91,"context_line":"            keys \u003d icmp_keys"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        for key in keys:"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f201791_36d83179","line":90,"range":{"start_line":90,"start_character":35,"end_line":90,"end_character":41},"updated":"2017-06-27 14:36:45.000000000","message":"neutron-lib.constants.PROTO_NAME_ICMP","commit_id":"d7a30a127a673d9eb80918b121d1daf530a67d06"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"749f50e2d5598c03543083d14ff622943a1ba45d","unresolved":false,"context_lines":[{"line_number":87,"context_line":"                     \u0027port_range_max\u0027, \u0027port_range_min\u0027,"},{"line_number":88,"context_line":"                     \u0027source_ip_prefix\u0027, \u0027dest_ip_prefix\u0027, \u0027id\u0027]"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        if rule.get(\u0027protocol\u0027) \u003d\u003d \u0027icmp\u0027:"},{"line_number":91,"context_line":"            keys \u003d icmp_keys"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        for key in keys:"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f1d235d_54b121e1","line":90,"range":{"start_line":90,"start_character":35,"end_line":90,"end_character":41},"in_reply_to":"5f201791_36d83179","updated":"2017-06-30 09:39:13.000000000","message":"Done","commit_id":"d7a30a127a673d9eb80918b121d1daf530a67d06"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ae82fc8cfc7db9d5cfdaaee9d638d624497124f2","unresolved":false,"context_lines":[{"line_number":91,"context_line":"            keys \u003d icmp_keys"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        for key in keys:"},{"line_number":94,"context_line":"            if rule.get(key) \u003d\u003d \u0027IPv4\u0027:"},{"line_number":95,"context_line":"                rule_filter.append(4)"},{"line_number":96,"context_line":"                continue"},{"line_number":97,"context_line":"            if rule.get(key) \u003d\u003d \u0027IPv6\u0027:"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f201791_76446947","line":94,"range":{"start_line":94,"start_character":32,"end_line":94,"end_character":38},"updated":"2017-06-27 14:36:45.000000000","message":"Better to use neutron-lib.constants.IPv4","commit_id":"d7a30a127a673d9eb80918b121d1daf530a67d06"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"749f50e2d5598c03543083d14ff622943a1ba45d","unresolved":false,"context_lines":[{"line_number":91,"context_line":"            keys \u003d icmp_keys"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        for key in keys:"},{"line_number":94,"context_line":"            if rule.get(key) \u003d\u003d \u0027IPv4\u0027:"},{"line_number":95,"context_line":"                rule_filter.append(4)"},{"line_number":96,"context_line":"                continue"},{"line_number":97,"context_line":"            if rule.get(key) \u003d\u003d \u0027IPv6\u0027:"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f1d235d_74bc1dbb","line":94,"range":{"start_line":94,"start_character":32,"end_line":94,"end_character":38},"in_reply_to":"5f201791_76446947","updated":"2017-06-30 09:39:13.000000000","message":"Done","commit_id":"d7a30a127a673d9eb80918b121d1daf530a67d06"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ae82fc8cfc7db9d5cfdaaee9d638d624497124f2","unresolved":false,"context_lines":[{"line_number":94,"context_line":"            if rule.get(key) \u003d\u003d \u0027IPv4\u0027:"},{"line_number":95,"context_line":"                rule_filter.append(4)"},{"line_number":96,"context_line":"                continue"},{"line_number":97,"context_line":"            if rule.get(key) \u003d\u003d \u0027IPv6\u0027:"},{"line_number":98,"context_line":"                rule_filter.append(6)"},{"line_number":99,"context_line":"                continue"},{"line_number":100,"context_line":"            rule_filter.append(rule.get(key) or [])"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f201791_56796d91","line":97,"range":{"start_line":97,"start_character":33,"end_line":97,"end_character":37},"updated":"2017-06-27 14:36:45.000000000","message":"ditto","commit_id":"d7a30a127a673d9eb80918b121d1daf530a67d06"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"749f50e2d5598c03543083d14ff622943a1ba45d","unresolved":false,"context_lines":[{"line_number":94,"context_line":"            if rule.get(key) \u003d\u003d \u0027IPv4\u0027:"},{"line_number":95,"context_line":"                rule_filter.append(4)"},{"line_number":96,"context_line":"                continue"},{"line_number":97,"context_line":"            if rule.get(key) \u003d\u003d \u0027IPv6\u0027:"},{"line_number":98,"context_line":"                rule_filter.append(6)"},{"line_number":99,"context_line":"                continue"},{"line_number":100,"context_line":"            rule_filter.append(rule.get(key) or [])"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f1d235d_14cba953","line":97,"range":{"start_line":97,"start_character":33,"end_line":97,"end_character":37},"in_reply_to":"5f201791_56796d91","updated":"2017-06-30 09:39:13.000000000","message":"Done","commit_id":"d7a30a127a673d9eb80918b121d1daf530a67d06"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ae82fc8cfc7db9d5cfdaaee9d638d624497124f2","unresolved":false,"context_lines":[{"line_number":97,"context_line":"            if rule.get(key) \u003d\u003d \u0027IPv6\u0027:"},{"line_number":98,"context_line":"                rule_filter.append(6)"},{"line_number":99,"context_line":"                continue"},{"line_number":100,"context_line":"            rule_filter.append(rule.get(key) or [])"},{"line_number":101,"context_line":"        # add remote_ip if rule is for remote_ip deletion"},{"line_number":102,"context_line":"        rule_filter.append(rule.get(\u0027remote_ip\u0027))"},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"5f201791_b6ac41ed","line":100,"range":{"start_line":100,"start_character":31,"end_line":100,"end_character":50},"updated":"2017-06-27 14:36:45.000000000","message":"rule.get(key, [])","commit_id":"d7a30a127a673d9eb80918b121d1daf530a67d06"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"749f50e2d5598c03543083d14ff622943a1ba45d","unresolved":false,"context_lines":[{"line_number":97,"context_line":"            if rule.get(key) \u003d\u003d \u0027IPv6\u0027:"},{"line_number":98,"context_line":"                rule_filter.append(6)"},{"line_number":99,"context_line":"                continue"},{"line_number":100,"context_line":"            rule_filter.append(rule.get(key) or [])"},{"line_number":101,"context_line":"        # add remote_ip if rule is for remote_ip deletion"},{"line_number":102,"context_line":"        rule_filter.append(rule.get(\u0027remote_ip\u0027))"},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3f1d235d_f4ccad62","line":100,"range":{"start_line":100,"start_character":31,"end_line":100,"end_character":50},"in_reply_to":"5f201791_b6ac41ed","updated":"2017-06-30 09:39:13.000000000","message":"if value is None then rule.get(key,[]) will return None. I want to make this always be a list","commit_id":"d7a30a127a673d9eb80918b121d1daf530a67d06"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ae82fc8cfc7db9d5cfdaaee9d638d624497124f2","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                continue"},{"line_number":100,"context_line":"            rule_filter.append(rule.get(key) or [])"},{"line_number":101,"context_line":"        # add remote_ip if rule is for remote_ip deletion"},{"line_number":102,"context_line":"        rule_filter.append(rule.get(\u0027remote_ip\u0027))"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"        return tuple(rule_filter)"},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"5f201791_1683f505","line":102,"range":{"start_line":102,"start_character":37,"end_line":102,"end_character":46},"updated":"2017-06-27 14:36:45.000000000","message":"This could be added to keys and icmp_keys; doing that you can remove this line.","commit_id":"d7a30a127a673d9eb80918b121d1daf530a67d06"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"749f50e2d5598c03543083d14ff622943a1ba45d","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                continue"},{"line_number":100,"context_line":"            rule_filter.append(rule.get(key) or [])"},{"line_number":101,"context_line":"        # add remote_ip if rule is for remote_ip deletion"},{"line_number":102,"context_line":"        rule_filter.append(rule.get(\u0027remote_ip\u0027))"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"        return tuple(rule_filter)"},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3f1d235d_942a19e5","line":102,"range":{"start_line":102,"start_character":37,"end_line":102,"end_character":46},"in_reply_to":"5f201791_1683f505","updated":"2017-06-30 09:39:13.000000000","message":"Done","commit_id":"d7a30a127a673d9eb80918b121d1daf530a67d06"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ae82fc8cfc7db9d5cfdaaee9d638d624497124f2","unresolved":false,"context_lines":[{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        :return: -1 if entry is lower than rule, 0 if entry matches rule,"},{"line_number":120,"context_line":"            1 if entry is higher than rule"},{"line_number":121,"context_line":"        \"\"\""},{"line_number":122,"context_line":"        if rule_filter[-1] and (entry[4] \u003d\u003d rule_filter[5] or entry[4] \u003d\u003d"},{"line_number":123,"context_line":"                rule_filter[4]):"},{"line_number":124,"context_line":"            return nl_const.ENTRY_MATCHES"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f201791_f65d1979","line":121,"updated":"2017-06-27 14:36:45.000000000","message":"I always prefer to save lines of code. But in this case, using \"rule_filter\" and \"entry\" lists entries is a bit confusing.\n\nMaybe in this function, in sake of clarity, you can assign those values to variables with explicit names.","commit_id":"d7a30a127a673d9eb80918b121d1daf530a67d06"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"19f21cfca258fe4cd56c69737c77c23020f02f39","unresolved":false,"context_lines":[{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        :return: -1 if entry is lower than rule, 0 if entry matches rule,"},{"line_number":120,"context_line":"            1 if entry is higher than rule"},{"line_number":121,"context_line":"        \"\"\""},{"line_number":122,"context_line":"        if rule_filter[-1] and (entry[4] \u003d\u003d rule_filter[5] or entry[4] \u003d\u003d"},{"line_number":123,"context_line":"                rule_filter[4]):"},{"line_number":124,"context_line":"            return nl_const.ENTRY_MATCHES"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f1d235d_91e2999f","line":121,"in_reply_to":"3f1d235d_087afeef","updated":"2017-07-05 08:00:20.000000000","message":"Done, thanks for this","commit_id":"d7a30a127a673d9eb80918b121d1daf530a67d06"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ecc9a1cec3f08630a3bbf1dadd011dfb45577b6b","unresolved":false,"context_lines":[{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        :return: -1 if entry is lower than rule, 0 if entry matches rule,"},{"line_number":120,"context_line":"            1 if entry is higher than rule"},{"line_number":121,"context_line":"        \"\"\""},{"line_number":122,"context_line":"        if rule_filter[-1] and (entry[4] \u003d\u003d rule_filter[5] or entry[4] \u003d\u003d"},{"line_number":123,"context_line":"                rule_filter[4]):"},{"line_number":124,"context_line":"            return nl_const.ENTRY_MATCHES"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f1d235d_087afeef","line":121,"in_reply_to":"3f1d235d_aea3644f","updated":"2017-07-04 08:28:05.000000000","message":"Yes, with some examples:\n\ndef _compare_entry_and_rule(rule_filter, entry):\n    protocol \u003d rule_filter[1]\n    ip \u003d rule_filter[4]\n    etc...\n\nFor example, in L133 you are assigning rule_protocol \u003d rule_filter[1] there, instead of using this from the beginning.","commit_id":"d7a30a127a673d9eb80918b121d1daf530a67d06"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"749f50e2d5598c03543083d14ff622943a1ba45d","unresolved":false,"context_lines":[{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        :return: -1 if entry is lower than rule, 0 if entry matches rule,"},{"line_number":120,"context_line":"            1 if entry is higher than rule"},{"line_number":121,"context_line":"        \"\"\""},{"line_number":122,"context_line":"        if rule_filter[-1] and (entry[4] \u003d\u003d rule_filter[5] or entry[4] \u003d\u003d"},{"line_number":123,"context_line":"                rule_filter[4]):"},{"line_number":124,"context_line":"            return nl_const.ENTRY_MATCHES"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f1d235d_aea3644f","line":121,"in_reply_to":"5f201791_f65d1979","updated":"2017-06-30 09:39:13.000000000","message":"\u003eMaybe in this function, in sake of clarity, you can assign those values to variables with explicit names.\n\ni don\u0027t get your point here, can you clarify?","commit_id":"d7a30a127a673d9eb80918b121d1daf530a67d06"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ae82fc8cfc7db9d5cfdaaee9d638d624497124f2","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        if rule_filter[-1] and (entry[4] \u003d\u003d rule_filter[5] or entry[4] \u003d\u003d"},{"line_number":123,"context_line":"                rule_filter[4]):"},{"line_number":124,"context_line":"            return nl_const.ENTRY_MATCHES"},{"line_number":125,"context_line":"        if rule_filter[1] \u003d\u003d \u0027icmp\u0027:"},{"line_number":126,"context_line":"            if rule_filter[4] \u003d\u003d \u00270.0.0.0/0\u0027:"},{"line_number":127,"context_line":"                return nl_const.ENTRY_MATCHES"},{"line_number":128,"context_line":"        rule_ipversion \u003d rule_filter[0]"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f201791_f6b3d9e7","line":125,"range":{"start_line":125,"start_character":29,"end_line":125,"end_character":35},"updated":"2017-06-27 14:36:45.000000000","message":"neutron-lib.constants.PROTO_NAME_ICMP","commit_id":"d7a30a127a673d9eb80918b121d1daf530a67d06"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"749f50e2d5598c03543083d14ff622943a1ba45d","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        if rule_filter[-1] and (entry[4] \u003d\u003d rule_filter[5] or entry[4] \u003d\u003d"},{"line_number":123,"context_line":"                rule_filter[4]):"},{"line_number":124,"context_line":"            return nl_const.ENTRY_MATCHES"},{"line_number":125,"context_line":"        if rule_filter[1] \u003d\u003d \u0027icmp\u0027:"},{"line_number":126,"context_line":"            if rule_filter[4] \u003d\u003d \u00270.0.0.0/0\u0027:"},{"line_number":127,"context_line":"                return nl_const.ENTRY_MATCHES"},{"line_number":128,"context_line":"        rule_ipversion \u003d rule_filter[0]"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f1d235d_b444f5b8","line":125,"range":{"start_line":125,"start_character":29,"end_line":125,"end_character":35},"in_reply_to":"5f201791_f6b3d9e7","updated":"2017-06-30 09:39:13.000000000","message":"Done","commit_id":"d7a30a127a673d9eb80918b121d1daf530a67d06"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ae82fc8cfc7db9d5cfdaaee9d638d624497124f2","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                rule_filter[4]):"},{"line_number":124,"context_line":"            return nl_const.ENTRY_MATCHES"},{"line_number":125,"context_line":"        if rule_filter[1] \u003d\u003d \u0027icmp\u0027:"},{"line_number":126,"context_line":"            if rule_filter[4] \u003d\u003d \u00270.0.0.0/0\u0027:"},{"line_number":127,"context_line":"                return nl_const.ENTRY_MATCHES"},{"line_number":128,"context_line":"        rule_ipversion \u003d rule_filter[0]"},{"line_number":129,"context_line":"        if entry[0] \u003c rule_ipversion:"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f201791_b6c9e159","line":126,"range":{"start_line":126,"start_character":33,"end_line":126,"end_character":44},"updated":"2017-06-27 14:36:45.000000000","message":"neutron-lib.constants.IPv4_ANY","commit_id":"d7a30a127a673d9eb80918b121d1daf530a67d06"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"749f50e2d5598c03543083d14ff622943a1ba45d","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                rule_filter[4]):"},{"line_number":124,"context_line":"            return nl_const.ENTRY_MATCHES"},{"line_number":125,"context_line":"        if rule_filter[1] \u003d\u003d \u0027icmp\u0027:"},{"line_number":126,"context_line":"            if rule_filter[4] \u003d\u003d \u00270.0.0.0/0\u0027:"},{"line_number":127,"context_line":"                return nl_const.ENTRY_MATCHES"},{"line_number":128,"context_line":"        rule_ipversion \u003d rule_filter[0]"},{"line_number":129,"context_line":"        if entry[0] \u003c rule_ipversion:"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f1d235d_d44771bc","line":126,"range":{"start_line":126,"start_character":33,"end_line":126,"end_character":44},"in_reply_to":"5f201791_b6c9e159","updated":"2017-06-30 09:39:13.000000000","message":"Done","commit_id":"d7a30a127a673d9eb80918b121d1daf530a67d06"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"8167250656aa5700fc38c97b889d5bc6dca0537e","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        if rule_filter[1] \u003d\u003d lib_constants.PROTO_NAME_ICMP:"},{"line_number":125,"context_line":"            if rule_filter[4] \u003d\u003d lib_constants.IPv4_ANY:"},{"line_number":126,"context_line":"                return nl_const.ENTRY_MATCHES"},{"line_number":127,"context_line":"        if rule_filter[1] \u003d\u003d \u0027ipv6-icmp\u0027:"},{"line_number":128,"context_line":"            if rule_filter[4] \u003d\u003d lib_constants.IPv6_ANY:"},{"line_number":129,"context_line":"                return nl_const.ENTRY_MATCHES"},{"line_number":130,"context_line":"        rule_ipversion \u003d rule_filter[0]"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f1d235d_08de7e10","line":127,"range":{"start_line":127,"start_character":30,"end_line":127,"end_character":39},"updated":"2017-07-04 08:28:13.000000000","message":"Agian, you have this constant in neutron-lib","commit_id":"71d7e86f0bb954b8de42a41bf413f22bdc240d73"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"9caac56bd79fc446a6be9f269276c2f977fa4e9b","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        if rule_filter[1] \u003d\u003d lib_constants.PROTO_NAME_ICMP:"},{"line_number":125,"context_line":"            if rule_filter[4] \u003d\u003d lib_constants.IPv4_ANY:"},{"line_number":126,"context_line":"                return nl_const.ENTRY_MATCHES"},{"line_number":127,"context_line":"        if rule_filter[1] \u003d\u003d \u0027ipv6-icmp\u0027:"},{"line_number":128,"context_line":"            if rule_filter[4] \u003d\u003d lib_constants.IPv6_ANY:"},{"line_number":129,"context_line":"                return nl_const.ENTRY_MATCHES"},{"line_number":130,"context_line":"        rule_ipversion \u003d rule_filter[0]"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f1d235d_f1ec2d90","line":127,"range":{"start_line":127,"start_character":30,"end_line":127,"end_character":39},"in_reply_to":"3f1d235d_08de7e10","updated":"2017-07-05 08:00:34.000000000","message":"Done","commit_id":"71d7e86f0bb954b8de42a41bf413f22bdc240d73"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"8167250656aa5700fc38c97b889d5bc6dca0537e","unresolved":false,"context_lines":[{"line_number":132,"context_line":"            return nl_const.ENTRY_IS_LOWER"},{"line_number":133,"context_line":"        elif entry[0] \u003e rule_ipversion:"},{"line_number":134,"context_line":"            return nl_const.ENTRY_IS_HIGHER"},{"line_number":135,"context_line":"        if rule_filter[1] \u003d\u003d \u0027ipv6-icmp\u0027:"},{"line_number":136,"context_line":"            rule_protocol \u003d \u0027icmpv6\u0027"},{"line_number":137,"context_line":"        else:"},{"line_number":138,"context_line":"            rule_protocol \u003d rule_filter[1]"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f1d235d_e8e0e2ce","line":135,"range":{"start_line":135,"start_character":29,"end_line":135,"end_character":40},"updated":"2017-07-04 08:28:13.000000000","message":"ditto","commit_id":"71d7e86f0bb954b8de42a41bf413f22bdc240d73"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"9caac56bd79fc446a6be9f269276c2f977fa4e9b","unresolved":false,"context_lines":[{"line_number":132,"context_line":"            return nl_const.ENTRY_IS_LOWER"},{"line_number":133,"context_line":"        elif entry[0] \u003e rule_ipversion:"},{"line_number":134,"context_line":"            return nl_const.ENTRY_IS_HIGHER"},{"line_number":135,"context_line":"        if rule_filter[1] \u003d\u003d \u0027ipv6-icmp\u0027:"},{"line_number":136,"context_line":"            rule_protocol \u003d \u0027icmpv6\u0027"},{"line_number":137,"context_line":"        else:"},{"line_number":138,"context_line":"            rule_protocol \u003d rule_filter[1]"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f1d235d_71f81d48","line":135,"range":{"start_line":135,"start_character":29,"end_line":135,"end_character":40},"in_reply_to":"3f1d235d_e8e0e2ce","updated":"2017-07-05 08:00:34.000000000","message":"Done","commit_id":"71d7e86f0bb954b8de42a41bf413f22bdc240d73"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"8167250656aa5700fc38c97b889d5bc6dca0537e","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        elif entry[0] \u003e rule_ipversion:"},{"line_number":134,"context_line":"            return nl_const.ENTRY_IS_HIGHER"},{"line_number":135,"context_line":"        if rule_filter[1] \u003d\u003d \u0027ipv6-icmp\u0027:"},{"line_number":136,"context_line":"            rule_protocol \u003d \u0027icmpv6\u0027"},{"line_number":137,"context_line":"        else:"},{"line_number":138,"context_line":"            rule_protocol \u003d rule_filter[1]"},{"line_number":139,"context_line":"        if rule_protocol:"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f1d235d_c8e766e4","line":136,"range":{"start_line":136,"start_character":29,"end_line":136,"end_character":35},"updated":"2017-07-04 08:28:13.000000000","message":"ditto","commit_id":"71d7e86f0bb954b8de42a41bf413f22bdc240d73"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"9caac56bd79fc446a6be9f269276c2f977fa4e9b","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        elif entry[0] \u003e rule_ipversion:"},{"line_number":134,"context_line":"            return nl_const.ENTRY_IS_HIGHER"},{"line_number":135,"context_line":"        if rule_filter[1] \u003d\u003d \u0027ipv6-icmp\u0027:"},{"line_number":136,"context_line":"            rule_protocol \u003d \u0027icmpv6\u0027"},{"line_number":137,"context_line":"        else:"},{"line_number":138,"context_line":"            rule_protocol \u003d rule_filter[1]"},{"line_number":139,"context_line":"        if rule_protocol:"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f1d235d_519761ed","line":136,"range":{"start_line":136,"start_character":29,"end_line":136,"end_character":35},"in_reply_to":"3f1d235d_c8e766e4","updated":"2017-07-05 08:00:34.000000000","message":"Done","commit_id":"71d7e86f0bb954b8de42a41bf413f22bdc240d73"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"349e7a30d0035a286e107fe008e28270841df54d","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        entry_src_ip \u003d entry[4]"},{"line_number":125,"context_line":"        entry_dst_ip \u003d entry[5]"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        rule_remote_ip \u003d rule_filter[-1]"},{"line_number":128,"context_line":"        rule_protocol \u003d rule_filter[1]"},{"line_number":129,"context_line":"        rule_src_ip \u003d rule_filter[4]"},{"line_number":130,"context_line":"        rule_dst_ip \u003d rule_filter[5]"}],"source_content_type":"text/x-python","patch_set":21,"id":"1f1a1f67_c97217e4","line":127,"range":{"start_line":127,"start_character":8,"end_line":127,"end_character":22},"updated":"2017-07-21 07:10:45.000000000","message":"Is that correct? I doesn\u0027t match the description.","commit_id":"51e9691c5548ee39ded33c11c8253ad4bb77fef2"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"a1a8a717b24aa2095621b21cf6d3190178a80861","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        entry_src_ip \u003d entry[4]"},{"line_number":125,"context_line":"        entry_dst_ip \u003d entry[5]"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        rule_remote_ip \u003d rule_filter[-1]"},{"line_number":128,"context_line":"        rule_protocol \u003d rule_filter[1]"},{"line_number":129,"context_line":"        rule_src_ip \u003d rule_filter[4]"},{"line_number":130,"context_line":"        rule_dst_ip \u003d rule_filter[5]"}],"source_content_type":"text/x-python","patch_set":21,"id":"ff346bd7_42fa7e42","line":127,"range":{"start_line":127,"start_character":8,"end_line":127,"end_character":22},"in_reply_to":"1f1a1f67_c97217e4","updated":"2017-07-25 07:01:34.000000000","message":"it is, will update docstring in next upload","commit_id":"51e9691c5548ee39ded33c11c8253ad4bb77fef2"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"349e7a30d0035a286e107fe008e28270841df54d","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        if rule_protocol \u003d\u003d lib_constants.PROTO_NAME_IPV6_ICMP:"},{"line_number":149,"context_line":"            rule_protocol \u003d lib_constants.PROTO_NAME_IPV6_ICMP_LEGACY"},{"line_number":150,"context_line":"        if rule_protocol:"},{"line_number":151,"context_line":"            if entry_protocol \u003c rule_protocol:"},{"line_number":152,"context_line":"                return nl_const.ENTRY_IS_LOWER"},{"line_number":153,"context_line":"            elif entry_protocol \u003e rule_protocol:"},{"line_number":154,"context_line":"                return nl_const.ENTRY_IS_HIGHER"}],"source_content_type":"text/x-python","patch_set":21,"id":"1f1a1f67_699423e9","line":151,"range":{"start_line":151,"start_character":12,"end_line":151,"end_character":45},"updated":"2017-07-21 07:10:45.000000000","message":"Sorry for the late comment.\n\nI don\u0027t understand this comparison, between two strings. COn you explain it a bit? How can you compare, for example, \u0027tcp\u0027 and \u0027icmp\u0027?","commit_id":"51e9691c5548ee39ded33c11c8253ad4bb77fef2"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"a1a8a717b24aa2095621b21cf6d3190178a80861","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        if rule_protocol \u003d\u003d lib_constants.PROTO_NAME_IPV6_ICMP:"},{"line_number":149,"context_line":"            rule_protocol \u003d lib_constants.PROTO_NAME_IPV6_ICMP_LEGACY"},{"line_number":150,"context_line":"        if rule_protocol:"},{"line_number":151,"context_line":"            if entry_protocol \u003c rule_protocol:"},{"line_number":152,"context_line":"                return nl_const.ENTRY_IS_LOWER"},{"line_number":153,"context_line":"            elif entry_protocol \u003e rule_protocol:"},{"line_number":154,"context_line":"                return nl_const.ENTRY_IS_HIGHER"}],"source_content_type":"text/x-python","patch_set":21,"id":"ff346bd7_2263fa1c","line":151,"range":{"start_line":151,"start_character":12,"end_line":151,"end_character":45},"in_reply_to":"1f1a1f67_699423e9","updated":"2017-07-25 07:01:34.000000000","message":"as you say, just compare two strings. \n\n```\n\nIn [1]: \u0027tcp\u0027 \u003e \u0027icmp\u0027\nOut[1]: True\n\nIn [2]: \u0027tcp\u0027 \u003c \u0027icmp\u0027\nOut[2]: False\n```\n\nthe rule filters are sorted already, if the protocol of current entry is \u0027less\u0027 than protocol of rule, the next one will properly no need to consider.","commit_id":"51e9691c5548ee39ded33c11c8253ad4bb77fef2"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"65587fb5da05dcf2574dc5b99d27581ff35701a9","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        if rule_protocol \u003d\u003d lib_constants.PROTO_NAME_IPV6_ICMP:"},{"line_number":149,"context_line":"            rule_protocol \u003d lib_constants.PROTO_NAME_IPV6_ICMP_LEGACY"},{"line_number":150,"context_line":"        if rule_protocol:"},{"line_number":151,"context_line":"            if entry_protocol \u003c rule_protocol:"},{"line_number":152,"context_line":"                return nl_const.ENTRY_IS_LOWER"},{"line_number":153,"context_line":"            elif entry_protocol \u003e rule_protocol:"},{"line_number":154,"context_line":"                return nl_const.ENTRY_IS_HIGHER"}],"source_content_type":"text/x-python","patch_set":21,"id":"ff346bd7_2bdb604f","line":151,"range":{"start_line":151,"start_character":12,"end_line":151,"end_character":45},"in_reply_to":"ff346bd7_189cbf5b","updated":"2017-07-27 06:35:20.000000000","message":"\u003e Please, can you explain this a bit more? With more examples.\n\nCan you take a look with same question of chandanc and our explanation in original ps here? the code has been changed since then but still same idea, I think it answers this quesion for you\n\nhttps://review.openstack.org/#/c/389654/20/neutron_fwaas/services/firewall/drivers/linux/iptables_fwaas.py@307\n\n\u003e Where are the rule and conntrack entries ordered by protocol?\n\nThe entries are sorted in netlink-lib, pls check https://review.openstack.org/#/c/470911/20/neutron/privileged/agent/linux/netlink_lib.py@256\n\n\u003e How many protocols can you handle? If I\u0027m not wrong, anything in /etc/protocols.\n\natm this supports all basic protocols including tcp/udp/icmp/icmpv6.","commit_id":"51e9691c5548ee39ded33c11c8253ad4bb77fef2"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"329e49d0fc5f9168a3e0055c9da4405847ee936b","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        if rule_protocol \u003d\u003d lib_constants.PROTO_NAME_IPV6_ICMP:"},{"line_number":149,"context_line":"            rule_protocol \u003d lib_constants.PROTO_NAME_IPV6_ICMP_LEGACY"},{"line_number":150,"context_line":"        if rule_protocol:"},{"line_number":151,"context_line":"            if entry_protocol \u003c rule_protocol:"},{"line_number":152,"context_line":"                return nl_const.ENTRY_IS_LOWER"},{"line_number":153,"context_line":"            elif entry_protocol \u003e rule_protocol:"},{"line_number":154,"context_line":"                return nl_const.ENTRY_IS_HIGHER"}],"source_content_type":"text/x-python","patch_set":21,"id":"ff346bd7_189cbf5b","line":151,"range":{"start_line":151,"start_character":12,"end_line":151,"end_character":45},"in_reply_to":"ff346bd7_2263fa1c","updated":"2017-07-25 10:42:34.000000000","message":"Please, can you explain this a bit more? With more examples.\n\nWhere are the rule and conntrack entries ordered by protocol?\n\nHow many protocols can you handle? If I\u0027m not wrong, anything in /etc/protocols.","commit_id":"51e9691c5548ee39ded33c11c8253ad4bb77fef2"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"0e55346db0ae5dcc8848943de24d7211be32490f","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        \"\"\""},{"line_number":55,"context_line":"        delete_entries \u003d []"},{"line_number":56,"context_line":"        for rule_filter in rule_filters:"},{"line_number":57,"context_line":"            for index in range(len(entries)):"},{"line_number":58,"context_line":"                # Compare entry with rule"},{"line_number":59,"context_line":"                comp \u003d self._compare_entry_and_rule(rule_filter,"},{"line_number":60,"context_line":"                                                    entries[index])"}],"source_content_type":"text/x-python","patch_set":22,"id":"ff346bd7_21a5f1b5","line":57,"updated":"2017-07-26 00:55:27.000000000","message":"It seems to me that the index isn\u0027t needed here. Why not just iterate entries directly?\n\nfor entry in entries:","commit_id":"8e6c85b6a22acb6cf9775d5ee8f642b1ea5baca2"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"0ab9926507fad63b95dc6448ef8fc195ff7b5909","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        \"\"\""},{"line_number":55,"context_line":"        delete_entries \u003d []"},{"line_number":56,"context_line":"        for rule_filter in rule_filters:"},{"line_number":57,"context_line":"            for index in range(len(entries)):"},{"line_number":58,"context_line":"                # Compare entry with rule"},{"line_number":59,"context_line":"                comp \u003d self._compare_entry_and_rule(rule_filter,"},{"line_number":60,"context_line":"                                                    entries[index])"}],"source_content_type":"text/x-python","patch_set":22,"id":"ff346bd7_a8a2dd49","line":57,"in_reply_to":"ff346bd7_21a5f1b5","updated":"2017-07-27 06:35:37.000000000","message":"Done","commit_id":"8e6c85b6a22acb6cf9775d5ee8f642b1ea5baca2"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"0e55346db0ae5dcc8848943de24d7211be32490f","unresolved":false,"context_lines":[{"line_number":57,"context_line":"            for index in range(len(entries)):"},{"line_number":58,"context_line":"                # Compare entry with rule"},{"line_number":59,"context_line":"                comp \u003d self._compare_entry_and_rule(rule_filter,"},{"line_number":60,"context_line":"                                                    entries[index])"},{"line_number":61,"context_line":"                # Increase entry_index when entry is under rule"},{"line_number":62,"context_line":"                if comp \u003c nl_const.ENTRY_MATCHES:"},{"line_number":63,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":22,"id":"ff346bd7_01ac2d9e","line":60,"updated":"2017-07-26 00:55:27.000000000","message":"You can drop one of the branches below if you do the break first.\n\nif comp \u003e nl_const.ENTRY_MATCHES:\n    break\nelif comp \u003d\u003d nl_const.ENTRY_MATCHES:\n    delete_entries.append(entries[index])\n\nThen it implicitly continues.","commit_id":"8e6c85b6a22acb6cf9775d5ee8f642b1ea5baca2"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"0ab9926507fad63b95dc6448ef8fc195ff7b5909","unresolved":false,"context_lines":[{"line_number":57,"context_line":"            for index in range(len(entries)):"},{"line_number":58,"context_line":"                # Compare entry with rule"},{"line_number":59,"context_line":"                comp \u003d self._compare_entry_and_rule(rule_filter,"},{"line_number":60,"context_line":"                                                    entries[index])"},{"line_number":61,"context_line":"                # Increase entry_index when entry is under rule"},{"line_number":62,"context_line":"                if comp \u003c nl_const.ENTRY_MATCHES:"},{"line_number":63,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":22,"id":"ff346bd7_888959cb","line":60,"in_reply_to":"ff346bd7_01ac2d9e","updated":"2017-07-27 06:35:37.000000000","message":"Done","commit_id":"8e6c85b6a22acb6cf9775d5ee8f642b1ea5baca2"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"0e55346db0ae5dcc8848943de24d7211be32490f","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        :param rule: security group rule"},{"line_number":78,"context_line":"        :type rule: dict"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        :return: a tuple of parsed information"},{"line_number":81,"context_line":"        \"\"\""},{"line_number":82,"context_line":"        rule_filter \u003d []"},{"line_number":83,"context_line":"        keys \u003d [\u0027ethertype\u0027, \u0027protocol\u0027,"}],"source_content_type":"text/x-python","patch_set":22,"id":"ff346bd7_e1aec996","line":80,"updated":"2017-07-26 00:55:27.000000000","message":"can you add a sample format of the returned tuple? It seems like it sometimes will have an integer (e.g. L96) and sometimes will have a list (e.g. L101). Does the position of integers and lists matter?","commit_id":"8e6c85b6a22acb6cf9775d5ee8f642b1ea5baca2"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"0ab9926507fad63b95dc6448ef8fc195ff7b5909","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        :param rule: security group rule"},{"line_number":78,"context_line":"        :type rule: dict"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        :return: a tuple of parsed information"},{"line_number":81,"context_line":"        \"\"\""},{"line_number":82,"context_line":"        rule_filter \u003d []"},{"line_number":83,"context_line":"        keys \u003d [\u0027ethertype\u0027, \u0027protocol\u0027,"}],"source_content_type":"text/x-python","patch_set":22,"id":"ff346bd7_b07e9fac","line":80,"in_reply_to":"ff346bd7_e1aec996","updated":"2017-07-27 06:35:37.000000000","message":"\u003e can you add a sample format of the returned tuple?\n\nDone\n\n\u003e Does the position of integers and lists matter?\n\nYes, that order matters as it will be used to compare with entry. Rule filter and entry will have same order of fields to easily compare in _compare_entry_and_rule()","commit_id":"8e6c85b6a22acb6cf9775d5ee8f642b1ea5baca2"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"55d3d08921282b462de314e86196c093478ea546","unresolved":false,"context_lines":[{"line_number":88,"context_line":"                     \u0027port_range_max\u0027, \u0027port_range_min\u0027,"},{"line_number":89,"context_line":"                     \u0027source_ip_prefix\u0027, \u0027dest_ip_prefix\u0027, \u0027id\u0027, \u0027remote_ip\u0027]"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        if rule.get(\u0027protocol\u0027) \u003d\u003d lib_constants.PROTO_NAME_ICMP:"},{"line_number":92,"context_line":"            keys \u003d icmp_keys"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"        for key in keys:"}],"source_content_type":"text/x-python","patch_set":22,"id":"ff346bd7_97b3a698","line":91,"updated":"2017-07-26 16:30:36.000000000","message":"Does this work correctly with IPv6?  There is more than one ICMP value for it, which is another bug I\u0027m working on, see https://review.openstack.org/#/c/453346/ for what I mean.","commit_id":"8e6c85b6a22acb6cf9775d5ee8f642b1ea5baca2"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"0ab9926507fad63b95dc6448ef8fc195ff7b5909","unresolved":false,"context_lines":[{"line_number":88,"context_line":"                     \u0027port_range_max\u0027, \u0027port_range_min\u0027,"},{"line_number":89,"context_line":"                     \u0027source_ip_prefix\u0027, \u0027dest_ip_prefix\u0027, \u0027id\u0027, \u0027remote_ip\u0027]"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        if rule.get(\u0027protocol\u0027) \u003d\u003d lib_constants.PROTO_NAME_ICMP:"},{"line_number":92,"context_line":"            keys \u003d icmp_keys"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"        for key in keys:"}],"source_content_type":"text/x-python","patch_set":22,"id":"ff346bd7_5053f33f","line":91,"in_reply_to":"ff346bd7_97b3a698","updated":"2017-07-27 06:35:37.000000000","message":"Done, can you help to check, iiuc in sg rule we only have PROTO_NAME_IPV6_ICMP and PROTO_NAME_ICMP","commit_id":"8e6c85b6a22acb6cf9775d5ee8f642b1ea5baca2"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"0e55346db0ae5dcc8848943de24d7211be32490f","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            keys \u003d icmp_keys"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"        for key in keys:"},{"line_number":95,"context_line":"            if rule.get(key) \u003d\u003d lib_constants.IPv4:"},{"line_number":96,"context_line":"                rule_filter.append(4)"},{"line_number":97,"context_line":"                continue"},{"line_number":98,"context_line":"            if rule.get(key) \u003d\u003d lib_constants.IPv6:"}],"source_content_type":"text/x-python","patch_set":22,"id":"ff346bd7_c1950542","line":95,"updated":"2017-07-26 00:55:27.000000000","message":"It looks like L95 to L100 are for ethertype and the rest are at L101. If that\u0027s the case, separating them out will be easier.\n\nrule_filter.append(4 if rule.get(\u0027ethertype\u0027) \u003d\u003d lib_constants.IPv4 else 6)\nrule_filter +\u003d [rule.get(key) or [] for key in keys[1:]]","commit_id":"8e6c85b6a22acb6cf9775d5ee8f642b1ea5baca2"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"0ab9926507fad63b95dc6448ef8fc195ff7b5909","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            keys \u003d icmp_keys"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"        for key in keys:"},{"line_number":95,"context_line":"            if rule.get(key) \u003d\u003d lib_constants.IPv4:"},{"line_number":96,"context_line":"                rule_filter.append(4)"},{"line_number":97,"context_line":"                continue"},{"line_number":98,"context_line":"            if rule.get(key) \u003d\u003d lib_constants.IPv6:"}],"source_content_type":"text/x-python","patch_set":22,"id":"ff346bd7_6872b5e5","line":95,"in_reply_to":"ff346bd7_c1950542","updated":"2017-07-27 06:35:37.000000000","message":"Done","commit_id":"8e6c85b6a22acb6cf9775d5ee8f642b1ea5baca2"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"0e55346db0ae5dcc8848943de24d7211be32490f","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        \"\"\"Define that the entry should be deleted or not"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        :param rule_filter: filter that is parsed from a security group rule"},{"line_number":110,"context_line":"            ex: (4, \u0027tcp\u0027, 22, 22, \u00270.0.0.0/0\u0027, 1, False)"},{"line_number":111,"context_line":"        :type rule_filter: tuple"},{"line_number":112,"context_line":"        :param entry: parsed conntrack entry,"},{"line_number":113,"context_line":"            format: (ipversion, protocol, src_port, dest_port, src_ip, dest_ip,"}],"source_content_type":"text/x-python","patch_set":22,"id":"ff346bd7_a190c14f","line":110,"updated":"2017-07-26 00:55:27.000000000","message":"expanding on my comment on L80, when is a list okay?","commit_id":"8e6c85b6a22acb6cf9775d5ee8f642b1ea5baca2"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"0ab9926507fad63b95dc6448ef8fc195ff7b5909","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        \"\"\"Define that the entry should be deleted or not"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        :param rule_filter: filter that is parsed from a security group rule"},{"line_number":110,"context_line":"            ex: (4, \u0027tcp\u0027, 22, 22, \u00270.0.0.0/0\u0027, 1, False)"},{"line_number":111,"context_line":"        :type rule_filter: tuple"},{"line_number":112,"context_line":"        :param entry: parsed conntrack entry,"},{"line_number":113,"context_line":"            format: (ipversion, protocol, src_port, dest_port, src_ip, dest_ip,"}],"source_content_type":"text/x-python","patch_set":22,"id":"ff346bd7_2ba36002","line":110,"in_reply_to":"ff346bd7_a190c14f","updated":"2017-07-27 06:35:37.000000000","message":"I dont get this, do you mean why using tuple instead of list? Both tuple and list are ok in this case and we chose to go with tuple.","commit_id":"8e6c85b6a22acb6cf9775d5ee8f642b1ea5baca2"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"0e55346db0ae5dcc8848943de24d7211be32490f","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        :return: -1 if entry is lower than rule, 0 if entry matches rule,"},{"line_number":119,"context_line":"            1 if entry is higher than rule"},{"line_number":120,"context_line":"        \"\"\""},{"line_number":121,"context_line":"        entry_ipversion \u003d entry[0]"},{"line_number":122,"context_line":"        entry_protocol \u003d entry[1]"},{"line_number":123,"context_line":"        entry_src_port \u003d entry[3]"},{"line_number":124,"context_line":"        entry_src_ip \u003d entry[4]"}],"source_content_type":"text/x-python","patch_set":22,"id":"ff346bd7_819ffd5d","line":121,"updated":"2017-07-26 00:55:27.000000000","message":"I recommend you adjust L103 to use a namedtuple so then these can be entry.ip_version, etc.\n\nIf you use named tuples you can probably get rid of all of these intermediate variables because they references to entry will be much more obvious.","commit_id":"8e6c85b6a22acb6cf9775d5ee8f642b1ea5baca2"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"0ab9926507fad63b95dc6448ef8fc195ff7b5909","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        :return: -1 if entry is lower than rule, 0 if entry matches rule,"},{"line_number":119,"context_line":"            1 if entry is higher than rule"},{"line_number":120,"context_line":"        \"\"\""},{"line_number":121,"context_line":"        entry_ipversion \u003d entry[0]"},{"line_number":122,"context_line":"        entry_protocol \u003d entry[1]"},{"line_number":123,"context_line":"        entry_src_port \u003d entry[3]"},{"line_number":124,"context_line":"        entry_src_ip \u003d entry[4]"}],"source_content_type":"text/x-python","patch_set":22,"id":"ff346bd7_3782a901","line":121,"in_reply_to":"ff346bd7_819ffd5d","updated":"2017-07-27 06:35:37.000000000","message":"Done, thanks for recommendation","commit_id":"8e6c85b6a22acb6cf9775d5ee8f642b1ea5baca2"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"0e55346db0ae5dcc8848943de24d7211be32490f","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        rule_dport_max \u003d rule_filter[3]"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        if rule_remote_ip and (entry_src_ip \u003d\u003d rule_dst_ip or"},{"line_number":135,"context_line":"                               entry_src_ip \u003d\u003d rule_src_ip):"},{"line_number":136,"context_line":"            return nl_const.ENTRY_MATCHES"},{"line_number":137,"context_line":"        if rule_protocol \u003d\u003d lib_constants.PROTO_NAME_ICMP:"},{"line_number":138,"context_line":"            if rule_src_ip \u003d\u003d lib_constants.IPv4_ANY:"}],"source_content_type":"text/x-python","patch_set":22,"id":"ff346bd7_619ad96e","line":135,"updated":"2017-07-26 00:55:27.000000000","message":"Doesn\u0027t this claim any rule between two IPs matches without checking that the entry TCP ports match? A security groups rule can have a remote IP reference and specific numbers. We want to make sure we don\u0027t destroy all connections between two IPs if just a single rule is deleted.\n\nEither way, this is a lot of logic with early returns that is tricky to follow. Can you add a comment describing why things are checked in this particular order?","commit_id":"8e6c85b6a22acb6cf9775d5ee8f642b1ea5baca2"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"0ab9926507fad63b95dc6448ef8fc195ff7b5909","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        rule_dport_max \u003d rule_filter[3]"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        if rule_remote_ip and (entry_src_ip \u003d\u003d rule_dst_ip or"},{"line_number":135,"context_line":"                               entry_src_ip \u003d\u003d rule_src_ip):"},{"line_number":136,"context_line":"            return nl_const.ENTRY_MATCHES"},{"line_number":137,"context_line":"        if rule_protocol \u003d\u003d lib_constants.PROTO_NAME_ICMP:"},{"line_number":138,"context_line":"            if rule_src_ip \u003d\u003d lib_constants.IPv4_ANY:"}],"source_content_type":"text/x-python","patch_set":22,"id":"ff346bd7_0d5d54e8","line":135,"in_reply_to":"ff346bd7_619ad96e","updated":"2017-07-27 06:35:37.000000000","message":"\u003e Doesn\u0027t this claim any rule between two IPs matches without checking that the entry TCP ports match?\n\nI moved that check after the check of procotol between entry and rule filter, do you think it\u0027s good enough?\n\n\u003e Can you add a comment describing why things are checked in this particular order?\n\nDone, can you check to see if it\u0027s better?","commit_id":"8e6c85b6a22acb6cf9775d5ee8f642b1ea5baca2"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"3ae43000fd434c7257c6d958bc1959890bcb99a4","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                    break"},{"line_number":64,"context_line":"                # Append entry to delete_entry if it matches with rule"},{"line_number":65,"context_line":"                elif comp \u003d\u003d nl_const.ENTRY_MATCHES:"},{"line_number":66,"context_line":"                    delete_entries.append(entry)"},{"line_number":67,"context_line":"                    continue"},{"line_number":68,"context_line":"                # Switch to new higher rule"},{"line_number":69,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":24,"id":"ff346bd7_70d5a543","line":66,"updated":"2017-07-28 07:55:36.000000000","message":"L67-L70 can be dropped.","commit_id":"aaa27cd8e1a06cdfd12d246f4d63fdfea616c96d"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"e8aca6039155fae09179f7dec6367ae8736fdcf0","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                    break"},{"line_number":64,"context_line":"                # Append entry to delete_entry if it matches with rule"},{"line_number":65,"context_line":"                elif comp \u003d\u003d nl_const.ENTRY_MATCHES:"},{"line_number":66,"context_line":"                    delete_entries.append(entry)"},{"line_number":67,"context_line":"                    continue"},{"line_number":68,"context_line":"                # Switch to new higher rule"},{"line_number":69,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":24,"id":"ff346bd7_c6ced758","line":66,"in_reply_to":"ff346bd7_70d5a543","updated":"2017-07-31 06:08:33.000000000","message":"Done","commit_id":"aaa27cd8e1a06cdfd12d246f4d63fdfea616c96d"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"3ae43000fd434c7257c6d958bc1959890bcb99a4","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        :return: a namedtuple of parsed information."},{"line_number":81,"context_line":"                format: (ip_version, protocol, port_range_min, port_range_max,"},{"line_number":82,"context_line":"                src_ip_prefix, dest_ip_prefix, remote_ip)"},{"line_number":83,"context_line":"                ex: (4, \u0027udp\u0027, \u002710\u0027, \u002720\u0027, \u00271.1.1.1\u0027, \u00272.2.2.2\u0027, [])"},{"line_number":84,"context_line":"        \"\"\""},{"line_number":85,"context_line":"        rule_filter \u003d []"},{"line_number":86,"context_line":"        keys \u003d [\u0027ethertype\u0027, \u0027protocol\u0027,"}],"source_content_type":"text/x-python","patch_set":24,"id":"ff346bd7_50d86179","line":83,"updated":"2017-07-28 07:55:36.000000000","message":"My question from the previous patch comment was related to the list for remote_ip. Why is remote_ip a list instead of just a string?","commit_id":"aaa27cd8e1a06cdfd12d246f4d63fdfea616c96d"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"e8aca6039155fae09179f7dec6367ae8736fdcf0","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        :return: a namedtuple of parsed information."},{"line_number":81,"context_line":"                format: (ip_version, protocol, port_range_min, port_range_max,"},{"line_number":82,"context_line":"                src_ip_prefix, dest_ip_prefix, remote_ip)"},{"line_number":83,"context_line":"                ex: (4, \u0027udp\u0027, \u002710\u0027, \u002720\u0027, \u00271.1.1.1\u0027, \u00272.2.2.2\u0027, [])"},{"line_number":84,"context_line":"        \"\"\""},{"line_number":85,"context_line":"        rule_filter \u003d []"},{"line_number":86,"context_line":"        keys \u003d [\u0027ethertype\u0027, \u0027protocol\u0027,"}],"source_content_type":"text/x-python","patch_set":24,"id":"ff346bd7_e6d31b03","line":83,"in_reply_to":"ff346bd7_50d86179","updated":"2017-07-31 06:08:33.000000000","message":"It was my mistake, the exact format is boolean not a list.","commit_id":"aaa27cd8e1a06cdfd12d246f4d63fdfea616c96d"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"3ae43000fd434c7257c6d958bc1959890bcb99a4","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        # build namedtuple for returned filter"},{"line_number":103,"context_line":"        if rule.get(\u0027protocol\u0027) \u003d\u003d lib_constants.PROTO_NAME_ICMP:"},{"line_number":104,"context_line":"            Filter \u003d namedtuple(\u0027Filter\u0027,"},{"line_number":105,"context_line":"                                (\u0027ip_version protocol port_range_min \u0027"},{"line_number":106,"context_line":"                                 \u0027port_range_max src_ip_prefix \u0027"},{"line_number":107,"context_line":"                                 \u0027dest_ip_prefix id remote_ip\u0027))"}],"source_content_type":"text/x-python","patch_set":24,"id":"ff346bd7_30cb9da5","line":104,"updated":"2017-07-28 07:55:36.000000000","message":"namedtuple builds a class for you, you don\u0027t want to do this on every call. L104 and L109 should be at the class level with distintive names (e.g. ICMPFilter and TCPUDPFilter). Then in this method you just choose which one to use.","commit_id":"aaa27cd8e1a06cdfd12d246f4d63fdfea616c96d"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"e8aca6039155fae09179f7dec6367ae8736fdcf0","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        # build namedtuple for returned filter"},{"line_number":103,"context_line":"        if rule.get(\u0027protocol\u0027) \u003d\u003d lib_constants.PROTO_NAME_ICMP:"},{"line_number":104,"context_line":"            Filter \u003d namedtuple(\u0027Filter\u0027,"},{"line_number":105,"context_line":"                                (\u0027ip_version protocol port_range_min \u0027"},{"line_number":106,"context_line":"                                 \u0027port_range_max src_ip_prefix \u0027"},{"line_number":107,"context_line":"                                 \u0027dest_ip_prefix id remote_ip\u0027))"}],"source_content_type":"text/x-python","patch_set":24,"id":"df3967d1_32c23387","line":104,"in_reply_to":"ff346bd7_30cb9da5","updated":"2017-07-31 06:08:33.000000000","message":"Done","commit_id":"aaa27cd8e1a06cdfd12d246f4d63fdfea616c96d"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"3ae43000fd434c7257c6d958bc1959890bcb99a4","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        :return: -1 if entry is lower than rule, 0 if entry matches rule,"},{"line_number":130,"context_line":"            1 if entry is higher than rule"},{"line_number":131,"context_line":"        \"\"\""},{"line_number":132,"context_line":"        entry_ipversion \u003d entry[0]"},{"line_number":133,"context_line":"        entry_protocol \u003d entry[1]"},{"line_number":134,"context_line":"        entry_src_port \u003d entry[3]"},{"line_number":135,"context_line":"        entry_src_ip \u003d entry[4]"}],"source_content_type":"text/x-python","patch_set":24,"id":"ff346bd7_10ce59b3","line":132,"updated":"2017-07-28 07:55:36.000000000","message":"can you please adjust the netlink driver to also use a namedtuple so we can also reference the entry fields by name here as well?","commit_id":"aaa27cd8e1a06cdfd12d246f4d63fdfea616c96d"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"e8aca6039155fae09179f7dec6367ae8736fdcf0","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        :return: -1 if entry is lower than rule, 0 if entry matches rule,"},{"line_number":130,"context_line":"            1 if entry is higher than rule"},{"line_number":131,"context_line":"        \"\"\""},{"line_number":132,"context_line":"        entry_ipversion \u003d entry[0]"},{"line_number":133,"context_line":"        entry_protocol \u003d entry[1]"},{"line_number":134,"context_line":"        entry_src_port \u003d entry[3]"},{"line_number":135,"context_line":"        entry_src_ip \u003d entry[4]"}],"source_content_type":"text/x-python","patch_set":24,"id":"df3967d1_12bf2ffc","line":132,"in_reply_to":"ff346bd7_10ce59b3","updated":"2017-07-31 06:08:33.000000000","message":"Done","commit_id":"aaa27cd8e1a06cdfd12d246f4d63fdfea616c96d"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"0386b797e7f5ad4e3f3ad05028a02693fabe4e01","unresolved":false,"context_lines":[{"line_number":143,"context_line":"            1 if entry is higher than rule"},{"line_number":144,"context_line":"        \"\"\""},{"line_number":145,"context_line":"        # check if protocol is icmp v4 and match any ip 0.0.0.0/0"},{"line_number":146,"context_line":"        if rule_filter.protocol \u003d\u003d lib_constants.PROTO_NAME_ICMP:"},{"line_number":147,"context_line":"            if rule_filter.src_ip_prefix \u003d\u003d lib_constants.IPv4_ANY:"},{"line_number":148,"context_line":"                return nl_const.ENTRY_MATCHES"},{"line_number":149,"context_line":"        # check if protocol is icmp v4 and match any ip 0.0.0.0/0"}],"source_content_type":"text/x-python","patch_set":26,"id":"df3967d1_6e616105","line":146,"updated":"2017-08-03 23:54:42.000000000","message":"If the rule is for ICMP, why aren\u0027t we also checking to ensure that the entry is also ICMP? Without examining the entry type this logic is going to say that every entry (including unrelated TCP connections, etc) will match. We only want to match ICMP entries when an ICMP rule is being deleted.","commit_id":"961c0858a9b107ae401773772d46bdeadb0c9eb9"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"74e8bb37c42be769c474516476288b97b5d20b95","unresolved":false,"context_lines":[{"line_number":143,"context_line":"            1 if entry is higher than rule"},{"line_number":144,"context_line":"        \"\"\""},{"line_number":145,"context_line":"        # check if protocol is icmp v4 and match any ip 0.0.0.0/0"},{"line_number":146,"context_line":"        if rule_filter.protocol \u003d\u003d lib_constants.PROTO_NAME_ICMP:"},{"line_number":147,"context_line":"            if rule_filter.src_ip_prefix \u003d\u003d lib_constants.IPv4_ANY:"},{"line_number":148,"context_line":"                return nl_const.ENTRY_MATCHES"},{"line_number":149,"context_line":"        # check if protocol is icmp v4 and match any ip 0.0.0.0/0"}],"source_content_type":"text/x-python","patch_set":26,"id":"df3967d1_9fda7148","line":146,"in_reply_to":"df3967d1_6e616105","updated":"2017-08-04 02:19:27.000000000","message":"Done","commit_id":"961c0858a9b107ae401773772d46bdeadb0c9eb9"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"15c68d851c2067b53eec4675cd5c11a31518e78f","unresolved":false,"context_lines":[{"line_number":176,"context_line":"            elif rule_filter.remote_ip and (entry.src_ip \u003d\u003d"},{"line_number":177,"context_line":"                                            rule_filter.dest_ip_prefix or"},{"line_number":178,"context_line":"                                            entry.src_ip \u003d\u003d"},{"line_number":179,"context_line":"                                            rule_filter.src_ip_prefix):"},{"line_number":180,"context_line":"                return nl_const.ENTRY_MATCHES"},{"line_number":181,"context_line":"        if (rule_filter.src_ip_prefix \u003d\u003d entry.src_ip or"},{"line_number":182,"context_line":"                rule_filter.dest_ip_prefix \u003d\u003d entry.dst_ip):"}],"source_content_type":"text/x-python","patch_set":28,"id":"7f287b81_81424c3d","line":179,"updated":"2017-08-25 23:49:12.000000000","message":"This logic doesn\u0027t seem to be correct because we aren\u0027t checking the rule_filter source port. If the rule_filter has a specific port we want to make sure we don\u0027t return ENTRY_MATCHES for entries that don\u0027t match the correct port.\n\nAs it stands it seems like this will wipe out all connections to a remote_ip, which could kill connections related to a rule not being deleted.","commit_id":"8bfda4a34a386d8690b7e53450a567709b0b3aa5"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"e4b68c307e58a755ac1df36acb07c78a9494dc80","unresolved":false,"context_lines":[{"line_number":176,"context_line":"            elif rule_filter.remote_ip and (entry.src_ip \u003d\u003d"},{"line_number":177,"context_line":"                                            rule_filter.dest_ip_prefix or"},{"line_number":178,"context_line":"                                            entry.src_ip \u003d\u003d"},{"line_number":179,"context_line":"                                            rule_filter.src_ip_prefix):"},{"line_number":180,"context_line":"                return nl_const.ENTRY_MATCHES"},{"line_number":181,"context_line":"        if (rule_filter.src_ip_prefix \u003d\u003d entry.src_ip or"},{"line_number":182,"context_line":"                rule_filter.dest_ip_prefix \u003d\u003d entry.dst_ip):"}],"source_content_type":"text/x-python","patch_set":28,"id":"7f287b81_5b1c41c0","line":179,"in_reply_to":"7f287b81_81424c3d","updated":"2017-08-28 09:35:39.000000000","message":"Thanks for your review, I updated the code to check the port first, then check the IP. Please help to take a look.","commit_id":"8bfda4a34a386d8690b7e53450a567709b0b3aa5"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"e1856592fca61c6f6163a02638fb1eda8869ea14","unresolved":false,"context_lines":[{"line_number":181,"context_line":"                                            rule_filter.dest_ip_prefix or"},{"line_number":182,"context_line":"                                            entry.src_ip \u003d\u003d"},{"line_number":183,"context_line":"                                            rule_filter.src_ip_prefix):"},{"line_number":184,"context_line":"                return nl_const.ENTRY_MATCHES"},{"line_number":185,"context_line":"        if (rule_filter.src_ip_prefix \u003d\u003d entry.src_ip or"},{"line_number":186,"context_line":"                rule_filter.dest_ip_prefix \u003d\u003d entry.dst_ip):"},{"line_number":187,"context_line":"            return nl_const.ENTRY_MATCHES"}],"source_content_type":"text/x-python","patch_set":29,"id":"7f287b81_c947364c","line":184,"updated":"2017-08-28 22:08:56.000000000","message":"I think you need one more elif branch after this one to handle when remote_ip is not set that returns ENTRY_MATCHES to handle rules that don\u0027t have a remote_ip field.\n\nelif not rule_filter.remote_ip:\n    return nl_const.ENTRY_MATCHES","commit_id":"628d463110f565bc12f294c24c135de30ff450ac"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"c9aa69458b4969cea5de189bd971303d2e7ac9b0","unresolved":false,"context_lines":[{"line_number":181,"context_line":"                                            rule_filter.dest_ip_prefix or"},{"line_number":182,"context_line":"                                            entry.src_ip \u003d\u003d"},{"line_number":183,"context_line":"                                            rule_filter.src_ip_prefix):"},{"line_number":184,"context_line":"                return nl_const.ENTRY_MATCHES"},{"line_number":185,"context_line":"        if (rule_filter.src_ip_prefix \u003d\u003d entry.src_ip or"},{"line_number":186,"context_line":"                rule_filter.dest_ip_prefix \u003d\u003d entry.dst_ip):"},{"line_number":187,"context_line":"            return nl_const.ENTRY_MATCHES"}],"source_content_type":"text/x-python","patch_set":29,"id":"7f287b81_7fcea9b4","line":184,"in_reply_to":"7f287b81_c947364c","updated":"2017-08-29 09:29:07.000000000","message":"Done","commit_id":"628d463110f565bc12f294c24c135de30ff450ac"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"e1856592fca61c6f6163a02638fb1eda8869ea14","unresolved":false,"context_lines":[{"line_number":183,"context_line":"                                            rule_filter.src_ip_prefix):"},{"line_number":184,"context_line":"                return nl_const.ENTRY_MATCHES"},{"line_number":185,"context_line":"        if (rule_filter.src_ip_prefix \u003d\u003d entry.src_ip or"},{"line_number":186,"context_line":"                rule_filter.dest_ip_prefix \u003d\u003d entry.dst_ip):"},{"line_number":187,"context_line":"            return nl_const.ENTRY_MATCHES"},{"line_number":188,"context_line":"        return nl_const.ENTRY_MATCHES"}],"source_content_type":"text/x-python","patch_set":29,"id":"7f287b81_a944ea47","line":186,"updated":"2017-08-28 22:08:56.000000000","message":"these prefix comparisons don\u0027t seem like they will work if the rule allows a whole cidr block.\n\nIf we have an allow rule for \u00271.1.1.0/24\u0027 and the entry is \u00271.1.1.10\u0027, wouldn\u0027t this fail to match? It seems like we need to convert the prefix into a netaddr.IPNetwork object and then check \u0027if entry.src_ip in netaddr.IPNetwork(src_ip_prefix)\u0027","commit_id":"628d463110f565bc12f294c24c135de30ff450ac"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"c9aa69458b4969cea5de189bd971303d2e7ac9b0","unresolved":false,"context_lines":[{"line_number":183,"context_line":"                                            rule_filter.src_ip_prefix):"},{"line_number":184,"context_line":"                return nl_const.ENTRY_MATCHES"},{"line_number":185,"context_line":"        if (rule_filter.src_ip_prefix \u003d\u003d entry.src_ip or"},{"line_number":186,"context_line":"                rule_filter.dest_ip_prefix \u003d\u003d entry.dst_ip):"},{"line_number":187,"context_line":"            return nl_const.ENTRY_MATCHES"},{"line_number":188,"context_line":"        return nl_const.ENTRY_MATCHES"}],"source_content_type":"text/x-python","patch_set":29,"id":"7f287b81_ffb97914","line":186,"in_reply_to":"7f287b81_a944ea47","updated":"2017-08-29 09:29:07.000000000","message":"Done, pls help to review again. Thank you!","commit_id":"628d463110f565bc12f294c24c135de30ff450ac"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"530bc4621029cdcd4655993e08c12cceb935ec65","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from collections import namedtuple"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import netaddr"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from oslo_log import log as logging"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from neutron.privileged.agent.linux import netlink_constants as nl_const"}],"source_content_type":"text/x-python","patch_set":30,"id":"7f287b81_eab3e7e7","line":19,"updated":"2017-08-29 20:21:51.000000000","message":"no blank line is needed here.","commit_id":"b4252bbf098be601049ff46e21f79d6c328b2310"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"1d7d3281dadabedb60a5bc09f4e37a6074faf1fd","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from collections import namedtuple"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import netaddr"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from oslo_log import log as logging"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from neutron.privileged.agent.linux import netlink_constants as nl_const"}],"source_content_type":"text/x-python","patch_set":30,"id":"7f287b81_47be69b4","line":19,"in_reply_to":"7f287b81_eab3e7e7","updated":"2017-08-30 09:43:25.000000000","message":"Done","commit_id":"b4252bbf098be601049ff46e21f79d6c328b2310"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"530bc4621029cdcd4655993e08c12cceb935ec65","unresolved":false,"context_lines":[{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"ICMPFilter \u003d namedtuple(\u0027Filter\u0027,"},{"line_number":30,"context_line":"                        (\u0027ip_version protocol port_range_min \u0027"},{"line_number":31,"context_line":"                         \u0027port_range_max src_ip_prefix \u0027"},{"line_number":32,"context_line":"                         \u0027dest_ip_prefix id remote_ip\u0027))"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"TCPUDPFilter \u003d namedtuple(\u0027Filter\u0027,"}],"source_content_type":"text/x-python","patch_set":30,"id":"7f287b81_2a9b2f18","line":31,"range":{"start_line":30,"start_character":46,"end_line":31,"end_character":40},"updated":"2017-08-29 20:21:51.000000000","message":"port_range_min/max has different meanings in ICMP context in neutron security group implementation. Do you really need to use port_range_min/max here? If not, I prefer to icmp_type and icmp_code because they are more meaningful.\nOr does it come from the netlink_lib implementation?","commit_id":"b4252bbf098be601049ff46e21f79d6c328b2310"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"1d7d3281dadabedb60a5bc09f4e37a6074faf1fd","unresolved":false,"context_lines":[{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"ICMPFilter \u003d namedtuple(\u0027Filter\u0027,"},{"line_number":30,"context_line":"                        (\u0027ip_version protocol port_range_min \u0027"},{"line_number":31,"context_line":"                         \u0027port_range_max src_ip_prefix \u0027"},{"line_number":32,"context_line":"                         \u0027dest_ip_prefix id remote_ip\u0027))"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"TCPUDPFilter \u003d namedtuple(\u0027Filter\u0027,"}],"source_content_type":"text/x-python","patch_set":30,"id":"7f287b81_a77f4da9","line":31,"range":{"start_line":30,"start_character":46,"end_line":31,"end_character":40},"in_reply_to":"7f287b81_2a9b2f18","updated":"2017-08-30 09:43:25.000000000","message":"The reason is to use same format of namedtuple for both ICMP and TCP/UDP cases. So for later processing in _compare_entry_and_rule no need to open another if branch for protocol. I\u0027d like to keep this and put a comment on that, what you think?","commit_id":"b4252bbf098be601049ff46e21f79d6c328b2310"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"530bc4621029cdcd4655993e08c12cceb935ec65","unresolved":false,"context_lines":[{"line_number":41,"context_line":"                          \u0027src_ip dst_ip zone\u0027))"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"ICMPEntry \u003d namedtuple(\u0027Entry\u0027,"},{"line_number":44,"context_line":"                       (\u0027ip_version protocol src_port dst_port \u0027"},{"line_number":45,"context_line":"                        \u0027src_ip dst_ip id zone\u0027))"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"7f287b81_eaa08744","line":44,"range":{"start_line":44,"start_character":45,"end_line":44,"end_character":62},"updated":"2017-08-29 20:21:51.000000000","message":"Same comment for ICMPFIlter above.","commit_id":"b4252bbf098be601049ff46e21f79d6c328b2310"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"530bc4621029cdcd4655993e08c12cceb935ec65","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    def delete_entries(self, rules, zone):"},{"line_number":53,"context_line":"        \"\"\"Deletes conntrack entries for rules"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        :param: rules: rules to delete conntrack entries"},{"line_number":56,"context_line":"        :type rules: list"},{"line_number":57,"context_line":"        :param: zone: zone in which rules belong to"},{"line_number":58,"context_line":"        :type zone: int"}],"source_content_type":"text/x-python","patch_set":30,"id":"7f287b81_6a1b77c9","line":55,"range":{"start_line":55,"start_character":8,"end_line":55,"end_character":22},"updated":"2017-08-29 20:21:51.000000000","message":"I think a colon after \u0027param\u0027 is unnecessary.\n\n  :param rules:","commit_id":"b4252bbf098be601049ff46e21f79d6c328b2310"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"1d7d3281dadabedb60a5bc09f4e37a6074faf1fd","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    def delete_entries(self, rules, zone):"},{"line_number":53,"context_line":"        \"\"\"Deletes conntrack entries for rules"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        :param: rules: rules to delete conntrack entries"},{"line_number":56,"context_line":"        :type rules: list"},{"line_number":57,"context_line":"        :param: zone: zone in which rules belong to"},{"line_number":58,"context_line":"        :type zone: int"}],"source_content_type":"text/x-python","patch_set":30,"id":"7f287b81_a7c4ed40","line":55,"range":{"start_line":55,"start_character":8,"end_line":55,"end_character":22},"in_reply_to":"7f287b81_6a1b77c9","updated":"2017-08-30 09:43:25.000000000","message":"Done","commit_id":"b4252bbf098be601049ff46e21f79d6c328b2310"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"530bc4621029cdcd4655993e08c12cceb935ec65","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        :param: rules: rules to delete conntrack entries"},{"line_number":56,"context_line":"        :type rules: list"},{"line_number":57,"context_line":"        :param: zone: zone in which rules belong to"},{"line_number":58,"context_line":"        :type zone: int"},{"line_number":59,"context_line":"        \"\"\""},{"line_number":60,"context_line":"        rule_filters \u003d (self._get_filter_from_rule(rule) for rule in rules)"}],"source_content_type":"text/x-python","patch_set":30,"id":"7f287b81_4a7c3beb","line":57,"range":{"start_line":57,"start_character":8,"end_line":57,"end_character":21},"updated":"2017-08-29 20:21:51.000000000","message":"ditto","commit_id":"b4252bbf098be601049ff46e21f79d6c328b2310"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"530bc4621029cdcd4655993e08c12cceb935ec65","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        :param: rules: rules to delete conntrack entries"},{"line_number":56,"context_line":"        :type rules: list"},{"line_number":57,"context_line":"        :param: zone: zone in which rules belong to"},{"line_number":58,"context_line":"        :type zone: int"},{"line_number":59,"context_line":"        \"\"\""},{"line_number":60,"context_line":"        rule_filters \u003d (self._get_filter_from_rule(rule) for rule in rules)"}],"source_content_type":"text/x-python","patch_set":30,"id":"7f287b81_ca6f0b29","line":57,"range":{"start_line":57,"start_character":27,"end_line":57,"end_character":35},"updated":"2017-08-29 20:21:51.000000000","message":"in which -\u003e which","commit_id":"b4252bbf098be601049ff46e21f79d6c328b2310"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"1d7d3281dadabedb60a5bc09f4e37a6074faf1fd","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        :param: rules: rules to delete conntrack entries"},{"line_number":56,"context_line":"        :type rules: list"},{"line_number":57,"context_line":"        :param: zone: zone in which rules belong to"},{"line_number":58,"context_line":"        :type zone: int"},{"line_number":59,"context_line":"        \"\"\""},{"line_number":60,"context_line":"        rule_filters \u003d (self._get_filter_from_rule(rule) for rule in rules)"}],"source_content_type":"text/x-python","patch_set":30,"id":"7f287b81_27e6bde9","line":57,"range":{"start_line":57,"start_character":8,"end_line":57,"end_character":21},"in_reply_to":"7f287b81_4a7c3beb","updated":"2017-08-30 09:43:25.000000000","message":"Done","commit_id":"b4252bbf098be601049ff46e21f79d6c328b2310"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"1d7d3281dadabedb60a5bc09f4e37a6074faf1fd","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        :param: rules: rules to delete conntrack entries"},{"line_number":56,"context_line":"        :type rules: list"},{"line_number":57,"context_line":"        :param: zone: zone in which rules belong to"},{"line_number":58,"context_line":"        :type zone: int"},{"line_number":59,"context_line":"        \"\"\""},{"line_number":60,"context_line":"        rule_filters \u003d (self._get_filter_from_rule(rule) for rule in rules)"}],"source_content_type":"text/x-python","patch_set":30,"id":"7f287b81_67e045ce","line":57,"range":{"start_line":57,"start_character":27,"end_line":57,"end_character":35},"in_reply_to":"7f287b81_ca6f0b29","updated":"2017-08-30 09:43:25.000000000","message":"Done","commit_id":"b4252bbf098be601049ff46e21f79d6c328b2310"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"530bc4621029cdcd4655993e08c12cceb935ec65","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                    _entry \u003d TCPUDPEntry(*entry)"},{"line_number":85,"context_line":"                # Compare entry with rule"},{"line_number":86,"context_line":"                comp \u003d self._compare_entry_and_rule(rule_filter, _entry)"},{"line_number":87,"context_line":"                if comp \u003e nl_const.ENTRY_MATCHES:"},{"line_number":88,"context_line":"                    break"},{"line_number":89,"context_line":"                # Append entry to delete_entry if it matches with rule"},{"line_number":90,"context_line":"                elif comp \u003d\u003d nl_const.ENTRY_MATCHES:"}],"source_content_type":"text/x-python","patch_set":30,"id":"7f287b81_2acd6f30","line":87,"range":{"start_line":87,"start_character":16,"end_line":87,"end_character":49},"updated":"2017-08-29 20:21:51.000000000","message":"what does this mean?\nComment like L.89 below would be nice.\n\nI think this is because entries returned by netlink_lib are sorted. It is worth mentioned here. Otherwise, it is difficult understand why it works.","commit_id":"b4252bbf098be601049ff46e21f79d6c328b2310"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"1d7d3281dadabedb60a5bc09f4e37a6074faf1fd","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                    _entry \u003d TCPUDPEntry(*entry)"},{"line_number":85,"context_line":"                # Compare entry with rule"},{"line_number":86,"context_line":"                comp \u003d self._compare_entry_and_rule(rule_filter, _entry)"},{"line_number":87,"context_line":"                if comp \u003e nl_const.ENTRY_MATCHES:"},{"line_number":88,"context_line":"                    break"},{"line_number":89,"context_line":"                # Append entry to delete_entry if it matches with rule"},{"line_number":90,"context_line":"                elif comp \u003d\u003d nl_const.ENTRY_MATCHES:"}],"source_content_type":"text/x-python","patch_set":30,"id":"7f287b81_672e05fc","line":87,"range":{"start_line":87,"start_character":16,"end_line":87,"end_character":49},"in_reply_to":"7f287b81_2acd6f30","updated":"2017-08-30 09:43:25.000000000","message":"We compare entry with rule_filter to see if this entry matches. The _compare_entry_and_rule returns 0 - means matched, others mean unmatched. I added a comment.","commit_id":"b4252bbf098be601049ff46e21f79d6c328b2310"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"530bc4621029cdcd4655993e08c12cceb935ec65","unresolved":false,"context_lines":[{"line_number":145,"context_line":"            1 if entry is higher than rule"},{"line_number":146,"context_line":"        \"\"\""},{"line_number":147,"context_line":"        # check if protocol is icmp v4 and match any ip 0.0.0.0/0"},{"line_number":148,"context_line":"        if rule_filter.protocol \u003d\u003d lib_constants.PROTO_NAME_ICMP:"},{"line_number":149,"context_line":"            if (entry.protocol \u003d\u003d lib_constants.PROTO_NAME_ICMP and"},{"line_number":150,"context_line":"                    rule_filter.src_ip_prefix \u003d\u003d lib_constants.IPv4_ANY):"},{"line_number":151,"context_line":"                return nl_const.ENTRY_MATCHES"},{"line_number":152,"context_line":"        # check if protocol is icmp v6 and match any ip ::/0"},{"line_number":153,"context_line":"        if rule_filter.protocol \u003d\u003d lib_constants.PROTO_NAME_IPV6_ICMP:"}],"source_content_type":"text/x-python","patch_set":30,"id":"7f287b81_1008a425","line":150,"range":{"start_line":148,"start_character":8,"end_line":150,"end_character":73},"updated":"2017-08-29 20:21:51.000000000","message":"There is no need to use nested if.","commit_id":"b4252bbf098be601049ff46e21f79d6c328b2310"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"1d7d3281dadabedb60a5bc09f4e37a6074faf1fd","unresolved":false,"context_lines":[{"line_number":145,"context_line":"            1 if entry is higher than rule"},{"line_number":146,"context_line":"        \"\"\""},{"line_number":147,"context_line":"        # check if protocol is icmp v4 and match any ip 0.0.0.0/0"},{"line_number":148,"context_line":"        if rule_filter.protocol \u003d\u003d lib_constants.PROTO_NAME_ICMP:"},{"line_number":149,"context_line":"            if (entry.protocol \u003d\u003d lib_constants.PROTO_NAME_ICMP and"},{"line_number":150,"context_line":"                    rule_filter.src_ip_prefix \u003d\u003d lib_constants.IPv4_ANY):"},{"line_number":151,"context_line":"                return nl_const.ENTRY_MATCHES"},{"line_number":152,"context_line":"        # check if protocol is icmp v6 and match any ip ::/0"},{"line_number":153,"context_line":"        if rule_filter.protocol \u003d\u003d lib_constants.PROTO_NAME_IPV6_ICMP:"}],"source_content_type":"text/x-python","patch_set":30,"id":"7f287b81_0737414f","line":150,"range":{"start_line":148,"start_character":8,"end_line":150,"end_character":73},"in_reply_to":"7f287b81_1008a425","updated":"2017-08-30 09:43:25.000000000","message":"Done","commit_id":"b4252bbf098be601049ff46e21f79d6c328b2310"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"530bc4621029cdcd4655993e08c12cceb935ec65","unresolved":false,"context_lines":[{"line_number":150,"context_line":"                    rule_filter.src_ip_prefix \u003d\u003d lib_constants.IPv4_ANY):"},{"line_number":151,"context_line":"                return nl_const.ENTRY_MATCHES"},{"line_number":152,"context_line":"        # check if protocol is icmp v6 and match any ip ::/0"},{"line_number":153,"context_line":"        if rule_filter.protocol \u003d\u003d lib_constants.PROTO_NAME_IPV6_ICMP:"},{"line_number":154,"context_line":"            if (entry.protocol \u003d\u003d lib_constants.PROTO_NAME_IPV6_ICMP and"},{"line_number":155,"context_line":"                    rule_filter.src_ip_prefix \u003d\u003d lib_constants.IPv6_ANY):"},{"line_number":156,"context_line":"                return nl_const.ENTRY_MATCHES"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        # As entry is already sorted by netlink-lib, we can compare fields"}],"source_content_type":"text/x-python","patch_set":30,"id":"7f287b81_f00ab81d","line":155,"range":{"start_line":153,"start_character":7,"end_line":155,"end_character":73},"updated":"2017-08-29 20:21:51.000000000","message":"ditto","commit_id":"b4252bbf098be601049ff46e21f79d6c328b2310"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"1d7d3281dadabedb60a5bc09f4e37a6074faf1fd","unresolved":false,"context_lines":[{"line_number":150,"context_line":"                    rule_filter.src_ip_prefix \u003d\u003d lib_constants.IPv4_ANY):"},{"line_number":151,"context_line":"                return nl_const.ENTRY_MATCHES"},{"line_number":152,"context_line":"        # check if protocol is icmp v6 and match any ip ::/0"},{"line_number":153,"context_line":"        if rule_filter.protocol \u003d\u003d lib_constants.PROTO_NAME_IPV6_ICMP:"},{"line_number":154,"context_line":"            if (entry.protocol \u003d\u003d lib_constants.PROTO_NAME_IPV6_ICMP and"},{"line_number":155,"context_line":"                    rule_filter.src_ip_prefix \u003d\u003d lib_constants.IPv6_ANY):"},{"line_number":156,"context_line":"                return nl_const.ENTRY_MATCHES"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        # As entry is already sorted by netlink-lib, we can compare fields"}],"source_content_type":"text/x-python","patch_set":30,"id":"7f287b81_c73c9930","line":155,"range":{"start_line":153,"start_character":7,"end_line":155,"end_character":73},"in_reply_to":"7f287b81_f00ab81d","updated":"2017-08-30 09:43:25.000000000","message":"Done","commit_id":"b4252bbf098be601049ff46e21f79d6c328b2310"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"530bc4621029cdcd4655993e08c12cceb935ec65","unresolved":false,"context_lines":[{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        # As entry is already sorted by netlink-lib, we can compare fields"},{"line_number":159,"context_line":"        # of entry and rule."},{"line_number":160,"context_line":"        # In case entry_version \u003c rule_filter.ip_version, we consider entry"},{"line_number":161,"context_line":"        # is \"lower\" than rule, then no need to consider other fields of"},{"line_number":162,"context_line":"        # entry and rule."},{"line_number":163,"context_line":"        # The same logic applied for case entry is \"greater\" than rule"}],"source_content_type":"text/x-python","patch_set":30,"id":"7f287b81_901b7471","line":160,"range":{"start_line":160,"start_character":18,"end_line":160,"end_character":31},"updated":"2017-08-29 20:21:51.000000000","message":"entry.ip_version?","commit_id":"b4252bbf098be601049ff46e21f79d6c328b2310"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"1d7d3281dadabedb60a5bc09f4e37a6074faf1fd","unresolved":false,"context_lines":[{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        # As entry is already sorted by netlink-lib, we can compare fields"},{"line_number":159,"context_line":"        # of entry and rule."},{"line_number":160,"context_line":"        # In case entry_version \u003c rule_filter.ip_version, we consider entry"},{"line_number":161,"context_line":"        # is \"lower\" than rule, then no need to consider other fields of"},{"line_number":162,"context_line":"        # entry and rule."},{"line_number":163,"context_line":"        # The same logic applied for case entry is \"greater\" than rule"}],"source_content_type":"text/x-python","patch_set":30,"id":"7f287b81_874211aa","line":160,"range":{"start_line":160,"start_character":18,"end_line":160,"end_character":31},"in_reply_to":"7f287b81_901b7471","updated":"2017-08-30 09:43:25.000000000","message":"Done","commit_id":"b4252bbf098be601049ff46e21f79d6c328b2310"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"530bc4621029cdcd4655993e08c12cceb935ec65","unresolved":false,"context_lines":[{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        # As entry is already sorted by netlink-lib, we can compare fields"},{"line_number":159,"context_line":"        # of entry and rule."},{"line_number":160,"context_line":"        # In case entry_version \u003c rule_filter.ip_version, we consider entry"},{"line_number":161,"context_line":"        # is \"lower\" than rule, then no need to consider other fields of"},{"line_number":162,"context_line":"        # entry and rule."},{"line_number":163,"context_line":"        # The same logic applied for case entry is \"greater\" than rule"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        if entry.ip_version \u003c rule_filter.ip_version:"},{"line_number":166,"context_line":"            return nl_const.ENTRY_IS_LOWER"}],"source_content_type":"text/x-python","patch_set":30,"id":"7f287b81_5063ccb2","line":163,"range":{"start_line":160,"start_character":58,"end_line":163,"end_character":70},"updated":"2017-08-29 20:21:51.000000000","message":"Why can you assume this?\n\nIs there any guarantee on the order of entries per IP version?\nOtherwise, this assumption is not correct.","commit_id":"b4252bbf098be601049ff46e21f79d6c328b2310"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"1d7d3281dadabedb60a5bc09f4e37a6074faf1fd","unresolved":false,"context_lines":[{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        # As entry is already sorted by netlink-lib, we can compare fields"},{"line_number":159,"context_line":"        # of entry and rule."},{"line_number":160,"context_line":"        # In case entry_version \u003c rule_filter.ip_version, we consider entry"},{"line_number":161,"context_line":"        # is \"lower\" than rule, then no need to consider other fields of"},{"line_number":162,"context_line":"        # entry and rule."},{"line_number":163,"context_line":"        # The same logic applied for case entry is \"greater\" than rule"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        if entry.ip_version \u003c rule_filter.ip_version:"},{"line_number":166,"context_line":"            return nl_const.ENTRY_IS_LOWER"}],"source_content_type":"text/x-python","patch_set":30,"id":"7f287b81_275b5d87","line":163,"range":{"start_line":160,"start_character":58,"end_line":163,"end_character":70},"in_reply_to":"7f287b81_5063ccb2","updated":"2017-08-30 09:43:25.000000000","message":"nl_lib.list_entries takes care of parsing entries and orders fields so we can compare it easier.","commit_id":"b4252bbf098be601049ff46e21f79d6c328b2310"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"530bc4621029cdcd4655993e08c12cceb935ec65","unresolved":false,"context_lines":[{"line_number":166,"context_line":"            return nl_const.ENTRY_IS_LOWER"},{"line_number":167,"context_line":"        elif entry.ip_version \u003e rule_filter.ip_version:"},{"line_number":168,"context_line":"            return nl_const.ENTRY_IS_HIGHER"},{"line_number":169,"context_line":"        if rule_filter.protocol \u003d\u003d lib_constants.PROTO_NAME_IPV6_ICMP:"},{"line_number":170,"context_line":"            rule_filter.protocol \u003d lib_constants.PROTO_NAME_IPV6_ICMP_LEGACY"},{"line_number":171,"context_line":"        if entry.src_port \u003c rule_filter.port_range_min:"},{"line_number":172,"context_line":"            return nl_const.ENTRY_IS_LOWER"},{"line_number":173,"context_line":"        elif entry.src_port \u003e rule_filter.port_range_max:"}],"source_content_type":"text/x-python","patch_set":30,"id":"7f287b81_b039d0d7","line":170,"range":{"start_line":169,"start_character":7,"end_line":170,"end_character":76},"updated":"2017-08-29 20:21:51.000000000","message":"Why don\u0027t you use the reverse substitution? The legacy version means it can be dropped in the future, so it is better to use non-legacy version by default.","commit_id":"b4252bbf098be601049ff46e21f79d6c328b2310"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"1d7d3281dadabedb60a5bc09f4e37a6074faf1fd","unresolved":false,"context_lines":[{"line_number":166,"context_line":"            return nl_const.ENTRY_IS_LOWER"},{"line_number":167,"context_line":"        elif entry.ip_version \u003e rule_filter.ip_version:"},{"line_number":168,"context_line":"            return nl_const.ENTRY_IS_HIGHER"},{"line_number":169,"context_line":"        if rule_filter.protocol \u003d\u003d lib_constants.PROTO_NAME_IPV6_ICMP:"},{"line_number":170,"context_line":"            rule_filter.protocol \u003d lib_constants.PROTO_NAME_IPV6_ICMP_LEGACY"},{"line_number":171,"context_line":"        if entry.src_port \u003c rule_filter.port_range_min:"},{"line_number":172,"context_line":"            return nl_const.ENTRY_IS_LOWER"},{"line_number":173,"context_line":"        elif entry.src_port \u003e rule_filter.port_range_max:"}],"source_content_type":"text/x-python","patch_set":30,"id":"7f287b81_18b9df13","line":170,"range":{"start_line":169,"start_character":7,"end_line":170,"end_character":76},"in_reply_to":"7f287b81_b039d0d7","updated":"2017-08-30 09:43:25.000000000","message":"atm netlink_lib only understands `icmpv6` that\u0027s why I set protocol PROTO_NAME_IPV6_ICMP_LEGACY here.","commit_id":"b4252bbf098be601049ff46e21f79d6c328b2310"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"530bc4621029cdcd4655993e08c12cceb935ec65","unresolved":false,"context_lines":[{"line_number":168,"context_line":"            return nl_const.ENTRY_IS_HIGHER"},{"line_number":169,"context_line":"        if rule_filter.protocol \u003d\u003d lib_constants.PROTO_NAME_IPV6_ICMP:"},{"line_number":170,"context_line":"            rule_filter.protocol \u003d lib_constants.PROTO_NAME_IPV6_ICMP_LEGACY"},{"line_number":171,"context_line":"        if entry.src_port \u003c rule_filter.port_range_min:"},{"line_number":172,"context_line":"            return nl_const.ENTRY_IS_LOWER"},{"line_number":173,"context_line":"        elif entry.src_port \u003e rule_filter.port_range_max:"},{"line_number":174,"context_line":"            return nl_const.ENTRY_IS_HIGHER"},{"line_number":175,"context_line":"        if rule_filter.protocol:"},{"line_number":176,"context_line":"            if entry.protocol \u003c rule_filter.protocol:"},{"line_number":177,"context_line":"                return nl_const.ENTRY_IS_LOWER"}],"source_content_type":"text/x-python","patch_set":30,"id":"7f287b81_b06790e9","line":174,"range":{"start_line":171,"start_character":7,"end_line":174,"end_character":43},"updated":"2017-08-29 20:21:51.000000000","message":"Don\u0027t you need to compare protocol value first? The meaning of port_range_min/max depends on protocol.","commit_id":"b4252bbf098be601049ff46e21f79d6c328b2310"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"1d7d3281dadabedb60a5bc09f4e37a6074faf1fd","unresolved":false,"context_lines":[{"line_number":168,"context_line":"            return nl_const.ENTRY_IS_HIGHER"},{"line_number":169,"context_line":"        if rule_filter.protocol \u003d\u003d lib_constants.PROTO_NAME_IPV6_ICMP:"},{"line_number":170,"context_line":"            rule_filter.protocol \u003d lib_constants.PROTO_NAME_IPV6_ICMP_LEGACY"},{"line_number":171,"context_line":"        if entry.src_port \u003c rule_filter.port_range_min:"},{"line_number":172,"context_line":"            return nl_const.ENTRY_IS_LOWER"},{"line_number":173,"context_line":"        elif entry.src_port \u003e rule_filter.port_range_max:"},{"line_number":174,"context_line":"            return nl_const.ENTRY_IS_HIGHER"},{"line_number":175,"context_line":"        if rule_filter.protocol:"},{"line_number":176,"context_line":"            if entry.protocol \u003c rule_filter.protocol:"},{"line_number":177,"context_line":"                return nl_const.ENTRY_IS_LOWER"}],"source_content_type":"text/x-python","patch_set":30,"id":"7f287b81_184e7f37","line":174,"range":{"start_line":171,"start_character":7,"end_line":174,"end_character":43},"in_reply_to":"7f287b81_b06790e9","updated":"2017-08-30 09:43:25.000000000","message":"Yeah, seems I misunderstood comment of Kevin.\nDone","commit_id":"b4252bbf098be601049ff46e21f79d6c328b2310"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"a6443abd06f8a016ee8d18465e45fee197c9836e","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        for rule_filter in rule_filters:"},{"line_number":80,"context_line":"            for entry in entries:"},{"line_number":81,"context_line":"                # build a namedtuple for entry"},{"line_number":82,"context_line":"                if entry[1] \u003d\u003d \u0027icmp\u0027:"},{"line_number":83,"context_line":"                    _entry \u003d ICMPEntry(*entry)"},{"line_number":84,"context_line":"                else:"},{"line_number":85,"context_line":"                    _entry \u003d TCPUDPEntry(*entry)"}],"source_content_type":"text/x-python","patch_set":35,"id":"3fa0c359_bc620b3d","line":82,"range":{"start_line":82,"start_character":32,"end_line":82,"end_character":37},"updated":"2018-02-22 14:34:54.000000000","message":"constant from neutron_lib can be used","commit_id":"05f949b355eea56cbb0f0b474b3e3725a5154999"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"90cf8ea7cfa3055becec50ccffe62b1fc56ca97d","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        for rule_filter in rule_filters:"},{"line_number":80,"context_line":"            for entry in entries:"},{"line_number":81,"context_line":"                # build a namedtuple for entry"},{"line_number":82,"context_line":"                if entry[1] \u003d\u003d \u0027icmp\u0027:"},{"line_number":83,"context_line":"                    _entry \u003d ICMPEntry(*entry)"},{"line_number":84,"context_line":"                else:"},{"line_number":85,"context_line":"                    _entry \u003d TCPUDPEntry(*entry)"}],"source_content_type":"text/x-python","patch_set":35,"id":"ff6b8bd7_fc9a65c3","line":82,"range":{"start_line":82,"start_character":32,"end_line":82,"end_character":37},"in_reply_to":"3fa0c359_bc620b3d","updated":"2018-03-06 18:35:11.000000000","message":"Done","commit_id":"05f949b355eea56cbb0f0b474b3e3725a5154999"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"a6443abd06f8a016ee8d18465e45fee197c9836e","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                    break"},{"line_number":92,"context_line":"                # Append entry to delete_entry if it matches with rule"},{"line_number":93,"context_line":"                elif comp \u003d\u003d nl_const.ENTRY_MATCHES:"},{"line_number":94,"context_line":"                    delete_entries.append(_entry)"},{"line_number":95,"context_line":"        return delete_entries"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":35,"id":"3fa0c359_dcccb736","line":94,"updated":"2018-02-22 14:34:54.000000000","message":"what if comp \u003c nl_const.ENTRY_MATCHES?","commit_id":"05f949b355eea56cbb0f0b474b3e3725a5154999"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"90cf8ea7cfa3055becec50ccffe62b1fc56ca97d","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                    break"},{"line_number":92,"context_line":"                # Append entry to delete_entry if it matches with rule"},{"line_number":93,"context_line":"                elif comp \u003d\u003d nl_const.ENTRY_MATCHES:"},{"line_number":94,"context_line":"                    delete_entries.append(_entry)"},{"line_number":95,"context_line":"        return delete_entries"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":35,"id":"ff6b8bd7_5c6031cf","line":94,"in_reply_to":"3fa0c359_dcccb736","updated":"2018-03-06 18:35:11.000000000","message":"In that case we want to look at the next entry, I can put a comment here","commit_id":"05f949b355eea56cbb0f0b474b3e3725a5154999"}],"neutron/tests/unit/agent/linux/test_ip_conntrack.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"a6443abd06f8a016ee8d18465e45fee197c9836e","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        dev_info \u003d {\u0027device\u0027: \u0027tapdevice\u0027, \u0027fixed_ips\u0027: [\u00271.2.3.4\u0027]}"},{"line_number":41,"context_line":"        dev_info_list \u003d [dev_info for _ in range(10)]"},{"line_number":42,"context_line":"        self.mgr._delete_conntrack_state(dev_info_list, rule)"},{"line_number":43,"context_line":"        self.assertEqual(10, len("},{"line_number":44,"context_line":"            self.mgr.conntrack_mgr.delete_entries.mock_calls))"}],"source_content_type":"text/x-python","patch_set":35,"id":"3fa0c359_174e7837","line":43,"updated":"2018-02-22 14:34:54.000000000","message":"sorry for maybe stupid question but why it is expected to be called 10 times?","commit_id":"05f949b355eea56cbb0f0b474b3e3725a5154999"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"90cf8ea7cfa3055becec50ccffe62b1fc56ca97d","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        dev_info \u003d {\u0027device\u0027: \u0027tapdevice\u0027, \u0027fixed_ips\u0027: [\u00271.2.3.4\u0027]}"},{"line_number":41,"context_line":"        dev_info_list \u003d [dev_info for _ in range(10)]"},{"line_number":42,"context_line":"        self.mgr._delete_conntrack_state(dev_info_list, rule)"},{"line_number":43,"context_line":"        self.assertEqual(10, len("},{"line_number":44,"context_line":"            self.mgr.conntrack_mgr.delete_entries.mock_calls))"}],"source_content_type":"text/x-python","patch_set":35,"id":"ff6b8bd7_7cf895c3","line":43,"in_reply_to":"3fa0c359_174e7837","updated":"2018-03-06 18:35:11.000000000","message":"range(10) on L41 :)","commit_id":"05f949b355eea56cbb0f0b474b3e3725a5154999"}],"neutron/tests/unit/agent/linux/test_iptables_firewall.py":[{"author":{"_account_id":15471,"name":"Nguyen Phuong An","email":"annp.cs51@gmail.com","username":"An-FVL"},"change_message_id":"2c607a14281eb524d5a0333d54965608156ab438","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    def setUp(self):"},{"line_number":72,"context_line":"        super(BaseIptablesFirewallTestCase, self).setUp()"},{"line_number":73,"context_line":"        security_config.register_securitygroups_opts()"},{"line_number":74,"context_line":"        agent_config.register_root_helper(cfg.CONF)"},{"line_number":75,"context_line":"        cfg.CONF.set_override(\u0027comment_iptables_rules\u0027, False, \u0027AGENT\u0027)"},{"line_number":76,"context_line":"        self.utils_exec_p \u003d mock.patch("},{"line_number":77,"context_line":"            \u0027neutron.agent.linux.netlink_conntrack.NetlinkConntrack\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f201791_2f2e42a5","line":74,"range":{"start_line":74,"start_character":8,"end_line":74,"end_character":51},"updated":"2017-06-21 07:08:03.000000000","message":"I think it\u0027s missing agent_config.config.setup_privsep() for netlink","commit_id":"b95a1a97ab6998c509300c9a4edcf2be620951c9"},{"author":{"_account_id":24441,"name":"Cuong Nguyen","email":"cuongnv@vn.fujitsu.com","username":"cuongnv"},"change_message_id":"1ad8693e5ea0fef470711742842105bb63ef44b0","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    def setUp(self):"},{"line_number":72,"context_line":"        super(BaseIptablesFirewallTestCase, self).setUp()"},{"line_number":73,"context_line":"        security_config.register_securitygroups_opts()"},{"line_number":74,"context_line":"        agent_config.register_root_helper(cfg.CONF)"},{"line_number":75,"context_line":"        cfg.CONF.set_override(\u0027comment_iptables_rules\u0027, False, \u0027AGENT\u0027)"},{"line_number":76,"context_line":"        self.utils_exec_p \u003d mock.patch("},{"line_number":77,"context_line":"            \u0027neutron.agent.linux.netlink_conntrack.NetlinkConntrack\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f201791_22abf91d","line":74,"range":{"start_line":74,"start_character":8,"end_line":74,"end_character":51},"in_reply_to":"5f201791_2f2e42a5","updated":"2017-06-21 07:36:45.000000000","message":"Done","commit_id":"b95a1a97ab6998c509300c9a4edcf2be620951c9"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"a6443abd06f8a016ee8d18465e45fee197c9836e","unresolved":false,"context_lines":[{"line_number":1257,"context_line":"                    \u0027protocol\u0027: protocol,"},{"line_number":1258,"context_line":"                    \u0027source_ip_prefix\u0027: FAKE_IP[ethertype]}"},{"line_number":1259,"context_line":"            calls \u003d [mock.call([rule], ct_zone)]"},{"line_number":1260,"context_line":"            self.conntrack_mgr().delete_entries.assert_has_calls(calls)"},{"line_number":1261,"context_line":""},{"line_number":1262,"context_line":"    def test_remove_conntrack_entries_for_delete_rule_ipv4(self):"},{"line_number":1263,"context_line":"        for direction in [\u0027ingress\u0027, \u0027egress\u0027]:"}],"source_content_type":"text/x-python","patch_set":35,"id":"3fa0c359_17fc38b3","line":1260,"updated":"2018-02-22 14:34:54.000000000","message":"if there is only one call expected, why You don\u0027t use assert_called_once_with()","commit_id":"05f949b355eea56cbb0f0b474b3e3725a5154999"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"90cf8ea7cfa3055becec50ccffe62b1fc56ca97d","unresolved":false,"context_lines":[{"line_number":1257,"context_line":"                    \u0027protocol\u0027: protocol,"},{"line_number":1258,"context_line":"                    \u0027source_ip_prefix\u0027: FAKE_IP[ethertype]}"},{"line_number":1259,"context_line":"            calls \u003d [mock.call([rule], ct_zone)]"},{"line_number":1260,"context_line":"            self.conntrack_mgr().delete_entries.assert_has_calls(calls)"},{"line_number":1261,"context_line":""},{"line_number":1262,"context_line":"    def test_remove_conntrack_entries_for_delete_rule_ipv4(self):"},{"line_number":1263,"context_line":"        for direction in [\u0027ingress\u0027, \u0027egress\u0027]:"}],"source_content_type":"text/x-python","patch_set":35,"id":"ff6b8bd7_df9d135a","line":1260,"in_reply_to":"3fa0c359_17fc38b3","updated":"2018-03-06 18:35:11.000000000","message":"After 10 minutes trying I couldn\u0027t get it to work, so am leaving it as-is.","commit_id":"05f949b355eea56cbb0f0b474b3e3725a5154999"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"975525debf8756086223894b74f99d705f8d22e8","unresolved":false,"context_lines":[{"line_number":1315,"context_line":"            # process conntrack updates in the queue"},{"line_number":1316,"context_line":"            while not self.firewall.ipconntrack._queue.empty():"},{"line_number":1317,"context_line":"                self.firewall.ipconntrack._process_queue()"},{"line_number":1318,"context_line":"            self.firewall.ipconntrack._process_queue()"},{"line_number":1319,"context_line":"            rule \u003d {\u0027ethertype\u0027: ethertype,"},{"line_number":1320,"context_line":"                    \u0027direction\u0027: direction,"},{"line_number":1321,"context_line":"                    \u0027protocol\u0027: protocol,"}],"source_content_type":"text/x-python","patch_set":39,"id":"9f6a8fd7_4530df9f","line":1318,"updated":"2018-04-20 20:17:29.000000000","message":"for me it looks like this line is responsible for hanging unit tests. I checked it locally with remote_pdb and it looks that it hangs exactly here (at least for py27).","commit_id":"361f52e22138b52347bb1a0fd6d6ccfc1e2277e5"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"7671566011a15a1b81f1227690b082f0f8b8e1de","unresolved":false,"context_lines":[{"line_number":1315,"context_line":"            # process conntrack updates in the queue"},{"line_number":1316,"context_line":"            while not self.firewall.ipconntrack._queue.empty():"},{"line_number":1317,"context_line":"                self.firewall.ipconntrack._process_queue()"},{"line_number":1318,"context_line":"            self.firewall.ipconntrack._process_queue()"},{"line_number":1319,"context_line":"            rule \u003d {\u0027ethertype\u0027: ethertype,"},{"line_number":1320,"context_line":"                    \u0027direction\u0027: direction,"},{"line_number":1321,"context_line":"                    \u0027protocol\u0027: protocol,"}],"source_content_type":"text/x-python","patch_set":39,"id":"9f6a8fd7_9bf5ddef","line":1318,"in_reply_to":"9f6a8fd7_4530df9f","updated":"2018-04-23 13:11:31.000000000","message":"Thanks Slawek, looks like this snuck in after my rebase, it\u0027s not needed with the line right above it and will just block since the queue is now empty :(","commit_id":"361f52e22138b52347bb1a0fd6d6ccfc1e2277e5"}],"neutron/tests/unit/agent/linux/test_netlink_conntrack.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"a6443abd06f8a016ee8d18465e45fee197c9836e","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        #        \u0027source_ip_prefix\u0027, \u0027dest_ip_prefix\u0027)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        expected_icmp_filter \u003d (4, \u0027icmp\u0027, \u00270\u0027, \u00278\u0027, \u00271.1.1.1\u0027, \u00272.2.2.2\u0027,"},{"line_number":130,"context_line":"                                \u00271234\u0027, [])"},{"line_number":131,"context_line":"        expected_sg_tcp_filter \u003d (4, \u0027tcp\u0027, \u00271\u0027, \u002710\u0027, \u00271.1.1.1\u0027, \u00272.2.2.2\u0027,"},{"line_number":132,"context_line":"                                  [])"},{"line_number":133,"context_line":"        expected_sg_udp_filter \u003d (4, \u0027udp\u0027, \u002710\u0027, \u002720\u0027, \u00271.1.1.1\u0027,"}],"source_content_type":"text/x-python","patch_set":35,"id":"3fa0c359_37e7f414","line":130,"range":{"start_line":130,"start_character":32,"end_line":130,"end_character":43},"updated":"2018-02-22 14:34:54.000000000","message":"nit: can\u0027t it be moved to line above?","commit_id":"05f949b355eea56cbb0f0b474b3e3725a5154999"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"90cf8ea7cfa3055becec50ccffe62b1fc56ca97d","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        #        \u0027source_ip_prefix\u0027, \u0027dest_ip_prefix\u0027)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        expected_icmp_filter \u003d (4, \u0027icmp\u0027, \u00270\u0027, \u00278\u0027, \u00271.1.1.1\u0027, \u00272.2.2.2\u0027,"},{"line_number":130,"context_line":"                                \u00271234\u0027, [])"},{"line_number":131,"context_line":"        expected_sg_tcp_filter \u003d (4, \u0027tcp\u0027, \u00271\u0027, \u002710\u0027, \u00271.1.1.1\u0027, \u00272.2.2.2\u0027,"},{"line_number":132,"context_line":"                                  [])"},{"line_number":133,"context_line":"        expected_sg_udp_filter \u003d (4, \u0027udp\u0027, \u002710\u0027, \u002720\u0027, \u00271.1.1.1\u0027,"}],"source_content_type":"text/x-python","patch_set":35,"id":"ff6b8bd7_ffdc9719","line":130,"range":{"start_line":130,"start_character":32,"end_line":130,"end_character":43},"in_reply_to":"3fa0c359_37e7f414","updated":"2018-03-06 18:35:11.000000000","message":"No, line too long","commit_id":"05f949b355eea56cbb0f0b474b3e3725a5154999"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"a6443abd06f8a016ee8d18465e45fee197c9836e","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        expected_icmp_filter \u003d (4, \u0027icmp\u0027, \u00270\u0027, \u00278\u0027, \u00271.1.1.1\u0027, \u00272.2.2.2\u0027,"},{"line_number":130,"context_line":"                                \u00271234\u0027, [])"},{"line_number":131,"context_line":"        expected_sg_tcp_filter \u003d (4, \u0027tcp\u0027, \u00271\u0027, \u002710\u0027, \u00271.1.1.1\u0027, \u00272.2.2.2\u0027,"},{"line_number":132,"context_line":"                                  [])"},{"line_number":133,"context_line":"        expected_sg_udp_filter \u003d (4, \u0027udp\u0027, \u002710\u0027, \u002720\u0027, \u00271.1.1.1\u0027,"},{"line_number":134,"context_line":"                                  \u00272.2.2.2\u0027, [])"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"3fa0c359_57e4000d","line":132,"range":{"start_line":132,"start_character":34,"end_line":132,"end_character":37},"updated":"2018-02-22 14:34:54.000000000","message":"ditto","commit_id":"05f949b355eea56cbb0f0b474b3e3725a5154999"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"90cf8ea7cfa3055becec50ccffe62b1fc56ca97d","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        expected_icmp_filter \u003d (4, \u0027icmp\u0027, \u00270\u0027, \u00278\u0027, \u00271.1.1.1\u0027, \u00272.2.2.2\u0027,"},{"line_number":130,"context_line":"                                \u00271234\u0027, [])"},{"line_number":131,"context_line":"        expected_sg_tcp_filter \u003d (4, \u0027tcp\u0027, \u00271\u0027, \u002710\u0027, \u00271.1.1.1\u0027, \u00272.2.2.2\u0027,"},{"line_number":132,"context_line":"                                  [])"},{"line_number":133,"context_line":"        expected_sg_udp_filter \u003d (4, \u0027udp\u0027, \u002710\u0027, \u002720\u0027, \u00271.1.1.1\u0027,"},{"line_number":134,"context_line":"                                  \u00272.2.2.2\u0027, [])"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"ff6b8bd7_bfe61fe8","line":132,"range":{"start_line":132,"start_character":34,"end_line":132,"end_character":37},"in_reply_to":"3fa0c359_57e4000d","updated":"2018-03-06 18:35:11.000000000","message":"line too long","commit_id":"05f949b355eea56cbb0f0b474b3e3725a5154999"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"a6443abd06f8a016ee8d18465e45fee197c9836e","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        # (\u0027ethertype\u0027, \u0027protocol\u0027, \u0027port_range_min\u0027, \u0027port_range_max\u0027,"},{"line_number":127,"context_line":"        #        \u0027source_ip_prefix\u0027, \u0027dest_ip_prefix\u0027)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        expected_icmp_filter \u003d (4, \u0027icmp\u0027, \u00270\u0027, \u00278\u0027, \u00271.1.1.1\u0027, \u00272.2.2.2\u0027,"},{"line_number":130,"context_line":"                                \u00271234\u0027, [])"},{"line_number":131,"context_line":"        expected_sg_tcp_filter \u003d (4, \u0027tcp\u0027, \u00271\u0027, \u002710\u0027, \u00271.1.1.1\u0027, \u00272.2.2.2\u0027,"},{"line_number":132,"context_line":"                                  [])"},{"line_number":133,"context_line":"        expected_sg_udp_filter \u003d (4, \u0027udp\u0027, \u002710\u0027, \u002720\u0027, \u00271.1.1.1\u0027,"},{"line_number":134,"context_line":"                                  \u00272.2.2.2\u0027, [])"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        actual_icmp_filter \u003d self.conntrack_driver._get_filter_from_rule("},{"line_number":137,"context_line":"            sg_rule_icmp)"}],"source_content_type":"text/x-python","patch_set":35,"id":"3fa0c359_17c3d858","line":134,"range":{"start_line":129,"start_character":8,"end_line":134,"end_character":48},"updated":"2018-02-22 14:34:54.000000000","message":"data in those tuples  doesn\u0027t match filter_format described in comment above. Why?","commit_id":"05f949b355eea56cbb0f0b474b3e3725a5154999"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"a6443abd06f8a016ee8d18465e45fee197c9836e","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        expected_sg_tcp_filter \u003d (4, \u0027tcp\u0027, \u00271\u0027, \u002710\u0027, \u00271.1.1.1\u0027, \u00272.2.2.2\u0027,"},{"line_number":132,"context_line":"                                  [])"},{"line_number":133,"context_line":"        expected_sg_udp_filter \u003d (4, \u0027udp\u0027, \u002710\u0027, \u002720\u0027, \u00271.1.1.1\u0027,"},{"line_number":134,"context_line":"                                  \u00272.2.2.2\u0027, [])"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        actual_icmp_filter \u003d self.conntrack_driver._get_filter_from_rule("},{"line_number":137,"context_line":"            sg_rule_icmp)"}],"source_content_type":"text/x-python","patch_set":35,"id":"3fa0c359_f7ec2cf5","line":134,"range":{"start_line":134,"start_character":34,"end_line":134,"end_character":48},"updated":"2018-02-22 14:34:54.000000000","message":"ditto","commit_id":"05f949b355eea56cbb0f0b474b3e3725a5154999"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"90cf8ea7cfa3055becec50ccffe62b1fc56ca97d","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        # (\u0027ethertype\u0027, \u0027protocol\u0027, \u0027port_range_min\u0027, \u0027port_range_max\u0027,"},{"line_number":127,"context_line":"        #        \u0027source_ip_prefix\u0027, \u0027dest_ip_prefix\u0027)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        expected_icmp_filter \u003d (4, \u0027icmp\u0027, \u00270\u0027, \u00278\u0027, \u00271.1.1.1\u0027, \u00272.2.2.2\u0027,"},{"line_number":130,"context_line":"                                \u00271234\u0027, [])"},{"line_number":131,"context_line":"        expected_sg_tcp_filter \u003d (4, \u0027tcp\u0027, \u00271\u0027, \u002710\u0027, \u00271.1.1.1\u0027, \u00272.2.2.2\u0027,"},{"line_number":132,"context_line":"                                  [])"},{"line_number":133,"context_line":"        expected_sg_udp_filter \u003d (4, \u0027udp\u0027, \u002710\u0027, \u002720\u0027, \u00271.1.1.1\u0027,"},{"line_number":134,"context_line":"                                  \u00272.2.2.2\u0027, [])"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        actual_icmp_filter \u003d self.conntrack_driver._get_filter_from_rule("},{"line_number":137,"context_line":"            sg_rule_icmp)"}],"source_content_type":"text/x-python","patch_set":35,"id":"ff6b8bd7_7fdac7e9","line":134,"range":{"start_line":129,"start_character":8,"end_line":134,"end_character":48},"in_reply_to":"3fa0c359_17c3d858","updated":"2018-03-06 18:35:11.000000000","message":"The missing item is \u0027zone\u0027, but it\u0027s not given so [] is returned in it\u0027s place.","commit_id":"05f949b355eea56cbb0f0b474b3e3725a5154999"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"90cf8ea7cfa3055becec50ccffe62b1fc56ca97d","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        expected_sg_tcp_filter \u003d (4, \u0027tcp\u0027, \u00271\u0027, \u002710\u0027, \u00271.1.1.1\u0027, \u00272.2.2.2\u0027,"},{"line_number":132,"context_line":"                                  [])"},{"line_number":133,"context_line":"        expected_sg_udp_filter \u003d (4, \u0027udp\u0027, \u002710\u0027, \u002720\u0027, \u00271.1.1.1\u0027,"},{"line_number":134,"context_line":"                                  \u00272.2.2.2\u0027, [])"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        actual_icmp_filter \u003d self.conntrack_driver._get_filter_from_rule("},{"line_number":137,"context_line":"            sg_rule_icmp)"}],"source_content_type":"text/x-python","patch_set":35,"id":"ff6b8bd7_7fd087f8","line":134,"range":{"start_line":134,"start_character":34,"end_line":134,"end_character":48},"in_reply_to":"3fa0c359_f7ec2cf5","updated":"2018-03-06 18:35:11.000000000","message":"line too long","commit_id":"05f949b355eea56cbb0f0b474b3e3725a5154999"}],"neutron/tests/unit/agent/test_securitygroups_rpc.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"a6443abd06f8a016ee8d18465e45fee197c9836e","unresolved":false,"context_lines":[{"line_number":2308,"context_line":"        set_firewall_driver(self.FIREWALL_DRIVER)"},{"line_number":2309,"context_line":"        cfg.CONF.set_override(\u0027enable_ipset\u0027, False, group\u003d\u0027SECURITYGROUP\u0027)"},{"line_number":2310,"context_line":"        cfg.CONF.set_override(\u0027comment_iptables_rules\u0027, False, group\u003d\u0027AGENT\u0027)"},{"line_number":2311,"context_line":""},{"line_number":2312,"context_line":"        self.utils_exec \u003d mock.patch("},{"line_number":2313,"context_line":"            \u0027neutron.agent.linux.utils.execute\u0027).start()"},{"line_number":2314,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"3fa0c359_5792c058","side":"PARENT","line":2311,"updated":"2018-02-22 14:34:54.000000000","message":"unrelated change?","commit_id":"6b3ae884dc07f34f117850dba61e1f2fe3633a16"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"90cf8ea7cfa3055becec50ccffe62b1fc56ca97d","unresolved":false,"context_lines":[{"line_number":2308,"context_line":"        set_firewall_driver(self.FIREWALL_DRIVER)"},{"line_number":2309,"context_line":"        cfg.CONF.set_override(\u0027enable_ipset\u0027, False, group\u003d\u0027SECURITYGROUP\u0027)"},{"line_number":2310,"context_line":"        cfg.CONF.set_override(\u0027comment_iptables_rules\u0027, False, group\u003d\u0027AGENT\u0027)"},{"line_number":2311,"context_line":""},{"line_number":2312,"context_line":"        self.utils_exec \u003d mock.patch("},{"line_number":2313,"context_line":"            \u0027neutron.agent.linux.utils.execute\u0027).start()"},{"line_number":2314,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"ff6b8bd7_5fe1039a","side":"PARENT","line":2311,"in_reply_to":"3fa0c359_5792c058","updated":"2018-03-06 18:35:11.000000000","message":"Done","commit_id":"6b3ae884dc07f34f117850dba61e1f2fe3633a16"}]}
