)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"b04fa7fc00dec3df0357c07384a54676183c6dc3","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Added create, update and delete precommit calls for QoS"},{"line_number":10,"context_line":"driver, to be used by some out-of-tree backends."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Co-Authored-By: Miguel Angel Ajo \u003cmangelajo@redhat.com\u003e"},{"line_number":13,"context_line":"Co-Authored-By: Rodolfo Alonso Hernandez \u003crodolfo.alonso.hernandez@intel.com\u003e"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Closes-Bug: #1657381"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"5ff73747_466eb195","line":12,"range":{"start_line":12,"start_character":0,"end_line":12,"end_character":55},"updated":"2017-04-26 17:29:17.000000000","message":"nit: don\u0027t need to add original Author as co-author, I believe original author will get credit without mentioning it again as co-author","commit_id":"2ea7397417e31d54fd018a252d756a8395cb7a41"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ebd5f3453aef471b2179f0d4ba54d02338e50661","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Added create, update and delete precommit calls for QoS"},{"line_number":10,"context_line":"driver, to be used by some out-of-tree backends."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Co-Authored-By: Miguel Angel Ajo \u003cmangelajo@redhat.com\u003e"},{"line_number":13,"context_line":"Co-Authored-By: Rodolfo Alonso Hernandez \u003crodolfo.alonso.hernandez@intel.com\u003e"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Closes-Bug: #1657381"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"5ff73747_405e8312","line":12,"range":{"start_line":12,"start_character":0,"end_line":12,"end_character":55},"in_reply_to":"5ff73747_466eb195","updated":"2017-04-27 08:53:40.000000000","message":"I\u0027ve seen patches with several authors listing all of them, including the original author.\n\nAlso in [1] there is no more information about this point:\n\"We encourage the use of Co-Authored-By: name \u003cname@example.com\u003e in commit messages to indicate people who worked on a particular patch\"\n\nI\u0027ll keep Miguel Angel as co-author just in case.\n\n[1] https://wiki.openstack.org/wiki/GitCommitMessages#Including_external_references","commit_id":"2ea7397417e31d54fd018a252d756a8395cb7a41"}],"doc/source/devref/quality_of_service.rst":[{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"be061fb480e07752782648a9d88e0bbb2feef8c7","unresolved":false,"context_lines":[{"line_number":52,"context_line":"* neutron.services.qos.drivers.base:"},{"line_number":53,"context_line":"  the interface class for pluggable QoS drivers that are used to update"},{"line_number":54,"context_line":"  backends about new {create, update, delete} events on any rule or policy"},{"line_number":55,"context_line":"  change, including precommit events that some backends could need due to"},{"line_number":56,"context_line":"  synchronization reason. The drivers also declare which QoS rules,"},{"line_number":57,"context_line":"  VIF drivers and VNIC types are supported."},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"* neutron.core_extensions.base:"}],"source_content_type":"text/x-rst","patch_set":2,"id":"ba2be162_7bd37504","line":56,"range":{"start_line":55,"start_character":56,"end_line":56,"end_character":24},"updated":"2017-03-03 16:53:42.000000000","message":"or more simpler `could need for synchronization`","commit_id":"0d960390edee38b47e3be4a2eaafbd434060d3a9"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"b7d73d67d149ceb39a0bea4d52ad9061411038a3","unresolved":false,"context_lines":[{"line_number":53,"context_line":"  the interface class for pluggable QoS drivers that are used to update"},{"line_number":54,"context_line":"  backends about new {create, update, delete} events on any rule or policy"},{"line_number":55,"context_line":"  change, including precommit events that some backends could need due to"},{"line_number":56,"context_line":"  synchronization reason. The drivers also declare which QoS rules,"},{"line_number":57,"context_line":"  VIF drivers and VNIC types are supported."},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"* neutron.core_extensions.base:"}],"source_content_type":"text/x-rst","patch_set":2,"id":"ba2be162_89154b41","line":56,"range":{"start_line":56,"start_character":18,"end_line":56,"end_character":24},"updated":"2017-03-03 14:29:35.000000000","message":"reasons","commit_id":"0d960390edee38b47e3be4a2eaafbd434060d3a9"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"14bbcc6001fe48a47ab9f192eab21fb7abe93a15","unresolved":false,"context_lines":[{"line_number":52,"context_line":"* neutron.services.qos.drivers.base:"},{"line_number":53,"context_line":"  the interface class for pluggable QoS drivers that are used to update"},{"line_number":54,"context_line":"  backends about new {create, update, delete} events on any rule or policy"},{"line_number":55,"context_line":"  change, including precommit events that some backends could need due to"},{"line_number":56,"context_line":"  synchronization reason. The drivers also declare which QoS rules,"},{"line_number":57,"context_line":"  VIF drivers and VNIC types are supported."},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"* neutron.core_extensions.base:"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a30ddce_0cbbbcc5","line":56,"range":{"start_line":55,"start_character":56,"end_line":56,"end_character":24},"in_reply_to":"ba2be162_7bd37504","updated":"2017-03-07 13:37:41.000000000","message":"Thank you, I\u0027ll fix it.","commit_id":"0d960390edee38b47e3be4a2eaafbd434060d3a9"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"68868d7561d51e4640cd4f24f3ec37f96d440a48","unresolved":false,"context_lines":[{"line_number":52,"context_line":"* neutron.services.qos.drivers.base:"},{"line_number":53,"context_line":"  the interface class for pluggable QoS drivers that are used to update"},{"line_number":54,"context_line":"  backends about new {create, update, delete} events on any rule or policy"},{"line_number":55,"context_line":"  change, including precommit events that some backends could need due to"},{"line_number":56,"context_line":"  synchronization reason. The drivers also declare which QoS rules,"},{"line_number":57,"context_line":"  VIF drivers and VNIC types are supported."},{"line_number":58,"context_line":""}],"source_content_type":"text/x-rst","patch_set":10,"id":"3f044301_89b03e45","line":55,"range":{"start_line":55,"start_character":67,"end_line":55,"end_character":73},"updated":"2017-05-10 14:06:39.000000000","message":"nit, s/due to/for","commit_id":"69a5b401f133e0018853c779ec13fcb8e0c96b0b"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ccd2a31863d4daf9600e7ba1af4dd94e13caab52","unresolved":false,"context_lines":[{"line_number":52,"context_line":"* neutron.services.qos.drivers.base:"},{"line_number":53,"context_line":"  the interface class for pluggable QoS drivers that are used to update"},{"line_number":54,"context_line":"  backends about new {create, update, delete} events on any rule or policy"},{"line_number":55,"context_line":"  change, including precommit events that some backends could need due to"},{"line_number":56,"context_line":"  synchronization reason. The drivers also declare which QoS rules,"},{"line_number":57,"context_line":"  VIF drivers and VNIC types are supported."},{"line_number":58,"context_line":""}],"source_content_type":"text/x-rst","patch_set":10,"id":"3f044301_0f39bcf0","line":55,"range":{"start_line":55,"start_character":67,"end_line":55,"end_character":73},"in_reply_to":"3f044301_89b03e45","updated":"2017-05-11 09:50:02.000000000","message":"Done","commit_id":"69a5b401f133e0018853c779ec13fcb8e0c96b0b"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"cb2b0972af409bbede86cbf8aba702ad821a2892","unresolved":false,"context_lines":[{"line_number":52,"context_line":"* neutron.services.qos.drivers.base:"},{"line_number":53,"context_line":"  the interface class for pluggable QoS drivers that are used to update"},{"line_number":54,"context_line":"  backends about new {create, update, delete} events on any rule or policy"},{"line_number":55,"context_line":"  change, including precommit events that some backends could need for"},{"line_number":56,"context_line":"  synchronization reason. The drivers also declare which QoS rules,"},{"line_number":57,"context_line":"  VIF drivers and VNIC types are supported."},{"line_number":58,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"ff0f0b1f_5b0c13eb","line":55,"range":{"start_line":55,"start_character":56,"end_line":55,"end_character":61},"updated":"2017-05-23 10:31:28.000000000","message":"minor nit s/could/may","commit_id":"45fd7eef6eb0fe5c760338953c91c046730f153c"}],"neutron/common/exceptions.py":[{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"5e6eca53e32a3e59ef92d53063bf8f47ba074d29","unresolved":false,"context_lines":[{"line_number":202,"context_line":""},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"class DriverCallError(e.NeutronException):"},{"line_number":205,"context_line":"    message \u003d _(\"Error calling the following drivers and methods: \""},{"line_number":206,"context_line":"                \"%(driver_methods)s.\")"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"dfeb2761_ad1531e7","line":205,"range":{"start_line":205,"start_character":53,"end_line":205,"end_character":56},"updated":"2017-04-05 06:03:43.000000000","message":"not required , I think","commit_id":"28e8a087749f3919ef7a08e1c957453fc69b5cdf"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"6744e51bf2b8bab9c63cffd683ef344bf21d79b9","unresolved":false,"context_lines":[{"line_number":202,"context_line":""},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"class DriverCallError(e.NeutronException):"},{"line_number":205,"context_line":"    message \u003d _(\"Error calling the following drivers and methods: \""},{"line_number":206,"context_line":"                \"%(driver_methods)s.\")"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_e2b7a2f4","line":205,"range":{"start_line":205,"start_character":53,"end_line":205,"end_character":56},"in_reply_to":"dfeb2761_016866b6","updated":"2017-04-11 15:29:46.000000000","message":"Its a dict, but you are basically mentioning the combination of them , amd treating them as a single entity. Therefore, I think AND is not required, but then again, its a nit","commit_id":"28e8a087749f3919ef7a08e1c957453fc69b5cdf"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"9e4c655ee2bf30e5bce578b7424d5fbe489697e3","unresolved":false,"context_lines":[{"line_number":202,"context_line":""},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"class DriverCallError(e.NeutronException):"},{"line_number":205,"context_line":"    message \u003d _(\"Error calling the following drivers and methods: \""},{"line_number":206,"context_line":"                \"%(driver_methods)s.\")"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"dfeb2761_016866b6","line":205,"range":{"start_line":205,"start_character":53,"end_line":205,"end_character":56},"in_reply_to":"dfeb2761_ad1531e7","updated":"2017-04-05 07:57:48.000000000","message":"Well, the parameter is a dict of driver names and methods. I think is correct.","commit_id":"28e8a087749f3919ef7a08e1c957453fc69b5cdf"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"f6c61ffeb31c79106a7e06d891a64aa7bb738637","unresolved":false,"context_lines":[{"line_number":205,"context_line":"    message \u003d _(\"Found duplicate extension: %(alias)s.\")"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"class DriverCallError(e.NeutronException):"},{"line_number":209,"context_line":"    message \u003d _(\"Error calling the following drivers and methods: \""},{"line_number":210,"context_line":"                \"%(driver_methods)s.\")"},{"line_number":211,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5ff73747_639564e4","line":208,"range":{"start_line":208,"start_character":24,"end_line":208,"end_character":40},"updated":"2017-04-25 04:15:25.000000000","message":"use MultipleExceptions and propagate original exceptions so that db retry logic works.","commit_id":"5ea6a9f51f70dd5744ccf91ca631ec2ee7f6e1ec"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"aaea576e22fb883ee55b405b521832698b3466dd","unresolved":false,"context_lines":[{"line_number":205,"context_line":"    message \u003d _(\"Found duplicate extension: %(alias)s.\")"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"class DriverCallError(e.NeutronException):"},{"line_number":209,"context_line":"    message \u003d _(\"Error calling the following drivers and methods: \""},{"line_number":210,"context_line":"                \"%(driver_methods)s.\")"},{"line_number":211,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5ff73747_cc97c090","line":208,"range":{"start_line":208,"start_character":24,"end_line":208,"end_character":40},"in_reply_to":"5ff73747_639564e4","updated":"2017-04-25 08:58:31.000000000","message":"Here [1] we don\u0027t need any DB access. This logic block (in [1]) was implemented to catch the possible exceptions thrown by the extension drivers and store the name of the failed driver and method.\n\nThis information should be enough. Furthermore, what we want here is to stop any other processing.\n\n[1] https://review.openstack.org/#/c/421818/5/neutron/services/qos/drivers/manager.py@101","commit_id":"5ea6a9f51f70dd5744ccf91ca631ec2ee7f6e1ec"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"af517896465580dac0e1e3ba4a169faca01fca6c","unresolved":false,"context_lines":[{"line_number":205,"context_line":"    message \u003d _(\"Found duplicate extension: %(alias)s.\")"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"class DriverCallError(e.NeutronException):"},{"line_number":209,"context_line":"    message \u003d _(\"Error calling the following drivers and methods: \""},{"line_number":210,"context_line":"                \"%(driver_methods)s.\")"},{"line_number":211,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5ff73747_220bcd8e","line":208,"range":{"start_line":208,"start_character":24,"end_line":208,"end_character":40},"in_reply_to":"5ff73747_cc88e0c7","updated":"2017-04-25 10:13:57.000000000","message":"You are right. I should use MultipleExceptions to allow the DB API to call \"exc_to_retry\" if needed.","commit_id":"5ea6a9f51f70dd5744ccf91ca631ec2ee7f6e1ec"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"3b0c8596ee7cd86e151f0e9dda5595a62ca50fad","unresolved":false,"context_lines":[{"line_number":205,"context_line":"    message \u003d _(\"Found duplicate extension: %(alias)s.\")"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"class DriverCallError(e.NeutronException):"},{"line_number":209,"context_line":"    message \u003d _(\"Error calling the following drivers and methods: \""},{"line_number":210,"context_line":"                \"%(driver_methods)s.\")"},{"line_number":211,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5ff73747_cc88e0c7","line":208,"range":{"start_line":208,"start_character":24,"end_line":208,"end_character":40},"in_reply_to":"5ff73747_cc97c090","updated":"2017-04-25 09:20:59.000000000","message":"drivers\u0027 precommit methods can access db and can involve retriable exceptions.","commit_id":"5ea6a9f51f70dd5744ccf91ca631ec2ee7f6e1ec"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"71b5f23763236655abeb362a3c016b0e4ee10b5a","unresolved":false,"context_lines":[{"line_number":209,"context_line":"    def __init__(self, driver_methods, exc_list\u003dNone):"},{"line_number":210,"context_line":"        # The message is not used by api, because api will unwrap"},{"line_number":211,"context_line":"        # MultipleExceptions and return inner exceptions. Only for"},{"line_number":212,"context_line":"        # backward-compatibility, in case other code use it."},{"line_number":213,"context_line":"        self.message \u003d _(\"Error calling the following drivers and methods: \""},{"line_number":214,"context_line":"                         \"%(driver_methods)s.\")"},{"line_number":215,"context_line":"        super(DriverCallError, self).__init__(exc_list or [])"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f044301_127b3cbe","line":212,"range":{"start_line":212,"start_character":10,"end_line":212,"end_character":32},"updated":"2017-05-10 05:52:17.000000000","message":"compatibility with what? this is a new code, isn\u0027t it?","commit_id":"48f61b14ca92fb9618946fe1a4d0ccdb0d3315f2"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"3994345b913a31244bb92432ceb826a26c980388","unresolved":false,"context_lines":[{"line_number":209,"context_line":"    def __init__(self, driver_methods, exc_list\u003dNone):"},{"line_number":210,"context_line":"        # The message is not used by api, because api will unwrap"},{"line_number":211,"context_line":"        # MultipleExceptions and return inner exceptions. Only for"},{"line_number":212,"context_line":"        # backward-compatibility, in case other code use it."},{"line_number":213,"context_line":"        self.message \u003d _(\"Error calling the following drivers and methods: \""},{"line_number":214,"context_line":"                         \"%(driver_methods)s.\")"},{"line_number":215,"context_line":"        super(DriverCallError, self).__init__(exc_list or [])"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f044301_e6c492f7","line":212,"range":{"start_line":212,"start_character":10,"end_line":212,"end_character":32},"in_reply_to":"3f044301_127b3cbe","updated":"2017-05-10 10:09:27.000000000","message":"Done","commit_id":"48f61b14ca92fb9618946fe1a4d0ccdb0d3315f2"}],"neutron/services/qos/drivers/base.py":[{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"cd234be77a35a5972956b693c3ffedbb9bf94743","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"5a3905b3_953cc3e3","updated":"2017-01-20 16:26:12.000000000","message":"just a question came to my looking at ml2/manager.py \n\ndon\u0027t we need postcommit events as well ?","commit_id":"38c85c4d2495006ae9bfcf1002671b449eff9815"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"839bd76470e86920f99469c57b274082a8b20982","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"ba2be162_5d0b1b2a","in_reply_to":"5a3905b3_953cc3e3","updated":"2017-03-03 09:17:35.000000000","message":"The other events are all post-commit (create_policy, update_policy, delete_policy)","commit_id":"38c85c4d2495006ae9bfcf1002671b449eff9815"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"4e9b9bc2bfc2a9159b3a019e144b2f588080486a","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        \"\"\"Update policy precommit."},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        This method can be implemented by the specific driver subclass"},{"line_number":130,"context_line":"        to update the backend where necessary."},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        :param context: current running context information"},{"line_number":133,"context_line":"        :param policy: a QoSPolicy object being updated."}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_3ead1ce9","line":130,"range":{"start_line":130,"start_character":11,"end_line":130,"end_character":46},"updated":"2017-01-18 17:27:58.000000000","message":"to handle update precommit event of a policy, that is being updated.","commit_id":"38c85c4d2495006ae9bfcf1002671b449eff9815"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"cfe1cc5e0b0a3d12032e904d7bce9029cb6a9337","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        \"\"\"Update policy precommit."},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        This method can be implemented by the specific driver subclass"},{"line_number":130,"context_line":"        to update the backend where necessary."},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        :param context: current running context information"},{"line_number":133,"context_line":"        :param policy: a QoSPolicy object being updated."}],"source_content_type":"text/x-python","patch_set":1,"id":"ba2be162_def0deff","line":130,"range":{"start_line":130,"start_character":11,"end_line":130,"end_character":46},"in_reply_to":"7a3c09a3_3ead1ce9","updated":"2017-03-03 14:01:14.000000000","message":"Done","commit_id":"38c85c4d2495006ae9bfcf1002671b449eff9815"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"5ef950178c7d5cb680efb75c539f4d4471ed0027","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        :param policy: a QoSPolicy object being deleted"},{"line_number":145,"context_line":"        \"\"\""},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def delete_policy_precommit(self, context, policy):"},{"line_number":148,"context_line":"        \"\"\"Delete policy precommit."},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        This method can be implemented by the specific driver subclass"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_69ca7e70","line":147,"range":{"start_line":147,"start_character":47,"end_line":147,"end_character":53},"updated":"2017-01-18 21:19:44.000000000","message":"Is policy object accesible?\nsame to line 137.","commit_id":"38c85c4d2495006ae9bfcf1002671b449eff9815"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9bd60a913f4608e930d51b4802b902a96c4bef7e","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        :param policy: a QoSPolicy object being deleted"},{"line_number":145,"context_line":"        \"\"\""},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def delete_policy_precommit(self, context, policy):"},{"line_number":148,"context_line":"        \"\"\"Delete policy precommit."},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        This method can be implemented by the specific driver subclass"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_aa2c56ac","line":147,"range":{"start_line":147,"start_character":47,"end_line":147,"end_character":53},"in_reply_to":"7a3c09a3_69ca7e70","updated":"2017-01-19 08:31:39.000000000","message":"You will get a policy object with just the id field available. But we could enhance it to provide the whole object if any backed finds the necessity.","commit_id":"38c85c4d2495006ae9bfcf1002671b449eff9815"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"4e9b9bc2bfc2a9159b3a019e144b2f588080486a","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        \"\"\"Delete policy precommit."},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        This method can be implemented by the specific driver subclass"},{"line_number":151,"context_line":"        to delete to handle the policy delete precommit event."},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        :param context: current running context information"},{"line_number":154,"context_line":"        :param policy: a QoSPolicy object being deleted"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_3e38bcd2","line":151,"range":{"start_line":151,"start_character":8,"end_line":151,"end_character":61},"updated":"2017-01-18 17:27:58.000000000","message":"to handle delete precommit event of policy, that is being deleted.","commit_id":"38c85c4d2495006ae9bfcf1002671b449eff9815"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"cfe1cc5e0b0a3d12032e904d7bce9029cb6a9337","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        \"\"\"Delete policy precommit."},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        This method can be implemented by the specific driver subclass"},{"line_number":151,"context_line":"        to delete to handle the policy delete precommit event."},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        :param context: current running context information"},{"line_number":154,"context_line":"        :param policy: a QoSPolicy object being deleted"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba2be162_fef5a2ec","line":151,"range":{"start_line":151,"start_character":8,"end_line":151,"end_character":61},"in_reply_to":"7a3c09a3_3e38bcd2","updated":"2017-03-03 14:01:14.000000000","message":"Done","commit_id":"38c85c4d2495006ae9bfcf1002671b449eff9815"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"5e6eca53e32a3e59ef92d53063bf8f47ba074d29","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        to handle the precommit event of a policy that is being created."},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        :param context: current running context information"},{"line_number":88,"context_line":"        :param policy: a QoSPolicy object being created, which will have no"},{"line_number":89,"context_line":"                      rules."},{"line_number":90,"context_line":"        \"\"\""},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def update_policy(self, context, policy):"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfeb2761_2dada19a","line":89,"range":{"start_line":88,"start_character":69,"end_line":89,"end_character":28},"updated":"2017-04-05 06:03:43.000000000","message":"Do we need to mention this?","commit_id":"28e8a087749f3919ef7a08e1c957453fc69b5cdf"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"484d56977c1453724be5e4e5e32c309131e52fec","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        to handle the precommit event of a policy that is being created."},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        :param context: current running context information"},{"line_number":88,"context_line":"        :param policy: a QoSPolicy object being created, which will have no"},{"line_number":89,"context_line":"                      rules."},{"line_number":90,"context_line":"        \"\"\""},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def update_policy(self, context, policy):"}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_1f94d58a","line":89,"range":{"start_line":88,"start_character":69,"end_line":89,"end_character":28},"in_reply_to":"bff0334d_e0ee7020","updated":"2017-04-24 09:39:37.000000000","message":"Done","commit_id":"28e8a087749f3919ef7a08e1c957453fc69b5cdf"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"9e4c655ee2bf30e5bce578b7424d5fbe489697e3","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        to handle the precommit event of a policy that is being created."},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        :param context: current running context information"},{"line_number":88,"context_line":"        :param policy: a QoSPolicy object being created, which will have no"},{"line_number":89,"context_line":"                      rules."},{"line_number":90,"context_line":"        \"\"\""},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def update_policy(self, context, policy):"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfeb2761_617bb27a","line":89,"range":{"start_line":88,"start_character":69,"end_line":89,"end_character":28},"in_reply_to":"dfeb2761_2dada19a","updated":"2017-04-05 07:57:48.000000000","message":"Like in \"create_policy\". Is good to add this extra information, to let the developer to know a new policy is empty of rules. I\u0027d prefer to keep this comment here.","commit_id":"28e8a087749f3919ef7a08e1c957453fc69b5cdf"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"41fa1fcb05d7b47ed8caf7c231f3cfbf2afba402","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        to handle the precommit event of a policy that is being created."},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        :param context: current running context information"},{"line_number":88,"context_line":"        :param policy: a QoSPolicy object being created, which will have no"},{"line_number":89,"context_line":"                      rules."},{"line_number":90,"context_line":"        \"\"\""},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def update_policy(self, context, policy):"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_e0ee7020","line":89,"range":{"start_line":88,"start_character":69,"end_line":89,"end_character":28},"in_reply_to":"dfeb2761_617bb27a","updated":"2017-04-11 22:32:48.000000000","message":"Nit: I would indent this line one additional position","commit_id":"28e8a087749f3919ef7a08e1c957453fc69b5cdf"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"f6c61ffeb31c79106a7e06d891a64aa7bb738637","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        to handle update precommit event of a policy that is being updated."},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        :param context: current running context information"},{"line_number":141,"context_line":"        :param policy: a QoSPolicy object being updated."},{"line_number":142,"context_line":"        \"\"\""},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def delete_policy(self, context, policy):"}],"source_content_type":"text/x-python","patch_set":5,"id":"5ff73747_c369d825","line":141,"updated":"2017-04-25 04:15:25.000000000","message":"which revision (after or before the change) would it have?","commit_id":"5ea6a9f51f70dd5744ccf91ca631ec2ee7f6e1ec"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"aaea576e22fb883ee55b405b521832698b3466dd","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        to handle update precommit event of a policy that is being updated."},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        :param context: current running context information"},{"line_number":141,"context_line":"        :param policy: a QoSPolicy object being updated."},{"line_number":142,"context_line":"        \"\"\""},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def delete_policy(self, context, policy):"}],"source_content_type":"text/x-python","patch_set":5,"id":"5ff73747_f1393941","line":141,"in_reply_to":"5ff73747_c369d825","updated":"2017-04-25 08:58:31.000000000","message":"The precommit event is thrown after the object is updated, as you can see in https://review.openstack.org/#/c/421818/5/neutron/services/qos/qos_plugin.py@188.\n\nThe object should be updated in advance before sending the event.\n\nThe same behaviour is used in other resources:\n- Precommit create event in segments: https://github.com/openstack/neutron/blob/master/neutron/services/segments/db.py#L115\n- Precommit create event in trunks: https://github.com/openstack/neutron/blob/master/neutron/services/trunk/plugin.py#L226\n- Precommit update event in trunks: https://github.com/openstack/neutron/blob/master/neutron/services/trunk/plugin.py#L249\n- Precommit delete event in trunks: https://github.com/openstack/neutron/blob/master/neutron/services/trunk/plugin.py#L269","commit_id":"5ea6a9f51f70dd5744ccf91ca631ec2ee7f6e1ec"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"af517896465580dac0e1e3ba4a169faca01fca6c","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        to handle update precommit event of a policy that is being updated."},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        :param context: current running context information"},{"line_number":141,"context_line":"        :param policy: a QoSPolicy object being updated."},{"line_number":142,"context_line":"        \"\"\""},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def delete_policy(self, context, policy):"}],"source_content_type":"text/x-python","patch_set":5,"id":"5ff73747_a7212fb7","line":141,"in_reply_to":"5ff73747_ec4a7c7e","updated":"2017-04-25 10:13:57.000000000","message":"If I\u0027m not wrong, the revision number is updated at the end of the transaction [1], before it\u0027s flushed. At this point, the object should have the previous revision number, not the new one. But I need to confirm that.\n\n[1] https://github.com/openstack/neutron/blob/master/neutron/services/revisions/revision_plugin.py#L38","commit_id":"5ea6a9f51f70dd5744ccf91ca631ec2ee7f6e1ec"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"3b0c8596ee7cd86e151f0e9dda5595a62ca50fad","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        to handle update precommit event of a policy that is being updated."},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        :param context: current running context information"},{"line_number":141,"context_line":"        :param policy: a QoSPolicy object being updated."},{"line_number":142,"context_line":"        \"\"\""},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def delete_policy(self, context, policy):"}],"source_content_type":"text/x-python","patch_set":5,"id":"5ff73747_ec4a7c7e","line":141,"in_reply_to":"5ff73747_f1393941","updated":"2017-04-25 09:20:59.000000000","message":"my question was about revision number standard attribute.\ni was wondering because i saw a hack to get the latest revision number in dragonflow qos driver.\nit was just a question about the expected behaviour, not an objection against this particular patch.","commit_id":"5ea6a9f51f70dd5744ccf91ca631ec2ee7f6e1ec"}],"neutron/services/qos/drivers/manager.py":[{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"5e6eca53e32a3e59ef92d53063bf8f47ba074d29","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from oslo_log import log as logging"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from neutron._i18n import _LW"},{"line_number":16,"context_line":"from neutron.api.rpc.callbacks import events as rpc_events"},{"line_number":17,"context_line":"from neutron.api.rpc.callbacks.producer import registry as rpc_registry"},{"line_number":18,"context_line":"from neutron.api.rpc.callbacks import resources"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfeb2761_6dbe09b5","line":15,"range":{"start_line":15,"start_character":26,"end_line":15,"end_character":29},"updated":"2017-04-05 06:03:43.000000000","message":"Lets put it as _ to avoid translation issues","commit_id":"28e8a087749f3919ef7a08e1c957453fc69b5cdf"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"9e4c655ee2bf30e5bce578b7424d5fbe489697e3","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from oslo_log import log as logging"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from neutron._i18n import _LW"},{"line_number":16,"context_line":"from neutron.api.rpc.callbacks import events as rpc_events"},{"line_number":17,"context_line":"from neutron.api.rpc.callbacks.producer import registry as rpc_registry"},{"line_number":18,"context_line":"from neutron.api.rpc.callbacks import resources"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfeb2761_f3af9c27","line":15,"range":{"start_line":15,"start_character":26,"end_line":15,"end_character":29},"in_reply_to":"dfeb2761_6dbe09b5","updated":"2017-04-05 07:57:48.000000000","message":"This change is out of scope for this patch.","commit_id":"28e8a087749f3919ef7a08e1c957453fc69b5cdf"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"6744e51bf2b8bab9c63cffd683ef344bf21d79b9","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from oslo_log import log as logging"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from neutron._i18n import _LW"},{"line_number":16,"context_line":"from neutron.api.rpc.callbacks import events as rpc_events"},{"line_number":17,"context_line":"from neutron.api.rpc.callbacks.producer import registry as rpc_registry"},{"line_number":18,"context_line":"from neutron.api.rpc.callbacks import resources"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_62fcb2b4","line":15,"range":{"start_line":15,"start_character":26,"end_line":15,"end_character":29},"in_reply_to":"dfeb2761_f3af9c27","updated":"2017-04-11 15:29:46.000000000","message":"Agreed","commit_id":"28e8a087749f3919ef7a08e1c957453fc69b5cdf"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"71b5f23763236655abeb362a3c016b0e4ee10b5a","unresolved":false,"context_lines":[{"line_number":97,"context_line":"                exception_data \u003d {\u0027name\u0027: driver.name, \u0027method\u0027: method_name}"},{"line_number":98,"context_line":"                LOG.exception(exception_msg, exception_data)"},{"line_number":99,"context_line":"                failed_drivers[driver.name] \u003d method_name"},{"line_number":100,"context_line":"                exc_list.append(exc)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        if failed_drivers:"},{"line_number":103,"context_line":"            raise exceptions.DriverCallError(driver_methods\u003dfailed_drivers,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f044301_722600d1","line":100,"updated":"2017-05-10 05:52:17.000000000","message":"is it intentional to change the bahaviour for non-precommit calls?  ie. call all drivers regardless of exceptions.","commit_id":"48f61b14ca92fb9618946fe1a4d0ccdb0d3315f2"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"3994345b913a31244bb92432ceb826a26c980388","unresolved":false,"context_lines":[{"line_number":97,"context_line":"                exception_data \u003d {\u0027name\u0027: driver.name, \u0027method\u0027: method_name}"},{"line_number":98,"context_line":"                LOG.exception(exception_msg, exception_data)"},{"line_number":99,"context_line":"                failed_drivers[driver.name] \u003d method_name"},{"line_number":100,"context_line":"                exc_list.append(exc)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        if failed_drivers:"},{"line_number":103,"context_line":"            raise exceptions.DriverCallError(driver_methods\u003dfailed_drivers,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f044301_668762b7","line":100,"in_reply_to":"3f044301_722600d1","updated":"2017-05-10 10:09:27.000000000","message":"Yes, it is. First we call all drivers and store the exceptions if any. At the end of this loop, possible exceptions are risen.\n\nThat behaviour was discussed during the QoS IRC meetings and Atlanta PTG.","commit_id":"48f61b14ca92fb9618946fe1a4d0ccdb0d3315f2"}],"neutron/services/qos/qos_consts.py":[{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"be061fb480e07752782648a9d88e0bbb2feef8c7","unresolved":false,"context_lines":[{"line_number":31,"context_line":"# fine."},{"line_number":32,"context_line":"DEFAULT_BURST_RATE \u003d 0.8"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"# Method names for QoSDriver"},{"line_number":35,"context_line":"CREATE_POLICY \u003d \u0027create_policy\u0027"},{"line_number":36,"context_line":"CREATE_POLICY_PRECOMMIT \u003d \u0027create_policy_precommit\u0027"},{"line_number":37,"context_line":"UPDATE_POLICY \u003d \u0027update_policy\u0027"},{"line_number":38,"context_line":"UPDATE_POLICY_PRECOMMIT \u003d \u0027update_policy_precommit\u0027"},{"line_number":39,"context_line":"DELETE_POLICY \u003d \u0027delete_policy\u0027"},{"line_number":40,"context_line":"DELETE_POLICY_PRECOMMIT \u003d \u0027delete_policy_precommit\u0027"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"PRECOMMIT_POSTFIX \u003d \u0027_precommit\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba2be162_2d3f0488","line":42,"range":{"start_line":34,"start_character":0,"end_line":42,"end_character":32},"updated":"2017-03-03 16:53:42.000000000","message":"These constants can be re used outside neutron repo in networking-odl wouldn\u0027t it be better to have them in neutron-lib ? or Just add a NOTE or TODO ?","commit_id":"0d960390edee38b47e3be4a2eaafbd434060d3a9"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ee3f0ee96c05332ae662c644525a1634d4cfff14","unresolved":false,"context_lines":[{"line_number":31,"context_line":"# fine."},{"line_number":32,"context_line":"DEFAULT_BURST_RATE \u003d 0.8"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"# Method names for QoSDriver"},{"line_number":35,"context_line":"CREATE_POLICY \u003d \u0027create_policy\u0027"},{"line_number":36,"context_line":"CREATE_POLICY_PRECOMMIT \u003d \u0027create_policy_precommit\u0027"},{"line_number":37,"context_line":"UPDATE_POLICY \u003d \u0027update_policy\u0027"},{"line_number":38,"context_line":"UPDATE_POLICY_PRECOMMIT \u003d \u0027update_policy_precommit\u0027"},{"line_number":39,"context_line":"DELETE_POLICY \u003d \u0027delete_policy\u0027"},{"line_number":40,"context_line":"DELETE_POLICY_PRECOMMIT \u003d \u0027delete_policy_precommit\u0027"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"PRECOMMIT_POSTFIX \u003d \u0027_precommit\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"dfeb2761_e00805da","line":42,"range":{"start_line":34,"start_character":0,"end_line":42,"end_character":32},"in_reply_to":"1a1ced50_226020a5","updated":"2017-04-04 10:14:21.000000000","message":"\u003e Unless I\u0027m missing something (which of course, could be) I believe we don\u0027t need to expose them via neutron-lib.\n\nYou are right. There is no need to expose those constants in neutron-lib API.","commit_id":"0d960390edee38b47e3be4a2eaafbd434060d3a9"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"5ab2081a1e82d7b6be503ebe783cdccf64374ba6","unresolved":false,"context_lines":[{"line_number":31,"context_line":"# fine."},{"line_number":32,"context_line":"DEFAULT_BURST_RATE \u003d 0.8"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"# Method names for QoSDriver"},{"line_number":35,"context_line":"CREATE_POLICY \u003d \u0027create_policy\u0027"},{"line_number":36,"context_line":"CREATE_POLICY_PRECOMMIT \u003d \u0027create_policy_precommit\u0027"},{"line_number":37,"context_line":"UPDATE_POLICY \u003d \u0027update_policy\u0027"},{"line_number":38,"context_line":"UPDATE_POLICY_PRECOMMIT \u003d \u0027update_policy_precommit\u0027"},{"line_number":39,"context_line":"DELETE_POLICY \u003d \u0027delete_policy\u0027"},{"line_number":40,"context_line":"DELETE_POLICY_PRECOMMIT \u003d \u0027delete_policy_precommit\u0027"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"PRECOMMIT_POSTFIX \u003d \u0027_precommit\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a1ced50_226020a5","line":42,"range":{"start_line":34,"start_character":0,"end_line":42,"end_character":32},"in_reply_to":"1a1ced50_cdc7e143","updated":"2017-03-21 09:04:58.000000000","message":"Sorry, I thought that driver calls were going to be replaced by RPC calls (https://review.openstack.org/#/c/441177/). That\u0027s why we need these constants.","commit_id":"0d960390edee38b47e3be4a2eaafbd434060d3a9"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"7c427c99f99fd62aa0a050d1941a5c45223a3599","unresolved":false,"context_lines":[{"line_number":31,"context_line":"# fine."},{"line_number":32,"context_line":"DEFAULT_BURST_RATE \u003d 0.8"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"# Method names for QoSDriver"},{"line_number":35,"context_line":"CREATE_POLICY \u003d \u0027create_policy\u0027"},{"line_number":36,"context_line":"CREATE_POLICY_PRECOMMIT \u003d \u0027create_policy_precommit\u0027"},{"line_number":37,"context_line":"UPDATE_POLICY \u003d \u0027update_policy\u0027"},{"line_number":38,"context_line":"UPDATE_POLICY_PRECOMMIT \u003d \u0027update_policy_precommit\u0027"},{"line_number":39,"context_line":"DELETE_POLICY \u003d \u0027delete_policy\u0027"},{"line_number":40,"context_line":"DELETE_POLICY_PRECOMMIT \u003d \u0027delete_policy_precommit\u0027"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"PRECOMMIT_POSTFIX \u003d \u0027_precommit\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a1ced50_cdc7e143","line":42,"range":{"start_line":34,"start_character":0,"end_line":42,"end_character":32},"in_reply_to":"9a30ddce_65e03cfb","updated":"2017-03-17 12:28:55.000000000","message":"yes, but they receive it though a method call, they don\u0027t need to resolve or look for any constant name.\n\n\nso driver.create_policy(....) or driver.delete_policy_precommit(...) will be called in the driver. the driver won\u0027t receive an string with the event :)","commit_id":"0d960390edee38b47e3be4a2eaafbd434060d3a9"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"90da1298623912bd439e312230c02e53be78ab97","unresolved":false,"context_lines":[{"line_number":31,"context_line":"# fine."},{"line_number":32,"context_line":"DEFAULT_BURST_RATE \u003d 0.8"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"# Method names for QoSDriver"},{"line_number":35,"context_line":"CREATE_POLICY \u003d \u0027create_policy\u0027"},{"line_number":36,"context_line":"CREATE_POLICY_PRECOMMIT \u003d \u0027create_policy_precommit\u0027"},{"line_number":37,"context_line":"UPDATE_POLICY \u003d \u0027update_policy\u0027"},{"line_number":38,"context_line":"UPDATE_POLICY_PRECOMMIT \u003d \u0027update_policy_precommit\u0027"},{"line_number":39,"context_line":"DELETE_POLICY \u003d \u0027delete_policy\u0027"},{"line_number":40,"context_line":"DELETE_POLICY_PRECOMMIT \u003d \u0027delete_policy_precommit\u0027"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"PRECOMMIT_POSTFIX \u003d \u0027_precommit\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a30ddce_65e03cfb","line":42,"range":{"start_line":34,"start_character":0,"end_line":42,"end_character":32},"in_reply_to":"9a30ddce_8c232c05","updated":"2017-03-10 09:54:41.000000000","message":"Maybe I don\u0027t understand it, but when a neutron agent or other project agent recieves an event from a plugin, it needs to know the type of event, isn\u0027t it?","commit_id":"0d960390edee38b47e3be4a2eaafbd434060d3a9"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"14bbcc6001fe48a47ab9f192eab21fb7abe93a15","unresolved":false,"context_lines":[{"line_number":31,"context_line":"# fine."},{"line_number":32,"context_line":"DEFAULT_BURST_RATE \u003d 0.8"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"# Method names for QoSDriver"},{"line_number":35,"context_line":"CREATE_POLICY \u003d \u0027create_policy\u0027"},{"line_number":36,"context_line":"CREATE_POLICY_PRECOMMIT \u003d \u0027create_policy_precommit\u0027"},{"line_number":37,"context_line":"UPDATE_POLICY \u003d \u0027update_policy\u0027"},{"line_number":38,"context_line":"UPDATE_POLICY_PRECOMMIT \u003d \u0027update_policy_precommit\u0027"},{"line_number":39,"context_line":"DELETE_POLICY \u003d \u0027delete_policy\u0027"},{"line_number":40,"context_line":"DELETE_POLICY_PRECOMMIT \u003d \u0027delete_policy_precommit\u0027"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"PRECOMMIT_POSTFIX \u003d \u0027_precommit\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a30ddce_8c232c05","line":42,"range":{"start_line":34,"start_character":0,"end_line":42,"end_character":32},"in_reply_to":"ba2be162_2d3f0488","updated":"2017-03-07 13:37:41.000000000","message":"Hmmm, I believe the outside-neutron repo code may not need those constants, as those will always be received as method calls.\n\nUnless I\u0027m missing something (which of course, could be) I believe we don\u0027t need to expose them via neutron-lib.","commit_id":"0d960390edee38b47e3be4a2eaafbd434060d3a9"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"41fa1fcb05d7b47ed8caf7c231f3cfbf2afba402","unresolved":false,"context_lines":[{"line_number":39,"context_line":"DELETE_POLICY \u003d \u0027delete_policy\u0027"},{"line_number":40,"context_line":"DELETE_POLICY_PRECOMMIT \u003d \u0027delete_policy_precommit\u0027"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"PRECOMMIT_POSTFIX \u003d \u0027_precommit\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_60e4a00d","line":42,"updated":"2017-04-11 22:32:48.000000000","message":"This constant is not being used anywhere in the current patchset. Don\u0027t remove it before reading my comment to the ml2 unit test","commit_id":"28e8a087749f3919ef7a08e1c957453fc69b5cdf"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"484d56977c1453724be5e4e5e32c309131e52fec","unresolved":false,"context_lines":[{"line_number":39,"context_line":"DELETE_POLICY \u003d \u0027delete_policy\u0027"},{"line_number":40,"context_line":"DELETE_POLICY_PRECOMMIT \u003d \u0027delete_policy_precommit\u0027"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"PRECOMMIT_POSTFIX \u003d \u0027_precommit\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_bfef2186","line":42,"in_reply_to":"bff0334d_60e4a00d","updated":"2017-04-24 09:39:37.000000000","message":"Done","commit_id":"28e8a087749f3919ef7a08e1c957453fc69b5cdf"}],"neutron/services/qos/qos_plugin.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"85e8f010175b6afdaf3ad3eca12c4a7f9c035306","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        with db_api.autonested_transaction(context.session):"},{"line_number":73,"context_line":"            policy_obj \u003d policy_object.QosPolicy(context, **policy[\u0027policy\u0027])"},{"line_number":74,"context_line":"            policy_obj.create()"},{"line_number":75,"context_line":"            self.driver_manager.call(\u0027create_policy_precommit\u0027, context,"},{"line_number":76,"context_line":"                                     policy_obj)"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        self.driver_manager.call(\u0027create_policy\u0027, context, policy_obj)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_3a6eeac9","line":75,"range":{"start_line":75,"start_character":38,"end_line":75,"end_character":61},"updated":"2017-01-19 12:43:36.000000000","message":"Other projects import neutron.callbacks.events constant names from there. I didn\u0027t comment this in the main patch (the parent patch of this one), but could be useful to have a set of constant strings related with qos events.","commit_id":"38c85c4d2495006ae9bfcf1002671b449eff9815"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"e67258614e6280bcc90e0017853d0579724fe3ec","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        with db_api.autonested_transaction(context.session):"},{"line_number":73,"context_line":"            policy_obj \u003d policy_object.QosPolicy(context, **policy[\u0027policy\u0027])"},{"line_number":74,"context_line":"            policy_obj.create()"},{"line_number":75,"context_line":"            self.driver_manager.call(\u0027create_policy_precommit\u0027, context,"},{"line_number":76,"context_line":"                                     policy_obj)"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        self.driver_manager.call(\u0027create_policy\u0027, context, policy_obj)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_360f0c38","line":75,"range":{"start_line":75,"start_character":38,"end_line":75,"end_character":61},"in_reply_to":"5a3905b3_3a6eeac9","updated":"2017-01-24 14:56:17.000000000","message":"Yes, that makes sense, we can cleanup all those strings to consts, that will have the advantage of python validating that the constant exists.","commit_id":"38c85c4d2495006ae9bfcf1002671b449eff9815"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"5ef950178c7d5cb680efb75c539f4d4471ed0027","unresolved":false,"context_lines":[{"line_number":125,"context_line":"            policy.id \u003d policy_id"},{"line_number":126,"context_line":"            policy.delete()"},{"line_number":127,"context_line":"            self.driver_manager.call(\u0027delete_policy_precommit\u0027, context,"},{"line_number":128,"context_line":"                                     policy)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        self.notification_driver_manager.delete_policy(context, policy)"},{"line_number":131,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_a9ff06a9","line":128,"range":{"start_line":128,"start_character":37,"end_line":128,"end_character":43},"updated":"2017-01-18 21:19:44.000000000","message":"Since policy is deleted above, is policy.id accessible?\nSame to line 130.","commit_id":"38c85c4d2495006ae9bfcf1002671b449eff9815"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9bd60a913f4608e930d51b4802b902a96c4bef7e","unresolved":false,"context_lines":[{"line_number":125,"context_line":"            policy.id \u003d policy_id"},{"line_number":126,"context_line":"            policy.delete()"},{"line_number":127,"context_line":"            self.driver_manager.call(\u0027delete_policy_precommit\u0027, context,"},{"line_number":128,"context_line":"                                     policy)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        self.notification_driver_manager.delete_policy(context, policy)"},{"line_number":131,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_0520fd9a","line":128,"range":{"start_line":128,"start_character":37,"end_line":128,"end_character":43},"in_reply_to":"7a3c09a3_a9ff06a9","updated":"2017-01-19 08:31:39.000000000","message":"Yes, .delete() method will kill the object from the database, but the bare object with just the id is still in memory.\n\nYou couldn\u0027t call delete a second time because you would get an exception thrown.","commit_id":"38c85c4d2495006ae9bfcf1002671b449eff9815"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"864d05b9c934fc8b4c86bc098878723a18e7db38","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        policy[\u0027policy\u0027].pop(\u0027tenant_id\u0027, None)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        policy_obj \u003d policy_object.QosPolicy(context, **policy[\u0027policy\u0027])"},{"line_number":69,"context_line":"        self.driver_manager.call(qos_consts.CREATE_POLICY_PRECOMMIT,"},{"line_number":70,"context_line":"                                 context, policy_obj)"},{"line_number":71,"context_line":"        policy_obj.create()"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7ffa3b31_91732ae8","line":69,"updated":"2017-04-16 09:14:22.000000000","message":"+1, we want to ensure that anything done during \u0027PRECOMMIT\u0027 is part of the same transaction so listeners can be ensured that anything they do to the DB during their transaction will be rolled back if anything else fails. Without this being in a transaction, a listener could end up creating something and ultimately the policy create will fail and the listener\u0027s object would be left committed.","commit_id":"28e8a087749f3919ef7a08e1c957453fc69b5cdf"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"41fa1fcb05d7b47ed8caf7c231f3cfbf2afba402","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        policy[\u0027policy\u0027].pop(\u0027tenant_id\u0027, None)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        policy_obj \u003d policy_object.QosPolicy(context, **policy[\u0027policy\u0027])"},{"line_number":69,"context_line":"        self.driver_manager.call(qos_consts.CREATE_POLICY_PRECOMMIT,"},{"line_number":70,"context_line":"                                 context, policy_obj)"},{"line_number":71,"context_line":"        policy_obj.create()"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_c3f13603","line":69,"range":{"start_line":69,"start_character":58,"end_line":69,"end_character":67},"updated":"2017-04-11 22:32:48.000000000","message":"What is the semantics of pre-commit here? Looking at lines 14 to 26 in https://github.com/openstack/neutron/blob/master/neutron/callbacks/events.py and the way they are used in the ML2 and DB plug-ins, we have before, pre-commit and after events. The pre-commit events are used in the ML2 and BD plug-ins when a DB transaction has been initiated but before committing it. That is even the way you are using the \u0027pre-commit\u0027 call in lines 215, 255 and 285 below. However, in  this line and in lines 97 and 121, we haven\u0027t started a DB transaction. It seems to me like a before event. I am not saying it is necessarily wrong. I just want to make sure we have thought this through and that whoever is going to use these calls understands that we are not in the middle of a DB transaction. In other words, I am trying to make sure we all share the same semantics","commit_id":"28e8a087749f3919ef7a08e1c957453fc69b5cdf"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"484d56977c1453724be5e4e5e32c309131e52fec","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        policy[\u0027policy\u0027].pop(\u0027tenant_id\u0027, None)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        policy_obj \u003d policy_object.QosPolicy(context, **policy[\u0027policy\u0027])"},{"line_number":69,"context_line":"        self.driver_manager.call(qos_consts.CREATE_POLICY_PRECOMMIT,"},{"line_number":70,"context_line":"                                 context, policy_obj)"},{"line_number":71,"context_line":"        policy_obj.create()"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_5fb6dddb","line":69,"in_reply_to":"7ffa3b31_91732ae8","updated":"2017-04-24 09:39:37.000000000","message":"Both of you are right. I need to refactor those calls. A good reference for this is trunk plugin: I\u0027ll create a transaction to include both update/create/delete and rpc call.","commit_id":"28e8a087749f3919ef7a08e1c957453fc69b5cdf"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"41fa1fcb05d7b47ed8caf7c231f3cfbf2afba402","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        :returns: a QosPolicy object"},{"line_number":92,"context_line":"        \"\"\""},{"line_number":93,"context_line":"        policy_data \u003d policy[\u0027policy\u0027]"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        policy_obj \u003d policy_object.QosPolicy(context, id\u003dpolicy_id)"},{"line_number":96,"context_line":"        policy_obj.update_fields(policy_data, reset_changes\u003dTrue)"},{"line_number":97,"context_line":"        self.driver_manager.call(qos_consts.UPDATE_POLICY_PRECOMMIT,"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_c0824c00","line":94,"updated":"2017-04-11 22:32:48.000000000","message":"This is a gratuitous change","commit_id":"28e8a087749f3919ef7a08e1c957453fc69b5cdf"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"484d56977c1453724be5e4e5e32c309131e52fec","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        :returns: a QosPolicy object"},{"line_number":92,"context_line":"        \"\"\""},{"line_number":93,"context_line":"        policy_data \u003d policy[\u0027policy\u0027]"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        policy_obj \u003d policy_object.QosPolicy(context, id\u003dpolicy_id)"},{"line_number":96,"context_line":"        policy_obj.update_fields(policy_data, reset_changes\u003dTrue)"},{"line_number":97,"context_line":"        self.driver_manager.call(qos_consts.UPDATE_POLICY_PRECOMMIT,"}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_1fc85553","line":94,"in_reply_to":"bff0334d_c0824c00","updated":"2017-04-24 09:39:37.000000000","message":"Done","commit_id":"28e8a087749f3919ef7a08e1c957453fc69b5cdf"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"41fa1fcb05d7b47ed8caf7c231f3cfbf2afba402","unresolved":false,"context_lines":[{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        policy_obj \u003d policy_object.QosPolicy(context, id\u003dpolicy_id)"},{"line_number":96,"context_line":"        policy_obj.update_fields(policy_data, reset_changes\u003dTrue)"},{"line_number":97,"context_line":"        self.driver_manager.call(qos_consts.UPDATE_POLICY_PRECOMMIT,"},{"line_number":98,"context_line":"                                 context, policy_obj)"},{"line_number":99,"context_line":"        policy_obj.update()"},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_e3331aaa","line":97,"updated":"2017-04-11 22:32:48.000000000","message":"See my comment to line 69","commit_id":"28e8a087749f3919ef7a08e1c957453fc69b5cdf"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"484d56977c1453724be5e4e5e32c309131e52fec","unresolved":false,"context_lines":[{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        policy_obj \u003d policy_object.QosPolicy(context, id\u003dpolicy_id)"},{"line_number":96,"context_line":"        policy_obj.update_fields(policy_data, reset_changes\u003dTrue)"},{"line_number":97,"context_line":"        self.driver_manager.call(qos_consts.UPDATE_POLICY_PRECOMMIT,"},{"line_number":98,"context_line":"                                 context, policy_obj)"},{"line_number":99,"context_line":"        policy_obj.update()"},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_ffc48942","line":97,"in_reply_to":"bff0334d_e3331aaa","updated":"2017-04-24 09:39:37.000000000","message":"Done","commit_id":"28e8a087749f3919ef7a08e1c957453fc69b5cdf"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"41fa1fcb05d7b47ed8caf7c231f3cfbf2afba402","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        \"\"\""},{"line_number":119,"context_line":"        policy \u003d policy_object.QosPolicy(context)"},{"line_number":120,"context_line":"        policy.id \u003d policy_id"},{"line_number":121,"context_line":"        self.driver_manager.call(qos_consts.DELETE_POLICY_PRECOMMIT,"},{"line_number":122,"context_line":"                                 context, policy)"},{"line_number":123,"context_line":"        policy.delete()"},{"line_number":124,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_a3299237","line":121,"updated":"2017-04-11 22:32:48.000000000","message":"See my comment to line 69","commit_id":"28e8a087749f3919ef7a08e1c957453fc69b5cdf"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"484d56977c1453724be5e4e5e32c309131e52fec","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        \"\"\""},{"line_number":119,"context_line":"        policy \u003d policy_object.QosPolicy(context)"},{"line_number":120,"context_line":"        policy.id \u003d policy_id"},{"line_number":121,"context_line":"        self.driver_manager.call(qos_consts.DELETE_POLICY_PRECOMMIT,"},{"line_number":122,"context_line":"                                 context, policy)"},{"line_number":123,"context_line":"        policy.delete()"},{"line_number":124,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_bfdcc118","line":121,"in_reply_to":"bff0334d_a3299237","updated":"2017-04-24 09:39:37.000000000","message":"Done","commit_id":"28e8a087749f3919ef7a08e1c957453fc69b5cdf"}],"neutron/tests/unit/services/qos/drivers/test_manager.py":[{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"41fa1fcb05d7b47ed8caf7c231f3cfbf2afba402","unresolved":false,"context_lines":[{"line_number":99,"context_line":"class TestQosDriversCalls(TestQosDriversManagerBase):"},{"line_number":100,"context_line":"    \"\"\"Test QoS driver calls\"\"\""},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    CALL_METHODS \u003d (\u0027create_policy\u0027,"},{"line_number":103,"context_line":"                    \u0027create_policy_precommit\u0027,"},{"line_number":104,"context_line":"                    \u0027update_policy\u0027,"},{"line_number":105,"context_line":"                    \u0027update_policy_precommit\u0027,"},{"line_number":106,"context_line":"                    \u0027delete_policy\u0027,"},{"line_number":107,"context_line":"                    \u0027delete_policy_precommit\u0027)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def setUp(self):"},{"line_number":110,"context_line":"        super(TestQosDriversCalls, self).setUp()"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_a3b752f5","line":107,"range":{"start_line":102,"start_character":21,"end_line":107,"end_character":45},"updated":"2017-04-11 22:32:48.000000000","message":"Shouldn\u0027t we use the definitions we made in https://review.openstack.org/#/c/421818/4/neutron/services/qos/qos_consts.py?","commit_id":"28e8a087749f3919ef7a08e1c957453fc69b5cdf"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"484d56977c1453724be5e4e5e32c309131e52fec","unresolved":false,"context_lines":[{"line_number":99,"context_line":"class TestQosDriversCalls(TestQosDriversManagerBase):"},{"line_number":100,"context_line":"    \"\"\"Test QoS driver calls\"\"\""},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    CALL_METHODS \u003d (\u0027create_policy\u0027,"},{"line_number":103,"context_line":"                    \u0027create_policy_precommit\u0027,"},{"line_number":104,"context_line":"                    \u0027update_policy\u0027,"},{"line_number":105,"context_line":"                    \u0027update_policy_precommit\u0027,"},{"line_number":106,"context_line":"                    \u0027delete_policy\u0027,"},{"line_number":107,"context_line":"                    \u0027delete_policy_precommit\u0027)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def setUp(self):"},{"line_number":110,"context_line":"        super(TestQosDriversCalls, self).setUp()"}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_bfbde169","line":107,"range":{"start_line":102,"start_character":21,"end_line":107,"end_character":45},"in_reply_to":"bff0334d_a3b752f5","updated":"2017-04-24 09:39:37.000000000","message":"You are right. Also I\u0027ll group those calls in a set in qos_consts. If any new call is added, this test will test automatically this new call.","commit_id":"28e8a087749f3919ef7a08e1c957453fc69b5cdf"}],"neutron/tests/unit/services/qos/test_qos_plugin.py":[{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"41fa1fcb05d7b47ed8caf7c231f3cfbf2afba402","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                         method_name)"},{"line_number":92,"context_line":"        self.assertTrue(method.called)"},{"line_number":93,"context_line":"        calls \u003d ["},{"line_number":94,"context_line":"            mock.call(method_name + \u0027_precommit\u0027, self.ctxt, mock.ANY),"},{"line_number":95,"context_line":"            mock.call(method_name, self.ctxt, mock.ANY)"},{"line_number":96,"context_line":"        ]"},{"line_number":97,"context_line":"        self.qos_plugin.driver_manager.call.assert_has_calls(calls)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_43c88672","line":94,"range":{"start_line":94,"start_character":36,"end_line":94,"end_character":48},"updated":"2017-04-11 22:32:48.000000000","message":"Is this where we want to use https://review.openstack.org/#/c/421818/4/neutron/services/qos/qos_consts.py@42?","commit_id":"28e8a087749f3919ef7a08e1c957453fc69b5cdf"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"484d56977c1453724be5e4e5e32c309131e52fec","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                         method_name)"},{"line_number":92,"context_line":"        self.assertTrue(method.called)"},{"line_number":93,"context_line":"        calls \u003d ["},{"line_number":94,"context_line":"            mock.call(method_name + \u0027_precommit\u0027, self.ctxt, mock.ANY),"},{"line_number":95,"context_line":"            mock.call(method_name, self.ctxt, mock.ANY)"},{"line_number":96,"context_line":"        ]"},{"line_number":97,"context_line":"        self.qos_plugin.driver_manager.call.assert_has_calls(calls)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_9f18e5d3","line":94,"range":{"start_line":94,"start_character":36,"end_line":94,"end_character":48},"in_reply_to":"bff0334d_43c88672","updated":"2017-04-24 09:39:37.000000000","message":"Yes, this constant was meant to be included here. Thanks!\n\nBecause some refactor in the code, this section is no more needed.","commit_id":"28e8a087749f3919ef7a08e1c957453fc69b5cdf"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"dc751e6dfe5f03df4bc891bc35fad4f270754a66","unresolved":false,"context_lines":[{"line_number":309,"context_line":"        with mock.patch.object(policy_object.QosPolicy, \u0027create\u0027) as \\"},{"line_number":310,"context_line":"                mock_qos_create:"},{"line_number":311,"context_line":"            self.qos_plugin.create_policy(self.ctxt, self.policy_data)"},{"line_number":312,"context_line":"            mock_qos_create.assert_called_once_with()"},{"line_number":313,"context_line":"        self._validate_driver_params(\u0027create_policy\u0027)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    def test_add_policy_with_extra_tenant_keyword(self, *mocks):"}],"source_content_type":"text/x-python","patch_set":6,"id":"5ff73747_c6f3e109","line":312,"range":{"start_line":312,"start_character":12,"end_line":312,"end_character":53},"updated":"2017-04-26 17:27:47.000000000","message":"actually, can we assert here the method list on calling create_policy from plugin ? we can make sure precommit_create is called before the create ?","commit_id":"2ea7397417e31d54fd018a252d756a8395cb7a41"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ebd5f3453aef471b2179f0d4ba54d02338e50661","unresolved":false,"context_lines":[{"line_number":309,"context_line":"        with mock.patch.object(policy_object.QosPolicy, \u0027create\u0027) as \\"},{"line_number":310,"context_line":"                mock_qos_create:"},{"line_number":311,"context_line":"            self.qos_plugin.create_policy(self.ctxt, self.policy_data)"},{"line_number":312,"context_line":"            mock_qos_create.assert_called_once_with()"},{"line_number":313,"context_line":"        self._validate_driver_params(\u0027create_policy\u0027)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    def test_add_policy_with_extra_tenant_keyword(self, *mocks):"}],"source_content_type":"text/x-python","patch_set":6,"id":"5ff73747_e56a41eb","line":312,"range":{"start_line":312,"start_character":12,"end_line":312,"end_character":53},"in_reply_to":"5ff73747_c6f3e109","updated":"2017-04-27 08:53:40.000000000","message":"The precommit call and the create action are inside the same transaction.\n\nThe \"create\" call is made before the event call in order to send the full object in the call (https://review.openstack.org/#/c/421818/6/neutron/services/qos/qos_plugin.py@164).\n\nIf an exception is thrown, the object creation will be rolled back.\n\nYou have the same behaviour in \"trunk\" and \"segments\".","commit_id":"2ea7397417e31d54fd018a252d756a8395cb7a41"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"4b5dc2b6066f36f8bc5e26b64f5957dbb5ccea0d","unresolved":false,"context_lines":[{"line_number":309,"context_line":"        with mock.patch.object(policy_object.QosPolicy, \u0027create\u0027) as \\"},{"line_number":310,"context_line":"                mock_qos_create:"},{"line_number":311,"context_line":"            self.qos_plugin.create_policy(self.ctxt, self.policy_data)"},{"line_number":312,"context_line":"            mock_qos_create.assert_called_once_with()"},{"line_number":313,"context_line":"        self._validate_driver_params(\u0027create_policy\u0027)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    def test_add_policy_with_extra_tenant_keyword(self, *mocks):"}],"source_content_type":"text/x-python","patch_set":6,"id":"5ff73747_aa934f5c","line":312,"range":{"start_line":312,"start_character":12,"end_line":312,"end_character":53},"in_reply_to":"5ff73747_ce8ab4bd","updated":"2017-05-03 10:14:28.000000000","message":"I think the new tests added check the order of the calls.","commit_id":"2ea7397417e31d54fd018a252d756a8395cb7a41"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"37f7ce5c930382fbc085ac5b263bf4e31f997ebf","unresolved":false,"context_lines":[{"line_number":309,"context_line":"        with mock.patch.object(policy_object.QosPolicy, \u0027create\u0027) as \\"},{"line_number":310,"context_line":"                mock_qos_create:"},{"line_number":311,"context_line":"            self.qos_plugin.create_policy(self.ctxt, self.policy_data)"},{"line_number":312,"context_line":"            mock_qos_create.assert_called_once_with()"},{"line_number":313,"context_line":"        self._validate_driver_params(\u0027create_policy\u0027)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    def test_add_policy_with_extra_tenant_keyword(self, *mocks):"}],"source_content_type":"text/x-python","patch_set":6,"id":"5ff73747_ce8ab4bd","line":312,"range":{"start_line":312,"start_character":12,"end_line":312,"end_character":53},"in_reply_to":"5ff73747_e56a41eb","updated":"2017-04-27 15:39:18.000000000","message":"I mean there is precommit_event and another create_policy is called after that (which is poscommit event)\n\nhttps://review.openstack.org/#/c/421818/6/neutron/services/qos/qos_plugin.py@166 is out of transaction in which precommit_event is fired.","commit_id":"2ea7397417e31d54fd018a252d756a8395cb7a41"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"dc751e6dfe5f03df4bc891bc35fad4f270754a66","unresolved":false,"context_lines":[{"line_number":344,"context_line":"                mock_qos_update:"},{"line_number":345,"context_line":"            self.qos_plugin.update_policy("},{"line_number":346,"context_line":"                self.ctxt, self.policy.id, {\u0027policy\u0027: fields})"},{"line_number":347,"context_line":"            mock_qos_update.assert_called_once_with()"},{"line_number":348,"context_line":"        self._validate_driver_params(\u0027update_policy\u0027)"},{"line_number":349,"context_line":""},{"line_number":350,"context_line":"    @mock.patch(\u0027neutron.objects.db.api.get_object\u0027, return_value\u003dNone)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5ff73747_a6f695f8","line":347,"range":{"start_line":347,"start_character":12,"end_line":347,"end_character":53},"updated":"2017-04-26 17:27:47.000000000","message":"same here.","commit_id":"2ea7397417e31d54fd018a252d756a8395cb7a41"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ebd5f3453aef471b2179f0d4ba54d02338e50661","unresolved":false,"context_lines":[{"line_number":344,"context_line":"                mock_qos_update:"},{"line_number":345,"context_line":"            self.qos_plugin.update_policy("},{"line_number":346,"context_line":"                self.ctxt, self.policy.id, {\u0027policy\u0027: fields})"},{"line_number":347,"context_line":"            mock_qos_update.assert_called_once_with()"},{"line_number":348,"context_line":"        self._validate_driver_params(\u0027update_policy\u0027)"},{"line_number":349,"context_line":""},{"line_number":350,"context_line":"    @mock.patch(\u0027neutron.objects.db.api.get_object\u0027, return_value\u003dNone)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5ff73747_c56f45fa","line":347,"range":{"start_line":347,"start_character":12,"end_line":347,"end_character":53},"in_reply_to":"5ff73747_a6f695f8","updated":"2017-04-27 08:53:40.000000000","message":"ditto","commit_id":"2ea7397417e31d54fd018a252d756a8395cb7a41"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"d223577263471887a452b2064e9ec73eb3352ca0","unresolved":false,"context_lines":[{"line_number":370,"context_line":"            mock_manager.mock_calls.index(update_mock_call))"},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"    @mock.patch(\u0027neutron.objects.db.api.get_object\u0027, return_value\u003dNone)"},{"line_number":373,"context_line":"    def test_delete_policy(self, *mocks):"},{"line_number":374,"context_line":"        self.qos_plugin.delete_policy(self.ctxt, self.policy.id)"},{"line_number":375,"context_line":"        self._validate_driver_params(\u0027delete_policy\u0027)"},{"line_number":376,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_b26ef492","line":373,"updated":"2017-05-20 00:05:54.000000000","message":"Don\u0027t we want to test that delete_policy makes all the expected calls in order as well?","commit_id":"6cc817e59f6681123e407e66f8282ff9ab968b7a"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e339f835716eda5ad1c2b8c7cec1ee12cc34ff6b","unresolved":false,"context_lines":[{"line_number":370,"context_line":"            mock_manager.mock_calls.index(update_mock_call))"},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"    @mock.patch(\u0027neutron.objects.db.api.get_object\u0027, return_value\u003dNone)"},{"line_number":373,"context_line":"    def test_delete_policy(self, *mocks):"},{"line_number":374,"context_line":"        self.qos_plugin.delete_policy(self.ctxt, self.policy.id)"},{"line_number":375,"context_line":"        self._validate_driver_params(\u0027delete_policy\u0027)"},{"line_number":376,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_b9a23bfb","line":373,"in_reply_to":"ff0f0b1f_b26ef492","updated":"2017-05-22 13:32:32.000000000","message":"You are right, this part is missing.","commit_id":"6cc817e59f6681123e407e66f8282ff9ab968b7a"}]}
