)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"938470efb10684cf27c3cd3c221c19606e961668","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix Volume snapshots and connections on deletion"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In some cases deleted snapshots and connections are not removed form the"},{"line_number":10,"context_line":"cached lists, so we end up with a non existent element in the"},{"line_number":11,"context_line":"\"snapshots\" or \"connections\" list that should not be there."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5fc1f717_32f71c5c","line":9,"range":{"start_line":9,"start_character":64,"end_line":9,"end_character":68},"updated":"2019-03-26 11:13:44.000000000","message":"from","commit_id":"4219b903303968a0899587863b46726d5f8427a1"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"d3b03b8706da74083439d169f4b9791e5906f1da","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix Volume snapshots and connections on deletion"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In some cases deleted snapshots and connections are not removed form the"},{"line_number":10,"context_line":"cached lists, so we end up with a non existent element in the"},{"line_number":11,"context_line":"\"snapshots\" or \"connections\" list that should not be there."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5fc1f717_9556facd","line":9,"range":{"start_line":9,"start_character":64,"end_line":9,"end_character":68},"in_reply_to":"5fc1f717_32f71c5c","updated":"2019-03-26 11:34:37.000000000","message":"will fix if I submit a new patch.","commit_id":"4219b903303968a0899587863b46726d5f8427a1"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"938470efb10684cf27c3cd3c221c19606e961668","unresolved":false,"context_lines":[{"line_number":10,"context_line":"cached lists, so we end up with a non existent element in the"},{"line_number":11,"context_line":"\"snapshots\" or \"connections\" list that should not be there."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"The reason why this happens is because we are looking for specific"},{"line_number":14,"context_line":"instances instead of searching by the ID of the resource, and we could"},{"line_number":15,"context_line":"have different instances in the list than the one we are looking for."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This patch ensure we are always looking for the elements to remove using"},{"line_number":18,"context_line":"the ID."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5fc1f717_b2a0ec43","line":15,"range":{"start_line":13,"start_character":0,"end_line":15,"end_character":69},"updated":"2019-03-26 11:13:44.000000000","message":"++","commit_id":"4219b903303968a0899587863b46726d5f8427a1"}],"cinderlib/objects.py":[{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"938470efb10684cf27c3cd3c221c19606e961668","unresolved":false,"context_lines":[{"line_number":459,"context_line":"        if ovo:"},{"line_number":460,"context_line":"            del self._ovo.snapshots.objects[i]"},{"line_number":461,"context_line":""},{"line_number":462,"context_line":"    def _connection_removed(self, connection):"},{"line_number":463,"context_line":"        # The connection instance in memory could be out of sync and not be"},{"line_number":464,"context_line":"        # identical, so check by ID."},{"line_number":465,"context_line":"        i, conn \u003d utils.find_by_id(connection.id, self._connections)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_d22b38e8","line":462,"range":{"start_line":462,"start_character":8,"end_line":462,"end_character":28},"updated":"2019-03-26 11:13:44.000000000","message":"Perhaps \"clean_unsync_connection\"? It\u0027s difficult to understand the sens and action of this method by a name like \"connection_removed\"","commit_id":"4219b903303968a0899587863b46726d5f8427a1"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"d3b03b8706da74083439d169f4b9791e5906f1da","unresolved":false,"context_lines":[{"line_number":459,"context_line":"        if ovo:"},{"line_number":460,"context_line":"            del self._ovo.snapshots.objects[i]"},{"line_number":461,"context_line":""},{"line_number":462,"context_line":"    def _connection_removed(self, connection):"},{"line_number":463,"context_line":"        # The connection instance in memory could be out of sync and not be"},{"line_number":464,"context_line":"        # identical, so check by ID."},{"line_number":465,"context_line":"        i, conn \u003d utils.find_by_id(connection.id, self._connections)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_f5a09ef6","line":462,"range":{"start_line":462,"start_character":8,"end_line":462,"end_character":28},"in_reply_to":"5fc1f717_d22b38e8","updated":"2019-03-26 11:34:37.000000000","message":"The name indicates when the method is being called, whenever a connection is removed, and the actions inside depend on what needs to happen.  We do the same for volumes and snapshots.  You can think of it as a \"destructor\".","commit_id":"4219b903303968a0899587863b46726d5f8427a1"}],"cinderlib/utils.py":[{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"938470efb10684cf27c3cd3c221c19606e961668","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2019, Red Hat, Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_32bf1cab","line":1,"updated":"2019-03-26 11:13:44.000000000","message":"I think we decided (OpenStack community) to remove such mark, no?","commit_id":"4219b903303968a0899587863b46726d5f8427a1"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"d3b03b8706da74083439d169f4b9791e5906f1da","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2019, Red Hat, Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_d5e9e219","line":1,"in_reply_to":"5fc1f717_32bf1cab","updated":"2019-03-26 11:34:37.000000000","message":"I don\u0027t recall such a decision, though I could have missed it.","commit_id":"4219b903303968a0899587863b46726d5f8427a1"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"938470efb10684cf27c3cd3c221c19606e961668","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"def find_by_id(resource_id, elements):"},{"line_number":18,"context_line":"    if elements:"},{"line_number":19,"context_line":"        for i, element in enumerate(elements):"},{"line_number":20,"context_line":"            if resource_id \u003d\u003d element.id:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_92e370d8","line":17,"updated":"2019-03-26 11:13:44.000000000","message":"Hum... yes I can understand why you preferred to add these methods here instead of have them as static in Object.\n       \nAlso perhaps it would have been great to see some doctstring. That to start this module in the best way.","commit_id":"4219b903303968a0899587863b46726d5f8427a1"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"d3b03b8706da74083439d169f4b9791e5906f1da","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"def find_by_id(resource_id, elements):"},{"line_number":18,"context_line":"    if elements:"},{"line_number":19,"context_line":"        for i, element in enumerate(elements):"},{"line_number":20,"context_line":"            if resource_id \u003d\u003d element.id:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_d537a2af","line":17,"in_reply_to":"5fc1f717_92e370d8","updated":"2019-03-26 11:34:37.000000000","message":"I don\u0027t think a docstring here adds any real value, looking at the name of the method and the parameters says exactly what the docstring would say.","commit_id":"4219b903303968a0899587863b46726d5f8427a1"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"938470efb10684cf27c3cd3c221c19606e961668","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    return None, None"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def add_by_id(resource, elements):"},{"line_number":26,"context_line":"    if elements is not None:"},{"line_number":27,"context_line":"        i, element \u003d find_by_id(resource.id, elements)"},{"line_number":28,"context_line":"        if element:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_b2e8ecb2","line":25,"updated":"2019-03-26 11:13:44.000000000","message":"Same here.","commit_id":"4219b903303968a0899587863b46726d5f8427a1"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"d3b03b8706da74083439d169f4b9791e5906f1da","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    return None, None"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def add_by_id(resource, elements):"},{"line_number":26,"context_line":"    if elements is not None:"},{"line_number":27,"context_line":"        i, element \u003d find_by_id(resource.id, elements)"},{"line_number":28,"context_line":"        if element:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_f565feb5","line":25,"in_reply_to":"5fc1f717_b2e8ecb2","updated":"2019-03-26 11:34:37.000000000","message":"Here it would make some sense, since it adds or replaces, but given the complexity of the method I think it takes as long to look at the code and see what it does as to read a docstring.  I\u0027ll add it if I need to submit a new patch.","commit_id":"4219b903303968a0899587863b46726d5f8427a1"}]}
