)]}'
{"doc/source/command-objects/purge.rst":[{"author":{"_account_id":8276,"name":"kiwik","email":"chenrui.momo@gmail.com","username":"kiwik"},"change_message_id":"10e2dbcbe9b692add6d46eefadc170308edfa81c","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Clean resources associated with a project"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":".. program:: quota set"},{"line_number":15,"context_line":".. code:: bash"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"    os purge"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a77a97e_ca1a856e","line":14,"range":{"start_line":14,"start_character":13,"end_line":14,"end_character":22},"updated":"2016-11-15 03:58:58.000000000","message":"should be \"purge\"","commit_id":"761543760c093c85b66f4c3dddddae7ef4d63bd7"},{"author":{"_account_id":8276,"name":"kiwik","email":"chenrui.momo@gmail.com","username":"kiwik"},"change_message_id":"10e2dbcbe9b692add6d46eefadc170308edfa81c","unresolved":false,"context_lines":[{"line_number":17,"context_line":"    os purge"},{"line_number":18,"context_line":"        [--dry-run]"},{"line_number":19,"context_line":"        [--keep-project]"},{"line_number":20,"context_line":"        [--auth-project] | [--project \u003cproject\u003e]"},{"line_number":21,"context_line":"        [--project-domain \u003cproject-domain\u003e]"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":".. option:: --dry-run"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a77a97e_0d1737a4","line":20,"range":{"start_line":20,"start_character":8,"end_line":20,"end_character":48},"updated":"2016-11-15 03:58:58.000000000","message":"[--auth-project | --project \u003cproject\u003e]","commit_id":"761543760c093c85b66f4c3dddddae7ef4d63bd7"},{"author":{"_account_id":8276,"name":"kiwik","email":"chenrui.momo@gmail.com","username":"kiwik"},"change_message_id":"10e2dbcbe9b692add6d46eefadc170308edfa81c","unresolved":false,"context_lines":[{"line_number":39,"context_line":".. option:: --project-domain \u003cproject-domain\u003e"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    Domain the project belongs to (name or ID). This can be"},{"line_number":42,"context_line":"    used in case collisions between user names exist."}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a77a97e_47174e51","line":42,"range":{"start_line":42,"start_character":36,"end_line":42,"end_character":40},"updated":"2016-11-15 03:58:58.000000000","message":"should be \"project\"","commit_id":"761543760c093c85b66f4c3dddddae7ef4d63bd7"}],"openstackclient/common/project_purge.py":[{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"7cf964870f78b38f9e3e6e80efc74810ce6a32cc","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            for server in data:"},{"line_number":91,"context_line":"                LOG.warning(_(\u0027Deleting server: %s\u0027), server.id)"},{"line_number":92,"context_line":"                if not dry_run:"},{"line_number":93,"context_line":"                    compute_client.servers.delete(server.id)"},{"line_number":94,"context_line":"        except Exception:"},{"line_number":95,"context_line":"            pass"},{"line_number":96,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a71b18c_d0d2b2ff","line":93,"range":{"start_line":93,"start_character":20,"end_line":93,"end_character":60},"updated":"2016-12-11 04:45:15.000000000","message":"i think there was a comment to wrap this in a try/except block, and log if the server failed to delete","commit_id":"02b41a99bcb4a84609eef37c71b9d187d03a54b8"},{"author":{"_account_id":21514,"name":"Huanxuan Ao","email":"aohuanxuan@163.com","username":"aohuanxuan"},"change_message_id":"15bab82632c4b07bbdcd3a9e2a080ad9b7b8f593","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            for server in data:"},{"line_number":91,"context_line":"                LOG.warning(_(\u0027Deleting server: %s\u0027), server.id)"},{"line_number":92,"context_line":"                if not dry_run:"},{"line_number":93,"context_line":"                    compute_client.servers.delete(server.id)"},{"line_number":94,"context_line":"        except Exception:"},{"line_number":95,"context_line":"            pass"},{"line_number":96,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a71b18c_10750af9","line":93,"range":{"start_line":93,"start_character":20,"end_line":93,"end_character":60},"in_reply_to":"3a71b18c_d0d2b2ff","updated":"2016-12-11 05:10:32.000000000","message":"Yes, agree with you, we can do it like we did in delete commands, but I hope we can have a common way to do it, I am thinking about a for-loop for deleting all kind of resources, but I have not good idea yet, will change this in next patch set :)","commit_id":"02b41a99bcb4a84609eef37c71b9d187d03a54b8"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"7cf964870f78b38f9e3e6e80efc74810ce6a32cc","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            for image in data:"},{"line_number":102,"context_line":"                LOG.warning(_(\u0027Deleting image: %s\u0027), image.id)"},{"line_number":103,"context_line":"                if not dry_run:"},{"line_number":104,"context_line":"                    image_client.images.delete(image.id)"},{"line_number":105,"context_line":"        except Exception:"},{"line_number":106,"context_line":"            pass"},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a71b18c_f0cfae53","line":104,"range":{"start_line":104,"start_character":20,"end_line":104,"end_character":56},"updated":"2016-12-11 04:45:15.000000000","message":"i think there was a comment to wrap this in a try/except block, and log if the image failed to delete","commit_id":"02b41a99bcb4a84609eef37c71b9d187d03a54b8"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"7cf964870f78b38f9e3e6e80efc74810ce6a32cc","unresolved":false,"context_lines":[{"line_number":114,"context_line":"                LOG.warning(_(\u0027Deleting volume snapshot: %s\u0027), snapshot.id)"},{"line_number":115,"context_line":"                if not dry_run:"},{"line_number":116,"context_line":"                    try:"},{"line_number":117,"context_line":"                        volume_client.volume_snapshots.delete(snapshot.id)"},{"line_number":118,"context_line":"                    except Exception:"},{"line_number":119,"context_line":"                        # try to delete by force"},{"line_number":120,"context_line":"                        volume_client.volume_snapshots.delete(snapshot.id,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a71b18c_b0e9b6b9","line":117,"range":{"start_line":117,"start_character":24,"end_line":117,"end_character":74},"updated":"2016-12-11 04:45:15.000000000","message":"i think i like force\u003dTrue here, what was the reason for changing it?\n\nmy thinking was...  if you\u0027re purging you probably want to force delete. additionally, in the except block you can log what volume failed to delete.\n\nsame comment applies for backups and volumes of course","commit_id":"02b41a99bcb4a84609eef37c71b9d187d03a54b8"},{"author":{"_account_id":21514,"name":"Huanxuan Ao","email":"aohuanxuan@163.com","username":"aohuanxuan"},"change_message_id":"15bab82632c4b07bbdcd3a9e2a080ad9b7b8f593","unresolved":false,"context_lines":[{"line_number":114,"context_line":"                LOG.warning(_(\u0027Deleting volume snapshot: %s\u0027), snapshot.id)"},{"line_number":115,"context_line":"                if not dry_run:"},{"line_number":116,"context_line":"                    try:"},{"line_number":117,"context_line":"                        volume_client.volume_snapshots.delete(snapshot.id)"},{"line_number":118,"context_line":"                    except Exception:"},{"line_number":119,"context_line":"                        # try to delete by force"},{"line_number":120,"context_line":"                        volume_client.volume_snapshots.delete(snapshot.id,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a71b18c_d06e322e","line":117,"range":{"start_line":117,"start_character":24,"end_line":117,"end_character":74},"in_reply_to":"3a71b18c_b0e9b6b9","updated":"2016-12-11 05:10:32.000000000","message":"I agree with your point, user will like to delete by force when they use purge command, But I am considering about the case of volume API version 1, we can see we do not support the force options in delete for backup and snapshot so that if we delete them with force\u003dTrue then the error will always be raised if the volume version 1 is specified.","commit_id":"02b41a99bcb4a84609eef37c71b9d187d03a54b8"}],"openstackclient/common/purge.py":[{"author":{"_account_id":21514,"name":"Huanxuan Ao","email":"aohuanxuan@163.com","username":"aohuanxuan"},"change_message_id":"61715da8fbd398debe79485bae6ac389a4fe054e","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                LOG.warning(_(\u0027Deleting snapshot: %s\u0027), snapshot.id)"},{"line_number":120,"context_line":"                if not dry_run:"},{"line_number":121,"context_line":"                    volume_client.volume_snapshots.delete(snapshot.id,"},{"line_number":122,"context_line":"                                                          force\u003dTrue)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"            data \u003d volume_client.backups.list(search_opts\u003dsearch_opts)"},{"line_number":125,"context_line":"            for backup in data:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a89bdaa_233f6026","line":122,"updated":"2016-09-11 09:46:05.000000000","message":"FYI: I am confused by force deletion for snapshot for a long time:\nhttps://review.openstack.org/#/c/336968/\nThis may can not pass the functional test:(","commit_id":"761543760c093c85b66f4c3dddddae7ef4d63bd7"},{"author":{"_account_id":21514,"name":"Huanxuan Ao","email":"aohuanxuan@163.com","username":"aohuanxuan"},"change_message_id":"61715da8fbd398debe79485bae6ac389a4fe054e","unresolved":false,"context_lines":[{"line_number":121,"context_line":"                    volume_client.volume_snapshots.delete(snapshot.id,"},{"line_number":122,"context_line":"                                                          force\u003dTrue)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"            data \u003d volume_client.backups.list(search_opts\u003dsearch_opts)"},{"line_number":125,"context_line":"            for backup in data:"},{"line_number":126,"context_line":"                LOG.warning(_(\u0027Deleting backup: %s\u0027), backup.id)"},{"line_number":127,"context_line":"                if not dry_run:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a89bdaa_03709cdb","line":124,"updated":"2016-09-11 09:46:05.000000000","message":"The next API will not work if there is a error in the previous API, so should we separate them and support error handling for every APIs?","commit_id":"761543760c093c85b66f4c3dddddae7ef4d63bd7"},{"author":{"_account_id":8276,"name":"kiwik","email":"chenrui.momo@gmail.com","username":"kiwik"},"change_message_id":"10e2dbcbe9b692add6d46eefadc170308edfa81c","unresolved":false,"context_lines":[{"line_number":121,"context_line":"                    volume_client.volume_snapshots.delete(snapshot.id,"},{"line_number":122,"context_line":"                                                          force\u003dTrue)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"            data \u003d volume_client.backups.list(search_opts\u003dsearch_opts)"},{"line_number":125,"context_line":"            for backup in data:"},{"line_number":126,"context_line":"                LOG.warning(_(\u0027Deleting backup: %s\u0027), backup.id)"},{"line_number":127,"context_line":"                if not dry_run:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a77a97e_adfc833f","line":124,"in_reply_to":"9a89bdaa_03709cdb","updated":"2016-11-15 03:58:58.000000000","message":"Agree with Huanxuan, I think we should wrap each object deletion in try...except block.","commit_id":"761543760c093c85b66f4c3dddddae7ef4d63bd7"}],"openstackclient/tests/unit/common/test_project_purge.py":[{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"7cf964870f78b38f9e3e6e80efc74810ce6a32cc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"3a71b18c_90fbda7a","updated":"2016-12-11 04:45:15.000000000","message":"great tests ++","commit_id":"02b41a99bcb4a84609eef37c71b9d187d03a54b8"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"7cf964870f78b38f9e3e6e80efc74810ce6a32cc","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        result \u003d self.cmd.take_action(parsed_args)"},{"line_number":151,"context_line":"        self.projects_mock.get.assert_called_once_with(self.project.id)"},{"line_number":152,"context_line":"        self.projects_mock.delete.assert_not_called()"},{"line_number":153,"context_line":"        self.servers_mock.list.assert_called_once_with("},{"line_number":154,"context_line":"            search_opts\u003d{\u0027tenant_id\u0027: self.project.id})"},{"line_number":155,"context_line":"        self.images_mock.list.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":5,"id":"3a71b18c_700abe8b","line":152,"range":{"start_line":152,"start_character":34,"end_line":152,"end_character":51},"updated":"2016-12-11 04:45:15.000000000","message":"++","commit_id":"02b41a99bcb4a84609eef37c71b9d187d03a54b8"},{"author":{"_account_id":8276,"name":"kiwik","email":"chenrui.momo@gmail.com","username":"kiwik"},"change_message_id":"00efb87f167f9111581977e521236bc1680dd343","unresolved":false,"context_lines":[{"line_number":277,"context_line":"        mock_error.assert_called_with(\"1 of 1 servers failed to delete.\")"},{"line_number":278,"context_line":"        self.assertIsNone(result)"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    def test_project_purge_with_force_delete_backup(self):"},{"line_number":281,"context_line":"        self.backups_mock.delete.side_effect \u003d [exceptions.CommandError, None]"},{"line_number":282,"context_line":"        arglist \u003d ["},{"line_number":283,"context_line":"            \u0027--project\u0027, self.project.id,"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f201791_3d609701","line":280,"range":{"start_line":280,"start_character":32,"end_line":280,"end_character":51},"updated":"2017-06-22 08:12:00.000000000","message":"nice, cover all the paths :-)","commit_id":"227d4c64ef4ac04b5fed6cdff035821bf0e6ae7e"}]}
