)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"8eca68113bf2c8239320302c9d7eeed7c6197a92","unresolved":false,"context_lines":[{"line_number":11,"context_line":"Related tempest patch: [1]"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"[1] https://review.openstack.org/#/c/463906/"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"APIImpact"},{"line_number":16,"context_line":"DocImpact"},{"line_number":17,"context_line":"Partial-Implements: blueprint revert-volume-to-snapshot"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"7f231b9d_4c2ffc3e","line":14,"updated":"2017-06-13 21:44:20.000000000","message":"Have you submitted a patch to cinderclient?","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"}],"cinder/api/openstack/api_version_request.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"3f58ffe52b6e35ffd94cca3fd6ec15b817dbe93d","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    * 3.29 - Add filter, sorter and pagination support in group snapshot."},{"line_number":83,"context_line":"    * 3.30 - Support sort snapshots with \"name\"."},{"line_number":84,"context_line":"    * 3.31 - Add support for configure resource query filters."},{"line_number":85,"context_line":"    * 3.32 - Add volume rollback from it\u0027s latest snapshot support."},{"line_number":86,"context_line":"\"\"\""},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"# The minimum and maximum versions of the API supported"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f013ff3_7a4ce79d","line":85,"range":{"start_line":85,"start_character":17,"end_line":85,"end_character":42},"updated":"2017-05-16 04:04:15.000000000","message":"revert volume to its","commit_id":"16518c3b293561a2e9f4fa42a5247345ebd1e2b3"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"e781d251a3e94efaa9eb1073348c083799081f34","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    * 3.29 - Add filter, sorter and pagination support in group snapshot."},{"line_number":83,"context_line":"    * 3.30 - Support sort snapshots with \"name\"."},{"line_number":84,"context_line":"    * 3.31 - Add support for configure resource query filters."},{"line_number":85,"context_line":"    * 3.32 - Add volume rollback from it\u0027s latest snapshot support."},{"line_number":86,"context_line":"\"\"\""},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"# The minimum and maximum versions of the API supported"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f013ff3_b3c29584","line":85,"range":{"start_line":85,"start_character":17,"end_line":85,"end_character":42},"in_reply_to":"1f013ff3_7a4ce79d","updated":"2017-05-16 09:56:09.000000000","message":"Done","commit_id":"16518c3b293561a2e9f4fa42a5247345ebd1e2b3"}],"cinder/api/openstack/rest_api_version_history.rst":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"3f58ffe52b6e35ffd94cca3fd6ec15b817dbe93d","unresolved":false,"context_lines":[{"line_number":303,"context_line":""},{"line_number":304,"context_line":"3.32"},{"line_number":305,"context_line":"----"},{"line_number":306,"context_line":"  Add volume rollback from it\u0027s latest snapshot support."},{"line_number":307,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"1f013ff3_da73fbe6","line":306,"range":{"start_line":306,"start_character":6,"end_line":306,"end_character":26},"updated":"2017-05-16 04:04:15.000000000","message":"revert volume to","commit_id":"16518c3b293561a2e9f4fa42a5247345ebd1e2b3"}],"cinder/api/v3/volumes.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"3f58ffe52b6e35ffd94cca3fd6ec15b817dbe93d","unresolved":false,"context_lines":[{"line_number":170,"context_line":"            l_snap \u003d self.volume_api.get_volume_latest_snapshot(context,"},{"line_number":171,"context_line":"                                                                volume[\u0027id\u0027])"},{"line_number":172,"context_line":"        except exception.VolumeSnapshotNotFound:"},{"line_number":173,"context_line":"            msg \u003d _(\"Volume %s have not any snapshots.\")"},{"line_number":174,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg % volume[\u0027id\u0027])"},{"line_number":175,"context_line":"        # Ensure volume and snapshot match."},{"line_number":176,"context_line":"        if snapshot_id is None or snapshot_id !\u003d l_snap[\u0027id\u0027]:"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f013ff3_9aa8d31f","line":173,"range":{"start_line":173,"start_character":31,"end_line":173,"end_character":39},"updated":"2017-05-16 04:04:15.000000000","message":"does not have","commit_id":"16518c3b293561a2e9f4fa42a5247345ebd1e2b3"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"e781d251a3e94efaa9eb1073348c083799081f34","unresolved":false,"context_lines":[{"line_number":170,"context_line":"            l_snap \u003d self.volume_api.get_volume_latest_snapshot(context,"},{"line_number":171,"context_line":"                                                                volume[\u0027id\u0027])"},{"line_number":172,"context_line":"        except exception.VolumeSnapshotNotFound:"},{"line_number":173,"context_line":"            msg \u003d _(\"Volume %s have not any snapshots.\")"},{"line_number":174,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg % volume[\u0027id\u0027])"},{"line_number":175,"context_line":"        # Ensure volume and snapshot match."},{"line_number":176,"context_line":"        if snapshot_id is None or snapshot_id !\u003d l_snap[\u0027id\u0027]:"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f013ff3_5360f1a5","line":173,"range":{"start_line":173,"start_character":31,"end_line":173,"end_character":39},"in_reply_to":"1f013ff3_9aa8d31f","updated":"2017-05-16 09:56:09.000000000","message":"Done","commit_id":"16518c3b293561a2e9f4fa42a5247345ebd1e2b3"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"16e69b54cb9c0b80449a64600ddb3336d1132eda","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        snapshot_id \u003d body[\u0027revert\u0027].get(\u0027snapshot_id\u0027)"},{"line_number":174,"context_line":"        volume \u003d self.volume_api.get_volume(context, id)"},{"line_number":175,"context_line":"        try:"},{"line_number":176,"context_line":"            l_snap \u003d self.volume_api.get_volume_latest_snapshot(context,"},{"line_number":177,"context_line":"                                                                volume[\u0027id\u0027])"},{"line_number":178,"context_line":"        except exception.VolumeSnapshotNotFound:"},{"line_number":179,"context_line":"            msg \u003d _(\"Volume %s doesn\u0027t have any snapshots.\")"},{"line_number":180,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg % volume[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f231b9d_06a606ac","line":177,"range":{"start_line":176,"start_character":12,"end_line":177,"end_character":77},"updated":"2017-06-18 17:59:23.000000000","message":"Do we need to go to volume_api for this or should we just use the object module that we already import?  I don\u0027t have a strong feeling one way or the other, but currently, you\u0027re not calling this anywhere else, and we do sort of have a mix of ways to do this now.  Might be good to standardize on one.","commit_id":"eed0d0dda5529b3a126a3c2e202facea64867835"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"c2055e1dc43b8edc5fa6fc270c40b00bdbfc57a9","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        snapshot_id \u003d body[\u0027revert\u0027].get(\u0027snapshot_id\u0027)"},{"line_number":174,"context_line":"        volume \u003d self.volume_api.get_volume(context, id)"},{"line_number":175,"context_line":"        try:"},{"line_number":176,"context_line":"            l_snap \u003d self.volume_api.get_volume_latest_snapshot(context,"},{"line_number":177,"context_line":"                                                                volume[\u0027id\u0027])"},{"line_number":178,"context_line":"        except exception.VolumeSnapshotNotFound:"},{"line_number":179,"context_line":"            msg \u003d _(\"Volume %s doesn\u0027t have any snapshots.\")"},{"line_number":180,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg % volume[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f231b9d_2cfc433c","line":177,"range":{"start_line":176,"start_character":12,"end_line":177,"end_character":77},"in_reply_to":"7f231b9d_06a606ac","updated":"2017-06-19 06:41:07.000000000","message":"Thanks for you suggestion!","commit_id":"eed0d0dda5529b3a126a3c2e202facea64867835"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"16e69b54cb9c0b80449a64600ddb3336d1132eda","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            msg \u003d _(\"Volume %s doesn\u0027t have any snapshots.\")"},{"line_number":180,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg % volume[\u0027id\u0027])"},{"line_number":181,"context_line":"        # Ensure volume and snapshot match."},{"line_number":182,"context_line":"        if snapshot_id is None or snapshot_id !\u003d l_snap[\u0027id\u0027]:"},{"line_number":183,"context_line":"            msg \u003d _(\"Specified snapshot %(s_id)s is None or not \""},{"line_number":184,"context_line":"                    \"the latest one of volume %(v_id)s.\")"},{"line_number":185,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg % {\u0027s_id\u0027: snapshot_id,"},{"line_number":186,"context_line":"                                                        \u0027v_id\u0027: volume[\u0027id\u0027]})"},{"line_number":187,"context_line":"        snapshot \u003d self.volume_api.get_snapshot(context, l_snap[\u0027id\u0027])"},{"line_number":188,"context_line":"        try:"},{"line_number":189,"context_line":"            msg \u003d _(\u0027Reverting volume %(v_id)s to snapshot %(s_id)s.\u0027)"},{"line_number":190,"context_line":"            LOG.info(msg, {\u0027v_id\u0027: volume[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f231b9d_e6df8a0a","line":187,"range":{"start_line":182,"start_character":8,"end_line":187,"end_character":70},"updated":"2017-06-18 17:59:23.000000000","message":"I think this might be kind of confusing compared to the docs etc.  My first impression from docs was \"revert \u003cvolume-id\u003e\" and it only supports rolling back to most recent snapshot.\n\nBut you do allow specifying a snapshot here to override that.  That\u0027s fine, but I think we need to be more clear about that.  I think there was also some concern about that in the past by drivers that used linked-snapshots (IIRC there were some that can\u0027t actually rollback to n-2 without going n, n-1, n-2).  I guess you\u0027re leaving that up to the dirver?\n\nDo we have some that auto-delete, or require deletion of the intermediate snapshots?\n\nrevert seems like a fine name if you just \"revert to last snap only\" but if we allow specifying a specific snapshot I wonder if rollback makes more sense?  I don\u0027t really care too much about that (the name) right now but I do think it should be in peoples heads as the review this.","commit_id":"eed0d0dda5529b3a126a3c2e202facea64867835"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"3fda4f2304a2488cd3b78159861a3bb34b88b9fd","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            msg \u003d _(\"Volume %s doesn\u0027t have any snapshots.\")"},{"line_number":180,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg % volume[\u0027id\u0027])"},{"line_number":181,"context_line":"        # Ensure volume and snapshot match."},{"line_number":182,"context_line":"        if snapshot_id is None or snapshot_id !\u003d l_snap[\u0027id\u0027]:"},{"line_number":183,"context_line":"            msg \u003d _(\"Specified snapshot %(s_id)s is None or not \""},{"line_number":184,"context_line":"                    \"the latest one of volume %(v_id)s.\")"},{"line_number":185,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg % {\u0027s_id\u0027: snapshot_id,"},{"line_number":186,"context_line":"                                                        \u0027v_id\u0027: volume[\u0027id\u0027]})"},{"line_number":187,"context_line":"        snapshot \u003d self.volume_api.get_snapshot(context, l_snap[\u0027id\u0027])"},{"line_number":188,"context_line":"        try:"},{"line_number":189,"context_line":"            msg \u003d _(\u0027Reverting volume %(v_id)s to snapshot %(s_id)s.\u0027)"},{"line_number":190,"context_line":"            LOG.info(msg, {\u0027v_id\u0027: volume[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f231b9d_95eb4c11","line":187,"range":{"start_line":182,"start_character":8,"end_line":187,"end_character":70},"in_reply_to":"7f231b9d_877fb064","updated":"2017-06-19 13:57:56.000000000","message":"That makes sense now, thanks!!","commit_id":"eed0d0dda5529b3a126a3c2e202facea64867835"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"c2055e1dc43b8edc5fa6fc270c40b00bdbfc57a9","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            msg \u003d _(\"Volume %s doesn\u0027t have any snapshots.\")"},{"line_number":180,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg % volume[\u0027id\u0027])"},{"line_number":181,"context_line":"        # Ensure volume and snapshot match."},{"line_number":182,"context_line":"        if snapshot_id is None or snapshot_id !\u003d l_snap[\u0027id\u0027]:"},{"line_number":183,"context_line":"            msg \u003d _(\"Specified snapshot %(s_id)s is None or not \""},{"line_number":184,"context_line":"                    \"the latest one of volume %(v_id)s.\")"},{"line_number":185,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg % {\u0027s_id\u0027: snapshot_id,"},{"line_number":186,"context_line":"                                                        \u0027v_id\u0027: volume[\u0027id\u0027]})"},{"line_number":187,"context_line":"        snapshot \u003d self.volume_api.get_snapshot(context, l_snap[\u0027id\u0027])"},{"line_number":188,"context_line":"        try:"},{"line_number":189,"context_line":"            msg \u003d _(\u0027Reverting volume %(v_id)s to snapshot %(s_id)s.\u0027)"},{"line_number":190,"context_line":"            LOG.info(msg, {\u0027v_id\u0027: volume[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f231b9d_877fb064","line":187,"range":{"start_line":182,"start_character":8,"end_line":187,"end_character":70},"in_reply_to":"7f231b9d_e6df8a0a","updated":"2017-06-19 06:41:07.000000000","message":"Hey jgriffith, if I understand you correctly, I didn\u0027t allow overwrite the snapshot, it\u0027s a line of code related to convert db record to object there. With addressing your previous comment, this misleading line will be removed :)","commit_id":"eed0d0dda5529b3a126a3c2e202facea64867835"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d71d828fc7e4cb54c527c9db52634ef284ef546a","unresolved":false,"context_lines":[{"line_number":184,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg % {\u0027s_id\u0027: snapshot_id,"},{"line_number":185,"context_line":"                                                        \u0027v_id\u0027: volume.id})"},{"line_number":186,"context_line":"        try:"},{"line_number":187,"context_line":"            msg \u003d _(\u0027Reverting volume %(v_id)s to snapshot %(s_id)s.\u0027)"},{"line_number":188,"context_line":"            LOG.info(msg, {\u0027v_id\u0027: volume.id,"},{"line_number":189,"context_line":"                           \u0027s_id\u0027: l_snap.id})"},{"line_number":190,"context_line":"            self.volume_api.revert_to_snapshot(context, volume, l_snap)"}],"source_content_type":"text/x-python","patch_set":19,"id":"5f201791_be205df9","line":187,"range":{"start_line":187,"start_character":18,"end_line":187,"end_character":70},"updated":"2017-06-20 14:48:01.000000000","message":"This only goes to logs so it does not need _","commit_id":"2c3f0bb8b8e9deb4bb55cc2a65c5fa5b2ceff39c"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"037f39f8596b48b5fb7fe420ace51c373fff5e58","unresolved":false,"context_lines":[{"line_number":184,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg % {\u0027s_id\u0027: snapshot_id,"},{"line_number":185,"context_line":"                                                        \u0027v_id\u0027: volume.id})"},{"line_number":186,"context_line":"        try:"},{"line_number":187,"context_line":"            msg \u003d _(\u0027Reverting volume %(v_id)s to snapshot %(s_id)s.\u0027)"},{"line_number":188,"context_line":"            LOG.info(msg, {\u0027v_id\u0027: volume.id,"},{"line_number":189,"context_line":"                           \u0027s_id\u0027: l_snap.id})"},{"line_number":190,"context_line":"            self.volume_api.revert_to_snapshot(context, volume, l_snap)"}],"source_content_type":"text/x-python","patch_set":19,"id":"5f201791_643234aa","line":187,"range":{"start_line":187,"start_character":18,"end_line":187,"end_character":70},"in_reply_to":"5f201791_be205df9","updated":"2017-06-20 15:43:20.000000000","message":"Done","commit_id":"2c3f0bb8b8e9deb4bb55cc2a65c5fa5b2ceff39c"}],"cinder/brick/local_dev/lvm.py":[{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"8e68c44509ff1a47f9773ec2227eb959fca5d70f","unresolved":false,"context_lines":[{"line_number":745,"context_line":"        :param snapshot_name: Name of snapshot to revert"},{"line_number":746,"context_line":"        \"\"\""},{"line_number":747,"context_line":""},{"line_number":748,"context_line":"        cmd \u003d [\u0027lvconvert\u0027, \u0027--merge\u0027, \u0027%s/%s\u0027 % (self.vg_name, snapshot_name)]"},{"line_number":749,"context_line":"        try:"},{"line_number":750,"context_line":"            self._execute(*cmd, root_helper\u003dself._root_helper,"},{"line_number":751,"context_line":"                          run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":10,"id":"df140735_5574fffd","line":748,"updated":"2017-06-01 23:51:51.000000000","message":"I haven\u0027t tested, but doesn\u0027t the LV need to be deactivated first?","commit_id":"64130f622059a360a50562c705c966f1c246f745"}],"cinder/exception.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"3f58ffe52b6e35ffd94cca3fd6ec15b817dbe93d","unresolved":false,"context_lines":[{"line_number":403,"context_line":""},{"line_number":404,"context_line":""},{"line_number":405,"context_line":"class VolumeSnapshotNotFound(NotFound):"},{"line_number":406,"context_line":"    message \u003d _(\"Volume %(volume_id)s snapshot could not found\")"},{"line_number":407,"context_line":""},{"line_number":408,"context_line":""},{"line_number":409,"context_line":"class VolumeIsBusy(CinderException):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f013ff3_bae4afad","line":406,"updated":"2017-05-16 04:04:15.000000000","message":"No snapshots found for volume %(volume_id)s.","commit_id":"16518c3b293561a2e9f4fa42a5247345ebd1e2b3"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"e781d251a3e94efaa9eb1073348c083799081f34","unresolved":false,"context_lines":[{"line_number":403,"context_line":""},{"line_number":404,"context_line":""},{"line_number":405,"context_line":"class VolumeSnapshotNotFound(NotFound):"},{"line_number":406,"context_line":"    message \u003d _(\"Volume %(volume_id)s snapshot could not found\")"},{"line_number":407,"context_line":""},{"line_number":408,"context_line":""},{"line_number":409,"context_line":"class VolumeIsBusy(CinderException):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f013ff3_f3137d0c","line":406,"in_reply_to":"1f013ff3_bae4afad","updated":"2017-05-16 09:56:09.000000000","message":"Done","commit_id":"16518c3b293561a2e9f4fa42a5247345ebd1e2b3"}],"cinder/interface/volume_snapshot_driver.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"21534068845c29e3b50dcef72229921feb89df04","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        current size, that means if the driver shrank"},{"line_number":64,"context_line":"        the volume during the process, it should extend the"},{"line_number":65,"context_line":"        volume internally."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        :param volume: The volume to be reverted."},{"line_number":68,"context_line":"        :param snapshot: The snapshot used for reverting."},{"line_number":69,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":20,"id":"5f201791_cc1361b8","line":66,"updated":"2017-06-21 00:56:09.000000000","message":"Missed \"context\" as param.","commit_id":"c09b29e406836fb4641814dee9f1136c0de76cc1"}],"cinder/objects/snapshot.py":[{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"8e68c44509ff1a47f9773ec2227eb959fca5d70f","unresolved":false,"context_lines":[{"line_number":125,"context_line":"                primitive[\u0027status\u0027] \u003d c_fields.SnapshotStatus.DELETING"},{"line_number":126,"context_line":"        if target_version \u003c (1, 4):"},{"line_number":127,"context_line":"            if primitive.get(\u0027status\u0027) \u003d\u003d c_fields.SnapshotStatus.BACKING_UP:"},{"line_number":128,"context_line":"                primitive[\u0027status\u0027] \u003d c_fields.SnapshotStatus.AVAILABLE"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    @classmethod"},{"line_number":131,"context_line":"    def _from_db_object(cls, context, snapshot, db_snapshot,"}],"source_content_type":"text/x-python","patch_set":10,"id":"df140735_95dcd7e4","line":128,"range":{"start_line":128,"start_character":62,"end_line":128,"end_character":71},"updated":"2017-06-01 23:51:51.000000000","message":"Based on Gorka\u0027s explanation, I think we need to do something similar to this to make RESTORING snapshots compatible for older versions.","commit_id":"64130f622059a360a50562c705c966f1c246f745"}],"cinder/tests/tempest/api/volume/test_volume_revert_to_snapshot.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"3f58ffe52b6e35ffd94cca3fd6ec15b817dbe93d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2016 Mirantis 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":8,"id":"1f013ff3_da241b10","line":1,"updated":"2017-05-16 04:04:15.000000000","message":"Mirantis?","commit_id":"16518c3b293561a2e9f4fa42a5247345ebd1e2b3"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"bb2737dd648dd4b8db8dc5fed9ded040a763f520","unresolved":false,"context_lines":[{"line_number":32,"context_line":"CONF.register_opt(snapshot_backup_opt, group\u003d\u0027volume-feature-enabled\u0027)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class VolumesBackupsTest(volume_base.BaseVolumeTest):"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    @classmethod"},{"line_number":38,"context_line":"    def skip_checks(cls):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f013ff3_57f58656","line":35,"updated":"2017-05-16 02:45:31.000000000","message":"Is this expected, to add new tests to VolumesBackupsTest?","commit_id":"16518c3b293561a2e9f4fa42a5247345ebd1e2b3"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"e781d251a3e94efaa9eb1073348c083799081f34","unresolved":false,"context_lines":[{"line_number":32,"context_line":"CONF.register_opt(snapshot_backup_opt, group\u003d\u0027volume-feature-enabled\u0027)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class VolumesBackupsTest(volume_base.BaseVolumeTest):"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    @classmethod"},{"line_number":38,"context_line":"    def skip_checks(cls):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f013ff3_936319dd","line":35,"in_reply_to":"1f013ff3_57f58656","updated":"2017-05-16 09:56:09.000000000","message":"Oh, silly mistake, this file is redundant, the tempest patch is here: https://review.openstack.org/#/c/463906/","commit_id":"16518c3b293561a2e9f4fa42a5247345ebd1e2b3"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"bb2737dd648dd4b8db8dc5fed9ded040a763f520","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    @testtools.skipUnless(CONF.volume_feature_enabled.snapshot_backup,"},{"line_number":44,"context_line":"                          \"Skip. Not implemented in Liberty.\")"},{"line_number":45,"context_line":"    @decorators.idempotent_id(\u0027885410c6-cd1d-452c-a409-7c32b7e0be15\u0027)"},{"line_number":46,"context_line":"    def test_volume_snapshot_backup(self):"},{"line_number":47,"context_line":"        \"\"\"Create backup from snapshot.\"\"\""},{"line_number":48,"context_line":"        volume \u003d self.create_volume()"},{"line_number":49,"context_line":"        # Create snapshot"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f013ff3_37eafa74","line":46,"updated":"2017-05-16 02:45:31.000000000","message":"This is exactly the same test as the one in cinder/tests/tempest/api/volume/test_volume_backup.py","commit_id":"16518c3b293561a2e9f4fa42a5247345ebd1e2b3"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"3f58ffe52b6e35ffd94cca3fd6ec15b817dbe93d","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        self.assertEqual(backup[\u0027id\u0027], restore[\u0027backup_id\u0027])"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    @decorators.idempotent_id(\u0027c810fe2c-cb40-43ab-96aa-471b74516a98\u0027)"},{"line_number":98,"context_line":"    def test_incremental_backup(self):"},{"line_number":99,"context_line":"        \"\"\"Test create incremental backup.\"\"\""},{"line_number":100,"context_line":"        # Create volume from image"},{"line_number":101,"context_line":"        volume \u003d self.create_volume(size\u003dCONF.volume.volume_size,"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f013ff3_ba76ef05","line":98,"updated":"2017-05-16 04:04:15.000000000","message":"Why is incremental backup test relevant to revert to snapshot?","commit_id":"16518c3b293561a2e9f4fa42a5247345ebd1e2b3"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"e781d251a3e94efaa9eb1073348c083799081f34","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        self.assertEqual(backup[\u0027id\u0027], restore[\u0027backup_id\u0027])"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    @decorators.idempotent_id(\u0027c810fe2c-cb40-43ab-96aa-471b74516a98\u0027)"},{"line_number":98,"context_line":"    def test_incremental_backup(self):"},{"line_number":99,"context_line":"        \"\"\"Test create incremental backup.\"\"\""},{"line_number":100,"context_line":"        # Create volume from image"},{"line_number":101,"context_line":"        volume \u003d self.create_volume(size\u003dCONF.volume.volume_size,"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f013ff3_137ee96a","line":98,"in_reply_to":"1f013ff3_ba76ef05","updated":"2017-05-16 09:56:09.000000000","message":"Oh, silly mistake, this file is redundant, the tempest patch is here: https://review.openstack.org/#/c/463906/","commit_id":"16518c3b293561a2e9f4fa42a5247345ebd1e2b3"}],"cinder/volume/api.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"3f58ffe52b6e35ffd94cca3fd6ec15b817dbe93d","unresolved":false,"context_lines":[{"line_number":360,"context_line":"        v_res \u003d volume.update_single_status_where("},{"line_number":361,"context_line":"            \u0027reverting\u0027, \u0027available\u0027)"},{"line_number":362,"context_line":"        if not v_res:"},{"line_number":363,"context_line":"            msg \u003d _(\"Can not rollback the volume %s with latest snapshot,\""},{"line_number":364,"context_line":"                    \" volume\u0027s status must be \u0027available\u0027.\") % volume.id"},{"line_number":365,"context_line":"            raise exception.InvalidVolume(reason\u003dmsg)"},{"line_number":366,"context_line":"        s_res \u003d snapshot.update_single_status_where("}],"source_content_type":"text/x-python","patch_set":8,"id":"1f013ff3_ba594f5b","line":363,"range":{"start_line":363,"start_character":72,"end_line":363,"end_character":73},"updated":"2017-05-16 04:04:15.000000000","message":"Use period here and start a new sentence next.","commit_id":"16518c3b293561a2e9f4fa42a5247345ebd1e2b3"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"e781d251a3e94efaa9eb1073348c083799081f34","unresolved":false,"context_lines":[{"line_number":360,"context_line":"        v_res \u003d volume.update_single_status_where("},{"line_number":361,"context_line":"            \u0027reverting\u0027, \u0027available\u0027)"},{"line_number":362,"context_line":"        if not v_res:"},{"line_number":363,"context_line":"            msg \u003d _(\"Can not rollback the volume %s with latest snapshot,\""},{"line_number":364,"context_line":"                    \" volume\u0027s status must be \u0027available\u0027.\") % volume.id"},{"line_number":365,"context_line":"            raise exception.InvalidVolume(reason\u003dmsg)"},{"line_number":366,"context_line":"        s_res \u003d snapshot.update_single_status_where("}],"source_content_type":"text/x-python","patch_set":8,"id":"1f013ff3_333325ae","line":363,"range":{"start_line":363,"start_character":72,"end_line":363,"end_character":73},"in_reply_to":"1f013ff3_ba594f5b","updated":"2017-05-16 09:56:09.000000000","message":"Done","commit_id":"16518c3b293561a2e9f4fa42a5247345ebd1e2b3"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"3f58ffe52b6e35ffd94cca3fd6ec15b817dbe93d","unresolved":false,"context_lines":[{"line_number":367,"context_line":"            fields.SnapshotStatus.RESTORING,"},{"line_number":368,"context_line":"            fields.SnapshotStatus.AVAILABLE)"},{"line_number":369,"context_line":"        if not s_res:"},{"line_number":370,"context_line":"            msg \u003d _(\"Can not rollback the volume %s with latest snapshot,\""},{"line_number":371,"context_line":"                    \" snapshot\u0027s status must be \u0027available\u0027\") % snapshot.id"},{"line_number":372,"context_line":"            raise exception.InvalidSnapshot(reason\u003dmsg)"},{"line_number":373,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1f013ff3_9a569329","line":370,"range":{"start_line":370,"start_character":72,"end_line":370,"end_character":73},"updated":"2017-05-16 04:04:15.000000000","message":"Same","commit_id":"16518c3b293561a2e9f4fa42a5247345ebd1e2b3"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"e781d251a3e94efaa9eb1073348c083799081f34","unresolved":false,"context_lines":[{"line_number":367,"context_line":"            fields.SnapshotStatus.RESTORING,"},{"line_number":368,"context_line":"            fields.SnapshotStatus.AVAILABLE)"},{"line_number":369,"context_line":"        if not s_res:"},{"line_number":370,"context_line":"            msg \u003d _(\"Can not rollback the volume %s with latest snapshot,\""},{"line_number":371,"context_line":"                    \" snapshot\u0027s status must be \u0027available\u0027\") % snapshot.id"},{"line_number":372,"context_line":"            raise exception.InvalidSnapshot(reason\u003dmsg)"},{"line_number":373,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1f013ff3_13282932","line":370,"range":{"start_line":370,"start_character":72,"end_line":370,"end_character":73},"in_reply_to":"1f013ff3_9a569329","updated":"2017-05-16 09:56:09.000000000","message":"Done","commit_id":"16518c3b293561a2e9f4fa42a5247345ebd1e2b3"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"8eca68113bf2c8239320302c9d7eeed7c6197a92","unresolved":false,"context_lines":[{"line_number":356,"context_line":"    @wrap_check_policy"},{"line_number":357,"context_line":"    def revert_to_snapshot(self, context, volume, snapshot):"},{"line_number":358,"context_line":"        \"\"\"revert a volume to a snapshot\"\"\""},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"        v_res \u003d volume.update_single_status_where("},{"line_number":361,"context_line":"            \u0027reverting\u0027, \u0027available\u0027)"},{"line_number":362,"context_line":"        if not v_res:"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_4cd49c20","line":359,"updated":"2017-06-13 21:44:20.000000000","message":"The spec says \"If the volume was extended after the snapshot, the request would be rejected\".  We should check the size here.","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"3bdc9f7bd0544d6051ef36c4c83e51f7bab05fa3","unresolved":false,"context_lines":[{"line_number":356,"context_line":"    @wrap_check_policy"},{"line_number":357,"context_line":"    def revert_to_snapshot(self, context, volume, snapshot):"},{"line_number":358,"context_line":"        \"\"\"revert a volume to a snapshot\"\"\""},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"        v_res \u003d volume.update_single_status_where("},{"line_number":361,"context_line":"            \u0027reverting\u0027, \u0027available\u0027)"},{"line_number":362,"context_line":"        if not v_res:"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_f3bb436f","line":359,"in_reply_to":"7f231b9d_4cd49c20","updated":"2017-06-14 06:50:03.000000000","message":"Thanks, I talked this with sean, as exteding\u0026reverting is one of the main user cases,in order to support this, instead of limit this case we changed the reverting behaviour that the reverted volume should keep the same size with that before (this is safe and can be done with a combination of reverting\u0026extending internally by driver.)","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"16e69b54cb9c0b80449a64600ddb3336d1132eda","unresolved":false,"context_lines":[{"line_number":375,"context_line":""},{"line_number":376,"context_line":"    def get_volume_latest_snapshot(self, context, volume):"},{"line_number":377,"context_line":"        \"\"\"Get volume\u0027s latest snapshot\"\"\""},{"line_number":378,"context_line":"        return self.db.snapshot_get_latest_for_volume(context, volume)"},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"    @wrap_check_policy"},{"line_number":381,"context_line":"    def delete(self, context, volume,"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f231b9d_26c4623f","line":378,"range":{"start_line":378,"start_character":8,"end_line":378,"end_character":70},"updated":"2017-06-18 17:59:23.000000000","message":"Aren\u0027t we trying to move away from accessing the DB like this?  In other words, should we be adding a get_latest_snapshot object method to the volume?  Maybe there\u0027s a reason not to do that, but seems like we shouldn\u0027t be introducing additional inconsistencies.","commit_id":"eed0d0dda5529b3a126a3c2e202facea64867835"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"c2055e1dc43b8edc5fa6fc270c40b00bdbfc57a9","unresolved":false,"context_lines":[{"line_number":375,"context_line":""},{"line_number":376,"context_line":"    def get_volume_latest_snapshot(self, context, volume):"},{"line_number":377,"context_line":"        \"\"\"Get volume\u0027s latest snapshot\"\"\""},{"line_number":378,"context_line":"        return self.db.snapshot_get_latest_for_volume(context, volume)"},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"    @wrap_check_policy"},{"line_number":381,"context_line":"    def delete(self, context, volume,"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f231b9d_a7f18c03","line":378,"range":{"start_line":378,"start_character":8,"end_line":378,"end_character":70},"in_reply_to":"7f231b9d_26c4623f","updated":"2017-06-19 06:41:07.000000000","message":"done","commit_id":"eed0d0dda5529b3a126a3c2e202facea64867835"}],"cinder/volume/driver.py":[{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"8e68c44509ff1a47f9773ec2227eb959fca5d70f","unresolved":false,"context_lines":[{"line_number":1212,"context_line":"                                  self.configuration.volume_dd_blocksize)"},{"line_number":1213,"context_line":"        except Exception:"},{"line_number":1214,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1215,"context_line":"                LOG.error(_(\"Failed to copy snapshot \""},{"line_number":1216,"context_line":"                            \"%(src)s to volume %(dest)s.\"),"},{"line_number":1217,"context_line":"                          {\u0027src\u0027: snapshot.id, \u0027dest\u0027: volume.id})"},{"line_number":1218,"context_line":"        finally:"}],"source_content_type":"text/x-python","patch_set":10,"id":"df140735_b5a11b49","line":1215,"range":{"start_line":1215,"start_character":26,"end_line":1215,"end_character":27},"updated":"2017-06-01 23:51:51.000000000","message":"Log message should not be translated.","commit_id":"64130f622059a360a50562c705c966f1c246f745"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"8e68c44509ff1a47f9773ec2227eb959fca5d70f","unresolved":false,"context_lines":[{"line_number":2103,"context_line":""},{"line_number":2104,"context_line":"        Note: the revert process should not change the volume\u0027s"},{"line_number":2105,"context_line":"        current size, that means if the driver shrank"},{"line_number":2106,"context_line":"        the volume during the process, it should extend the"},{"line_number":2107,"context_line":"        volume internally."},{"line_number":2108,"context_line":"        \"\"\""},{"line_number":2109,"context_line":"        msg \u003d _(\"Revert volume to snapshot not implemented.\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"df140735_d5b5af7f","line":2106,"updated":"2017-06-01 23:51:51.000000000","message":"Thanks for calling this out!","commit_id":"64130f622059a360a50562c705c966f1c246f745"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"871af6a3afb6c1d6741021c9fc0858750fbc9469","unresolved":false,"context_lines":[{"line_number":1195,"context_line":"                            \"%(src)s to volume %(dest)s.\"),"},{"line_number":1196,"context_line":"                          {\u0027src\u0027: snapshot.id, \u0027dest\u0027: volume.id})"},{"line_number":1197,"context_line":"        finally:"},{"line_number":1198,"context_line":"            self._detach_snapshot(context, snap_attach_info,"},{"line_number":1199,"context_line":"                                  snapshot, properties)"},{"line_number":1200,"context_line":"            self._detach_volume(context, vl_attach_info, volume, properties)"},{"line_number":1201,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"df140735_02ecc227","line":1198,"range":{"start_line":1198,"start_character":17,"end_line":1198,"end_character":33},"updated":"2017-06-05 12:52:01.000000000","message":"Hmm, this was just removed in another patch because it wasn\u0027t referred to anywhere.\n\nhttps://review.openstack.org/#/c/469499/\n\nDo we need to add that back in now?","commit_id":"4fc51e686968b3c98949a7a3d7641f81ea2dbccd"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"62857dc497ef103cd85e28100861f087614cdd06","unresolved":false,"context_lines":[{"line_number":1195,"context_line":"                            \"%(src)s to volume %(dest)s.\"),"},{"line_number":1196,"context_line":"                          {\u0027src\u0027: snapshot.id, \u0027dest\u0027: volume.id})"},{"line_number":1197,"context_line":"        finally:"},{"line_number":1198,"context_line":"            self._detach_snapshot(context, snap_attach_info,"},{"line_number":1199,"context_line":"                                  snapshot, properties)"},{"line_number":1200,"context_line":"            self._detach_volume(context, vl_attach_info, volume, properties)"},{"line_number":1201,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"df140735_15761a71","line":1198,"range":{"start_line":1198,"start_character":17,"end_line":1198,"end_character":33},"updated":"2017-06-06 12:51:39.000000000","message":"Still need to add this back in.","commit_id":"8be4008ddcd16599167c228ea32cb647ac41cbcc"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"8eca68113bf2c8239320302c9d7eeed7c6197a92","unresolved":false,"context_lines":[{"line_number":1208,"context_line":""},{"line_number":1209,"context_line":"        return (device_to_backup, is_snapshot)"},{"line_number":1210,"context_line":""},{"line_number":1211,"context_line":"    def copy_snapshot_to_volume(self, context, volume, snapshot):"},{"line_number":1212,"context_line":"        \"\"\"Copy data from snapshot to volume\"\"\""},{"line_number":1213,"context_line":""},{"line_number":1214,"context_line":"        LOG.debug(\u0027Copy data from snapshot %(snapshot)s \u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_4cea5c0f","line":1211,"updated":"2017-06-13 21:44:20.000000000","message":"See my comments in manager.py.  I think it\u0027s better to get rid of this code path and just use temp volume.","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"8eca68113bf2c8239320302c9d7eeed7c6197a92","unresolved":false,"context_lines":[{"line_number":2129,"context_line":"        \"\"\"Revert volume to snapshot."},{"line_number":2130,"context_line":""},{"line_number":2131,"context_line":"        Note: the revert process should not change the volume\u0027s"},{"line_number":2132,"context_line":"        current size, that means if the driver shrank"},{"line_number":2133,"context_line":"        the volume during the process, it should extend the"},{"line_number":2134,"context_line":"        volume internally."},{"line_number":2135,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_0c7104aa","line":2132,"range":{"start_line":2132,"start_character":47,"end_line":2132,"end_character":53},"updated":"2017-06-13 21:44:20.000000000","message":"I don\u0027t understand this paragraph.  You mean the driver shrank the volume in the middle of a revert or before the revert?  The spec says \"If the volume was extended after the snapshot, the request would be rejected\".  So if volume_size\u003esnapshot_size, API should reject the request and it won\u0027t get here.  Are you talking about the case where volume_size \u003c snapshot_size?  Cinder does not support shrink volume, so I don\u0027t know how we can get there.  Also I don\u0027t see that is handled in your code in the lvm driver or the generic method if volume_size is really \u003c snapshot_size.","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"}],"cinder/volume/drivers/lvm.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"8eca68113bf2c8239320302c9d7eeed7c6197a92","unresolved":false,"context_lines":[{"line_number":462,"context_line":"    def revert_to_snapshot(self, context, volume, snapshot):"},{"line_number":463,"context_line":"        \"\"\"Revert a volume to a snapshot\"\"\""},{"line_number":464,"context_line":""},{"line_number":465,"context_line":"        self.vg.revert(self._escape_snapshot(snapshot[\u0027name\u0027]))"},{"line_number":466,"context_line":"        self.vg.deactivate_lv(volume[\u0027name\u0027])"},{"line_number":467,"context_line":"        self.vg.activate_lv(volume[\u0027name\u0027])"},{"line_number":468,"context_line":"        # Recreate the snapshot that was destroyed by the revert"},{"line_number":469,"context_line":"        self.create_snapshot(snapshot)"},{"line_number":470,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_e9811a4c","line":467,"range":{"start_line":465,"start_character":1,"end_line":467,"end_character":43},"updated":"2017-06-13 21:44:20.000000000","message":"Please use object notation snapshot.name and volume.name when adding new code.","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"3bdc9f7bd0544d6051ef36c4c83e51f7bab05fa3","unresolved":false,"context_lines":[{"line_number":462,"context_line":"    def revert_to_snapshot(self, context, volume, snapshot):"},{"line_number":463,"context_line":"        \"\"\"Revert a volume to a snapshot\"\"\""},{"line_number":464,"context_line":""},{"line_number":465,"context_line":"        self.vg.revert(self._escape_snapshot(snapshot[\u0027name\u0027]))"},{"line_number":466,"context_line":"        self.vg.deactivate_lv(volume[\u0027name\u0027])"},{"line_number":467,"context_line":"        self.vg.activate_lv(volume[\u0027name\u0027])"},{"line_number":468,"context_line":"        # Recreate the snapshot that was destroyed by the revert"},{"line_number":469,"context_line":"        self.create_snapshot(snapshot)"},{"line_number":470,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_9381af92","line":467,"range":{"start_line":465,"start_character":1,"end_line":467,"end_character":43},"in_reply_to":"7f231b9d_e9811a4c","updated":"2017-06-14 06:50:03.000000000","message":"Done","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"db4fc44eddf867b14e82b601f9b5985eca39efe6","unresolved":false,"context_lines":[{"line_number":466,"context_line":"        self.vg.deactivate_lv(volume.name)"},{"line_number":467,"context_line":"        self.vg.activate_lv(volume.name)"},{"line_number":468,"context_line":"        # Recreate the snapshot that was destroyed by the revert"},{"line_number":469,"context_line":"        self.create_snapshot(snapshot)"},{"line_number":470,"context_line":""},{"line_number":471,"context_line":"    def local_path(self, volume, vg\u003dNone):"},{"line_number":472,"context_line":"        if vg is None:"}],"source_content_type":"text/x-python","patch_set":16,"id":"7f231b9d_81db797a","line":469,"updated":"2017-06-14 19:20:24.000000000","message":"According to the docstring in https://review.openstack.org/#/c/391736/16/cinder/volume/driver.py, this driver method should check whether the sizes of the volume and snapshot are different and whether extend volume is needed.","commit_id":"d16e4f27b5440872a139c3c9b5cf371146b1f453"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"91c4506c0ec5d21be2b9334d863ee814cd2df5fd","unresolved":false,"context_lines":[{"line_number":466,"context_line":"        self.vg.deactivate_lv(volume.name)"},{"line_number":467,"context_line":"        self.vg.activate_lv(volume.name)"},{"line_number":468,"context_line":"        # Recreate the snapshot that was destroyed by the revert"},{"line_number":469,"context_line":"        self.create_snapshot(snapshot)"},{"line_number":470,"context_line":""},{"line_number":471,"context_line":"    def local_path(self, volume, vg\u003dNone):"},{"line_number":472,"context_line":"        if vg is None:"}],"source_content_type":"text/x-python","patch_set":16,"id":"7f231b9d_c71a376d","line":469,"in_reply_to":"7f231b9d_81db797a","updated":"2017-06-19 14:18:28.000000000","message":"Doesn\u0027t look like you\u0027ve addressed this comment in patch set 18?","commit_id":"d16e4f27b5440872a139c3c9b5cf371146b1f453"}],"cinder/volume/manager.py":[{"author":{"_account_id":10439,"name":"Xi Yang","email":"yang.xi@99cloud.net","username":"phenom"},"change_message_id":"e4afaf88d8d77eea96a0c8f16c912ba812137bbf","unresolved":false,"context_lines":[{"line_number":897,"context_line":"        to snapshot feature:"},{"line_number":898,"context_line":"        1. create a temporary volume"},{"line_number":899,"context_line":"        2. mount two volumes to host"},{"line_number":900,"context_line":"        3. copy date from temporary volume to original volume"},{"line_number":901,"context_line":"        4. detach and destroy temporary volume"},{"line_number":902,"context_line":"        \"\"\""},{"line_number":903,"context_line":"        temp_vol \u003d None"}],"source_content_type":"text/x-python","patch_set":13,"id":"df140735_27ad59ea","line":900,"range":{"start_line":900,"start_character":16,"end_line":900,"end_character":20},"updated":"2017-06-07 02:27:55.000000000","message":"typo","commit_id":"8be4008ddcd16599167c228ea32cb647ac41cbcc"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"9c8440a6002092adbdf18c0fa531781446ec5b57","unresolved":false,"context_lines":[{"line_number":897,"context_line":"        to snapshot feature:"},{"line_number":898,"context_line":"        1. create a temporary volume"},{"line_number":899,"context_line":"        2. mount two volumes to host"},{"line_number":900,"context_line":"        3. copy date from temporary volume to original volume"},{"line_number":901,"context_line":"        4. detach and destroy temporary volume"},{"line_number":902,"context_line":"        \"\"\""},{"line_number":903,"context_line":"        temp_vol \u003d None"}],"source_content_type":"text/x-python","patch_set":13,"id":"df140735_e74d21c5","line":900,"range":{"start_line":900,"start_character":16,"end_line":900,"end_character":20},"in_reply_to":"df140735_27ad59ea","updated":"2017-06-07 02:37:28.000000000","message":"Done","commit_id":"8be4008ddcd16599167c228ea32cb647ac41cbcc"},{"author":{"_account_id":10439,"name":"Xi Yang","email":"yang.xi@99cloud.net","username":"phenom"},"change_message_id":"e4afaf88d8d77eea96a0c8f16c912ba812137bbf","unresolved":false,"context_lines":[{"line_number":961,"context_line":"        self.create_snapshot(context, snapshot)"},{"line_number":962,"context_line":"        return snapshot"},{"line_number":963,"context_line":""},{"line_number":964,"context_line":"    def revert_to_snapshot(self, context, volume, snapshot):"},{"line_number":965,"context_line":"        \"\"\"Revert a volume to a snapshot\"\"\""},{"line_number":966,"context_line":"        volume_id \u003d volume[\u0027id\u0027]"},{"line_number":967,"context_line":"        snapshot_id \u003d snapshot[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":13,"id":"df140735_67ca31a2","line":964,"updated":"2017-06-07 02:27:55.000000000","message":"Do we need a lock for this function?","commit_id":"8be4008ddcd16599167c228ea32cb647ac41cbcc"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"9c8440a6002092adbdf18c0fa531781446ec5b57","unresolved":false,"context_lines":[{"line_number":961,"context_line":"        self.create_snapshot(context, snapshot)"},{"line_number":962,"context_line":"        return snapshot"},{"line_number":963,"context_line":""},{"line_number":964,"context_line":"    def revert_to_snapshot(self, context, volume, snapshot):"},{"line_number":965,"context_line":"        \"\"\"Revert a volume to a snapshot\"\"\""},{"line_number":966,"context_line":"        volume_id \u003d volume[\u0027id\u0027]"},{"line_number":967,"context_line":"        snapshot_id \u003d snapshot[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":13,"id":"df140735_07d6d5c4","line":964,"in_reply_to":"df140735_67ca31a2","updated":"2017-06-07 02:37:28.000000000","message":"We use status to prevent the parallel operation on resource.","commit_id":"8be4008ddcd16599167c228ea32cb647ac41cbcc"},{"author":{"_account_id":10439,"name":"Xi Yang","email":"yang.xi@99cloud.net","username":"phenom"},"change_message_id":"e4afaf88d8d77eea96a0c8f16c912ba812137bbf","unresolved":false,"context_lines":[{"line_number":970,"context_line":"            LOG.info(\"Start to perform revert to snapshot process.\")"},{"line_number":971,"context_line":"            # Create a snapshot which can be used to restore the volume"},{"line_number":972,"context_line":"            # data by hand if revert process failed."},{"line_number":973,"context_line":"            backup_snapshot \u003d self._create_backup_snapshot(context, volume)"},{"line_number":974,"context_line":"            self._revert_to_snapshot(context, volume, snapshot)"},{"line_number":975,"context_line":"        except Exception as error:"},{"line_number":976,"context_line":"            with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":13,"id":"df140735_a7b609dc","line":973,"updated":"2017-06-07 02:27:55.000000000","message":"I think this backup snapshot is not necessary for some drivers. Why not put this logic into the driver implementation and let the driver to choose how to restore. Framework is better to be more generic..Just my opinion.","commit_id":"8be4008ddcd16599167c228ea32cb647ac41cbcc"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"9c8440a6002092adbdf18c0fa531781446ec5b57","unresolved":false,"context_lines":[{"line_number":970,"context_line":"            LOG.info(\"Start to perform revert to snapshot process.\")"},{"line_number":971,"context_line":"            # Create a snapshot which can be used to restore the volume"},{"line_number":972,"context_line":"            # data by hand if revert process failed."},{"line_number":973,"context_line":"            backup_snapshot \u003d self._create_backup_snapshot(context, volume)"},{"line_number":974,"context_line":"            self._revert_to_snapshot(context, volume, snapshot)"},{"line_number":975,"context_line":"        except Exception as error:"},{"line_number":976,"context_line":"            with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":13,"id":"df140735_679d9109","line":973,"in_reply_to":"df140735_a7b609dc","updated":"2017-06-07 02:37:28.000000000","message":"Maybe there are some cases that the driver can not handle, for example, service restart during process?","commit_id":"8be4008ddcd16599167c228ea32cb647ac41cbcc"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c1f6d1b2e9d45374378aeb2daaa3082a1f982ea9","unresolved":false,"context_lines":[{"line_number":871,"context_line":"            volume_ref.save()"},{"line_number":872,"context_line":""},{"line_number":873,"context_line":"    def _create_temp_volume_from_snapshot(self, context, volume, snapshot):"},{"line_number":874,"context_line":"        \"\"\"Create a temporary volume from snapshot\"\"\""},{"line_number":875,"context_line":""},{"line_number":876,"context_line":"        temp_vol \u003d {k: volume[k] for k in set(volume.keys()) -"},{"line_number":877,"context_line":"                    self._VOLUME_CLONE_SKIP_PROPERTIES}"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f231b9d_d583cf03","line":874,"updated":"2017-06-12 12:55:29.000000000","message":"Add period.","commit_id":"c0fe49a37ebdbbb3ca977a8fe619d1cccdce3ac5"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"516df1f2473baeeeba770f905038adb10cca439a","unresolved":false,"context_lines":[{"line_number":871,"context_line":"            volume_ref.save()"},{"line_number":872,"context_line":""},{"line_number":873,"context_line":"    def _create_temp_volume_from_snapshot(self, context, volume, snapshot):"},{"line_number":874,"context_line":"        \"\"\"Create a temporary volume from snapshot\"\"\""},{"line_number":875,"context_line":""},{"line_number":876,"context_line":"        temp_vol \u003d {k: volume[k] for k in set(volume.keys()) -"},{"line_number":877,"context_line":"                    self._VOLUME_CLONE_SKIP_PROPERTIES}"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f231b9d_2dcbc172","line":874,"in_reply_to":"7f231b9d_d583cf03","updated":"2017-06-13 02:40:37.000000000","message":"Done","commit_id":"c0fe49a37ebdbbb3ca977a8fe619d1cccdce3ac5"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c1f6d1b2e9d45374378aeb2daaa3082a1f982ea9","unresolved":false,"context_lines":[{"line_number":884,"context_line":""},{"line_number":885,"context_line":"        snapshot_volume \u003d objects.Volume(context\u003dcontext, **temp_vol)"},{"line_number":886,"context_line":"        snapshot_volume.create()"},{"line_number":887,"context_line":"        self.driver.create_volume_from_snapshot(snapshot_volume,"},{"line_number":888,"context_line":"                                                snapshot)"},{"line_number":889,"context_line":"        snapshot_volume.update({\u0027status\u0027: \u0027available\u0027})"},{"line_number":890,"context_line":"        snapshot_volume.save()"},{"line_number":891,"context_line":"        return snapshot_volume"},{"line_number":892,"context_line":""},{"line_number":893,"context_line":"    def _revert_to_snapshot_generic(self, ctxt, volume, snapshot):"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f231b9d_356a0380","line":890,"range":{"start_line":887,"start_character":0,"end_line":890,"end_character":30},"updated":"2017-06-12 12:55:29.000000000","message":"Should get the return dict from the driver and update db accordingly.","commit_id":"c0fe49a37ebdbbb3ca977a8fe619d1cccdce3ac5"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"516df1f2473baeeeba770f905038adb10cca439a","unresolved":false,"context_lines":[{"line_number":884,"context_line":""},{"line_number":885,"context_line":"        snapshot_volume \u003d objects.Volume(context\u003dcontext, **temp_vol)"},{"line_number":886,"context_line":"        snapshot_volume.create()"},{"line_number":887,"context_line":"        self.driver.create_volume_from_snapshot(snapshot_volume,"},{"line_number":888,"context_line":"                                                snapshot)"},{"line_number":889,"context_line":"        snapshot_volume.update({\u0027status\u0027: \u0027available\u0027})"},{"line_number":890,"context_line":"        snapshot_volume.save()"},{"line_number":891,"context_line":"        return snapshot_volume"},{"line_number":892,"context_line":""},{"line_number":893,"context_line":"    def _revert_to_snapshot_generic(self, ctxt, volume, snapshot):"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f231b9d_edd5c9e6","line":890,"range":{"start_line":887,"start_character":0,"end_line":890,"end_character":30},"in_reply_to":"7f231b9d_356a0380","updated":"2017-06-13 02:40:37.000000000","message":"Done","commit_id":"c0fe49a37ebdbbb3ca977a8fe619d1cccdce3ac5"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c1f6d1b2e9d45374378aeb2daaa3082a1f982ea9","unresolved":false,"context_lines":[{"line_number":891,"context_line":"        return snapshot_volume"},{"line_number":892,"context_line":""},{"line_number":893,"context_line":"    def _revert_to_snapshot_generic(self, ctxt, volume, snapshot):"},{"line_number":894,"context_line":"        \"\"\"Generic way to revert volume to a snapshot"},{"line_number":895,"context_line":""},{"line_number":896,"context_line":"        the framework will use the generic way to implement the revert"},{"line_number":897,"context_line":"        to snapshot feature:"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f231b9d_b588531f","line":894,"updated":"2017-06-12 12:55:29.000000000","message":"Add period.","commit_id":"c0fe49a37ebdbbb3ca977a8fe619d1cccdce3ac5"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"516df1f2473baeeeba770f905038adb10cca439a","unresolved":false,"context_lines":[{"line_number":891,"context_line":"        return snapshot_volume"},{"line_number":892,"context_line":""},{"line_number":893,"context_line":"    def _revert_to_snapshot_generic(self, ctxt, volume, snapshot):"},{"line_number":894,"context_line":"        \"\"\"Generic way to revert volume to a snapshot"},{"line_number":895,"context_line":""},{"line_number":896,"context_line":"        the framework will use the generic way to implement the revert"},{"line_number":897,"context_line":"        to snapshot feature:"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f231b9d_cd068d87","line":894,"in_reply_to":"7f231b9d_b588531f","updated":"2017-06-13 02:40:37.000000000","message":"Done","commit_id":"c0fe49a37ebdbbb3ca977a8fe619d1cccdce3ac5"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c1f6d1b2e9d45374378aeb2daaa3082a1f982ea9","unresolved":false,"context_lines":[{"line_number":913,"context_line":"        except Exception:"},{"line_number":914,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":915,"context_line":"                LOG.exception("},{"line_number":916,"context_line":"                    _(\"Failed to use snapshot %(snapshot)s to create \""},{"line_number":917,"context_line":"                      \"a temporary volume and copy data to volume \""},{"line_number":918,"context_line":"                      \" %(volume)s.\"),"},{"line_number":919,"context_line":"                    {\u0027snapshot\u0027: snapshot[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f231b9d_b5ba93db","line":916,"range":{"start_line":916,"start_character":20,"end_line":916,"end_character":22},"updated":"2017-06-12 12:55:29.000000000","message":"This should not use _ as it only goes to the logs.","commit_id":"c0fe49a37ebdbbb3ca977a8fe619d1cccdce3ac5"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"516df1f2473baeeeba770f905038adb10cca439a","unresolved":false,"context_lines":[{"line_number":913,"context_line":"        except Exception:"},{"line_number":914,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":915,"context_line":"                LOG.exception("},{"line_number":916,"context_line":"                    _(\"Failed to use snapshot %(snapshot)s to create \""},{"line_number":917,"context_line":"                      \"a temporary volume and copy data to volume \""},{"line_number":918,"context_line":"                      \" %(volume)s.\"),"},{"line_number":919,"context_line":"                    {\u0027snapshot\u0027: snapshot[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f231b9d_ad091196","line":916,"range":{"start_line":916,"start_character":20,"end_line":916,"end_character":22},"in_reply_to":"7f231b9d_b5ba93db","updated":"2017-06-13 02:40:37.000000000","message":"Done","commit_id":"c0fe49a37ebdbbb3ca977a8fe619d1cccdce3ac5"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c1f6d1b2e9d45374378aeb2daaa3082a1f982ea9","unresolved":false,"context_lines":[{"line_number":924,"context_line":"                    temp_vol.destroy()"},{"line_number":925,"context_line":""},{"line_number":926,"context_line":"    def _revert_to_snapshot(self, context, volume, snapshot):"},{"line_number":927,"context_line":"        \"\"\"Use driver or generic method to rollback volume\"\"\""},{"line_number":928,"context_line":""},{"line_number":929,"context_line":"        self._notify_about_volume_usage(context, volume, \"revert.start\")"},{"line_number":930,"context_line":"        self._notify_about_snapshot_usage(context, snapshot, \"revert.start\")"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f231b9d_35744335","line":927,"updated":"2017-06-12 12:55:29.000000000","message":"Add period.","commit_id":"c0fe49a37ebdbbb3ca977a8fe619d1cccdce3ac5"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"516df1f2473baeeeba770f905038adb10cca439a","unresolved":false,"context_lines":[{"line_number":924,"context_line":"                    temp_vol.destroy()"},{"line_number":925,"context_line":""},{"line_number":926,"context_line":"    def _revert_to_snapshot(self, context, volume, snapshot):"},{"line_number":927,"context_line":"        \"\"\"Use driver or generic method to rollback volume\"\"\""},{"line_number":928,"context_line":""},{"line_number":929,"context_line":"        self._notify_about_volume_usage(context, volume, \"revert.start\")"},{"line_number":930,"context_line":"        self._notify_about_snapshot_usage(context, snapshot, \"revert.start\")"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f231b9d_8d009569","line":927,"in_reply_to":"7f231b9d_35744335","updated":"2017-06-13 02:40:37.000000000","message":"Done","commit_id":"c0fe49a37ebdbbb3ca977a8fe619d1cccdce3ac5"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c1f6d1b2e9d45374378aeb2daaa3082a1f982ea9","unresolved":false,"context_lines":[{"line_number":931,"context_line":"        try:"},{"line_number":932,"context_line":"            self.driver.revert_to_snapshot(context, volume, snapshot)"},{"line_number":933,"context_line":"        except (NotImplementedError, AttributeError):"},{"line_number":934,"context_line":"            LOG.info(\"Driver\u0027s \u0027revert_to_snapshot\u0027 is not found, \""},{"line_number":935,"context_line":"                     \"try to use copy-snapshot-to-volume method.\")"},{"line_number":936,"context_line":"            try:"},{"line_number":937,"context_line":"                self.driver.copy_snapshot_to_volume(context, volume, snapshot)"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f231b9d_b59df35a","line":934,"range":{"start_line":934,"start_character":64,"end_line":934,"end_character":65},"updated":"2017-06-12 12:55:29.000000000","message":"Change to period.","commit_id":"c0fe49a37ebdbbb3ca977a8fe619d1cccdce3ac5"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"516df1f2473baeeeba770f905038adb10cca439a","unresolved":false,"context_lines":[{"line_number":931,"context_line":"        try:"},{"line_number":932,"context_line":"            self.driver.revert_to_snapshot(context, volume, snapshot)"},{"line_number":933,"context_line":"        except (NotImplementedError, AttributeError):"},{"line_number":934,"context_line":"            LOG.info(\"Driver\u0027s \u0027revert_to_snapshot\u0027 is not found, \""},{"line_number":935,"context_line":"                     \"try to use copy-snapshot-to-volume method.\")"},{"line_number":936,"context_line":"            try:"},{"line_number":937,"context_line":"                self.driver.copy_snapshot_to_volume(context, volume, snapshot)"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f231b9d_2df50184","line":934,"range":{"start_line":934,"start_character":64,"end_line":934,"end_character":65},"in_reply_to":"7f231b9d_b59df35a","updated":"2017-06-13 02:40:37.000000000","message":"Done","commit_id":"c0fe49a37ebdbbb3ca977a8fe619d1cccdce3ac5"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c1f6d1b2e9d45374378aeb2daaa3082a1f982ea9","unresolved":false,"context_lines":[{"line_number":932,"context_line":"            self.driver.revert_to_snapshot(context, volume, snapshot)"},{"line_number":933,"context_line":"        except (NotImplementedError, AttributeError):"},{"line_number":934,"context_line":"            LOG.info(\"Driver\u0027s \u0027revert_to_snapshot\u0027 is not found, \""},{"line_number":935,"context_line":"                     \"try to use copy-snapshot-to-volume method.\")"},{"line_number":936,"context_line":"            try:"},{"line_number":937,"context_line":"                self.driver.copy_snapshot_to_volume(context, volume, snapshot)"},{"line_number":938,"context_line":"            except Exception as error:"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f231b9d_95a2f799","line":935,"range":{"start_line":935,"start_character":22,"end_line":935,"end_character":23},"updated":"2017-06-12 12:55:29.000000000","message":"Capital T","commit_id":"c0fe49a37ebdbbb3ca977a8fe619d1cccdce3ac5"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"516df1f2473baeeeba770f905038adb10cca439a","unresolved":false,"context_lines":[{"line_number":932,"context_line":"            self.driver.revert_to_snapshot(context, volume, snapshot)"},{"line_number":933,"context_line":"        except (NotImplementedError, AttributeError):"},{"line_number":934,"context_line":"            LOG.info(\"Driver\u0027s \u0027revert_to_snapshot\u0027 is not found, \""},{"line_number":935,"context_line":"                     \"try to use copy-snapshot-to-volume method.\")"},{"line_number":936,"context_line":"            try:"},{"line_number":937,"context_line":"                self.driver.copy_snapshot_to_volume(context, volume, snapshot)"},{"line_number":938,"context_line":"            except Exception as error:"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f231b9d_0df48585","line":935,"range":{"start_line":935,"start_character":22,"end_line":935,"end_character":23},"in_reply_to":"7f231b9d_95a2f799","updated":"2017-06-13 02:40:37.000000000","message":"Done","commit_id":"c0fe49a37ebdbbb3ca977a8fe619d1cccdce3ac5"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c1f6d1b2e9d45374378aeb2daaa3082a1f982ea9","unresolved":false,"context_lines":[{"line_number":934,"context_line":"            LOG.info(\"Driver\u0027s \u0027revert_to_snapshot\u0027 is not found, \""},{"line_number":935,"context_line":"                     \"try to use copy-snapshot-to-volume method.\")"},{"line_number":936,"context_line":"            try:"},{"line_number":937,"context_line":"                self.driver.copy_snapshot_to_volume(context, volume, snapshot)"},{"line_number":938,"context_line":"            except Exception as error:"},{"line_number":939,"context_line":"                LOG.warning(\"Driver\u0027s \u0027copy_snapshot_to_volume\u0027 \""},{"line_number":940,"context_line":"                            \"method failed with error %s try to use generic \""}],"source_content_type":"text/x-python","patch_set":14,"id":"7f231b9d_15ddc713","line":937,"range":{"start_line":937,"start_character":16,"end_line":937,"end_character":78},"updated":"2017-06-12 12:55:29.000000000","message":"This should get return dict from the driver and update db entry if needed.","commit_id":"c0fe49a37ebdbbb3ca977a8fe619d1cccdce3ac5"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"516df1f2473baeeeba770f905038adb10cca439a","unresolved":false,"context_lines":[{"line_number":934,"context_line":"            LOG.info(\"Driver\u0027s \u0027revert_to_snapshot\u0027 is not found, \""},{"line_number":935,"context_line":"                     \"try to use copy-snapshot-to-volume method.\")"},{"line_number":936,"context_line":"            try:"},{"line_number":937,"context_line":"                self.driver.copy_snapshot_to_volume(context, volume, snapshot)"},{"line_number":938,"context_line":"            except Exception as error:"},{"line_number":939,"context_line":"                LOG.warning(\"Driver\u0027s \u0027copy_snapshot_to_volume\u0027 \""},{"line_number":940,"context_line":"                            \"method failed with error %s try to use generic \""}],"source_content_type":"text/x-python","patch_set":14,"id":"7f231b9d_4d56fd5e","line":937,"range":{"start_line":937,"start_character":16,"end_line":937,"end_character":78},"in_reply_to":"7f231b9d_15ddc713","updated":"2017-06-13 02:40:37.000000000","message":"The method exists in the base driver and doesn\u0027t return anything, so I don\u0027t need to update the model? [1]\n\n[1] https://review.openstack.org/#/c/391736/14/cinder/volume/driver.py","commit_id":"c0fe49a37ebdbbb3ca977a8fe619d1cccdce3ac5"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c1f6d1b2e9d45374378aeb2daaa3082a1f982ea9","unresolved":false,"context_lines":[{"line_number":938,"context_line":"            except Exception as error:"},{"line_number":939,"context_line":"                LOG.warning(\"Driver\u0027s \u0027copy_snapshot_to_volume\u0027 \""},{"line_number":940,"context_line":"                            \"method failed with error %s try to use generic \""},{"line_number":941,"context_line":"                            \"method.\", {\u0027err\u0027: six.text_type(error)})"},{"line_number":942,"context_line":"                self._revert_to_snapshot_generic(context, volume, snapshot)"},{"line_number":943,"context_line":"        self._notify_about_volume_usage(context, volume, \"revert.end\")"},{"line_number":944,"context_line":"        self._notify_about_snapshot_usage(context, snapshot, \"revert.end\")"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f231b9d_1506e787","line":941,"range":{"start_line":941,"start_character":47,"end_line":941,"end_character":60},"updated":"2017-06-12 12:55:29.000000000","message":"six.text_type is not needed here as the Logger will take care of it.","commit_id":"c0fe49a37ebdbbb3ca977a8fe619d1cccdce3ac5"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"516df1f2473baeeeba770f905038adb10cca439a","unresolved":false,"context_lines":[{"line_number":938,"context_line":"            except Exception as error:"},{"line_number":939,"context_line":"                LOG.warning(\"Driver\u0027s \u0027copy_snapshot_to_volume\u0027 \""},{"line_number":940,"context_line":"                            \"method failed with error %s try to use generic \""},{"line_number":941,"context_line":"                            \"method.\", {\u0027err\u0027: six.text_type(error)})"},{"line_number":942,"context_line":"                self._revert_to_snapshot_generic(context, volume, snapshot)"},{"line_number":943,"context_line":"        self._notify_about_volume_usage(context, volume, \"revert.end\")"},{"line_number":944,"context_line":"        self._notify_about_snapshot_usage(context, snapshot, \"revert.end\")"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f231b9d_edeee9b2","line":941,"range":{"start_line":941,"start_character":47,"end_line":941,"end_character":60},"in_reply_to":"7f231b9d_1506e787","updated":"2017-06-13 02:40:37.000000000","message":"Done","commit_id":"c0fe49a37ebdbbb3ca977a8fe619d1cccdce3ac5"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c1f6d1b2e9d45374378aeb2daaa3082a1f982ea9","unresolved":false,"context_lines":[{"line_number":958,"context_line":"        }"},{"line_number":959,"context_line":"        snapshot \u003d objects.Snapshot(context\u003dcontext, **kwargs)"},{"line_number":960,"context_line":"        snapshot.create()"},{"line_number":961,"context_line":"        self.create_snapshot(context, snapshot)"},{"line_number":962,"context_line":"        return snapshot"},{"line_number":963,"context_line":""},{"line_number":964,"context_line":"    def revert_to_snapshot(self, context, volume, snapshot):"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f231b9d_75c2bb87","line":961,"range":{"start_line":961,"start_character":8,"end_line":961,"end_character":47},"updated":"2017-06-12 12:55:29.000000000","message":"This should get the return dict from the driver and update db accordingly.","commit_id":"c0fe49a37ebdbbb3ca977a8fe619d1cccdce3ac5"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"516df1f2473baeeeba770f905038adb10cca439a","unresolved":false,"context_lines":[{"line_number":958,"context_line":"        }"},{"line_number":959,"context_line":"        snapshot \u003d objects.Snapshot(context\u003dcontext, **kwargs)"},{"line_number":960,"context_line":"        snapshot.create()"},{"line_number":961,"context_line":"        self.create_snapshot(context, snapshot)"},{"line_number":962,"context_line":"        return snapshot"},{"line_number":963,"context_line":""},{"line_number":964,"context_line":"    def revert_to_snapshot(self, context, volume, snapshot):"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f231b9d_8d0e558b","line":961,"range":{"start_line":961,"start_character":8,"end_line":961,"end_character":47},"in_reply_to":"7f231b9d_75c2bb87","updated":"2017-06-13 02:40:37.000000000","message":"It\u0027s not a driver method here :)","commit_id":"c0fe49a37ebdbbb3ca977a8fe619d1cccdce3ac5"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c1f6d1b2e9d45374378aeb2daaa3082a1f982ea9","unresolved":false,"context_lines":[{"line_number":963,"context_line":""},{"line_number":964,"context_line":"    def revert_to_snapshot(self, context, volume, snapshot):"},{"line_number":965,"context_line":"        \"\"\"Revert a volume to a snapshot\"\"\""},{"line_number":966,"context_line":"        volume_id \u003d volume[\u0027id\u0027]"},{"line_number":967,"context_line":"        snapshot_id \u003d snapshot[\u0027id\u0027]"},{"line_number":968,"context_line":"        backup_snapshot \u003d None"},{"line_number":969,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f231b9d_953e7727","line":966,"range":{"start_line":966,"start_character":20,"end_line":966,"end_character":32},"updated":"2017-06-12 12:55:29.000000000","message":"Use volume.id as volume is object.","commit_id":"c0fe49a37ebdbbb3ca977a8fe619d1cccdce3ac5"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"516df1f2473baeeeba770f905038adb10cca439a","unresolved":false,"context_lines":[{"line_number":963,"context_line":""},{"line_number":964,"context_line":"    def revert_to_snapshot(self, context, volume, snapshot):"},{"line_number":965,"context_line":"        \"\"\"Revert a volume to a snapshot\"\"\""},{"line_number":966,"context_line":"        volume_id \u003d volume[\u0027id\u0027]"},{"line_number":967,"context_line":"        snapshot_id \u003d snapshot[\u0027id\u0027]"},{"line_number":968,"context_line":"        backup_snapshot \u003d None"},{"line_number":969,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f231b9d_2d3aa133","line":966,"range":{"start_line":966,"start_character":20,"end_line":966,"end_character":32},"in_reply_to":"7f231b9d_953e7727","updated":"2017-06-13 02:40:37.000000000","message":"both volume.id and volume[\u0027id\u0027] is suitable here, but the latter is easier to write an unit testcases, what\u0027s your point?","commit_id":"c0fe49a37ebdbbb3ca977a8fe619d1cccdce3ac5"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c1f6d1b2e9d45374378aeb2daaa3082a1f982ea9","unresolved":false,"context_lines":[{"line_number":964,"context_line":"    def revert_to_snapshot(self, context, volume, snapshot):"},{"line_number":965,"context_line":"        \"\"\"Revert a volume to a snapshot\"\"\""},{"line_number":966,"context_line":"        volume_id \u003d volume[\u0027id\u0027]"},{"line_number":967,"context_line":"        snapshot_id \u003d snapshot[\u0027id\u0027]"},{"line_number":968,"context_line":"        backup_snapshot \u003d None"},{"line_number":969,"context_line":"        try:"},{"line_number":970,"context_line":"            LOG.info(\"Start to perform revert to snapshot process.\")"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f231b9d_354563b4","line":967,"range":{"start_line":967,"start_character":22,"end_line":967,"end_character":36},"updated":"2017-06-12 12:55:29.000000000","message":"snapshot.id","commit_id":"c0fe49a37ebdbbb3ca977a8fe619d1cccdce3ac5"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c1f6d1b2e9d45374378aeb2daaa3082a1f982ea9","unresolved":false,"context_lines":[{"line_number":981,"context_line":"                msg \u003d _(\u0027Volume %(v_id)s revert to \u0027"},{"line_number":982,"context_line":"                        \u0027snapshot %(s_id)s failed with %(error)s.\u0027)"},{"line_number":983,"context_line":"                msg_args \u003d {\u0027v_id\u0027: volume_id,"},{"line_number":984,"context_line":"                            \u0027s_id\u0027: snapshot[\u0027id\u0027],"},{"line_number":985,"context_line":"                            \u0027error\u0027: six.text_type(error)}"},{"line_number":986,"context_line":"                v_res \u003d volume.update_single_status_where("},{"line_number":987,"context_line":"                    \u0027error\u0027,"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f231b9d_b51293b0","line":984,"range":{"start_line":984,"start_character":36,"end_line":984,"end_character":50},"updated":"2017-06-12 12:55:29.000000000","message":"snapshot_id","commit_id":"c0fe49a37ebdbbb3ca977a8fe619d1cccdce3ac5"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"8eca68113bf2c8239320302c9d7eeed7c6197a92","unresolved":false,"context_lines":[{"line_number":870,"context_line":"            volume_ref.status \u003d status"},{"line_number":871,"context_line":"            volume_ref.save()"},{"line_number":872,"context_line":""},{"line_number":873,"context_line":"    def _create_temp_volume_from_snapshot(self, context, volume, snapshot):"},{"line_number":874,"context_line":"        \"\"\"Create a temporary volume from snapshot.\"\"\""},{"line_number":875,"context_line":""},{"line_number":876,"context_line":"        temp_vol \u003d {k: volume[k] for k in set(volume.keys()) -"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_71005602","line":873,"range":{"start_line":873,"start_character":8,"end_line":873,"end_character":41},"updated":"2017-06-13 21:44:20.000000000","message":"Can you call the _create_temp_volume_from_snapshot in driver.py?\n\nhttps://github.com/openstack/cinder/blob/master/cinder/volume/driver.py#L1235\n\nYou need to modify it a little as volume is created differently in the two places.","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"3bdc9f7bd0544d6051ef36c4c83e51f7bab05fa3","unresolved":false,"context_lines":[{"line_number":870,"context_line":"            volume_ref.status \u003d status"},{"line_number":871,"context_line":"            volume_ref.save()"},{"line_number":872,"context_line":""},{"line_number":873,"context_line":"    def _create_temp_volume_from_snapshot(self, context, volume, snapshot):"},{"line_number":874,"context_line":"        \"\"\"Create a temporary volume from snapshot.\"\"\""},{"line_number":875,"context_line":""},{"line_number":876,"context_line":"        temp_vol \u003d {k: volume[k] for k in set(volume.keys()) -"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_90c1a283","line":873,"range":{"start_line":873,"start_character":8,"end_line":873,"end_character":41},"in_reply_to":"7f231b9d_71005602","updated":"2017-06-14 06:50:03.000000000","message":"Done","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"8eca68113bf2c8239320302c9d7eeed7c6197a92","unresolved":false,"context_lines":[{"line_number":880,"context_line":"        temp_vol[\u0027status\u0027] \u003d \u0027creating\u0027"},{"line_number":881,"context_line":"        temp_vol[\u0027size\u0027] \u003d volume[\u0027size\u0027]"},{"line_number":882,"context_line":"        temp_vol[\u0027display_name\u0027] \u003d \u0027temp-snapshot-%s\u0027 % snapshot[\u0027id\u0027]"},{"line_number":883,"context_line":"        LOG.debug(\u0027Creating snapshot volume entry: %s.\u0027, temp_vol)"},{"line_number":884,"context_line":""},{"line_number":885,"context_line":"        snapshot_volume \u003d objects.Volume(context\u003dcontext, **temp_vol)"},{"line_number":886,"context_line":"        snapshot_volume.create()"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_56179b52","line":883,"range":{"start_line":883,"start_character":28,"end_line":883,"end_character":49},"updated":"2017-06-13 21:44:20.000000000","message":"temporary volume from snapshot","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"8eca68113bf2c8239320302c9d7eeed7c6197a92","unresolved":false,"context_lines":[{"line_number":899,"context_line":""},{"line_number":900,"context_line":"        the framework will use the generic way to implement the revert"},{"line_number":901,"context_line":"        to snapshot feature:"},{"line_number":902,"context_line":"        1. create a temporary volume"},{"line_number":903,"context_line":"        2. mount two volumes to host"},{"line_number":904,"context_line":"        3. copy data from temporary volume to original volume"},{"line_number":905,"context_line":"        4. detach and destroy temporary volume"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_3171beaa","line":902,"updated":"2017-06-13 21:44:20.000000000","message":"create a temporary volume from snapshot","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"3bdc9f7bd0544d6051ef36c4c83e51f7bab05fa3","unresolved":false,"context_lines":[{"line_number":899,"context_line":""},{"line_number":900,"context_line":"        the framework will use the generic way to implement the revert"},{"line_number":901,"context_line":"        to snapshot feature:"},{"line_number":902,"context_line":"        1. create a temporary volume"},{"line_number":903,"context_line":"        2. mount two volumes to host"},{"line_number":904,"context_line":"        3. copy data from temporary volume to original volume"},{"line_number":905,"context_line":"        4. detach and destroy temporary volume"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_7355f31c","line":902,"in_reply_to":"7f231b9d_3171beaa","updated":"2017-06-14 06:50:03.000000000","message":"Done","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"8eca68113bf2c8239320302c9d7eeed7c6197a92","unresolved":false,"context_lines":[{"line_number":908,"context_line":""},{"line_number":909,"context_line":"        try:"},{"line_number":910,"context_line":"            ctxt \u003d context.get_internal_tenant_context() or ctxt"},{"line_number":911,"context_line":"            temp_vol \u003d self._create_temp_volume_from_snapshot(ctxt,"},{"line_number":912,"context_line":"                                                              volume,"},{"line_number":913,"context_line":"                                                              snapshot)"},{"line_number":914,"context_line":"            self._copy_volume_data(ctxt, temp_vol, volume)"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_714e1670","line":911,"range":{"start_line":911,"start_character":23,"end_line":911,"end_character":61},"updated":"2017-06-13 21:44:20.000000000","message":"Can you call the function of the same name in driver.py?\n\nhttps://github.com/openstack/cinder/blob/master/cinder/volume/driver.py#L1235","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"3bdc9f7bd0544d6051ef36c4c83e51f7bab05fa3","unresolved":false,"context_lines":[{"line_number":908,"context_line":""},{"line_number":909,"context_line":"        try:"},{"line_number":910,"context_line":"            ctxt \u003d context.get_internal_tenant_context() or ctxt"},{"line_number":911,"context_line":"            temp_vol \u003d self._create_temp_volume_from_snapshot(ctxt,"},{"line_number":912,"context_line":"                                                              volume,"},{"line_number":913,"context_line":"                                                              snapshot)"},{"line_number":914,"context_line":"            self._copy_volume_data(ctxt, temp_vol, volume)"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_50bb0a0d","line":911,"range":{"start_line":911,"start_character":23,"end_line":911,"end_character":61},"in_reply_to":"7f231b9d_714e1670","updated":"2017-06-14 06:50:03.000000000","message":"Done","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"8eca68113bf2c8239320302c9d7eeed7c6197a92","unresolved":false,"context_lines":[{"line_number":920,"context_line":"                    (\"Failed to use snapshot %(snapshot)s to create \""},{"line_number":921,"context_line":"                     \"a temporary volume and copy data to volume \""},{"line_number":922,"context_line":"                     \" %(volume)s.\"),"},{"line_number":923,"context_line":"                    {\u0027snapshot\u0027: snapshot[\u0027id\u0027],"},{"line_number":924,"context_line":"                     \u0027volume\u0027: volume[\u0027id\u0027]},"},{"line_number":925,"context_line":"                    resource\u003dsnapshot)"},{"line_number":926,"context_line":"                if temp_vol and temp_vol[\u0027status\u0027] \u003d\u003d \u0027available\u0027:"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_51ed5a23","line":923,"range":{"start_line":923,"start_character":33,"end_line":923,"end_character":47},"updated":"2017-06-13 21:44:20.000000000","message":"snapshot.id","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"3bdc9f7bd0544d6051ef36c4c83e51f7bab05fa3","unresolved":false,"context_lines":[{"line_number":920,"context_line":"                    (\"Failed to use snapshot %(snapshot)s to create \""},{"line_number":921,"context_line":"                     \"a temporary volume and copy data to volume \""},{"line_number":922,"context_line":"                     \" %(volume)s.\"),"},{"line_number":923,"context_line":"                    {\u0027snapshot\u0027: snapshot[\u0027id\u0027],"},{"line_number":924,"context_line":"                     \u0027volume\u0027: volume[\u0027id\u0027]},"},{"line_number":925,"context_line":"                    resource\u003dsnapshot)"},{"line_number":926,"context_line":"                if temp_vol and temp_vol[\u0027status\u0027] \u003d\u003d \u0027available\u0027:"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_133c7fe0","line":923,"range":{"start_line":923,"start_character":33,"end_line":923,"end_character":47},"in_reply_to":"7f231b9d_51ed5a23","updated":"2017-06-14 06:50:03.000000000","message":"Done","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"8eca68113bf2c8239320302c9d7eeed7c6197a92","unresolved":false,"context_lines":[{"line_number":921,"context_line":"                     \"a temporary volume and copy data to volume \""},{"line_number":922,"context_line":"                     \" %(volume)s.\"),"},{"line_number":923,"context_line":"                    {\u0027snapshot\u0027: snapshot[\u0027id\u0027],"},{"line_number":924,"context_line":"                     \u0027volume\u0027: volume[\u0027id\u0027]},"},{"line_number":925,"context_line":"                    resource\u003dsnapshot)"},{"line_number":926,"context_line":"                if temp_vol and temp_vol[\u0027status\u0027] \u003d\u003d \u0027available\u0027:"},{"line_number":927,"context_line":"                    self.driver.delete_volume(temp_vol)"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_f1dd8670","line":924,"range":{"start_line":924,"start_character":30,"end_line":924,"end_character":43},"updated":"2017-06-13 21:44:20.000000000","message":"volume.id","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"3bdc9f7bd0544d6051ef36c4c83e51f7bab05fa3","unresolved":false,"context_lines":[{"line_number":921,"context_line":"                     \"a temporary volume and copy data to volume \""},{"line_number":922,"context_line":"                     \" %(volume)s.\"),"},{"line_number":923,"context_line":"                    {\u0027snapshot\u0027: snapshot[\u0027id\u0027],"},{"line_number":924,"context_line":"                     \u0027volume\u0027: volume[\u0027id\u0027]},"},{"line_number":925,"context_line":"                    resource\u003dsnapshot)"},{"line_number":926,"context_line":"                if temp_vol and temp_vol[\u0027status\u0027] \u003d\u003d \u0027available\u0027:"},{"line_number":927,"context_line":"                    self.driver.delete_volume(temp_vol)"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_d325e7c3","line":924,"range":{"start_line":924,"start_character":30,"end_line":924,"end_character":43},"in_reply_to":"7f231b9d_f1dd8670","updated":"2017-06-14 06:50:03.000000000","message":"Done","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"8eca68113bf2c8239320302c9d7eeed7c6197a92","unresolved":false,"context_lines":[{"line_number":923,"context_line":"                    {\u0027snapshot\u0027: snapshot[\u0027id\u0027],"},{"line_number":924,"context_line":"                     \u0027volume\u0027: volume[\u0027id\u0027]},"},{"line_number":925,"context_line":"                    resource\u003dsnapshot)"},{"line_number":926,"context_line":"                if temp_vol and temp_vol[\u0027status\u0027] \u003d\u003d \u0027available\u0027:"},{"line_number":927,"context_line":"                    self.driver.delete_volume(temp_vol)"},{"line_number":928,"context_line":"                    temp_vol.destroy()"},{"line_number":929,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_91e2d22e","line":926,"range":{"start_line":926,"start_character":32,"end_line":926,"end_character":50},"updated":"2017-06-13 21:44:20.000000000","message":"temp_vol.status","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"3bdc9f7bd0544d6051ef36c4c83e51f7bab05fa3","unresolved":false,"context_lines":[{"line_number":923,"context_line":"                    {\u0027snapshot\u0027: snapshot[\u0027id\u0027],"},{"line_number":924,"context_line":"                     \u0027volume\u0027: volume[\u0027id\u0027]},"},{"line_number":925,"context_line":"                    resource\u003dsnapshot)"},{"line_number":926,"context_line":"                if temp_vol and temp_vol[\u0027status\u0027] \u003d\u003d \u0027available\u0027:"},{"line_number":927,"context_line":"                    self.driver.delete_volume(temp_vol)"},{"line_number":928,"context_line":"                    temp_vol.destroy()"},{"line_number":929,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_932f6fa0","line":926,"range":{"start_line":926,"start_character":32,"end_line":926,"end_character":50},"in_reply_to":"7f231b9d_91e2d22e","updated":"2017-06-14 06:50:03.000000000","message":"Done","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"8eca68113bf2c8239320302c9d7eeed7c6197a92","unresolved":false,"context_lines":[{"line_number":938,"context_line":"            LOG.info(\"Driver\u0027s \u0027revert_to_snapshot\u0027 is not found. \""},{"line_number":939,"context_line":"                     \"Try to use copy-snapshot-to-volume method.\")"},{"line_number":940,"context_line":"            try:"},{"line_number":941,"context_line":"                self.driver.copy_snapshot_to_volume(context, volume, snapshot)"},{"line_number":942,"context_line":"            except Exception as error:"},{"line_number":943,"context_line":"                LOG.warning(\"Driver\u0027s \u0027copy_snapshot_to_volume\u0027 \""},{"line_number":944,"context_line":"                            \"method failed with error %s try to use generic \""}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_a909e231","line":941,"range":{"start_line":941,"start_character":16,"end_line":941,"end_character":78},"updated":"2017-06-13 21:44:20.000000000","message":"After looking at this, I now think it\u0027s better to remove this step from this patch.  I know I suggested to use attach snapshot if the driver supports it, but now it is creating too many code paths.  Ideally if this is added back in the future, I\u0027d like to see the _copy_volume_data refactored so that it handles both snapshot and volume just like in the backup manager so we don\u0027t have to do copy_snapshot_to_volume in driver.py and do _copy_volume_data in manager.py.\n\nI think revert to snapshot is not an operation that happens very often, so using attach snapshot for performance gain won\u0027t has a big impact.\n\nIn summary, I think this patch will be much readable if you get rid of the copy_snapshot_to_volume code patch and just use _revert_to_snapshot_generic.\n\nIf in the future you want to make an improvement, that\u0027s fine to do in a separate patch.","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"3bdc9f7bd0544d6051ef36c4c83e51f7bab05fa3","unresolved":false,"context_lines":[{"line_number":938,"context_line":"            LOG.info(\"Driver\u0027s \u0027revert_to_snapshot\u0027 is not found. \""},{"line_number":939,"context_line":"                     \"Try to use copy-snapshot-to-volume method.\")"},{"line_number":940,"context_line":"            try:"},{"line_number":941,"context_line":"                self.driver.copy_snapshot_to_volume(context, volume, snapshot)"},{"line_number":942,"context_line":"            except Exception as error:"},{"line_number":943,"context_line":"                LOG.warning(\"Driver\u0027s \u0027copy_snapshot_to_volume\u0027 \""},{"line_number":944,"context_line":"                            \"method failed with error %s try to use generic \""}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_b3094b32","line":941,"range":{"start_line":941,"start_character":16,"end_line":941,"end_character":78},"in_reply_to":"7f231b9d_a909e231","updated":"2017-06-14 06:50:03.000000000","message":"Agreed!","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"8eca68113bf2c8239320302c9d7eeed7c6197a92","unresolved":false,"context_lines":[{"line_number":949,"context_line":""},{"line_number":950,"context_line":"    def _create_backup_snapshot(self, context, volume):"},{"line_number":951,"context_line":"        kwargs \u003d {"},{"line_number":952,"context_line":"            \u0027volume_id\u0027: volume[\u0027id\u0027],"},{"line_number":953,"context_line":"            \u0027user_id\u0027: context.user_id,"},{"line_number":954,"context_line":"            \u0027project_id\u0027: context.project_id,"},{"line_number":955,"context_line":"            \u0027status\u0027: fields.SnapshotStatus.CREATING,"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_d7adda31","line":952,"range":{"start_line":952,"start_character":25,"end_line":952,"end_character":37},"updated":"2017-06-13 21:44:20.000000000","message":"volume.id","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"3bdc9f7bd0544d6051ef36c4c83e51f7bab05fa3","unresolved":false,"context_lines":[{"line_number":949,"context_line":""},{"line_number":950,"context_line":"    def _create_backup_snapshot(self, context, volume):"},{"line_number":951,"context_line":"        kwargs \u003d {"},{"line_number":952,"context_line":"            \u0027volume_id\u0027: volume[\u0027id\u0027],"},{"line_number":953,"context_line":"            \u0027user_id\u0027: context.user_id,"},{"line_number":954,"context_line":"            \u0027project_id\u0027: context.project_id,"},{"line_number":955,"context_line":"            \u0027status\u0027: fields.SnapshotStatus.CREATING,"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_2e7a7087","line":952,"range":{"start_line":952,"start_character":25,"end_line":952,"end_character":37},"in_reply_to":"7f231b9d_d7adda31","updated":"2017-06-14 06:50:03.000000000","message":"Done","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"8eca68113bf2c8239320302c9d7eeed7c6197a92","unresolved":false,"context_lines":[{"line_number":954,"context_line":"            \u0027project_id\u0027: context.project_id,"},{"line_number":955,"context_line":"            \u0027status\u0027: fields.SnapshotStatus.CREATING,"},{"line_number":956,"context_line":"            \u0027progress\u0027: \u00270%\u0027,"},{"line_number":957,"context_line":"            \u0027volume_size\u0027: volume[\u0027size\u0027],"},{"line_number":958,"context_line":"            \u0027display_name\u0027: \u0027volume %s backup snapshot\u0027 % volume[\u0027id\u0027],"},{"line_number":959,"context_line":"            \u0027volume_type_id\u0027: volume[\u0027volume_type_id\u0027],"},{"line_number":960,"context_line":"            \u0027encryption_key_id\u0027: volume[\u0027encryption_key_id\u0027],"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_97a76250","line":957,"range":{"start_line":957,"start_character":27,"end_line":957,"end_character":41},"updated":"2017-06-13 21:44:20.000000000","message":"volume.size","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"3bdc9f7bd0544d6051ef36c4c83e51f7bab05fa3","unresolved":false,"context_lines":[{"line_number":954,"context_line":"            \u0027project_id\u0027: context.project_id,"},{"line_number":955,"context_line":"            \u0027status\u0027: fields.SnapshotStatus.CREATING,"},{"line_number":956,"context_line":"            \u0027progress\u0027: \u00270%\u0027,"},{"line_number":957,"context_line":"            \u0027volume_size\u0027: volume[\u0027size\u0027],"},{"line_number":958,"context_line":"            \u0027display_name\u0027: \u0027volume %s backup snapshot\u0027 % volume[\u0027id\u0027],"},{"line_number":959,"context_line":"            \u0027volume_type_id\u0027: volume[\u0027volume_type_id\u0027],"},{"line_number":960,"context_line":"            \u0027encryption_key_id\u0027: volume[\u0027encryption_key_id\u0027],"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_4e77eca1","line":957,"range":{"start_line":957,"start_character":27,"end_line":957,"end_character":41},"in_reply_to":"7f231b9d_97a76250","updated":"2017-06-14 06:50:03.000000000","message":"Done","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"8eca68113bf2c8239320302c9d7eeed7c6197a92","unresolved":false,"context_lines":[{"line_number":955,"context_line":"            \u0027status\u0027: fields.SnapshotStatus.CREATING,"},{"line_number":956,"context_line":"            \u0027progress\u0027: \u00270%\u0027,"},{"line_number":957,"context_line":"            \u0027volume_size\u0027: volume[\u0027size\u0027],"},{"line_number":958,"context_line":"            \u0027display_name\u0027: \u0027volume %s backup snapshot\u0027 % volume[\u0027id\u0027],"},{"line_number":959,"context_line":"            \u0027volume_type_id\u0027: volume[\u0027volume_type_id\u0027],"},{"line_number":960,"context_line":"            \u0027encryption_key_id\u0027: volume[\u0027encryption_key_id\u0027],"},{"line_number":961,"context_line":"            \u0027metadata\u0027: {}"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_7764c622","line":958,"range":{"start_line":958,"start_character":58,"end_line":958,"end_character":70},"updated":"2017-06-13 21:44:20.000000000","message":"volume.id\n\nAdd \"revert \" in front of \"volume\" to highlight this is for revert and not for the backup service.","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"3bdc9f7bd0544d6051ef36c4c83e51f7bab05fa3","unresolved":false,"context_lines":[{"line_number":955,"context_line":"            \u0027status\u0027: fields.SnapshotStatus.CREATING,"},{"line_number":956,"context_line":"            \u0027progress\u0027: \u00270%\u0027,"},{"line_number":957,"context_line":"            \u0027volume_size\u0027: volume[\u0027size\u0027],"},{"line_number":958,"context_line":"            \u0027display_name\u0027: \u0027volume %s backup snapshot\u0027 % volume[\u0027id\u0027],"},{"line_number":959,"context_line":"            \u0027volume_type_id\u0027: volume[\u0027volume_type_id\u0027],"},{"line_number":960,"context_line":"            \u0027encryption_key_id\u0027: volume[\u0027encryption_key_id\u0027],"},{"line_number":961,"context_line":"            \u0027metadata\u0027: {}"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_6e462852","line":958,"range":{"start_line":958,"start_character":58,"end_line":958,"end_character":70},"in_reply_to":"7f231b9d_7764c622","updated":"2017-06-14 06:50:03.000000000","message":"Done","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"8eca68113bf2c8239320302c9d7eeed7c6197a92","unresolved":false,"context_lines":[{"line_number":956,"context_line":"            \u0027progress\u0027: \u00270%\u0027,"},{"line_number":957,"context_line":"            \u0027volume_size\u0027: volume[\u0027size\u0027],"},{"line_number":958,"context_line":"            \u0027display_name\u0027: \u0027volume %s backup snapshot\u0027 % volume[\u0027id\u0027],"},{"line_number":959,"context_line":"            \u0027volume_type_id\u0027: volume[\u0027volume_type_id\u0027],"},{"line_number":960,"context_line":"            \u0027encryption_key_id\u0027: volume[\u0027encryption_key_id\u0027],"},{"line_number":961,"context_line":"            \u0027metadata\u0027: {}"},{"line_number":962,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_57678a26","line":959,"range":{"start_line":959,"start_character":30,"end_line":959,"end_character":54},"updated":"2017-06-13 21:44:20.000000000","message":"volume.volume_type_id","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"3bdc9f7bd0544d6051ef36c4c83e51f7bab05fa3","unresolved":false,"context_lines":[{"line_number":956,"context_line":"            \u0027progress\u0027: \u00270%\u0027,"},{"line_number":957,"context_line":"            \u0027volume_size\u0027: volume[\u0027size\u0027],"},{"line_number":958,"context_line":"            \u0027display_name\u0027: \u0027volume %s backup snapshot\u0027 % volume[\u0027id\u0027],"},{"line_number":959,"context_line":"            \u0027volume_type_id\u0027: volume[\u0027volume_type_id\u0027],"},{"line_number":960,"context_line":"            \u0027encryption_key_id\u0027: volume[\u0027encryption_key_id\u0027],"},{"line_number":961,"context_line":"            \u0027metadata\u0027: {}"},{"line_number":962,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_0e71f4a9","line":959,"range":{"start_line":959,"start_character":30,"end_line":959,"end_character":54},"in_reply_to":"7f231b9d_57678a26","updated":"2017-06-14 06:50:03.000000000","message":"Done","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"8eca68113bf2c8239320302c9d7eeed7c6197a92","unresolved":false,"context_lines":[{"line_number":957,"context_line":"            \u0027volume_size\u0027: volume[\u0027size\u0027],"},{"line_number":958,"context_line":"            \u0027display_name\u0027: \u0027volume %s backup snapshot\u0027 % volume[\u0027id\u0027],"},{"line_number":959,"context_line":"            \u0027volume_type_id\u0027: volume[\u0027volume_type_id\u0027],"},{"line_number":960,"context_line":"            \u0027encryption_key_id\u0027: volume[\u0027encryption_key_id\u0027],"},{"line_number":961,"context_line":"            \u0027metadata\u0027: {}"},{"line_number":962,"context_line":"        }"},{"line_number":963,"context_line":"        snapshot \u003d objects.Snapshot(context\u003dcontext, **kwargs)"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_177112e1","line":960,"range":{"start_line":960,"start_character":33,"end_line":960,"end_character":60},"updated":"2017-06-13 21:44:20.000000000","message":"volume.encryption_key_id","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"3bdc9f7bd0544d6051ef36c4c83e51f7bab05fa3","unresolved":false,"context_lines":[{"line_number":957,"context_line":"            \u0027volume_size\u0027: volume[\u0027size\u0027],"},{"line_number":958,"context_line":"            \u0027display_name\u0027: \u0027volume %s backup snapshot\u0027 % volume[\u0027id\u0027],"},{"line_number":959,"context_line":"            \u0027volume_type_id\u0027: volume[\u0027volume_type_id\u0027],"},{"line_number":960,"context_line":"            \u0027encryption_key_id\u0027: volume[\u0027encryption_key_id\u0027],"},{"line_number":961,"context_line":"            \u0027metadata\u0027: {}"},{"line_number":962,"context_line":"        }"},{"line_number":963,"context_line":"        snapshot \u003d objects.Snapshot(context\u003dcontext, **kwargs)"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_ee7358b0","line":960,"range":{"start_line":960,"start_character":33,"end_line":960,"end_character":60},"in_reply_to":"7f231b9d_177112e1","updated":"2017-06-14 06:50:03.000000000","message":"Done","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"8eca68113bf2c8239320302c9d7eeed7c6197a92","unresolved":false,"context_lines":[{"line_number":958,"context_line":"            \u0027display_name\u0027: \u0027volume %s backup snapshot\u0027 % volume[\u0027id\u0027],"},{"line_number":959,"context_line":"            \u0027volume_type_id\u0027: volume[\u0027volume_type_id\u0027],"},{"line_number":960,"context_line":"            \u0027encryption_key_id\u0027: volume[\u0027encryption_key_id\u0027],"},{"line_number":961,"context_line":"            \u0027metadata\u0027: {}"},{"line_number":962,"context_line":"        }"},{"line_number":963,"context_line":"        snapshot \u003d objects.Snapshot(context\u003dcontext, **kwargs)"},{"line_number":964,"context_line":"        snapshot.create()"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_b75a5e4c","line":961,"updated":"2017-06-13 21:44:20.000000000","message":"Since this backup snapshot is very special, I think we should add a description to clarify that this is created before revert the volume to snapshot and can be used to restore the volume manually.  If this snapshot is not deleted, that means the revert failed.","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"3bdc9f7bd0544d6051ef36c4c83e51f7bab05fa3","unresolved":false,"context_lines":[{"line_number":958,"context_line":"            \u0027display_name\u0027: \u0027volume %s backup snapshot\u0027 % volume[\u0027id\u0027],"},{"line_number":959,"context_line":"            \u0027volume_type_id\u0027: volume[\u0027volume_type_id\u0027],"},{"line_number":960,"context_line":"            \u0027encryption_key_id\u0027: volume[\u0027encryption_key_id\u0027],"},{"line_number":961,"context_line":"            \u0027metadata\u0027: {}"},{"line_number":962,"context_line":"        }"},{"line_number":963,"context_line":"        snapshot \u003d objects.Snapshot(context\u003dcontext, **kwargs)"},{"line_number":964,"context_line":"        snapshot.create()"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_6ee2a831","line":961,"in_reply_to":"7f231b9d_b75a5e4c","updated":"2017-06-14 06:50:03.000000000","message":"Good suggestion!","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"8eca68113bf2c8239320302c9d7eeed7c6197a92","unresolved":false,"context_lines":[{"line_number":965,"context_line":"        self.create_snapshot(context, snapshot)"},{"line_number":966,"context_line":"        return snapshot"},{"line_number":967,"context_line":""},{"line_number":968,"context_line":"    def revert_to_snapshot(self, context, volume, snapshot):"},{"line_number":969,"context_line":"        \"\"\"Revert a volume to a snapshot\"\"\""},{"line_number":970,"context_line":"        volume_id \u003d volume[\u0027id\u0027]"},{"line_number":971,"context_line":"        snapshot_id \u003d snapshot[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_2c88406f","line":968,"updated":"2017-06-13 21:44:20.000000000","message":"How do you handle size difference between volume and snapshot?","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"3bdc9f7bd0544d6051ef36c4c83e51f7bab05fa3","unresolved":false,"context_lines":[{"line_number":965,"context_line":"        self.create_snapshot(context, snapshot)"},{"line_number":966,"context_line":"        return snapshot"},{"line_number":967,"context_line":""},{"line_number":968,"context_line":"    def revert_to_snapshot(self, context, volume, snapshot):"},{"line_number":969,"context_line":"        \"\"\"Revert a volume to a snapshot\"\"\""},{"line_number":970,"context_line":"        volume_id \u003d volume[\u0027id\u0027]"},{"line_number":971,"context_line":"        snapshot_id \u003d snapshot[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_8ec0647d","line":968,"in_reply_to":"7f231b9d_2c88406f","updated":"2017-06-14 06:50:03.000000000","message":"The only possible case is reverting a volume which has been extended after taken snapshot. So I added some notes at the base revert_to_snapshot function for driver that they should keep current size even revering a volume which has been extended.","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"8eca68113bf2c8239320302c9d7eeed7c6197a92","unresolved":false,"context_lines":[{"line_number":966,"context_line":"        return snapshot"},{"line_number":967,"context_line":""},{"line_number":968,"context_line":"    def revert_to_snapshot(self, context, volume, snapshot):"},{"line_number":969,"context_line":"        \"\"\"Revert a volume to a snapshot\"\"\""},{"line_number":970,"context_line":"        volume_id \u003d volume[\u0027id\u0027]"},{"line_number":971,"context_line":"        snapshot_id \u003d snapshot[\u0027id\u0027]"},{"line_number":972,"context_line":"        backup_snapshot \u003d None"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_297a7287","line":969,"updated":"2017-06-13 21:44:20.000000000","message":"I think it will be helpful to describe all the steps needed for revert_to_snapshot like what you have on line 900.","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"3bdc9f7bd0544d6051ef36c4c83e51f7bab05fa3","unresolved":false,"context_lines":[{"line_number":966,"context_line":"        return snapshot"},{"line_number":967,"context_line":""},{"line_number":968,"context_line":"    def revert_to_snapshot(self, context, volume, snapshot):"},{"line_number":969,"context_line":"        \"\"\"Revert a volume to a snapshot\"\"\""},{"line_number":970,"context_line":"        volume_id \u003d volume[\u0027id\u0027]"},{"line_number":971,"context_line":"        snapshot_id \u003d snapshot[\u0027id\u0027]"},{"line_number":972,"context_line":"        backup_snapshot \u003d None"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_eee0f8fc","line":969,"in_reply_to":"7f231b9d_297a7287","updated":"2017-06-14 06:50:03.000000000","message":"Done","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"8eca68113bf2c8239320302c9d7eeed7c6197a92","unresolved":false,"context_lines":[{"line_number":967,"context_line":""},{"line_number":968,"context_line":"    def revert_to_snapshot(self, context, volume, snapshot):"},{"line_number":969,"context_line":"        \"\"\"Revert a volume to a snapshot\"\"\""},{"line_number":970,"context_line":"        volume_id \u003d volume[\u0027id\u0027]"},{"line_number":971,"context_line":"        snapshot_id \u003d snapshot[\u0027id\u0027]"},{"line_number":972,"context_line":"        backup_snapshot \u003d None"},{"line_number":973,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_767a8cf1","line":970,"range":{"start_line":970,"start_character":20,"end_line":970,"end_character":32},"updated":"2017-06-13 21:44:20.000000000","message":"volume.id","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"3bdc9f7bd0544d6051ef36c4c83e51f7bab05fa3","unresolved":false,"context_lines":[{"line_number":967,"context_line":""},{"line_number":968,"context_line":"    def revert_to_snapshot(self, context, volume, snapshot):"},{"line_number":969,"context_line":"        \"\"\"Revert a volume to a snapshot\"\"\""},{"line_number":970,"context_line":"        volume_id \u003d volume[\u0027id\u0027]"},{"line_number":971,"context_line":"        snapshot_id \u003d snapshot[\u0027id\u0027]"},{"line_number":972,"context_line":"        backup_snapshot \u003d None"},{"line_number":973,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_6eece8f2","line":970,"range":{"start_line":970,"start_character":20,"end_line":970,"end_character":32},"in_reply_to":"7f231b9d_767a8cf1","updated":"2017-06-14 06:50:03.000000000","message":"Done","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"8eca68113bf2c8239320302c9d7eeed7c6197a92","unresolved":false,"context_lines":[{"line_number":968,"context_line":"    def revert_to_snapshot(self, context, volume, snapshot):"},{"line_number":969,"context_line":"        \"\"\"Revert a volume to a snapshot\"\"\""},{"line_number":970,"context_line":"        volume_id \u003d volume[\u0027id\u0027]"},{"line_number":971,"context_line":"        snapshot_id \u003d snapshot[\u0027id\u0027]"},{"line_number":972,"context_line":"        backup_snapshot \u003d None"},{"line_number":973,"context_line":"        try:"},{"line_number":974,"context_line":"            LOG.info(\"Start to perform revert to snapshot process.\")"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_368414d4","line":971,"range":{"start_line":971,"start_character":22,"end_line":971,"end_character":36},"updated":"2017-06-13 21:44:20.000000000","message":"snapshot.id","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"3bdc9f7bd0544d6051ef36c4c83e51f7bab05fa3","unresolved":false,"context_lines":[{"line_number":968,"context_line":"    def revert_to_snapshot(self, context, volume, snapshot):"},{"line_number":969,"context_line":"        \"\"\"Revert a volume to a snapshot\"\"\""},{"line_number":970,"context_line":"        volume_id \u003d volume[\u0027id\u0027]"},{"line_number":971,"context_line":"        snapshot_id \u003d snapshot[\u0027id\u0027]"},{"line_number":972,"context_line":"        backup_snapshot \u003d None"},{"line_number":973,"context_line":"        try:"},{"line_number":974,"context_line":"            LOG.info(\"Start to perform revert to snapshot process.\")"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_8ef184d0","line":971,"range":{"start_line":971,"start_character":22,"end_line":971,"end_character":36},"in_reply_to":"7f231b9d_368414d4","updated":"2017-06-14 06:50:03.000000000","message":"Done","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"8eca68113bf2c8239320302c9d7eeed7c6197a92","unresolved":false,"context_lines":[{"line_number":985,"context_line":"                msg \u003d _(\u0027Volume %(v_id)s revert to \u0027"},{"line_number":986,"context_line":"                        \u0027snapshot %(s_id)s failed with %(error)s.\u0027)"},{"line_number":987,"context_line":"                msg_args \u003d {\u0027v_id\u0027: volume_id,"},{"line_number":988,"context_line":"                            \u0027s_id\u0027: snapshot[\u0027id\u0027],"},{"line_number":989,"context_line":"                            \u0027error\u0027: six.text_type(error)}"},{"line_number":990,"context_line":"                v_res \u003d volume.update_single_status_where("},{"line_number":991,"context_line":"                    \u0027error\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_8908662c","line":988,"range":{"start_line":988,"start_character":36,"end_line":988,"end_character":50},"updated":"2017-06-13 21:44:20.000000000","message":"You saved this on line 971 in snapshot_id.  Please use that.","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"3bdc9f7bd0544d6051ef36c4c83e51f7bab05fa3","unresolved":false,"context_lines":[{"line_number":985,"context_line":"                msg \u003d _(\u0027Volume %(v_id)s revert to \u0027"},{"line_number":986,"context_line":"                        \u0027snapshot %(s_id)s failed with %(error)s.\u0027)"},{"line_number":987,"context_line":"                msg_args \u003d {\u0027v_id\u0027: volume_id,"},{"line_number":988,"context_line":"                            \u0027s_id\u0027: snapshot[\u0027id\u0027],"},{"line_number":989,"context_line":"                            \u0027error\u0027: six.text_type(error)}"},{"line_number":990,"context_line":"                v_res \u003d volume.update_single_status_where("},{"line_number":991,"context_line":"                    \u0027error\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_aee20000","line":988,"range":{"start_line":988,"start_character":36,"end_line":988,"end_character":50},"in_reply_to":"7f231b9d_8908662c","updated":"2017-06-14 06:50:03.000000000","message":"Done","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"8eca68113bf2c8239320302c9d7eeed7c6197a92","unresolved":false,"context_lines":[{"line_number":1032,"context_line":"                    \"snapshot %{id}s status to %{status}, \""},{"line_number":1033,"context_line":"                    \"please manually reset it.\") % msg_args"},{"line_number":1034,"context_line":"            raise exception.BadResetResourceStatus(message\u003dmsg)"},{"line_number":1035,"context_line":"        if backup_snapshot is not None:"},{"line_number":1036,"context_line":"            self.delete_snapshot(context,"},{"line_number":1037,"context_line":"                                 backup_snapshot, handle_quota\u003dFalse)"},{"line_number":1038,"context_line":"        msg \u003d _(\u0027Volume %(v_id)s reverted to snapshot %(snap_id)s \u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_77f1666b","line":1035,"range":{"start_line":1035,"start_character":8,"end_line":1035,"end_character":38},"updated":"2017-06-13 21:44:20.000000000","message":"if backup_snapshot:","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"3bdc9f7bd0544d6051ef36c4c83e51f7bab05fa3","unresolved":false,"context_lines":[{"line_number":1032,"context_line":"                    \"snapshot %{id}s status to %{status}, \""},{"line_number":1033,"context_line":"                    \"please manually reset it.\") % msg_args"},{"line_number":1034,"context_line":"            raise exception.BadResetResourceStatus(message\u003dmsg)"},{"line_number":1035,"context_line":"        if backup_snapshot is not None:"},{"line_number":1036,"context_line":"            self.delete_snapshot(context,"},{"line_number":1037,"context_line":"                                 backup_snapshot, handle_quota\u003dFalse)"},{"line_number":1038,"context_line":"        msg \u003d _(\u0027Volume %(v_id)s reverted to snapshot %(snap_id)s \u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_cee77c12","line":1035,"range":{"start_line":1035,"start_character":8,"end_line":1035,"end_character":38},"in_reply_to":"7f231b9d_77f1666b","updated":"2017-06-14 06:50:03.000000000","message":"Done","commit_id":"18751dae338d77c757cd152bedae7b66834d315c"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"48889876a65777f1e15b720454ecdcae888674c5","unresolved":false,"context_lines":[{"line_number":870,"context_line":"            volume_ref.status \u003d status"},{"line_number":871,"context_line":"            volume_ref.save()"},{"line_number":872,"context_line":""},{"line_number":873,"context_line":"    def _create_temp_volume_from_snapshot(self, context, volume, snapshot):"},{"line_number":874,"context_line":"        \"\"\"Create a temporary volume from snapshot.\"\"\""},{"line_number":875,"context_line":""},{"line_number":876,"context_line":"        temp_vol \u003d {k: volume[k] for k in set(volume.keys()) -"}],"source_content_type":"text/x-python","patch_set":16,"id":"7f231b9d_417b21bd","line":873,"range":{"start_line":873,"start_character":8,"end_line":873,"end_character":41},"updated":"2017-06-14 19:52:00.000000000","message":"This function is no longer used and should be removed.","commit_id":"d16e4f27b5440872a139c3c9b5cf371146b1f453"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"2e91bc9c2540835185e75b17f95aa7dc5df53492","unresolved":false,"context_lines":[{"line_number":870,"context_line":"            volume_ref.status \u003d status"},{"line_number":871,"context_line":"            volume_ref.save()"},{"line_number":872,"context_line":""},{"line_number":873,"context_line":"    def _create_temp_volume_from_snapshot(self, context, volume, snapshot):"},{"line_number":874,"context_line":"        \"\"\"Create a temporary volume from snapshot.\"\"\""},{"line_number":875,"context_line":""},{"line_number":876,"context_line":"        temp_vol \u003d {k: volume[k] for k in set(volume.keys()) -"}],"source_content_type":"text/x-python","patch_set":16,"id":"7f231b9d_b500c502","line":873,"range":{"start_line":873,"start_character":8,"end_line":873,"end_character":41},"in_reply_to":"7f231b9d_417b21bd","updated":"2017-06-16 02:20:15.000000000","message":"Done","commit_id":"d16e4f27b5440872a139c3c9b5cf371146b1f453"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"48889876a65777f1e15b720454ecdcae888674c5","unresolved":false,"context_lines":[{"line_number":910,"context_line":"            v_options \u003d {\u0027display_name\u0027: \u0027[revert] temporary volume created \u0027"},{"line_number":911,"context_line":"                                         \u0027from snapshot %s\u0027 % snapshot.id}"},{"line_number":912,"context_line":"            ctxt \u003d context.get_internal_tenant_context() or ctxt"},{"line_number":913,"context_line":"            temp_vol \u003d self.driver.create_volume_from_snapshot("},{"line_number":914,"context_line":"                ctxt, volume, snapshot, volume_options\u003dv_options)"},{"line_number":915,"context_line":"            self._copy_volume_data(ctxt, temp_vol, volume)"},{"line_number":916,"context_line":"            self.driver.delete_volume(temp_vol)"},{"line_number":917,"context_line":"            temp_vol.destroy()"}],"source_content_type":"text/x-python","patch_set":16,"id":"7f231b9d_e1110d5f","line":914,"range":{"start_line":913,"start_character":23,"end_line":914,"end_character":65},"updated":"2017-06-14 19:52:00.000000000","message":"create_volume_from_snapshot in driver.py does not have volume_options parameter.  Do you mean to call self.driver._create_temp_volume_from_snapshot() instead?","commit_id":"d16e4f27b5440872a139c3c9b5cf371146b1f453"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"2e91bc9c2540835185e75b17f95aa7dc5df53492","unresolved":false,"context_lines":[{"line_number":910,"context_line":"            v_options \u003d {\u0027display_name\u0027: \u0027[revert] temporary volume created \u0027"},{"line_number":911,"context_line":"                                         \u0027from snapshot %s\u0027 % snapshot.id}"},{"line_number":912,"context_line":"            ctxt \u003d context.get_internal_tenant_context() or ctxt"},{"line_number":913,"context_line":"            temp_vol \u003d self.driver.create_volume_from_snapshot("},{"line_number":914,"context_line":"                ctxt, volume, snapshot, volume_options\u003dv_options)"},{"line_number":915,"context_line":"            self._copy_volume_data(ctxt, temp_vol, volume)"},{"line_number":916,"context_line":"            self.driver.delete_volume(temp_vol)"},{"line_number":917,"context_line":"            temp_vol.destroy()"}],"source_content_type":"text/x-python","patch_set":16,"id":"7f231b9d_0205fd13","line":914,"range":{"start_line":913,"start_character":23,"end_line":914,"end_character":65},"in_reply_to":"7f231b9d_e1110d5f","updated":"2017-06-16 02:20:15.000000000","message":"Done","commit_id":"d16e4f27b5440872a139c3c9b5cf371146b1f453"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"a4222ea133519425d98c528eb6009e4956d11c69","unresolved":false,"context_lines":[{"line_number":952,"context_line":"            \u0027volume_size\u0027: volume.size,"},{"line_number":953,"context_line":"            \u0027display_name\u0027: \u0027[revert] volume %s backup snapshot\u0027 % volume.id,"},{"line_number":954,"context_line":"            \u0027display_description\u0027: \u0027This is only used for backup when \u0027"},{"line_number":955,"context_line":"                                   \u0027reverting, if the reverting process \u0027"},{"line_number":956,"context_line":"                                   \u0027failed, you can restore you data by \u0027"},{"line_number":957,"context_line":"                                   \u0027creating new volume with this snapshot.\u0027,"},{"line_number":958,"context_line":"            \u0027volume_type_id\u0027: volume.volume_type_id,"}],"source_content_type":"text/x-python","patch_set":16,"id":"7f231b9d_1c2a327e","line":955,"range":{"start_line":955,"start_character":45,"end_line":955,"end_character":46},"updated":"2017-06-14 19:56:27.000000000","message":"Change \",\" to \".\" and start a new sentence with \"If the reverting process …\".","commit_id":"d16e4f27b5440872a139c3c9b5cf371146b1f453"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"2e91bc9c2540835185e75b17f95aa7dc5df53492","unresolved":false,"context_lines":[{"line_number":952,"context_line":"            \u0027volume_size\u0027: volume.size,"},{"line_number":953,"context_line":"            \u0027display_name\u0027: \u0027[revert] volume %s backup snapshot\u0027 % volume.id,"},{"line_number":954,"context_line":"            \u0027display_description\u0027: \u0027This is only used for backup when \u0027"},{"line_number":955,"context_line":"                                   \u0027reverting, if the reverting process \u0027"},{"line_number":956,"context_line":"                                   \u0027failed, you can restore you data by \u0027"},{"line_number":957,"context_line":"                                   \u0027creating new volume with this snapshot.\u0027,"},{"line_number":958,"context_line":"            \u0027volume_type_id\u0027: volume.volume_type_id,"}],"source_content_type":"text/x-python","patch_set":16,"id":"7f231b9d_751fcd5a","line":955,"range":{"start_line":955,"start_character":45,"end_line":955,"end_character":46},"in_reply_to":"7f231b9d_1c2a327e","updated":"2017-06-16 02:20:15.000000000","message":"Done","commit_id":"d16e4f27b5440872a139c3c9b5cf371146b1f453"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"16e69b54cb9c0b80449a64600ddb3336d1132eda","unresolved":false,"context_lines":[{"line_number":877,"context_line":"        to snapshot feature:"},{"line_number":878,"context_line":"        1. create a temporary volume from snapshot"},{"line_number":879,"context_line":"        2. mount two volumes to host"},{"line_number":880,"context_line":"        3. copy data from temporary volume to original volume"},{"line_number":881,"context_line":"        4. detach and destroy temporary volume"},{"line_number":882,"context_line":"        \"\"\""},{"line_number":883,"context_line":"        temp_vol \u003d None"},{"line_number":884,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"7f231b9d_a6e512de","line":881,"range":{"start_line":880,"start_character":0,"end_line":881,"end_character":46},"updated":"2017-06-18 17:59:23.000000000","message":"in which case just manually do \"create from snap\" on your own and deal with a changed volume-id :) . I dislike the fact that we can\u0027t just say \"this is how it works\" for things like this and instead need to come up with all sorts of wrapping for folks.  That\u0027s ok though, I like this approach A LOT better than something like ID swapping magic.  Implementation wise however (and I can\u0027t believe I\u0027m saying this) it might be worth considering that as an alternative (I just threw up in my mouth a little bit).  \n\nExperience has been that things like dd\u0027ing a 500+Gig volume with data is not exactly a \"great\" solution, and even worse in some kernels it\u0027s been prone to panics/hangs.  Maybe we don\u0027t care since this is just a fallback for devices that can\u0027t rollback.  I don\u0027t know, just something to think about.","commit_id":"eed0d0dda5529b3a126a3c2e202facea64867835"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"c2055e1dc43b8edc5fa6fc270c40b00bdbfc57a9","unresolved":false,"context_lines":[{"line_number":877,"context_line":"        to snapshot feature:"},{"line_number":878,"context_line":"        1. create a temporary volume from snapshot"},{"line_number":879,"context_line":"        2. mount two volumes to host"},{"line_number":880,"context_line":"        3. copy data from temporary volume to original volume"},{"line_number":881,"context_line":"        4. detach and destroy temporary volume"},{"line_number":882,"context_line":"        \"\"\""},{"line_number":883,"context_line":"        temp_vol \u003d None"},{"line_number":884,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"7f231b9d_1c8656ba","line":881,"range":{"start_line":880,"start_character":0,"end_line":881,"end_character":46},"in_reply_to":"7f231b9d_a6e512de","updated":"2017-06-19 06:41:07.000000000","message":"Thanks for pointing this out, jgriffith! Although the driver specific implementation should be considered at the first place when using this functionality, but the generic way still values because to ask most of the driver adding this feature is a long way to go. I am open to refactor this method if any better (wise) solution comes out with this or independent patch.","commit_id":"eed0d0dda5529b3a126a3c2e202facea64867835"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d71d828fc7e4cb54c527c9db52634ef284ef546a","unresolved":false,"context_lines":[{"line_number":962,"context_line":"                                                \"revert.end\")"},{"line_number":963,"context_line":"                self._notify_about_snapshot_usage(context, snapshot,"},{"line_number":964,"context_line":"                                                  \"revert.end\")"},{"line_number":965,"context_line":"                msg \u003d _(\u0027Volume %(v_id)s revert to \u0027"},{"line_number":966,"context_line":"                        \u0027snapshot %(s_id)s failed with %(error)s.\u0027)"},{"line_number":967,"context_line":"                msg_args \u003d {\u0027v_id\u0027: volume.id,"},{"line_number":968,"context_line":"                            \u0027s_id\u0027: snapshot.id,"},{"line_number":969,"context_line":"                            \u0027error\u0027: six.text_type(error)}"}],"source_content_type":"text/x-python","patch_set":19,"id":"5f201791_a9182575","line":966,"range":{"start_line":965,"start_character":22,"end_line":966,"end_character":67},"updated":"2017-06-20 14:48:01.000000000","message":"This msg only goes to logs so it does not need _","commit_id":"2c3f0bb8b8e9deb4bb55cc2a65c5fa5b2ceff39c"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"037f39f8596b48b5fb7fe420ace51c373fff5e58","unresolved":false,"context_lines":[{"line_number":962,"context_line":"                                                \"revert.end\")"},{"line_number":963,"context_line":"                self._notify_about_snapshot_usage(context, snapshot,"},{"line_number":964,"context_line":"                                                  \"revert.end\")"},{"line_number":965,"context_line":"                msg \u003d _(\u0027Volume %(v_id)s revert to \u0027"},{"line_number":966,"context_line":"                        \u0027snapshot %(s_id)s failed with %(error)s.\u0027)"},{"line_number":967,"context_line":"                msg_args \u003d {\u0027v_id\u0027: volume.id,"},{"line_number":968,"context_line":"                            \u0027s_id\u0027: snapshot.id,"},{"line_number":969,"context_line":"                            \u0027error\u0027: six.text_type(error)}"}],"source_content_type":"text/x-python","patch_set":19,"id":"5f201791_64a594b5","line":966,"range":{"start_line":965,"start_character":22,"end_line":966,"end_character":67},"in_reply_to":"5f201791_a9182575","updated":"2017-06-20 15:43:20.000000000","message":"Done","commit_id":"2c3f0bb8b8e9deb4bb55cc2a65c5fa5b2ceff39c"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d71d828fc7e4cb54c527c9db52634ef284ef546a","unresolved":false,"context_lines":[{"line_number":973,"context_line":"                if not v_res:"},{"line_number":974,"context_line":"                    msg_args \u003d {\"id\": volume.id,"},{"line_number":975,"context_line":"                                \"status\": \u0027error\u0027}"},{"line_number":976,"context_line":"                    msg +\u003d _(\"Failed to reset volume %{id}s \""},{"line_number":977,"context_line":"                             \"status to %{status} \") % msg_args"},{"line_number":978,"context_line":""},{"line_number":979,"context_line":"                s_res \u003d snapshot.update_single_status_where("},{"line_number":980,"context_line":"                    fields.SnapshotStatus.AVAILABLE,"}],"source_content_type":"text/x-python","patch_set":19,"id":"5f201791_a93145ef","line":977,"range":{"start_line":976,"start_character":27,"end_line":977,"end_character":63},"updated":"2017-06-20 14:48:01.000000000","message":"Same","commit_id":"2c3f0bb8b8e9deb4bb55cc2a65c5fa5b2ceff39c"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"037f39f8596b48b5fb7fe420ace51c373fff5e58","unresolved":false,"context_lines":[{"line_number":973,"context_line":"                if not v_res:"},{"line_number":974,"context_line":"                    msg_args \u003d {\"id\": volume.id,"},{"line_number":975,"context_line":"                                \"status\": \u0027error\u0027}"},{"line_number":976,"context_line":"                    msg +\u003d _(\"Failed to reset volume %{id}s \""},{"line_number":977,"context_line":"                             \"status to %{status} \") % msg_args"},{"line_number":978,"context_line":""},{"line_number":979,"context_line":"                s_res \u003d snapshot.update_single_status_where("},{"line_number":980,"context_line":"                    fields.SnapshotStatus.AVAILABLE,"}],"source_content_type":"text/x-python","patch_set":19,"id":"5f201791_8489d027","line":977,"range":{"start_line":976,"start_character":27,"end_line":977,"end_character":63},"in_reply_to":"5f201791_a93145ef","updated":"2017-06-20 15:43:20.000000000","message":"Done","commit_id":"2c3f0bb8b8e9deb4bb55cc2a65c5fa5b2ceff39c"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d71d828fc7e4cb54c527c9db52634ef284ef546a","unresolved":false,"context_lines":[{"line_number":983,"context_line":"                    msg_args \u003d {\"id\": snapshot.id,"},{"line_number":984,"context_line":"                                \"status\":"},{"line_number":985,"context_line":"                                    fields.SnapshotStatus.ERROR}"},{"line_number":986,"context_line":"                    msg +\u003d _(\"Failed to reset snapshot %{id}s \""},{"line_number":987,"context_line":"                             \"status to %{status}\") % msg_args"},{"line_number":988,"context_line":"                LOG.exception(msg, msg_args)"},{"line_number":989,"context_line":""},{"line_number":990,"context_line":"        self._notify_about_volume_usage(context, volume,"}],"source_content_type":"text/x-python","patch_set":19,"id":"5f201791_49563109","line":987,"range":{"start_line":986,"start_character":27,"end_line":987,"end_character":62},"updated":"2017-06-20 14:48:01.000000000","message":"Same","commit_id":"2c3f0bb8b8e9deb4bb55cc2a65c5fa5b2ceff39c"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"037f39f8596b48b5fb7fe420ace51c373fff5e58","unresolved":false,"context_lines":[{"line_number":983,"context_line":"                    msg_args \u003d {\"id\": snapshot.id,"},{"line_number":984,"context_line":"                                \"status\":"},{"line_number":985,"context_line":"                                    fields.SnapshotStatus.ERROR}"},{"line_number":986,"context_line":"                    msg +\u003d _(\"Failed to reset snapshot %{id}s \""},{"line_number":987,"context_line":"                             \"status to %{status}\") % msg_args"},{"line_number":988,"context_line":"                LOG.exception(msg, msg_args)"},{"line_number":989,"context_line":""},{"line_number":990,"context_line":"        self._notify_about_volume_usage(context, volume,"}],"source_content_type":"text/x-python","patch_set":19,"id":"5f201791_648eb42f","line":987,"range":{"start_line":986,"start_character":27,"end_line":987,"end_character":62},"in_reply_to":"5f201791_49563109","updated":"2017-06-20 15:43:20.000000000","message":"Done","commit_id":"2c3f0bb8b8e9deb4bb55cc2a65c5fa5b2ceff39c"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d71d828fc7e4cb54c527c9db52634ef284ef546a","unresolved":false,"context_lines":[{"line_number":1015,"context_line":"        if backup_snapshot:"},{"line_number":1016,"context_line":"            self.delete_snapshot(context,"},{"line_number":1017,"context_line":"                                 backup_snapshot, handle_quota\u003dFalse)"},{"line_number":1018,"context_line":"        msg \u003d _(\u0027Volume %(v_id)s reverted to snapshot %(snap_id)s \u0027"},{"line_number":1019,"context_line":"                \u0027successfully.\u0027)"},{"line_number":1020,"context_line":"        msg_args \u003d {\u0027v_id\u0027: volume.id, \u0027snap_id\u0027: snapshot.id}"},{"line_number":1021,"context_line":"        LOG.info(msg, msg_args)"},{"line_number":1022,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"5f201791_69032d0f","line":1019,"range":{"start_line":1018,"start_character":14,"end_line":1019,"end_character":32},"updated":"2017-06-20 14:48:01.000000000","message":"This msg only goes to logs so it does not need _","commit_id":"2c3f0bb8b8e9deb4bb55cc2a65c5fa5b2ceff39c"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"037f39f8596b48b5fb7fe420ace51c373fff5e58","unresolved":false,"context_lines":[{"line_number":1015,"context_line":"        if backup_snapshot:"},{"line_number":1016,"context_line":"            self.delete_snapshot(context,"},{"line_number":1017,"context_line":"                                 backup_snapshot, handle_quota\u003dFalse)"},{"line_number":1018,"context_line":"        msg \u003d _(\u0027Volume %(v_id)s reverted to snapshot %(snap_id)s \u0027"},{"line_number":1019,"context_line":"                \u0027successfully.\u0027)"},{"line_number":1020,"context_line":"        msg_args \u003d {\u0027v_id\u0027: volume.id, \u0027snap_id\u0027: snapshot.id}"},{"line_number":1021,"context_line":"        LOG.info(msg, msg_args)"},{"line_number":1022,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"5f201791_e4cc0463","line":1019,"range":{"start_line":1018,"start_character":14,"end_line":1019,"end_character":32},"in_reply_to":"5f201791_69032d0f","updated":"2017-06-20 15:43:20.000000000","message":"Done","commit_id":"2c3f0bb8b8e9deb4bb55cc2a65c5fa5b2ceff39c"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"21534068845c29e3b50dcef72229921feb89df04","unresolved":false,"context_lines":[{"line_number":973,"context_line":"                if not v_res:"},{"line_number":974,"context_line":"                    msg_args \u003d {\"id\": volume.id,"},{"line_number":975,"context_line":"                                \"status\": \u0027error\u0027}"},{"line_number":976,"context_line":"                    msg +\u003d (\"Failed to reset volume %{id}s \""},{"line_number":977,"context_line":"                            \"status to %{status} \") % msg_args"},{"line_number":978,"context_line":""},{"line_number":979,"context_line":"                s_res \u003d snapshot.update_single_status_where("}],"source_content_type":"text/x-python","patch_set":20,"id":"5f201791_6c88cd1e","line":976,"range":{"start_line":976,"start_character":53,"end_line":976,"end_character":57},"updated":"2017-06-21 00:56:09.000000000","message":"Actually this should be %(id)s","commit_id":"c09b29e406836fb4641814dee9f1136c0de76cc1"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"21534068845c29e3b50dcef72229921feb89df04","unresolved":false,"context_lines":[{"line_number":974,"context_line":"                    msg_args \u003d {\"id\": volume.id,"},{"line_number":975,"context_line":"                                \"status\": \u0027error\u0027}"},{"line_number":976,"context_line":"                    msg +\u003d (\"Failed to reset volume %{id}s \""},{"line_number":977,"context_line":"                            \"status to %{status} \") % msg_args"},{"line_number":978,"context_line":""},{"line_number":979,"context_line":"                s_res \u003d snapshot.update_single_status_where("},{"line_number":980,"context_line":"                    fields.SnapshotStatus.AVAILABLE,"}],"source_content_type":"text/x-python","patch_set":20,"id":"5f201791_4c7d111b","line":977,"range":{"start_line":977,"start_character":39,"end_line":977,"end_character":48},"updated":"2017-06-21 00:56:09.000000000","message":"%(status)s","commit_id":"c09b29e406836fb4641814dee9f1136c0de76cc1"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"21534068845c29e3b50dcef72229921feb89df04","unresolved":false,"context_lines":[{"line_number":983,"context_line":"                    msg_args \u003d {\"id\": snapshot.id,"},{"line_number":984,"context_line":"                                \"status\":"},{"line_number":985,"context_line":"                                    fields.SnapshotStatus.ERROR}"},{"line_number":986,"context_line":"                    msg +\u003d (\"Failed to reset snapshot %{id}s \""},{"line_number":987,"context_line":"                            \"status to %{status}\") % msg_args"},{"line_number":988,"context_line":"                LOG.exception(msg, msg_args)"},{"line_number":989,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"5f201791_0c77193d","line":986,"range":{"start_line":986,"start_character":55,"end_line":986,"end_character":59},"updated":"2017-06-21 00:56:09.000000000","message":"Should be (), not {}","commit_id":"c09b29e406836fb4641814dee9f1136c0de76cc1"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"21534068845c29e3b50dcef72229921feb89df04","unresolved":false,"context_lines":[{"line_number":984,"context_line":"                                \"status\":"},{"line_number":985,"context_line":"                                    fields.SnapshotStatus.ERROR}"},{"line_number":986,"context_line":"                    msg +\u003d (\"Failed to reset snapshot %{id}s \""},{"line_number":987,"context_line":"                            \"status to %{status}\") % msg_args"},{"line_number":988,"context_line":"                LOG.exception(msg, msg_args)"},{"line_number":989,"context_line":""},{"line_number":990,"context_line":"        self._notify_about_volume_usage(context, volume,"}],"source_content_type":"text/x-python","patch_set":20,"id":"5f201791_ac93854f","line":987,"range":{"start_line":987,"start_character":39,"end_line":987,"end_character":48},"updated":"2017-06-21 00:56:09.000000000","message":"%(status)s","commit_id":"c09b29e406836fb4641814dee9f1136c0de76cc1"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"21534068845c29e3b50dcef72229921feb89df04","unresolved":false,"context_lines":[{"line_number":997,"context_line":"            msg_args \u003d {\"id\": volume.id,"},{"line_number":998,"context_line":"                        \"status\": \u0027available\u0027}"},{"line_number":999,"context_line":"            msg \u003d _(\"Revert finished, but failed to reset \""},{"line_number":1000,"context_line":"                    \"volume %{id} status to %{status}, \""},{"line_number":1001,"context_line":"                    \"please manually reset it.\") % msg_args"},{"line_number":1002,"context_line":"            raise exception.BadResetResourceStatus(message\u003dmsg)"},{"line_number":1003,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"5f201791_4ca2b19c","line":1000,"range":{"start_line":1000,"start_character":28,"end_line":1000,"end_character":33},"updated":"2017-06-21 00:56:09.000000000","message":"%(id)s   %(status)s","commit_id":"c09b29e406836fb4641814dee9f1136c0de76cc1"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"21534068845c29e3b50dcef72229921feb89df04","unresolved":false,"context_lines":[{"line_number":1009,"context_line":"                        \"status\":"},{"line_number":1010,"context_line":"                            fields.SnapshotStatus.AVAILABLE}"},{"line_number":1011,"context_line":"            msg \u003d _(\"Revert finished, but failed to reset \""},{"line_number":1012,"context_line":"                    \"snapshot %{id}s status to %{status}, \""},{"line_number":1013,"context_line":"                    \"please manually reset it.\") % msg_args"},{"line_number":1014,"context_line":"            raise exception.BadResetResourceStatus(message\u003dmsg)"},{"line_number":1015,"context_line":"        if backup_snapshot:"}],"source_content_type":"text/x-python","patch_set":20,"id":"5f201791_acbca5bb","line":1012,"range":{"start_line":1012,"start_character":30,"end_line":1012,"end_character":57},"updated":"2017-06-21 00:56:09.000000000","message":"%(id)s    %(status)s","commit_id":"c09b29e406836fb4641814dee9f1136c0de76cc1"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"af781ec5b944dba393f5fc94143c85578257f5f4","unresolved":false,"context_lines":[{"line_number":973,"context_line":"                    msg_args \u003d {\"id\": volume.id,"},{"line_number":974,"context_line":"                                \"status\": \u0027error\u0027}"},{"line_number":975,"context_line":"                    msg +\u003d (\"Failed to reset volume %(id)s \""},{"line_number":976,"context_line":"                            \"status to %(status) \") % msg_args"},{"line_number":977,"context_line":""},{"line_number":978,"context_line":"                s_res \u003d snapshot.update_single_status_where("},{"line_number":979,"context_line":"                    fields.SnapshotStatus.AVAILABLE,"}],"source_content_type":"text/x-python","patch_set":21,"id":"5f201791_928ea42c","line":976,"range":{"start_line":976,"start_character":39,"end_line":976,"end_character":48},"updated":"2017-06-21 02:29:04.000000000","message":"Missed \"s\" after %(status).  Should be %(status)s","commit_id":"7ecdd6a20fcb0fa73b399fbb24e9c4601faacf3c"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"30183f2bd4f0116e644b3967d99fe3ecf24d26b3","unresolved":false,"context_lines":[{"line_number":973,"context_line":"                    msg_args \u003d {\"id\": volume.id,"},{"line_number":974,"context_line":"                                \"status\": \u0027error\u0027}"},{"line_number":975,"context_line":"                    msg +\u003d (\"Failed to reset volume %(id)s \""},{"line_number":976,"context_line":"                            \"status to %(status) \") % msg_args"},{"line_number":977,"context_line":""},{"line_number":978,"context_line":"                s_res \u003d snapshot.update_single_status_where("},{"line_number":979,"context_line":"                    fields.SnapshotStatus.AVAILABLE,"}],"source_content_type":"text/x-python","patch_set":21,"id":"5f201791_32f91080","line":976,"range":{"start_line":976,"start_character":39,"end_line":976,"end_character":48},"in_reply_to":"5f201791_928ea42c","updated":"2017-06-21 02:37:45.000000000","message":"Done","commit_id":"7ecdd6a20fcb0fa73b399fbb24e9c4601faacf3c"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"af781ec5b944dba393f5fc94143c85578257f5f4","unresolved":false,"context_lines":[{"line_number":983,"context_line":"                                \"status\":"},{"line_number":984,"context_line":"                                    fields.SnapshotStatus.ERROR}"},{"line_number":985,"context_line":"                    msg +\u003d (\"Failed to reset snapshot %(id)s \""},{"line_number":986,"context_line":"                            \"status to %(status)\" % msg_args)"},{"line_number":987,"context_line":"                LOG.exception(msg, msg_args)"},{"line_number":988,"context_line":""},{"line_number":989,"context_line":"        self._notify_about_volume_usage(context, volume,"}],"source_content_type":"text/x-python","patch_set":21,"id":"5f201791_327d901c","line":986,"range":{"start_line":986,"start_character":39,"end_line":986,"end_character":48},"updated":"2017-06-21 02:29:04.000000000","message":"Same","commit_id":"7ecdd6a20fcb0fa73b399fbb24e9c4601faacf3c"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"30183f2bd4f0116e644b3967d99fe3ecf24d26b3","unresolved":false,"context_lines":[{"line_number":983,"context_line":"                                \"status\":"},{"line_number":984,"context_line":"                                    fields.SnapshotStatus.ERROR}"},{"line_number":985,"context_line":"                    msg +\u003d (\"Failed to reset snapshot %(id)s \""},{"line_number":986,"context_line":"                            \"status to %(status)\" % msg_args)"},{"line_number":987,"context_line":"                LOG.exception(msg, msg_args)"},{"line_number":988,"context_line":""},{"line_number":989,"context_line":"        self._notify_about_volume_usage(context, volume,"}],"source_content_type":"text/x-python","patch_set":21,"id":"5f201791_f2f2789a","line":986,"range":{"start_line":986,"start_character":39,"end_line":986,"end_character":48},"in_reply_to":"5f201791_327d901c","updated":"2017-06-21 02:37:45.000000000","message":"Done","commit_id":"7ecdd6a20fcb0fa73b399fbb24e9c4601faacf3c"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"af781ec5b944dba393f5fc94143c85578257f5f4","unresolved":false,"context_lines":[{"line_number":996,"context_line":"            msg_args \u003d {\"id\": volume.id,"},{"line_number":997,"context_line":"                        \"status\": \u0027available\u0027}"},{"line_number":998,"context_line":"            msg \u003d _(\"Revert finished, but failed to reset \""},{"line_number":999,"context_line":"                    \"volume %(id) status to %(status), \""},{"line_number":1000,"context_line":"                    \"please manually reset it.\") % msg_args"},{"line_number":1001,"context_line":"            raise exception.BadResetResourceStatus(message\u003dmsg)"},{"line_number":1002,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"5f201791_127a9423","line":999,"range":{"start_line":999,"start_character":28,"end_line":999,"end_character":33},"updated":"2017-06-21 02:29:04.000000000","message":"Same","commit_id":"7ecdd6a20fcb0fa73b399fbb24e9c4601faacf3c"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"af781ec5b944dba393f5fc94143c85578257f5f4","unresolved":false,"context_lines":[{"line_number":996,"context_line":"            msg_args \u003d {\"id\": volume.id,"},{"line_number":997,"context_line":"                        \"status\": \u0027available\u0027}"},{"line_number":998,"context_line":"            msg \u003d _(\"Revert finished, but failed to reset \""},{"line_number":999,"context_line":"                    \"volume %(id) status to %(status), \""},{"line_number":1000,"context_line":"                    \"please manually reset it.\") % msg_args"},{"line_number":1001,"context_line":"            raise exception.BadResetResourceStatus(message\u003dmsg)"},{"line_number":1002,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"5f201791_f276f83e","line":999,"range":{"start_line":999,"start_character":44,"end_line":999,"end_character":53},"updated":"2017-06-21 02:29:04.000000000","message":"Same","commit_id":"7ecdd6a20fcb0fa73b399fbb24e9c4601faacf3c"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"30183f2bd4f0116e644b3967d99fe3ecf24d26b3","unresolved":false,"context_lines":[{"line_number":996,"context_line":"            msg_args \u003d {\"id\": volume.id,"},{"line_number":997,"context_line":"                        \"status\": \u0027available\u0027}"},{"line_number":998,"context_line":"            msg \u003d _(\"Revert finished, but failed to reset \""},{"line_number":999,"context_line":"                    \"volume %(id) status to %(status), \""},{"line_number":1000,"context_line":"                    \"please manually reset it.\") % msg_args"},{"line_number":1001,"context_line":"            raise exception.BadResetResourceStatus(message\u003dmsg)"},{"line_number":1002,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"5f201791_52392c3f","line":999,"range":{"start_line":999,"start_character":28,"end_line":999,"end_character":33},"in_reply_to":"5f201791_127a9423","updated":"2017-06-21 02:37:45.000000000","message":"Done","commit_id":"7ecdd6a20fcb0fa73b399fbb24e9c4601faacf3c"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"30183f2bd4f0116e644b3967d99fe3ecf24d26b3","unresolved":false,"context_lines":[{"line_number":996,"context_line":"            msg_args \u003d {\"id\": volume.id,"},{"line_number":997,"context_line":"                        \"status\": \u0027available\u0027}"},{"line_number":998,"context_line":"            msg \u003d _(\"Revert finished, but failed to reset \""},{"line_number":999,"context_line":"                    \"volume %(id) status to %(status), \""},{"line_number":1000,"context_line":"                    \"please manually reset it.\") % msg_args"},{"line_number":1001,"context_line":"            raise exception.BadResetResourceStatus(message\u003dmsg)"},{"line_number":1002,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"5f201791_7234284b","line":999,"range":{"start_line":999,"start_character":44,"end_line":999,"end_character":53},"in_reply_to":"5f201791_f276f83e","updated":"2017-06-21 02:37:45.000000000","message":"Done","commit_id":"7ecdd6a20fcb0fa73b399fbb24e9c4601faacf3c"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"af781ec5b944dba393f5fc94143c85578257f5f4","unresolved":false,"context_lines":[{"line_number":1008,"context_line":"                        \"status\":"},{"line_number":1009,"context_line":"                            fields.SnapshotStatus.AVAILABLE}"},{"line_number":1010,"context_line":"            msg \u003d _(\"Revert finished, but failed to reset \""},{"line_number":1011,"context_line":"                    \"snapshot %(id)s status to %(status), \""},{"line_number":1012,"context_line":"                    \"please manually reset it.\") % msg_args"},{"line_number":1013,"context_line":"            raise exception.BadResetResourceStatus(message\u003dmsg)"},{"line_number":1014,"context_line":"        if backup_snapshot:"}],"source_content_type":"text/x-python","patch_set":21,"id":"5f201791_d273fc4c","line":1011,"range":{"start_line":1011,"start_character":47,"end_line":1011,"end_character":56},"updated":"2017-06-21 02:29:04.000000000","message":"Same","commit_id":"7ecdd6a20fcb0fa73b399fbb24e9c4601faacf3c"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"30183f2bd4f0116e644b3967d99fe3ecf24d26b3","unresolved":false,"context_lines":[{"line_number":1008,"context_line":"                        \"status\":"},{"line_number":1009,"context_line":"                            fields.SnapshotStatus.AVAILABLE}"},{"line_number":1010,"context_line":"            msg \u003d _(\"Revert finished, but failed to reset \""},{"line_number":1011,"context_line":"                    \"snapshot %(id)s status to %(status), \""},{"line_number":1012,"context_line":"                    \"please manually reset it.\") % msg_args"},{"line_number":1013,"context_line":"            raise exception.BadResetResourceStatus(message\u003dmsg)"},{"line_number":1014,"context_line":"        if backup_snapshot:"}],"source_content_type":"text/x-python","patch_set":21,"id":"5f201791_922fc4f5","line":1011,"range":{"start_line":1011,"start_character":47,"end_line":1011,"end_character":56},"in_reply_to":"5f201791_d273fc4c","updated":"2017-06-21 02:37:45.000000000","message":"Done","commit_id":"7ecdd6a20fcb0fa73b399fbb24e9c4601faacf3c"}],"etc/cinder/policy.json":[{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"fa576ee222432eacfbf0de8f86fa91a9563cac28","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    \"volume:update_readonly_flag\": \"rule:admin_or_owner\","},{"line_number":29,"context_line":"    \"volume:retype\": \"rule:admin_or_owner\","},{"line_number":30,"context_line":"    \"volume:update\": \"rule:admin_or_owner\","},{"line_number":31,"context_line":"    \"volume:revert_to_snapshot\": \"\","},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    \"volume_extension:types_manage\": \"rule:admin_api\","},{"line_number":34,"context_line":"    \"volume_extension:types_extra_specs\": \"rule:admin_api\","}],"source_content_type":"application/json","patch_set":3,"id":"5ff73747_d1e37833","line":31,"updated":"2017-04-27 16:18:05.000000000","message":"Shouldn\u0027t this be rule:admin_or_owner ?","commit_id":"6ef08ba7c8f5bc16875f19ecb6961e65cbe019e5"}]}
