)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a6ef1b514aeece746992a03bf16c96a2f0f08e69","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"QoS: update the database before notifying the backend on delete"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Previously, the QoS plugin was executin the DB delete operation"},{"line_number":10,"context_line":"after notifying the backend about the operation. This leads"},{"line_number":11,"context_line":"to situations where the backend is notified for deletion, and"},{"line_number":12,"context_line":"then the policy can\u0027t be deleted because it\u0027s in use."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a71b18c_03c70313","line":9,"range":{"start_line":9,"start_character":31,"end_line":9,"end_character":39},"updated":"2016-12-01 15:34:34.000000000","message":"executing","commit_id":"f433305af46e0517e07ca444c5af03c4a9e7ada6"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a6ef1b514aeece746992a03bf16c96a2f0f08e69","unresolved":false,"context_lines":[{"line_number":11,"context_line":"to situations where the backend is notified for deletion, and"},{"line_number":12,"context_line":"then the policy can\u0027t be deleted because it\u0027s in use."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Correct order is, DB delete first, then notify the backend."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I357543832b9359bf169d05d079bd153f0ee591c4"},{"line_number":17,"context_line":"Closes-Bug: #1646370"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a71b18c_e32cc7ad","line":14,"updated":"2016-12-01 15:34:34.000000000","message":"Can we maybe add a set of tests for each qos api endpoint that would make sure that a call resulting in an error from db layer does not result in notification issued? Not just for delete_policy, but all endpoints, to avoid regression in the future.","commit_id":"f433305af46e0517e07ca444c5af03c4a9e7ada6"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"c750891ad7f4afeab44cc1e5223feb6c80c5b902","unresolved":false,"context_lines":[{"line_number":11,"context_line":"to situations where the backend is notified for deletion, and"},{"line_number":12,"context_line":"then the policy can\u0027t be deleted because it\u0027s in use."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Correct order is, DB delete first, then notify the backend."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I357543832b9359bf169d05d079bd153f0ee591c4"},{"line_number":17,"context_line":"Closes-Bug: #1646370"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a71b18c_11163ea7","line":14,"in_reply_to":"3a71b18c_81af8be2","updated":"2016-12-02 09:42:56.000000000","message":"+1","commit_id":"f433305af46e0517e07ca444c5af03c4a9e7ada6"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"6ea0e358b76e5241a847af0aa136c80f7bf3ebb1","unresolved":false,"context_lines":[{"line_number":11,"context_line":"to situations where the backend is notified for deletion, and"},{"line_number":12,"context_line":"then the policy can\u0027t be deleted because it\u0027s in use."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Correct order is, DB delete first, then notify the backend."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I357543832b9359bf169d05d079bd153f0ee591c4"},{"line_number":17,"context_line":"Closes-Bug: #1646370"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a71b18c_81af8be2","line":14,"in_reply_to":"3a71b18c_e32cc7ad","updated":"2016-12-01 15:52:24.000000000","message":"Yeah, sound reasonable, I was thinking about that after submission to review.","commit_id":"f433305af46e0517e07ca444c5af03c4a9e7ada6"}],"neutron/tests/unit/services/qos/test_qos_plugin.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"7a37f92a1e886d3b1a9be9635d7edfebec3e8ddb","unresolved":false,"context_lines":[{"line_number":398,"context_line":"        mock_manager \u003d mock.Mock()"},{"line_number":399,"context_line":"        mock_manager.attach_mock(qos_policy_mock, \u0027QosPolicy\u0027)"},{"line_number":400,"context_line":"        mock_manager.attach_mock(self.qos_plugin.notification_driver_manager,"},{"line_number":401,"context_line":"                            \u0027notification_driver\u0027)"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"        for action, arguments in policy_actions.items():"},{"line_number":404,"context_line":"            mock_manager.reset_mock()"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a71b18c_20a103a4","line":401,"updated":"2016-12-02 22:33:59.000000000","message":"nit: shouldn\u0027t be aligned with \"self\" in line above?","commit_id":"4f1d56099e191aef26f188306e4210ab5a211ff1"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c6fce3eef17768349e874fde4196d851b2ba2708","unresolved":false,"context_lines":[{"line_number":398,"context_line":"        mock_manager \u003d mock.Mock()"},{"line_number":399,"context_line":"        mock_manager.attach_mock(qos_policy_mock, \u0027QosPolicy\u0027)"},{"line_number":400,"context_line":"        mock_manager.attach_mock(self.qos_plugin.notification_driver_manager,"},{"line_number":401,"context_line":"                            \u0027notification_driver\u0027)"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"        for action, arguments in policy_actions.items():"},{"line_number":404,"context_line":"            mock_manager.reset_mock()"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a71b18c_9956adcc","line":401,"in_reply_to":"3a71b18c_20a103a4","updated":"2016-12-05 10:46:05.000000000","message":"Done","commit_id":"4f1d56099e191aef26f188306e4210ab5a211ff1"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"7a37f92a1e886d3b1a9be9635d7edfebec3e8ddb","unresolved":false,"context_lines":[{"line_number":446,"context_line":"            # some actions construct rule from class reference"},{"line_number":447,"context_line":"            rule_mock_call \u003d getattr(mock.call.RuleCls(), action)()"},{"line_number":448,"context_line":""},{"line_number":449,"context_line":"            notify_mock_call \u003d getattr(mock.call.notification_driver,"},{"line_number":450,"context_line":"                                       \u0027update_policy\u0027)(self.ctxt, mock.ANY)"},{"line_number":451,"context_line":""},{"line_number":452,"context_line":"            if rule_mock_call in mock_manager.mock_calls:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a71b18c_40aa7f71","line":449,"updated":"2016-12-02 22:33:59.000000000","message":"nit: I would preffer to move it to line below and make it in same way like is in L445","commit_id":"4f1d56099e191aef26f188306e4210ab5a211ff1"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"8c33845a4711c71fa57d6b1873cba0715697e1bc","unresolved":false,"context_lines":[{"line_number":447,"context_line":"            rule_mock_call \u003d getattr(mock.call.RuleCls(), action)()"},{"line_number":448,"context_line":""},{"line_number":449,"context_line":"            notify_mock_call \u003d getattr(mock.call.notification_driver,"},{"line_number":450,"context_line":"                                       \u0027update_policy\u0027)(self.ctxt, mock.ANY)"},{"line_number":451,"context_line":""},{"line_number":452,"context_line":"            if rule_mock_call in mock_manager.mock_calls:"},{"line_number":453,"context_line":"                action_index \u003d mock_manager.mock_calls.index(rule_mock_call)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a71b18c_bd48dc88","line":450,"updated":"2016-12-02 22:09:45.000000000","message":"this can just be mock.call.notification_driver.update_policy(self.ctxt, mock.ANY)","commit_id":"4f1d56099e191aef26f188306e4210ab5a211ff1"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c6fce3eef17768349e874fde4196d851b2ba2708","unresolved":false,"context_lines":[{"line_number":447,"context_line":"            rule_mock_call \u003d getattr(mock.call.RuleCls(), action)()"},{"line_number":448,"context_line":""},{"line_number":449,"context_line":"            notify_mock_call \u003d getattr(mock.call.notification_driver,"},{"line_number":450,"context_line":"                                       \u0027update_policy\u0027)(self.ctxt, mock.ANY)"},{"line_number":451,"context_line":""},{"line_number":452,"context_line":"            if rule_mock_call in mock_manager.mock_calls:"},{"line_number":453,"context_line":"                action_index \u003d mock_manager.mock_calls.index(rule_mock_call)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a71b18c_f9cde185","line":450,"in_reply_to":"3a71b18c_bd48dc88","updated":"2016-12-05 10:46:05.000000000","message":"Done","commit_id":"4f1d56099e191aef26f188306e4210ab5a211ff1"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"7a37f92a1e886d3b1a9be9635d7edfebec3e8ddb","unresolved":false,"context_lines":[{"line_number":455,"context_line":"                action_index \u003d mock_manager.mock_calls.index("},{"line_number":456,"context_line":"                    get_rule_mock_call)"},{"line_number":457,"context_line":""},{"line_number":458,"context_line":"            self.assertTrue(action_index \u003c"},{"line_number":459,"context_line":"                            mock_manager.mock_calls.index(notify_mock_call))"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a71b18c_e0cb8b51","line":458,"updated":"2016-12-02 22:33:59.000000000","message":"nit: maybe better for readability would be to move \"action_index\" to line below?","commit_id":"4f1d56099e191aef26f188306e4210ab5a211ff1"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c6fce3eef17768349e874fde4196d851b2ba2708","unresolved":false,"context_lines":[{"line_number":455,"context_line":"                action_index \u003d mock_manager.mock_calls.index("},{"line_number":456,"context_line":"                    get_rule_mock_call)"},{"line_number":457,"context_line":""},{"line_number":458,"context_line":"            self.assertTrue(action_index \u003c"},{"line_number":459,"context_line":"                            mock_manager.mock_calls.index(notify_mock_call))"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a71b18c_19c7fd64","line":458,"in_reply_to":"3a71b18c_e0cb8b51","updated":"2016-12-05 10:46:05.000000000","message":"Done","commit_id":"4f1d56099e191aef26f188306e4210ab5a211ff1"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"82ec8f772794c3f952daf4047f4c811f1969e421","unresolved":false,"context_lines":[{"line_number":412,"context_line":"                                                             mock.ANY)"},{"line_number":413,"context_line":""},{"line_number":414,"context_line":"            self.assertTrue(mock_manager.mock_calls.index(policy_mock_call) \u003c"},{"line_number":415,"context_line":"                            mock_manager.mock_calls.index(notify_mock_call))"},{"line_number":416,"context_line":""},{"line_number":417,"context_line":"    @mock.patch(\u0027neutron.objects.qos.policy.QosPolicy\u0027)"},{"line_number":418,"context_line":"    def test_rule_notification_ordering(self, qos_policy_mock):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_6bd7334b","line":415,"updated":"2016-12-05 13:17:38.000000000","message":"isn\u0027t simpler to use assert_has_calls?","commit_id":"8fcba9dec801a0fb57ff29f97838958f083c8131"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"d695442b932e3ff4d29c8d09bf1f94d34ee4e6cd","unresolved":false,"context_lines":[{"line_number":412,"context_line":"                                                             mock.ANY)"},{"line_number":413,"context_line":""},{"line_number":414,"context_line":"            self.assertTrue(mock_manager.mock_calls.index(policy_mock_call) \u003c"},{"line_number":415,"context_line":"                            mock_manager.mock_calls.index(notify_mock_call))"},{"line_number":416,"context_line":""},{"line_number":417,"context_line":"    @mock.patch(\u0027neutron.objects.qos.policy.QosPolicy\u0027)"},{"line_number":418,"context_line":"    def test_rule_notification_ordering(self, qos_policy_mock):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a6eadb0_1a69c68b","line":415,"in_reply_to":"1a6eadb0_20e2da9f","updated":"2016-12-14 16:28:55.000000000","message":"ok, thank you for confirming.","commit_id":"8fcba9dec801a0fb57ff29f97838958f083c8131"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"7ea20421637641c9da287cca0321ae1a93cfa891","unresolved":false,"context_lines":[{"line_number":412,"context_line":"                                                             mock.ANY)"},{"line_number":413,"context_line":""},{"line_number":414,"context_line":"            self.assertTrue(mock_manager.mock_calls.index(policy_mock_call) \u003c"},{"line_number":415,"context_line":"                            mock_manager.mock_calls.index(notify_mock_call))"},{"line_number":416,"context_line":""},{"line_number":417,"context_line":"    @mock.patch(\u0027neutron.objects.qos.policy.QosPolicy\u0027)"},{"line_number":418,"context_line":"    def test_rule_notification_ordering(self, qos_policy_mock):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a6eadb0_20e2da9f","line":415,"in_reply_to":"3a71b18c_33920df7","updated":"2016-12-14 15:52:31.000000000","message":"I checked and it doesn\u0027t work, because we have other calls to those objects in the middle:\n\n    Expected: [call.RuleCls().update(),\n     call.notification_driver.update_policy(\u003cneutron.context.Context object at 0x113931490\u003e, \u003cANY\u003e)]\n    Actual: [call.QosPolicy.get_object(\u003cneutron.context.Context object at 0x113931490\u003e, id\u003d\u0027bb1880e7-a856-471b-8820-f25ca2d02f5a\u0027),\n     call.QosPolicy.get_object().get_rule_by_id(\u002761cbb790-f1f6-49dc-84d9-b05c9e95963b\u0027),\n     call.RuleCls(\u003cneutron.context.Context object at 0x113931490\u003e, id\u003d\u002761cbb790-f1f6-49dc-84d9-b05c9e95963b\u0027),\n     call.RuleCls().update_fields({}, reset_changes\u003dTrue),\n     call.RuleCls().update(),\n     call.QosPolicy.get_object().reload_rules(),\n     call.notification_driver.update_policy(\u003cneutron.context.Context object at 0x113931490\u003e, \u003cMagicMock name\u003d\u0027mock.QosPolicy.get_object()\u0027 id\u003d\u00274635224272\u0027\u003e),\n     call.RuleCls().to_dict()]","commit_id":"8fcba9dec801a0fb57ff29f97838958f083c8131"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"a551104c14d0180031bab874ecdf310d2c2f3dde","unresolved":false,"context_lines":[{"line_number":412,"context_line":"                                                             mock.ANY)"},{"line_number":413,"context_line":""},{"line_number":414,"context_line":"            self.assertTrue(mock_manager.mock_calls.index(policy_mock_call) \u003c"},{"line_number":415,"context_line":"                            mock_manager.mock_calls.index(notify_mock_call))"},{"line_number":416,"context_line":""},{"line_number":417,"context_line":"    @mock.patch(\u0027neutron.objects.qos.policy.QosPolicy\u0027)"},{"line_number":418,"context_line":"    def test_rule_notification_ordering(self, qos_policy_mock):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_33920df7","line":415,"in_reply_to":"3a71b18c_6bd7334b","updated":"2016-12-05 14:32:51.000000000","message":"Hmm, does assert_has_calls worry about the order of execution?\n\nHmm, it does! \n\n\"\"\"If any_order is false (the default) then the calls must be sequential. There can be extra calls before or after the specified calls.\"\"\"\"\n\nI will check if this works here (as long as we don\u0027t have any calls in the middle, it may work). I\u0027ll ping back here after testing","commit_id":"8fcba9dec801a0fb57ff29f97838958f083c8131"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"82ec8f772794c3f952daf4047f4c811f1969e421","unresolved":false,"context_lines":[{"line_number":456,"context_line":"                    get_rule_mock_call)"},{"line_number":457,"context_line":""},{"line_number":458,"context_line":"            self.assertTrue("},{"line_number":459,"context_line":"                action_index \u003c mock_manager.mock_calls.index(notify_mock_call))"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_4b3997a3","line":459,"updated":"2016-12-05 13:17:38.000000000","message":"ditto","commit_id":"8fcba9dec801a0fb57ff29f97838958f083c8131"}]}
