)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10058,"name":"Erlon R. Cruz","email":"erlon.rodrigues.cruz@canonical.com","username":"sombrafam"},"change_message_id":"0ca7fd088711dedd493ac953fc3509e8bd3e4329","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add \"(volume) backup set\" command in volume v2"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add \"volume backup set\" and \"backup set\" commands in"},{"line_number":10,"context_line":"volume v2 (v2 only) to set backup name, description"},{"line_number":11,"context_line":"and state"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: If17e8457db9a4704fb5bb9c75921ed82fd0069cf"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3ac371cc_ec470a49","line":10,"range":{"start_line":10,"start_character":7,"end_line":10,"end_character":19},"updated":"2016-08-16 20:11:59.000000000","message":"For sake of curiosity, why only V2?","commit_id":"a7ceb73056f0c10d944a00df4c2c7e5fd18987f8"},{"author":{"_account_id":21514,"name":"Huanxuan Ao","email":"aohuanxuan@163.com","username":"aohuanxuan"},"change_message_id":"a04341b8e0bf3a9104fbe05febd0e1e8490cebc8","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add \"(volume) backup set\" command in volume v2"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add \"volume backup set\" and \"backup set\" commands in"},{"line_number":10,"context_line":"volume v2 (v2 only) to set backup name, description"},{"line_number":11,"context_line":"and state"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: If17e8457db9a4704fb5bb9c75921ed82fd0069cf"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3ac371cc_481a7f7e","line":10,"range":{"start_line":10,"start_character":7,"end_line":10,"end_character":19},"in_reply_to":"3ac371cc_2c4e4296","updated":"2016-08-17 01:41:08.000000000","message":"Yes, like Steve said, v1 API dose not support for setting.\nThank you very much for the explanation, Steve :)","commit_id":"a7ceb73056f0c10d944a00df4c2c7e5fd18987f8"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"830e933e95df566741a9d3544547cf0c78c5c1c3","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add \"(volume) backup set\" command in volume v2"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add \"volume backup set\" and \"backup set\" commands in"},{"line_number":10,"context_line":"volume v2 (v2 only) to set backup name, description"},{"line_number":11,"context_line":"and state"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: If17e8457db9a4704fb5bb9c75921ed82fd0069cf"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3ac371cc_2c4e4296","line":10,"range":{"start_line":10,"start_character":7,"end_line":10,"end_character":19},"in_reply_to":"3ac371cc_ec470a49","updated":"2016-08-16 20:31:49.000000000","message":"there\u0027s not \"set\" or \"update\" in the client (and presumably, the API): https://github.com/openstack/python-cinderclient/blob/master/cinderclient/v1/volume_backups.py","commit_id":"a7ceb73056f0c10d944a00df4c2c7e5fd18987f8"}],"openstackclient/tests/unit/volume/v2/test_backup.py":[{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"5a0d646143fc7bc8ddcd41372478252a6b686a8f","unresolved":false,"context_lines":[{"line_number":400,"context_line":"            self.fail(\u0027CommandError should be raised.\u0027)"},{"line_number":401,"context_line":"        except exceptions.CommandError as e:"},{"line_number":402,"context_line":"            self.assertEqual(\u0027One or more of the set operations failed\u0027,"},{"line_number":403,"context_line":"                             str(e))"},{"line_number":404,"context_line":"        self.backups_mock.reset_state.assert_called_with("},{"line_number":405,"context_line":"            self.backup.id, \u0027error\u0027)"},{"line_number":406,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_f72a628f","line":403,"updated":"2016-09-15 17:12:17.000000000","message":"This is a different pattern than we use elsewhere for testing exceptions, and it depends on the text of the exception to pass.  Why wouldn\u0027t you use assertRaises here?","commit_id":"ce3366c90ee0e93ad5ca0d6d0f0426172423a1a3"},{"author":{"_account_id":21514,"name":"Huanxuan Ao","email":"aohuanxuan@163.com","username":"aohuanxuan"},"change_message_id":"f2efd0d1aa272cf3f77769ea0ac0a7d41e4537ef","unresolved":false,"context_lines":[{"line_number":400,"context_line":"            self.fail(\u0027CommandError should be raised.\u0027)"},{"line_number":401,"context_line":"        except exceptions.CommandError as e:"},{"line_number":402,"context_line":"            self.assertEqual(\u0027One or more of the set operations failed\u0027,"},{"line_number":403,"context_line":"                             str(e))"},{"line_number":404,"context_line":"        self.backups_mock.reset_state.assert_called_with("},{"line_number":405,"context_line":"            self.backup.id, \u0027error\u0027)"},{"line_number":406,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_c6fae842","line":403,"in_reply_to":"7a8ec9b2_f72a628f","updated":"2016-09-16 13:11:16.000000000","message":"Hi Dean, I use this pattern here because I want to test the logic of error handling of multi API calls.\nIf we just use assertRaises here, we can just know whether there is an error or not, but we do not know where the error raised. I want make sure the code has run to the last error handling but not breaks in the middle, so that we can know the error handling logic is right and the code is OK.\nFor example, we can see I let reset_state API return an error (in Line 387), if the code logic is right, the error will not be raised when we call the API, but add 1 to the \"result\" value, and raise a command error in the last of the code.","commit_id":"ce3366c90ee0e93ad5ca0d6d0f0426172423a1a3"}],"openstackclient/volume/v2/backup.py":[{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"5a0d646143fc7bc8ddcd41372478252a6b686a8f","unresolved":false,"context_lines":[{"line_number":305,"context_line":"            \u0027--state\u0027,"},{"line_number":306,"context_line":"            metavar\u003d\u0027\u003cstate\u003e\u0027,"},{"line_number":307,"context_line":"            choices\u003d[\u0027available\u0027, \u0027error\u0027],"},{"line_number":308,"context_line":"            help\u003d_(\u0027New backup state (\"available\" or \"error\")\u0027),"},{"line_number":309,"context_line":"        )"},{"line_number":310,"context_line":"        return parser"},{"line_number":311,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_77157247","line":308,"updated":"2016-09-15 17:12:17.000000000","message":"Really?  You can set the \u0027error\u0027 state manually?","commit_id":"ce3366c90ee0e93ad5ca0d6d0f0426172423a1a3"},{"author":{"_account_id":14937,"name":"Tang Chen","email":"imtangchen@163.com","username":"tangchen"},"change_message_id":"f20f410a705663d862393c72f0f409b78d312f87","unresolved":false,"context_lines":[{"line_number":305,"context_line":"            \u0027--state\u0027,"},{"line_number":306,"context_line":"            metavar\u003d\u0027\u003cstate\u003e\u0027,"},{"line_number":307,"context_line":"            choices\u003d[\u0027available\u0027, \u0027error\u0027],"},{"line_number":308,"context_line":"            help\u003d_(\u0027New backup state (\"available\" or \"error\")\u0027),"},{"line_number":309,"context_line":"        )"},{"line_number":310,"context_line":"        return parser"},{"line_number":311,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_fbd58442","line":308,"in_reply_to":"7a8ec9b2_2051b436","updated":"2016-09-19 07:50:01.000000000","message":"\"nova reset-state\" command can only set the state of a vm from error to active, but not from active to error. So I\u0027m with Dean here, let\u0027s just provide the functionality for users to set the state of a backup from error to available. If we find it is reasonable to set the state to error, then let\u0027s add it in the future, shall we ?","commit_id":"ce3366c90ee0e93ad5ca0d6d0f0426172423a1a3"},{"author":{"_account_id":21514,"name":"Huanxuan Ao","email":"aohuanxuan@163.com","username":"aohuanxuan"},"change_message_id":"f2efd0d1aa272cf3f77769ea0ac0a7d41e4537ef","unresolved":false,"context_lines":[{"line_number":305,"context_line":"            \u0027--state\u0027,"},{"line_number":306,"context_line":"            metavar\u003d\u0027\u003cstate\u003e\u0027,"},{"line_number":307,"context_line":"            choices\u003d[\u0027available\u0027, \u0027error\u0027],"},{"line_number":308,"context_line":"            help\u003d_(\u0027New backup state (\"available\" or \"error\")\u0027),"},{"line_number":309,"context_line":"        )"},{"line_number":310,"context_line":"        return parser"},{"line_number":311,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_2051b436","line":308,"in_reply_to":"7a8ec9b2_77157247","updated":"2016-09-16 13:11:16.000000000","message":"I think it may supports setting \u0027error\u0027 state, we can see the \"cinder backup-reste-state\" command in cinderclient also supports \"error\" state. Actually there are many volume  obejcts can be set to the \"error\" status, such as \"volume set --state\" and \"snapshot set --state\"","commit_id":"ce3366c90ee0e93ad5ca0d6d0f0426172423a1a3"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"977df66a98e7daae7a40e269c15374c0ce089e74","unresolved":false,"context_lines":[{"line_number":305,"context_line":"            \u0027--state\u0027,"},{"line_number":306,"context_line":"            metavar\u003d\u0027\u003cstate\u003e\u0027,"},{"line_number":307,"context_line":"            choices\u003d[\u0027available\u0027, \u0027error\u0027],"},{"line_number":308,"context_line":"            help\u003d_(\u0027New backup state (\"available\" or \"error\")\u0027),"},{"line_number":309,"context_line":"        )"},{"line_number":310,"context_line":"        return parser"},{"line_number":311,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_46751130","line":308,"in_reply_to":"7a8ec9b2_77157247","updated":"2016-09-16 03:01:38.000000000","message":"maybe it\u0027s used to short-circuit things, according to the API, these are all options for backup states\n\n  creating\t    The backup is being created.\n  available\tThe backup is ready to restore to a volume.\n  deleting\t    The backup is being deleted.\n  error\t        A backup error occurred.\n  restoring\tThe backup is being restored to a volume.\n  error_restoring    A backup restoration error occurred.","commit_id":"ce3366c90ee0e93ad5ca0d6d0f0426172423a1a3"},{"author":{"_account_id":14937,"name":"Tang Chen","email":"imtangchen@163.com","username":"tangchen"},"change_message_id":"663554455621f028db88f21c0e763f9108c8cb2c","unresolved":false,"context_lines":[{"line_number":305,"context_line":"            \u0027--state\u0027,"},{"line_number":306,"context_line":"            metavar\u003d\u0027\u003cstate\u003e\u0027,"},{"line_number":307,"context_line":"            choices\u003d[\u0027available\u0027, \u0027error\u0027],"},{"line_number":308,"context_line":"            help\u003d_(\u0027New backup state (\"available\" or \"error\")\u0027),"},{"line_number":309,"context_line":"        )"},{"line_number":310,"context_line":"        return parser"},{"line_number":311,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_db8a881a","line":308,"in_reply_to":"7a8ec9b2_fbd58442","updated":"2016-09-19 07:56:03.000000000","message":"I\u0027m just thinking that we should let the cinder service decide when the state of a backup should go to error. But sometimes it could be some strange reasons that cause the error, such as network timeout or something. So we can provide an interface for users to set it back to available if it is really still available.","commit_id":"ce3366c90ee0e93ad5ca0d6d0f0426172423a1a3"}]}
