)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"6511c125e2b26b89cb1478205a8fd82c0987c53d","unresolved":false,"context_lines":[{"line_number":20,"context_line":"    This commit is based greatly on an original, now abandoned patch,"},{"line_number":21,"context_line":"    presented for review here:"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"        https://review.openstack.org/#/c/70067/"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Full spec can be found here: https://review.openstack.org/#/c/129090/"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"7a016987_ab1d9863","line":23,"updated":"2015-05-29 04:57:28.000000000","message":"Juergen, I\u0027m showing the above as a 404... can you check to see if you might have made a mistake on the original patch number?","commit_id":"037073465efb2eb0b0872f9de9b9e5216e7ef0c7"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"dd06ff856b10458818ad72c086ae4f40b4842759","unresolved":false,"context_lines":[{"line_number":20,"context_line":"    This commit is based greatly on an original, now abandoned patch,"},{"line_number":21,"context_line":"    presented for review here:"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"        https://review.openstack.org/#/c/70067/"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Full spec can be found here: https://review.openstack.org/#/c/129090/"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"7a016987_373210a8","line":23,"in_reply_to":"7a016987_11ea8474","updated":"2015-05-29 19:47:12.000000000","message":"it should be a draft ... readable by the happy fews","commit_id":"037073465efb2eb0b0872f9de9b9e5216e7ef0c7"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"3be106ce53fc38008fe27769d39c553c300ef6d2","unresolved":false,"context_lines":[{"line_number":20,"context_line":"    This commit is based greatly on an original, now abandoned patch,"},{"line_number":21,"context_line":"    presented for review here:"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"        https://review.openstack.org/#/c/70067/"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Full spec can be found here: https://review.openstack.org/#/c/129090/"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"7a016987_ce7d776e","line":23,"in_reply_to":"7a016987_ab1d9863","updated":"2015-05-29 12:15:42.000000000","message":"It\u0027s a permissions thing. Some people can see it, some can\u0027t. (I cannot.)","commit_id":"037073465efb2eb0b0872f9de9b9e5216e7ef0c7"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a79feba0756271c9ad34652d905b19b5e0494770","unresolved":false,"context_lines":[{"line_number":20,"context_line":"    This commit is based greatly on an original, now abandoned patch,"},{"line_number":21,"context_line":"    presented for review here:"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"        https://review.openstack.org/#/c/70067/"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Full spec can be found here: https://review.openstack.org/#/c/129090/"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"7a016987_11ea8474","line":23,"in_reply_to":"7a016987_ce7d776e","updated":"2015-05-29 18:59:24.000000000","message":"Hmmm, weird... is there something about that patch that is different from others?","commit_id":"037073465efb2eb0b0872f9de9b9e5216e7ef0c7"}],"neutron/agent/linux/ebtables_manager.py":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"37628a2d1dcaf6bbc3472afe5582a465c1be2e9d","unresolved":false,"context_lines":[{"line_number":264,"context_line":""},{"line_number":265,"context_line":"    def __init__(self, root_helper\u003dNone, namespace\u003dNone,"},{"line_number":266,"context_line":"                 prefix_chain\u003dNone, _execute\u003dNone):"},{"line_number":267,"context_line":"        if _execute:"},{"line_number":268,"context_line":"            self.execute \u003d _execute"},{"line_number":269,"context_line":"        else:"},{"line_number":270,"context_line":"            self.execute \u003d linux_utils.execute"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_68b71187","line":267,"updated":"2015-02-23 13:24:22.000000000","message":"Could you clarify when _execute could/will be provided?","commit_id":"4a7f59fa941ec6834a2d7110f4247a6dd232f983"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"90bd2cb2549033b7b0fc4b90626e8abc83914768","unresolved":false,"context_lines":[{"line_number":264,"context_line":""},{"line_number":265,"context_line":"    def __init__(self, root_helper\u003dNone, namespace\u003dNone,"},{"line_number":266,"context_line":"                 prefix_chain\u003dNone, _execute\u003dNone):"},{"line_number":267,"context_line":"        if _execute:"},{"line_number":268,"context_line":"            self.execute \u003d _execute"},{"line_number":269,"context_line":"        else:"},{"line_number":270,"context_line":"            self.execute \u003d linux_utils.execute"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_0f57f402","line":267,"in_reply_to":"ba7be1f8_68b71187","updated":"2015-02-26 01:49:36.000000000","message":"Done","commit_id":"4a7f59fa941ec6834a2d7110f4247a6dd232f983"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"37628a2d1dcaf6bbc3472afe5582a465c1be2e9d","unresolved":false,"context_lines":[{"line_number":367,"context_line":"        line \u003d line.strip()"},{"line_number":368,"context_line":"        return line"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"    def _weed_out_duplicate_chains(self, line, seen_chains):"},{"line_number":371,"context_line":"        # ignore [packet:byte] counts at end of lines"},{"line_number":372,"context_line":"        if line.startswith(\u0027:\u0027):"},{"line_number":373,"context_line":"            line \u003d self._strip_packets_bytes(line)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_686e3103","line":370,"updated":"2015-02-23 13:24:22.000000000","message":"we should avoid method using side effects (ie: seen_chains is updated by the method) or at least documents it","commit_id":"4a7f59fa941ec6834a2d7110f4247a6dd232f983"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"90bd2cb2549033b7b0fc4b90626e8abc83914768","unresolved":false,"context_lines":[{"line_number":367,"context_line":"        line \u003d line.strip()"},{"line_number":368,"context_line":"        return line"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"    def _weed_out_duplicate_chains(self, line, seen_chains):"},{"line_number":371,"context_line":"        # ignore [packet:byte] counts at end of lines"},{"line_number":372,"context_line":"        if line.startswith(\u0027:\u0027):"},{"line_number":373,"context_line":"            line \u003d self._strip_packets_bytes(line)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_cf507c0d","line":370,"in_reply_to":"ba7be1f8_686e3103","updated":"2015-02-26 01:49:36.000000000","message":"Done","commit_id":"4a7f59fa941ec6834a2d7110f4247a6dd232f983"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"37628a2d1dcaf6bbc3472afe5582a465c1be2e9d","unresolved":false,"context_lines":[{"line_number":379,"context_line":"        # Leave it alone"},{"line_number":380,"context_line":"        return True"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    def _weed_out_duplicate_rules(self, line, seen_rules):"},{"line_number":383,"context_line":"        if line.startswith(\u0027[\u0027):"},{"line_number":384,"context_line":"            line \u003d self._strip_packets_bytes(line)"},{"line_number":385,"context_line":"            if line in seen_rules:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_c872bde2","line":382,"updated":"2015-02-23 13:24:22.000000000","message":"itto","commit_id":"4a7f59fa941ec6834a2d7110f4247a6dd232f983"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"90bd2cb2549033b7b0fc4b90626e8abc83914768","unresolved":false,"context_lines":[{"line_number":379,"context_line":"        # Leave it alone"},{"line_number":380,"context_line":"        return True"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    def _weed_out_duplicate_rules(self, line, seen_rules):"},{"line_number":383,"context_line":"        if line.startswith(\u0027[\u0027):"},{"line_number":384,"context_line":"            line \u003d self._strip_packets_bytes(line)"},{"line_number":385,"context_line":"            if line in seen_rules:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_af2ee889","line":382,"in_reply_to":"ba7be1f8_c872bde2","updated":"2015-02-26 01:49:36.000000000","message":"Done","commit_id":"4a7f59fa941ec6834a2d7110f4247a6dd232f983"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"37628a2d1dcaf6bbc3472afe5582a465c1be2e9d","unresolved":false,"context_lines":[{"line_number":409,"context_line":"        # Leave it alone"},{"line_number":410,"context_line":"        return True"},{"line_number":411,"context_line":""},{"line_number":412,"context_line":"    def _modify_rules(self, current_lines, table, table_name):"},{"line_number":413,"context_line":"        unwrapped_chains \u003d table.unwrapped_chains"},{"line_number":414,"context_line":"        chains \u003d table.chains"},{"line_number":415,"context_line":"        remove_chains \u003d table.remove_chains"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_8848c588","line":412,"updated":"2015-02-23 13:24:22.000000000","message":"the method is too long (100+ lines)","commit_id":"4a7f59fa941ec6834a2d7110f4247a6dd232f983"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"90bd2cb2549033b7b0fc4b90626e8abc83914768","unresolved":false,"context_lines":[{"line_number":409,"context_line":"        # Leave it alone"},{"line_number":410,"context_line":"        return True"},{"line_number":411,"context_line":""},{"line_number":412,"context_line":"    def _modify_rules(self, current_lines, table, table_name):"},{"line_number":413,"context_line":"        unwrapped_chains \u003d table.unwrapped_chains"},{"line_number":414,"context_line":"        chains \u003d table.chains"},{"line_number":415,"context_line":"        remove_chains \u003d table.remove_chains"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_8f33e4f4","line":412,"in_reply_to":"ba7be1f8_8848c588","updated":"2015-02-26 01:49:36.000000000","message":"Done","commit_id":"4a7f59fa941ec6834a2d7110f4247a6dd232f983"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"37628a2d1dcaf6bbc3472afe5582a465c1be2e9d","unresolved":false,"context_lines":[{"line_number":555,"context_line":"                if not line:"},{"line_number":556,"context_line":"                    break"},{"line_number":557,"context_line":"                data \u003d line.split()"},{"line_number":558,"context_line":"                if (len(data) \u003c 7 or"},{"line_number":559,"context_line":"                        not data[-1].isdigit() or"},{"line_number":560,"context_line":"                        not data[-5].isdigit()):"},{"line_number":561,"context_line":"                    break"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_0802150b","line":558,"updated":"2015-02-23 13:24:22.000000000","message":"an example/pattern would be great","commit_id":"4a7f59fa941ec6834a2d7110f4247a6dd232f983"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"90bd2cb2549033b7b0fc4b90626e8abc83914768","unresolved":false,"context_lines":[{"line_number":555,"context_line":"                if not line:"},{"line_number":556,"context_line":"                    break"},{"line_number":557,"context_line":"                data \u003d line.split()"},{"line_number":558,"context_line":"                if (len(data) \u003c 7 or"},{"line_number":559,"context_line":"                        not data[-1].isdigit() or"},{"line_number":560,"context_line":"                        not data[-5].isdigit()):"},{"line_number":561,"context_line":"                    break"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_6f3870d3","line":558,"in_reply_to":"ba7be1f8_0802150b","updated":"2015-02-26 01:49:36.000000000","message":"Done","commit_id":"4a7f59fa941ec6834a2d7110f4247a6dd232f983"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"76ca1c93b5c787313ef55948e71a616539abb14e","unresolved":false,"context_lines":[{"line_number":262,"context_line":"    \"\"\""},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def __init__(self, root_helper\u003dNone, namespace\u003dNone,"},{"line_number":265,"context_line":"                 prefix_chain\u003dNone, _execute\u003dNone):"},{"line_number":266,"context_line":"        if _execute:"},{"line_number":267,"context_line":"            # Execute may be passed-in for certain test cases, when we do not"},{"line_number":268,"context_line":"            # really wish to execute a command line utility."}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_6acecc2e","line":265,"updated":"2015-03-03 17:11:39.000000000","message":"do you have any reason for the prepending underscore?","commit_id":"7456a4d44d4ea4c8a067e66534f5d4e1250dd3da"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"a481541d547b3678465d21122312f57b65bb0e7b","unresolved":false,"context_lines":[{"line_number":262,"context_line":"    \"\"\""},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def __init__(self, root_helper\u003dNone, namespace\u003dNone,"},{"line_number":265,"context_line":"                 prefix_chain\u003dNone, _execute\u003dNone):"},{"line_number":266,"context_line":"        if _execute:"},{"line_number":267,"context_line":"            # Execute may be passed-in for certain test cases, when we do not"},{"line_number":268,"context_line":"            # really wish to execute a command line utility."}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_223948f2","line":265,"in_reply_to":"ba7be1f8_6acecc2e","updated":"2015-03-20 01:43:58.000000000","message":"Done","commit_id":"7456a4d44d4ea4c8a067e66534f5d4e1250dd3da"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"c89310d24a9b3d835184fd05da7fa96c7dd8baf1","unresolved":false,"context_lines":[{"line_number":264,"context_line":"    def __init__(self, root_helper\u003dNone, namespace\u003dNone,"},{"line_number":265,"context_line":"                 prefix_chain\u003dNone, _execute\u003dNone):"},{"line_number":266,"context_line":"        if _execute:"},{"line_number":267,"context_line":"            # Execute may be passed-in for certain test cases, when we do not"},{"line_number":268,"context_line":"            # really wish to execute a command line utility."},{"line_number":269,"context_line":"            self.execute \u003d _execute"},{"line_number":270,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_56883c22","line":267,"updated":"2015-02-28 00:33:36.000000000","message":"prefer to mock linux_utils.execute","commit_id":"7456a4d44d4ea4c8a067e66534f5d4e1250dd3da"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"a481541d547b3678465d21122312f57b65bb0e7b","unresolved":false,"context_lines":[{"line_number":264,"context_line":"    def __init__(self, root_helper\u003dNone, namespace\u003dNone,"},{"line_number":265,"context_line":"                 prefix_chain\u003dNone, _execute\u003dNone):"},{"line_number":266,"context_line":"        if _execute:"},{"line_number":267,"context_line":"            # Execute may be passed-in for certain test cases, when we do not"},{"line_number":268,"context_line":"            # really wish to execute a command line utility."},{"line_number":269,"context_line":"            self.execute \u003d _execute"},{"line_number":270,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_423c7ce1","line":267,"in_reply_to":"ba7be1f8_56883c22","updated":"2015-03-20 01:43:58.000000000","message":"Done","commit_id":"7456a4d44d4ea4c8a067e66534f5d4e1250dd3da"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"76ca1c93b5c787313ef55948e71a616539abb14e","unresolved":false,"context_lines":[{"line_number":270,"context_line":"        else:"},{"line_number":271,"context_line":"            self.execute \u003d linux_utils.execute"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"        self.iptables_apply_deferred \u003d False"},{"line_number":274,"context_line":"        self.root_helper \u003d root_helper"},{"line_number":275,"context_line":"        self.namespace \u003d namespace"},{"line_number":276,"context_line":"        self.prefix_chain \u003d _get_prefix_chain(prefix_chain)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_0af6305d","line":273,"updated":"2015-03-03 17:11:39.000000000","message":"you could have made an effort and call this attributed ebtables_apply_deferred!","commit_id":"7456a4d44d4ea4c8a067e66534f5d4e1250dd3da"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"a481541d547b3678465d21122312f57b65bb0e7b","unresolved":false,"context_lines":[{"line_number":270,"context_line":"        else:"},{"line_number":271,"context_line":"            self.execute \u003d linux_utils.execute"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"        self.iptables_apply_deferred \u003d False"},{"line_number":274,"context_line":"        self.root_helper \u003d root_helper"},{"line_number":275,"context_line":"        self.namespace \u003d namespace"},{"line_number":276,"context_line":"        self.prefix_chain \u003d _get_prefix_chain(prefix_chain)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_22106858","line":273,"in_reply_to":"ba7be1f8_0af6305d","updated":"2015-03-20 01:43:58.000000000","message":"Done","commit_id":"7456a4d44d4ea4c8a067e66534f5d4e1250dd3da"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"76ca1c93b5c787313ef55948e71a616539abb14e","unresolved":false,"context_lines":[{"line_number":302,"context_line":""},{"line_number":303,"context_line":"    def defer_apply_off(self):"},{"line_number":304,"context_line":"        self.iptables_apply_deferred \u003d False"},{"line_number":305,"context_line":"        self._apply()"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"    def apply(self):"},{"line_number":308,"context_line":"        if self.iptables_apply_deferred:"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_ec84950c","line":305,"updated":"2015-03-03 17:11:39.000000000","message":"it sounds like we have some boilerplate code shared with iptables manager. Did someone already ask you about reducing code duplication?","commit_id":"7456a4d44d4ea4c8a067e66534f5d4e1250dd3da"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"7e55d3eb538633892f8c82a6b2ea96594de9fe96","unresolved":false,"context_lines":[{"line_number":302,"context_line":""},{"line_number":303,"context_line":"    def defer_apply_off(self):"},{"line_number":304,"context_line":"        self.iptables_apply_deferred \u003d False"},{"line_number":305,"context_line":"        self._apply()"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"    def apply(self):"},{"line_number":308,"context_line":"        if self.iptables_apply_deferred:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_d3a20199","line":305,"in_reply_to":"9a80dd14_1489da74","updated":"2015-03-19 23:34:18.000000000","message":"Hello! Sorry for the long delay in my response, I must have missed your question. Please see Maru\u0027s comment from the 6th of September in https://review.openstack.org/#/c/119343/. That\u0027s where he explains his concern about invasive changes to iptables code.","commit_id":"7456a4d44d4ea4c8a067e66534f5d4e1250dd3da"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"9788aa8bf03fefac3a68f411ab4a317d2f24dc1e","unresolved":false,"context_lines":[{"line_number":302,"context_line":""},{"line_number":303,"context_line":"    def defer_apply_off(self):"},{"line_number":304,"context_line":"        self.iptables_apply_deferred \u003d False"},{"line_number":305,"context_line":"        self._apply()"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"    def apply(self):"},{"line_number":308,"context_line":"        if self.iptables_apply_deferred:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_1489da74","line":305,"in_reply_to":"9a80dd14_38d111fc","updated":"2015-03-09 12:11:09.000000000","message":"thanks for the explanation. Can you refer me to the people with whom you had such discussion? I would like how they weighted the tradeoff between code duplication and wasteful refactoring.","commit_id":"7456a4d44d4ea4c8a067e66534f5d4e1250dd3da"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"d526378d3f382afddecb8597a31168c4582a2c63","unresolved":false,"context_lines":[{"line_number":302,"context_line":""},{"line_number":303,"context_line":"    def defer_apply_off(self):"},{"line_number":304,"context_line":"        self.iptables_apply_deferred \u003d False"},{"line_number":305,"context_line":"        self._apply()"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"    def apply(self):"},{"line_number":308,"context_line":"        if self.iptables_apply_deferred:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_38d111fc","line":305,"in_reply_to":"ba7be1f8_ec84950c","updated":"2015-03-04 21:40:33.000000000","message":"Yes, this was suggested before and I even implemented a base_manager class ( https://review.openstack.org/#/c/119343/ ). However, it was ultimately rejected, since it was felt that the iptables code is already fragile enough and shouldn\u0027t be changed right now since it might be due for a re-write anyway. It was agreed that some code duplication between the iptables- and ebtables-manager would therefore be acceptable for the time being.","commit_id":"7456a4d44d4ea4c8a067e66534f5d4e1250dd3da"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"76ca1c93b5c787313ef55948e71a616539abb14e","unresolved":false,"context_lines":[{"line_number":310,"context_line":""},{"line_number":311,"context_line":"        self._apply()"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"    def _apply(self):"},{"line_number":314,"context_line":"        \"\"\"Apply the current in-memory set of ebtables rules."},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"        This will blow away any rules left over from previous runs of the"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_4cc1212e","line":313,"updated":"2015-03-03 17:11:39.000000000","message":"just like for iptables I guess we can guarantee that there won\u0027t be concurrent threads or processes calling this method on a given host, is that correct?","commit_id":"7456a4d44d4ea4c8a067e66534f5d4e1250dd3da"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"a481541d547b3678465d21122312f57b65bb0e7b","unresolved":false,"context_lines":[{"line_number":310,"context_line":""},{"line_number":311,"context_line":"        self._apply()"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"    def _apply(self):"},{"line_number":314,"context_line":"        \"\"\"Apply the current in-memory set of ebtables rules."},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"        This will blow away any rules left over from previous runs of the"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_25079219","line":313,"in_reply_to":"ba7be1f8_4cc1212e","updated":"2015-03-20 01:43:58.000000000","message":"This code is only called from within the iptables code, which - as you pointed out - already provides this guarantee.","commit_id":"7456a4d44d4ea4c8a067e66534f5d4e1250dd3da"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"76ca1c93b5c787313ef55948e71a616539abb14e","unresolved":false,"context_lines":[{"line_number":368,"context_line":"        line \u003d line.strip()"},{"line_number":369,"context_line":"        return line"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"    def _weed_out_duplicate_chains(self, line, seen_chains):"},{"line_number":372,"context_line":"        \"\"\"Adding entry to seen_chains list."},{"line_number":373,"context_line":""},{"line_number":374,"context_line":"        Return True or False depending on whether the line is already in the"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_6c1a65c7","line":371,"updated":"2015-03-03 17:11:39.000000000","message":"this is another duplicate method, for instance","commit_id":"7456a4d44d4ea4c8a067e66534f5d4e1250dd3da"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"76ca1c93b5c787313ef55948e71a616539abb14e","unresolved":false,"context_lines":[{"line_number":479,"context_line":"                dup \u003d dup_filter[-1]"},{"line_number":480,"context_line":"                rule_str \u003d str(dup).strip()"},{"line_number":481,"context_line":"                # backup one index so we write the array correctly"},{"line_number":482,"context_line":"                #rules_index -\u003d 1"},{"line_number":483,"context_line":"            else:"},{"line_number":484,"context_line":"                # add-on the [packet:bytes]"},{"line_number":485,"context_line":"                rule_str \u003d \u0027[0:0] \u0027 + rule_str"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_0f5f1b42","line":482,"updated":"2015-03-03 17:11:39.000000000","message":"should this be commented out?","commit_id":"7456a4d44d4ea4c8a067e66534f5d4e1250dd3da"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"a481541d547b3678465d21122312f57b65bb0e7b","unresolved":false,"context_lines":[{"line_number":479,"context_line":"                dup \u003d dup_filter[-1]"},{"line_number":480,"context_line":"                rule_str \u003d str(dup).strip()"},{"line_number":481,"context_line":"                # backup one index so we write the array correctly"},{"line_number":482,"context_line":"                #rules_index -\u003d 1"},{"line_number":483,"context_line":"            else:"},{"line_number":484,"context_line":"                # add-on the [packet:bytes]"},{"line_number":485,"context_line":"                rule_str \u003d \u0027[0:0] \u0027 + rule_str"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_850f5e2d","line":482,"in_reply_to":"ba7be1f8_0f5f1b42","updated":"2015-03-20 01:43:58.000000000","message":"Done","commit_id":"7456a4d44d4ea4c8a067e66534f5d4e1250dd3da"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"76ca1c93b5c787313ef55948e71a616539abb14e","unresolved":false,"context_lines":[{"line_number":482,"context_line":"                #rules_index -\u003d 1"},{"line_number":483,"context_line":"            else:"},{"line_number":484,"context_line":"                # add-on the [packet:bytes]"},{"line_number":485,"context_line":"                rule_str \u003d \u0027[0:0] \u0027 + rule_str"},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"            if rule.top:"},{"line_number":488,"context_line":"                # rule.top \u003d\u003d True means we want this rule to be at the top."}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_cf418364","line":485,"updated":"2015-03-03 17:11:39.000000000","message":"super nit : \u0027[0:0] %s\u0027 % rule_str\n\nthe only reason for that would be code style consistency, I\u0027m not sure there\u0027s any performance difference","commit_id":"7456a4d44d4ea4c8a067e66534f5d4e1250dd3da"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"a481541d547b3678465d21122312f57b65bb0e7b","unresolved":false,"context_lines":[{"line_number":482,"context_line":"                #rules_index -\u003d 1"},{"line_number":483,"context_line":"            else:"},{"line_number":484,"context_line":"                # add-on the [packet:bytes]"},{"line_number":485,"context_line":"                rule_str \u003d \u0027[0:0] \u0027 + rule_str"},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"            if rule.top:"},{"line_number":488,"context_line":"                # rule.top \u003d\u003d True means we want this rule to be at the top."}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_052b6e82","line":485,"in_reply_to":"ba7be1f8_cf418364","updated":"2015-03-20 01:43:58.000000000","message":"Done","commit_id":"7456a4d44d4ea4c8a067e66534f5d4e1250dd3da"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"c89310d24a9b3d835184fd05da7fa96c7dd8baf1","unresolved":false,"context_lines":[{"line_number":486,"context_line":""},{"line_number":487,"context_line":"            if rule.top:"},{"line_number":488,"context_line":"                # rule.top \u003d\u003d True means we want this rule to be at the top."},{"line_number":489,"context_line":"                our_rules +\u003d [rule_str]"},{"line_number":490,"context_line":"            else:"},{"line_number":491,"context_line":"                bot_rules +\u003d [rule_str]"},{"line_number":492,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_f6c4d042","line":489,"updated":"2015-02-28 00:33:36.000000000","message":"you can use our_rules.append(...)","commit_id":"7456a4d44d4ea4c8a067e66534f5d4e1250dd3da"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"a481541d547b3678465d21122312f57b65bb0e7b","unresolved":false,"context_lines":[{"line_number":486,"context_line":""},{"line_number":487,"context_line":"            if rule.top:"},{"line_number":488,"context_line":"                # rule.top \u003d\u003d True means we want this rule to be at the top."},{"line_number":489,"context_line":"                our_rules +\u003d [rule_str]"},{"line_number":490,"context_line":"            else:"},{"line_number":491,"context_line":"                bot_rules +\u003d [rule_str]"},{"line_number":492,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_a531c2ee","line":489,"in_reply_to":"ba7be1f8_f6c4d042","updated":"2015-03-20 01:43:58.000000000","message":"Done","commit_id":"7456a4d44d4ea4c8a067e66534f5d4e1250dd3da"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"c2d8c9acf5ce01c373834178175dc43637259701","unresolved":false,"context_lines":[{"line_number":241,"context_line":"            self.rules.remove(rule)"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"class EbtablesManager(object):"},{"line_number":245,"context_line":"    \"\"\"Wrapper for ebtables."},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"    A number of chains are set up to begin with."}],"source_content_type":"text/x-python","patch_set":7,"id":"5ad0253b_6dfcd03e","line":244,"updated":"2015-04-28 20:40:33.000000000","message":"Refactor Iptables/EbtablesManager to avoid code duplication","commit_id":"b94b26f41119b007a0931f839972335138d76259"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"ab554bb2262ea2f61c18fbb7f542cbf13c04c288","unresolved":false,"context_lines":[{"line_number":269,"context_line":"    def __init__(self, root_helper\u003dNone, namespace\u003dNone, prefix_chain\u003dNone):"},{"line_number":270,"context_line":"        self.execute \u003d linux_utils.execute"},{"line_number":271,"context_line":"        self.ebtables_apply_deferred \u003d False"},{"line_number":272,"context_line":"        self.root_helper \u003d root_helper"},{"line_number":273,"context_line":"        self.namespace \u003d namespace"},{"line_number":274,"context_line":"        self.prefix_chain \u003d _get_prefix_chain(prefix_chain)"},{"line_number":275,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7a016987_de6f50c2","line":272,"updated":"2015-05-30 01:48:36.000000000","message":"root_helper is never used?","commit_id":"037073465efb2eb0b0872f9de9b9e5216e7ef0c7"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"ab554bb2262ea2f61c18fbb7f542cbf13c04c288","unresolved":false,"context_lines":[{"line_number":282,"context_line":"        builtin_chains \u003d {\u0027filter\u0027: [\u0027INPUT\u0027, \u0027OUTPUT\u0027, \u0027FORWARD\u0027],"},{"line_number":283,"context_line":"                          \u0027nat\u0027: [\u0027PREROUTING\u0027, \u0027OUTPUT\u0027, \u0027POSTROUTING\u0027],"},{"line_number":284,"context_line":"                          \u0027broute\u0027: [\u0027BROUTING\u0027]}"},{"line_number":285,"context_line":"        for table, chains in builtin_chains.iteritems():"},{"line_number":286,"context_line":"            for chain in chains:"},{"line_number":287,"context_line":"                self._tables[table].add_chain(chain)"},{"line_number":288,"context_line":"                self._tables[table].add_rule(chain, \u0027-j $%s\u0027 % (chain),"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a016987_7e5f3c0f","line":285,"updated":"2015-05-30 01:48:36.000000000","message":"use .items() which supports py3K","commit_id":"037073465efb2eb0b0872f9de9b9e5216e7ef0c7"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"ab554bb2262ea2f61c18fbb7f542cbf13c04c288","unresolved":false,"context_lines":[{"line_number":295,"context_line":"    def get_table(self, table_name):"},{"line_number":296,"context_line":"        return self._tables[table_name]"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"    def defer_apply_on(self):"},{"line_number":299,"context_line":"        self.ebtables_apply_deferred \u003d True"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"    def defer_apply_off(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a016987_3e2d4446","line":298,"updated":"2015-05-30 01:48:36.000000000","message":"i would prefer you define a context:\n\n  with ebtables_manager.defer():\n     ....","commit_id":"037073465efb2eb0b0872f9de9b9e5216e7ef0c7"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"ab554bb2262ea2f61c18fbb7f542cbf13c04c288","unresolved":false,"context_lines":[{"line_number":450,"context_line":"                dup \u003d dup_filter[-1]"},{"line_number":451,"context_line":"                chain_str \u003d str(dup).strip()"},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"            our_chains +\u003d [chain_str]"},{"line_number":454,"context_line":""},{"line_number":455,"context_line":"        return our_chains, new_new_filter"},{"line_number":456,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7a016987_7eb61c3f","line":453,"updated":"2015-05-30 01:48:36.000000000","message":"prefer our_chains.append()","commit_id":"037073465efb2eb0b0872f9de9b9e5216e7ef0c7"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"ab554bb2262ea2f61c18fbb7f542cbf13c04c288","unresolved":false,"context_lines":[{"line_number":506,"context_line":"        # Fill new_filter with any chains or rules without our name in them."},{"line_number":507,"context_line":"        old_filter, new_filter \u003d [], []"},{"line_number":508,"context_line":"        for line in current_lines:"},{"line_number":509,"context_line":"            (old_filter if self.prefix_chain in line else"},{"line_number":510,"context_line":"             new_filter).append(line.strip())"},{"line_number":511,"context_line":""},{"line_number":512,"context_line":"        # TODO(jbrendel): ebtables permits to define a policy to an"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a016987_3e830458","line":509,"updated":"2015-05-30 01:48:36.000000000","message":"poorly readable","commit_id":"037073465efb2eb0b0872f9de9b9e5216e7ef0c7"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"ab554bb2262ea2f61c18fbb7f542cbf13c04c288","unresolved":false,"context_lines":[{"line_number":579,"context_line":"                args \u003d [\u0027ip\u0027, \u0027netns\u0027, \u0027exec\u0027, self.namespace] + args"},{"line_number":580,"context_line":"            current_table \u003d eb._cmd_retry(self.execute, args,"},{"line_number":581,"context_line":"                **{\"run_as_root\": True})"},{"line_number":582,"context_line":"            current_lines \u003d current_table.split(\u0027\\n\u0027)"},{"line_number":583,"context_line":""},{"line_number":584,"context_line":"            # Look for packet and byte counters in the output. The counters are"},{"line_number":585,"context_line":"            # at the end of the line, with a format like this:"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a016987_de7d106e","line":582,"updated":"2015-05-30 01:48:36.000000000","message":"splitlines() is safer","commit_id":"037073465efb2eb0b0872f9de9b9e5216e7ef0c7"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"ab554bb2262ea2f61c18fbb7f542cbf13c04c288","unresolved":false,"context_lines":[{"line_number":602,"context_line":""},{"line_number":603,"context_line":""},{"line_number":604,"context_line":"class EbtablesManagerTransaction(object):"},{"line_number":605,"context_line":"    __transactions \u003d {}"},{"line_number":606,"context_line":""},{"line_number":607,"context_line":"    def __init__(self, ebtables_manager):"},{"line_number":608,"context_line":"        self.ebtables_manager \u003d ebtables_manager"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a016987_1e64c8b6","line":605,"updated":"2015-05-30 01:48:36.000000000","message":"no need to define a private private attribute, using _transactions allows to check its content in UT","commit_id":"037073465efb2eb0b0872f9de9b9e5216e7ef0c7"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"ab554bb2262ea2f61c18fbb7f542cbf13c04c288","unresolved":false,"context_lines":[{"line_number":608,"context_line":"        self.ebtables_manager \u003d ebtables_manager"},{"line_number":609,"context_line":""},{"line_number":610,"context_line":"        transaction \u003d self.__transactions.get(ebtables_manager, 0)"},{"line_number":611,"context_line":"        transaction +\u003d 1"},{"line_number":612,"context_line":"        self.__transactions[ebtables_manager] \u003d transaction"},{"line_number":613,"context_line":""},{"line_number":614,"context_line":"    def __enter__(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a016987_5e66c0bb","line":611,"updated":"2015-05-30 01:48:36.000000000","message":"this logic should be in __enter__\n\nI am not convinced that __transactions management is thread-safe","commit_id":"037073465efb2eb0b0872f9de9b9e5216e7ef0c7"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"ab554bb2262ea2f61c18fbb7f542cbf13c04c288","unresolved":false,"context_lines":[{"line_number":617,"context_line":"    def __exit__(self, type, value, traceback):"},{"line_number":618,"context_line":"        transaction \u003d self.__transactions.get(self.ebtables_manager)"},{"line_number":619,"context_line":"        if transaction \u003d\u003d 1:"},{"line_number":620,"context_line":"            self.ebtables_manager.apply()"},{"line_number":621,"context_line":"            del self.__transactions[self.ebtables_manager]"},{"line_number":622,"context_line":"        else:"},{"line_number":623,"context_line":"            transaction -\u003d 1"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a016987_def4f0f1","line":620,"updated":"2015-05-30 01:48:36.000000000","message":"apply is called even if an error is raised (type!\u003d None) inside the context. It seems incorrect\n\nwhat if apply crashs?","commit_id":"037073465efb2eb0b0872f9de9b9e5216e7ef0c7"}]}
