)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"87a0197824cd3b8d45f5dddba6dbf751f0c58576","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"        https://review.openstack.org/#/c/70067/"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Full spec can be found here: https://review.openstack.org/#/c/129090/"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Change-Id: I3c66e92cbe8883dcad843ad243388def3a96dbe5"},{"line_number":29,"context_line":"Implements: blueprint arp-spoof-patch-ebtables"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ba7be1f8_4f311a59","line":26,"updated":"2015-03-03 15:33:15.000000000","message":"if you have multiple patches with the same commit message this can result rather confusing in git history... people will do git log and find the same commit message more than once","commit_id":"38685748d13589fb490dfeb0e43eb8454bb94108"}],"neutron/agent/linux/ebtables_manager.py":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"77e07ea3ac3166135a2f5102bbf7d4a6161376d3","unresolved":false,"context_lines":[{"line_number":26,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class ChainName(object):"},{"line_number":30,"context_line":"    \"\"\"Mixin to manage the prefix name and the chain name length in function of"},{"line_number":31,"context_line":"    the prefix name length."},{"line_number":32,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_1d9375fb","line":29,"updated":"2015-02-20 10:06:18.000000000","message":"ChainName methods can be defined at module level","commit_id":"8ad07f5908fef458668a24b9a43d2289ec21dda5"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"6ba7927be75baa3dc46a18ad57f3b2a9bdf7e4d1","unresolved":false,"context_lines":[{"line_number":26,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class ChainName(object):"},{"line_number":30,"context_line":"    \"\"\"Mixin to manage the prefix name and the chain name length in function of"},{"line_number":31,"context_line":"    the prefix name length."},{"line_number":32,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_42e14ccf","line":29,"in_reply_to":"ba7be1f8_04cdae5d","updated":"2015-02-23 11:55:23.000000000","message":"Because defining them in a class provides nothing (except confusion as EbtablesTable/Manager inherit ChainName)","commit_id":"8ad07f5908fef458668a24b9a43d2289ec21dda5"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"b32ea7e80bf29516b12d251d1eb34ed40a391833","unresolved":false,"context_lines":[{"line_number":26,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class ChainName(object):"},{"line_number":30,"context_line":"    \"\"\"Mixin to manage the prefix name and the chain name length in function of"},{"line_number":31,"context_line":"    the prefix name length."},{"line_number":32,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_04cdae5d","line":29,"in_reply_to":"ba7be1f8_1d9375fb","updated":"2015-02-23 00:55:13.000000000","message":"Yes, but why should they? For the user of these functions it seems more logical to have them part of the ChainName object, I think.","commit_id":"8ad07f5908fef458668a24b9a43d2289ec21dda5"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"87a0197824cd3b8d45f5dddba6dbf751f0c58576","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"ba7be1f8_8f85d2d0","updated":"2015-03-03 15:33:15.000000000","message":"This is really pedant... but if you have the chance consider moving this data models into their own module.\n\nOtherwise it does not matter.","commit_id":"38685748d13589fb490dfeb0e43eb8454bb94108"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"89235f786707a9f3d7d5acdf4c9ba8b2c197461f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"9a80dd14_5d095730","in_reply_to":"ba7be1f8_8f85d2d0","updated":"2015-03-04 22:23:56.000000000","message":"Isn\u0027t that more of a thing for ORM data models? I don\u0027t think that is necessary here.","commit_id":"38685748d13589fb490dfeb0e43eb8454bb94108"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"87a0197824cd3b8d45f5dddba6dbf751f0c58576","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":"#"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"\"\"\"Implement a manager for ebtables rules.\"\"\""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import inspect"},{"line_number":20,"context_line":"import os"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba7be1f8_0f71e20b","line":17,"updated":"2015-03-03 15:33:15.000000000","message":"You will do this in the next patch!\nJust kidding","commit_id":"38685748d13589fb490dfeb0e43eb8454bb94108"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"33e6b9700b3127b5c09c9fcfa39117556aa439ba","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"MAX_CHAIN_LEN_EBTABLES \u003d 31"},{"line_number":30,"context_line":"# NOTE(ethuleau): ebtables supports chain names of up to 31 characters, and"},{"line_number":31,"context_line":"#                 we add up to 12 characters to prefix_chain which is used"},{"line_number":32,"context_line":"#                 as a prefix, so we limit it to 19 characters."},{"line_number":33,"context_line":"MAX_LEN_PREFIX_CHAIN \u003d MAX_CHAIN_LEN_EBTABLES - len(\u0027-POSTROUTING\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba7be1f8_504a0484","line":30,"updated":"2015-02-27 23:26:19.000000000","message":"NOTE($you):\n\n:)","commit_id":"38685748d13589fb490dfeb0e43eb8454bb94108"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"de028068c2c13ff5da8f27aab6a4a157d53167c5","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"MAX_CHAIN_LEN_EBTABLES \u003d 31"},{"line_number":30,"context_line":"# NOTE(ethuleau): ebtables supports chain names of up to 31 characters, and"},{"line_number":31,"context_line":"#                 we add up to 12 characters to prefix_chain which is used"},{"line_number":32,"context_line":"#                 as a prefix, so we limit it to 19 characters."},{"line_number":33,"context_line":"MAX_LEN_PREFIX_CHAIN \u003d MAX_CHAIN_LEN_EBTABLES - len(\u0027-POSTROUTING\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_c421619f","line":30,"in_reply_to":"ba7be1f8_504a0484","updated":"2015-03-19 23:09:08.000000000","message":"Done","commit_id":"38685748d13589fb490dfeb0e43eb8454bb94108"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"87a0197824cd3b8d45f5dddba6dbf751f0c58576","unresolved":false,"context_lines":[{"line_number":30,"context_line":"# NOTE(ethuleau): ebtables supports chain names of up to 31 characters, and"},{"line_number":31,"context_line":"#                 we add up to 12 characters to prefix_chain which is used"},{"line_number":32,"context_line":"#                 as a prefix, so we limit it to 19 characters."},{"line_number":33,"context_line":"MAX_LEN_PREFIX_CHAIN \u003d MAX_CHAIN_LEN_EBTABLES - len(\u0027-POSTROUTING\u0027)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"def binary_name():"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba7be1f8_efe1ee9b","line":33,"updated":"2015-03-03 15:33:15.000000000","message":"if you really want to be cool you should create a POSTROUTING constant and then call len on that constant. Calling len on a literal is probably tantamount to using the number literal","commit_id":"38685748d13589fb490dfeb0e43eb8454bb94108"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"de028068c2c13ff5da8f27aab6a4a157d53167c5","unresolved":false,"context_lines":[{"line_number":30,"context_line":"# NOTE(ethuleau): ebtables supports chain names of up to 31 characters, and"},{"line_number":31,"context_line":"#                 we add up to 12 characters to prefix_chain which is used"},{"line_number":32,"context_line":"#                 as a prefix, so we limit it to 19 characters."},{"line_number":33,"context_line":"MAX_LEN_PREFIX_CHAIN \u003d MAX_CHAIN_LEN_EBTABLES - len(\u0027-POSTROUTING\u0027)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"def binary_name():"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_e43905d9","line":33,"in_reply_to":"ba7be1f8_efe1ee9b","updated":"2015-03-19 23:09:08.000000000","message":"Done","commit_id":"38685748d13589fb490dfeb0e43eb8454bb94108"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"33e6b9700b3127b5c09c9fcfa39117556aa439ba","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    \"\"\""},{"line_number":53,"context_line":"    return (MAX_CHAIN_LEN_EBTABLES -"},{"line_number":54,"context_line":"            len(_get_prefix_chain(prefix_chain) + \u0027-\u0027))"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"def _get_max_chain_len_nowrap():"},{"line_number":58,"context_line":"    \"\"\"Get the maximun ebtables chain name length.\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"ba7be1f8_b03ee0d8","line":55,"updated":"2015-02-27 23:26:19.000000000","message":"It seems _get_max_chain_len_(no)wrap can be inlined","commit_id":"38685748d13589fb490dfeb0e43eb8454bb94108"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"87a0197824cd3b8d45f5dddba6dbf751f0c58576","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        return ((self.chain \u003d\u003d other.chain) and"},{"line_number":88,"context_line":"                (self.rule \u003d\u003d other.rule) and"},{"line_number":89,"context_line":"                (self.top \u003d\u003d other.top) and"},{"line_number":90,"context_line":"                (self.wrap \u003d\u003d other.wrap))"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def __ne__(self, other):"},{"line_number":93,"context_line":"        return not self \u003d\u003d other"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba7be1f8_af0c5643","line":90,"updated":"2015-03-03 15:33:15.000000000","message":"should the rules be considered equal even if the chain prefix differs?","commit_id":"38685748d13589fb490dfeb0e43eb8454bb94108"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"de028068c2c13ff5da8f27aab6a4a157d53167c5","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        return ((self.chain \u003d\u003d other.chain) and"},{"line_number":88,"context_line":"                (self.rule \u003d\u003d other.rule) and"},{"line_number":89,"context_line":"                (self.top \u003d\u003d other.top) and"},{"line_number":90,"context_line":"                (self.wrap \u003d\u003d other.wrap))"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def __ne__(self, other):"},{"line_number":93,"context_line":"        return not self \u003d\u003d other"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_a7a70fbb","line":90,"in_reply_to":"ba7be1f8_af0c5643","updated":"2015-03-19 23:09:08.000000000","message":"Good point.","commit_id":"38685748d13589fb490dfeb0e43eb8454bb94108"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"87a0197824cd3b8d45f5dddba6dbf751f0c58576","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    \"\"\"An ebtables table.\"\"\""},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def __init__(self, prefix_chain\u003dNone):"},{"line_number":107,"context_line":"        self.rules \u003d []"},{"line_number":108,"context_line":"        self.remove_rules \u003d []"},{"line_number":109,"context_line":"        self.chains \u003d set()"},{"line_number":110,"context_line":"        self.unwrapped_chains \u003d set()"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba7be1f8_8adf8039","line":107,"updated":"2015-03-03 15:33:15.000000000","message":"how do you keep track of rule/chain association? Within the rule object only?\nI reckon a dict where the keys are chain might be more suitable, even if it duplicates some info.","commit_id":"38685748d13589fb490dfeb0e43eb8454bb94108"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"de028068c2c13ff5da8f27aab6a4a157d53167c5","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    \"\"\"An ebtables table.\"\"\""},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def __init__(self, prefix_chain\u003dNone):"},{"line_number":107,"context_line":"        self.rules \u003d []"},{"line_number":108,"context_line":"        self.remove_rules \u003d []"},{"line_number":109,"context_line":"        self.chains \u003d set()"},{"line_number":110,"context_line":"        self.unwrapped_chains \u003d set()"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_22d78def","line":107,"in_reply_to":"ba7be1f8_8adf8039","updated":"2015-03-19 23:09:08.000000000","message":"The rules are linearly searched for in the list.\n\nIn various places below there are iterations over the rules list, which are built to deal with cases where multiple rules have the same name. I\u0027m not sure why Eduardo built it that way in the first place, but I\u0027ll assume he had good reasons. While a dict could be created with lists of equally named rules as values, I\u0027d say we leave it for now. The number of rules doesn\u0027t seem to be very high, typically and this code is only run when a port is configured.","commit_id":"38685748d13589fb490dfeb0e43eb8454bb94108"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"87a0197824cd3b8d45f5dddba6dbf751f0c58576","unresolved":false,"context_lines":[{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def __init__(self, prefix_chain\u003dNone):"},{"line_number":107,"context_line":"        self.rules \u003d []"},{"line_number":108,"context_line":"        self.remove_rules \u003d []"},{"line_number":109,"context_line":"        self.chains \u003d set()"},{"line_number":110,"context_line":"        self.unwrapped_chains \u003d set()"},{"line_number":111,"context_line":"        self.remove_chains \u003d set()"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba7be1f8_caac18f0","line":108,"updated":"2015-03-03 15:33:15.000000000","message":"are these rules to remove? (same for chains)... maybe consider calling this members (rules|chains)_to_remove\n\nBut if you think it\u0027s better this way, that\u0027s ok","commit_id":"38685748d13589fb490dfeb0e43eb8454bb94108"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"de028068c2c13ff5da8f27aab6a4a157d53167c5","unresolved":false,"context_lines":[{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def __init__(self, prefix_chain\u003dNone):"},{"line_number":107,"context_line":"        self.rules \u003d []"},{"line_number":108,"context_line":"        self.remove_rules \u003d []"},{"line_number":109,"context_line":"        self.chains \u003d set()"},{"line_number":110,"context_line":"        self.unwrapped_chains \u003d set()"},{"line_number":111,"context_line":"        self.remove_chains \u003d set()"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_0251a961","line":108,"in_reply_to":"ba7be1f8_caac18f0","updated":"2015-03-19 23:09:08.000000000","message":"Done","commit_id":"38685748d13589fb490dfeb0e43eb8454bb94108"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"cb2c1ba205366ead266b0b8cc98c0fdcf7b984f6","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        name \u003d get_chain_name(name, wrap, self.prefix_chain)"},{"line_number":145,"context_line":"        chain_set \u003d self._select_chain_set(wrap)"},{"line_number":146,"context_line":"        if name not in chain_set:"},{"line_number":147,"context_line":"            return"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        self.remove_chain(name, wrap)"},{"line_number":150,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ba7be1f8_5f792ffb","line":147,"updated":"2015-02-28 03:35:43.000000000","message":"all above three lins are repeated in function remove_chain","commit_id":"38685748d13589fb490dfeb0e43eb8454bb94108"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"de028068c2c13ff5da8f27aab6a4a157d53167c5","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        name \u003d get_chain_name(name, wrap, self.prefix_chain)"},{"line_number":145,"context_line":"        chain_set \u003d self._select_chain_set(wrap)"},{"line_number":146,"context_line":"        if name not in chain_set:"},{"line_number":147,"context_line":"            return"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        self.remove_chain(name, wrap)"},{"line_number":150,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_dd713078","line":147,"in_reply_to":"ba7be1f8_5f792ffb","updated":"2015-03-19 23:09:08.000000000","message":"Done","commit_id":"38685748d13589fb490dfeb0e43eb8454bb94108"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"33e6b9700b3127b5c09c9fcfa39117556aa439ba","unresolved":false,"context_lines":[{"line_number":151,"context_line":"    def remove_chain(self, name, wrap\u003dTrue):"},{"line_number":152,"context_line":"        \"\"\"Remove named chain."},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        This removal \"cascades\". All rule in the chain are removed, as are"},{"line_number":155,"context_line":"        all rules in other chains that jump to it."},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        If the chain is not found, this is merely logged."}],"source_content_type":"text/x-python","patch_set":3,"id":"ba7be1f8_f33b02c6","line":154,"updated":"2015-02-27 23:26:19.000000000","message":"rule \u003d\u003e rules","commit_id":"38685748d13589fb490dfeb0e43eb8454bb94108"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"de028068c2c13ff5da8f27aab6a4a157d53167c5","unresolved":false,"context_lines":[{"line_number":151,"context_line":"    def remove_chain(self, name, wrap\u003dTrue):"},{"line_number":152,"context_line":"        \"\"\"Remove named chain."},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        This removal \"cascades\". All rule in the chain are removed, as are"},{"line_number":155,"context_line":"        all rules in other chains that jump to it."},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        If the chain is not found, this is merely logged."}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_1d682887","line":154,"in_reply_to":"ba7be1f8_f33b02c6","updated":"2015-03-19 23:09:08.000000000","message":"Done","commit_id":"38685748d13589fb490dfeb0e43eb8454bb94108"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"33e6b9700b3127b5c09c9fcfa39117556aa439ba","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        This removal \"cascades\". All rule in the chain are removed, as are"},{"line_number":155,"context_line":"        all rules in other chains that jump to it."},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        If the chain is not found, this is merely logged."},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        \"\"\""},{"line_number":160,"context_line":"        name \u003d get_chain_name(name, wrap, self.prefix_chain)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba7be1f8_936e46c8","line":157,"updated":"2015-02-27 23:26:19.000000000","message":"found, then tihs","commit_id":"38685748d13589fb490dfeb0e43eb8454bb94108"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"de028068c2c13ff5da8f27aab6a4a157d53167c5","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        This removal \"cascades\". All rule in the chain are removed, as are"},{"line_number":155,"context_line":"        all rules in other chains that jump to it."},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        If the chain is not found, this is merely logged."},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        \"\"\""},{"line_number":160,"context_line":"        name \u003d get_chain_name(name, wrap, self.prefix_chain)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_bd10fc00","line":157,"in_reply_to":"ba7be1f8_936e46c8","updated":"2015-03-19 23:09:08.000000000","message":"Done","commit_id":"38685748d13589fb490dfeb0e43eb8454bb94108"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"cb2c1ba205366ead266b0b8cc98c0fdcf7b984f6","unresolved":false,"context_lines":[{"line_number":184,"context_line":"            self.remove_rules +\u003d [r for r in self.rules"},{"line_number":185,"context_line":"                                  if jump_snippet in r.rule]"},{"line_number":186,"context_line":"        else:"},{"line_number":187,"context_line":"            jump_snippet \u003d \u0027-j %s-%s\u0027 % (self.prefix_chain, name)"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        # finally, remove rules from list that have a matching jump chain"},{"line_number":190,"context_line":"        self.rules \u003d [r for r in self.rules"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba7be1f8_7f635341","line":187,"updated":"2015-02-28 03:35:43.000000000","message":"should\u0027t we deal with it the same as linke 184?","commit_id":"38685748d13589fb490dfeb0e43eb8454bb94108"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"de028068c2c13ff5da8f27aab6a4a157d53167c5","unresolved":false,"context_lines":[{"line_number":184,"context_line":"            self.remove_rules +\u003d [r for r in self.rules"},{"line_number":185,"context_line":"                                  if jump_snippet in r.rule]"},{"line_number":186,"context_line":"        else:"},{"line_number":187,"context_line":"            jump_snippet \u003d \u0027-j %s-%s\u0027 % (self.prefix_chain, name)"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        # finally, remove rules from list that have a matching jump chain"},{"line_number":190,"context_line":"        self.rules \u003d [r for r in self.rules"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_58d0ee52","line":187,"in_reply_to":"ba7be1f8_7f635341","updated":"2015-03-19 23:09:08.000000000","message":"Only seems to apply to wrapped rules. See comment in line 172-172.","commit_id":"38685748d13589fb490dfeb0e43eb8454bb94108"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"fe533ab84237da09ad91f8e3a6befc5ccfcfffbc","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        # Get the possible chain name length in function of the prefix name"},{"line_number":55,"context_line":"        # length."},{"line_number":56,"context_line":"        chain_len \u003d (MAX_CHAIN_LEN_EBTABLES -"},{"line_number":57,"context_line":"                     len(_get_prefix_chain(prefix_chain) + \u0027-\u0027))"},{"line_number":58,"context_line":"        return chain_name[:chain_len]"},{"line_number":59,"context_line":"    else:"},{"line_number":60,"context_line":"        return chain_name[:MAX_CHAIN_LEN_EBTABLES]"}],"source_content_type":"text/x-python","patch_set":8,"id":"5ad0253b_0d879c62","line":57,"updated":"2015-04-28 20:38:21.000000000","message":"prefer the following which is clearer and more efficient:\n\n - len(...) - 1","commit_id":"0d665cf5020a04e7da784adf4a22fd3db86d0db0"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"7fe843a425d2f5448f5f2cec3377dd315fba7972","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        # Get the possible chain name length in function of the prefix name"},{"line_number":55,"context_line":"        # length."},{"line_number":56,"context_line":"        chain_len \u003d (MAX_CHAIN_LEN_EBTABLES -"},{"line_number":57,"context_line":"                     len(_get_prefix_chain(prefix_chain) + \u0027-\u0027))"},{"line_number":58,"context_line":"        return chain_name[:chain_len]"},{"line_number":59,"context_line":"    else:"},{"line_number":60,"context_line":"        return chain_name[:MAX_CHAIN_LEN_EBTABLES]"}],"source_content_type":"text/x-python","patch_set":8,"id":"5ad0253b_e398f16c","line":57,"in_reply_to":"5ad0253b_0d879c62","updated":"2015-04-28 21:35:04.000000000","message":"I disagree that it would be clearer. If you replace this with len(...) -1 then the reader will not know why 1 was subtracted. The way it\u0027s currently written makes it immediately clear. I can define a constant somewhere that will hopefully make it clearer, but it\u0027s not even clear that this is a performance critical path.\n\nPremature optimization and all that.","commit_id":"0d665cf5020a04e7da784adf4a22fd3db86d0db0"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"0ecd6a307f04329fed57b6f2bbe7de8d75502602","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        # Get the possible chain name length in function of the prefix name"},{"line_number":55,"context_line":"        # length."},{"line_number":56,"context_line":"        chain_len \u003d (MAX_CHAIN_LEN_EBTABLES -"},{"line_number":57,"context_line":"                     len(_get_prefix_chain(prefix_chain) + \u0027-\u0027))"},{"line_number":58,"context_line":"        return chain_name[:chain_len]"},{"line_number":59,"context_line":"    else:"},{"line_number":60,"context_line":"        return chain_name[:MAX_CHAIN_LEN_EBTABLES]"}],"source_content_type":"text/x-python","patch_set":8,"id":"5ad0253b_e3eb50af","line":57,"in_reply_to":"5ad0253b_e398f16c","updated":"2015-05-05 11:55:45.000000000","message":"A comment would help with both implementations as none of them is obvious!","commit_id":"0d665cf5020a04e7da784adf4a22fd3db86d0db0"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"fe533ab84237da09ad91f8e3a6befc5ccfcfffbc","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        return chain_name[:MAX_CHAIN_LEN_EBTABLES]"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"class EbtablesRule(object):"},{"line_number":64,"context_line":"    \"\"\"An ebtables rule."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    You shouldn\u0027t need to use this class directly, it\u0027s only used by"}],"source_content_type":"text/x-python","patch_set":8,"id":"5ad0253b_4dd8f41d","line":63,"updated":"2015-04-28 20:38:21.000000000","message":"This class duplicates mostly IptablesRule","commit_id":"0d665cf5020a04e7da784adf4a22fd3db86d0db0"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"350bedd65462cc969de404e79e8166d9727c45db","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        return chain_name[:MAX_CHAIN_LEN_EBTABLES]"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"class EbtablesRule(object):"},{"line_number":64,"context_line":"    \"\"\"An ebtables rule."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    You shouldn\u0027t need to use this class directly, it\u0027s only used by"}],"source_content_type":"text/x-python","patch_set":8,"id":"3acd31a7_0ae636b4","line":63,"in_reply_to":"3acd31a7_b468c7f6","updated":"2015-04-30 19:04:43.000000000","message":"Done","commit_id":"0d665cf5020a04e7da784adf4a22fd3db86d0db0"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"0e1d507f6a798bee525122f1a58456e8963afb97","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        return chain_name[:MAX_CHAIN_LEN_EBTABLES]"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"class EbtablesRule(object):"},{"line_number":64,"context_line":"    \"\"\"An ebtables rule."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    You shouldn\u0027t need to use this class directly, it\u0027s only used by"}],"source_content_type":"text/x-python","patch_set":8,"id":"3acd31a7_b468c7f6","line":63,"in_reply_to":"5ad0253b_037e4de4","updated":"2015-04-30 18:08:17.000000000","message":"Since this comes up so often I think it would make sense to put this explanation as a comment here.","commit_id":"0d665cf5020a04e7da784adf4a22fd3db86d0db0"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"7fe843a425d2f5448f5f2cec3377dd315fba7972","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        return chain_name[:MAX_CHAIN_LEN_EBTABLES]"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"class EbtablesRule(object):"},{"line_number":64,"context_line":"    \"\"\"An ebtables rule."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    You shouldn\u0027t need to use this class directly, it\u0027s only used by"}],"source_content_type":"text/x-python","patch_set":8,"id":"5ad0253b_037e4de4","line":63,"in_reply_to":"5ad0253b_4dd8f41d","updated":"2015-04-28 21:35:04.000000000","message":"Sigh. We\u0027ve been over this so, so many times already.\n\nOk, just to sum this up: The ebtables code replicates TONS of stuff from iptables, nobody disputes this. At some point I did already factor out all commonalities and had a base manager and all that... and was told to NOT do this. The concern was that our iptables code was not very stable and shouldn\u0027t be refactored in any way. It was therefore accepted that the ebtables code will replicate some/much of that code for now, pending a total re-write of the entire system at some future point.\n\nThat discussion took place somewhere around the earlier patch sets for the full patch. Some time in November, or so.","commit_id":"0d665cf5020a04e7da784adf4a22fd3db86d0db0"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"fe533ab84237da09ad91f8e3a6befc5ccfcfffbc","unresolved":false,"context_lines":[{"line_number":81,"context_line":"                (self.rule \u003d\u003d other.rule) and"},{"line_number":82,"context_line":"                (self.top \u003d\u003d other.top) and"},{"line_number":83,"context_line":"                (self.wrap \u003d\u003d other.wrap) and"},{"line_number":84,"context_line":"                (self.prefix_chain \u003d\u003d other.prefix_chain))"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def __ne__(self, other):"},{"line_number":87,"context_line":"        return not self \u003d\u003d other"}],"source_content_type":"text/x-python","patch_set":8,"id":"5ad0253b_adcae84d","line":84,"updated":"2015-04-28 20:38:21.000000000","message":"why comparing prefix_chain when self/other.chain depends on self/other.prefix_chain?","commit_id":"0d665cf5020a04e7da784adf4a22fd3db86d0db0"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"7fe843a425d2f5448f5f2cec3377dd315fba7972","unresolved":false,"context_lines":[{"line_number":81,"context_line":"                (self.rule \u003d\u003d other.rule) and"},{"line_number":82,"context_line":"                (self.top \u003d\u003d other.top) and"},{"line_number":83,"context_line":"                (self.wrap \u003d\u003d other.wrap) and"},{"line_number":84,"context_line":"                (self.prefix_chain \u003d\u003d other.prefix_chain))"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def __ne__(self, other):"},{"line_number":87,"context_line":"        return not self \u003d\u003d other"}],"source_content_type":"text/x-python","patch_set":8,"id":"5ad0253b_e39eb106","line":84,"in_reply_to":"5ad0253b_adcae84d","updated":"2015-04-28 21:35:04.000000000","message":"That\u0027s a good point. I\u0027ll remove that.","commit_id":"0d665cf5020a04e7da784adf4a22fd3db86d0db0"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"fe533ab84237da09ad91f8e3a6befc5ccfcfffbc","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        return \u0027-A %s %s\u0027 % (chain, self.rule)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"class EbtablesTable(object):"},{"line_number":98,"context_line":"    \"\"\"An ebtables table.\"\"\""},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    def __init__(self, prefix_chain\u003dNone):"}],"source_content_type":"text/x-python","patch_set":8,"id":"5ad0253b_4d17d4ed","line":97,"updated":"2015-04-28 20:38:21.000000000","message":"It seems this class is a copy/paste/modify of IptablesTable ... you should refactor Iptables/EbtablesRule/Table to reduce code duplication","commit_id":"0d665cf5020a04e7da784adf4a22fd3db86d0db0"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"7fe843a425d2f5448f5f2cec3377dd315fba7972","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        return \u0027-A %s %s\u0027 % (chain, self.rule)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"class EbtablesTable(object):"},{"line_number":98,"context_line":"    \"\"\"An ebtables table.\"\"\""},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    def __init__(self, prefix_chain\u003dNone):"}],"source_content_type":"text/x-python","patch_set":8,"id":"5ad0253b_a389d9cc","line":97,"in_reply_to":"5ad0253b_4d17d4ed","updated":"2015-04-28 21:35:04.000000000","message":"See my comment above.","commit_id":"0d665cf5020a04e7da784adf4a22fd3db86d0db0"}],"neutron/tests/functional/agent/linux/test_ebtables_driver.py":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"fe533ab84237da09ad91f8e3a6befc5ccfcfffbc","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        bridge \u003d self.useFixture(net_helpers.VethBridgeFixture()).bridge"},{"line_number":79,"context_line":"        self.source, self.destination \u003d self.useFixture("},{"line_number":80,"context_line":"            machine_fixtures.PeerMachines(bridge)).machines[0::1]"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        # Extract MAC and IP address of one of my interfaces"},{"line_number":83,"context_line":"        self.mac \u003d self.source.port.link.address"}],"source_content_type":"text/x-python","patch_set":8,"id":"5ad0253b_8d3ccc30","line":80,"updated":"2015-04-28 20:38:21.000000000","message":"Why?","commit_id":"0d665cf5020a04e7da784adf4a22fd3db86d0db0"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"7fe843a425d2f5448f5f2cec3377dd315fba7972","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        bridge \u003d self.useFixture(net_helpers.VethBridgeFixture()).bridge"},{"line_number":79,"context_line":"        self.source, self.destination \u003d self.useFixture("},{"line_number":80,"context_line":"            machine_fixtures.PeerMachines(bridge)).machines[0::1]"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        # Extract MAC and IP address of one of my interfaces"},{"line_number":83,"context_line":"        self.mac \u003d self.source.port.link.address"}],"source_content_type":"text/x-python","patch_set":8,"id":"5ad0253b_23182984","line":80,"in_reply_to":"5ad0253b_8d3ccc30","updated":"2015-04-28 21:35:04.000000000","message":"I know, it\u0027s annoying. I get a warning (and subsequent pep8 test failure), since pep8 thinks that there\u0027s just one item on the right side. With the slice operator you can convince it that it\u0027s going to be ok,\n\nMaybe there are some corner cases where this is indeed possible, but since this is just a test case here, it seems fine to just get around the problem this way.","commit_id":"0d665cf5020a04e7da784adf4a22fd3db86d0db0"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"3e697615221b8b9b4415be61e40ffad6416538ed","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        bridge \u003d self.useFixture(net_helpers.VethBridgeFixture()).bridge"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        # Using a slice here just to satisfy a pep8 warning."},{"line_number":81,"context_line":"        self.source, self.destination \u003d self.useFixture("},{"line_number":82,"context_line":"            machine_fixtures.PeerMachines(bridge)).machines[0::1]"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3acd31a7_2528aa99","line":80,"updated":"2015-05-05 11:55:26.000000000","message":"It\u0027s not required as current code passes pylint check","commit_id":"d3983b63d2d4cf920c241490d1de898186c4936d"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"b8463052fc52a67e92814ee9346cf64700bb050b","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        bridge \u003d self.useFixture(net_helpers.VethBridgeFixture()).bridge"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        # Using a slice here just to satisfy a pep8 warning."},{"line_number":81,"context_line":"        self.source, self.destination \u003d self.useFixture("},{"line_number":82,"context_line":"            machine_fixtures.PeerMachines(bridge)).machines[0::1]"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"1aca2d91_16733a4f","line":80,"in_reply_to":"3acd31a7_2528aa99","updated":"2015-05-06 01:46:49.000000000","message":"Done","commit_id":"d3983b63d2d4cf920c241490d1de898186c4936d"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"4fcffe563349565cd93412e8aa226590368b60cb","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        super(EbtablesLowLevelTestCase, self).setUp()"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        bridge \u003d self.useFixture(net_helpers.VethBridgeFixture()).bridge"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        self.source, self.destination \u003d self.useFixture("},{"line_number":81,"context_line":"            machine_fixtures.PeerMachines(bridge)).machines"},{"line_number":82,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1aca2d91_dd2b6dea","line":79,"updated":"2015-05-07 02:15:05.000000000","message":"Juergen, sorry to whine but this is an unneeded whitespace change. Can you remove this module from the patch?","commit_id":"1a4ed3014d95bac505903d71d4f0f1c2ccfa572c"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"de60659ae7f1e8fc200ea0f93dafb103a6b0679e","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        super(EbtablesLowLevelTestCase, self).setUp()"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        bridge \u003d self.useFixture(net_helpers.VethBridgeFixture()).bridge"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        self.source, self.destination \u003d self.useFixture("},{"line_number":81,"context_line":"            machine_fixtures.PeerMachines(bridge)).machines"},{"line_number":82,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1aca2d91_4a8c0c7f","line":79,"in_reply_to":"1aca2d91_dd2b6dea","updated":"2015-05-07 20:24:19.000000000","message":"Done","commit_id":"1a4ed3014d95bac505903d71d4f0f1c2ccfa572c"}],"neutron/tests/unit/agent/linux/test_ebtables_manager.py":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"fe533ab84237da09ad91f8e3a6befc5ccfcfffbc","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"class EbtablesRuleTestCase(base.BaseTestCase):"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def setUp(self):"},{"line_number":71,"context_line":"        super(EbtablesRuleTestCase, self).setUp()"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def test_basic_ops(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"5ad0253b_8d6a8c19","line":70,"updated":"2015-04-28 20:38:21.000000000","message":"not required","commit_id":"0d665cf5020a04e7da784adf4a22fd3db86d0db0"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"7fe843a425d2f5448f5f2cec3377dd315fba7972","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"class EbtablesRuleTestCase(base.BaseTestCase):"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def setUp(self):"},{"line_number":71,"context_line":"        super(EbtablesRuleTestCase, self).setUp()"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def test_basic_ops(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"5ad0253b_c3161555","line":70,"in_reply_to":"5ad0253b_8d6a8c19","updated":"2015-04-28 21:35:04.000000000","message":"Ok, I\u0027ll remove it.","commit_id":"0d665cf5020a04e7da784adf4a22fd3db86d0db0"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"3e697615221b8b9b4415be61e40ffad6416538ed","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"LONG_NAME \u003d \"1234567890\" * 3"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"em.binary_name \u003d lambda: \"binary\""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class EbtablesChainNameTestCase(base.BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":10,"id":"3acd31a7_907b3a8c","line":23,"updated":"2015-05-05 11:55:26.000000000","message":"It\u0027s an incorrect way to mock binary_name function: the method is mocked on module load and never unmocked. You should use:\n\n  def setUp(self):\n     ...\n     mock.patch.object(em, \"binary_name\", return_value\u003d\"binary\").start()\n\nwhich mocks binary_name when running EbtablesChainNameTestCase tests.","commit_id":"d3983b63d2d4cf920c241490d1de898186c4936d"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"b8463052fc52a67e92814ee9346cf64700bb050b","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"LONG_NAME \u003d \"1234567890\" * 3"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"em.binary_name \u003d lambda: \"binary\""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class EbtablesChainNameTestCase(base.BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aca2d91_969d0a5c","line":23,"in_reply_to":"3acd31a7_907b3a8c","updated":"2015-05-06 01:46:49.000000000","message":"Done","commit_id":"d3983b63d2d4cf920c241490d1de898186c4936d"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"4ce10438f6d8f31a2a3d48e829efc4e6e6aeed83","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"LONG_NAME \u003d \"1234567890\" * 3"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"em.binary_name \u003d lambda: \"binary\""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class EbtablesChainNameTestCase(base.BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":10,"id":"3acd31a7_30758663","line":23,"in_reply_to":"3acd31a7_907b3a8c","updated":"2015-05-05 12:02:02.000000000","message":"Thanks for catching this Cedric, I missed it.","commit_id":"d3983b63d2d4cf920c241490d1de898186c4936d"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"4fcffe563349565cd93412e8aa226590368b60cb","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class EbtablesChainNameTestCase(EbtablesManagerBaseTestCase):"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def setUp(self):"},{"line_number":35,"context_line":"        super(EbtablesChainNameTestCase, self).setUp()"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def test_get_prefix_chain(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1aca2d91_dd124db4","line":34,"updated":"2015-05-07 02:15:05.000000000","message":"Not needed since the parent class setUp() will be used.","commit_id":"1a4ed3014d95bac505903d71d4f0f1c2ccfa572c"},{"author":{"_account_id":6139,"name":"Juergen Brendel","email":"jbrendel@cisco.com","username":"jbrendel"},"change_message_id":"de60659ae7f1e8fc200ea0f93dafb103a6b0679e","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class EbtablesChainNameTestCase(EbtablesManagerBaseTestCase):"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def setUp(self):"},{"line_number":35,"context_line":"        super(EbtablesChainNameTestCase, self).setUp()"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def test_get_prefix_chain(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1aca2d91_6a910899","line":34,"in_reply_to":"1aca2d91_dd124db4","updated":"2015-05-07 20:24:19.000000000","message":"Done","commit_id":"1a4ed3014d95bac505903d71d4f0f1c2ccfa572c"}]}
