)]}'
{"networking_ovn/common/exceptions.py":[{"author":{"_account_id":11762,"name":"Han Zhou","email":"zhouhan@gmail.com","username":"hanzhou"},"change_message_id":"20f2fb1791f014e88a98417b04f786a49f028172","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"class TransactionAborted(Exception):"},{"line_number":18,"context_line":"    pass"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f4b6375_2b794ffb","line":17,"range":{"start_line":17,"start_character":6,"end_line":17,"end_character":24},"updated":"2017-11-02 06:40:33.000000000","message":"I think it would be better to rename it as something like: RevisionConflict, so that the caller would handle it more accurately.","commit_id":"5f1276a54965c1bb4e0ee575567ee65600f8c249"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"49e3dbe75d76acdae3410cdc41cf53e977241733","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"class TransactionAborted(Exception):"},{"line_number":18,"context_line":"    pass"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f4b6375_3ba628ad","line":17,"range":{"start_line":17,"start_character":6,"end_line":17,"end_character":24},"in_reply_to":"3f4b6375_2b794ffb","updated":"2017-11-02 09:15:43.000000000","message":"Indeed, RevisionConflict sounds much better (-:","commit_id":"5f1276a54965c1bb4e0ee575567ee65600f8c249"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"7e16342970ba89eb93984d308d01ea052f47d60e","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2017 Red Hat, Inc."},{"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":13,"id":"9f91af0f_24abd71d","line":1,"updated":"2018-01-02 14:39:49.000000000","message":"nit: May be 2018 :)","commit_id":"15a954ed4f0a9beb89be2432eee0c3d41c6ca7b8"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"0b3b5e669d8dae30ab6468c7dcdc9cdef4cd6a09","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2017 Red Hat, Inc."},{"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":13,"id":"9f91af0f_e74bb184","line":1,"in_reply_to":"9f91af0f_24abd71d","updated":"2018-01-02 14:52:04.000000000","message":"Yeah, it\u0027s ok to use 2018 only for new patches ?","commit_id":"15a954ed4f0a9beb89be2432eee0c3d41c6ca7b8"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"8c1c4c2df6e593cf36bdc1d750788981179bbdc4","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2017 Red Hat, Inc."},{"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":13,"id":"9f91af0f_e7cde45d","line":1,"in_reply_to":"9f91af0f_e74bb184","updated":"2018-01-03 05:27:02.000000000","message":"Sounds good to me for new patches.","commit_id":"15a954ed4f0a9beb89be2432eee0c3d41c6ca7b8"}],"networking_ovn/common/ovn_client.py":[{"author":{"_account_id":11762,"name":"Han Zhou","email":"zhouhan@gmail.com","username":"hanzhou"},"change_message_id":"20f2fb1791f014e88a98417b04f786a49f028172","unresolved":false,"context_lines":[{"line_number":877,"context_line":"        lswitch_name \u003d utils.ovn_name(network[\u0027id\u0027])"},{"line_number":878,"context_line":"        with self._nb_idl.transaction(check_error\u003dTrue) as txn:"},{"line_number":879,"context_line":"            txn.add(self._nb_idl.check_revision_number("},{"line_number":880,"context_line":"                    lswitch_name, network, ovn_const.TYPE_NETWORKS))"},{"line_number":881,"context_line":"            if network[\u0027name\u0027] !\u003d original_network[\u0027name\u0027]:"},{"line_number":882,"context_line":"                ext_id \u003d [ovn_const.OVN_NETWORK_NAME_EXT_ID_KEY,"},{"line_number":883,"context_line":"                          network[\u0027name\u0027]]"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f4b6375_488ebf79","line":880,"updated":"2017-11-02 06:40:33.000000000","message":"In this case, it seems better to put the transaction under the if clause, to avoid updating revision number to OVN without any real data update. But this is just an optimization, and it is not about correctness.","commit_id":"5f1276a54965c1bb4e0ee575567ee65600f8c249"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"49e3dbe75d76acdae3410cdc41cf53e977241733","unresolved":false,"context_lines":[{"line_number":877,"context_line":"        lswitch_name \u003d utils.ovn_name(network[\u0027id\u0027])"},{"line_number":878,"context_line":"        with self._nb_idl.transaction(check_error\u003dTrue) as txn:"},{"line_number":879,"context_line":"            txn.add(self._nb_idl.check_revision_number("},{"line_number":880,"context_line":"                    lswitch_name, network, ovn_const.TYPE_NETWORKS))"},{"line_number":881,"context_line":"            if network[\u0027name\u0027] !\u003d original_network[\u0027name\u0027]:"},{"line_number":882,"context_line":"                ext_id \u003d [ovn_const.OVN_NETWORK_NAME_EXT_ID_KEY,"},{"line_number":883,"context_line":"                          network[\u0027name\u0027]]"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f4b6375_dbe394d7","line":880,"in_reply_to":"3f4b6375_488ebf79","updated":"2017-11-02 09:15:43.000000000","message":"Yeah, I specifically put it outside so that we can track the version that is in Neutron (for correctness as you said). Even if the update to the Neutron object is not relevant to OVN (e.g updating it\u0027s description).\n\nMaybe it\u0027s a downside of having to track revision numbers, but, it should not be a big deal anyway.","commit_id":"5f1276a54965c1bb4e0ee575567ee65600f8c249"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"514665f60b85418e3e372e63810cf8ffaa640626","unresolved":false,"context_lines":[{"line_number":874,"context_line":"    def update_network(self, network, original_network):"},{"line_number":875,"context_line":"        lswitch_name \u003d utils.ovn_name(network[\u0027id\u0027])"},{"line_number":876,"context_line":"        with self._nb_idl.transaction(check_error\u003dTrue) as txn:"},{"line_number":877,"context_line":"            txn.add(self._nb_idl.check_revision_number("},{"line_number":878,"context_line":"                    lswitch_name, network, ovn_const.TYPE_NETWORKS))"},{"line_number":879,"context_line":"            if network[\u0027name\u0027] !\u003d original_network[\u0027name\u0027]:"},{"line_number":880,"context_line":"                ext_id \u003d [ovn_const.OVN_NETWORK_NAME_EXT_ID_KEY,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4b6375_6ce06127","line":877,"updated":"2017-11-02 19:17:32.000000000","message":"Is there a reason to do this outside of the if clause?","commit_id":"5ef5a7e432cc6a2d415315c30b012cd3ae4440ed"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"e7d3661e2e99b70baa8763a4cffca43e1767e840","unresolved":false,"context_lines":[{"line_number":874,"context_line":"    def update_network(self, network, original_network):"},{"line_number":875,"context_line":"        lswitch_name \u003d utils.ovn_name(network[\u0027id\u0027])"},{"line_number":876,"context_line":"        with self._nb_idl.transaction(check_error\u003dTrue) as txn:"},{"line_number":877,"context_line":"            txn.add(self._nb_idl.check_revision_number("},{"line_number":878,"context_line":"                    lswitch_name, network, ovn_const.TYPE_NETWORKS))"},{"line_number":879,"context_line":"            if network[\u0027name\u0027] !\u003d original_network[\u0027name\u0027]:"},{"line_number":880,"context_line":"                ext_id \u003d [ovn_const.OVN_NETWORK_NAME_EXT_ID_KEY,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4b6375_3342ab10","line":877,"in_reply_to":"3f4b6375_6ce06127","updated":"2017-11-03 10:16:57.000000000","message":"Yeah, because even if the update in Neutron is not relevant to OVN (e.g updating the object description) the revision_number would still be bumped. So we need to keep track of it otherwise we will later see this object as being out of sync.","commit_id":"5ef5a7e432cc6a2d415315c30b012cd3ae4440ed"},{"author":{"_account_id":23458,"name":"Dong Jun","email":"dongjun.01@bytedance.com","username":"Dongj"},"change_message_id":"4eb66ff235dd850a244a85cf5e6338dfc5cb9682","unresolved":false,"context_lines":[{"line_number":921,"context_line":"        # valid value. Since we can\u0027t save None in OVSDB, we are converting"},{"line_number":922,"context_line":"        # it to \"null\" as a placeholder."},{"line_number":923,"context_line":"        if \u0027qos_policy_id\u0027 in network:"},{"line_number":924,"context_line":"            ext_ids[ovn_const.OVN_QOS_POLICY_EXT_ID_KEY] \u003d network.get("},{"line_number":925,"context_line":"                \u0027qos_policy_id\u0027, \u0027null\u0027)"},{"line_number":926,"context_line":"        return ext_ids"},{"line_number":927,"context_line":""},{"line_number":928,"context_line":"    def create_network(self, network):"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf8cb3f7_d4272e12","line":925,"range":{"start_line":924,"start_character":59,"end_line":925,"end_character":40},"updated":"2017-12-22 11:57:04.000000000","message":"Hi Lucas you will get None if the value is None .^","commit_id":"acc1bc18debcf56f841e51003c977f83249233f9"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"36ab1e1a629c369d57e4e307987d62a49d140de5","unresolved":false,"context_lines":[{"line_number":921,"context_line":"        # valid value. Since we can\u0027t save None in OVSDB, we are converting"},{"line_number":922,"context_line":"        # it to \"null\" as a placeholder."},{"line_number":923,"context_line":"        if \u0027qos_policy_id\u0027 in network:"},{"line_number":924,"context_line":"            ext_ids[ovn_const.OVN_QOS_POLICY_EXT_ID_KEY] \u003d network.get("},{"line_number":925,"context_line":"                \u0027qos_policy_id\u0027, \u0027null\u0027)"},{"line_number":926,"context_line":"        return ext_ids"},{"line_number":927,"context_line":""},{"line_number":928,"context_line":"    def create_network(self, network):"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf8cb3f7_b4e14a9d","line":925,"range":{"start_line":924,"start_character":59,"end_line":925,"end_character":40},"in_reply_to":"bf8cb3f7_d4272e12","updated":"2017-12-22 12:03:08.000000000","message":"Ouch! My python skills are failing on me, better I compare instead of using get() here then.","commit_id":"acc1bc18debcf56f841e51003c977f83249233f9"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"d49c7e41bda9b681af81699fa181cf48b552bed7","unresolved":false,"context_lines":[{"line_number":970,"context_line":""},{"line_number":971,"context_line":"    def update_network(self, network):"},{"line_number":972,"context_line":"        lswitch_name \u003d utils.ovn_name(network[\u0027id\u0027])"},{"line_number":973,"context_line":"        # Check if QOS needs to be update, before updating OVNDB"},{"line_number":974,"context_line":"        qos_update_required \u003d self._is_qos_update_required(network)"},{"line_number":975,"context_line":"        check_rev_cmd \u003d self._nb_idl.check_revision_number("},{"line_number":976,"context_line":"            lswitch_name, network, ovn_const.TYPE_NETWORKS)"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf8cb3f7_bdae0de5","line":973,"range":{"start_line":973,"start_character":19,"end_line":973,"end_character":22},"updated":"2017-12-22 16:56:53.000000000","message":"nit: QoS","commit_id":"a21d6dca20dbdc7a7f89298eefa2e18d32b0053a"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"aaebc992536386c58bbf460e86fafa7cf8f01763","unresolved":false,"context_lines":[{"line_number":970,"context_line":""},{"line_number":971,"context_line":"    def update_network(self, network):"},{"line_number":972,"context_line":"        lswitch_name \u003d utils.ovn_name(network[\u0027id\u0027])"},{"line_number":973,"context_line":"        # Check if QOS needs to be update, before updating OVNDB"},{"line_number":974,"context_line":"        qos_update_required \u003d self._is_qos_update_required(network)"},{"line_number":975,"context_line":"        check_rev_cmd \u003d self._nb_idl.check_revision_number("},{"line_number":976,"context_line":"            lswitch_name, network, ovn_const.TYPE_NETWORKS)"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf8cb3f7_23f89ee3","line":973,"range":{"start_line":973,"start_character":19,"end_line":973,"end_character":22},"in_reply_to":"bf8cb3f7_bdae0de5","updated":"2017-12-22 17:10:00.000000000","message":"Done","commit_id":"a21d6dca20dbdc7a7f89298eefa2e18d32b0053a"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"d49c7e41bda9b681af81699fa181cf48b552bed7","unresolved":false,"context_lines":[{"line_number":972,"context_line":"        lswitch_name \u003d utils.ovn_name(network[\u0027id\u0027])"},{"line_number":973,"context_line":"        # Check if QOS needs to be update, before updating OVNDB"},{"line_number":974,"context_line":"        qos_update_required \u003d self._is_qos_update_required(network)"},{"line_number":975,"context_line":"        check_rev_cmd \u003d self._nb_idl.check_revision_number("},{"line_number":976,"context_line":"            lswitch_name, network, ovn_const.TYPE_NETWORKS)"},{"line_number":977,"context_line":"        with self._nb_idl.transaction(check_error\u003dTrue) as txn:"},{"line_number":978,"context_line":"            txn.add(check_rev_cmd)"},{"line_number":979,"context_line":"            ext_ids \u003d self._gen_network_external_ids(network)"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf8cb3f7_9db54934","line":976,"range":{"start_line":975,"start_character":8,"end_line":976,"end_character":59},"updated":"2017-12-22 16:56:53.000000000","message":"nit: I\u0027d move this inside the with, to make it all clearer that this is part of the transaction.","commit_id":"a21d6dca20dbdc7a7f89298eefa2e18d32b0053a"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"aaebc992536386c58bbf460e86fafa7cf8f01763","unresolved":false,"context_lines":[{"line_number":972,"context_line":"        lswitch_name \u003d utils.ovn_name(network[\u0027id\u0027])"},{"line_number":973,"context_line":"        # Check if QOS needs to be update, before updating OVNDB"},{"line_number":974,"context_line":"        qos_update_required \u003d self._is_qos_update_required(network)"},{"line_number":975,"context_line":"        check_rev_cmd \u003d self._nb_idl.check_revision_number("},{"line_number":976,"context_line":"            lswitch_name, network, ovn_const.TYPE_NETWORKS)"},{"line_number":977,"context_line":"        with self._nb_idl.transaction(check_error\u003dTrue) as txn:"},{"line_number":978,"context_line":"            txn.add(check_rev_cmd)"},{"line_number":979,"context_line":"            ext_ids \u003d self._gen_network_external_ids(network)"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf8cb3f7_235f3ee3","line":976,"range":{"start_line":975,"start_character":8,"end_line":976,"end_character":59},"in_reply_to":"bf8cb3f7_9db54934","updated":"2017-12-22 17:10:00.000000000","message":"I left it outside because I thought it would be more clear that this command will be used outside of the context manager scope later.\n\nAfter the transaction is committed (or aborted), on L982 we check its result to decide whether we should update the QoS or not (later on we use the same strategy to decide whether we should bump the revision number in the ovn_revision_number table or not)","commit_id":"a21d6dca20dbdc7a7f89298eefa2e18d32b0053a"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"7e16342970ba89eb93984d308d01ea052f47d60e","unresolved":false,"context_lines":[{"line_number":982,"context_line":""},{"line_number":983,"context_line":"        # Check if the policy_id has changed"},{"line_number":984,"context_line":"        new_qos_id \u003d network[\u0027qos_policy_id\u0027]"},{"line_number":985,"context_line":"        old_qos_id \u003d ovn_net.external_ids(ovn_const.OVN_QOS_POLICY_EXT_ID_KEY)"},{"line_number":986,"context_line":"        # \"null\" is a placeholder for None in the OVSDB"},{"line_number":987,"context_line":"        if old_qos_id \u003d\u003d \u0027null\u0027:"},{"line_number":988,"context_line":"            old_qos_id \u003d None"}],"source_content_type":"text/x-python","patch_set":13,"id":"9f91af0f_47185d1c","line":985,"updated":"2018-01-02 14:39:49.000000000","message":"Isn\u0027t external_ids a dict object ? Wont we see TypeError: \u0027dict\u0027 object is not callable\n\nYou need to use ovn_net.external_ids.get(ovn_const.OVN_QOS_POLICY_EXT_ID_KEY) right ?\n\n(Note: -1 is because of this). Correct me if I am wrong here.\n\n\n\nBecause of L980 above, I think you can directly have\nold_qos_id \u003d ovn_net.external_ids[ovn_const.OVN_QOS_POLICY_EXT_ID_KEY]\n\nYou can probably reduce few lines by doing something like below from L984\n\n***********\nnew_qos_id \u003d network[\u0027qos_policy_id\u0027] or \u0027null\u0027\nreturn new_qos_id !\u003d ovn_net.external_ids[ovn_const.OVN_QOS_POLICY_EXT_ID_KEY]\n**************","commit_id":"15a954ed4f0a9beb89be2432eee0c3d41c6ca7b8"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"0b3b5e669d8dae30ab6468c7dcdc9cdef4cd6a09","unresolved":false,"context_lines":[{"line_number":982,"context_line":""},{"line_number":983,"context_line":"        # Check if the policy_id has changed"},{"line_number":984,"context_line":"        new_qos_id \u003d network[\u0027qos_policy_id\u0027]"},{"line_number":985,"context_line":"        old_qos_id \u003d ovn_net.external_ids(ovn_const.OVN_QOS_POLICY_EXT_ID_KEY)"},{"line_number":986,"context_line":"        # \"null\" is a placeholder for None in the OVSDB"},{"line_number":987,"context_line":"        if old_qos_id \u003d\u003d \u0027null\u0027:"},{"line_number":988,"context_line":"            old_qos_id \u003d None"}],"source_content_type":"text/x-python","patch_set":13,"id":"9f91af0f_675fa141","line":985,"in_reply_to":"9f91af0f_47185d1c","updated":"2018-01-02 14:52:04.000000000","message":"You are right! That\u0027s a syntax error right there. I will fix it and submit a new patch-set. Great great catch!","commit_id":"15a954ed4f0a9beb89be2432eee0c3d41c6ca7b8"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"6e820b131249b331c7215825d2931609cc73f3b7","unresolved":false,"context_lines":[{"line_number":982,"context_line":""},{"line_number":983,"context_line":"        # Check if the policy_id has changed"},{"line_number":984,"context_line":"        new_qos_id \u003d network[\u0027qos_policy_id\u0027]"},{"line_number":985,"context_line":"        old_qos_id \u003d ovn_net.external_ids(ovn_const.OVN_QOS_POLICY_EXT_ID_KEY)"},{"line_number":986,"context_line":"        # \"null\" is a placeholder for None in the OVSDB"},{"line_number":987,"context_line":"        if old_qos_id \u003d\u003d \u0027null\u0027:"},{"line_number":988,"context_line":"            old_qos_id \u003d None"}],"source_content_type":"text/x-python","patch_set":13,"id":"9f91af0f_472b70ea","line":985,"in_reply_to":"9f91af0f_675fa141","updated":"2018-01-03 05:28:43.000000000","message":"Since qos functional tests passed, looks like this path of the code is not getting tested. Something to look into (as a follow up patch may be :) )","commit_id":"15a954ed4f0a9beb89be2432eee0c3d41c6ca7b8"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"7e16342970ba89eb93984d308d01ea052f47d60e","unresolved":false,"context_lines":[{"line_number":999,"context_line":"            ext_ids \u003d self._gen_network_external_ids(network)"},{"line_number":1000,"context_line":"            txn.add(self._nb_idl.set_lswitch_ext_ids(lswitch_name, ext_ids))"},{"line_number":1001,"context_line":""},{"line_number":1002,"context_line":"        if check_rev_cmd.result \u003d\u003d ovn_const.TXN_COMMITTED:"},{"line_number":1003,"context_line":"            if qos_update_required:"},{"line_number":1004,"context_line":"                self._qos_driver.update_network(network)"},{"line_number":1005,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"9f91af0f_87c8a555","line":1002,"updated":"2018-01-02 14:39:49.000000000","message":"Instead of 2 if\u0027s you can have just one\n\nif txn commited and qos_update_required:\n ...","commit_id":"15a954ed4f0a9beb89be2432eee0c3d41c6ca7b8"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"0b3b5e669d8dae30ab6468c7dcdc9cdef4cd6a09","unresolved":false,"context_lines":[{"line_number":999,"context_line":"            ext_ids \u003d self._gen_network_external_ids(network)"},{"line_number":1000,"context_line":"            txn.add(self._nb_idl.set_lswitch_ext_ids(lswitch_name, ext_ids))"},{"line_number":1001,"context_line":""},{"line_number":1002,"context_line":"        if check_rev_cmd.result \u003d\u003d ovn_const.TXN_COMMITTED:"},{"line_number":1003,"context_line":"            if qos_update_required:"},{"line_number":1004,"context_line":"                self._qos_driver.update_network(network)"},{"line_number":1005,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"9f91af0f_c73f8dd4","line":1002,"in_reply_to":"9f91af0f_87c8a555","updated":"2018-01-02 14:52:04.000000000","message":"Yeah, I left it like this because on the next patch in the series I use the first conditional to bump the revision number in the cache table: https://review.openstack.org/#/c/517918/14/networking_ovn/common/ovn_client.py@1008","commit_id":"15a954ed4f0a9beb89be2432eee0c3d41c6ca7b8"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"5781a117801a15cddfd4b311a108228c09f71951","unresolved":false,"context_lines":[{"line_number":947,"context_line":"        # it to \"null\" as a placeholder."},{"line_number":948,"context_line":"        if \u0027qos_policy_id\u0027 in network:"},{"line_number":949,"context_line":"            ext_ids[ovn_const.OVN_QOS_POLICY_EXT_ID_KEY] \u003d ("},{"line_number":950,"context_line":"                network[\u0027qos_policy_id\u0027] or \u0027null\u0027)"},{"line_number":951,"context_line":"        return ext_ids"},{"line_number":952,"context_line":""},{"line_number":953,"context_line":"    def create_network(self, network):"}],"source_content_type":"text/x-python","patch_set":15,"id":"9f91af0f_a82a1b8d","line":950,"range":{"start_line":950,"start_character":45,"end_line":950,"end_character":49},"updated":"2018-01-05 03:51:22.000000000","message":"maybe you can use a better placeholder like a sentinel object.","commit_id":"290c3d83c5d27ed986d8c2c2f118a74f314bf963"}],"networking_ovn/ml2/qos_driver.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"7f5f47f3ae2809d0a32e69af7a383fc60e86d166","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def update_network(self, network, original_network):"},{"line_number":147,"context_line":"        # Is qos service enabled"},{"line_number":148,"context_line":"        if \u0027qos_policy_id\u0027 not in network:"},{"line_number":149,"context_line":"            return"},{"line_number":150,"context_line":"        # Was network qos policy changed"},{"line_number":151,"context_line":"        network_policy_id \u003d network.get(\u0027qos_policy_id\u0027)"},{"line_number":152,"context_line":"        old_network_policy_id \u003d original_network.get(\u0027qos_policy_id\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"bf8cb3f7_0a27dc14","side":"PARENT","line":149,"range":{"start_line":148,"start_character":3,"end_line":149,"end_character":18},"updated":"2017-12-20 18:43:37.000000000","message":"here","commit_id":"8720da23d91254b145d76ddebf032fbcfd491f8d"},{"author":{"_account_id":23458,"name":"Dong Jun","email":"dongjun.01@bytedance.com","username":"Dongj"},"change_message_id":"26b0e028fe49cf1378d50ee8e62d1ebbfae60272","unresolved":false,"context_lines":[{"line_number":146,"context_line":"    def update_network(self, network):"},{"line_number":147,"context_line":"        # Is qos service enabled"},{"line_number":148,"context_line":"        network_policy_id \u003d network.get(\u0027qos_policy_id\u0027)"},{"line_number":149,"context_line":"        if network_policy_id is None:"},{"line_number":150,"context_line":"            return"},{"line_number":151,"context_line":"        # Update the qos options on each network port"},{"line_number":152,"context_line":"        context \u003d n_context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":9,"id":"df87a7cf_bd67684d","line":149,"range":{"start_line":149,"start_character":8,"end_line":149,"end_character":37},"updated":"2017-12-20 15:54:44.000000000","message":"Did this patch drop scenario updating qos_policy_id from valid to None?","commit_id":"2663c1db62ffb0eaeea4d3d5534abf86e6827c32"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"b8a42c16c825b540c961e0a869e66a4ba5cdaedc","unresolved":false,"context_lines":[{"line_number":146,"context_line":"    def update_network(self, network):"},{"line_number":147,"context_line":"        # Is qos service enabled"},{"line_number":148,"context_line":"        network_policy_id \u003d network.get(\u0027qos_policy_id\u0027)"},{"line_number":149,"context_line":"        if network_policy_id is None:"},{"line_number":150,"context_line":"            return"},{"line_number":151,"context_line":"        # Update the qos options on each network port"},{"line_number":152,"context_line":"        context \u003d n_context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":9,"id":"bf8cb3f7_1c9e3863","line":149,"range":{"start_line":149,"start_character":8,"end_line":149,"end_character":37},"in_reply_to":"bf8cb3f7_d550ac35","updated":"2017-12-21 10:15:33.000000000","message":"Hi Dong,\n\nOh right, I wasn\u0027t aware of the \"key exist\" Vs. \"value being None\" difference there.\n\nYeah saving the last changed \"qos_policy_id\" in OVNDB for later comparison should be simple enough. I change the patch to address this two things.\n\nThese reviews are super valuable, I wouldn\u0027t know these things if you didn\u0027t point it out. So thanks a lot for it!","commit_id":"2663c1db62ffb0eaeea4d3d5534abf86e6827c32"},{"author":{"_account_id":23458,"name":"Dong Jun","email":"dongjun.01@bytedance.com","username":"Dongj"},"change_message_id":"5515c54ca20d09f5057bff9d22db13af69ef4d2d","unresolved":false,"context_lines":[{"line_number":146,"context_line":"    def update_network(self, network):"},{"line_number":147,"context_line":"        # Is qos service enabled"},{"line_number":148,"context_line":"        network_policy_id \u003d network.get(\u0027qos_policy_id\u0027)"},{"line_number":149,"context_line":"        if network_policy_id is None:"},{"line_number":150,"context_line":"            return"},{"line_number":151,"context_line":"        # Update the qos options on each network port"},{"line_number":152,"context_line":"        context \u003d n_context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":9,"id":"bf8cb3f7_d550ac35","line":149,"range":{"start_line":149,"start_character":8,"end_line":149,"end_character":37},"in_reply_to":"bf8cb3f7_ead638f2","updated":"2017-12-21 02:15:34.000000000","message":"Two cases we get None from network.get(\u0027qos_policy_id\u0027), the key qos_policy_id is not present or the value of qos_policy_id is None.  In the 2nd case, it is possible that qos_policy_id was updated to None by API and we should handle that, returning directly is incorrect.\n\nAbout saving qos_policy_id. I tend to save it because updating qos_policy_id traverses ports and invokes into mech driver rather than simply updating ls row.  On the contrary if it is a simple operation like updating network name, I agree that it does not need that precise. Thoughts?","commit_id":"2663c1db62ffb0eaeea4d3d5534abf86e6827c32"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"7f5f47f3ae2809d0a32e69af7a383fc60e86d166","unresolved":false,"context_lines":[{"line_number":146,"context_line":"    def update_network(self, network):"},{"line_number":147,"context_line":"        # Is qos service enabled"},{"line_number":148,"context_line":"        network_policy_id \u003d network.get(\u0027qos_policy_id\u0027)"},{"line_number":149,"context_line":"        if network_policy_id is None:"},{"line_number":150,"context_line":"            return"},{"line_number":151,"context_line":"        # Update the qos options on each network port"},{"line_number":152,"context_line":"        context \u003d n_context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":9,"id":"bf8cb3f7_ead638f2","line":149,"range":{"start_line":149,"start_character":8,"end_line":149,"end_character":37},"in_reply_to":"df87a7cf_bd67684d","updated":"2017-12-20 18:43:37.000000000","message":"Hi Dong,\n\nNot really, prior to this patch we were already ignoring updates \u0027qos_policy_id\u0027 wasn\u0027t present in the network object.\n\nWhat this patch did was to remove the comparison between the new and old \"qos_policy_id\", so now it will call _update_network_ports() regarless if the qos_policy_id changing or not. Maybe that\u0027s not the smartest thing to do.\n\nI could change this patch to save the qos_policy_id in OVNDB so that we can compare the new and old and determine whether we need an update or not.\n\nWould that make more sense you think ?","commit_id":"2663c1db62ffb0eaeea4d3d5534abf86e6827c32"}],"networking_ovn/ovsdb/commands.py":[{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"514665f60b85418e3e372e63810cf8ffaa640626","unresolved":false,"context_lines":[{"line_number":1017,"context_line":""},{"line_number":1018,"context_line":"    def run_idl(self, txn):"},{"line_number":1019,"context_line":"        try:"},{"line_number":1020,"context_line":"            ovn_resource \u003d idlutils.row_by_value("},{"line_number":1021,"context_line":"                self.api.idl, RESOURCE_TYPE_MAP[self.resource_type],"},{"line_number":1022,"context_line":"                \u0027name\u0027, self.name)"},{"line_number":1023,"context_line":"        except idlutils.RowNotFound:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4b6375_ec42110f","line":1020,"updated":"2017-11-02 19:17:32.000000000","message":"if we use self.lookup(), we can look up by name or uuid (or other fields that we add to a lookup table).","commit_id":"5ef5a7e432cc6a2d415315c30b012cd3ae4440ed"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"e7d3661e2e99b70baa8763a4cffca43e1767e840","unresolved":false,"context_lines":[{"line_number":1017,"context_line":""},{"line_number":1018,"context_line":"    def run_idl(self, txn):"},{"line_number":1019,"context_line":"        try:"},{"line_number":1020,"context_line":"            ovn_resource \u003d idlutils.row_by_value("},{"line_number":1021,"context_line":"                self.api.idl, RESOURCE_TYPE_MAP[self.resource_type],"},{"line_number":1022,"context_line":"                \u0027name\u0027, self.name)"},{"line_number":1023,"context_line":"        except idlutils.RowNotFound:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4b6375_335bcbf6","line":1020,"in_reply_to":"3f4b6375_ec42110f","updated":"2017-11-03 10:16:57.000000000","message":"Oh, great! I will use the self.lookup() here then since it\u0027s more flexible. Thanks for the tip.","commit_id":"5ef5a7e432cc6a2d415315c30b012cd3ae4440ed"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"404f65033c54cf156de7e0c753f8c8a4717f2582","unresolved":false,"context_lines":[{"line_number":1040,"context_line":""},{"line_number":1041,"context_line":"        ovn_resource.verify(\u0027external_ids\u0027)"},{"line_number":1042,"context_line":"        external_ids[ovn_const.OVN_REV_NUM_EXT_ID_KEY] \u003d str(neutron_revision)"},{"line_number":1043,"context_line":"        ovn_resource.external_ids \u003d external_ids"},{"line_number":1044,"context_line":""},{"line_number":1045,"context_line":"    def post_commit(self, txn):"},{"line_number":1046,"context_line":"        self.result \u003d ovn_const.TXN_COMMITTED"}],"source_content_type":"text/x-python","patch_set":5,"id":"1f485f77_1de67ee9","line":1043,"updated":"2017-11-17 16:32:08.000000000","message":"We need to use setkey() here, or external_ids can be overwritten by another command \n\nhttps://github.com/openvswitch/ovs/blob/f73d562fc0ee3ff43f65cc418f213a79a727cb19/python/ovs/db/idl.py#L879","commit_id":"eb5da6106642ee613df55e4d61bd49d8d3e83d97"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"d49c7e41bda9b681af81699fa181cf48b552bed7","unresolved":false,"context_lines":[{"line_number":1033,"context_line":"            ovn_const.OVN_REV_NUM_EXT_ID_KEY, -1))"},{"line_number":1034,"context_line":"        neutron_revision \u003d utils.get_revision_number(self.resource,"},{"line_number":1035,"context_line":"                                                     self.resource_type)"},{"line_number":1036,"context_line":"        if ovn_revision \u003e neutron_revision:"},{"line_number":1037,"context_line":"            raise ovn_exc.RevisionConflict("},{"line_number":1038,"context_line":"                resource_id\u003dself.name, resource_type\u003dself.resource_type)"},{"line_number":1039,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"bf8cb3f7_28139db7","line":1036,"updated":"2017-12-22 16:56:53.000000000","message":"Think of a neutron db restore (after some sort of db crash.. shit happens). We need to make a mechanism (may be include a flag in the sync tool) to let us update revisions forcedfully.","commit_id":"a21d6dca20dbdc7a7f89298eefa2e18d32b0053a"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"aaebc992536386c58bbf460e86fafa7cf8f01763","unresolved":false,"context_lines":[{"line_number":1033,"context_line":"            ovn_const.OVN_REV_NUM_EXT_ID_KEY, -1))"},{"line_number":1034,"context_line":"        neutron_revision \u003d utils.get_revision_number(self.resource,"},{"line_number":1035,"context_line":"                                                     self.resource_type)"},{"line_number":1036,"context_line":"        if ovn_revision \u003e neutron_revision:"},{"line_number":1037,"context_line":"            raise ovn_exc.RevisionConflict("},{"line_number":1038,"context_line":"                resource_id\u003dself.name, resource_type\u003dself.resource_type)"},{"line_number":1039,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"bf8cb3f7_a3ffcea8","line":1036,"in_reply_to":"bf8cb3f7_28139db7","updated":"2017-12-22 17:10:00.000000000","message":"Right, yeah right now if the Neutron database is restored but the OVN database is left as-is the updates will be aborted (because now the revision numbers in neutron is lower than what we have in OVNDB).\n\nIf there\u0027s a case for it, we can have a flag somewhere to tell it to not raise an exception. Or, we could also have a script that would resync the revision numbers from neutron to ovndb ?","commit_id":"a21d6dca20dbdc7a7f89298eefa2e18d32b0053a"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"7e16342970ba89eb93984d308d01ea052f47d60e","unresolved":false,"context_lines":[{"line_number":1028,"context_line":"                     \u0027does not exist\u0027) % self.name)"},{"line_number":1029,"context_line":"            raise RuntimeError(msg)"},{"line_number":1030,"context_line":""},{"line_number":1031,"context_line":"        external_ids \u003d getattr(ovn_resource, \u0027external_ids\u0027, {})"},{"line_number":1032,"context_line":"        ovn_revision \u003d int(external_ids.get("},{"line_number":1033,"context_line":"            ovn_const.OVN_REV_NUM_EXT_ID_KEY, -1))"},{"line_number":1034,"context_line":"        neutron_revision \u003d utils.get_revision_number(self.resource,"}],"source_content_type":"text/x-python","patch_set":13,"id":"9f91af0f_274af954","line":1031,"updated":"2018-01-02 14:39:49.000000000","message":"getattr for a ovsd.db.idl.Row object is overridden here - https://github.com/openvswitch/ovs/blob/master/python/ovs/db/idl.py#L779.\n\nIf you see the log here - https://logs.rdoproject.org/openstack-periodic/periodic-tripleo-ci-centos-7-multinode-1ctlr-featureset030-master/62266a4/subnode-2/var/log/extra/docker/containers/neutron_api/stdout.log.txt.gz#_2017-12-31_16_53_49_827\n\nwe can hit the KeyError exception if the column doesn\u0027t exist. We are definitely sure that with OVS 2.8/2.9 we have external_ids column is present for all the OVN schema tables. I would still prefer to catch KeyError exception here. Or may be the caller of this function can use is_col_present(\u0027external_ids\u0027) before calling this. Thoughts ?","commit_id":"15a954ed4f0a9beb89be2432eee0c3d41c6ca7b8"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"0b3b5e669d8dae30ab6468c7dcdc9cdef4cd6a09","unresolved":false,"context_lines":[{"line_number":1028,"context_line":"                     \u0027does not exist\u0027) % self.name)"},{"line_number":1029,"context_line":"            raise RuntimeError(msg)"},{"line_number":1030,"context_line":""},{"line_number":1031,"context_line":"        external_ids \u003d getattr(ovn_resource, \u0027external_ids\u0027, {})"},{"line_number":1032,"context_line":"        ovn_revision \u003d int(external_ids.get("},{"line_number":1033,"context_line":"            ovn_const.OVN_REV_NUM_EXT_ID_KEY, -1))"},{"line_number":1034,"context_line":"        neutron_revision \u003d utils.get_revision_number(self.resource,"}],"source_content_type":"text/x-python","patch_set":13,"id":"9f91af0f_4704dd17","line":1031,"in_reply_to":"9f91af0f_274af954","updated":"2018-01-02 14:52:04.000000000","message":"Well, it\u0027s probably better to have the is_col_present() conditional within this command I think. That way we won\u0027t need to include the same conditional on multiple places. I will change the code to address this as well","commit_id":"15a954ed4f0a9beb89be2432eee0c3d41c6ca7b8"}],"networking_ovn/ovsdb/ovn_api.py":[{"author":{"_account_id":23458,"name":"Dong Jun","email":"dongjun.01@bytedance.com","username":"Dongj"},"change_message_id":"26b0e028fe49cf1378d50ee8e62d1ebbfae60272","unresolved":false,"context_lines":[{"line_number":529,"context_line":"        :type resource:       dictionary"},{"line_number":530,"context_line":"        :param resource_type: The resource object type"},{"line_number":531,"context_line":"        :type resource_type:  dictionary"},{"line_number":532,"context_line":"        :param if_exists:     Do not fail if lswitch does not exist"},{"line_number":533,"context_line":"        :type if_exists:      bool"},{"line_number":534,"context_line":"        :returns:             :class:`Command` with no result"},{"line_number":535,"context_line":"        :raise:               RevisionConflict if the revision number in"}],"source_content_type":"text/x-python","patch_set":9,"id":"df87a7cf_b30a39cf","line":532,"range":{"start_line":532,"start_character":45,"end_line":532,"end_character":52},"updated":"2017-12-20 15:54:44.000000000","message":"resource?","commit_id":"2663c1db62ffb0eaeea4d3d5534abf86e6827c32"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"7f5f47f3ae2809d0a32e69af7a383fc60e86d166","unresolved":false,"context_lines":[{"line_number":529,"context_line":"        :type resource:       dictionary"},{"line_number":530,"context_line":"        :param resource_type: The resource object type"},{"line_number":531,"context_line":"        :type resource_type:  dictionary"},{"line_number":532,"context_line":"        :param if_exists:     Do not fail if lswitch does not exist"},{"line_number":533,"context_line":"        :type if_exists:      bool"},{"line_number":534,"context_line":"        :returns:             :class:`Command` with no result"},{"line_number":535,"context_line":"        :raise:               RevisionConflict if the revision number in"}],"source_content_type":"text/x-python","patch_set":9,"id":"bf8cb3f7_8a052c7d","line":532,"range":{"start_line":532,"start_character":45,"end_line":532,"end_character":52},"in_reply_to":"df87a7cf_b30a39cf","updated":"2017-12-20 18:43:37.000000000","message":"++ thanks","commit_id":"2663c1db62ffb0eaeea4d3d5534abf86e6827c32"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"d49c7e41bda9b681af81699fa181cf48b552bed7","unresolved":false,"context_lines":[{"line_number":539,"context_line":""},{"line_number":540,"context_line":"        Check if the revision number in OVN is lower than the one from"},{"line_number":541,"context_line":"        the Neutron resource, otherwise raise RevisionConflict and skip"},{"line_number":542,"context_line":"        the update."},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"        :param name:          The unique name of the resource"},{"line_number":545,"context_line":"        :type name:           string"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf8cb3f7_23273eb6","line":542,"updated":"2017-12-22 16:56:53.000000000","message":"Does it make sense to change \"update\" for \"transaction\"?","commit_id":"a21d6dca20dbdc7a7f89298eefa2e18d32b0053a"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"aaebc992536386c58bbf460e86fafa7cf8f01763","unresolved":false,"context_lines":[{"line_number":539,"context_line":""},{"line_number":540,"context_line":"        Check if the revision number in OVN is lower than the one from"},{"line_number":541,"context_line":"        the Neutron resource, otherwise raise RevisionConflict and skip"},{"line_number":542,"context_line":"        the update."},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"        :param name:          The unique name of the resource"},{"line_number":545,"context_line":"        :type name:           string"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf8cb3f7_03f31a0c","line":542,"in_reply_to":"bf8cb3f7_23273eb6","updated":"2017-12-22 17:10:00.000000000","message":"It would, we can say \"and abort the transaction.\"","commit_id":"a21d6dca20dbdc7a7f89298eefa2e18d32b0053a"}],"networking_ovn/tests/unit/ml2/test_mech_driver.py":[{"author":{"_account_id":23458,"name":"Dong Jun","email":"dongjun.01@bytedance.com","username":"Dongj"},"change_message_id":"1ba0cc237b87ab858ef329212c3a35958eeae29d","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            \"networking_ovn.common.acl._acl_columns_name_severity_supported\","},{"line_number":86,"context_line":"            return_value\u003dTrue"},{"line_number":87,"context_line":"        ).start()"},{"line_number":88,"context_line":"        p \u003d mock.patch.object(ovn_utils, \u0027get_revision_number\u0027, return_value\u003d1)"},{"line_number":89,"context_line":"        p.start()"},{"line_number":90,"context_line":"        self.addCleanup(p.stop)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def test__create_security_group(self):"},{"line_number":93,"context_line":"        self.mech_driver._create_security_group("}],"source_content_type":"text/x-python","patch_set":14,"id":"9f91af0f_e20f122c","line":90,"range":{"start_line":88,"start_character":0,"end_line":90,"end_character":31},"updated":"2018-01-03 06:21:50.000000000","message":"Seems a special revision_number value it not needed here, therefore how about activating the revision plugin in Setup  instead of mock?\n\nfrom neutron.services.revisions import revision_plugin\n\n        revision_plugin.RevisionPlugin()","commit_id":"42d584deeafa02e648f5065bff88c5eb0a4da39e"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"48ba2d1c6913a03b297790ae6958a6703997eb83","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            \"networking_ovn.common.acl._acl_columns_name_severity_supported\","},{"line_number":86,"context_line":"            return_value\u003dTrue"},{"line_number":87,"context_line":"        ).start()"},{"line_number":88,"context_line":"        p \u003d mock.patch.object(ovn_utils, \u0027get_revision_number\u0027, return_value\u003d1)"},{"line_number":89,"context_line":"        p.start()"},{"line_number":90,"context_line":"        self.addCleanup(p.stop)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def test__create_security_group(self):"},{"line_number":93,"context_line":"        self.mech_driver._create_security_group("}],"source_content_type":"text/x-python","patch_set":14,"id":"9f91af0f_0ca4a856","line":90,"range":{"start_line":88,"start_character":0,"end_line":90,"end_character":31},"in_reply_to":"9f91af0f_e20f122c","updated":"2018-01-03 11:37:52.000000000","message":"Oh great! I will give it a go","commit_id":"42d584deeafa02e648f5065bff88c5eb0a4da39e"}]}
