)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10058,"name":"Erlon R. Cruz","email":"erlon.rodrigues.cruz@canonical.com","username":"sombrafam"},"change_message_id":"c7c4c158bc5d66c96a3ae2e208fa980ef1e46f99","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Check if already managed before manage snapshot"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Check if the snapshot is already managed in manage_existing_snapshot"},{"line_number":10,"context_line":"function at volume/api.py through calling the new implemnted function"},{"line_number":11,"context_line":"check_already_managed_snapshot at volume/utils.py. Unit tests are"},{"line_number":12,"context_line":"added for the new implemnted function check_already_managed_snapshot."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"df87a7cf_2d05e67a","line":10,"range":{"start_line":10,"start_character":50,"end_line":10,"end_character":60},"updated":"2017-12-14 17:04:34.000000000","message":"implemented","commit_id":"7c5ef3e3278380b06f896c50299ca7775406af6e"},{"author":{"_account_id":26907,"name":"Aseel Awwad","email":"aseel.awwad.ext@nokia.com","username":"aseelawwad"},"change_message_id":"78648cbe09071574e1fb8969f5c174ca713cc8ab","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Check if already managed before manage snapshot"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Check if the snapshot is already managed in manage_existing_snapshot"},{"line_number":10,"context_line":"function at volume/api.py through calling the new implemnted function"},{"line_number":11,"context_line":"check_already_managed_snapshot at volume/utils.py. Unit tests are"},{"line_number":12,"context_line":"added for the new implemnted function check_already_managed_snapshot."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"df87a7cf_9fbbf3e3","line":10,"range":{"start_line":10,"start_character":50,"end_line":10,"end_character":60},"in_reply_to":"df87a7cf_2d05e67a","updated":"2017-12-14 21:12:50.000000000","message":"Done","commit_id":"7c5ef3e3278380b06f896c50299ca7775406af6e"},{"author":{"_account_id":10058,"name":"Erlon R. Cruz","email":"erlon.rodrigues.cruz@canonical.com","username":"sombrafam"},"change_message_id":"c7c4c158bc5d66c96a3ae2e208fa980ef1e46f99","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Check if the snapshot is already managed in manage_existing_snapshot"},{"line_number":10,"context_line":"function at volume/api.py through calling the new implemnted function"},{"line_number":11,"context_line":"check_already_managed_snapshot at volume/utils.py. Unit tests are"},{"line_number":12,"context_line":"added for the new implemnted function check_already_managed_snapshot."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: Iccc2dfabaaaa5eae3b21702b84e8d657488b0cc7"},{"line_number":15,"context_line":"Closes-Bug: #1525887"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"df87a7cf_0d04a27a","line":12,"range":{"start_line":12,"start_character":18,"end_line":12,"end_character":28},"updated":"2017-12-14 17:04:34.000000000","message":"implemented","commit_id":"7c5ef3e3278380b06f896c50299ca7775406af6e"},{"author":{"_account_id":26907,"name":"Aseel Awwad","email":"aseel.awwad.ext@nokia.com","username":"aseelawwad"},"change_message_id":"78648cbe09071574e1fb8969f5c174ca713cc8ab","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Check if the snapshot is already managed in manage_existing_snapshot"},{"line_number":10,"context_line":"function at volume/api.py through calling the new implemnted function"},{"line_number":11,"context_line":"check_already_managed_snapshot at volume/utils.py. Unit tests are"},{"line_number":12,"context_line":"added for the new implemnted function check_already_managed_snapshot."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: Iccc2dfabaaaa5eae3b21702b84e8d657488b0cc7"},{"line_number":15,"context_line":"Closes-Bug: #1525887"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"df87a7cf_5fb56bed","line":12,"range":{"start_line":12,"start_character":18,"end_line":12,"end_character":28},"in_reply_to":"df87a7cf_0d04a27a","updated":"2017-12-14 21:12:50.000000000","message":"Done","commit_id":"7c5ef3e3278380b06f896c50299ca7775406af6e"}],"cinder/tests/unit/test_volume_utils.py":[{"author":{"_account_id":10058,"name":"Erlon R. Cruz","email":"erlon.rodrigues.cruz@canonical.com","username":"sombrafam"},"change_message_id":"a20655c9f67cf7c0fd4ba339ade22464293ba110","unresolved":false,"context_lines":[{"line_number":911,"context_line":"        self.assertFalse(result)"},{"line_number":912,"context_line":"        result \u003d volume_utils.check_already_managed_snapshot(\u0027not-a-uuid\u0027)"},{"line_number":913,"context_line":"        self.assertFalse(result)"},{"line_number":914,"context_line":""},{"line_number":915,"context_line":"    @mock.patch(\u0027cinder.volume.utils.CONF\u0027)"},{"line_number":916,"context_line":"    def test_extract_id_from_snapshot_name(self, conf_mock):"},{"line_number":917,"context_line":"        conf_mock.snapshot_name_template \u003d \u0027%s-snapshot\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_cda6a3ac","line":914,"updated":"2017-12-15 13:05:04.000000000","message":"Here:\n    test_manage_existing_snapshot_already_managed():\nThen you use the mock to force a condition that will force the exception.InvalidVolume. And then you use self.assertRaises() to call that function and assert that you have the expected behaviour.","commit_id":"59a1c54053181261d3d1324c7e4eb038fdba853b"},{"author":{"_account_id":26907,"name":"Aseel Awwad","email":"aseel.awwad.ext@nokia.com","username":"aseelawwad"},"change_message_id":"00dd1e8f5c06d541c67c21b2dd49fb0ad7c37bb9","unresolved":false,"context_lines":[{"line_number":911,"context_line":"        self.assertFalse(result)"},{"line_number":912,"context_line":"        result \u003d volume_utils.check_already_managed_snapshot(\u0027not-a-uuid\u0027)"},{"line_number":913,"context_line":"        self.assertFalse(result)"},{"line_number":914,"context_line":""},{"line_number":915,"context_line":"    @mock.patch(\u0027cinder.volume.utils.CONF\u0027)"},{"line_number":916,"context_line":"    def test_extract_id_from_snapshot_name(self, conf_mock):"},{"line_number":917,"context_line":"        conf_mock.snapshot_name_template \u003d \u0027%s-snapshot\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_90f2f46e","line":914,"in_reply_to":"df87a7cf_cda6a3ac","updated":"2017-12-15 13:53:20.000000000","message":"But this file is only to test volumes/utils.py functions. Are you sure there is a need to add such a test here?","commit_id":"59a1c54053181261d3d1324c7e4eb038fdba853b"}],"cinder/volume/api.py":[{"author":{"_account_id":10058,"name":"Erlon R. Cruz","email":"erlon.rodrigues.cruz@canonical.com","username":"sombrafam"},"change_message_id":"c7c4c158bc5d66c96a3ae2e208fa980ef1e46f99","unresolved":false,"context_lines":[{"line_number":1741,"context_line":"                                 name\u003dNone, description\u003dNone,"},{"line_number":1742,"context_line":"                                 metadata\u003dNone):"},{"line_number":1743,"context_line":"        if \u0027source-name\u0027 in ref:"},{"line_number":1744,"context_line":"            snapshot_id \u003d ref[\u0027source-name\u0027]"},{"line_number":1745,"context_line":"            if volume_utils.check_already_managed_snapshot(snapshot_id):"},{"line_number":1746,"context_line":"                raise exception.InvalidVolume("},{"line_number":1747,"context_line":"                    _(\"Unable to manage existing snapshot.\""}],"source_content_type":"text/x-python","patch_set":1,"id":"df87a7cf_cd51da64","line":1744,"range":{"start_line":1744,"start_character":12,"end_line":1744,"end_character":44},"updated":"2017-12-14 17:04:34.000000000","message":"You should comment here that this fix will work for file based backends that use the volume in the format. volume-ID. I think that is ok as well if you add the same comment for the manage_existing() that you have added the fix while ago.\n\nThis is not correct. The user can pass here any handle, not necessarily a snapshot id (e.g. snapshot-9fuda8d) or even a completely different name that is not even related to the id (e.g. a lunid 23).\n\nHere you should use a function like you did for the manage_existing() that gets the id from the reference. It will work for file-based backends.","commit_id":"7c5ef3e3278380b06f896c50299ca7775406af6e"},{"author":{"_account_id":26907,"name":"Aseel Awwad","email":"aseel.awwad.ext@nokia.com","username":"aseelawwad"},"change_message_id":"78648cbe09071574e1fb8969f5c174ca713cc8ab","unresolved":false,"context_lines":[{"line_number":1741,"context_line":"                                 name\u003dNone, description\u003dNone,"},{"line_number":1742,"context_line":"                                 metadata\u003dNone):"},{"line_number":1743,"context_line":"        if \u0027source-name\u0027 in ref:"},{"line_number":1744,"context_line":"            snapshot_id \u003d ref[\u0027source-name\u0027]"},{"line_number":1745,"context_line":"            if volume_utils.check_already_managed_snapshot(snapshot_id):"},{"line_number":1746,"context_line":"                raise exception.InvalidVolume("},{"line_number":1747,"context_line":"                    _(\"Unable to manage existing snapshot.\""}],"source_content_type":"text/x-python","patch_set":1,"id":"df87a7cf_df75fbfb","line":1744,"range":{"start_line":1744,"start_character":12,"end_line":1744,"end_character":44},"in_reply_to":"df87a7cf_cd51da64","updated":"2017-12-14 21:12:50.000000000","message":"Done. \nThank you","commit_id":"7c5ef3e3278380b06f896c50299ca7775406af6e"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"5c0573d4cd7743a22df3b7c063f2e7a62c54283f","unresolved":false,"context_lines":[{"line_number":1741,"context_line":"                                 name\u003dNone, description\u003dNone,"},{"line_number":1742,"context_line":"                                 metadata\u003dNone):"},{"line_number":1743,"context_line":"        # Disallow managed snapshots from being managed again."},{"line_number":1744,"context_line":"        # This check will work for file based backends that use"},{"line_number":1745,"context_line":"        # the snapshot name in the format snapshot-ID."},{"line_number":1746,"context_line":"        if \u0027source-name\u0027 in ref:"},{"line_number":1747,"context_line":"            snapshot_id \u003d volume_utils.extract_id_from_snapshot_name("}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_9c05747d","line":1744,"range":{"start_line":1744,"start_character":31,"end_line":1744,"end_character":54},"updated":"2017-12-28 21:31:04.000000000","message":"These checks should only be in the remoteFS based drivers then. This will not work for all backends, so this should not be done against backends that identify their snapshots in a different way.","commit_id":"dd70a295477ebec5320f2efbdbe0aa7384645db9"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"5c46f42199da69e65a0f7262629110fe63dc3ce9","unresolved":false,"context_lines":[{"line_number":1741,"context_line":"                                 name\u003dNone, description\u003dNone,"},{"line_number":1742,"context_line":"                                 metadata\u003dNone):"},{"line_number":1743,"context_line":"        # Disallow managed snapshots from being managed again."},{"line_number":1744,"context_line":"        # This check will work for file based backends that use"},{"line_number":1745,"context_line":"        # the snapshot name in the format snapshot-ID."},{"line_number":1746,"context_line":"        if \u0027source-name\u0027 in ref:"},{"line_number":1747,"context_line":"            snapshot_id \u003d volume_utils.extract_id_from_snapshot_name("}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_0223b257","line":1744,"range":{"start_line":1744,"start_character":31,"end_line":1744,"end_character":54},"in_reply_to":"9f91af0f_9c05747d","updated":"2018-08-13 03:13:19.000000000","message":"+1","commit_id":"dd70a295477ebec5320f2efbdbe0aa7384645db9"}]}
