)]}'
{"neutron/agent/common/ovs_lib.py":[{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"cb1f6c174394598c93a3926e2c2d44b50224afd9","unresolved":false,"context_lines":[{"line_number":327,"context_line":""},{"line_number":328,"context_line":"    def do_action_flows(self, action, kwargs_list):"},{"line_number":329,"context_line":"        for kw in kwargs_list:"},{"line_number":330,"context_line":"            any_cookie \u003d kw.pop(\u0027any_cookie\u0027, False)"},{"line_number":331,"context_line":"            if action is \u0027del\u0027:"},{"line_number":332,"context_line":"                if \u0027cookie\u0027 in kw:"},{"line_number":333,"context_line":"                    kw[\u0027cookie\u0027] \u003d check_cookie_mask(kw[\u0027cookie\u0027])"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a1ced50_cf9a83c5","line":330,"updated":"2017-03-17 07:11:24.000000000","message":"Is any_cookie valid if action!\u003d\u0027del\u0027?\nShouldn\u0027t this line be swapped with the next line?","commit_id":"385b53da92fbff01efbace0d21b27c55fefbd47f"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0757940ea8513c4f9ec0cde1f3faac2111fc7b1e","unresolved":false,"context_lines":[{"line_number":327,"context_line":""},{"line_number":328,"context_line":"    def do_action_flows(self, action, kwargs_list):"},{"line_number":329,"context_line":"        for kw in kwargs_list:"},{"line_number":330,"context_line":"            any_cookie \u003d kw.pop(\u0027any_cookie\u0027, False)"},{"line_number":331,"context_line":"            if action is \u0027del\u0027:"},{"line_number":332,"context_line":"                if \u0027cookie\u0027 in kw:"},{"line_number":333,"context_line":"                    kw[\u0027cookie\u0027] \u003d check_cookie_mask(kw[\u0027cookie\u0027])"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a1ced50_34ab678b","line":330,"in_reply_to":"1a1ced50_cf9a83c5","updated":"2017-03-17 08:48:55.000000000","message":"Makes sense, indeed I any_cookie is meant only for delete_flows.","commit_id":"385b53da92fbff01efbace0d21b27c55fefbd47f"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"422f46f2148baf5946c130cfc603d76380d46cc0","unresolved":false,"context_lines":[{"line_number":754,"context_line":""},{"line_number":755,"context_line":""},{"line_number":756,"context_line":"def check_cookie_mask(cookie):"},{"line_number":757,"context_line":"    cookie_s \u003d str(cookie)"},{"line_number":758,"context_line":"    if \u0027/\u0027 not in cookie_s:"},{"line_number":759,"context_line":"        return cookie_s + \u0027/-1\u0027"},{"line_number":760,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a1ced50_83800348","line":757,"updated":"2017-03-21 03:00:39.000000000","message":"ovs_agent_extension_api.py has a code to convert it to str before passing it to this method. it\u0027s now redundant.","commit_id":"4870ed3e4dce9cec0be304ca385aae6cae14ef81"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"533e3c0b9d946abc6e7dde2781f6a8273099c310","unresolved":false,"context_lines":[{"line_number":754,"context_line":""},{"line_number":755,"context_line":""},{"line_number":756,"context_line":"def check_cookie_mask(cookie):"},{"line_number":757,"context_line":"    cookie_s \u003d str(cookie)"},{"line_number":758,"context_line":"    if \u0027/\u0027 not in cookie_s:"},{"line_number":759,"context_line":"        return cookie_s + \u0027/-1\u0027"},{"line_number":760,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a1ced50_f2c25133","line":757,"in_reply_to":"1a1ced50_83800348","updated":"2017-03-21 10:58:23.000000000","message":"Do you mean doing:\n  check_cookie_mask(str(kw[\u0027cookie\u0027]))   ??","commit_id":"4870ed3e4dce9cec0be304ca385aae6cae14ef81"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"b2075add5f28531899d2aa41107de6e4117dc1f4","unresolved":false,"context_lines":[{"line_number":754,"context_line":""},{"line_number":755,"context_line":""},{"line_number":756,"context_line":"def check_cookie_mask(cookie):"},{"line_number":757,"context_line":"    cookie_s \u003d str(cookie)"},{"line_number":758,"context_line":"    if \u0027/\u0027 not in cookie_s:"},{"line_number":759,"context_line":"        return cookie_s + \u0027/-1\u0027"},{"line_number":760,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a1ced50_32330916","line":757,"in_reply_to":"1a1ced50_f2c25133","updated":"2017-03-21 11:07:41.000000000","message":"Indeed, but the change depending on this change completely removes this code (and is already +2+W): https://review.openstack.org/#/c/425756/19/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_agent_extension_api.py","commit_id":"4870ed3e4dce9cec0be304ca385aae6cae14ef81"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"0b256b700704596fd7cccf561ea26b5f3d8a5278","unresolved":false,"context_lines":[{"line_number":337,"context_line":"                if \u0027cookie\u0027 not in kw:"},{"line_number":338,"context_line":"                    kw[\u0027cookie\u0027] \u003d self._default_cookie"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        if action \u003d\u003d \u0027del\u0027 and {} in kwargs_list:"},{"line_number":341,"context_line":"            # the \u0027del\u0027 case simplifies itself if kwargs_list has at least"},{"line_number":342,"context_line":"            # one item that matches everything"},{"line_number":343,"context_line":"            self.run_ofctl(\u0027%s-flows\u0027 % action, [])"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a1ced50_35a3f3b3","line":340,"range":{"start_line":340,"start_character":8,"end_line":340,"end_character":49},"updated":"2017-03-21 11:22:29.000000000","message":"Because of this condition, the code in L329-L339 should be executed after the else branch (L344), to avoid possible useless work.","commit_id":"fef31c4ba9d10c4eb9e0324ee65bc5b210de7a97"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"60cbfb86066da9b72baec6a15bb48473f3f8eb54","unresolved":false,"context_lines":[{"line_number":337,"context_line":"                if \u0027cookie\u0027 not in kw:"},{"line_number":338,"context_line":"                    kw[\u0027cookie\u0027] \u003d self._default_cookie"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        if action \u003d\u003d \u0027del\u0027 and {} in kwargs_list:"},{"line_number":341,"context_line":"            # the \u0027del\u0027 case simplifies itself if kwargs_list has at least"},{"line_number":342,"context_line":"            # one item that matches everything"},{"line_number":343,"context_line":"            self.run_ofctl(\u0027%s-flows\u0027 % action, [])"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a1ced50_e8989dc2","line":340,"range":{"start_line":340,"start_character":8,"end_line":340,"end_character":49},"in_reply_to":"1a1ced50_35a3f3b3","updated":"2017-03-21 13:24:35.000000000","message":"The code at L329-339 will make a dict non-empty when a cookie has to be set, later making the check fail at L340 (for the presence of {} in kwargs list).  Said otherwise, the test at line L340 really means \"is there a del matching all cookies ?\". This is the intended behavior and wouldn\u0027t work if things were done in a different order.\n\n(or can you perhaps provide example alternative code if you think I  have misunderstood your comment ?)","commit_id":"fef31c4ba9d10c4eb9e0324ee65bc5b210de7a97"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1884f2cb6358314595823cc2e207def9fd09207f","unresolved":false,"context_lines":[{"line_number":337,"context_line":"                if \u0027cookie\u0027 not in kw:"},{"line_number":338,"context_line":"                    kw[\u0027cookie\u0027] \u003d self._default_cookie"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        if action \u003d\u003d \u0027del\u0027 and {} in kwargs_list:"},{"line_number":341,"context_line":"            # the \u0027del\u0027 case simplifies itself if kwargs_list has at least"},{"line_number":342,"context_line":"            # one item that matches everything"},{"line_number":343,"context_line":"            self.run_ofctl(\u0027%s-flows\u0027 % action, [])"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a1ced50_ae55cdfa","line":340,"range":{"start_line":340,"start_character":8,"end_line":340,"end_character":49},"in_reply_to":"1a1ced50_e8989dc2","updated":"2017-03-21 13:45:44.000000000","message":"No, you are right: your code will remove \"any_cookie\".","commit_id":"fef31c4ba9d10c4eb9e0324ee65bc5b210de7a97"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"0b256b700704596fd7cccf561ea26b5f3d8a5278","unresolved":false,"context_lines":[{"line_number":737,"context_line":""},{"line_number":738,"context_line":"    # (sorting here is done just to keep unit test reasonably sane to write)"},{"line_number":739,"context_line":"    for key in sorted(flow_dict):"},{"line_number":740,"context_line":"        value \u003d flow_dict[key]"},{"line_number":741,"context_line":"        if key \u003d\u003d \u0027proto\u0027:"},{"line_number":742,"context_line":"            flow_expr_arr.append(value)"},{"line_number":743,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a1ced50_12f8cd48","line":740,"updated":"2017-03-21 11:22:29.000000000","message":"Or just:\n   for key, value in sorted(flow_dict.items()):","commit_id":"fef31c4ba9d10c4eb9e0324ee65bc5b210de7a97"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"60cbfb86066da9b72baec6a15bb48473f3f8eb54","unresolved":false,"context_lines":[{"line_number":737,"context_line":""},{"line_number":738,"context_line":"    # (sorting here is done just to keep unit test reasonably sane to write)"},{"line_number":739,"context_line":"    for key in sorted(flow_dict):"},{"line_number":740,"context_line":"        value \u003d flow_dict[key]"},{"line_number":741,"context_line":"        if key \u003d\u003d \u0027proto\u0027:"},{"line_number":742,"context_line":"            flow_expr_arr.append(value)"},{"line_number":743,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a1ced50_c8cda1b8","line":740,"in_reply_to":"1a1ced50_12f8cd48","updated":"2017-03-21 13:24:35.000000000","message":"Yes, ok.","commit_id":"fef31c4ba9d10c4eb9e0324ee65bc5b210de7a97"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"c3379c0744d6ecc72919f8e89c909654c563e05f","unresolved":false,"context_lines":[{"line_number":735,"context_line":"            raise exceptions.InvalidInput(error_message\u003dmsg)"},{"line_number":736,"context_line":"        actions \u003d \"actions\u003d%s\" % flow_dict.pop(\u0027actions\u0027)"},{"line_number":737,"context_line":""},{"line_number":738,"context_line":"    # (sorting here is done just to keep unit test reasonably sane to write)"},{"line_number":739,"context_line":"    for key, value in sorted(six.iteritems(flow_dict)):"},{"line_number":740,"context_line":"        if key \u003d\u003d \u0027proto\u0027:"},{"line_number":741,"context_line":"            flow_expr_arr.append(value)"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a1ced50_ec533b15","line":738,"range":{"start_line":738,"start_character":4,"end_line":738,"end_character":76},"updated":"2017-03-21 21:05:26.000000000","message":"that\u0027s a silly argument to keep it like that. if you need to compare without consideration of resulting flows, then just split the string, put it into a set, and compare sets. In tests, not here.","commit_id":"00bf298b120115ef8b7ec84a901a500bb23d5a37"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"b8e228e94e1c95df16a553034d411c7c34efc857","unresolved":false,"context_lines":[{"line_number":735,"context_line":"            raise exceptions.InvalidInput(error_message\u003dmsg)"},{"line_number":736,"context_line":"        actions \u003d \"actions\u003d%s\" % flow_dict.pop(\u0027actions\u0027)"},{"line_number":737,"context_line":""},{"line_number":738,"context_line":"    # (sorting here is done just to keep unit test reasonably sane to write)"},{"line_number":739,"context_line":"    for key, value in sorted(six.iteritems(flow_dict)):"},{"line_number":740,"context_line":"        if key \u003d\u003d \u0027proto\u0027:"},{"line_number":741,"context_line":"            flow_expr_arr.append(value)"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a1ced50_d5b99116","line":738,"range":{"start_line":738,"start_character":4,"end_line":738,"end_character":76},"in_reply_to":"1a1ced50_ec533b15","updated":"2017-03-22 08:50:25.000000000","message":"Well, I\u0027m not surprised by your comment...\n\nI find that the current test code based on assert_has_calls is quite nice, and I can\u0027t see how to preserve that and do the \"split the string, put it into a set, and compare sets\" part.\n\nSo, ok, I was lazy, bad me.\nI\u0027ll work on something better.\n\nThat said, if you have something precise in mind to \"*just* split the string, put it into a set, and compare sets\" (emph. mine), then I\u0027d be happy to know.","commit_id":"00bf298b120115ef8b7ec84a901a500bb23d5a37"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"c3379c0744d6ecc72919f8e89c909654c563e05f","unresolved":false,"context_lines":[{"line_number":753,"context_line":""},{"line_number":754,"context_line":""},{"line_number":755,"context_line":"def check_cookie_mask(cookie):"},{"line_number":756,"context_line":"    cookie_s \u003d str(cookie)"},{"line_number":757,"context_line":"    if \u0027/\u0027 not in cookie_s:"},{"line_number":758,"context_line":"        return cookie_s + \u0027/-1\u0027"},{"line_number":759,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a1ced50_8c49e762","line":756,"range":{"start_line":756,"start_character":4,"end_line":756,"end_character":12},"updated":"2017-03-21 21:05:26.000000000","message":"could as well override cookie, as in:\n\ncookie \u003d str(cookie)","commit_id":"00bf298b120115ef8b7ec84a901a500bb23d5a37"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"b8e228e94e1c95df16a553034d411c7c34efc857","unresolved":false,"context_lines":[{"line_number":753,"context_line":""},{"line_number":754,"context_line":""},{"line_number":755,"context_line":"def check_cookie_mask(cookie):"},{"line_number":756,"context_line":"    cookie_s \u003d str(cookie)"},{"line_number":757,"context_line":"    if \u0027/\u0027 not in cookie_s:"},{"line_number":758,"context_line":"        return cookie_s + \u0027/-1\u0027"},{"line_number":759,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a1ced50_1506c91c","line":756,"range":{"start_line":756,"start_character":4,"end_line":756,"end_character":12},"in_reply_to":"1a1ced50_8c49e762","updated":"2017-03-22 08:50:25.000000000","message":"Yes.","commit_id":"00bf298b120115ef8b7ec84a901a500bb23d5a37"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"cc82db14f29a8aa0cbf960fcc262a73f370c2d07","unresolved":false,"context_lines":[{"line_number":48,"context_line":"FAILMODE_STANDALONE \u003d \u0027standalone\u0027"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"# special values for cookies"},{"line_number":51,"context_line":"COOKIE_ANY \u003d object()"},{"line_number":52,"context_line":"COOKIE_DEFAULT \u003d object()"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"ovs_conf.register_ovs_agent_opts()"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a1ced50_1c66c050","line":51,"updated":"2017-03-23 08:29:34.000000000","message":"i have never been happy with having the default cookie things in ovs_lib rather than ovs-agent.  but probably it\u0027s only me.","commit_id":"e7a7b8e5fd249c83e603abd76261d30420df669a"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"5a0f6b12b8ad9d556ab54f8f929ebc69066533cb","unresolved":false,"context_lines":[{"line_number":48,"context_line":"FAILMODE_STANDALONE \u003d \u0027standalone\u0027"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"# special values for cookies"},{"line_number":51,"context_line":"COOKIE_ANY \u003d object()"},{"line_number":52,"context_line":"COOKIE_DEFAULT \u003d object()"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"ovs_conf.register_ovs_agent_opts()"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a1ced50_f7849f5e","line":51,"in_reply_to":"1a1ced50_1c66c050","updated":"2017-03-23 08:39:36.000000000","message":"Not sure how I can address this here.\nPlease develop if you want me to...","commit_id":"e7a7b8e5fd249c83e603abd76261d30420df669a"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"cc82db14f29a8aa0cbf960fcc262a73f370c2d07","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"# special values for cookies"},{"line_number":51,"context_line":"COOKIE_ANY \u003d object()"},{"line_number":52,"context_line":"COOKIE_DEFAULT \u003d object()"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"ovs_conf.register_ovs_agent_opts()"},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"1a1ced50_5cb2f8e5","line":52,"updated":"2017-03-23 08:29:34.000000000","message":"there seems no reason to have COOKIE_DEFAULT here.\nit\u0027s merely an internal detail of native ofswitch.py.","commit_id":"e7a7b8e5fd249c83e603abd76261d30420df669a"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"5a0f6b12b8ad9d556ab54f8f929ebc69066533cb","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"# special values for cookies"},{"line_number":51,"context_line":"COOKIE_ANY \u003d object()"},{"line_number":52,"context_line":"COOKIE_DEFAULT \u003d object()"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"ovs_conf.register_ovs_agent_opts()"},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"1a1ced50_bc05ac14","line":52,"in_reply_to":"1a1ced50_5cb2f8e5","updated":"2017-03-23 08:39:36.000000000","message":"Makes sense, moved.","commit_id":"e7a7b8e5fd249c83e603abd76261d30420df669a"},{"author":{"_account_id":15471,"name":"Nguyen Phuong An","email":"annp.cs51@gmail.com","username":"An-FVL"},"change_message_id":"1c9eb2d0285fbd54345af5072589a89520bd541e","unresolved":false,"context_lines":[{"line_number":336,"context_line":"                if kw.get(\u0027cookie\u0027) \u003d\u003d COOKIE_ANY:"},{"line_number":337,"context_line":"                    # special value COOKIE_ANY was provided, unset"},{"line_number":338,"context_line":"                    # cookie to match flows whatever the cookie is"},{"line_number":339,"context_line":"                    kw.pop(\u0027cookie\u0027)"},{"line_number":340,"context_line":"                elif \u0027cookie\u0027 in kw:"},{"line_number":341,"context_line":"                    # a cookie was specified, use it"},{"line_number":342,"context_line":"                    kw[\u0027cookie\u0027] \u003d check_cookie_mask(kw[\u0027cookie\u0027])"},{"line_number":343,"context_line":"                else:"},{"line_number":344,"context_line":"                    # nothing was specified about cookies, use default"},{"line_number":345,"context_line":"                    kw[\u0027cookie\u0027] \u003d \"%d/-1\" % self._default_cookie"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a1ced50_77fb4f79","line":342,"range":{"start_line":339,"start_character":0,"end_line":342,"end_character":66},"updated":"2017-03-23 08:48:27.000000000","message":"Hi Thomas,\nThanks for great work on this. I have a question, would you mind teaching me? Do you mean that we can delete a flows by specify a cookie value? In case, I\u0027d like to use \u0027cookie\u0027 filed to classifies packet_in messages, if no longer use a cookie, can I delete flows by specific cookie value?","commit_id":"e7a7b8e5fd249c83e603abd76261d30420df669a"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"2dfd1a4bd8b3cc825fc47cf85a73e94a38772c91","unresolved":false,"context_lines":[{"line_number":341,"context_line":"                    kw[\u0027cookie\u0027] \u003d check_cookie_mask(kw[\u0027cookie\u0027])"},{"line_number":342,"context_line":"                else:"},{"line_number":343,"context_line":"                    # nothing was specified about cookies, use default"},{"line_number":344,"context_line":"                    kw[\u0027cookie\u0027] \u003d \"%d/-1\" % self._default_cookie"},{"line_number":345,"context_line":"            else:"},{"line_number":346,"context_line":"                if \u0027cookie\u0027 not in kw:"},{"line_number":347,"context_line":"                    kw[\u0027cookie\u0027] \u003d self._default_cookie"}],"source_content_type":"text/x-python","patch_set":21,"id":"1a1ced50_12121259","line":344,"range":{"start_line":344,"start_character":35,"end_line":344,"end_character":42},"updated":"2017-03-23 16:49:19.000000000","message":"This should probably be updated, since the patch this is on top of is called: \"Do not use -1 as an OpenFlow flow cookie\"\n\nUsing UINT64_BITMASK would be the appropriate alternative.","commit_id":"73bda488b598f2379adb99b7daa300e114e505ff"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"f066352f2e99da9ed2ab70518f854acdd391ae7f","unresolved":false,"context_lines":[{"line_number":341,"context_line":"                    kw[\u0027cookie\u0027] \u003d check_cookie_mask(kw[\u0027cookie\u0027])"},{"line_number":342,"context_line":"                else:"},{"line_number":343,"context_line":"                    # nothing was specified about cookies, use default"},{"line_number":344,"context_line":"                    kw[\u0027cookie\u0027] \u003d \"%d/-1\" % self._default_cookie"},{"line_number":345,"context_line":"            else:"},{"line_number":346,"context_line":"                if \u0027cookie\u0027 not in kw:"},{"line_number":347,"context_line":"                    kw[\u0027cookie\u0027] \u003d self._default_cookie"}],"source_content_type":"text/x-python","patch_set":21,"id":"ffe62b97_939ea005","line":344,"range":{"start_line":344,"start_character":35,"end_line":344,"end_character":42},"in_reply_to":"1a1ced50_12121259","updated":"2017-03-24 06:57:08.000000000","message":"I initially thought I could wrap this change in, but then noticed side effects in module outside the reach of the modules touched by this patch.\n\nThen I also realize your comment was about \"cookies being -1\" which this change does *not* do; the only -1 in this change are -1 cookie *masks*, which were already used in some cases.\n\nSo if anything needs to be done, that should really in a separate change I think.","commit_id":"73bda488b598f2379adb99b7daa300e114e505ff"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"da23677e15171e112ad384a3140a2c6c6fd960ff","unresolved":false,"context_lines":[{"line_number":341,"context_line":"                    kw[\u0027cookie\u0027] \u003d check_cookie_mask(kw[\u0027cookie\u0027])"},{"line_number":342,"context_line":"                else:"},{"line_number":343,"context_line":"                    # nothing was specified about cookies, use default"},{"line_number":344,"context_line":"                    kw[\u0027cookie\u0027] \u003d \"%d/-1\" % self._default_cookie"},{"line_number":345,"context_line":"            else:"},{"line_number":346,"context_line":"                if \u0027cookie\u0027 not in kw:"},{"line_number":347,"context_line":"                    kw[\u0027cookie\u0027] \u003d self._default_cookie"}],"source_content_type":"text/x-python","patch_set":21,"id":"ffe62b97_2b1bd01b","line":344,"range":{"start_line":344,"start_character":35,"end_line":344,"end_character":42},"in_reply_to":"ffe62b97_939ea005","updated":"2017-03-24 10:55:30.000000000","message":"ack","commit_id":"73bda488b598f2379adb99b7daa300e114e505ff"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"fe8f26680d6000ef971798bba5c0b4804d52b610","unresolved":false,"context_lines":[{"line_number":345,"context_line":"                    # cookie to match flows whatever their cookie is"},{"line_number":346,"context_line":"                    kw.pop(\u0027cookie\u0027)"},{"line_number":347,"context_line":"                    if kw.get(\u0027cookie_mask\u0027):  # non-zero cookie mask"},{"line_number":348,"context_line":"                        LOG.error(_LE(\"cookie\u003dCOOKIE_ANY but cookie_mask set \""},{"line_number":349,"context_line":"                                      \"to %s\"), kw.get(\u0027cookie_mask\u0027))"},{"line_number":350,"context_line":"                elif \u0027cookie\u0027 in kw:"},{"line_number":351,"context_line":"                    # a cookie was specified, use it"}],"source_content_type":"text/x-python","patch_set":26,"id":"ffe62b97_e731305c","line":348,"updated":"2017-03-27 23:29:33.000000000","message":"seems like this should just throw a RuntimeError. It\u0027s not like this is a transient failure that an operator can do anything about.\n\nCan you file a follow-up patch to just have this raise instead of log?","commit_id":"d761d26225a8fc63e512fc26b864a46c0956e19a"}],"neutron/plugins/ml2/drivers/openvswitch/agent/openflow/native/ofswitch.py":[{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"27419f197b025656bb705b337990c2ac739e0df5","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"STRICT64 \u003d (1 \u003c\u003c 64) - 1"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class OpenFlowSwitchMixin(object):"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a1ff146_e7356a46","line":30,"updated":"2017-03-16 06:40:01.000000000","message":"ovs_lib already has UINT64_BITMASK ;)","commit_id":"755d145ac077862f0095b893810bf00b07388f5a"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"03787569de5fb73de4cb6f8f72ff393e10db387a","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"STRICT64 \u003d (1 \u003c\u003c 64) - 1"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class OpenFlowSwitchMixin(object):"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a1ff146_c5d06356","line":30,"in_reply_to":"3a1ff146_e7356a46","updated":"2017-03-16 09:00:28.000000000","message":"Thanks!","commit_id":"755d145ac077862f0095b893810bf00b07388f5a"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"27419f197b025656bb705b337990c2ac739e0df5","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        if table_id is None:"},{"line_number":109,"context_line":"            table_id \u003d ofp.OFPTT_ALL"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        if not match_kwargs.pop(\u0027any_cookie\u0027, False) and cookie \u003d\u003d 0:"},{"line_number":112,"context_line":"            cookie \u003d self._default_cookie"},{"line_number":113,"context_line":"            cookie_mask \u003d STRICT64"},{"line_number":114,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3a1ff146_27278213","line":111,"updated":"2017-03-16 06:40:01.000000000","message":"0 can be a valid cookie.\nHow about checking cookie_mask \u003d\u003d 0 instead?\nOr the default value for cookie can be -1, which is guaranteed to be invalid.","commit_id":"755d145ac077862f0095b893810bf00b07388f5a"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"03787569de5fb73de4cb6f8f72ff393e10db387a","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        if table_id is None:"},{"line_number":109,"context_line":"            table_id \u003d ofp.OFPTT_ALL"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        if not match_kwargs.pop(\u0027any_cookie\u0027, False) and cookie \u003d\u003d 0:"},{"line_number":112,"context_line":"            cookie \u003d self._default_cookie"},{"line_number":113,"context_line":"            cookie_mask \u003d STRICT64"},{"line_number":114,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3a1ff146_a5ba8708","line":111,"in_reply_to":"3a1ff146_27278213","updated":"2017-03-16 09:00:28.000000000","message":"Done.\n\n(I opted for -1)","commit_id":"755d145ac077862f0095b893810bf00b07388f5a"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"422f46f2148baf5946c130cfc603d76380d46cc0","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            table_id \u003d ofp.OFPTT_ALL"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        if cookie \u003d\u003d -1:"},{"line_number":111,"context_line":"            if match_kwargs.pop(\u0027any_cookie\u0027, False):"},{"line_number":112,"context_line":"                cookie \u003d 0"},{"line_number":113,"context_line":"            else:"},{"line_number":114,"context_line":"                cookie \u003d self._default_cookie"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a1ced50_63a6a711","line":111,"range":{"start_line":111,"start_character":33,"end_line":111,"end_character":43},"updated":"2017-03-21 03:00:39.000000000","message":"i feel this doesn\u0027t belong to match_kwargs. why don\u0027t you add a usual argument?","commit_id":"4870ed3e4dce9cec0be304ca385aae6cae14ef81"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"b2075add5f28531899d2aa41107de6e4117dc1f4","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            table_id \u003d ofp.OFPTT_ALL"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        if cookie \u003d\u003d -1:"},{"line_number":111,"context_line":"            if match_kwargs.pop(\u0027any_cookie\u0027, False):"},{"line_number":112,"context_line":"                cookie \u003d 0"},{"line_number":113,"context_line":"            else:"},{"line_number":114,"context_line":"                cookie \u003d self._default_cookie"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a1ced50_194c7b9d","line":111,"range":{"start_line":111,"start_character":33,"end_line":111,"end_character":43},"in_reply_to":"1a1ced50_63a6a711","updated":"2017-03-21 11:07:41.000000000","message":"Done.","commit_id":"4870ed3e4dce9cec0be304ca385aae6cae14ef81"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"c3379c0744d6ecc72919f8e89c909654c563e05f","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        return ofpp.OFPMatch(**match_kwargs)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def uninstall_flows(self, table_id\u003dNone, strict\u003dFalse, priority\u003d0,"},{"line_number":104,"context_line":"                        cookie\u003d-1, cookie_mask\u003d0,"},{"line_number":105,"context_line":"                        match\u003dNone, any_cookie\u003dFalse, **match_kwargs):"},{"line_number":106,"context_line":"        (dp, ofp, ofpp) \u003d self._get_dp()"},{"line_number":107,"context_line":"        if table_id is None:"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a1ced50_cceaff0e","line":104,"range":{"start_line":104,"start_character":31,"end_line":104,"end_character":33},"updated":"2017-03-21 21:05:26.000000000","message":"those special values with special undocumented meaning...\n\nIf I were you, I would introduce a bunch of special constants for cookies, like:\n\nCOOKIE_ANY \u003d object()\nCOOKIE_DEFAULT \u003d object()\n\nsomewhere in ovs_lib.py and would then use those constants to indicate the expected behaviour. that would help to understand the expected behaviour without remembering what those integer values mean in each context.\n\nThat would probably also allow to avoid introducing any_cookie\u003d parameter, because now the existing cookie\u003d parameter would be able to pass the intended state.","commit_id":"00bf298b120115ef8b7ec84a901a500bb23d5a37"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"b8e228e94e1c95df16a553034d411c7c34efc857","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        return ofpp.OFPMatch(**match_kwargs)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def uninstall_flows(self, table_id\u003dNone, strict\u003dFalse, priority\u003d0,"},{"line_number":104,"context_line":"                        cookie\u003d-1, cookie_mask\u003d0,"},{"line_number":105,"context_line":"                        match\u003dNone, any_cookie\u003dFalse, **match_kwargs):"},{"line_number":106,"context_line":"        (dp, ofp, ofpp) \u003d self._get_dp()"},{"line_number":107,"context_line":"        if table_id is None:"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a1ced50_d567d1b4","line":104,"range":{"start_line":104,"start_character":31,"end_line":104,"end_character":33},"in_reply_to":"1a1ced50_cceaff0e","updated":"2017-03-22 08:50:25.000000000","message":"Will do, I like the idea.\n\nThanks.","commit_id":"00bf298b120115ef8b7ec84a901a500bb23d5a37"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"9c90a69083cbf905b45a8d9fa09baf4c29d1adb6","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        return ofpp.OFPMatch(**match_kwargs)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def uninstall_flows(self, table_id\u003dNone, strict\u003dFalse, priority\u003d0,"},{"line_number":106,"context_line":"                        cookie\u003dovs_lib.COOKIE_DEFAULT, cookie_mask\u003d0,"},{"line_number":107,"context_line":"                        match\u003dNone, **match_kwargs):"},{"line_number":108,"context_line":"        (dp, ofp, ofpp) \u003d self._get_dp()"},{"line_number":109,"context_line":"        if table_id is None:"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a1ced50_127f89e0","line":106,"range":{"start_line":106,"start_character":31,"end_line":106,"end_character":39},"updated":"2017-03-23 09:09:49.000000000","message":"delete","commit_id":"41ed6b4b0f72ec33517ed87c7cfa341e74848c3a"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"abcaf08c181ec0fa98df14264a8b4591e489c467","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        if cookie \u003d\u003d ovs_lib.COOKIE_ANY:"},{"line_number":113,"context_line":"            cookie \u003d 0"},{"line_number":114,"context_line":"            if cookie_mask !\u003d 0:"},{"line_number":115,"context_line":"                LOG.warning(_LW(\"cookie\u003dCOOKIE_ANY but cookie_mask set to %s\"),"},{"line_number":116,"context_line":"                            cookie_mask)"},{"line_number":117,"context_line":"        elif cookie \u003d\u003d COOKIE_DEFAULT:"},{"line_number":118,"context_line":"            cookie \u003d self._default_cookie"}],"source_content_type":"text/x-python","patch_set":23,"id":"ffe62b97_f646fa4f","line":115,"updated":"2017-03-24 07:16:42.000000000","message":"If any caller does this thing, that\u0027s seriously wrong and IMO worth LOG.error or even raise ;)","commit_id":"726e714c0443d00e5ffa3f1111ee197ad1d3f2bb"}],"neutron/tests/functional/agent/test_ovs_flows.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"c3379c0744d6ecc72919f8e89c909654c563e05f","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        self.assertTrue(flows42)"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"        # now delete both flows"},{"line_number":343,"context_line":"        self.br_int.delete_flows(in_port\u003dPORT, any_cookie\u003dTrue)"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"        # check that no flow remains"},{"line_number":346,"context_line":"        flows \u003d self.br_int.dump_flows_for(in_port\u003dPORT,"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a1ced50_ac5063d5","line":343,"updated":"2017-03-21 21:05:26.000000000","message":"both? the first one is already gone. I think you may want to split the test case into smaller pieces to target different sets of parameters.","commit_id":"00bf298b120115ef8b7ec84a901a500bb23d5a37"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"b8e228e94e1c95df16a553034d411c7c34efc857","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        self.assertTrue(flows42)"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"        # now delete both flows"},{"line_number":343,"context_line":"        self.br_int.delete_flows(in_port\u003dPORT, any_cookie\u003dTrue)"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"        # check that no flow remains"},{"line_number":346,"context_line":"        flows \u003d self.br_int.dump_flows_for(in_port\u003dPORT,"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a1ced50_5544c119","line":343,"in_reply_to":"1a1ced50_ac5063d5","updated":"2017-03-22 08:50:25.000000000","message":"Ok, will do.","commit_id":"00bf298b120115ef8b7ec84a901a500bb23d5a37"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"abcaf08c181ec0fa98df14264a8b4591e489c467","unresolved":false,"context_lines":[{"line_number":354,"context_line":"        # check that no flow remains"},{"line_number":355,"context_line":"        flows \u003d self.br_int.dump_flows_for(in_port\u003dPORT,"},{"line_number":356,"context_line":"                                           cookie\u003dself.br_int._default_cookie)"},{"line_number":357,"context_line":"        flows42 \u003d self.br_int.dump_flows_for(in_port\u003dPORT, cookie\u003d42)"},{"line_number":358,"context_line":"        self.assertFalse(flows)"},{"line_number":359,"context_line":"        self.assertFalse(flows42)"},{"line_number":360,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"ffe62b97_36c22287","line":357,"updated":"2017-03-24 07:16:42.000000000","message":"These two dump_flows_for can be done with one call without cookie arg?","commit_id":"726e714c0443d00e5ffa3f1111ee197ad1d3f2bb"}],"neutron/tests/unit/agent/common/test_ovs_lib.py":[{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"2dfd1a4bd8b3cc825fc47cf85a73e94a38772c91","unresolved":false,"context_lines":[{"line_number":320,"context_line":"        self.br.delete_flows(tun_id\u003dlsw_id)"},{"line_number":321,"context_line":"        self.br.delete_flows(dl_vlan\u003dvid)"},{"line_number":322,"context_line":"        self.br.delete_flows()"},{"line_number":323,"context_line":"        cookie_spec \u003d \"cookie\u003d%s/-1\" % self.br._default_cookie"},{"line_number":324,"context_line":"        expected_calls \u003d ["},{"line_number":325,"context_line":"            self._ofctl_mock(\"del-flows\", self.BR_NAME, \u0027-\u0027,"},{"line_number":326,"context_line":"                             process_input\u003dStringSetMatcher("}],"source_content_type":"text/x-python","patch_set":21,"id":"1a1ced50_1295b287","line":323,"range":{"start_line":323,"start_character":33,"end_line":323,"end_character":35},"updated":"2017-03-23 16:49:19.000000000","message":"ditto","commit_id":"73bda488b598f2379adb99b7daa300e114e505ff"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"2dfd1a4bd8b3cc825fc47cf85a73e94a38772c91","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        self.br.delete_flows(cookie\u003d42)"},{"line_number":341,"context_line":"        self.execute.assert_has_calls(["},{"line_number":342,"context_line":"            self._ofctl_mock(\"del-flows\", self.BR_NAME, \u0027-\u0027,"},{"line_number":343,"context_line":"                             process_input\u003d\"cookie\u003d42/-1\"),"},{"line_number":344,"context_line":"        ])"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"    def test_do_action_flows_delete_flows(self):"}],"source_content_type":"text/x-python","patch_set":21,"id":"1a1ced50_52e64a45","line":343,"range":{"start_line":343,"start_character":54,"end_line":343,"end_character":56},"updated":"2017-03-23 16:49:19.000000000","message":"ditto","commit_id":"73bda488b598f2379adb99b7daa300e114e505ff"}]}
