)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"a752ea5c0046eaf29b1c7eb23770084e537fb25d","unresolved":false,"context_lines":[{"line_number":10,"context_line":"images based on when they were created. add an optional arg to"},{"line_number":11,"context_line":"control delete operation."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I24fc45e989aa951aab55a261fce77f7e3667d988"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"7f231b9d_5509d829","line":13,"updated":"2017-06-13 10:48:18.000000000","message":"Add the following line:\n\nCloses-bug: 1481689","commit_id":"be25077cf329addfe6fc2a0a42295d0eec3d0f04"}],"nova/tests/unit/virt/xenapi/test_vm_utils.py":[{"author":{"_account_id":23630,"name":"Tovin Seven","email":"tovin07@gmail.com","username":"tovin07"},"change_message_id":"5a17969eb39f098275e2d1b64bab4572f74ca9fa","unresolved":false,"context_lines":[{"line_number":656,"context_line":"        self.session.call_xenapi.return_value \u003d \u0027fake_uuid\u0027"},{"line_number":657,"context_line":"        mock_walk_vdi_chain.return_value \u003d (\u0027just_one\u0027,)"},{"line_number":658,"context_line":""},{"line_number":659,"context_line":"        fake_current_time \u003d 2 * 3600 * 24"},{"line_number":660,"context_line":"        mock_time.return_value \u003d fake_current_time"},{"line_number":661,"context_line":""},{"line_number":662,"context_line":"        fake_keep_days \u003d 1"}],"source_content_type":"text/x-python","patch_set":13,"id":"df3967d1_a5dac447","line":659,"range":{"start_line":659,"start_character":8,"end_line":659,"end_character":25},"updated":"2017-08-04 04:09:28.000000000","message":"not need to introduce new variable here","commit_id":"f3ef01e65644717f531565d409503b9c94df2576"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"193a4b676f4caed40e95cf77d38c383bdf23dfe0","unresolved":false,"context_lines":[{"line_number":656,"context_line":"        self.session.call_xenapi.return_value \u003d \u0027fake_uuid\u0027"},{"line_number":657,"context_line":"        mock_walk_vdi_chain.return_value \u003d (\u0027just_one\u0027,)"},{"line_number":658,"context_line":""},{"line_number":659,"context_line":"        fake_current_time \u003d 2 * 3600 * 24"},{"line_number":660,"context_line":"        mock_time.return_value \u003d fake_current_time"},{"line_number":661,"context_line":""},{"line_number":662,"context_line":"        fake_keep_days \u003d 1"}],"source_content_type":"text/x-python","patch_set":13,"id":"df3967d1_f442bfaa","line":659,"range":{"start_line":659,"start_character":8,"end_line":659,"end_character":25},"in_reply_to":"df3967d1_a5dac447","updated":"2017-08-04 06:27:36.000000000","message":"will remove it","commit_id":"f3ef01e65644717f531565d409503b9c94df2576"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"e830edb9be1a4d4e403db4a6cafd13e1fcb38656","unresolved":false,"context_lines":[{"line_number":677,"context_line":"    def test_destroy_cached_image_cached_time_is_none("},{"line_number":678,"context_line":"        self, mock_time, mock_walk_vdi_chain,"},{"line_number":679,"context_line":"        mock_destroy_vdi, mock_find_cached_images):"},{"line_number":680,"context_line":"        fake_cached_time \u003d \u00270\u0027"},{"line_number":681,"context_line":"        mock_find_cached_images.return_value \u003d {\u0027fake_image_id\u0027: {"},{"line_number":682,"context_line":"            \u0027vdi_ref\u0027: \u0027fake_vdi_ref\u0027, \u0027cached_time\u0027: fake_cached_time}}"},{"line_number":683,"context_line":"        self.session.call_xenapi.return_value \u003d \u0027fake_uuid\u0027"}],"source_content_type":"text/x-python","patch_set":19,"id":"9f436f4f_493eae8c","line":680,"updated":"2017-08-14 08:22:23.000000000","message":"This is not None, the test case requires it to be None?","commit_id":"ac6a2ed195b8953c603e8706f3865be3455eedbd"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"dc1698685609ba8665c43e3a9049447eaa1f2596","unresolved":false,"context_lines":[{"line_number":677,"context_line":"    def test_destroy_cached_image_cached_time_is_none("},{"line_number":678,"context_line":"        self, mock_time, mock_walk_vdi_chain,"},{"line_number":679,"context_line":"        mock_destroy_vdi, mock_find_cached_images):"},{"line_number":680,"context_line":"        fake_cached_time \u003d \u00270\u0027"},{"line_number":681,"context_line":"        mock_find_cached_images.return_value \u003d {\u0027fake_image_id\u0027: {"},{"line_number":682,"context_line":"            \u0027vdi_ref\u0027: \u0027fake_vdi_ref\u0027, \u0027cached_time\u0027: fake_cached_time}}"},{"line_number":683,"context_line":"        self.session.call_xenapi.return_value \u003d \u0027fake_uuid\u0027"}],"source_content_type":"text/x-python","patch_set":19,"id":"9f436f4f_accd0c32","line":680,"in_reply_to":"9f436f4f_493eae8c","updated":"2017-08-15 07:06:20.000000000","message":"No, let me change the function name and add a new none test","commit_id":"ac6a2ed195b8953c603e8706f3865be3455eedbd"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"d8f711d02f44eba31be7418649ed3f2d622687b7","unresolved":false,"context_lines":[{"line_number":728,"context_line":"    def test_destroy_cached_image_no_cached_time("},{"line_number":729,"context_line":"        self, mock_time, mock_walk_vdi_chain,"},{"line_number":730,"context_line":"        mock_destroy_vdi, mock_find_cached_images):"},{"line_number":731,"context_line":"        fake_cached_time \u003d \u00270\u0027"},{"line_number":732,"context_line":"        mock_find_cached_images.return_value \u003d {\u0027fake_image_id\u0027: {"},{"line_number":733,"context_line":"            \u0027vdi_ref\u0027: \u0027fake_vdi_ref\u0027, \u0027cached_time\u0027: None}}"},{"line_number":734,"context_line":"        self.session.call_xenapi.return_value \u003d \u0027fake_uuid\u0027"}],"source_content_type":"text/x-python","patch_set":21,"id":"9f436f4f_b8e88b7b","line":731,"updated":"2017-08-16 01:56:03.000000000","message":"Basically pep8 issues don\u0027t need to be pointed out by reviewers because jenkins show these issues clearly and patch owners take care.\nBut this patch still contain these issues like:\n\nhttp://logs.openstack.org/54/465954/20/check/gate-nova-pep8-ubuntu-xenial/fbe23b1/console.html#_2017-08-15_08_31_48_846103\n\n2017-08-15 08:31:48.846103 | ./nova/tests/unit/virt/xenapi/test_vm_utils.py:731:9: F841 local variable \u0027fake_cached_time\u0027 is assigned to but never used","commit_id":"4a1ce1810f007a3ad386dab56d7a23bdac656333"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"e0eea9dbbd8dc6b199e8f6144c6896b1e93b11c9","unresolved":false,"context_lines":[{"line_number":728,"context_line":"    def test_destroy_cached_image_no_cached_time("},{"line_number":729,"context_line":"        self, mock_time, mock_walk_vdi_chain,"},{"line_number":730,"context_line":"        mock_destroy_vdi, mock_find_cached_images):"},{"line_number":731,"context_line":"        fake_cached_time \u003d \u00270\u0027"},{"line_number":732,"context_line":"        mock_find_cached_images.return_value \u003d {\u0027fake_image_id\u0027: {"},{"line_number":733,"context_line":"            \u0027vdi_ref\u0027: \u0027fake_vdi_ref\u0027, \u0027cached_time\u0027: None}}"},{"line_number":734,"context_line":"        self.session.call_xenapi.return_value \u003d \u0027fake_uuid\u0027"}],"source_content_type":"text/x-python","patch_set":21,"id":"9f436f4f_6e336163","line":731,"in_reply_to":"9f436f4f_b8e88b7b","updated":"2017-08-17 01:39:18.000000000","message":"Sorry, just work on it.","commit_id":"4a1ce1810f007a3ad386dab56d7a23bdac656333"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"d8f711d02f44eba31be7418649ed3f2d622687b7","unresolved":false,"context_lines":[{"line_number":746,"context_line":"        mock_time.assert_not_called()"},{"line_number":747,"context_line":"        mock_destroy_vdi.assert_not_called()"},{"line_number":748,"context_line":"        self.assertEqual(expected_return, uuid_return)"},{"line_number":749,"context_line":""},{"line_number":750,"context_line":"class ShutdownTestCase(VMUtilsTestBase):"},{"line_number":751,"context_line":""},{"line_number":752,"context_line":"    def test_hardshutdown_should_return_true_when_vm_is_shutdown(self):"}],"source_content_type":"text/x-python","patch_set":21,"id":"9f436f4f_38fc9b3c","line":749,"updated":"2017-08-16 01:56:03.000000000","message":"need double blank lines like\n\n2017-08-15 08:31:48.846232 | ./nova/tests/unit/virt/xenapi/test_vm_utils.py:750:1: E302 expected 2 blank lines, found 1","commit_id":"4a1ce1810f007a3ad386dab56d7a23bdac656333"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"e0eea9dbbd8dc6b199e8f6144c6896b1e93b11c9","unresolved":false,"context_lines":[{"line_number":746,"context_line":"        mock_time.assert_not_called()"},{"line_number":747,"context_line":"        mock_destroy_vdi.assert_not_called()"},{"line_number":748,"context_line":"        self.assertEqual(expected_return, uuid_return)"},{"line_number":749,"context_line":""},{"line_number":750,"context_line":"class ShutdownTestCase(VMUtilsTestBase):"},{"line_number":751,"context_line":""},{"line_number":752,"context_line":"    def test_hardshutdown_should_return_true_when_vm_is_shutdown(self):"}],"source_content_type":"text/x-python","patch_set":21,"id":"9f436f4f_ee4631c0","line":749,"in_reply_to":"9f436f4f_38fc9b3c","updated":"2017-08-17 01:39:18.000000000","message":"Will fix it","commit_id":"4a1ce1810f007a3ad386dab56d7a23bdac656333"}],"nova/virt/xenapi/vm_utils.py":[{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"c44ab319b0c1f256c70db054626fbf6eb0b08271","unresolved":false,"context_lines":[{"line_number":714,"context_line":""},{"line_number":715,"context_line":""},{"line_number":716,"context_line":"def destroy_cached_images(session, sr_ref, all_cached\u003dFalse, dry_run\u003dFalse,"},{"line_number":717,"context_line":"                          deprecate_time\u003d0):"},{"line_number":718,"context_line":"    \"\"\"Destroy used or unused cached images."},{"line_number":719,"context_line":""},{"line_number":720,"context_line":"    A cached image that is being used by at least one VM is said to be \u0027used\u0027."}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_d1407f0a","line":717,"range":{"start_line":717,"start_character":26,"end_line":717,"end_character":40},"updated":"2017-05-18 13:27:24.000000000","message":"\u003d\u003e keep_days\u003d0?","commit_id":"fc9eb8842fffad6d72e3595ea9ad210514a7b374"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"4f270e856bc041f2adbff318b67eeea7a2ce4c95","unresolved":false,"context_lines":[{"line_number":714,"context_line":""},{"line_number":715,"context_line":""},{"line_number":716,"context_line":"def destroy_cached_images(session, sr_ref, all_cached\u003dFalse, dry_run\u003dFalse,"},{"line_number":717,"context_line":"                          deprecate_time\u003d0):"},{"line_number":718,"context_line":"    \"\"\"Destroy used or unused cached images."},{"line_number":719,"context_line":""},{"line_number":720,"context_line":"    A cached image that is being used by at least one VM is said to be \u0027used\u0027."}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_71f533cb","line":717,"updated":"2017-05-18 13:29:55.000000000","message":"If you\u0027re using days (as per the code) then use \"deprecate_days\" not \"deprecate_time\" - otherwise time should be in seconds.","commit_id":"fc9eb8842fffad6d72e3595ea9ad210514a7b374"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"5ae54e149a9f2b04b942c2db5d94f3d6c9268601","unresolved":false,"context_lines":[{"line_number":714,"context_line":""},{"line_number":715,"context_line":""},{"line_number":716,"context_line":"def destroy_cached_images(session, sr_ref, all_cached\u003dFalse, dry_run\u003dFalse,"},{"line_number":717,"context_line":"                          deprecate_time\u003d0):"},{"line_number":718,"context_line":"    \"\"\"Destroy used or unused cached images."},{"line_number":719,"context_line":""},{"line_number":720,"context_line":"    A cached image that is being used by at least one VM is said to be \u0027used\u0027."}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_701cfb69","line":717,"in_reply_to":"ff0f0b1f_71f533cb","updated":"2017-05-19 00:12:22.000000000","message":"will change to  keep_days","commit_id":"fc9eb8842fffad6d72e3595ea9ad210514a7b374"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"5ae54e149a9f2b04b942c2db5d94f3d6c9268601","unresolved":false,"context_lines":[{"line_number":714,"context_line":""},{"line_number":715,"context_line":""},{"line_number":716,"context_line":"def destroy_cached_images(session, sr_ref, all_cached\u003dFalse, dry_run\u003dFalse,"},{"line_number":717,"context_line":"                          deprecate_time\u003d0):"},{"line_number":718,"context_line":"    \"\"\"Destroy used or unused cached images."},{"line_number":719,"context_line":""},{"line_number":720,"context_line":"    A cached image that is being used by at least one VM is said to be \u0027used\u0027."}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_b0129357","line":717,"range":{"start_line":717,"start_character":26,"end_line":717,"end_character":40},"in_reply_to":"ff0f0b1f_d1407f0a","updated":"2017-05-19 00:12:22.000000000","message":"will change to  keep_days","commit_id":"fc9eb8842fffad6d72e3595ea9ad210514a7b374"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"4f270e856bc041f2adbff318b67eeea7a2ce4c95","unresolved":false,"context_lines":[{"line_number":727,"context_line":"    The default behavior of this function is to destroy only \u0027unused\u0027 cached"},{"line_number":728,"context_line":"    images. To destroy all cached images, use the `all_cached\u003dTrue` kwarg."},{"line_number":729,"context_line":"    \"\"\""},{"line_number":730,"context_line":"    LOG.debug(\"destroy_cached_images\")"},{"line_number":731,"context_line":"    cached_images \u003d _find_cached_images(session, sr_ref)"},{"line_number":732,"context_line":"    destroyed \u003d set()"},{"line_number":733,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_9169e7bf","line":730,"updated":"2017-05-18 13:29:55.000000000","message":"I don\u0027t think there is value in logging entry to methods.","commit_id":"fc9eb8842fffad6d72e3595ea9ad210514a7b374"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"5ae54e149a9f2b04b942c2db5d94f3d6c9268601","unresolved":false,"context_lines":[{"line_number":727,"context_line":"    The default behavior of this function is to destroy only \u0027unused\u0027 cached"},{"line_number":728,"context_line":"    images. To destroy all cached images, use the `all_cached\u003dTrue` kwarg."},{"line_number":729,"context_line":"    \"\"\""},{"line_number":730,"context_line":"    LOG.debug(\"destroy_cached_images\")"},{"line_number":731,"context_line":"    cached_images \u003d _find_cached_images(session, sr_ref)"},{"line_number":732,"context_line":"    destroyed \u003d set()"},{"line_number":733,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_5019f776","line":730,"in_reply_to":"ff0f0b1f_9169e7bf","updated":"2017-05-19 00:12:22.000000000","message":"will remove it","commit_id":"fc9eb8842fffad6d72e3595ea9ad210514a7b374"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"4f270e856bc041f2adbff318b67eeea7a2ce4c95","unresolved":false,"context_lines":[{"line_number":738,"context_line":"        destroyed.add(vdi_uuid)"},{"line_number":739,"context_line":""},{"line_number":740,"context_line":"    for vdi_dict in cached_images.values():"},{"line_number":741,"context_line":"        vdi_uuid \u003d session.call_xenapi(\u0027VDI.get_uuid\u0027, vdi_dict.get(\u0027vdi_ref\u0027))"},{"line_number":742,"context_line":""},{"line_number":743,"context_line":"        if all_cached:"},{"line_number":744,"context_line":"            destroy_cached_vdi(vdi_uuid, vdi_dict.get(\u0027vdi_ref\u0027))"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_71abf3d5","line":741,"updated":"2017-05-18 13:29:55.000000000","message":"if no default use val_dict[\u0027vdi_ref\u0027]","commit_id":"fc9eb8842fffad6d72e3595ea9ad210514a7b374"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"5ae54e149a9f2b04b942c2db5d94f3d6c9268601","unresolved":false,"context_lines":[{"line_number":738,"context_line":"        destroyed.add(vdi_uuid)"},{"line_number":739,"context_line":""},{"line_number":740,"context_line":"    for vdi_dict in cached_images.values():"},{"line_number":741,"context_line":"        vdi_uuid \u003d session.call_xenapi(\u0027VDI.get_uuid\u0027, vdi_dict.get(\u0027vdi_ref\u0027))"},{"line_number":742,"context_line":""},{"line_number":743,"context_line":"        if all_cached:"},{"line_number":744,"context_line":"            destroy_cached_vdi(vdi_uuid, vdi_dict.get(\u0027vdi_ref\u0027))"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_3028c384","line":741,"in_reply_to":"ff0f0b1f_71abf3d5","updated":"2017-05-19 00:12:22.000000000","message":"will modify it","commit_id":"fc9eb8842fffad6d72e3595ea9ad210514a7b374"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"c44ab319b0c1f256c70db054626fbf6eb0b08271","unresolved":false,"context_lines":[{"line_number":759,"context_line":"            if len(children) \u003e 1:"},{"line_number":760,"context_line":"                continue"},{"line_number":761,"context_line":""},{"line_number":762,"context_line":"        cached_time \u003d float(vdi_dict.get(\u0027cached_time\u0027))"},{"line_number":763,"context_line":"        LOG.debug(\"cache time is %i\", cached_time)"},{"line_number":764,"context_line":"        LOG.debug(\"deprecate time is %i\", deprecate_time)"},{"line_number":765,"context_line":"        time_gap \u003d (time.time() - cached_time) / (3600 * 24)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_565c654a","line":762,"updated":"2017-05-18 13:27:24.000000000","message":"if there is no cached_time, float() will raise exception.","commit_id":"fc9eb8842fffad6d72e3595ea9ad210514a7b374"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"5ae54e149a9f2b04b942c2db5d94f3d6c9268601","unresolved":false,"context_lines":[{"line_number":759,"context_line":"            if len(children) \u003e 1:"},{"line_number":760,"context_line":"                continue"},{"line_number":761,"context_line":""},{"line_number":762,"context_line":"        cached_time \u003d float(vdi_dict.get(\u0027cached_time\u0027))"},{"line_number":763,"context_line":"        LOG.debug(\"cache time is %i\", cached_time)"},{"line_number":764,"context_line":"        LOG.debug(\"deprecate time is %i\", deprecate_time)"},{"line_number":765,"context_line":"        time_gap \u003d (time.time() - cached_time) / (3600 * 24)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_d02627b8","line":762,"in_reply_to":"ff0f0b1f_565c654a","updated":"2017-05-19 00:12:22.000000000","message":"will modify it","commit_id":"fc9eb8842fffad6d72e3595ea9ad210514a7b374"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"4f270e856bc041f2adbff318b67eeea7a2ce4c95","unresolved":false,"context_lines":[{"line_number":760,"context_line":"                continue"},{"line_number":761,"context_line":""},{"line_number":762,"context_line":"        cached_time \u003d float(vdi_dict.get(\u0027cached_time\u0027))"},{"line_number":763,"context_line":"        LOG.debug(\"cache time is %i\", cached_time)"},{"line_number":764,"context_line":"        LOG.debug(\"deprecate time is %i\", deprecate_time)"},{"line_number":765,"context_line":"        time_gap \u003d (time.time() - cached_time) / (3600 * 24)"},{"line_number":766,"context_line":"        if cached_time is None or time_gap \u003e deprecate_time:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_f10943dd","line":763,"updated":"2017-05-18 13:29:55.000000000","message":"If we\u0027re logging this, make 1 line and make it more useful.\n\ne.g. \"Image \u003cid\u003e cached at \u003ctime\u003e: Deleting\" or \"Image \u003cid\u003e cached at \u003ctime\u003e: Preserving\"\n\nDeprecate time is only used once, so could be logged at entry (since it\u0027s adding useful information).  At entry could say \"Destroying all cached images\" or \"destroying cahced images older than \u003cdate\u003e\"","commit_id":"fc9eb8842fffad6d72e3595ea9ad210514a7b374"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"5ae54e149a9f2b04b942c2db5d94f3d6c9268601","unresolved":false,"context_lines":[{"line_number":760,"context_line":"                continue"},{"line_number":761,"context_line":""},{"line_number":762,"context_line":"        cached_time \u003d float(vdi_dict.get(\u0027cached_time\u0027))"},{"line_number":763,"context_line":"        LOG.debug(\"cache time is %i\", cached_time)"},{"line_number":764,"context_line":"        LOG.debug(\"deprecate time is %i\", deprecate_time)"},{"line_number":765,"context_line":"        time_gap \u003d (time.time() - cached_time) / (3600 * 24)"},{"line_number":766,"context_line":"        if cached_time is None or time_gap \u003e deprecate_time:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_9038afd3","line":763,"in_reply_to":"ff0f0b1f_f10943dd","updated":"2017-05-19 00:12:22.000000000","message":"will modify it","commit_id":"fc9eb8842fffad6d72e3595ea9ad210514a7b374"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"c44ab319b0c1f256c70db054626fbf6eb0b08271","unresolved":false,"context_lines":[{"line_number":761,"context_line":""},{"line_number":762,"context_line":"        cached_time \u003d float(vdi_dict.get(\u0027cached_time\u0027))"},{"line_number":763,"context_line":"        LOG.debug(\"cache time is %i\", cached_time)"},{"line_number":764,"context_line":"        LOG.debug(\"deprecate time is %i\", deprecate_time)"},{"line_number":765,"context_line":"        time_gap \u003d (time.time() - cached_time) / (3600 * 24)"},{"line_number":766,"context_line":"        if cached_time is None or time_gap \u003e deprecate_time:"},{"line_number":767,"context_line":"            destroy_cached_vdi(vdi_uuid, vdi_dict.get(\u0027vdi_ref\u0027))"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_d61e356f","line":764,"updated":"2017-05-18 13:27:24.000000000","message":"until %i days ago.","commit_id":"fc9eb8842fffad6d72e3595ea9ad210514a7b374"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"5ae54e149a9f2b04b942c2db5d94f3d6c9268601","unresolved":false,"context_lines":[{"line_number":761,"context_line":""},{"line_number":762,"context_line":"        cached_time \u003d float(vdi_dict.get(\u0027cached_time\u0027))"},{"line_number":763,"context_line":"        LOG.debug(\"cache time is %i\", cached_time)"},{"line_number":764,"context_line":"        LOG.debug(\"deprecate time is %i\", deprecate_time)"},{"line_number":765,"context_line":"        time_gap \u003d (time.time() - cached_time) / (3600 * 24)"},{"line_number":766,"context_line":"        if cached_time is None or time_gap \u003e deprecate_time:"},{"line_number":767,"context_line":"            destroy_cached_vdi(vdi_uuid, vdi_dict.get(\u0027vdi_ref\u0027))"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_10525f14","line":764,"in_reply_to":"ff0f0b1f_d61e356f","updated":"2017-05-19 00:12:22.000000000","message":"will modify it","commit_id":"fc9eb8842fffad6d72e3595ea9ad210514a7b374"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"c44ab319b0c1f256c70db054626fbf6eb0b08271","unresolved":false,"context_lines":[{"line_number":762,"context_line":"        cached_time \u003d float(vdi_dict.get(\u0027cached_time\u0027))"},{"line_number":763,"context_line":"        LOG.debug(\"cache time is %i\", cached_time)"},{"line_number":764,"context_line":"        LOG.debug(\"deprecate time is %i\", deprecate_time)"},{"line_number":765,"context_line":"        time_gap \u003d (time.time() - cached_time) / (3600 * 24)"},{"line_number":766,"context_line":"        if cached_time is None or time_gap \u003e deprecate_time:"},{"line_number":767,"context_line":"            destroy_cached_vdi(vdi_uuid, vdi_dict.get(\u0027vdi_ref\u0027))"},{"line_number":768,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_9140c737","line":765,"range":{"start_line":765,"start_character":8,"end_line":765,"end_character":16},"updated":"2017-05-18 13:27:24.000000000","message":"cached_age","commit_id":"fc9eb8842fffad6d72e3595ea9ad210514a7b374"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"5ae54e149a9f2b04b942c2db5d94f3d6c9268601","unresolved":false,"context_lines":[{"line_number":762,"context_line":"        cached_time \u003d float(vdi_dict.get(\u0027cached_time\u0027))"},{"line_number":763,"context_line":"        LOG.debug(\"cache time is %i\", cached_time)"},{"line_number":764,"context_line":"        LOG.debug(\"deprecate time is %i\", deprecate_time)"},{"line_number":765,"context_line":"        time_gap \u003d (time.time() - cached_time) / (3600 * 24)"},{"line_number":766,"context_line":"        if cached_time is None or time_gap \u003e deprecate_time:"},{"line_number":767,"context_line":"            destroy_cached_vdi(vdi_uuid, vdi_dict.get(\u0027vdi_ref\u0027))"},{"line_number":768,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_f056cb06","line":765,"range":{"start_line":765,"start_character":8,"end_line":765,"end_character":16},"in_reply_to":"ff0f0b1f_9140c737","updated":"2017-05-19 00:12:22.000000000","message":"will change it","commit_id":"fc9eb8842fffad6d72e3595ea9ad210514a7b374"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"4f270e856bc041f2adbff318b67eeea7a2ce4c95","unresolved":false,"context_lines":[{"line_number":782,"context_line":"        cached_time \u003d vdi_rec[\u0027other_config\u0027].get(\u0027cached-time\u0027)"},{"line_number":783,"context_line":"        cached_images[image_id] \u003d {\u0027vdi_ref\u0027: vdi_ref,"},{"line_number":784,"context_line":"                                   \u0027cached_time\u0027: cached_time}"},{"line_number":785,"context_line":"        LOG.debug(\"find cached image, cached_time is %i\", cached_time)"},{"line_number":786,"context_line":""},{"line_number":787,"context_line":"    return cached_images"},{"line_number":788,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_b1af4b93","line":785,"updated":"2017-05-18 13:29:55.000000000","message":"\"Found cached image (image_id): Cached at %s\", cached_time (Note: not %i)","commit_id":"fc9eb8842fffad6d72e3595ea9ad210514a7b374"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"5ae54e149a9f2b04b942c2db5d94f3d6c9268601","unresolved":false,"context_lines":[{"line_number":782,"context_line":"        cached_time \u003d vdi_rec[\u0027other_config\u0027].get(\u0027cached-time\u0027)"},{"line_number":783,"context_line":"        cached_images[image_id] \u003d {\u0027vdi_ref\u0027: vdi_ref,"},{"line_number":784,"context_line":"                                   \u0027cached_time\u0027: cached_time}"},{"line_number":785,"context_line":"        LOG.debug(\"find cached image, cached_time is %i\", cached_time)"},{"line_number":786,"context_line":""},{"line_number":787,"context_line":"    return cached_images"},{"line_number":788,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_704abb55","line":785,"in_reply_to":"ff0f0b1f_b1af4b93","updated":"2017-05-19 00:12:22.000000000","message":"will modify it","commit_id":"fc9eb8842fffad6d72e3595ea9ad210514a7b374"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"c44ab319b0c1f256c70db054626fbf6eb0b08271","unresolved":false,"context_lines":[{"line_number":1244,"context_line":"            session.call_xenapi(\u0027VDI.add_to_other_config\u0027,"},{"line_number":1245,"context_line":"                                cache_vdi_ref, \u0027image-id\u0027, str(image_id))"},{"line_number":1246,"context_line":"            session.call_xenapi(\u0027VDI.add_to_other_config\u0027,"},{"line_number":1247,"context_line":"                                cache_vdi_ref, \u0027cached-time\u0027, str(time.time()))"},{"line_number":1248,"context_line":""},{"line_number":1249,"context_line":"        if CONF.use_cow_images:"},{"line_number":1250,"context_line":"            new_vdi_ref \u003d _clone_vdi(session, cache_vdi_ref)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_f1882372","line":1247,"range":{"start_line":1247,"start_character":62,"end_line":1247,"end_character":77},"updated":"2017-05-18 13:27:24.000000000","message":"str(int(time.time()))","commit_id":"fc9eb8842fffad6d72e3595ea9ad210514a7b374"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"5ae54e149a9f2b04b942c2db5d94f3d6c9268601","unresolved":false,"context_lines":[{"line_number":1244,"context_line":"            session.call_xenapi(\u0027VDI.add_to_other_config\u0027,"},{"line_number":1245,"context_line":"                                cache_vdi_ref, \u0027image-id\u0027, str(image_id))"},{"line_number":1246,"context_line":"            session.call_xenapi(\u0027VDI.add_to_other_config\u0027,"},{"line_number":1247,"context_line":"                                cache_vdi_ref, \u0027cached-time\u0027, str(time.time()))"},{"line_number":1248,"context_line":""},{"line_number":1249,"context_line":"        if CONF.use_cow_images:"},{"line_number":1250,"context_line":"            new_vdi_ref \u003d _clone_vdi(session, cache_vdi_ref)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_307683a6","line":1247,"range":{"start_line":1247,"start_character":62,"end_line":1247,"end_character":77},"in_reply_to":"ff0f0b1f_f1882372","updated":"2017-05-19 00:12:22.000000000","message":"will modify it","commit_id":"fc9eb8842fffad6d72e3595ea9ad210514a7b374"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"c44ab319b0c1f256c70db054626fbf6eb0b08271","unresolved":false,"context_lines":[{"line_number":1281,"context_line":""},{"line_number":1282,"context_line":"    Returns: A list of dictionaries that describe VDIs"},{"line_number":1283,"context_line":"    \"\"\""},{"line_number":1284,"context_line":"    LOG.debug(\u0027create_image in\u0027)"},{"line_number":1285,"context_line":"    cache_images \u003d CONF.xenserver.cache_images.lower()"},{"line_number":1286,"context_line":""},{"line_number":1287,"context_line":"    # Determine if the image is cacheable"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_b1f74bf6","line":1284,"range":{"start_line":1284,"start_character":15,"end_line":1284,"end_character":30},"updated":"2017-05-18 13:27:24.000000000","message":"\u003d\u003e In create_image(). So keep this not touched.","commit_id":"fc9eb8842fffad6d72e3595ea9ad210514a7b374"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"5ae54e149a9f2b04b942c2db5d94f3d6c9268601","unresolved":false,"context_lines":[{"line_number":1281,"context_line":""},{"line_number":1282,"context_line":"    Returns: A list of dictionaries that describe VDIs"},{"line_number":1283,"context_line":"    \"\"\""},{"line_number":1284,"context_line":"    LOG.debug(\u0027create_image in\u0027)"},{"line_number":1285,"context_line":"    cache_images \u003d CONF.xenserver.cache_images.lower()"},{"line_number":1286,"context_line":""},{"line_number":1287,"context_line":"    # Determine if the image is cacheable"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_107b7f8c","line":1284,"range":{"start_line":1284,"start_character":15,"end_line":1284,"end_character":30},"in_reply_to":"ff0f0b1f_b1f74bf6","updated":"2017-05-19 00:12:22.000000000","message":"will remove it","commit_id":"fc9eb8842fffad6d72e3595ea9ad210514a7b374"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"991b123cdc74aeb2a13fb10c078c82301de19678","unresolved":false,"context_lines":[{"line_number":761,"context_line":"                continue"},{"line_number":762,"context_line":""},{"line_number":763,"context_line":"        cached_time \u003d vdi_dict.get(\u0027cached_time\u0027)"},{"line_number":764,"context_line":"        if cached_time is None or \\"},{"line_number":765,"context_line":"           (int(time.time()) - int(cached_time)) / (3600 * 24) \u003e keep_days:"},{"line_number":766,"context_line":"            destroy_cached_vdi(vdi_uuid, vdi_dict.get(\u0027vdi_ref\u0027))"},{"line_number":767,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"df3967d1_78504c5e","line":764,"updated":"2017-08-02 09:23:47.000000000","message":"We shouldn\u0027t delete images with no cached_time","commit_id":"745e197b39605b9e0e039b62c3389d5c370d605b"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"a1ca9f0d5e849325dca2a48bcf6a76a325d5928b","unresolved":false,"context_lines":[{"line_number":739,"context_line":"        destroyed.add(vdi_uuid)"},{"line_number":740,"context_line":""},{"line_number":741,"context_line":"    for vdi_dict in cached_images.values():"},{"line_number":742,"context_line":"        vdi_uuid \u003d session.call_xenapi(\u0027VDI.get_uuid\u0027, vdi_dict[\u0027vdi_ref\u0027])"},{"line_number":743,"context_line":""},{"line_number":744,"context_line":"        if all_cached:"},{"line_number":745,"context_line":"            destroy_cached_vdi(vdi_uuid, vdi_dict[\u0027vdi_ref\u0027])"}],"source_content_type":"text/x-python","patch_set":18,"id":"9f436f4f_b6897c27","line":742,"range":{"start_line":742,"start_character":55,"end_line":742,"end_character":74},"updated":"2017-08-08 17:18:46.000000000","message":"nit: vdi_ref is extracted 3 times in this change, so it is better to define the value like\n\n vdi_ref \u003d vdi_dict[\u0027vdi_ref\u0027]\n\nand use it at the places without doing the same thing.","commit_id":"faa08cccd007a28d38700c205330b31a81c3af5c"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"a1ca9f0d5e849325dca2a48bcf6a76a325d5928b","unresolved":false,"context_lines":[{"line_number":742,"context_line":"        vdi_uuid \u003d session.call_xenapi(\u0027VDI.get_uuid\u0027, vdi_dict[\u0027vdi_ref\u0027])"},{"line_number":743,"context_line":""},{"line_number":744,"context_line":"        if all_cached:"},{"line_number":745,"context_line":"            destroy_cached_vdi(vdi_uuid, vdi_dict[\u0027vdi_ref\u0027])"},{"line_number":746,"context_line":"            continue"},{"line_number":747,"context_line":""},{"line_number":748,"context_line":"        # Unused-Only: Search for siblings"}],"source_content_type":"text/x-python","patch_set":18,"id":"9f436f4f_76831406","line":745,"range":{"start_line":745,"start_character":41,"end_line":745,"end_character":60},"updated":"2017-08-08 17:18:46.000000000","message":"ditto","commit_id":"faa08cccd007a28d38700c205330b31a81c3af5c"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"a1ca9f0d5e849325dca2a48bcf6a76a325d5928b","unresolved":false,"context_lines":[{"line_number":760,"context_line":"            if len(children) \u003e 1:"},{"line_number":761,"context_line":"                continue"},{"line_number":762,"context_line":""},{"line_number":763,"context_line":"        cached_time \u003d vdi_dict.get(\u0027cached_time\u0027)"},{"line_number":764,"context_line":"        if (int(time.time()) - int(cached_time)) / (3600 * 24) \u003e keep_days:"},{"line_number":765,"context_line":"            destroy_cached_vdi(vdi_uuid, vdi_dict.get(\u0027vdi_ref\u0027))"},{"line_number":766,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"9f436f4f_f6c4a442","line":763,"range":{"start_line":763,"start_character":22,"end_line":763,"end_character":49},"updated":"2017-08-08 17:18:46.000000000","message":"Can we use\n\n cached_time \u003d vdi_dict[\u0027cached_time\u0027]\n\ninstead?\n\nMy concern is the following int(cached_time) will cause an exception if the key cached_time doesn\u0027t exist, and that makes debugging a little difficult. If we can expect the key should exist always, it is better to avoid using get().","commit_id":"faa08cccd007a28d38700c205330b31a81c3af5c"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"a1ca9f0d5e849325dca2a48bcf6a76a325d5928b","unresolved":false,"context_lines":[{"line_number":762,"context_line":""},{"line_number":763,"context_line":"        cached_time \u003d vdi_dict.get(\u0027cached_time\u0027)"},{"line_number":764,"context_line":"        if (int(time.time()) - int(cached_time)) / (3600 * 24) \u003e keep_days:"},{"line_number":765,"context_line":"            destroy_cached_vdi(vdi_uuid, vdi_dict.get(\u0027vdi_ref\u0027))"},{"line_number":766,"context_line":""},{"line_number":767,"context_line":"    return destroyed"},{"line_number":768,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"9f436f4f_5688101e","line":765,"range":{"start_line":765,"start_character":41,"end_line":765,"end_character":64},"updated":"2017-08-08 17:18:46.000000000","message":"ditto","commit_id":"faa08cccd007a28d38700c205330b31a81c3af5c"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"e830edb9be1a4d4e403db4a6cafd13e1fcb38656","unresolved":false,"context_lines":[{"line_number":762,"context_line":"                continue"},{"line_number":763,"context_line":""},{"line_number":764,"context_line":"        cached_time \u003d vdi_dict[\u0027cached_time\u0027]"},{"line_number":765,"context_line":"        if (int(time.time()) - int(cached_time)) / (3600 * 24) \u003e keep_days:"},{"line_number":766,"context_line":"            destroy_cached_vdi(vdi_uuid, vdi_ref)"},{"line_number":767,"context_line":""},{"line_number":768,"context_line":"    return destroyed"}],"source_content_type":"text/x-python","patch_set":19,"id":"9f436f4f_29580af8","line":765,"updated":"2017-08-14 08:22:23.000000000","message":"We do need the None check here, because the dictionary can contain \"{\u0027cached_time\u0027: None}\"","commit_id":"ac6a2ed195b8953c603e8706f3865be3455eedbd"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"dc1698685609ba8665c43e3a9049447eaa1f2596","unresolved":false,"context_lines":[{"line_number":762,"context_line":"                continue"},{"line_number":763,"context_line":""},{"line_number":764,"context_line":"        cached_time \u003d vdi_dict[\u0027cached_time\u0027]"},{"line_number":765,"context_line":"        if (int(time.time()) - int(cached_time)) / (3600 * 24) \u003e keep_days:"},{"line_number":766,"context_line":"            destroy_cached_vdi(vdi_uuid, vdi_ref)"},{"line_number":767,"context_line":""},{"line_number":768,"context_line":"    return destroyed"}],"source_content_type":"text/x-python","patch_set":19,"id":"9f436f4f_610ce6eb","line":765,"in_reply_to":"9f436f4f_29580af8","updated":"2017-08-15 07:06:20.000000000","message":"Will add it","commit_id":"ac6a2ed195b8953c603e8706f3865be3455eedbd"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"e830edb9be1a4d4e403db4a6cafd13e1fcb38656","unresolved":false,"context_lines":[{"line_number":777,"context_line":"        except KeyError:"},{"line_number":778,"context_line":"            continue"},{"line_number":779,"context_line":""},{"line_number":780,"context_line":"        cached_time \u003d vdi_rec[\u0027other_config\u0027].get(\u0027cached-time\u0027)"},{"line_number":781,"context_line":"        cached_images[image_id] \u003d {\u0027vdi_ref\u0027: vdi_ref,"},{"line_number":782,"context_line":"                                   \u0027cached_time\u0027: cached_time}"},{"line_number":783,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"9f436f4f_a952badc","line":780,"updated":"2017-08-14 08:22:23.000000000","message":"This will mean that the dict contains \"None\" as the cached time - which will fail at line 765 now.","commit_id":"ac6a2ed195b8953c603e8706f3865be3455eedbd"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"8077ebc7abd3a7376d9509ddd27f6b2621a6833e","unresolved":false,"context_lines":[{"line_number":766,"context_line":"            if (int(time.time()) - int(cached_time)) / (3600 * 24) \u003e keep_days:"},{"line_number":767,"context_line":"                destroy_cached_vdi(vdi_uuid, vdi_ref)"},{"line_number":768,"context_line":"        else:"},{"line_number":769,"context_line":"            LOG.debug(\"vid %s can\u0027t be destroyed because the create time is\""},{"line_number":770,"context_line":"                      \" not specified\", vdi_uuid)"},{"line_number":771,"context_line":""},{"line_number":772,"context_line":"    return destroyed"}],"source_content_type":"text/x-python","patch_set":20,"id":"9f436f4f_f66e31fe","line":769,"range":{"start_line":769,"start_character":61,"end_line":769,"end_character":72},"updated":"2017-08-15 16:48:55.000000000","message":"s/create time/cached_time/","commit_id":"7ef7020819efbe7cf8a713fbe9194f69b5bfc44f"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"8077ebc7abd3a7376d9509ddd27f6b2621a6833e","unresolved":false,"context_lines":[{"line_number":766,"context_line":"            if (int(time.time()) - int(cached_time)) / (3600 * 24) \u003e keep_days:"},{"line_number":767,"context_line":"                destroy_cached_vdi(vdi_uuid, vdi_ref)"},{"line_number":768,"context_line":"        else:"},{"line_number":769,"context_line":"            LOG.debug(\"vid %s can\u0027t be destroyed because the create time is\""},{"line_number":770,"context_line":"                      \" not specified\", vdi_uuid)"},{"line_number":771,"context_line":""},{"line_number":772,"context_line":"    return destroyed"}],"source_content_type":"text/x-python","patch_set":20,"id":"9f436f4f_d6b44d82","line":769,"range":{"start_line":769,"start_character":23,"end_line":769,"end_character":26},"updated":"2017-08-15 16:48:55.000000000","message":"s/vid/vdi/","commit_id":"7ef7020819efbe7cf8a713fbe9194f69b5bfc44f"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"51de808aa993cb32cac2af35507f0ac7a8486c7b","unresolved":false,"context_lines":[{"line_number":766,"context_line":"            if (int(time.time()) - int(cached_time)) / (3600 * 24) \u003e keep_days:"},{"line_number":767,"context_line":"                destroy_cached_vdi(vdi_uuid, vdi_ref)"},{"line_number":768,"context_line":"        else:"},{"line_number":769,"context_line":"            LOG.debug(\"vid %s can\u0027t be destroyed because the create time is\""},{"line_number":770,"context_line":"                      \" not specified\", vdi_uuid)"},{"line_number":771,"context_line":""},{"line_number":772,"context_line":"    return destroyed"}],"source_content_type":"text/x-python","patch_set":20,"id":"9f436f4f_18ed57b6","line":769,"range":{"start_line":769,"start_character":61,"end_line":769,"end_character":72},"in_reply_to":"9f436f4f_f66e31fe","updated":"2017-08-16 01:45:51.000000000","message":"Will modify it","commit_id":"7ef7020819efbe7cf8a713fbe9194f69b5bfc44f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2a72ec23c12c58fc31b496d8c634272ed071c9e5","unresolved":false,"context_lines":[{"line_number":716,"context_line":""},{"line_number":717,"context_line":""},{"line_number":718,"context_line":"def destroy_cached_images(session, sr_ref, all_cached\u003dFalse, dry_run\u003dFalse,"},{"line_number":719,"context_line":"                          keep_days\u003d0):"},{"line_number":720,"context_line":"    \"\"\"Destroy used or unused cached images."},{"line_number":721,"context_line":""},{"line_number":722,"context_line":"    A cached image that is being used by at least one VM is said to be \u0027used\u0027."}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_2b2e9191","line":719,"range":{"start_line":719,"start_character":26,"end_line":719,"end_character":37},"updated":"2017-08-29 20:50:19.000000000","message":"Mention this in the docstring like the other kwargs.","commit_id":"d0306c21852dd5d28897805c22a7bdfe96284d40"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"2c098c1fbbf996dd561fb638f5750a4f771b9797","unresolved":false,"context_lines":[{"line_number":716,"context_line":""},{"line_number":717,"context_line":""},{"line_number":718,"context_line":"def destroy_cached_images(session, sr_ref, all_cached\u003dFalse, dry_run\u003dFalse,"},{"line_number":719,"context_line":"                          keep_days\u003d0):"},{"line_number":720,"context_line":"    \"\"\"Destroy used or unused cached images."},{"line_number":721,"context_line":""},{"line_number":722,"context_line":"    A cached image that is being used by at least one VM is said to be \u0027used\u0027."}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_020baf23","line":719,"range":{"start_line":719,"start_character":26,"end_line":719,"end_character":37},"in_reply_to":"7f287b81_2b2e9191","updated":"2017-08-30 03:19:38.000000000","message":"Will add it","commit_id":"d0306c21852dd5d28897805c22a7bdfe96284d40"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2a72ec23c12c58fc31b496d8c634272ed071c9e5","unresolved":false,"context_lines":[{"line_number":763,"context_line":""},{"line_number":764,"context_line":"        cached_time \u003d vdi_dict.get(\u0027cached_time\u0027)"},{"line_number":765,"context_line":"        if cached_time is not None:"},{"line_number":766,"context_line":"            if (int(time.time()) - int(cached_time)) / (3600 * 24) \u003e keep_days:"},{"line_number":767,"context_line":"                destroy_cached_vdi(vdi_uuid, vdi_ref)"},{"line_number":768,"context_line":"        else:"},{"line_number":769,"context_line":"            LOG.debug(\"vdi %s can\u0027t be destroyed because the cached time is\""}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_8b1b4571","line":766,"range":{"start_line":766,"start_character":69,"end_line":766,"end_character":78},"updated":"2017-08-29 20:50:19.000000000","message":"This defaults to 0, as the kwarg and in the script, so won\u0027t this always remove cached images if we get here? Shouldn\u0027t we only do this if keep_days \u003e 0?","commit_id":"d0306c21852dd5d28897805c22a7bdfe96284d40"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f8130415adf726730cd767e386b5dea1580e64fd","unresolved":false,"context_lines":[{"line_number":763,"context_line":""},{"line_number":764,"context_line":"        cached_time \u003d vdi_dict.get(\u0027cached_time\u0027)"},{"line_number":765,"context_line":"        if cached_time is not None:"},{"line_number":766,"context_line":"            if (int(time.time()) - int(cached_time)) / (3600 * 24) \u003e keep_days:"},{"line_number":767,"context_line":"                destroy_cached_vdi(vdi_uuid, vdi_ref)"},{"line_number":768,"context_line":"        else:"},{"line_number":769,"context_line":"            LOG.debug(\"vdi %s can\u0027t be destroyed because the cached time is\""}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_82776a09","line":766,"range":{"start_line":766,"start_character":69,"end_line":766,"end_character":78},"in_reply_to":"7f287b81_22210ba0","updated":"2017-08-31 18:54:42.000000000","message":"\u003e\u003d doesn\u0027t make a difference here since this is checked when cached_time is not None, so it\u0027s going to always be \u003e 0. My point is, deleting all cached images by default should be clearly stated. However, it looks like that what the script did anyway before this change, so this is just being backward compatible. I didn\u0027t make that connection when I commented on this previously.","commit_id":"d0306c21852dd5d28897805c22a7bdfe96284d40"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"93fff04070a0a0325b9185dd38601e035b21b37d","unresolved":false,"context_lines":[{"line_number":763,"context_line":""},{"line_number":764,"context_line":"        cached_time \u003d vdi_dict.get(\u0027cached_time\u0027)"},{"line_number":765,"context_line":"        if cached_time is not None:"},{"line_number":766,"context_line":"            if (int(time.time()) - int(cached_time)) / (3600 * 24) \u003e keep_days:"},{"line_number":767,"context_line":"                destroy_cached_vdi(vdi_uuid, vdi_ref)"},{"line_number":768,"context_line":"        else:"},{"line_number":769,"context_line":"            LOG.debug(\"vdi %s can\u0027t be destroyed because the cached time is\""}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_1a119a54","line":766,"range":{"start_line":766,"start_character":69,"end_line":766,"end_character":78},"in_reply_to":"7f287b81_82776a09","updated":"2017-09-01 05:57:31.000000000","message":"Yes, Matt, if the user doesn\u0027t set \"keep_days\", it would completely same with its previous behavior. \nAnyway, it should be better to let them notice that. Let me add a tip in the description of the function :)","commit_id":"d0306c21852dd5d28897805c22a7bdfe96284d40"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"2c098c1fbbf996dd561fb638f5750a4f771b9797","unresolved":false,"context_lines":[{"line_number":763,"context_line":""},{"line_number":764,"context_line":"        cached_time \u003d vdi_dict.get(\u0027cached_time\u0027)"},{"line_number":765,"context_line":"        if cached_time is not None:"},{"line_number":766,"context_line":"            if (int(time.time()) - int(cached_time)) / (3600 * 24) \u003e keep_days:"},{"line_number":767,"context_line":"                destroy_cached_vdi(vdi_uuid, vdi_ref)"},{"line_number":768,"context_line":"        else:"},{"line_number":769,"context_line":"            LOG.debug(\"vdi %s can\u0027t be destroyed because the cached time is\""}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_22210ba0","line":766,"range":{"start_line":766,"start_character":69,"end_line":766,"end_character":78},"in_reply_to":"7f287b81_8b1b4571","updated":"2017-08-30 03:19:38.000000000","message":"Hi, Matt, if the user didn\u0027t pass keep_days in, I think they\u0027d like to destroy all the cached images. How about changing it to \"\u003e\u003d keep_days\"?","commit_id":"d0306c21852dd5d28897805c22a7bdfe96284d40"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2a72ec23c12c58fc31b496d8c634272ed071c9e5","unresolved":false,"context_lines":[{"line_number":773,"context_line":""},{"line_number":774,"context_line":""},{"line_number":775,"context_line":"def _find_cached_images(session, sr_ref):"},{"line_number":776,"context_line":"    \"\"\"Return a dict(uuid\u003dvdi_ref) representing all cached images.\"\"\""},{"line_number":777,"context_line":"    cached_images \u003d {}"},{"line_number":778,"context_line":"    for vdi_ref, vdi_rec in _get_all_vdis_in_sr(session, sr_ref):"},{"line_number":779,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_d079fcc7","line":776,"range":{"start_line":776,"start_character":16,"end_line":776,"end_character":34},"updated":"2017-08-29 20:50:19.000000000","message":"This should be updated.","commit_id":"d0306c21852dd5d28897805c22a7bdfe96284d40"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"2c098c1fbbf996dd561fb638f5750a4f771b9797","unresolved":false,"context_lines":[{"line_number":773,"context_line":""},{"line_number":774,"context_line":""},{"line_number":775,"context_line":"def _find_cached_images(session, sr_ref):"},{"line_number":776,"context_line":"    \"\"\"Return a dict(uuid\u003dvdi_ref) representing all cached images.\"\"\""},{"line_number":777,"context_line":"    cached_images \u003d {}"},{"line_number":778,"context_line":"    for vdi_ref, vdi_rec in _get_all_vdis_in_sr(session, sr_ref):"},{"line_number":779,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_822f9f86","line":776,"range":{"start_line":776,"start_character":16,"end_line":776,"end_character":34},"in_reply_to":"7f287b81_d079fcc7","updated":"2017-08-30 03:19:38.000000000","message":"will do it","commit_id":"d0306c21852dd5d28897805c22a7bdfe96284d40"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"f9b4720dad244866637724064cc5be29418c37de","unresolved":false,"context_lines":[{"line_number":777,"context_line":""},{"line_number":778,"context_line":""},{"line_number":779,"context_line":"def _find_cached_images(session, sr_ref):"},{"line_number":780,"context_line":"    \"\"\"Return a dict(uuid\u003dvdi_ref, time\u003dcached_time) representing all cached"},{"line_number":781,"context_line":"    images."},{"line_number":782,"context_line":"    \"\"\""},{"line_number":783,"context_line":"    cached_images \u003d {}"}],"source_content_type":"text/x-python","patch_set":32,"id":"7f287b81_8bb43ef3","line":780,"range":{"start_line":780,"start_character":16,"end_line":780,"end_character":52},"updated":"2017-08-31 01:35:50.000000000","message":"This seems not match the changed source code.","commit_id":"3b6940f1968ac639cd1da00eb4778303aed193e4"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"eed1e7c420a7451b27a0324ee333f96104cf3b04","unresolved":false,"context_lines":[{"line_number":728,"context_line":""},{"line_number":729,"context_line":"    The default behavior of this function is to destroy only \u0027unused\u0027 cached"},{"line_number":730,"context_line":"    images. To destroy all cached images, use the `all_cached\u003dTrue` kwarg."},{"line_number":731,"context_line":"    `keep_days` is introduced to destroy images based on when they were"},{"line_number":732,"context_line":"    created. Only the images which were created `keep_days` ago will be"},{"line_number":733,"context_line":"    deleted if the argu has been set."},{"line_number":734,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":33,"id":"7f287b81_576ef4c8","line":731,"updated":"2017-08-31 08:40:40.000000000","message":"Nit: Should have a newline before `keep_days`.","commit_id":"d0189aa7ceb633141958262c318dbd5cb66f0f97"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a8ba5efa4696e2816b6de7aea23f5b232b14279f","unresolved":false,"context_lines":[{"line_number":728,"context_line":""},{"line_number":729,"context_line":"    The default behavior of this function is to destroy only \u0027unused\u0027 cached"},{"line_number":730,"context_line":"    images. To destroy all cached images, use the `all_cached\u003dTrue` kwarg."},{"line_number":731,"context_line":"    `keep_days` is introduced to destroy images based on when they were"},{"line_number":732,"context_line":"    created. Only the images which were created `keep_days` ago will be"},{"line_number":733,"context_line":"    deleted if the argu has been set."},{"line_number":734,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":33,"id":"7f287b81_62ca3e1b","line":731,"range":{"start_line":731,"start_character":19,"end_line":731,"end_character":29},"updated":"2017-08-31 19:01:28.000000000","message":"s/introduced/used/\n\nIt won\u0027t be introduced in 2 years time.","commit_id":"d0189aa7ceb633141958262c318dbd5cb66f0f97"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"a7ea15349d63b832cee52ec2055f117c04c883c5","unresolved":false,"context_lines":[{"line_number":728,"context_line":""},{"line_number":729,"context_line":"    The default behavior of this function is to destroy only \u0027unused\u0027 cached"},{"line_number":730,"context_line":"    images. To destroy all cached images, use the `all_cached\u003dTrue` kwarg."},{"line_number":731,"context_line":"    `keep_days` is introduced to destroy images based on when they were"},{"line_number":732,"context_line":"    created. Only the images which were created `keep_days` ago will be"},{"line_number":733,"context_line":"    deleted if the argu has been set."},{"line_number":734,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":33,"id":"7f287b81_ff1fe06d","line":731,"in_reply_to":"7f287b81_576ef4c8","updated":"2017-09-01 05:51:38.000000000","message":"Will add it","commit_id":"d0189aa7ceb633141958262c318dbd5cb66f0f97"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"a7ea15349d63b832cee52ec2055f117c04c883c5","unresolved":false,"context_lines":[{"line_number":728,"context_line":""},{"line_number":729,"context_line":"    The default behavior of this function is to destroy only \u0027unused\u0027 cached"},{"line_number":730,"context_line":"    images. To destroy all cached images, use the `all_cached\u003dTrue` kwarg."},{"line_number":731,"context_line":"    `keep_days` is introduced to destroy images based on when they were"},{"line_number":732,"context_line":"    created. Only the images which were created `keep_days` ago will be"},{"line_number":733,"context_line":"    deleted if the argu has been set."},{"line_number":734,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":33,"id":"7f287b81_9f18dc84","line":731,"range":{"start_line":731,"start_character":19,"end_line":731,"end_character":29},"in_reply_to":"7f287b81_62ca3e1b","updated":"2017-09-01 05:51:38.000000000","message":"Will change it","commit_id":"d0189aa7ceb633141958262c318dbd5cb66f0f97"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a8ba5efa4696e2816b6de7aea23f5b232b14279f","unresolved":false,"context_lines":[{"line_number":730,"context_line":"    images. To destroy all cached images, use the `all_cached\u003dTrue` kwarg."},{"line_number":731,"context_line":"    `keep_days` is introduced to destroy images based on when they were"},{"line_number":732,"context_line":"    created. Only the images which were created `keep_days` ago will be"},{"line_number":733,"context_line":"    deleted if the argu has been set."},{"line_number":734,"context_line":"    \"\"\""},{"line_number":735,"context_line":"    cached_images \u003d _find_cached_images(session, sr_ref)"},{"line_number":736,"context_line":"    destroyed \u003d set()"}],"source_content_type":"text/x-python","patch_set":33,"id":"7f287b81_42cf4229","line":733,"range":{"start_line":733,"start_character":19,"end_line":733,"end_character":23},"updated":"2017-08-31 19:01:28.000000000","message":"argument","commit_id":"d0189aa7ceb633141958262c318dbd5cb66f0f97"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"a7ea15349d63b832cee52ec2055f117c04c883c5","unresolved":false,"context_lines":[{"line_number":730,"context_line":"    images. To destroy all cached images, use the `all_cached\u003dTrue` kwarg."},{"line_number":731,"context_line":"    `keep_days` is introduced to destroy images based on when they were"},{"line_number":732,"context_line":"    created. Only the images which were created `keep_days` ago will be"},{"line_number":733,"context_line":"    deleted if the argu has been set."},{"line_number":734,"context_line":"    \"\"\""},{"line_number":735,"context_line":"    cached_images \u003d _find_cached_images(session, sr_ref)"},{"line_number":736,"context_line":"    destroyed \u003d set()"}],"source_content_type":"text/x-python","patch_set":33,"id":"7f287b81_9f2fbca6","line":733,"range":{"start_line":733,"start_character":19,"end_line":733,"end_character":23},"in_reply_to":"7f287b81_42cf4229","updated":"2017-09-01 05:51:38.000000000","message":"will modify it~","commit_id":"d0189aa7ceb633141958262c318dbd5cb66f0f97"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a8ba5efa4696e2816b6de7aea23f5b232b14279f","unresolved":false,"context_lines":[{"line_number":767,"context_line":"        cached_time \u003d vdi_dict.get(\u0027cached_time\u0027)"},{"line_number":768,"context_line":"        if cached_time is not None:"},{"line_number":769,"context_line":"            if (int(time.time()) - int(cached_time)) / (3600 * 24) \\"},{"line_number":770,"context_line":"               \u003e\u003d keep_days:"},{"line_number":771,"context_line":"                destroy_cached_vdi(vdi_uuid, vdi_ref)"},{"line_number":772,"context_line":"        else:"},{"line_number":773,"context_line":"            LOG.debug(\"vdi %s can\u0027t be destroyed because the cached time is\""}],"source_content_type":"text/x-python","patch_set":33,"id":"7f287b81_c2e212a1","line":770,"range":{"start_line":770,"start_character":15,"end_line":770,"end_character":17},"updated":"2017-08-31 19:01:28.000000000","message":"As noted in PS31, \u003e\u003d doesn\u0027t do anything here besides what \u003e does, since if cached_time is not None, it\u0027s going to be \u003e 0.","commit_id":"d0189aa7ceb633141958262c318dbd5cb66f0f97"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"03f866db1c8bbf271942808ed0c334a80b0b418e","unresolved":false,"context_lines":[{"line_number":767,"context_line":"        cached_time \u003d vdi_dict.get(\u0027cached_time\u0027)"},{"line_number":768,"context_line":"        if cached_time is not None:"},{"line_number":769,"context_line":"            if (int(time.time()) - int(cached_time)) / (3600 * 24) \\"},{"line_number":770,"context_line":"               \u003e\u003d keep_days:"},{"line_number":771,"context_line":"                destroy_cached_vdi(vdi_uuid, vdi_ref)"},{"line_number":772,"context_line":"        else:"},{"line_number":773,"context_line":"            LOG.debug(\"vdi %s can\u0027t be destroyed because the cached time is\""}],"source_content_type":"text/x-python","patch_set":33,"id":"7f287b81_1c750cfb","line":770,"range":{"start_line":770,"start_character":15,"end_line":770,"end_character":17},"in_reply_to":"7f287b81_1f5e2c45","updated":"2017-09-01 15:40:51.000000000","message":"I think \u003e\u003d is right here: If it was created between 1 and 2 days ago then the formula will give \u00271\u0027.\nIf we asked keep_days to be \"1\" then the image should be deleted, so we need the \u003e\u003d?","commit_id":"d0189aa7ceb633141958262c318dbd5cb66f0f97"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"a7ea15349d63b832cee52ec2055f117c04c883c5","unresolved":false,"context_lines":[{"line_number":767,"context_line":"        cached_time \u003d vdi_dict.get(\u0027cached_time\u0027)"},{"line_number":768,"context_line":"        if cached_time is not None:"},{"line_number":769,"context_line":"            if (int(time.time()) - int(cached_time)) / (3600 * 24) \\"},{"line_number":770,"context_line":"               \u003e\u003d keep_days:"},{"line_number":771,"context_line":"                destroy_cached_vdi(vdi_uuid, vdi_ref)"},{"line_number":772,"context_line":"        else:"},{"line_number":773,"context_line":"            LOG.debug(\"vdi %s can\u0027t be destroyed because the cached time is\""}],"source_content_type":"text/x-python","patch_set":33,"id":"7f287b81_1f5e2c45","line":770,"range":{"start_line":770,"start_character":15,"end_line":770,"end_character":17},"in_reply_to":"7f287b81_c2e212a1","updated":"2017-09-01 05:51:38.000000000","message":"Hi, Matt. If the created time is less than one day, the formula \"(int(time.time()) - int(cached_time)) / (3600 * 24)\" will return 0, so \"\u003e\u003d\" may be needed.","commit_id":"d0189aa7ceb633141958262c318dbd5cb66f0f97"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"eed1e7c420a7451b27a0324ee333f96104cf3b04","unresolved":false,"context_lines":[{"line_number":777,"context_line":""},{"line_number":778,"context_line":""},{"line_number":779,"context_line":"def _find_cached_images(session, sr_ref):"},{"line_number":780,"context_line":"    \"\"\"Return a dict{image_id: {\u0027vdi_ref\u0027: vdi_ref, \u0027cached_time\u0027:"},{"line_number":781,"context_line":"    cached_time}} representing all cached images."},{"line_number":782,"context_line":"    \"\"\""},{"line_number":783,"context_line":"    cached_images \u003d {}"}],"source_content_type":"text/x-python","patch_set":33,"id":"7f287b81_979d7cbd","line":780,"range":{"start_line":780,"start_character":19,"end_line":780,"end_character":21},"updated":"2017-08-31 08:40:40.000000000","message":"Nit: add space","commit_id":"d0189aa7ceb633141958262c318dbd5cb66f0f97"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"a7ea15349d63b832cee52ec2055f117c04c883c5","unresolved":false,"context_lines":[{"line_number":777,"context_line":""},{"line_number":778,"context_line":""},{"line_number":779,"context_line":"def _find_cached_images(session, sr_ref):"},{"line_number":780,"context_line":"    \"\"\"Return a dict{image_id: {\u0027vdi_ref\u0027: vdi_ref, \u0027cached_time\u0027:"},{"line_number":781,"context_line":"    cached_time}} representing all cached images."},{"line_number":782,"context_line":"    \"\"\""},{"line_number":783,"context_line":"    cached_images \u003d {}"}],"source_content_type":"text/x-python","patch_set":33,"id":"7f287b81_ff5a404e","line":780,"range":{"start_line":780,"start_character":19,"end_line":780,"end_character":21},"in_reply_to":"7f287b81_979d7cbd","updated":"2017-09-01 05:51:38.000000000","message":"Will add it","commit_id":"d0189aa7ceb633141958262c318dbd5cb66f0f97"}],"releasenotes/notes/xentool-destory-cached-image-c9d39a733002ca7d.yaml":[{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"fd60786bbc2b3e58cde245174044c0c80d51d72d","unresolved":false,"context_lines":[{"line_number":6,"context_line":"features:"},{"line_number":7,"context_line":"  - |"},{"line_number":8,"context_line":"    Introduce a way to destroy cached images based on when they were created."},{"line_number":9,"context_line":"    Use paramter keep_days when you call vm_utils.destroy_cached_images  to"},{"line_number":10,"context_line":"    control destroy operation. All the images which created keep_days ago"},{"line_number":11,"context_line":"    would be removed."}],"source_content_type":"text/x-yaml","patch_set":27,"id":"7f287b81_f8bc85bc","line":9,"range":{"start_line":9,"start_character":71,"end_line":9,"end_character":73},"updated":"2017-08-23 09:13:09.000000000","message":"remove one blank space?","commit_id":"116cfb95970afbb2fcdff1621f2714e09eb43908"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"7e712c2b95996defe3da7d283d290c5dda3044f5","unresolved":false,"context_lines":[{"line_number":6,"context_line":"features:"},{"line_number":7,"context_line":"  - |"},{"line_number":8,"context_line":"    Introduce a way to destroy cached images based on when they were created."},{"line_number":9,"context_line":"    Use paramter keep_days when you call vm_utils.destroy_cached_images  to"},{"line_number":10,"context_line":"    control destroy operation. All the images which created keep_days ago"},{"line_number":11,"context_line":"    would be removed."}],"source_content_type":"text/x-yaml","patch_set":27,"id":"7f287b81_9b769bd8","line":9,"range":{"start_line":9,"start_character":71,"end_line":9,"end_character":73},"in_reply_to":"7f287b81_f8bc85bc","updated":"2017-08-23 10:05:00.000000000","message":"OK, let me check","commit_id":"116cfb95970afbb2fcdff1621f2714e09eb43908"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a24d71b257eb54946954cb9627166d5cb5f779e6","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"prelude: \u003e"},{"line_number":3,"context_line":"    For xenapi driver, there needs to be some way to delete cached images"},{"line_number":4,"context_line":"    based on when they were created. add an optional arg to control delete"},{"line_number":5,"context_line":"    operation."},{"line_number":6,"context_line":"features:"},{"line_number":7,"context_line":"  - |"},{"line_number":8,"context_line":"    Introduce a way to destroy cached images based on when they were created."}],"source_content_type":"text/x-yaml","patch_set":28,"id":"7f287b81_1ab957e8","line":5,"range":{"start_line":2,"start_character":0,"end_line":5,"end_character":14},"updated":"2017-08-24 15:52:58.000000000","message":"Preludes are only used for release-level information. You need to drop this","commit_id":"43d278aacc318bd5ba39562bab824ab816ed379b"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a24d71b257eb54946954cb9627166d5cb5f779e6","unresolved":false,"context_lines":[{"line_number":6,"context_line":"features:"},{"line_number":7,"context_line":"  - |"},{"line_number":8,"context_line":"    Introduce a way to destroy cached images based on when they were created."},{"line_number":9,"context_line":"    Use paramter keep_days when you call vm_utils.destroy_cached_images to"},{"line_number":10,"context_line":"    control destroy operation. All the images which created keep_days ago"},{"line_number":11,"context_line":"    would be removed."}],"source_content_type":"text/x-yaml","patch_set":28,"id":"7f287b81_3a84130c","line":9,"range":{"start_line":9,"start_character":41,"end_line":9,"end_character":71},"updated":"2017-08-24 15:52:58.000000000","message":"This is irrelevant. From what I can tell, a user will need to pass the \u0027--keep_days\u0027 option to the script \u0027destroy_cached_images\u0027. That\u0027s what you should say","commit_id":"43d278aacc318bd5ba39562bab824ab816ed379b"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a24d71b257eb54946954cb9627166d5cb5f779e6","unresolved":false,"context_lines":[{"line_number":6,"context_line":"features:"},{"line_number":7,"context_line":"  - |"},{"line_number":8,"context_line":"    Introduce a way to destroy cached images based on when they were created."},{"line_number":9,"context_line":"    Use paramter keep_days when you call vm_utils.destroy_cached_images to"},{"line_number":10,"context_line":"    control destroy operation. All the images which created keep_days ago"},{"line_number":11,"context_line":"    would be removed."}],"source_content_type":"text/x-yaml","patch_set":28,"id":"7f287b81_dacaaf6c","line":9,"range":{"start_line":9,"start_character":17,"end_line":9,"end_character":26},"updated":"2017-08-24 15:52:58.000000000","message":"``keep_days``","commit_id":"43d278aacc318bd5ba39562bab824ab816ed379b"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a24d71b257eb54946954cb9627166d5cb5f779e6","unresolved":false,"context_lines":[{"line_number":6,"context_line":"features:"},{"line_number":7,"context_line":"  - |"},{"line_number":8,"context_line":"    Introduce a way to destroy cached images based on when they were created."},{"line_number":9,"context_line":"    Use paramter keep_days when you call vm_utils.destroy_cached_images to"},{"line_number":10,"context_line":"    control destroy operation. All the images which created keep_days ago"},{"line_number":11,"context_line":"    would be removed."}],"source_content_type":"text/x-yaml","patch_set":28,"id":"7f287b81_facfab7c","line":9,"range":{"start_line":9,"start_character":8,"end_line":9,"end_character":16},"updated":"2017-08-24 15:52:58.000000000","message":"parameter","commit_id":"43d278aacc318bd5ba39562bab824ab816ed379b"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"ed6e1f77cbc2fe6820db6e87f48fbecb31e1e2bc","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Introduce a way to destroy cached images based on when they were created."},{"line_number":5,"context_line":"    User will need to pass \"keep_days\" option to the script"},{"line_number":6,"context_line":"    m_utils.destroy_cached_images. All the images which created keep_days ago"},{"line_number":7,"context_line":"    would be removed."}],"source_content_type":"text/x-yaml","patch_set":29,"id":"7f287b81_99161555","line":6,"range":{"start_line":6,"start_character":4,"end_line":6,"end_character":12},"updated":"2017-08-29 08:45:26.000000000","message":"typo:-)","commit_id":"ce2cdc857e7db73cd4b791d686821f0876c2215d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2a72ec23c12c58fc31b496d8c634272ed071c9e5","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Introduce a way to destroy cached images based on when they were created."},{"line_number":5,"context_line":"    User can pass \"keep_days\" option to the script \"destroy_cached_images\" to"}],"source_content_type":"text/x-yaml","patch_set":31,"id":"7f287b81_4b50bd0b","line":2,"range":{"start_line":2,"start_character":0,"end_line":2,"end_character":8},"updated":"2017-08-29 20:50:19.000000000","message":"This is listed in the release notes as a feature, but you\u0027re fixing a bug, so either use \"fixes\" or \"other\" sections since this isn\u0027t necessarily a new feature that requires a blueprint.","commit_id":"d0306c21852dd5d28897805c22a7bdfe96284d40"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"2c098c1fbbf996dd561fb638f5750a4f771b9797","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Introduce a way to destroy cached images based on when they were created."},{"line_number":5,"context_line":"    User can pass \"keep_days\" option to the script \"destroy_cached_images\" to"}],"source_content_type":"text/x-yaml","patch_set":31,"id":"7f287b81_6250330c","line":2,"range":{"start_line":2,"start_character":0,"end_line":2,"end_character":8},"in_reply_to":"7f287b81_4b50bd0b","updated":"2017-08-30 03:19:38.000000000","message":"Will change it","commit_id":"d0306c21852dd5d28897805c22a7bdfe96284d40"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2a72ec23c12c58fc31b496d8c634272ed071c9e5","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Introduce a way to destroy cached images based on when they were created."},{"line_number":5,"context_line":"    User can pass \"keep_days\" option to the script \"destroy_cached_images\" to"},{"line_number":6,"context_line":"    delete the images which were created \"keep_days\" ago."}],"source_content_type":"text/x-yaml","patch_set":31,"id":"7f287b81_10130468","line":6,"range":{"start_line":4,"start_character":4,"end_line":6,"end_character":57},"updated":"2017-08-29 20:50:19.000000000","message":"This should say something about XenAPI here, or that this is a xen-specific script, otherwise read in isolation with all of the other release notes it\u0027s going to be confusing.","commit_id":"d0306c21852dd5d28897805c22a7bdfe96284d40"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"2c098c1fbbf996dd561fb638f5750a4f771b9797","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Introduce a way to destroy cached images based on when they were created."},{"line_number":5,"context_line":"    User can pass \"keep_days\" option to the script \"destroy_cached_images\" to"},{"line_number":6,"context_line":"    delete the images which were created \"keep_days\" ago."}],"source_content_type":"text/x-yaml","patch_set":31,"id":"7f287b81_4253f717","line":6,"range":{"start_line":4,"start_character":4,"end_line":6,"end_character":57},"in_reply_to":"7f287b81_10130468","updated":"2017-08-30 03:19:38.000000000","message":"Will add the description about xen","commit_id":"d0306c21852dd5d28897805c22a7bdfe96284d40"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a8ba5efa4696e2816b6de7aea23f5b232b14279f","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    For xenapi driver, there needs to be some way to delete cached images based"},{"line_number":5,"context_line":"    on when they were created."},{"line_number":6,"context_line":"    Here introduce a way to destroy cached images based on when they were"},{"line_number":7,"context_line":"    created. User can pass \"keep_days\" option to the script"},{"line_number":8,"context_line":"    \"destroy_cached_images\" to delete the images which were created \"keep_days\""},{"line_number":9,"context_line":"    ago."}],"source_content_type":"text/x-yaml","patch_set":33,"id":"7f287b81_42e8627b","line":6,"range":{"start_line":6,"start_character":4,"end_line":6,"end_character":8},"updated":"2017-08-31 19:01:28.000000000","message":"This won\u0027t make sense out of context of this change when reading the release notes, which are all grouped together:\n\nhttp://docs-draft.openstack.org/54/465954/33/check/gate-nova-releasenotes/5a0852e//releasenotes/build/html/unreleased.html#bug-fixes\n\nSo we should re-word this. Maybe:\n\n\"For the XenAPI driver, in order to delete cached images based on when they were created, a new ``keep_days`` option is added to the ``destroy_cached_images`` script to delete cached images which were created ``keep_days`` ago. By default, all unused cached images will be deleted when the script is run.\"","commit_id":"d0189aa7ceb633141958262c318dbd5cb66f0f97"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"6215b18e587132af25d0e4e4b5848f89a152f0ad","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    For xenapi driver, there needs to be some way to delete cached images based"},{"line_number":5,"context_line":"    on when they were created."},{"line_number":6,"context_line":"    Here introduce a way to destroy cached images based on when they were"},{"line_number":7,"context_line":"    created. User can pass \"keep_days\" option to the script"},{"line_number":8,"context_line":"    \"destroy_cached_images\" to delete the images which were created \"keep_days\""},{"line_number":9,"context_line":"    ago."}],"source_content_type":"text/x-yaml","patch_set":33,"id":"7f287b81_da19d222","line":6,"range":{"start_line":6,"start_character":4,"end_line":6,"end_character":8},"in_reply_to":"7f287b81_42e8627b","updated":"2017-09-01 06:21:02.000000000","message":"Got it, thank you very much, Matt","commit_id":"d0189aa7ceb633141958262c318dbd5cb66f0f97"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"330dd21e29f871cc589e1cce4b6bfe8a0c2be40c","unresolved":false,"context_lines":[{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    For the XenAPI driver, in order to delete cached images based on when they"},{"line_number":5,"context_line":"    were created, a new ``keep_days`` option is added to the"},{"line_number":6,"context_line":"    ``destroy_cached_images`` script to delete cached images which were created"},{"line_number":7,"context_line":"    ``keep_days`` ago. By default, all unused cached images will be deleted"},{"line_number":8,"context_line":"    when the script is run if they have ``cached_time``."}],"source_content_type":"text/x-yaml","patch_set":35,"id":"3f4b6375_fd841260","line":5,"range":{"start_line":5,"start_character":26,"end_line":5,"end_character":35},"updated":"2017-10-23 16:14:43.000000000","message":"``--keep-days DAYS``","commit_id":"004750d9c159e65a71ebcccc34f8e885d2ba707b"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"330dd21e29f871cc589e1cce4b6bfe8a0c2be40c","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    For the XenAPI driver, in order to delete cached images based on when they"},{"line_number":5,"context_line":"    were created, a new ``keep_days`` option is added to the"},{"line_number":6,"context_line":"    ``destroy_cached_images`` script to delete cached images which were created"},{"line_number":7,"context_line":"    ``keep_days`` ago. By default, all unused cached images will be deleted"},{"line_number":8,"context_line":"    when the script is run if they have ``cached_time``."}],"source_content_type":"text/x-yaml","patch_set":35,"id":"3f4b6375_1d8dae7a","line":7,"range":{"start_line":7,"start_character":4,"end_line":7,"end_character":17},"updated":"2017-10-23 16:14:43.000000000","message":"more than ``DAYS`` days ago.","commit_id":"004750d9c159e65a71ebcccc34f8e885d2ba707b"}],"tools/xenserver/destroy_cached_images.py":[{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"c44ab319b0c1f256c70db054626fbf6eb0b08271","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    --dry_run - Don\u0027t actually destroy the VDIs"},{"line_number":22,"context_line":"    --all_cached - Destroy all cached images instead of just unused cached"},{"line_number":23,"context_line":"                   images."},{"line_number":24,"context_line":"    --deprecate_time - All the cached images which have created more than"},{"line_number":25,"context_line":"                       n days would be removed, n \u003d deprecate_time"},{"line_number":26,"context_line":"\"\"\""},{"line_number":27,"context_line":"import eventlet"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_316a1b80","line":24,"range":{"start_line":24,"start_character":6,"end_line":24,"end_character":20},"updated":"2017-05-18 13:27:24.000000000","message":"\u003d\u003e --until days_ago or --keep_days","commit_id":"fc9eb8842fffad6d72e3595ea9ad210514a7b374"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"c44ab319b0c1f256c70db054626fbf6eb0b08271","unresolved":false,"context_lines":[{"line_number":58,"context_line":"                help\u003d\u0027Don\\\u0027t actually delete the VDIs.\u0027),"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    cfg.IntOpt(\u0027cache_deprecate_time\u0027,"},{"line_number":61,"context_line":"               default\u003dtime.time(),"},{"line_number":62,"context_line":"               help\u003d\u0027images cached before the time would be deprecate\u0027)"},{"line_number":63,"context_line":"]"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_91f8c7c4","line":61,"range":{"start_line":61,"start_character":23,"end_line":61,"end_character":34},"updated":"2017-05-18 13:27:24.000000000","message":"0","commit_id":"fc9eb8842fffad6d72e3595ea9ad210514a7b374"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"c2dbcb5f2b67d9761731935b43ae8c753fe07782","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"from os_xenapi.client import session"},{"line_number":34,"context_line":"from oslo_config import cfg"},{"line_number":35,"context_line":"import time"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"# If ../nova/__init__.py exists, add ../ to Python search path, so that"},{"line_number":38,"context_line":"# it will override what happens to be installed in /usr/(local/)lib/python..."}],"source_content_type":"text/x-python","patch_set":10,"id":"1f1a1f67_6dc1afe4","line":35,"range":{"start_line":35,"start_character":0,"end_line":35,"end_character":11},"updated":"2017-07-14 02:37:00.000000000","message":"Seems all you added code in this file don\u0027t use time?","commit_id":"2b5b6e569cd3df56732e6f03cfe73a0cb34c85af"},{"author":{"_account_id":23630,"name":"Tovin Seven","email":"tovin07@gmail.com","username":"tovin07"},"change_message_id":"5a17969eb39f098275e2d1b64bab4572f74ca9fa","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    --all_cached - Destroy all cached images instead of just unused cached"},{"line_number":23,"context_line":"                   images."},{"line_number":24,"context_line":"    --keep_days - All the cached images which have created more than"},{"line_number":25,"context_line":"                       n days would be removed, n \u003d keep_days"},{"line_number":26,"context_line":"\"\"\""},{"line_number":27,"context_line":"import eventlet"},{"line_number":28,"context_line":"eventlet.monkey_patch()"}],"source_content_type":"text/x-python","patch_set":13,"id":"df3967d1_05ebd0db","line":25,"range":{"start_line":25,"start_character":18,"end_line":25,"end_character":23},"updated":"2017-08-04 04:09:28.000000000","message":"remove this","commit_id":"f3ef01e65644717f531565d409503b9c94df2576"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"193a4b676f4caed40e95cf77d38c383bdf23dfe0","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    --all_cached - Destroy all cached images instead of just unused cached"},{"line_number":23,"context_line":"                   images."},{"line_number":24,"context_line":"    --keep_days - All the cached images which have created more than"},{"line_number":25,"context_line":"                       n days would be removed, n \u003d keep_days"},{"line_number":26,"context_line":"\"\"\""},{"line_number":27,"context_line":"import eventlet"},{"line_number":28,"context_line":"eventlet.monkey_patch()"}],"source_content_type":"text/x-python","patch_set":13,"id":"df3967d1_7437ef4e","line":25,"range":{"start_line":25,"start_character":18,"end_line":25,"end_character":23},"in_reply_to":"df3967d1_05ebd0db","updated":"2017-08-04 06:27:36.000000000","message":"Will remove it","commit_id":"f3ef01e65644717f531565d409503b9c94df2576"},{"author":{"_account_id":23630,"name":"Tovin Seven","email":"tovin07@gmail.com","username":"tovin07"},"change_message_id":"5a17969eb39f098275e2d1b64bab4572f74ca9fa","unresolved":false,"context_lines":[{"line_number":54,"context_line":"                     \u0027 images.\u0027),"},{"line_number":55,"context_line":"    cfg.BoolOpt(\u0027dry_run\u0027,"},{"line_number":56,"context_line":"                default\u003dFalse,"},{"line_number":57,"context_line":"                help\u003d\u0027Don\\\u0027t actually delete the VDIs.\u0027),"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    cfg.IntOpt(\u0027keep_days\u0027,"},{"line_number":60,"context_line":"               default\u003d0,"}],"source_content_type":"text/x-python","patch_set":13,"id":"df3967d1_65d17c23","line":57,"range":{"start_line":57,"start_character":21,"end_line":57,"end_character":22},"updated":"2017-08-04 04:09:28.000000000","message":"you can use double quote to avoid escape single quote","commit_id":"f3ef01e65644717f531565d409503b9c94df2576"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"193a4b676f4caed40e95cf77d38c383bdf23dfe0","unresolved":false,"context_lines":[{"line_number":54,"context_line":"                     \u0027 images.\u0027),"},{"line_number":55,"context_line":"    cfg.BoolOpt(\u0027dry_run\u0027,"},{"line_number":56,"context_line":"                default\u003dFalse,"},{"line_number":57,"context_line":"                help\u003d\u0027Don\\\u0027t actually delete the VDIs.\u0027),"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    cfg.IntOpt(\u0027keep_days\u0027,"},{"line_number":60,"context_line":"               default\u003d0,"}],"source_content_type":"text/x-python","patch_set":13,"id":"df3967d1_144663c1","line":57,"range":{"start_line":57,"start_character":21,"end_line":57,"end_character":22},"in_reply_to":"df3967d1_65d17c23","updated":"2017-08-04 06:27:36.000000000","message":"Thank you for the reminder","commit_id":"f3ef01e65644717f531565d409503b9c94df2576"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"bc60fbfc908f873d63b863d5237053f1bfc5b23d","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    cfg.IntOpt(\u0027keep_days\u0027,"},{"line_number":60,"context_line":"               default\u003d0,"},{"line_number":61,"context_line":"               help\u003d\u0027images cached created more than \u0027"},{"line_number":62,"context_line":"               \u0027keep_days would be deprecate\u0027)"},{"line_number":63,"context_line":"]"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"CONF \u003d nova.conf.CONF"}],"source_content_type":"text/x-python","patch_set":23,"id":"9f436f4f_bbee12b2","line":62,"range":{"start_line":61,"start_character":21,"end_line":62,"end_character":44},"updated":"2017-08-17 18:25:51.000000000","message":"It is a little hard to understand meaning, how about\n\n Destroy cached images which were created over keep_days.\n\n?","commit_id":"63c5c49677f3349920b32c1a8a20cba32032ea1f"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"22b003790d7a613cee8bf5bde2d585e0dc2c5aa0","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    cfg.IntOpt(\u0027keep_days\u0027,"},{"line_number":60,"context_line":"               default\u003d0,"},{"line_number":61,"context_line":"               help\u003d\u0027images cached created more than \u0027"},{"line_number":62,"context_line":"               \u0027keep_days would be deprecate\u0027)"},{"line_number":63,"context_line":"]"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"CONF \u003d nova.conf.CONF"}],"source_content_type":"text/x-python","patch_set":23,"id":"9f436f4f_47c4e492","line":62,"range":{"start_line":61,"start_character":21,"end_line":62,"end_character":44},"in_reply_to":"9f436f4f_bbee12b2","updated":"2017-08-18 01:23:48.000000000","message":"Will modify it, thank you for reminder","commit_id":"63c5c49677f3349920b32c1a8a20cba32032ea1f"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"ad6496992bae8c859ad698f9534a7683c05833d7","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    --all_cached - Destroy all cached images instead of just unused cached"},{"line_number":23,"context_line":"                   images."},{"line_number":24,"context_line":"    --keep_days - All the cached images which have created more than"},{"line_number":25,"context_line":"                  n days would be removed, n \u003d keep_days"},{"line_number":26,"context_line":"\"\"\""},{"line_number":27,"context_line":"import eventlet"},{"line_number":28,"context_line":"eventlet.monkey_patch()"}],"source_content_type":"text/x-python","patch_set":24,"id":"9f436f4f_59495c30","line":25,"updated":"2017-08-18 09:33:40.000000000","message":"This description could be much more clear. Perhaps something like?\n\n    --keep_days N - Only remove those cached images which were created\n                    more than N days ago.","commit_id":"7d82685cba6db2202460726de1f519e466fb6b35"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"9fe662173e4998de48a899486f5683e1ab571853","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    --all_cached - Destroy all cached images instead of just unused cached"},{"line_number":23,"context_line":"                   images."},{"line_number":24,"context_line":"    --keep_days - All the cached images which have created more than"},{"line_number":25,"context_line":"                  n days would be removed, n \u003d keep_days"},{"line_number":26,"context_line":"\"\"\""},{"line_number":27,"context_line":"import eventlet"},{"line_number":28,"context_line":"eventlet.monkey_patch()"}],"source_content_type":"text/x-python","patch_set":24,"id":"9f436f4f_0bfed904","line":25,"in_reply_to":"9f436f4f_59495c30","updated":"2017-08-18 11:02:06.000000000","message":"Will change it","commit_id":"7d82685cba6db2202460726de1f519e466fb6b35"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"ad6496992bae8c859ad698f9534a7683c05833d7","unresolved":false,"context_lines":[{"line_number":54,"context_line":"                     \u0027 images.\u0027),"},{"line_number":55,"context_line":"    cfg.BoolOpt(\u0027dry_run\u0027,"},{"line_number":56,"context_line":"                default\u003dFalse,"},{"line_number":57,"context_line":"                help\u003d\"Don\\\u0027t actually delete the VDIs.\"),"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    cfg.IntOpt(\u0027keep_days\u0027,"},{"line_number":60,"context_line":"               default\u003d0,"}],"source_content_type":"text/x-python","patch_set":24,"id":"9f436f4f_59203c4a","line":57,"updated":"2017-08-18 09:33:40.000000000","message":"unrelated change, but if you\u0027re going to change to double quotes, you can get rid of the \\\n\nHowever, since nothing else is using double quotes near here, don\u0027t.","commit_id":"7d82685cba6db2202460726de1f519e466fb6b35"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"9fe662173e4998de48a899486f5683e1ab571853","unresolved":false,"context_lines":[{"line_number":54,"context_line":"                     \u0027 images.\u0027),"},{"line_number":55,"context_line":"    cfg.BoolOpt(\u0027dry_run\u0027,"},{"line_number":56,"context_line":"                default\u003dFalse,"},{"line_number":57,"context_line":"                help\u003d\"Don\\\u0027t actually delete the VDIs.\"),"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    cfg.IntOpt(\u0027keep_days\u0027,"},{"line_number":60,"context_line":"               default\u003d0,"}],"source_content_type":"text/x-python","patch_set":24,"id":"9f436f4f_2b187d73","line":57,"in_reply_to":"9f436f4f_59203c4a","updated":"2017-08-18 11:02:06.000000000","message":"will remove it","commit_id":"7d82685cba6db2202460726de1f519e466fb6b35"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2a72ec23c12c58fc31b496d8c634272ed071c9e5","unresolved":false,"context_lines":[{"line_number":55,"context_line":"    cfg.BoolOpt(\u0027dry_run\u0027,"},{"line_number":56,"context_line":"                default\u003dFalse,"},{"line_number":57,"context_line":"                help\u003d\u0027Don\\\u0027t actually delete the VDIs.\u0027),"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    cfg.IntOpt(\u0027keep_days\u0027,"},{"line_number":60,"context_line":"               default\u003d0,"},{"line_number":61,"context_line":"               help\u003d\u0027Destroy cached images which were\u0027"}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_b00b1028","line":58,"updated":"2017-08-29 20:50:19.000000000","message":"nit: remove the weird blank line here","commit_id":"d0306c21852dd5d28897805c22a7bdfe96284d40"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"2c098c1fbbf996dd561fb638f5750a4f771b9797","unresolved":false,"context_lines":[{"line_number":55,"context_line":"    cfg.BoolOpt(\u0027dry_run\u0027,"},{"line_number":56,"context_line":"                default\u003dFalse,"},{"line_number":57,"context_line":"                help\u003d\u0027Don\\\u0027t actually delete the VDIs.\u0027),"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    cfg.IntOpt(\u0027keep_days\u0027,"},{"line_number":60,"context_line":"               default\u003d0,"},{"line_number":61,"context_line":"               help\u003d\u0027Destroy cached images which were\u0027"}],"source_content_type":"text/x-python","patch_set":31,"id":"7f287b81_82443f48","line":58,"in_reply_to":"7f287b81_b00b1028","updated":"2017-08-30 03:19:38.000000000","message":"Will do it :)","commit_id":"d0306c21852dd5d28897805c22a7bdfe96284d40"}]}
