)]}'
{"neutron/agent/common/new.py":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"0cca0bbf8b24d798de22e0e54911a731cff797c2","unresolved":false,"context_lines":[{"line_number":20,"context_line":"    This is used to construct specific bridge cookie"},{"line_number":21,"context_line":"    classes before injecting the native bridge object."},{"line_number":22,"context_line":"    \"\"\""},{"line_number":23,"context_line":"    if isinstance(instance, base_class_type):"},{"line_number":24,"context_line":"        instance \u003d copy.copy(instance)"},{"line_number":25,"context_line":"        instance.__class__ \u003d class_type"},{"line_number":26,"context_line":"        return instance"}],"source_content_type":"text/x-python","patch_set":18,"id":"5a74a57a_d72ff285","line":23,"range":{"start_line":23,"start_character":7,"end_line":23,"end_character":17},"updated":"2016-11-28 09:45:11.000000000","message":"for what this isinstance check is necessary?","commit_id":"3d56cfff517820f57fdd601c5f5634a20b5e2c47"}],"neutron/agent/common/ovs_lib.py":[{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"d1136a24efcab8a0c709abcf6e3050d294640eea","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        self.br_name \u003d br_name"},{"line_number":171,"context_line":"        self.datapath_type \u003d datapath_type"},{"line_number":172,"context_line":"        self._default_cookie \u003d generate_random_cookie()"},{"line_number":173,"context_line":"        self._default_cookie_mask \u003d UINT64_BITMASK"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    @property"},{"line_number":176,"context_line":"    def default_cookie(self):"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa7ab95a_4cf2f99b","line":173,"range":{"start_line":173,"start_character":13,"end_line":173,"end_character":33},"updated":"2016-08-31 15:07:40.000000000","message":"Since no code is modifying this (AFAICT), and the rest of the code is only reading this value, why isn\u0027t the rest of the code using UINT64_BITMASK directly ?","commit_id":"e5f4840983c51a52ed9696bf9f1b820c62b2da6d"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"95daf71e3066be180b4e6d1efe178f803517f514","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        self.br_name \u003d br_name"},{"line_number":171,"context_line":"        self.datapath_type \u003d datapath_type"},{"line_number":172,"context_line":"        self._default_cookie \u003d generate_random_cookie()"},{"line_number":173,"context_line":"        self._default_cookie_mask \u003d UINT64_BITMASK"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    @property"},{"line_number":176,"context_line":"    def default_cookie(self):"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa7ab95a_5d63501a","line":173,"range":{"start_line":173,"start_character":13,"end_line":173,"end_character":33},"in_reply_to":"fa7ab95a_4cf2f99b","updated":"2016-09-01 11:25:23.000000000","message":"Done. Yes, we can use it directly.","commit_id":"e5f4840983c51a52ed9696bf9f1b820c62b2da6d"}],"neutron/plugins/ml2/drivers/openvswitch/agent/__init__.py":[{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"3d9033d1658441334b3f88c5541bf581a746350b","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"def new(partial_class, class_type, instance):"},{"line_number":17,"context_line":"    \"\"\"Returns an object of class without calling __init__."},{"line_number":18,"context_line":"    This could lead to inconsistent objects, use only when you"},{"line_number":19,"context_line":"    know what you\u0027re doing."}],"source_content_type":"text/x-python","patch_set":5,"id":"dada55a8_005c9349","line":16,"updated":"2016-07-27 09:03:14.000000000","message":"This class is whats failing the tests","commit_id":"2912ce2aef27f675295d4f5f3a6720f85636229e"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"5b30232154bf7c17a7e0a8aa4bf7ffce089b2c5b","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"def new(partial_class, class_type, instance):"},{"line_number":17,"context_line":"    \"\"\"Returns an object of class without calling __init__."},{"line_number":18,"context_line":"    This could lead to inconsistent objects, use only when you"},{"line_number":19,"context_line":"    know what you\u0027re doing."}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_ac94eb42","line":16,"in_reply_to":"dada55a8_005c9349","updated":"2016-07-29 16:36:46.000000000","message":"Done with the pep8 warnings. I haven\u0027t looked into the unit test code. Will do that in a subsequent PS.","commit_id":"2912ce2aef27f675295d4f5f3a6720f85636229e"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"95daf71e3066be180b4e6d1efe178f803517f514","unresolved":false,"context_lines":[{"line_number":13,"context_line":"import copy"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"def new(partial_class, instance):"},{"line_number":17,"context_line":"    \"\"\"Returns an object of class without calling __init__."},{"line_number":18,"context_line":"    This could lead to inconsistent objects, use only when you"},{"line_number":19,"context_line":"    know what you\u0027re doing."}],"source_content_type":"text/x-python","patch_set":13,"id":"fa7ab95a_fd20a4b2","line":16,"range":{"start_line":16,"start_character":0,"end_line":16,"end_character":33},"updated":"2016-09-01 11:25:23.000000000","message":"This is not needed, so removed.","commit_id":"e5f4840983c51a52ed9696bf9f1b820c62b2da6d"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"859c0fdf5c4f983653f3611225287bc898fdc60f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":14,"id":"fa7ab95a_9620559d","updated":"2016-09-01 11:45:43.000000000","message":"It is surprising to put this here.\nWhy not instead under agent/common/new.py for instance ?","commit_id":"2da7a1539cde18dcb6738fb12b767c3bdf6f911f"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"332f960253f18f3b7b7690aa3642ce362fff56e4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":14,"id":"fa7ab95a_8c84ab0b","in_reply_to":"fa7ab95a_9620559d","updated":"2016-09-01 18:10:54.000000000","message":"Done","commit_id":"2da7a1539cde18dcb6738fb12b767c3bdf6f911f"}],"neutron/plugins/ml2/drivers/openvswitch/agent/openflow/br_cookie.py":[{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"3d9033d1658441334b3f88c5541bf581a746350b","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    \u0027\u0027\u0027"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":25,"context_line":"        kwargs.clear()"},{"line_number":26,"context_line":"        super(OVSBridgeCookieMixin, self).__init__(*args, **kwargs)"},{"line_number":27,"context_line":"        self._reserved_cookies \u003d set()"},{"line_number":28,"context_line":"        self._cookie \u003d None"}],"source_content_type":"text/x-python","patch_set":5,"id":"dada55a8_2d4270ae","line":25,"range":{"start_line":25,"start_character":8,"end_line":25,"end_character":22},"updated":"2016-07-27 09:03:14.000000000","message":"Why is this being cleared?\nThe values in it are passed to all the other mixins that compose the OVSAgentBridge object.","commit_id":"2912ce2aef27f675295d4f5f3a6720f85636229e"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"5b30232154bf7c17a7e0a8aa4bf7ffce089b2c5b","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    \u0027\u0027\u0027"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":25,"context_line":"        kwargs.clear()"},{"line_number":26,"context_line":"        super(OVSBridgeCookieMixin, self).__init__(*args, **kwargs)"},{"line_number":27,"context_line":"        self._reserved_cookies \u003d set()"},{"line_number":28,"context_line":"        self._cookie \u003d None"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_4cb8cfc8","line":25,"range":{"start_line":25,"start_character":8,"end_line":25,"end_character":22},"in_reply_to":"dada55a8_2d4270ae","updated":"2016-07-29 16:36:46.000000000","message":"Done","commit_id":"2912ce2aef27f675295d4f5f3a6720f85636229e"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"3d9033d1658441334b3f88c5541bf581a746350b","unresolved":false,"context_lines":[{"line_number":25,"context_line":"        kwargs.clear()"},{"line_number":26,"context_line":"        super(OVSBridgeCookieMixin, self).__init__(*args, **kwargs)"},{"line_number":27,"context_line":"        self._reserved_cookies \u003d set()"},{"line_number":28,"context_line":"        self._cookie \u003d None"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    @property"},{"line_number":31,"context_line":"    def reserved_cookies(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"dada55a8_cdb114e2","line":28,"range":{"start_line":28,"start_character":8,"end_line":28,"end_character":27},"updated":"2016-07-27 09:03:14.000000000","message":"These is already a variable used for the bridges cookie in the OVSBridge object, it\u0027s self._default_cookie.","commit_id":"2912ce2aef27f675295d4f5f3a6720f85636229e"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"5b30232154bf7c17a7e0a8aa4bf7ffce089b2c5b","unresolved":false,"context_lines":[{"line_number":25,"context_line":"        kwargs.clear()"},{"line_number":26,"context_line":"        super(OVSBridgeCookieMixin, self).__init__(*args, **kwargs)"},{"line_number":27,"context_line":"        self._reserved_cookies \u003d set()"},{"line_number":28,"context_line":"        self._cookie \u003d None"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    @property"},{"line_number":31,"context_line":"    def reserved_cookies(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_acd06bf7","line":28,"range":{"start_line":28,"start_character":8,"end_line":28,"end_character":27},"in_reply_to":"dada55a8_cdb114e2","updated":"2016-07-29 16:36:46.000000000","message":"Yes, we can use it, now that the classes are being derived.","commit_id":"2912ce2aef27f675295d4f5f3a6720f85636229e"}],"neutron/plugins/ml2/drivers/openvswitch/agent/openflow/native/br_cookie.py":[{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"d497f44947a2522f631e48aacbca9d08e27f069b","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    def delete_flows(self, table_id\u003dNone, strict\u003dFalse, priority\u003d0,"},{"line_number":35,"context_line":"                     cookie\u003d0, cookie_mask\u003d0,"},{"line_number":36,"context_line":"                     match\u003dNone, **match_kwargs):"},{"line_number":37,"context_line":"        # NOTE(sreesiv): This is adapted from original ofctl code."},{"line_number":38,"context_line":"        # As per the original implementation, this is needed so that"},{"line_number":39,"context_line":"        # an extension does not delete flows of another extension"},{"line_number":40,"context_line":"        super(OVSIntegrationCookieBridge, self).delete_flows("},{"line_number":41,"context_line":"            table_id\u003dtable_id, strict\u003dstrict, priority\u003dpriority,"},{"line_number":42,"context_line":"            cookie\u003dself._cookie, cookie_mask\u003d((1 \u003c\u003c 64) - 1),"}],"source_content_type":"text/x-python","patch_set":3,"id":"1aa78d24_30c5025b","line":39,"range":{"start_line":37,"start_character":0,"end_line":39,"end_character":65},"updated":"2016-07-05 13:16:29.000000000","message":"Correct me if I\u0027ve misunderstood, but extensions can already delete flows from other extensions, they just need to provide the cookie value for the other extension.\nOr is this a problem specific to the native implementation?","commit_id":"1d0f4475bf95cddc3bb9c27d33dc83f4002c81bd"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"fdde921c746c021006497c5b0454e60c922b6391","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    def delete_flows(self, table_id\u003dNone, strict\u003dFalse, priority\u003d0,"},{"line_number":35,"context_line":"                     cookie\u003d0, cookie_mask\u003d0,"},{"line_number":36,"context_line":"                     match\u003dNone, **match_kwargs):"},{"line_number":37,"context_line":"        # NOTE(sreesiv): This is adapted from original ofctl code."},{"line_number":38,"context_line":"        # As per the original implementation, this is needed so that"},{"line_number":39,"context_line":"        # an extension does not delete flows of another extension"},{"line_number":40,"context_line":"        super(OVSIntegrationCookieBridge, self).delete_flows("},{"line_number":41,"context_line":"            table_id\u003dtable_id, strict\u003dstrict, priority\u003dpriority,"},{"line_number":42,"context_line":"            cookie\u003dself._cookie, cookie_mask\u003d((1 \u003c\u003c 64) - 1),"}],"source_content_type":"text/x-python","patch_set":3,"id":"1aa78d24_a62e73f8","line":39,"range":{"start_line":37,"start_character":0,"end_line":39,"end_character":65},"in_reply_to":"1aa78d24_30c5025b","updated":"2016-07-07 07:01:49.000000000","message":"Oh OK, I see you point, this is a bug!\nWhile refactoring, I wanted to bring in logic from https://github.com/openstack/neutron/blob/dd4f1253c951d78a5b497680dfb31317ba469a58/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_agent_extension_api.py#L45\n\nThat ended up being implemented wrongly.\nThe right way should\u0027ve been, If a cookie and mask is supplied use them. If not, use member _cookie.\nsuper(OVSIntegrationCookieBridge, self).delete_flows(\n    table_id\u003dtable_id, strict\u003dstrict, priority\u003dpriority,\n    cookie\u003d(cookie or self._cookie), cookie_mask\u003d(cookie_mask or ((1 \u003c\u003c 64) - 1)),\n    match\u003dmatch, **match_kwargs)\n\nDoes that sound fine?","commit_id":"1d0f4475bf95cddc3bb9c27d33dc83f4002c81bd"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"27be38849f8b415eb12a2a7d3d6d105f3a8e6d1f","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    def delete_flows(self, table_id\u003dNone, strict\u003dFalse, priority\u003d0,"},{"line_number":35,"context_line":"                     cookie\u003d0, cookie_mask\u003d0,"},{"line_number":36,"context_line":"                     match\u003dNone, **match_kwargs):"},{"line_number":37,"context_line":"        # NOTE(sreesiv): This is adapted from original ofctl code."},{"line_number":38,"context_line":"        # As per the original implementation, this is needed so that"},{"line_number":39,"context_line":"        # an extension does not delete flows of another extension"},{"line_number":40,"context_line":"        super(OVSIntegrationCookieBridge, self).delete_flows("},{"line_number":41,"context_line":"            table_id\u003dtable_id, strict\u003dstrict, priority\u003dpriority,"},{"line_number":42,"context_line":"            cookie\u003dself._cookie, cookie_mask\u003d((1 \u003c\u003c 64) - 1),"}],"source_content_type":"text/x-python","patch_set":3,"id":"1aa78d24_f9e65542","line":39,"range":{"start_line":37,"start_character":0,"end_line":39,"end_character":65},"in_reply_to":"1aa78d24_a62e73f8","updated":"2016-07-07 08:48:52.000000000","message":"That looks perfect.","commit_id":"1d0f4475bf95cddc3bb9c27d33dc83f4002c81bd"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"ab7a9076a389616bc56f976dd60a7e0674bb5b7b","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    def delete_flows(self, table_id\u003dNone, strict\u003dFalse, priority\u003d0,"},{"line_number":35,"context_line":"                     cookie\u003d0, cookie_mask\u003d0,"},{"line_number":36,"context_line":"                     match\u003dNone, **match_kwargs):"},{"line_number":37,"context_line":"        # NOTE(sreesiv): This is adapted from original ofctl code."},{"line_number":38,"context_line":"        # As per the original implementation, this is needed so that"},{"line_number":39,"context_line":"        # an extension does not delete flows of another extension"},{"line_number":40,"context_line":"        super(OVSIntegrationCookieBridge, self).delete_flows("},{"line_number":41,"context_line":"            table_id\u003dtable_id, strict\u003dstrict, priority\u003dpriority,"},{"line_number":42,"context_line":"            cookie\u003dself._cookie, cookie_mask\u003d((1 \u003c\u003c 64) - 1),"}],"source_content_type":"text/x-python","patch_set":3,"id":"dada55a8_5698791b","line":39,"range":{"start_line":37,"start_character":0,"end_line":39,"end_character":65},"in_reply_to":"1aa78d24_f9e65542","updated":"2016-07-25 16:39:59.000000000","message":"Done","commit_id":"1d0f4475bf95cddc3bb9c27d33dc83f4002c81bd"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"3d9033d1658441334b3f88c5541bf581a746350b","unresolved":false,"context_lines":[{"line_number":20,"context_line":"    import br_tun"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class OVSIntegrationCookieBridge(br_int.OVSIntegrationBridge):"},{"line_number":24,"context_line":"    \u0027\u0027\u0027Wrapper bridge adding cookies before calling the inherited bridge"},{"line_number":25,"context_line":"    This class creates a bridge that will override del_flows"},{"line_number":26,"context_line":"    call for which a cookie (reserved at init/wrapping from the underlying"}],"source_content_type":"text/x-python","patch_set":5,"id":"dada55a8_e0333f60","line":23,"updated":"2016-07-27 09:03:14.000000000","message":"Both of these classes are identical, would the wrapper class method not avoid code duplication?","commit_id":"2912ce2aef27f675295d4f5f3a6720f85636229e"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"5b30232154bf7c17a7e0a8aa4bf7ffce089b2c5b","unresolved":false,"context_lines":[{"line_number":20,"context_line":"    import br_tun"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class OVSIntegrationCookieBridge(br_int.OVSIntegrationBridge):"},{"line_number":24,"context_line":"    \u0027\u0027\u0027Wrapper bridge adding cookies before calling the inherited bridge"},{"line_number":25,"context_line":"    This class creates a bridge that will override del_flows"},{"line_number":26,"context_line":"    call for which a cookie (reserved at init/wrapping from the underlying"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_ecd6e3ef","line":23,"in_reply_to":"dada55a8_e0333f60","updated":"2016-07-29 16:36:46.000000000","message":"Done. Yes added a class to reduce code dup.","commit_id":"2912ce2aef27f675295d4f5f3a6720f85636229e"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"4051ab90cb5b75a15df842e65b957adf4cc7fe72","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        pass"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def delete_flows(self, table_id\u003dNone, strict\u003dFalse, priority\u003d0,"},{"line_number":44,"context_line":"                     cookie\u003d0, cookie_mask\u003d0,"},{"line_number":45,"context_line":"                     match\u003dNone, **match_kwargs):"},{"line_number":46,"context_line":"        # NOTE(sreesiv): This is adapted from original ofctl code."},{"line_number":47,"context_line":"        # As per the original implementation, this is needed so that"}],"source_content_type":"text/x-python","patch_set":11,"id":"9ad45d7e_58d284d3","line":44,"range":{"start_line":44,"start_character":28,"end_line":44,"end_character":29},"updated":"2016-08-09 12:50:51.000000000","message":"Maybe make this None, someone could pass a cookie of 0 and a cookie mask of 0 to match all flows.","commit_id":"281c2f7dd5c18c77d318567a99c415def7144b6b"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"cb41b6441733637b1f144fc5520e67c0f9f1fbef","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        pass"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def delete_flows(self, table_id\u003dNone, strict\u003dFalse, priority\u003d0,"},{"line_number":44,"context_line":"                     cookie\u003d0, cookie_mask\u003d0,"},{"line_number":45,"context_line":"                     match\u003dNone, **match_kwargs):"},{"line_number":46,"context_line":"        # NOTE(sreesiv): This is adapted from original ofctl code."},{"line_number":47,"context_line":"        # As per the original implementation, this is needed so that"}],"source_content_type":"text/x-python","patch_set":11,"id":"9ad45d7e_f11e856e","line":44,"range":{"start_line":44,"start_character":28,"end_line":44,"end_character":29},"in_reply_to":"9ad45d7e_31449d19","updated":"2016-08-11 08:26:46.000000000","message":"The point of the cookie bridge was so extensions could easily isolate their flows from each other, if they need to make a change that effects all flows then they should need to be explicit that that is what they want to do.","commit_id":"281c2f7dd5c18c77d318567a99c415def7144b6b"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"661a85c57c1f277faa8fafc0294ee0ef1e7a447d","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        pass"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def delete_flows(self, table_id\u003dNone, strict\u003dFalse, priority\u003d0,"},{"line_number":44,"context_line":"                     cookie\u003d0, cookie_mask\u003d0,"},{"line_number":45,"context_line":"                     match\u003dNone, **match_kwargs):"},{"line_number":46,"context_line":"        # NOTE(sreesiv): This is adapted from original ofctl code."},{"line_number":47,"context_line":"        # As per the original implementation, this is needed so that"}],"source_content_type":"text/x-python","patch_set":11,"id":"9ad45d7e_31449d19","line":44,"range":{"start_line":44,"start_character":28,"end_line":44,"end_character":29},"in_reply_to":"9ad45d7e_58d284d3","updated":"2016-08-11 08:13:59.000000000","message":"Ah, that\u0027s right!\nBut, wouldn\u0027t that break the expectation of the caller. He might be expecting an \u0027all flow match\u0027 when he is not specifying cookie or mask explicitly! Already this is breaking that expectation.\nWhat do you suggest?","commit_id":"281c2f7dd5c18c77d318567a99c415def7144b6b"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"2b5fb1fcfaedb48d97ea5e0ccb33b1cae07b9f95","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        pass"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def delete_flows(self, table_id\u003dNone, strict\u003dFalse, priority\u003d0,"},{"line_number":44,"context_line":"                     cookie\u003d0, cookie_mask\u003d0,"},{"line_number":45,"context_line":"                     match\u003dNone, **match_kwargs):"},{"line_number":46,"context_line":"        # NOTE(sreesiv): This is adapted from original ofctl code."},{"line_number":47,"context_line":"        # As per the original implementation, this is needed so that"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_b74d7e74","line":44,"range":{"start_line":44,"start_character":28,"end_line":44,"end_character":29},"in_reply_to":"9ad45d7e_df70a374","updated":"2016-08-22 07:20:18.000000000","message":"Done","commit_id":"281c2f7dd5c18c77d318567a99c415def7144b6b"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"7d49ad54c88f83f44fc524956face73248e8afa5","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        pass"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def delete_flows(self, table_id\u003dNone, strict\u003dFalse, priority\u003d0,"},{"line_number":44,"context_line":"                     cookie\u003d0, cookie_mask\u003d0,"},{"line_number":45,"context_line":"                     match\u003dNone, **match_kwargs):"},{"line_number":46,"context_line":"        # NOTE(sreesiv): This is adapted from original ofctl code."},{"line_number":47,"context_line":"        # As per the original implementation, this is needed so that"}],"source_content_type":"text/x-python","patch_set":11,"id":"9ad45d7e_df70a374","line":44,"range":{"start_line":44,"start_character":28,"end_line":44,"end_character":29},"in_reply_to":"9ad45d7e_f11e856e","updated":"2016-08-11 10:10:41.000000000","message":"Yes, I\u0027ve the same opinion. The expectation being implied here (which was adapted from the original implementation [1]) forcing the default value to 0 is buggy, one shouldn\u0027t assume that!\n\nI\u0027ll submit a new one with the suggested changes.\n\n[1] https://github.com/openstack/neutron/blob/3f413757788c85d49be7a032e64d7e3fcca9298d/neutron/plugins/ml2/drivers/openvswitch/agent/openflow/native/ofswitch.py#L103","commit_id":"281c2f7dd5c18c77d318567a99c415def7144b6b"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"4051ab90cb5b75a15df842e65b957adf4cc7fe72","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        # an extension does not delete flows of another extension"},{"line_number":49,"context_line":"        super(OVSIntegrationCookieBridge, self).delete_flows("},{"line_number":50,"context_line":"            table_id\u003dtable_id, strict\u003dstrict, priority\u003dpriority,"},{"line_number":51,"context_line":"            cookie\u003d(cookie or self.default_cookie),"},{"line_number":52,"context_line":"            cookie_mask\u003d(cookie_mask or ((1 \u003c\u003c 64) - 1)),"},{"line_number":53,"context_line":"            match\u003dmatch, **match_kwargs)"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9ad45d7e_787308e8","line":51,"range":{"start_line":51,"start_character":20,"end_line":51,"end_character":49},"updated":"2016-08-09 12:50:51.000000000","message":"based on above proposed change;\n\"default_cookie if None in cookie else cookie\"","commit_id":"281c2f7dd5c18c77d318567a99c415def7144b6b"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"2b5fb1fcfaedb48d97ea5e0ccb33b1cae07b9f95","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        # an extension does not delete flows of another extension"},{"line_number":49,"context_line":"        super(OVSIntegrationCookieBridge, self).delete_flows("},{"line_number":50,"context_line":"            table_id\u003dtable_id, strict\u003dstrict, priority\u003dpriority,"},{"line_number":51,"context_line":"            cookie\u003d(cookie or self.default_cookie),"},{"line_number":52,"context_line":"            cookie_mask\u003d(cookie_mask or ((1 \u003c\u003c 64) - 1)),"},{"line_number":53,"context_line":"            match\u003dmatch, **match_kwargs)"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_f76ed6c7","line":51,"range":{"start_line":51,"start_character":20,"end_line":51,"end_character":49},"in_reply_to":"9ad45d7e_787308e8","updated":"2016-08-22 07:20:18.000000000","message":"I believe the same line will be fine!","commit_id":"281c2f7dd5c18c77d318567a99c415def7144b6b"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"4051ab90cb5b75a15df842e65b957adf4cc7fe72","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        super(OVSIntegrationCookieBridge, self).delete_flows("},{"line_number":50,"context_line":"            table_id\u003dtable_id, strict\u003dstrict, priority\u003dpriority,"},{"line_number":51,"context_line":"            cookie\u003d(cookie or self.default_cookie),"},{"line_number":52,"context_line":"            cookie_mask\u003d(cookie_mask or ((1 \u003c\u003c 64) - 1)),"},{"line_number":53,"context_line":"            match\u003dmatch, **match_kwargs)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9ad45d7e_7bd94283","line":52,"range":{"start_line":52,"start_character":25,"end_line":52,"end_character":55},"updated":"2016-08-09 12:50:51.000000000","message":"Would it not be easier to make ((1\u003c\u003c64)-1) cookie_mask\u0027s default value?\nAlso for clarity making it a constant.","commit_id":"281c2f7dd5c18c77d318567a99c415def7144b6b"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"2b5fb1fcfaedb48d97ea5e0ccb33b1cae07b9f95","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        super(OVSIntegrationCookieBridge, self).delete_flows("},{"line_number":50,"context_line":"            table_id\u003dtable_id, strict\u003dstrict, priority\u003dpriority,"},{"line_number":51,"context_line":"            cookie\u003d(cookie or self.default_cookie),"},{"line_number":52,"context_line":"            cookie_mask\u003d(cookie_mask or ((1 \u003c\u003c 64) - 1)),"},{"line_number":53,"context_line":"            match\u003dmatch, **match_kwargs)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_d7711aaa","line":52,"range":{"start_line":52,"start_character":25,"end_line":52,"end_character":55},"in_reply_to":"9ad45d7e_7bd94283","updated":"2016-08-22 07:20:18.000000000","message":"Done. I\u0027ve added a new property which makes it clear and tidy. Also reused a constant which was already was getting used.","commit_id":"281c2f7dd5c18c77d318567a99c415def7144b6b"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"4051ab90cb5b75a15df842e65b957adf4cc7fe72","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            match\u003dmatch, **match_kwargs)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"class OVSTunnelCookieBridge(OVSNativeCookieBridge, br_tun.OVSTunnelBridge):"},{"line_number":57,"context_line":"    \u0027\u0027\u0027Wrapper bridge adding cookies before calling the inherited bridge"},{"line_number":58,"context_line":"    This class creates a bridge that will override del_flows"},{"line_number":59,"context_line":"    call for which a cookie (reserved at init/wrapping from the underlying"}],"source_content_type":"text/x-python","patch_set":11,"id":"9ad45d7e_9bfa36bc","line":56,"updated":"2016-08-09 12:50:51.000000000","message":"Ditto for changes to the above class","commit_id":"281c2f7dd5c18c77d318567a99c415def7144b6b"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"2b5fb1fcfaedb48d97ea5e0ccb33b1cae07b9f95","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            match\u003dmatch, **match_kwargs)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"class OVSTunnelCookieBridge(OVSNativeCookieBridge, br_tun.OVSTunnelBridge):"},{"line_number":57,"context_line":"    \u0027\u0027\u0027Wrapper bridge adding cookies before calling the inherited bridge"},{"line_number":58,"context_line":"    This class creates a bridge that will override del_flows"},{"line_number":59,"context_line":"    call for which a cookie (reserved at init/wrapping from the underlying"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_575eca12","line":56,"in_reply_to":"9ad45d7e_9bfa36bc","updated":"2016-08-22 07:20:18.000000000","message":"Done","commit_id":"281c2f7dd5c18c77d318567a99c415def7144b6b"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"d376d6448a03f7d208a9a2140d3490255dd768de","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 Intel Corporation."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":12,"id":"9ad45d7e_71699125","line":1,"updated":"2016-08-12 16:23:40.000000000","message":"Just a reminder about the comments on PS11","commit_id":"34867220087ef092efad957c43a19a18bfb17e2e"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"187eeed8002b4ee190fb1abc60ef0318d756b733","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 Intel Corporation."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":12,"id":"3ac371cc_a951b2da","line":1,"in_reply_to":"9ad45d7e_71699125","updated":"2016-08-16 04:58:46.000000000","message":"OK.","commit_id":"34867220087ef092efad957c43a19a18bfb17e2e"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"d376d6448a03f7d208a9a2140d3490255dd768de","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        # an extension does not delete flows of another extension"},{"line_number":49,"context_line":"        super(OVSIntegrationCookieBridge, self).delete_flows("},{"line_number":50,"context_line":"            table_id\u003dtable_id, strict\u003dstrict, priority\u003dpriority,"},{"line_number":51,"context_line":"            cookie\u003d(cookie or self.default_cookie),"},{"line_number":52,"context_line":"            cookie_mask\u003d(cookie_mask or ((1 \u003c\u003c 64) - 1)),"},{"line_number":53,"context_line":"            match\u003dmatch, **match_kwargs)"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9ad45d7e_918885c8","line":51,"range":{"start_line":51,"start_character":30,"end_line":51,"end_character":49},"updated":"2016-08-12 16:23:40.000000000","message":"I may have missed it, but where is this generated/assigned?","commit_id":"34867220087ef092efad957c43a19a18bfb17e2e"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"187eeed8002b4ee190fb1abc60ef0318d756b733","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        # an extension does not delete flows of another extension"},{"line_number":49,"context_line":"        super(OVSIntegrationCookieBridge, self).delete_flows("},{"line_number":50,"context_line":"            table_id\u003dtable_id, strict\u003dstrict, priority\u003dpriority,"},{"line_number":51,"context_line":"            cookie\u003d(cookie or self.default_cookie),"},{"line_number":52,"context_line":"            cookie_mask\u003d(cookie_mask or ((1 \u003c\u003c 64) - 1)),"},{"line_number":53,"context_line":"            match\u003dmatch, **match_kwargs)"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3ac371cc_295ca2ec","line":51,"range":{"start_line":51,"start_character":30,"end_line":51,"end_character":49},"in_reply_to":"9ad45d7e_918885c8","updated":"2016-08-16 04:58:46.000000000","message":"neutron/plugins/ml2/drivers/openvswitch/agent/ovs_agent_extension_api.py 46-48 \u0026 61-63","commit_id":"34867220087ef092efad957c43a19a18bfb17e2e"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"859c0fdf5c4f983653f3611225287bc898fdc60f","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        super(OVSIntegrationCookieBridge, self).delete_flows("},{"line_number":50,"context_line":"            table_id\u003dtable_id, strict\u003dstrict, priority\u003dpriority,"},{"line_number":51,"context_line":"            cookie\u003d(cookie or self.default_cookie),"},{"line_number":52,"context_line":"            cookie_mask\u003d(cookie_mask or self.default_cookie_mask),"},{"line_number":53,"context_line":"            match\u003dmatch, **match_kwargs)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"fa7ab95a_80bf2b5f","line":52,"range":{"start_line":52,"start_character":40,"end_line":52,"end_character":64},"updated":"2016-09-01 11:45:43.000000000","message":"Why not use UINT64_BITMASK directly here ?\n(and get rid of ovs_lib.OVSBridge.get_default_cookie_mask)","commit_id":"2da7a1539cde18dcb6738fb12b767c3bdf6f911f"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"332f960253f18f3b7b7690aa3642ce362fff56e4","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        super(OVSIntegrationCookieBridge, self).delete_flows("},{"line_number":50,"context_line":"            table_id\u003dtable_id, strict\u003dstrict, priority\u003dpriority,"},{"line_number":51,"context_line":"            cookie\u003d(cookie or self.default_cookie),"},{"line_number":52,"context_line":"            cookie_mask\u003d(cookie_mask or self.default_cookie_mask),"},{"line_number":53,"context_line":"            match\u003dmatch, **match_kwargs)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"fa7ab95a_4c954331","line":52,"range":{"start_line":52,"start_character":40,"end_line":52,"end_character":64},"in_reply_to":"fa7ab95a_80bf2b5f","updated":"2016-09-01 18:10:54.000000000","message":"Done","commit_id":"2da7a1539cde18dcb6738fb12b767c3bdf6f911f"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"859c0fdf5c4f983653f3611225287bc898fdc60f","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        super(OVSTunnelCookieBridge, self).delete_flows("},{"line_number":78,"context_line":"            table_id\u003dtable_id, strict\u003dstrict, priority\u003dpriority,"},{"line_number":79,"context_line":"            cookie\u003d(cookie or self.default_cookie),"},{"line_number":80,"context_line":"            cookie_mask\u003d(cookie_mask or self.default_cookie_mask),"},{"line_number":81,"context_line":"            match\u003dmatch, **match_kwargs)"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa7ab95a_20abbf1e","line":80,"range":{"start_line":80,"start_character":40,"end_line":80,"end_character":64},"updated":"2016-09-01 11:45:43.000000000","message":"Ditto.","commit_id":"2da7a1539cde18dcb6738fb12b767c3bdf6f911f"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"332f960253f18f3b7b7690aa3642ce362fff56e4","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        super(OVSTunnelCookieBridge, self).delete_flows("},{"line_number":78,"context_line":"            table_id\u003dtable_id, strict\u003dstrict, priority\u003dpriority,"},{"line_number":79,"context_line":"            cookie\u003d(cookie or self.default_cookie),"},{"line_number":80,"context_line":"            cookie_mask\u003d(cookie_mask or self.default_cookie_mask),"},{"line_number":81,"context_line":"            match\u003dmatch, **match_kwargs)"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa7ab95a_aca40fa6","line":80,"range":{"start_line":80,"start_character":40,"end_line":80,"end_character":64},"in_reply_to":"fa7ab95a_20abbf1e","updated":"2016-09-01 18:10:54.000000000","message":"Done","commit_id":"2da7a1539cde18dcb6738fb12b767c3bdf6f911f"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"0cca0bbf8b24d798de22e0e54911a731cff797c2","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    def __new__(cls, int_br, **kwargs):"},{"line_number":37,"context_line":"        return new.new(br_int.OVSIntegrationBridge,"},{"line_number":38,"context_line":"                       OVSIntegrationCookieBridge,"},{"line_number":39,"context_line":"                       int_br)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def __init__(self, int_br, **kwargs):"},{"line_number":42,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":18,"id":"5a74a57a_17b24b94","line":39,"updated":"2016-11-28 09:45:11.000000000","message":"can you explain why this black magic is necessary?","commit_id":"3d56cfff517820f57fdd601c5f5634a20b5e2c47"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"585f3ca94d4979fd43d5affa8c6457f474aa6d80","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    def __new__(cls, int_br, **kwargs):"},{"line_number":37,"context_line":"        return new.new(br_int.OVSIntegrationBridge,"},{"line_number":38,"context_line":"                       OVSIntegrationCookieBridge,"},{"line_number":39,"context_line":"                       int_br)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def __init__(self, int_br, **kwargs):"},{"line_number":42,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a461143_5c20fe9b","line":39,"in_reply_to":"5a74a57a_17b24b94","updated":"2017-01-26 09:44:59.000000000","message":"The ultimate goal is to have a bridge that will behave just like the underlying bridge, except that all flow actions will act only on flows with a specific cookie.\n\nAs I understand (but I\u0027m not sure that I can explain everythin in this change), this is ensured by:\n(a) makeing a copy of the underlying bridge\n(b) setting its cookie to a new value [1]\n(c) setting its class to a class that shadows delete_flows with an implementation that applies the cookie, which the ovs_lib.OVSBridge.delete_flows does not do [2]\n\nThat said, giving some thought to this, I wonder if we couldn\u0027t implement things in a simpler way.  It seems that most of the complexity in this change is due to (c), because we need to change the class into a class that inherits from the classes of the underlying bridge.\n\nPerhaps we could do the following instead:\n- build a cookie-specific bridge by simply copying the bridge, and setting a new attribut \u0027bridge.cookie_specific\u0027 to True\n- change the delete_flows implementation in ovs_lib.OVSBridge so that if self.cookie_specific is set then it should use the cookie\n\n[1] https://review.openstack.org/#/c/326637/18/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_agent_extension_api.py line 49\n[2] https://github.com/openstack/neutron/blob/master/neutron/agent/common/ovs_lib.py#L297","commit_id":"3d56cfff517820f57fdd601c5f5634a20b5e2c47"}],"neutron/plugins/ml2/drivers/openvswitch/agent/openflow/native/br_int.py":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"0cca0bbf8b24d798de22e0e54911a731cff797c2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":18,"id":"5a74a57a_1756cb5b","line":266,"updated":"2016-11-28 09:45:11.000000000","message":"are there related to the rest of changes?","commit_id":"3d56cfff517820f57fdd601c5f5634a20b5e2c47"}],"neutron/plugins/ml2/drivers/openvswitch/agent/openflow/native/ofswitch.py":[{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"859c0fdf5c4f983653f3611225287bc898fdc60f","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        msg \u003d ofpp.OFPFlowMod(dp,"},{"line_number":183,"context_line":"                              table_id\u003dtable_id,"},{"line_number":184,"context_line":"                              cookie\u003dself.default_cookie,"},{"line_number":185,"context_line":"                              cookie_mask\u003dself.default_cookie_mask,"},{"line_number":186,"context_line":"                              match\u003dmatch,"},{"line_number":187,"context_line":"                              priority\u003dpriority,"},{"line_number":188,"context_line":"                              instructions\u003dinstructions)"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa7ab95a_c0477375","line":185,"range":{"start_line":185,"start_character":42,"end_line":185,"end_character":66},"updated":"2016-09-01 11:45:43.000000000","message":"Same: why not use UINT64_BITMASK directly here ?","commit_id":"2da7a1539cde18dcb6738fb12b767c3bdf6f911f"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"332f960253f18f3b7b7690aa3642ce362fff56e4","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        msg \u003d ofpp.OFPFlowMod(dp,"},{"line_number":183,"context_line":"                              table_id\u003dtable_id,"},{"line_number":184,"context_line":"                              cookie\u003dself.default_cookie,"},{"line_number":185,"context_line":"                              cookie_mask\u003dself.default_cookie_mask,"},{"line_number":186,"context_line":"                              match\u003dmatch,"},{"line_number":187,"context_line":"                              priority\u003dpriority,"},{"line_number":188,"context_line":"                              instructions\u003dinstructions)"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa7ab95a_6cada783","line":185,"range":{"start_line":185,"start_character":42,"end_line":185,"end_character":66},"in_reply_to":"fa7ab95a_c0477375","updated":"2016-09-01 18:10:54.000000000","message":"Done","commit_id":"2da7a1539cde18dcb6738fb12b767c3bdf6f911f"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"0cca0bbf8b24d798de22e0e54911a731cff797c2","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        msg \u003d ofpp.OFPFlowMod(dp,"},{"line_number":184,"context_line":"                              table_id\u003dtable_id,"},{"line_number":185,"context_line":"                              cookie\u003dself.default_cookie,"},{"line_number":186,"context_line":"                              cookie_mask\u003dovs_lib.UINT64_BITMASK,"},{"line_number":187,"context_line":"                              match\u003dmatch,"},{"line_number":188,"context_line":"                              priority\u003dpriority,"},{"line_number":189,"context_line":"                              instructions\u003dinstructions)"}],"source_content_type":"text/x-python","patch_set":18,"id":"5a74a57a_3cdc8c72","line":186,"updated":"2016-11-28 09:45:11.000000000","message":"is this necessary?\ni thought the mask was for modify and delete.","commit_id":"3d56cfff517820f57fdd601c5f5634a20b5e2c47"}],"neutron/plugins/ml2/drivers/openvswitch/agent/openflow/native/ovs_ryuapp.py":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"0cca0bbf8b24d798de22e0e54911a731cff797c2","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            \u0027br_phys\u0027: _make_br_cls(br_phys.OVSPhysicalBridge),"},{"line_number":73,"context_line":"            \u0027br_tun\u0027: _make_br_cls(br_tun.OVSTunnelBridge),"},{"line_number":74,"context_line":"            \u0027br_int_cookie\u0027: br_cookie.OVSIntegrationCookieBridge,"},{"line_number":75,"context_line":"            \u0027br_tun_cookie\u0027: br_cookie.OVSTunnelCookieBridge,"},{"line_number":76,"context_line":"        }"},{"line_number":77,"context_line":"        return hub.spawn(agent_main_wrapper, bridge_classes, self)"}],"source_content_type":"text/x-python","patch_set":18,"id":"5a74a57a_7ce0c496","line":75,"updated":"2016-11-28 09:45:11.000000000","message":"why you can\u0027t use _make_br_cls?\nit\u0027s better to avoid passing kwargs everywhere.","commit_id":"3d56cfff517820f57fdd601c5f5634a20b5e2c47"}],"neutron/plugins/ml2/drivers/openvswitch/agent/openflow/ovs_ofctl/br_cookie.py":[{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"3d9033d1658441334b3f88c5541bf581a746350b","unresolved":false,"context_lines":[{"line_number":20,"context_line":"    import br_tun"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class OVSIntegrationCookieBridge(br_int.OVSIntegrationBridge):"},{"line_number":24,"context_line":"    \u0027\u0027\u0027Wrapper bridge adding cookies before calling the inherited bridge"},{"line_number":25,"context_line":"    This class creates a bridge that will override (add/mod/del/dump)_flow"},{"line_number":26,"context_line":"    calls for which a cookie (reserved at init/wrapping from the underlying"}],"source_content_type":"text/x-python","patch_set":5,"id":"dada55a8_00d933f3","line":23,"updated":"2016-07-27 09:03:14.000000000","message":"Ditto on comment in native version.","commit_id":"2912ce2aef27f675295d4f5f3a6720f85636229e"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"5b30232154bf7c17a7e0a8aa4bf7ffce089b2c5b","unresolved":false,"context_lines":[{"line_number":20,"context_line":"    import br_tun"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class OVSIntegrationCookieBridge(br_int.OVSIntegrationBridge):"},{"line_number":24,"context_line":"    \u0027\u0027\u0027Wrapper bridge adding cookies before calling the inherited bridge"},{"line_number":25,"context_line":"    This class creates a bridge that will override (add/mod/del/dump)_flow"},{"line_number":26,"context_line":"    calls for which a cookie (reserved at init/wrapping from the underlying"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_2c32bb5f","line":23,"in_reply_to":"dada55a8_00d933f3","updated":"2016-07-29 16:36:46.000000000","message":"Done","commit_id":"2912ce2aef27f675295d4f5f3a6720f85636229e"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"d1136a24efcab8a0c709abcf6e3050d294640eea","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class OVSOfctlCookieBridge(br_int.OVSIntegrationBridge):"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def add_flow(self, **kwargs):"},{"line_number":27,"context_line":"        self.do_action_flows(\u0027add\u0027, [kwargs])"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def mod_flow(self, **kwargs):"},{"line_number":30,"context_line":"        self.do_action_flows(\u0027mod\u0027, [kwargs])"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def delete_flows(self, **kwargs):"},{"line_number":33,"context_line":"        self.do_action_flows(\u0027del\u0027, [kwargs])"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"class OVSIntegrationCookieBridge(OVSOfctlCookieBridge,"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa7ab95a_285da8ec","line":33,"range":{"start_line":26,"start_character":0,"end_line":33,"end_character":45},"updated":"2016-08-31 15:07:40.000000000","message":"I\u0027m not sure why/if it is necessary to define these, because it\u0027s just the same as the ovs_lib.OVSBrige implementation.","commit_id":"e5f4840983c51a52ed9696bf9f1b820c62b2da6d"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"95daf71e3066be180b4e6d1efe178f803517f514","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class OVSOfctlCookieBridge(br_int.OVSIntegrationBridge):"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def add_flow(self, **kwargs):"},{"line_number":27,"context_line":"        self.do_action_flows(\u0027add\u0027, [kwargs])"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def mod_flow(self, **kwargs):"},{"line_number":30,"context_line":"        self.do_action_flows(\u0027mod\u0027, [kwargs])"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def delete_flows(self, **kwargs):"},{"line_number":33,"context_line":"        self.do_action_flows(\u0027del\u0027, [kwargs])"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"class OVSIntegrationCookieBridge(OVSOfctlCookieBridge,"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa7ab95a_bd153c4a","line":33,"range":{"start_line":26,"start_character":0,"end_line":33,"end_character":45},"in_reply_to":"fa7ab95a_285da8ec","updated":"2016-09-01 11:25:23.000000000","message":"Done. Yes we don\u0027t need them, do_action_flows() override is enough.","commit_id":"e5f4840983c51a52ed9696bf9f1b820c62b2da6d"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"d1136a24efcab8a0c709abcf6e3050d294640eea","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        # is added, but I think we need to keep it so that"},{"line_number":56,"context_line":"        # an extension does not delete flows of another"},{"line_number":57,"context_line":"        # extension"},{"line_number":58,"context_line":"        for kw in kwargs_list:"},{"line_number":59,"context_line":"            kw.setdefault(\u0027cookie\u0027, self.default_cookie)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"            if action is \u0027mod\u0027 or action is \u0027del\u0027:"},{"line_number":62,"context_line":"                kw[\u0027cookie\u0027] \u003d ovs_lib.check_cookie_mask(str(kw[\u0027cookie\u0027]))"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        super(OVSIntegrationCookieBridge, self).do_action_flows(action,"},{"line_number":65,"context_line":"                                                                kwargs_list)"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa7ab95a_cf7b5b7a","line":62,"range":{"start_line":58,"start_character":0,"end_line":62,"end_character":75},"updated":"2016-08-31 15:07:40.000000000","message":"This code is repeated in the two classes, it would be good to move it in a local helper function that would then be called from each class do_action_flow method.","commit_id":"e5f4840983c51a52ed9696bf9f1b820c62b2da6d"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"95daf71e3066be180b4e6d1efe178f803517f514","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        # is added, but I think we need to keep it so that"},{"line_number":56,"context_line":"        # an extension does not delete flows of another"},{"line_number":57,"context_line":"        # extension"},{"line_number":58,"context_line":"        for kw in kwargs_list:"},{"line_number":59,"context_line":"            kw.setdefault(\u0027cookie\u0027, self.default_cookie)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"            if action is \u0027mod\u0027 or action is \u0027del\u0027:"},{"line_number":62,"context_line":"                kw[\u0027cookie\u0027] \u003d ovs_lib.check_cookie_mask(str(kw[\u0027cookie\u0027]))"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        super(OVSIntegrationCookieBridge, self).do_action_flows(action,"},{"line_number":65,"context_line":"                                                                kwargs_list)"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa7ab95a_6026a7bb","line":62,"range":{"start_line":58,"start_character":0,"end_line":62,"end_character":75},"in_reply_to":"fa7ab95a_cf7b5b7a","updated":"2016-09-01 11:25:23.000000000","message":"Done","commit_id":"e5f4840983c51a52ed9696bf9f1b820c62b2da6d"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"d1136a24efcab8a0c709abcf6e3050d294640eea","unresolved":false,"context_lines":[{"line_number":65,"context_line":"                                                                kwargs_list)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"class OVSTunnelCookieBridge(OVSOfctlCookieBridge, br_tun.OVSTunnelBridge):"},{"line_number":69,"context_line":"    \u0027\u0027\u0027Wrapper bridge adding cookies before calling the inherited bridge"},{"line_number":70,"context_line":"    This class creates a bridge that will override (add/mod/del/dump)_flow"},{"line_number":71,"context_line":"    calls for which a cookie (reserved at init/wrapping from the underlying"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa7ab95a_48090cdd","line":68,"range":{"start_line":68,"start_character":28,"end_line":68,"end_character":48},"updated":"2016-08-31 15:07:40.000000000","message":"There seems to be an inheritance issue here: OVSTunnelCookieBridge inherits from br_int.OVSIntegrationBridge via OVSOfctlCookieBridge, although it is not an integration bridge.\n\nI wonder if this OVSOfctlCookieBridge class is useful.","commit_id":"e5f4840983c51a52ed9696bf9f1b820c62b2da6d"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"95daf71e3066be180b4e6d1efe178f803517f514","unresolved":false,"context_lines":[{"line_number":65,"context_line":"                                                                kwargs_list)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"class OVSTunnelCookieBridge(OVSOfctlCookieBridge, br_tun.OVSTunnelBridge):"},{"line_number":69,"context_line":"    \u0027\u0027\u0027Wrapper bridge adding cookies before calling the inherited bridge"},{"line_number":70,"context_line":"    This class creates a bridge that will override (add/mod/del/dump)_flow"},{"line_number":71,"context_line":"    calls for which a cookie (reserved at init/wrapping from the underlying"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa7ab95a_0036bbe6","line":68,"range":{"start_line":68,"start_character":28,"end_line":68,"end_character":48},"in_reply_to":"fa7ab95a_48090cdd","updated":"2016-09-01 11:25:23.000000000","message":"Done, the class is retained for housing the helper/common functions.","commit_id":"e5f4840983c51a52ed9696bf9f1b820c62b2da6d"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"859c0fdf5c4f983653f3611225287bc898fdc60f","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class OVSOfctlCookieBridge(object):"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def modify_cookie_mask(self, action, kwargs_list):"},{"line_number":27,"context_line":"        # NOTE(tmorin): the OVSBridge code is excluding the \u0027del\u0027"},{"line_number":28,"context_line":"        # action from this step where a cookie"},{"line_number":29,"context_line":"        # is added, but I think we need to keep it so that"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa7ab95a_93b6a788","line":26,"range":{"start_line":26,"start_character":8,"end_line":26,"end_character":26},"updated":"2016-09-01 11:45:43.000000000","message":"The name of the method does not reflect what the method does:\n* the method adds the cookie mask if none has been provided (for \u0027mod\u0027 and \u0027del\u0027)\n* more important: the method sets the cookie to the default cookie, even for the \u0027del\u0027 action\n\nWhy not simply call it fix_cookie_and_cookie_mask ?","commit_id":"2da7a1539cde18dcb6738fb12b767c3bdf6f911f"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"332f960253f18f3b7b7690aa3642ce362fff56e4","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class OVSOfctlCookieBridge(object):"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def modify_cookie_mask(self, action, kwargs_list):"},{"line_number":27,"context_line":"        # NOTE(tmorin): the OVSBridge code is excluding the \u0027del\u0027"},{"line_number":28,"context_line":"        # action from this step where a cookie"},{"line_number":29,"context_line":"        # is added, but I think we need to keep it so that"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa7ab95a_accb2f52","line":26,"range":{"start_line":26,"start_character":8,"end_line":26,"end_character":26},"in_reply_to":"fa7ab95a_93b6a788","updated":"2016-09-01 18:10:54.000000000","message":"Done","commit_id":"2da7a1539cde18dcb6738fb12b767c3bdf6f911f"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"859c0fdf5c4f983653f3611225287bc898fdc60f","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"class OVSIntegrationCookieBridge(OVSOfctlCookieBridge,"},{"line_number":40,"context_line":"                                 br_int.OVSIntegrationBridge):"},{"line_number":41,"context_line":"    \u0027\u0027\u0027Wrapper bridge adding cookies before calling the inherited bridge"},{"line_number":42,"context_line":"    This class creates a bridge that will override (add/mod/del/dump)_flow"},{"line_number":43,"context_line":"    calls for which a cookie (reserved at init/wrapping from the underlying"},{"line_number":44,"context_line":"    bridge) will be added before calling the underlying bridge."},{"line_number":45,"context_line":"    \u0027\u0027\u0027"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def __new__(cls, int_br, **kwargs):"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa7ab95a_9344e774","line":44,"range":{"start_line":41,"start_character":7,"end_line":44,"end_character":63},"updated":"2016-09-01 11:45:43.000000000","message":"(Description does not match what the code actually does)","commit_id":"2da7a1539cde18dcb6738fb12b767c3bdf6f911f"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"332f960253f18f3b7b7690aa3642ce362fff56e4","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"class OVSIntegrationCookieBridge(OVSOfctlCookieBridge,"},{"line_number":40,"context_line":"                                 br_int.OVSIntegrationBridge):"},{"line_number":41,"context_line":"    \u0027\u0027\u0027Wrapper bridge adding cookies before calling the inherited bridge"},{"line_number":42,"context_line":"    This class creates a bridge that will override (add/mod/del/dump)_flow"},{"line_number":43,"context_line":"    calls for which a cookie (reserved at init/wrapping from the underlying"},{"line_number":44,"context_line":"    bridge) will be added before calling the underlying bridge."},{"line_number":45,"context_line":"    \u0027\u0027\u0027"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def __new__(cls, int_br, **kwargs):"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa7ab95a_0cbfbbaa","line":44,"range":{"start_line":41,"start_character":7,"end_line":44,"end_character":63},"in_reply_to":"fa7ab95a_9344e774","updated":"2016-09-01 18:10:54.000000000","message":"Done","commit_id":"2da7a1539cde18dcb6738fb12b767c3bdf6f911f"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"859c0fdf5c4f983653f3611225287bc898fdc60f","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"class OVSTunnelCookieBridge(OVSOfctlCookieBridge, br_tun.OVSTunnelBridge):"},{"line_number":62,"context_line":"    \u0027\u0027\u0027Wrapper bridge adding cookies before calling the inherited bridge"},{"line_number":63,"context_line":"    This class creates a bridge that will override (add/mod/del/dump)_flow"},{"line_number":64,"context_line":"    calls for which a cookie (reserved at init/wrapping from the underlying"},{"line_number":65,"context_line":"    bridge) will be added before calling the underlying bridge."},{"line_number":66,"context_line":"    \u0027\u0027\u0027"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def __new__(cls, tun_br, **kwargs):"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa7ab95a_337ddbb1","line":65,"range":{"start_line":62,"start_character":72,"end_line":65,"end_character":63},"updated":"2016-09-01 11:45:43.000000000","message":"(Description does not match what the code actually does)","commit_id":"2da7a1539cde18dcb6738fb12b767c3bdf6f911f"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"332f960253f18f3b7b7690aa3642ce362fff56e4","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"class OVSTunnelCookieBridge(OVSOfctlCookieBridge, br_tun.OVSTunnelBridge):"},{"line_number":62,"context_line":"    \u0027\u0027\u0027Wrapper bridge adding cookies before calling the inherited bridge"},{"line_number":63,"context_line":"    This class creates a bridge that will override (add/mod/del/dump)_flow"},{"line_number":64,"context_line":"    calls for which a cookie (reserved at init/wrapping from the underlying"},{"line_number":65,"context_line":"    bridge) will be added before calling the underlying bridge."},{"line_number":66,"context_line":"    \u0027\u0027\u0027"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def __new__(cls, tun_br, **kwargs):"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa7ab95a_ec7457ff","line":65,"range":{"start_line":62,"start_character":72,"end_line":65,"end_character":63},"in_reply_to":"fa7ab95a_337ddbb1","updated":"2016-09-01 18:10:54.000000000","message":"Done","commit_id":"2da7a1539cde18dcb6738fb12b767c3bdf6f911f"}],"neutron/plugins/ml2/drivers/openvswitch/agent/ovs_agent_extension_api.py":[{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"d1136a24efcab8a0c709abcf6e3050d294640eea","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from neutron.plugins.ml2.drivers.openvswitch import agent"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class OVSCookieBridge(object):"},{"line_number":22,"context_line":"    \u0027\u0027\u0027Wrapper generic cookie bridge adding cookies before returning the"},{"line_number":23,"context_line":"    underlying cookie bridge."},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"fa7ab95a_926d08cf","line":21,"range":{"start_line":21,"start_character":6,"end_line":21,"end_character":21},"updated":"2016-08-31 15:07:40.000000000","message":"This is a factory class (having methods to instantiate integration or tunnel bridges), rather than a class implementing a bridge.  I think the class name should reflect that (perhaps adding Factory).\n\nSomething like _factory should also appear in the name of instances of this class (e.g. in ovs_neutron_agent.py).","commit_id":"e5f4840983c51a52ed9696bf9f1b820c62b2da6d"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"95daf71e3066be180b4e6d1efe178f803517f514","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from neutron.plugins.ml2.drivers.openvswitch import agent"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class OVSCookieBridge(object):"},{"line_number":22,"context_line":"    \u0027\u0027\u0027Wrapper generic cookie bridge adding cookies before returning the"},{"line_number":23,"context_line":"    underlying cookie bridge."},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"fa7ab95a_c07133aa","line":21,"range":{"start_line":21,"start_character":6,"end_line":21,"end_character":21},"in_reply_to":"fa7ab95a_926d08cf","updated":"2016-09-01 11:25:23.000000000","message":"Done","commit_id":"e5f4840983c51a52ed9696bf9f1b820c62b2da6d"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"d1136a24efcab8a0c709abcf6e3050d294640eea","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    \u0027\u0027\u0027Wrapper generic cookie bridge adding cookies before returning the"},{"line_number":23,"context_line":"    underlying cookie bridge."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    This class creates integration and tunnel cookie bridges that will pass"},{"line_number":26,"context_line":"    all calls to its underlying bridge, except the ones that will override"},{"line_number":27,"context_line":"    calls for which a cookie (reserved at init/wrapping from the underlying"},{"line_number":28,"context_line":"    bridge) will be added before calling the underlying bridge."},{"line_number":29,"context_line":"    \u0027\u0027\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa7ab95a_13765a3e","line":26,"range":{"start_line":25,"start_character":66,"end_line":26,"end_character":38},"updated":"2016-08-31 15:07:40.000000000","message":"I\u0027m not sure that \"pass all calls to the underlying bridge\" matches what the implementation does. Given that the __new__ method of for instance ovs_ofctl.br_cookie.OVSTunnelCookieBridge does an agent.__new__ which does a copy, the call is not passed to the underlying bridge, but made on an object that initially was copied from the underlying bridge.\n\nThis is possibly more than just a matter of properly wording the explanation, because it introduces the (perhaps new) assumption that the bridge implementations are compatible with shallow copies of their objects.  I haven\u0027t checked whether it is reasonable to make this assumption given the current state of these implementations.\n\nThis is I believe something that require more eyes to make sure the right thing is done, and will require being documented/remembered.","commit_id":"e5f4840983c51a52ed9696bf9f1b820c62b2da6d"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"95daf71e3066be180b4e6d1efe178f803517f514","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    \u0027\u0027\u0027Wrapper generic cookie bridge adding cookies before returning the"},{"line_number":23,"context_line":"    underlying cookie bridge."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    This class creates integration and tunnel cookie bridges that will pass"},{"line_number":26,"context_line":"    all calls to its underlying bridge, except the ones that will override"},{"line_number":27,"context_line":"    calls for which a cookie (reserved at init/wrapping from the underlying"},{"line_number":28,"context_line":"    bridge) will be added before calling the underlying bridge."},{"line_number":29,"context_line":"    \u0027\u0027\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa7ab95a_c0a853de","line":26,"range":{"start_line":25,"start_character":66,"end_line":26,"end_character":38},"in_reply_to":"fa7ab95a_13765a3e","updated":"2016-09-01 11:25:23.000000000","message":"Done. Modified the comments. I believe shallow copy will suffice. I am not so sure about the side effects it may have as you mentioned. Requesting others to voice their opinion as well.\nI know of a deepcopy() function, but knowingly thought of not using it.","commit_id":"e5f4840983c51a52ed9696bf9f1b820c62b2da6d"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"d1136a24efcab8a0c709abcf6e3050d294640eea","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        Wraps an integration bridge object and returns a cookied one."},{"line_number":45,"context_line":"        \"\"\""},{"line_number":46,"context_line":"        new_cookie \u003d br_int.request_cookie()"},{"line_number":47,"context_line":"        wrapped_br \u003d agent.new(self.br_int_cookie_cls, br_int)"},{"line_number":48,"context_line":"        wrapped_br.set_agent_uuid_stamp(new_cookie)"},{"line_number":49,"context_line":"        return wrapped_br"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"fa7ab95a_52e8e016","line":47,"range":{"start_line":47,"start_character":8,"end_line":47,"end_character":19},"updated":"2016-08-31 15:07:40.000000000","message":"\u0027cookie_br\u0027 would be better than \u0027wrapped_br\u0027 here:\n- assuming the object is wrapping br_int, br_int is the one \u0027wrapped\u0027 inside the object), so the newly created object is not \u0027wrapped\u0027\n- given that the operation done is not \u0027wrapping\u0027 calls, but \u0027doing calls on a copy of the object\u0027, \"wrap\" is probably not the better term","commit_id":"e5f4840983c51a52ed9696bf9f1b820c62b2da6d"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"d1136a24efcab8a0c709abcf6e3050d294640eea","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        Wraps an integration bridge object and returns a cookied one."},{"line_number":45,"context_line":"        \"\"\""},{"line_number":46,"context_line":"        new_cookie \u003d br_int.request_cookie()"},{"line_number":47,"context_line":"        wrapped_br \u003d agent.new(self.br_int_cookie_cls, br_int)"},{"line_number":48,"context_line":"        wrapped_br.set_agent_uuid_stamp(new_cookie)"},{"line_number":49,"context_line":"        return wrapped_br"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"fa7ab95a_cd0b712a","line":47,"range":{"start_line":47,"start_character":21,"end_line":47,"end_character":62},"updated":"2016-08-31 15:07:40.000000000","message":"Is agent.new a useful helper ?\nWhy not simply self.br_int_cookie_cls(br_int) ?","commit_id":"e5f4840983c51a52ed9696bf9f1b820c62b2da6d"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"95daf71e3066be180b4e6d1efe178f803517f514","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        Wraps an integration bridge object and returns a cookied one."},{"line_number":45,"context_line":"        \"\"\""},{"line_number":46,"context_line":"        new_cookie \u003d br_int.request_cookie()"},{"line_number":47,"context_line":"        wrapped_br \u003d agent.new(self.br_int_cookie_cls, br_int)"},{"line_number":48,"context_line":"        wrapped_br.set_agent_uuid_stamp(new_cookie)"},{"line_number":49,"context_line":"        return wrapped_br"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"fa7ab95a_a0ca6f9f","line":47,"range":{"start_line":47,"start_character":8,"end_line":47,"end_character":19},"in_reply_to":"fa7ab95a_52e8e016","updated":"2016-09-01 11:25:23.000000000","message":"Done","commit_id":"e5f4840983c51a52ed9696bf9f1b820c62b2da6d"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"95daf71e3066be180b4e6d1efe178f803517f514","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        Wraps an integration bridge object and returns a cookied one."},{"line_number":45,"context_line":"        \"\"\""},{"line_number":46,"context_line":"        new_cookie \u003d br_int.request_cookie()"},{"line_number":47,"context_line":"        wrapped_br \u003d agent.new(self.br_int_cookie_cls, br_int)"},{"line_number":48,"context_line":"        wrapped_br.set_agent_uuid_stamp(new_cookie)"},{"line_number":49,"context_line":"        return wrapped_br"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"fa7ab95a_20bf3ffc","line":47,"range":{"start_line":47,"start_character":21,"end_line":47,"end_character":62},"in_reply_to":"fa7ab95a_cd0b712a","updated":"2016-09-01 11:25:23.000000000","message":"Done","commit_id":"e5f4840983c51a52ed9696bf9f1b820c62b2da6d"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"859c0fdf5c4f983653f3611225287bc898fdc60f","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"class OVSCookieBridgeFactory(object):"},{"line_number":20,"context_line":"    \u0027\u0027\u0027Wrapper generic cookie bridge adding cookies before returning the"},{"line_number":21,"context_line":"    underlying cookie bridge."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    This class creates integration and tunnel cookie bridges that are"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa7ab95a_60886723","line":20,"range":{"start_line":20,"start_character":7,"end_line":20,"end_character":36},"updated":"2016-09-01 11:45:43.000000000","message":"(I can\u0027t parse the start of this sentence)","commit_id":"2da7a1539cde18dcb6738fb12b767c3bdf6f911f"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"332f960253f18f3b7b7690aa3642ce362fff56e4","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"class OVSCookieBridgeFactory(object):"},{"line_number":20,"context_line":"    \u0027\u0027\u0027Wrapper generic cookie bridge adding cookies before returning the"},{"line_number":21,"context_line":"    underlying cookie bridge."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    This class creates integration and tunnel cookie bridges that are"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa7ab95a_ccd953f5","line":20,"range":{"start_line":20,"start_character":7,"end_line":20,"end_character":36},"in_reply_to":"fa7ab95a_60886723","updated":"2016-09-01 18:10:54.000000000","message":"Done. Modified.","commit_id":"2da7a1539cde18dcb6738fb12b767c3bdf6f911f"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"859c0fdf5c4f983653f3611225287bc898fdc60f","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    underlying cookie bridge."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    This class creates integration and tunnel cookie bridges that are"},{"line_number":24,"context_line":"    shallow copies of the main underlying bridge. It overrides calls"},{"line_number":25,"context_line":"    for which a cookie (reserved at injection of the underlying bridge)"},{"line_number":26,"context_line":"    will be added before calling the super/original methods of the"},{"line_number":27,"context_line":"    underlying bridge class."}],"source_content_type":"text/x-python","patch_set":14,"id":"fa7ab95a_b30c8b3c","line":24,"range":{"start_line":24,"start_character":42,"end_line":24,"end_character":48},"updated":"2016-09-01 11:45:43.000000000","message":"bridges","commit_id":"2da7a1539cde18dcb6738fb12b767c3bdf6f911f"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"332f960253f18f3b7b7690aa3642ce362fff56e4","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    underlying cookie bridge."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    This class creates integration and tunnel cookie bridges that are"},{"line_number":24,"context_line":"    shallow copies of the main underlying bridge. It overrides calls"},{"line_number":25,"context_line":"    for which a cookie (reserved at injection of the underlying bridge)"},{"line_number":26,"context_line":"    will be added before calling the super/original methods of the"},{"line_number":27,"context_line":"    underlying bridge class."}],"source_content_type":"text/x-python","patch_set":14,"id":"fa7ab95a_ecf9b74f","line":24,"range":{"start_line":24,"start_character":42,"end_line":24,"end_character":48},"in_reply_to":"fa7ab95a_b30c8b3c","updated":"2016-09-01 18:10:54.000000000","message":"Done","commit_id":"2da7a1539cde18dcb6738fb12b767c3bdf6f911f"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"859c0fdf5c4f983653f3611225287bc898fdc60f","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    underlying cookie bridge."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    This class creates integration and tunnel cookie bridges that are"},{"line_number":24,"context_line":"    shallow copies of the main underlying bridge. It overrides calls"},{"line_number":25,"context_line":"    for which a cookie (reserved at injection of the underlying bridge)"},{"line_number":26,"context_line":"    will be added before calling the super/original methods of the"},{"line_number":27,"context_line":"    underlying bridge class."},{"line_number":28,"context_line":"    \u0027\u0027\u0027"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def __init__(self, br_int_cookie_cls_type, br_tun_cookie_cls_type,"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa7ab95a_d3410f3b","line":27,"range":{"start_line":24,"start_character":50,"end_line":27,"end_character":28},"updated":"2016-09-01 11:45:43.000000000","message":"\"In each copy, the cookie used for flows will be a cookie distinct from the one of the underlying bridge.\"","commit_id":"2da7a1539cde18dcb6738fb12b767c3bdf6f911f"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"332f960253f18f3b7b7690aa3642ce362fff56e4","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    underlying cookie bridge."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    This class creates integration and tunnel cookie bridges that are"},{"line_number":24,"context_line":"    shallow copies of the main underlying bridge. It overrides calls"},{"line_number":25,"context_line":"    for which a cookie (reserved at injection of the underlying bridge)"},{"line_number":26,"context_line":"    will be added before calling the super/original methods of the"},{"line_number":27,"context_line":"    underlying bridge class."},{"line_number":28,"context_line":"    \u0027\u0027\u0027"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def __init__(self, br_int_cookie_cls_type, br_tun_cookie_cls_type,"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa7ab95a_0cf7bb59","line":27,"range":{"start_line":24,"start_character":50,"end_line":27,"end_character":28},"in_reply_to":"fa7ab95a_d3410f3b","updated":"2016-09-01 18:10:54.000000000","message":"Done","commit_id":"2da7a1539cde18dcb6738fb12b767c3bdf6f911f"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"859c0fdf5c4f983653f3611225287bc898fdc60f","unresolved":false,"context_lines":[{"line_number":31,"context_line":"                 **kwargs):"},{"line_number":32,"context_line":"        self.br_int_cookie_cls_type \u003d br_int_cookie_cls_type"},{"line_number":33,"context_line":"        self.br_tun_cookie_cls_type \u003d br_tun_cookie_cls_type"},{"line_number":34,"context_line":"        self.br_int_cookie_cls \u003d functools.partial("},{"line_number":35,"context_line":"            self.br_int_cookie_cls_type, ryu_app\u003dkwargs.get(\u0027ryu_app\u0027))"},{"line_number":36,"context_line":"        self.br_tun_cookie_cls \u003d functools.partial("},{"line_number":37,"context_line":"            self.br_tun_cookie_cls_type, ryu_app\u003dkwargs.get(\u0027ryu_app\u0027))"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def request_int_br(self, br_int):"},{"line_number":40,"context_line":"        \"\"\"Allows extensions to request an integration bridge to use for"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa7ab95a_f6bfe1f9","line":37,"range":{"start_line":34,"start_character":8,"end_line":37,"end_character":71},"updated":"2016-09-01 11:45:43.000000000","message":"Why not do these functools.partial calls in ovs_ryuapp.OVSNeutronAgentRyuApp.start, like for other bridge classes ?\n\nIt seem that it would avoid:\n- having ryu specific code in this class\n- having to pass kwargs to OVSCookieBridge factory","commit_id":"2da7a1539cde18dcb6738fb12b767c3bdf6f911f"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"332f960253f18f3b7b7690aa3642ce362fff56e4","unresolved":false,"context_lines":[{"line_number":31,"context_line":"                 **kwargs):"},{"line_number":32,"context_line":"        self.br_int_cookie_cls_type \u003d br_int_cookie_cls_type"},{"line_number":33,"context_line":"        self.br_tun_cookie_cls_type \u003d br_tun_cookie_cls_type"},{"line_number":34,"context_line":"        self.br_int_cookie_cls \u003d functools.partial("},{"line_number":35,"context_line":"            self.br_int_cookie_cls_type, ryu_app\u003dkwargs.get(\u0027ryu_app\u0027))"},{"line_number":36,"context_line":"        self.br_tun_cookie_cls \u003d functools.partial("},{"line_number":37,"context_line":"            self.br_tun_cookie_cls_type, ryu_app\u003dkwargs.get(\u0027ryu_app\u0027))"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def request_int_br(self, br_int):"},{"line_number":40,"context_line":"        \"\"\"Allows extensions to request an integration bridge to use for"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa7ab95a_2c4b9f88","line":37,"range":{"start_line":34,"start_character":8,"end_line":37,"end_character":71},"in_reply_to":"fa7ab95a_f6bfe1f9","updated":"2016-09-01 18:10:54.000000000","message":"I\u0027ve tried this, but it felt a bit awkward. We need the type and partial class for shallow copy injection. And creating and passing from within ryu specific files meant passing in both the type and the partial class. For ofctl there is nothing like this, so we have to pass None there, and then check for None and create a partial class afterwards in that case!!!\n\nThat made me move to this model, passing in only the type, which I think is neat.\nryu specific code is now removed.","commit_id":"2da7a1539cde18dcb6738fb12b767c3bdf6f911f"}],"neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py":[{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"3d9033d1658441334b3f88c5541bf581a746350b","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        # init cookie bridge partial classes and types."},{"line_number":221,"context_line":"        (br_int_cookie_cls_type, br_tun_cookie_cls_type) \u003d ("},{"line_number":222,"context_line":"            bridge_classes[b]"},{"line_number":223,"context_line":"            for b in (\u0027br_int_cookie\u0027, \u0027br_tun_cookie\u0027))"},{"line_number":224,"context_line":"        # Creates a wrapper cookie bridge."},{"line_number":225,"context_line":"        self.cookie_br \u003d ovs_ext_api.OVSCookieBridge("},{"line_number":226,"context_line":"            br_int_cookie_cls_type, br_tun_cookie_cls_type, **kwargs)"}],"source_content_type":"text/x-python","patch_set":5,"id":"dada55a8_03949d88","line":223,"range":{"start_line":223,"start_character":12,"end_line":223,"end_character":55},"updated":"2016-07-27 09:03:14.000000000","message":"This is causing tests to fail on a key error.","commit_id":"2912ce2aef27f675295d4f5f3a6720f85636229e"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"5b30232154bf7c17a7e0a8aa4bf7ffce089b2c5b","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        # init cookie bridge partial classes and types."},{"line_number":221,"context_line":"        (br_int_cookie_cls_type, br_tun_cookie_cls_type) \u003d ("},{"line_number":222,"context_line":"            bridge_classes[b]"},{"line_number":223,"context_line":"            for b in (\u0027br_int_cookie\u0027, \u0027br_tun_cookie\u0027))"},{"line_number":224,"context_line":"        # Creates a wrapper cookie bridge."},{"line_number":225,"context_line":"        self.cookie_br \u003d ovs_ext_api.OVSCookieBridge("},{"line_number":226,"context_line":"            br_int_cookie_cls_type, br_tun_cookie_cls_type, **kwargs)"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_acafcb28","line":223,"range":{"start_line":223,"start_character":12,"end_line":223,"end_character":55},"in_reply_to":"dada55a8_03949d88","updated":"2016-07-29 16:36:46.000000000","message":"I haven\u0027t yet looked into unit tests. Some minor mods have been made in unit test code, just to pass pep8 and minor ones.\n\nI am waiting for other reviewers like Thomas Morin to chip in as well, so that the refactoring structure is finalized. Once that\u0027s done, I\u0027ll plan on the unit test cases/code. Otherwise there would be a ton of rework! :-)","commit_id":"2912ce2aef27f675295d4f5f3a6720f85636229e"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"d1136a24efcab8a0c709abcf6e3050d294640eea","unresolved":false,"context_lines":[{"line_number":203,"context_line":"            # here inside the call to setup_tunnel_br()"},{"line_number":204,"context_line":"            self.setup_tunnel_br(ovs_conf.tunnel_bridge)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"        # init cookie bridge partial classes and types."},{"line_number":207,"context_line":"        (br_int_cookie_cls_type, br_tun_cookie_cls_type) \u003d ("},{"line_number":208,"context_line":"            bridge_classes[b]"},{"line_number":209,"context_line":"            for b in (\u0027br_int_cookie\u0027, \u0027br_tun_cookie\u0027))"},{"line_number":210,"context_line":"        # Creates a wrapper cookie bridge."},{"line_number":211,"context_line":"        self.cookie_br \u003d ovs_ext_api.OVSCookieBridge("},{"line_number":212,"context_line":"            br_int_cookie_cls_type, br_tun_cookie_cls_type, **kwargs)"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"        self.init_extension_manager(self.connection)"},{"line_number":215,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"fa7ab95a_782f85f6","line":212,"range":{"start_line":206,"start_character":1,"end_line":212,"end_character":69},"updated":"2016-08-31 15:07:40.000000000","message":"All this could be done inside .init_extension_manager, and cookie_br (or cookie_br_factory, assuming its renamed) does not need to be under self (can be locally scope inside .init_extension_manager).","commit_id":"e5f4840983c51a52ed9696bf9f1b820c62b2da6d"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"95daf71e3066be180b4e6d1efe178f803517f514","unresolved":false,"context_lines":[{"line_number":203,"context_line":"            # here inside the call to setup_tunnel_br()"},{"line_number":204,"context_line":"            self.setup_tunnel_br(ovs_conf.tunnel_bridge)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"        # init cookie bridge partial classes and types."},{"line_number":207,"context_line":"        (br_int_cookie_cls_type, br_tun_cookie_cls_type) \u003d ("},{"line_number":208,"context_line":"            bridge_classes[b]"},{"line_number":209,"context_line":"            for b in (\u0027br_int_cookie\u0027, \u0027br_tun_cookie\u0027))"},{"line_number":210,"context_line":"        # Creates a wrapper cookie bridge."},{"line_number":211,"context_line":"        self.cookie_br \u003d ovs_ext_api.OVSCookieBridge("},{"line_number":212,"context_line":"            br_int_cookie_cls_type, br_tun_cookie_cls_type, **kwargs)"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"        self.init_extension_manager(self.connection)"},{"line_number":215,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"fa7ab95a_409b6372","line":212,"range":{"start_line":206,"start_character":1,"end_line":212,"end_character":69},"in_reply_to":"fa7ab95a_782f85f6","updated":"2016-09-01 11:25:23.000000000","message":"This was not done, since I thought it would be more alike how this is implemented in other classes. Also the int_br and tun_br is also instantiated at the same level.\n\nIf you still feel this as odd, I will change it to be inside the init_extension_manager and pass bridge_classes and kwargs additionally to it.","commit_id":"e5f4840983c51a52ed9696bf9f1b820c62b2da6d"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"859c0fdf5c4f983653f3611225287bc898fdc60f","unresolved":false,"context_lines":[{"line_number":203,"context_line":"            # here inside the call to setup_tunnel_br()"},{"line_number":204,"context_line":"            self.setup_tunnel_br(ovs_conf.tunnel_bridge)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"        # init cookie bridge partial classes and types."},{"line_number":207,"context_line":"        (br_int_cookie_cls_type, br_tun_cookie_cls_type) \u003d ("},{"line_number":208,"context_line":"            bridge_classes[b]"},{"line_number":209,"context_line":"            for b in (\u0027br_int_cookie\u0027, \u0027br_tun_cookie\u0027))"},{"line_number":210,"context_line":"        # Creates a wrapper cookie bridge."},{"line_number":211,"context_line":"        self.cookie_br_factory \u003d ovs_ext_api.OVSCookieBridgeFactory("},{"line_number":212,"context_line":"            br_int_cookie_cls_type, br_tun_cookie_cls_type, **kwargs)"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"        self.init_extension_manager(self.connection)"},{"line_number":215,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"fa7ab95a_40d7e3ec","line":212,"range":{"start_line":206,"start_character":0,"end_line":212,"end_character":69},"updated":"2016-09-01 11:45:43.000000000","message":"All this code should I think be moved in .init_extension_manager, the created cookie_br_factory does not need to be reachable from any other method.","commit_id":"2da7a1539cde18dcb6738fb12b767c3bdf6f911f"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"332f960253f18f3b7b7690aa3642ce362fff56e4","unresolved":false,"context_lines":[{"line_number":203,"context_line":"            # here inside the call to setup_tunnel_br()"},{"line_number":204,"context_line":"            self.setup_tunnel_br(ovs_conf.tunnel_bridge)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"        # init cookie bridge partial classes and types."},{"line_number":207,"context_line":"        (br_int_cookie_cls_type, br_tun_cookie_cls_type) \u003d ("},{"line_number":208,"context_line":"            bridge_classes[b]"},{"line_number":209,"context_line":"            for b in (\u0027br_int_cookie\u0027, \u0027br_tun_cookie\u0027))"},{"line_number":210,"context_line":"        # Creates a wrapper cookie bridge."},{"line_number":211,"context_line":"        self.cookie_br_factory \u003d ovs_ext_api.OVSCookieBridgeFactory("},{"line_number":212,"context_line":"            br_int_cookie_cls_type, br_tun_cookie_cls_type, **kwargs)"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"        self.init_extension_manager(self.connection)"},{"line_number":215,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"fa7ab95a_87a7240a","line":212,"range":{"start_line":206,"start_character":0,"end_line":212,"end_character":69},"in_reply_to":"fa7ab95a_40d7e3ec","updated":"2016-09-01 18:10:54.000000000","message":"Done","commit_id":"2da7a1539cde18dcb6738fb12b767c3bdf6f911f"}],"neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/openflow/native/ovs_bridge_test_base.py":[{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"4051ab90cb5b75a15df842e65b957adf4cc7fe72","unresolved":false,"context_lines":[{"line_number":56,"context_line":"            call._send_msg("},{"line_number":57,"context_line":"                ofpp.OFPFlowMod(dp,"},{"line_number":58,"context_line":"                    cookie\u003dself.stamp,"},{"line_number":59,"context_line":"                    cookie_mask\u003d((1 \u003c\u003c 64) - 1),"},{"line_number":60,"context_line":"                    instructions\u003d[],"},{"line_number":61,"context_line":"                    match\u003dofpp.OFPMatch(in_port\u003din_port),"},{"line_number":62,"context_line":"                    priority\u003d2,"}],"source_content_type":"text/x-python","patch_set":11,"id":"9ad45d7e_8e42f63c","line":59,"range":{"start_line":59,"start_character":33,"end_line":59,"end_character":46},"updated":"2016-08-09 12:50:51.000000000","message":"A constant for this value may be a good idea, it would let people know what it actually means and does.\nI\u0027d suggest putting it in neutron/plugin/ml2/drivers/openvswitch/agent/common/constants.py","commit_id":"281c2f7dd5c18c77d318567a99c415def7144b6b"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"2b5fb1fcfaedb48d97ea5e0ccb33b1cae07b9f95","unresolved":false,"context_lines":[{"line_number":56,"context_line":"            call._send_msg("},{"line_number":57,"context_line":"                ofpp.OFPFlowMod(dp,"},{"line_number":58,"context_line":"                    cookie\u003dself.stamp,"},{"line_number":59,"context_line":"                    cookie_mask\u003d((1 \u003c\u003c 64) - 1),"},{"line_number":60,"context_line":"                    instructions\u003d[],"},{"line_number":61,"context_line":"                    match\u003dofpp.OFPMatch(in_port\u003din_port),"},{"line_number":62,"context_line":"                    priority\u003d2,"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_f741b60c","line":59,"range":{"start_line":59,"start_character":33,"end_line":59,"end_character":46},"in_reply_to":"9ad45d7e_8e42f63c","updated":"2016-08-22 07:20:18.000000000","message":"Done. I am re-using a constant already used for generating a random cookie value. Also there\u0027s a new default property.","commit_id":"281c2f7dd5c18c77d318567a99c415def7144b6b"}],"neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/openflow/native/test_br_int.py":[{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"4051ab90cb5b75a15df842e65b957adf4cc7fe72","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        expected \u003d ["},{"line_number":39,"context_line":"            call._send_msg(ofpp.OFPFlowMod(dp,"},{"line_number":40,"context_line":"                cookie\u003dself.stamp,"},{"line_number":41,"context_line":"                cookie_mask\u003d((1 \u003c\u003c 64) - 1),"},{"line_number":42,"context_line":"                instructions\u003d["},{"line_number":43,"context_line":"                    ofpp.OFPInstructionActions("},{"line_number":44,"context_line":"                        ofp.OFPIT_APPLY_ACTIONS, ["}],"source_content_type":"text/x-python","patch_set":11,"id":"9ad45d7e_2e72eaad","line":41,"range":{"start_line":41,"start_character":29,"end_line":41,"end_character":42},"updated":"2016-08-09 12:50:51.000000000","message":"ditto in this file","commit_id":"281c2f7dd5c18c77d318567a99c415def7144b6b"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"2b5fb1fcfaedb48d97ea5e0ccb33b1cae07b9f95","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        expected \u003d ["},{"line_number":39,"context_line":"            call._send_msg(ofpp.OFPFlowMod(dp,"},{"line_number":40,"context_line":"                cookie\u003dself.stamp,"},{"line_number":41,"context_line":"                cookie_mask\u003d((1 \u003c\u003c 64) - 1),"},{"line_number":42,"context_line":"                instructions\u003d["},{"line_number":43,"context_line":"                    ofpp.OFPInstructionActions("},{"line_number":44,"context_line":"                        ofp.OFPIT_APPLY_ACTIONS, ["}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_97bde2d9","line":41,"range":{"start_line":41,"start_character":29,"end_line":41,"end_character":42},"in_reply_to":"9ad45d7e_2e72eaad","updated":"2016-08-22 07:20:18.000000000","message":"Done","commit_id":"281c2f7dd5c18c77d318567a99c415def7144b6b"}],"neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/openflow/native/test_br_phys.py":[{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"4051ab90cb5b75a15df842e65b957adf4cc7fe72","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        expected \u003d ["},{"line_number":46,"context_line":"            call._send_msg(ofpp.OFPFlowMod(dp,"},{"line_number":47,"context_line":"                cookie\u003dself.stamp,"},{"line_number":48,"context_line":"                cookie_mask\u003d((1 \u003c\u003c 64) - 1),"},{"line_number":49,"context_line":"                instructions\u003d["},{"line_number":50,"context_line":"                    ofpp.OFPInstructionActions(ofp.OFPIT_APPLY_ACTIONS, ["},{"line_number":51,"context_line":"                        ofpp.OFPActionOutput(ofp.OFPP_NORMAL, 0),"}],"source_content_type":"text/x-python","patch_set":11,"id":"9ad45d7e_6eab42d7","line":48,"range":{"start_line":48,"start_character":29,"end_line":48,"end_character":42},"updated":"2016-08-09 12:50:51.000000000","message":"ditto","commit_id":"281c2f7dd5c18c77d318567a99c415def7144b6b"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"2b5fb1fcfaedb48d97ea5e0ccb33b1cae07b9f95","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        expected \u003d ["},{"line_number":46,"context_line":"            call._send_msg(ofpp.OFPFlowMod(dp,"},{"line_number":47,"context_line":"                cookie\u003dself.stamp,"},{"line_number":48,"context_line":"                cookie_mask\u003d((1 \u003c\u003c 64) - 1),"},{"line_number":49,"context_line":"                instructions\u003d["},{"line_number":50,"context_line":"                    ofpp.OFPInstructionActions(ofp.OFPIT_APPLY_ACTIONS, ["},{"line_number":51,"context_line":"                        ofpp.OFPActionOutput(ofp.OFPP_NORMAL, 0),"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_d7ae3a97","line":48,"range":{"start_line":48,"start_character":29,"end_line":48,"end_character":42},"in_reply_to":"9ad45d7e_6eab42d7","updated":"2016-08-22 07:20:18.000000000","message":"Done","commit_id":"281c2f7dd5c18c77d318567a99c415def7144b6b"}],"neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/openflow/native/test_br_tun.py":[{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"4051ab90cb5b75a15df842e65b957adf4cc7fe72","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        expected \u003d ["},{"line_number":60,"context_line":"            call._send_msg(ofpp.OFPFlowMod(dp,"},{"line_number":61,"context_line":"                cookie\u003dself.stamp,"},{"line_number":62,"context_line":"                cookie_mask\u003d((1 \u003c\u003c 64) - 1),"},{"line_number":63,"context_line":"                instructions\u003d[ofpp.OFPInstructionGotoTable(table_id\u003d2)],"},{"line_number":64,"context_line":"                match\u003dofpp.OFPMatch(in_port\u003dpatch_int_ofport),"},{"line_number":65,"context_line":"                priority\u003d1, table_id\u003d0)),"}],"source_content_type":"text/x-python","patch_set":11,"id":"9ad45d7e_6e9222a1","line":62,"range":{"start_line":62,"start_character":29,"end_line":62,"end_character":42},"updated":"2016-08-09 12:50:51.000000000","message":"ditto","commit_id":"281c2f7dd5c18c77d318567a99c415def7144b6b"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"2b5fb1fcfaedb48d97ea5e0ccb33b1cae07b9f95","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        expected \u003d ["},{"line_number":60,"context_line":"            call._send_msg(ofpp.OFPFlowMod(dp,"},{"line_number":61,"context_line":"                cookie\u003dself.stamp,"},{"line_number":62,"context_line":"                cookie_mask\u003d((1 \u003c\u003c 64) - 1),"},{"line_number":63,"context_line":"                instructions\u003d[ofpp.OFPInstructionGotoTable(table_id\u003d2)],"},{"line_number":64,"context_line":"                match\u003dofpp.OFPMatch(in_port\u003dpatch_int_ofport),"},{"line_number":65,"context_line":"                priority\u003d1, table_id\u003d0)),"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_f78256ff","line":62,"range":{"start_line":62,"start_character":29,"end_line":62,"end_character":42},"in_reply_to":"9ad45d7e_6e9222a1","updated":"2016-08-22 07:20:18.000000000","message":"Done","commit_id":"281c2f7dd5c18c77d318567a99c415def7144b6b"}],"neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_agent_extension_api.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ed75605037e446ad1463eb759b70a49cb389721c","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def test_add_flow_without_cookie_ofctl_int(self):"},{"line_number":154,"context_line":"        with mock.patch("},{"line_number":155,"context_line":"                \u0027neutron.plugins.ml2.drivers.openvswitch.agent.openflow.\u0027"},{"line_number":156,"context_line":"                \u0027ovs_ofctl.br_int.OVSIntegrationBridge.do_action_flows\u0027) \\"},{"line_number":157,"context_line":"                    as base_int_do_action_flows:"},{"line_number":158,"context_line":"            self.ofctl_int_br.add_flow(in_port\u003d1, actions\u003d\"output:2\")"},{"line_number":159,"context_line":"            base_int_do_action_flows.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":11,"id":"9ad45d7e_f55896fc","line":156,"range":{"start_line":155,"start_character":16,"end_line":156,"end_character":71},"updated":"2016-08-09 15:14:35.000000000","message":"\"do_action_flows\" in OVSIntegrationBridge and OVSTunnelBridge, both for native and OF are inherited from OVSbridge.\n\nMaybe you can create a patch member in setUp() function:\nself._patch \u003d mock.patch(......)\nself._mock \u003d self._patch.start()","commit_id":"281c2f7dd5c18c77d318567a99c415def7144b6b"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"2b5fb1fcfaedb48d97ea5e0ccb33b1cae07b9f95","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def test_add_flow_without_cookie_ofctl_int(self):"},{"line_number":154,"context_line":"        with mock.patch("},{"line_number":155,"context_line":"                \u0027neutron.plugins.ml2.drivers.openvswitch.agent.openflow.\u0027"},{"line_number":156,"context_line":"                \u0027ovs_ofctl.br_int.OVSIntegrationBridge.do_action_flows\u0027) \\"},{"line_number":157,"context_line":"                    as base_int_do_action_flows:"},{"line_number":158,"context_line":"            self.ofctl_int_br.add_flow(in_port\u003d1, actions\u003d\"output:2\")"},{"line_number":159,"context_line":"            base_int_do_action_flows.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_77dca612","line":156,"range":{"start_line":155,"start_character":16,"end_line":156,"end_character":71},"in_reply_to":"9ad45d7e_f55896fc","updated":"2016-08-22 07:20:18.000000000","message":"The idea here was to check this explicitly, the overridden call from each class.","commit_id":"281c2f7dd5c18c77d318567a99c415def7144b6b"}]}
