)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"80e8478afa9034f474608031f45a7599b83ff602","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Complete switch to snapshot objects"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The following patch switched the remainder of cinder internals"},{"line_number":10,"context_line":"to use snapshot object instead of direct db calls."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I64004ac404f67eecee51361dc8edd3f149e1b987"},{"line_number":13,"context_line":"Implements: blueprint cinder-objects"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9a80dd14_f97f48a9","line":10,"updated":"2015-03-18 10:36:53.000000000","message":"An information that this doesn\u0027t touch the drivers code would be helpful.","commit_id":"f9b6356d41af91126a6bc0b34e449dc2c4c75011"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"80c7f4b7aa2143f488b21b48d3413d9a29d6e962","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Complete switch to snapshot objects"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The following patch switched the remainder of cinder internals"},{"line_number":10,"context_line":"to use snapshot object instead of direct db calls."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I64004ac404f67eecee51361dc8edd3f149e1b987"},{"line_number":13,"context_line":"Implements: blueprint cinder-objects"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9a80dd14_4de6c417","line":10,"in_reply_to":"9a80dd14_f97f48a9","updated":"2015-03-18 14:38:52.000000000","message":"Sure, will add later.  I do not intend to do the changes in the driver because it would need testing on equipment that I do not have.","commit_id":"f9b6356d41af91126a6bc0b34e449dc2c4c75011"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"da20ca516757c43470c29f2f2948b9990d428171","unresolved":false,"context_lines":[{"line_number":21,"context_line":"changed to use object methods."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Change-Id: I64004ac404f67eecee51361dc8edd3f149e1b987"},{"line_number":24,"context_line":"Implements: blueprint cinder-objects"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"bab921fb_fa4c97c9","line":24,"updated":"2015-04-25 04:05:52.000000000","message":"Should be Partial-Implements","commit_id":"014bbecc3cb43dc234ba1a5adf6ad2c2c63a3e75"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"e275b695825692fa0e205bf653d04081926aa7d7","unresolved":false,"context_lines":[{"line_number":21,"context_line":"changed to use object methods."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Change-Id: I64004ac404f67eecee51361dc8edd3f149e1b987"},{"line_number":24,"context_line":"Implements: blueprint cinder-objects"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"bab921fb_b9b85776","line":24,"in_reply_to":"bab921fb_fa4c97c9","updated":"2015-04-25 14:19:31.000000000","message":"Done","commit_id":"014bbecc3cb43dc234ba1a5adf6ad2c2c63a3e75"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"6806ec2734d1e386574932e45690239e54294aca","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Thang Pham \u003cthang.g.pham@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-05-13 19:44:16 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Complete switch to snapshot objects"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The following patch switches the remainder of cinder internals"},{"line_number":10,"context_line":"to use snapshot object instead of direct db calls.  Note that"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"7a016987_fd7a2f87","line":7,"updated":"2015-05-20 10:04:53.000000000","message":"`grep -ir \u0027\\.snapshot_\u0027 cinder/volume/drivers` found many drivers still use a lot of db.snapshot_get_all. If it is \"complete\" but except drivers, would you like to add some comment so that it is clearer?","commit_id":"50bbb59b74db1c771a05367132078fa07b18fd56"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"b3c280202d7cbfca23b8d9241a9e5acb70d6623d","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Thang Pham \u003cthang.g.pham@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-05-13 19:44:16 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Complete switch to snapshot objects"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The following patch switches the remainder of cinder internals"},{"line_number":10,"context_line":"to use snapshot object instead of direct db calls.  Note that"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"7a016987_ff0d3ce8","line":7,"in_reply_to":"7a016987_fd7a2f87","updated":"2015-05-23 03:45:59.000000000","message":"There is a 80 character limit to the summary.  The details about the drivers are below.","commit_id":"50bbb59b74db1c771a05367132078fa07b18fd56"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"87de82bacc9358bf3281fd43c2f8d5038dc8a985","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Thang Pham \u003cthang.g.pham@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-05-13 19:44:16 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Complete switch to snapshot objects"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The following patch switches the remainder of cinder internals"},{"line_number":10,"context_line":"to use snapshot object instead of direct db calls.  Note that"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"7a016987_067c3dea","line":7,"in_reply_to":"7a016987_ff0d3ce8","updated":"2015-05-25 12:34:56.000000000","message":"Saw them. Thanks Thang!","commit_id":"50bbb59b74db1c771a05367132078fa07b18fd56"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"e1b97cd5d3da5d7ac7478b1c9523f5ddbec9f126","unresolved":false,"context_lines":[{"line_number":10,"context_line":"to use snapshot object instead of direct db calls.  Note that"},{"line_number":11,"context_line":"db calls within cinder drivers were not switched over.  This"},{"line_number":12,"context_line":"is left to driver maintainers to do themselves and to"},{"line_number":13,"context_line":"properly test out the changes on their hardware."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Also, note that there are three occurrences of"},{"line_number":16,"context_line":"db.snapshot_update and one of db.snapshot_destroy left in"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"7a016987_90979547","line":13,"updated":"2015-05-20 18:18:20.000000000","message":"Do you happen to have the list of drivers that are still doing this?  Maybe we should file defects against them to have them switch over to use the snapshot object?","commit_id":"50bbb59b74db1c771a05367132078fa07b18fd56"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"0f06fa187c0a04a767adf823141cdfda2f8a9dd6","unresolved":false,"context_lines":[{"line_number":10,"context_line":"to use snapshot object instead of direct db calls.  Note that"},{"line_number":11,"context_line":"db calls within cinder drivers were not switched over.  This"},{"line_number":12,"context_line":"is left to driver maintainers to do themselves and to"},{"line_number":13,"context_line":"properly test out the changes on their hardware."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Also, note that there are three occurrences of"},{"line_number":16,"context_line":"db.snapshot_update and one of db.snapshot_destroy left in"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"7a016987_06eb44e0","line":13,"in_reply_to":"7a016987_90979547","updated":"2015-05-22 12:01:20.000000000","message":"Agreed.","commit_id":"50bbb59b74db1c771a05367132078fa07b18fd56"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"1b50b77fc940e415f86b3e78ceb0a0134aea2176","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Also, note that there are three occurrences of"},{"line_number":16,"context_line":"db.snapshot_update and one of db.snapshot_destroy left in"},{"line_number":17,"context_line":"cinder/volume/manager.py.  This is intentional because"},{"line_number":18,"context_line":"driver.create_cgsnapshot and driver.delete_cgsnapshot returns"},{"line_number":19,"context_line":"a list of snapshot dicts.  cgsnapshots has to be switched over"},{"line_number":20,"context_line":"to objects before these occurrences can be safely removed and"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"7a016987_58f8a37c","line":17,"updated":"2015-05-26 23:11:16.000000000","message":"Do we have a follow up patch yet that addresses this after this patch lands?","commit_id":"89bd83ea21d065a69beb8a37c04495cdbb4fd314"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"28bb1e18505b8e04810fafd83537a6896eef60d2","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Also, note that there are three occurrences of"},{"line_number":16,"context_line":"db.snapshot_update and one of db.snapshot_destroy left in"},{"line_number":17,"context_line":"cinder/volume/manager.py.  This is intentional because"},{"line_number":18,"context_line":"driver.create_cgsnapshot and driver.delete_cgsnapshot returns"},{"line_number":19,"context_line":"a list of snapshot dicts.  cgsnapshots has to be switched over"},{"line_number":20,"context_line":"to objects before these occurrences can be safely removed and"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"7a016987_a4e7533f","line":17,"in_reply_to":"7a016987_4b2b12ec","updated":"2015-05-27 14:54:20.000000000","message":"I take that back.  After looking at each driver more carefully, all that needs to be done is to replace occurences of db.snapshot_get_all_for_cgsnapshot() to SnapshotList.get_all_for_cgsnapshot() in create_cgsnapshot and delete_cgsnapshot.","commit_id":"89bd83ea21d065a69beb8a37c04495cdbb4fd314"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"c962ae8023e3a7db20e99104db587db07bbabadb","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Also, note that there are three occurrences of"},{"line_number":16,"context_line":"db.snapshot_update and one of db.snapshot_destroy left in"},{"line_number":17,"context_line":"cinder/volume/manager.py.  This is intentional because"},{"line_number":18,"context_line":"driver.create_cgsnapshot and driver.delete_cgsnapshot returns"},{"line_number":19,"context_line":"a list of snapshot dicts.  cgsnapshots has to be switched over"},{"line_number":20,"context_line":"to objects before these occurrences can be safely removed and"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"7a016987_4b2b12ec","line":17,"in_reply_to":"7a016987_58f8a37c","updated":"2015-05-27 14:11:29.000000000","message":"Not yet, vilohb volunteered to handle consistencygroups (and quotas).  His patch is in progress (https://review.openstack.org/#/c/163641/), and I would need it to be in a ready state before I can do a follow up patch.","commit_id":"89bd83ea21d065a69beb8a37c04495cdbb4fd314"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"91ab2e47add0ef5332d2813f52292b47175c1700","unresolved":false,"context_lines":[{"line_number":21,"context_line":"changed to use object methods.  There are bugs filed for"},{"line_number":22,"context_line":"these to be fixed -"},{"line_number":23,"context_line":"https://bugs.launchpad.net/cinder/+bugs?field.tag\u003d"},{"line_number":24,"context_line":"cgsnapshot-objects."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Change-Id: I64004ac404f67eecee51361dc8edd3f149e1b987"},{"line_number":27,"context_line":"Partial-Implements: blueprint cinder-objects"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"7a016987_e61da173","line":24,"updated":"2015-05-25 12:47:40.000000000","message":"I found db.snapshot_get_all_for_volume in glusterfs.py::backup_volume, and db.snapshot_get in remotefs.py::_create_snapshot_online \u0026 _delete_snapshot_online. Do you think they also need be filed as bugs?","commit_id":"89bd83ea21d065a69beb8a37c04495cdbb4fd314"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"47e85215c4fefda13f6794625890bf5349bef44a","unresolved":false,"context_lines":[{"line_number":21,"context_line":"changed to use object methods.  There are bugs filed for"},{"line_number":22,"context_line":"these to be fixed -"},{"line_number":23,"context_line":"https://bugs.launchpad.net/cinder/+bugs?field.tag\u003d"},{"line_number":24,"context_line":"cgsnapshot-objects."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Change-Id: I64004ac404f67eecee51361dc8edd3f149e1b987"},{"line_number":27,"context_line":"Partial-Implements: blueprint cinder-objects"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"7a016987_fbcd0c87","line":24,"in_reply_to":"7a016987_e61da173","updated":"2015-05-26 21:44:35.000000000","message":"These direct DB calls are part of drivers.  The 1st paragraph says \"this is left to driver maintainers to do themselves\".  I do not believe a bug is necessary, because it is not really one until we completely switch to use versionedobjects for all cinder internals.  We are not close to that point yet, we have backups, service, consistencygroups, volumes, and quotas left to do.","commit_id":"89bd83ea21d065a69beb8a37c04495cdbb4fd314"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"f445766dfca577bde0c091aac3c6dc1a43ede495","unresolved":false,"context_lines":[{"line_number":21,"context_line":"changed to use object methods.  There are bugs filed for"},{"line_number":22,"context_line":"these to be fixed -"},{"line_number":23,"context_line":"https://bugs.launchpad.net/cinder/+bugs?field.tag\u003d"},{"line_number":24,"context_line":"cgsnapshot-objects."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Change-Id: I64004ac404f67eecee51361dc8edd3f149e1b987"},{"line_number":27,"context_line":"Partial-Implements: blueprint cinder-objects"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"7a016987_fa5eaae7","line":24,"in_reply_to":"7a016987_fbcd0c87","updated":"2015-06-05 12:20:45.000000000","message":"That makes sense.","commit_id":"89bd83ea21d065a69beb8a37c04495cdbb4fd314"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"c5c89c9dead73211e843707a423f892cd5e2041d","unresolved":false,"context_lines":[{"line_number":16,"context_line":"db.snapshot_update and one of db.snapshot_destroy left in"},{"line_number":17,"context_line":"cinder/volume/manager.py.  This is intentional because"},{"line_number":18,"context_line":"driver.create_cgsnapshot and driver.delete_cgsnapshot returns"},{"line_number":19,"context_line":"a list of snapshot dicts.  Each driver needs to switched over"},{"line_number":20,"context_line":"occurences of db.snapshot_get_all_for_cgsnapshot() to"},{"line_number":21,"context_line":"SnapshotList.get_all_for_cgsnapshot() in create_cgsnapshot"},{"line_number":22,"context_line":"and delete_cgsnapshot.  Once each driver has done so, a follow"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"7a016987_7a219a4c","line":19,"updated":"2015-05-29 15:29:12.000000000","message":"Extra space before \u0027Each\u0027; \u0027switched\u0027 \u003d\u003e \u0027switch\u0027","commit_id":"e72797a3147d8e5da66eef5ece64eb31df356eef"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"217d0835d629785805f413a8ea59421ac8a1f37e","unresolved":false,"context_lines":[{"line_number":16,"context_line":"db.snapshot_update and one of db.snapshot_destroy left in"},{"line_number":17,"context_line":"cinder/volume/manager.py.  This is intentional because"},{"line_number":18,"context_line":"driver.create_cgsnapshot and driver.delete_cgsnapshot returns"},{"line_number":19,"context_line":"a list of snapshot dicts.  Each driver needs to switched over"},{"line_number":20,"context_line":"occurences of db.snapshot_get_all_for_cgsnapshot() to"},{"line_number":21,"context_line":"SnapshotList.get_all_for_cgsnapshot() in create_cgsnapshot"},{"line_number":22,"context_line":"and delete_cgsnapshot.  Once each driver has done so, a follow"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":21,"id":"5afe65bd_c7b9277b","line":19,"updated":"2015-06-03 12:14:05.000000000","message":"Extra space before \u0027Each\u0027.\n\n\u0027switched\u0027 \u003d\u003e \u0027switch\u0027.","commit_id":"38fe114fcd23a834fec239726dfd7bdd969782c1"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"9a8139dd5c16385a60d7e69677423f859981a187","unresolved":false,"context_lines":[{"line_number":16,"context_line":"db.snapshot_update and one of db.snapshot_destroy left in"},{"line_number":17,"context_line":"cinder/volume/manager.py.  This is intentional because"},{"line_number":18,"context_line":"driver.create_cgsnapshot and driver.delete_cgsnapshot returns"},{"line_number":19,"context_line":"a list of snapshot dicts.  Each driver needs to switched over"},{"line_number":20,"context_line":"occurences of db.snapshot_get_all_for_cgsnapshot() to"},{"line_number":21,"context_line":"SnapshotList.get_all_for_cgsnapshot() in create_cgsnapshot"},{"line_number":22,"context_line":"and delete_cgsnapshot.  Once each driver has done so, a follow"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":23,"id":"3afb71cf_b1da2577","line":19,"updated":"2015-06-05 12:22:54.000000000","message":"Extra space before \u0027Each\u0027.\n\n\u0027switched\u0027 \u003d\u003e \u0027switch\u0027.","commit_id":"de4c1aad3b2d22e037f8c3cdba47d1b6d79b98c1"}],"cinder/api/contrib/admin_actions.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"80e8478afa9034f474608031f45a7599b83ff602","unresolved":false,"context_lines":[{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    collection \u003d \u0027snapshots\u0027"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"    def _update(self, *args, **kwargs):"},{"line_number":253,"context_line":"        context \u003d args[0]"},{"line_number":254,"context_line":"        snapshot_id \u003d args[1]"},{"line_number":255,"context_line":"        fields \u003d args[2]"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_ef6a1a80","line":252,"updated":"2015-03-18 10:36:53.000000000","message":"It was going directly through the db call and now through volume_api. Is this a good idea?","commit_id":"f9b6356d41af91126a6bc0b34e449dc2c4c75011"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"80c7f4b7aa2143f488b21b48d3413d9a29d6e962","unresolved":false,"context_lines":[{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    collection \u003d \u0027snapshots\u0027"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"    def _update(self, *args, **kwargs):"},{"line_number":253,"context_line":"        context \u003d args[0]"},{"line_number":254,"context_line":"        snapshot_id \u003d args[1]"},{"line_number":255,"context_line":"        fields \u003d args[2]"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_ad702041","line":252,"in_reply_to":"9a80dd14_ef6a1a80","updated":"2015-03-18 14:38:52.000000000","message":"I did this to conform with the other calls below.  It makes it consistent, and volume_api.get_snapshot just makes a simple call to snapshot.get_by_id.  It also allows us to be more consistent, but it\u0027s up for debate.","commit_id":"f9b6356d41af91126a6bc0b34e449dc2c4c75011"}],"cinder/api/contrib/hosts.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"da20ca516757c43470c29f2f2948b9990d428171","unresolved":false,"context_lines":[{"line_number":233,"context_line":"        project_ids \u003d list(set(project_ids))"},{"line_number":234,"context_line":"        for project_id in project_ids:"},{"line_number":235,"context_line":"            (count, sum) \u003d db.volume_data_get_for_project(context, project_id)"},{"line_number":236,"context_line":"            (snap_count, snap_sum) \u003d \\"},{"line_number":237,"context_line":"                objects.Snapshot.snapshot_data_get_for_project(context,"},{"line_number":238,"context_line":"                                                               project_id)"},{"line_number":239,"context_line":"            resources.append("}],"source_content_type":"text/x-python","patch_set":11,"id":"bab921fb_9af59b58","line":236,"updated":"2015-04-25 04:05:52.000000000","message":"Can you use () instead of \\?","commit_id":"014bbecc3cb43dc234ba1a5adf6ad2c2c63a3e75"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"e275b695825692fa0e205bf653d04081926aa7d7","unresolved":false,"context_lines":[{"line_number":233,"context_line":"        project_ids \u003d list(set(project_ids))"},{"line_number":234,"context_line":"        for project_id in project_ids:"},{"line_number":235,"context_line":"            (count, sum) \u003d db.volume_data_get_for_project(context, project_id)"},{"line_number":236,"context_line":"            (snap_count, snap_sum) \u003d \\"},{"line_number":237,"context_line":"                objects.Snapshot.snapshot_data_get_for_project(context,"},{"line_number":238,"context_line":"                                                               project_id)"},{"line_number":239,"context_line":"            resources.append("}],"source_content_type":"text/x-python","patch_set":11,"id":"bab921fb_79af5f2a","line":236,"in_reply_to":"bab921fb_9af59b58","updated":"2015-04-25 14:19:31.000000000","message":"Done","commit_id":"014bbecc3cb43dc234ba1a5adf6ad2c2c63a3e75"}],"cinder/objects/snapshot.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"80e8478afa9034f474608031f45a7599b83ff602","unresolved":false,"context_lines":[{"line_number":190,"context_line":"            self.obj_reset_changes([\u0027metadata\u0027])"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    @base.remotable_classmethod"},{"line_number":193,"context_line":"    def snapshot_data_get_for_project(cls, context, project_id,"},{"line_number":194,"context_line":"                                      volume_type_id\u003dNone):"},{"line_number":195,"context_line":"        return db.snapshot_data_get_for_project(context, project_id,"},{"line_number":196,"context_line":"                                                volume_type_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_4f916645","line":193,"updated":"2015-03-18 10:36:53.000000000","message":"This method doesn\u0027t have test in cinder.tests.objects.test_snapshot.","commit_id":"f9b6356d41af91126a6bc0b34e449dc2c4c75011"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"80c7f4b7aa2143f488b21b48d3413d9a29d6e962","unresolved":false,"context_lines":[{"line_number":190,"context_line":"            self.obj_reset_changes([\u0027metadata\u0027])"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    @base.remotable_classmethod"},{"line_number":193,"context_line":"    def snapshot_data_get_for_project(cls, context, project_id,"},{"line_number":194,"context_line":"                                      volume_type_id\u003dNone):"},{"line_number":195,"context_line":"        return db.snapshot_data_get_for_project(context, project_id,"},{"line_number":196,"context_line":"                                                volume_type_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_cd039474","line":193,"in_reply_to":"9a80dd14_4f916645","updated":"2015-03-18 14:38:52.000000000","message":"Does it need to?  The test would be trivial, hence I debated leaving it out.  I just think mocking db.snapshot_data_get_for_project and returning the mocked values to snapshot_data_get_for_project is not really a test.","commit_id":"f9b6356d41af91126a6bc0b34e449dc2c4c75011"}],"cinder/tests/test_cmd.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"80e8478afa9034f474608031f45a7599b83ff602","unresolved":false,"context_lines":[{"line_number":1191,"context_line":"            extra_usage_info\u003dlocal_extra_info_delete)"},{"line_number":1192,"context_line":""},{"line_number":1193,"context_line":"    @mock.patch(\u0027cinder.volume.utils.notify_about_snapshot_usage\u0027)"},{"line_number":1194,"context_line":"    @mock.patch(\u0027cinder.objects.snapshot.SnapshotList.get_active_by_window\u0027)"},{"line_number":1195,"context_line":"    @mock.patch(\u0027cinder.volume.utils.notify_about_volume_usage\u0027)"},{"line_number":1196,"context_line":"    @mock.patch(\u0027cinder.db.volume_get_active_by_window\u0027)"},{"line_number":1197,"context_line":"    @mock.patch(\u0027cinder.utils.last_completed_audit_period\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_4ff08666","line":1194,"updated":"2015-03-18 10:36:53.000000000","message":"Instead of changing mocked method...","commit_id":"f9b6356d41af91126a6bc0b34e449dc2c4c75011"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"80e8478afa9034f474608031f45a7599b83ff602","unresolved":false,"context_lines":[{"line_number":1217,"context_line":"        get_admin_context.return_value \u003d ctxt"},{"line_number":1218,"context_line":"        last_completed_audit_period.return_value \u003d (begin, end)"},{"line_number":1219,"context_line":"        snapshot1_created \u003d datetime.datetime(2014, 1, 1, 2, 0)"},{"line_number":1220,"context_line":"        snapshot1_deleted \u003d datetime.datetime(2014, 1, 1, 3, 0)"},{"line_number":1221,"context_line":"        snapshot1 \u003d mock.MagicMock(id\u003d\u00271\u0027, project_id\u003d\u0027fake-project\u0027,"},{"line_number":1222,"context_line":"                                   created_at\u003dsnapshot1_created,"},{"line_number":1223,"context_line":"                                   deleted_at\u003dsnapshot1_deleted)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_2b20a59a","line":1220,"updated":"2015-03-18 10:36:53.000000000","message":"...wouldn\u0027t it be better to have fake snapshot here instead of MagicMock?","commit_id":"f9b6356d41af91126a6bc0b34e449dc2c4c75011"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"80e8478afa9034f474608031f45a7599b83ff602","unresolved":false,"context_lines":[{"line_number":1264,"context_line":"            extra_usage_info\u003dlocal_extra_info_delete)"},{"line_number":1265,"context_line":""},{"line_number":1266,"context_line":"    @mock.patch(\u0027cinder.volume.utils.notify_about_snapshot_usage\u0027)"},{"line_number":1267,"context_line":"    @mock.patch(\u0027cinder.objects.snapshot.SnapshotList.get_active_by_window\u0027)"},{"line_number":1268,"context_line":"    @mock.patch(\u0027cinder.volume.utils.notify_about_volume_usage\u0027)"},{"line_number":1269,"context_line":"    @mock.patch(\u0027cinder.db.volume_get_active_by_window\u0027)"},{"line_number":1270,"context_line":"    @mock.patch(\u0027cinder.utils.last_completed_audit_period\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_cb170944","line":1267,"updated":"2015-03-18 10:36:53.000000000","message":"Same here.","commit_id":"f9b6356d41af91126a6bc0b34e449dc2c4c75011"}],"cinder/tests/unit/api/contrib/test_admin_actions.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"da20ca516757c43470c29f2f2948b9990d428171","unresolved":false,"context_lines":[{"line_number":315,"context_line":"                                        \u0027provider_location\u0027: \u0027\u0027, \u0027size\u0027: 1,"},{"line_number":316,"context_line":"                                        \u0027availability_zone\u0027: \u0027test\u0027,"},{"line_number":317,"context_line":"                                        \u0027attach_status\u0027: \u0027detached\u0027})"},{"line_number":318,"context_line":"        snapshot \u003d db.snapshot_create(ctx, {\u0027status\u0027: \u0027error_deleting\u0027,"},{"line_number":319,"context_line":"                                            \u0027volume_id\u0027: volume[\u0027id\u0027]})"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"        resp \u003d self._issue_snapshot_reset(ctx,"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab921fb_3a0faf38","line":318,"updated":"2015-04-25 04:05:52.000000000","message":"Why not use object here?","commit_id":"014bbecc3cb43dc234ba1a5adf6ad2c2c63a3e75"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"e275b695825692fa0e205bf653d04081926aa7d7","unresolved":false,"context_lines":[{"line_number":315,"context_line":"                                        \u0027provider_location\u0027: \u0027\u0027, \u0027size\u0027: 1,"},{"line_number":316,"context_line":"                                        \u0027availability_zone\u0027: \u0027test\u0027,"},{"line_number":317,"context_line":"                                        \u0027attach_status\u0027: \u0027detached\u0027})"},{"line_number":318,"context_line":"        snapshot \u003d db.snapshot_create(ctx, {\u0027status\u0027: \u0027error_deleting\u0027,"},{"line_number":319,"context_line":"                                            \u0027volume_id\u0027: volume[\u0027id\u0027]})"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"        resp \u003d self._issue_snapshot_reset(ctx,"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab921fb_1933c315","line":318,"in_reply_to":"bab921fb_3a0faf38","updated":"2015-04-25 14:19:31.000000000","message":"Done","commit_id":"014bbecc3cb43dc234ba1a5adf6ad2c2c63a3e75"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"da20ca516757c43470c29f2f2948b9990d428171","unresolved":false,"context_lines":[{"line_number":323,"context_line":"                                          {\u0027status\u0027: \u0027error\u0027})"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"        self.assertEqual(resp.status_int, 202)"},{"line_number":326,"context_line":"        snapshot \u003d db.snapshot_get(ctx, snapshot[\u0027id\u0027])"},{"line_number":327,"context_line":"        self.assertEqual(snapshot[\u0027status\u0027], \u0027error\u0027)"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    def test_invalid_status_for_snapshot(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab921fb_9d06b51b","line":326,"updated":"2015-04-25 04:05:52.000000000","message":"Why not use object here?","commit_id":"014bbecc3cb43dc234ba1a5adf6ad2c2c63a3e75"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"e275b695825692fa0e205bf653d04081926aa7d7","unresolved":false,"context_lines":[{"line_number":323,"context_line":"                                          {\u0027status\u0027: \u0027error\u0027})"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"        self.assertEqual(resp.status_int, 202)"},{"line_number":326,"context_line":"        snapshot \u003d db.snapshot_get(ctx, snapshot[\u0027id\u0027])"},{"line_number":327,"context_line":"        self.assertEqual(snapshot[\u0027status\u0027], \u0027error\u0027)"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    def test_invalid_status_for_snapshot(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab921fb_3953273b","line":326,"in_reply_to":"bab921fb_9d06b51b","updated":"2015-04-25 14:19:31.000000000","message":"Done","commit_id":"014bbecc3cb43dc234ba1a5adf6ad2c2c63a3e75"}],"cinder/tests/unit/objects/test_snapshot.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"da20ca516757c43470c29f2f2948b9990d428171","unresolved":false,"context_lines":[{"line_number":179,"context_line":"        self.assertEqual(1, len(snapshots))"},{"line_number":180,"context_line":"        TestSnapshot._compare(self, fake_snapshot, snapshots[0])"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    @mock.patch(\u0027cinder.db.snapshot_metadata_get\u0027, return_value\u003d{})"},{"line_number":183,"context_line":"    @mock.patch(\u0027cinder.objects.Volume.get_by_id\u0027)"},{"line_number":184,"context_line":"    @mock.patch(\u0027cinder.db.snapshot_get_active_by_window\u0027,"},{"line_number":185,"context_line":"                return_value\u003d[fake_snapshot])"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab921fb_3d6b29b9","line":182,"updated":"2015-04-25 04:05:52.000000000","message":"not using object?","commit_id":"014bbecc3cb43dc234ba1a5adf6ad2c2c63a3e75"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"e275b695825692fa0e205bf653d04081926aa7d7","unresolved":false,"context_lines":[{"line_number":179,"context_line":"        self.assertEqual(1, len(snapshots))"},{"line_number":180,"context_line":"        TestSnapshot._compare(self, fake_snapshot, snapshots[0])"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    @mock.patch(\u0027cinder.db.snapshot_metadata_get\u0027, return_value\u003d{})"},{"line_number":183,"context_line":"    @mock.patch(\u0027cinder.objects.Volume.get_by_id\u0027)"},{"line_number":184,"context_line":"    @mock.patch(\u0027cinder.db.snapshot_get_active_by_window\u0027,"},{"line_number":185,"context_line":"                return_value\u003d[fake_snapshot])"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab921fb_ab1d9e63","line":182,"in_reply_to":"bab921fb_3d6b29b9","updated":"2015-04-25 14:19:31.000000000","message":"\u0027metadata\u0027 of a snapshot object is a dict.  Here, I am just returning an empty dict.  But this test case is just testing that we get the correct number of snapshots and snapshot data back when we call db.get_active_by_window(), so the content of the metadata does not matter much.  Also, SnapshotList.get_active_by_window directly calls db.snapshot_get_active_by_window in the method.","commit_id":"014bbecc3cb43dc234ba1a5adf6ad2c2c63a3e75"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"da20ca516757c43470c29f2f2948b9990d428171","unresolved":false,"context_lines":[{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    @mock.patch(\u0027cinder.db.snapshot_metadata_get\u0027, return_value\u003d{})"},{"line_number":183,"context_line":"    @mock.patch(\u0027cinder.objects.Volume.get_by_id\u0027)"},{"line_number":184,"context_line":"    @mock.patch(\u0027cinder.db.snapshot_get_active_by_window\u0027,"},{"line_number":185,"context_line":"                return_value\u003d[fake_snapshot])"},{"line_number":186,"context_line":"    def test_get_active_by_window(self, get_active_by_window,"},{"line_number":187,"context_line":"                                  volume_get_by_id, snapshot_metadata_get):"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab921fb_dd5d4d16","line":184,"updated":"2015-04-25 04:05:52.000000000","message":"Here too","commit_id":"014bbecc3cb43dc234ba1a5adf6ad2c2c63a3e75"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"e275b695825692fa0e205bf653d04081926aa7d7","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        fake_volume_obj \u003d fake_volume.fake_volume_obj(self.context)"},{"line_number":189,"context_line":"        volume_get_by_id.return_value \u003d fake_volume_obj"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"        snapshots \u003d snapshot_obj.SnapshotList.get_active_by_window("},{"line_number":192,"context_line":"            self.context, mock.sentinel.begin, mock.sentinel.end)"},{"line_number":193,"context_line":"        self.assertEqual(1, len(snapshots))"},{"line_number":194,"context_line":"        TestSnapshot._compare(self, fake_snapshot, snapshots[0])"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab921fb_6bdf8669","line":191,"updated":"2015-04-25 14:19:31.000000000","message":"FWIW, snapshots is a list of snapshots object.","commit_id":"014bbecc3cb43dc234ba1a5adf6ad2c2c63a3e75"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"da20ca516757c43470c29f2f2948b9990d428171","unresolved":false,"context_lines":[{"line_number":193,"context_line":"        self.assertEqual(1, len(snapshots))"},{"line_number":194,"context_line":"        TestSnapshot._compare(self, fake_snapshot, snapshots[0])"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    @mock.patch(\u0027cinder.db.snapshot_metadata_get\u0027, return_value\u003d{})"},{"line_number":197,"context_line":"    @mock.patch(\u0027cinder.objects.Volume.get_by_id\u0027)"},{"line_number":198,"context_line":"    @mock.patch(\u0027cinder.db.snapshot_get_all_for_cgsnapshot\u0027,"},{"line_number":199,"context_line":"                return_value\u003d[fake_snapshot])"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab921fb_5da81ddb","line":196,"updated":"2015-04-25 04:05:52.000000000","message":"object?","commit_id":"014bbecc3cb43dc234ba1a5adf6ad2c2c63a3e75"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"e275b695825692fa0e205bf653d04081926aa7d7","unresolved":false,"context_lines":[{"line_number":193,"context_line":"        self.assertEqual(1, len(snapshots))"},{"line_number":194,"context_line":"        TestSnapshot._compare(self, fake_snapshot, snapshots[0])"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    @mock.patch(\u0027cinder.db.snapshot_metadata_get\u0027, return_value\u003d{})"},{"line_number":197,"context_line":"    @mock.patch(\u0027cinder.objects.Volume.get_by_id\u0027)"},{"line_number":198,"context_line":"    @mock.patch(\u0027cinder.db.snapshot_get_all_for_cgsnapshot\u0027,"},{"line_number":199,"context_line":"                return_value\u003d[fake_snapshot])"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab921fb_cba1f2f9","line":196,"in_reply_to":"bab921fb_5da81ddb","updated":"2015-04-25 14:19:31.000000000","message":"Ditto.  Both of these test cases just validates the number of snapshots and the snapshot data that we get back and the SnapshotList.get_all_for_cgsnapshot and SnapshotList.get_active_by_window both make direct db calls.","commit_id":"014bbecc3cb43dc234ba1a5adf6ad2c2c63a3e75"}],"cinder/volume/manager.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"80e8478afa9034f474608031f45a7599b83ff602","unresolved":false,"context_lines":[{"line_number":2294,"context_line":"                for snapshot in snapshots:"},{"line_number":2295,"context_line":"                    # Update db if status is error"},{"line_number":2296,"context_line":"                    if snapshot[\u0027status\u0027] \u003d\u003d \u0027error\u0027:"},{"line_number":2297,"context_line":"                        update \u003d {\u0027status\u0027: snapshot[\u0027status\u0027]}"},{"line_number":2298,"context_line":"                        self.db.snapshot_update(context, snapshot[\u0027id\u0027],"},{"line_number":2299,"context_line":"                                                update)"},{"line_number":2300,"context_line":"                        # If status for one snapshot is error, make sure"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_59f05466","line":2297,"updated":"2015-03-18 10:36:53.000000000","message":"Missed occurrence.","commit_id":"f9b6356d41af91126a6bc0b34e449dc2c4c75011"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"80c7f4b7aa2143f488b21b48d3413d9a29d6e962","unresolved":false,"context_lines":[{"line_number":2294,"context_line":"                for snapshot in snapshots:"},{"line_number":2295,"context_line":"                    # Update db if status is error"},{"line_number":2296,"context_line":"                    if snapshot[\u0027status\u0027] \u003d\u003d \u0027error\u0027:"},{"line_number":2297,"context_line":"                        update \u003d {\u0027status\u0027: snapshot[\u0027status\u0027]}"},{"line_number":2298,"context_line":"                        self.db.snapshot_update(context, snapshot[\u0027id\u0027],"},{"line_number":2299,"context_line":"                                                update)"},{"line_number":2300,"context_line":"                        # If status for one snapshot is error, make sure"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_4df884c4","line":2297,"in_reply_to":"9a80dd14_59f05466","updated":"2015-03-18 14:38:52.000000000","message":"I left this out for now because the snapshot here is no longer an object.  It is a dict coming from driver.create_cgsnapshot.  If we are to use objects, it would force another db lookup just to update.  Same with the ones below.  I have to find a better way to just update without a lookup.","commit_id":"f9b6356d41af91126a6bc0b34e449dc2c4c75011"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"80e8478afa9034f474608031f45a7599b83ff602","unresolved":false,"context_lines":[{"line_number":2329,"context_line":"                                  \" %(volume_id)s metadata\") %"},{"line_number":2330,"context_line":"                              {\u0027volume_id\u0027: volume_id,"},{"line_number":2331,"context_line":"                               \u0027snapshot_id\u0027: snapshot_id})"},{"line_number":2332,"context_line":"                    self.db.snapshot_update(context,"},{"line_number":2333,"context_line":"                                            snapshot.id,"},{"line_number":2334,"context_line":"                                            {\u0027status\u0027: \u0027error\u0027})"},{"line_number":2335,"context_line":"                    raise exception.MetadataCopyFailure(reason\u003dex)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_399480e7","line":2332,"updated":"2015-03-18 10:36:53.000000000","message":"Missed occurrence.","commit_id":"f9b6356d41af91126a6bc0b34e449dc2c4c75011"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"80c7f4b7aa2143f488b21b48d3413d9a29d6e962","unresolved":false,"context_lines":[{"line_number":2329,"context_line":"                                  \" %(volume_id)s metadata\") %"},{"line_number":2330,"context_line":"                              {\u0027volume_id\u0027: volume_id,"},{"line_number":2331,"context_line":"                               \u0027snapshot_id\u0027: snapshot_id})"},{"line_number":2332,"context_line":"                    self.db.snapshot_update(context,"},{"line_number":2333,"context_line":"                                            snapshot.id,"},{"line_number":2334,"context_line":"                                            {\u0027status\u0027: \u0027error\u0027})"},{"line_number":2335,"context_line":"                    raise exception.MetadataCopyFailure(reason\u003dex)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_6df388e7","line":2332,"in_reply_to":"9a80dd14_399480e7","updated":"2015-03-18 14:38:52.000000000","message":"Ditto","commit_id":"f9b6356d41af91126a6bc0b34e449dc2c4c75011"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"80e8478afa9034f474608031f45a7599b83ff602","unresolved":false,"context_lines":[{"line_number":2379,"context_line":""},{"line_number":2380,"context_line":"            if snapshots:"},{"line_number":2381,"context_line":"                for snapshot in snapshots:"},{"line_number":2382,"context_line":"                    update \u003d {\u0027status\u0027: snapshot[\u0027status\u0027]}"},{"line_number":2383,"context_line":"                    self.db.snapshot_update(context, snapshot[\u0027id\u0027],"},{"line_number":2384,"context_line":"                                            update)"},{"line_number":2385,"context_line":"                    if snapshot[\u0027status\u0027] in [\u0027error_deleting\u0027, \u0027error\u0027] and \\"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_79b5187d","line":2382,"updated":"2015-03-18 10:36:53.000000000","message":"Missed occurrence.","commit_id":"f9b6356d41af91126a6bc0b34e449dc2c4c75011"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"80c7f4b7aa2143f488b21b48d3413d9a29d6e962","unresolved":false,"context_lines":[{"line_number":2379,"context_line":""},{"line_number":2380,"context_line":"            if snapshots:"},{"line_number":2381,"context_line":"                for snapshot in snapshots:"},{"line_number":2382,"context_line":"                    update \u003d {\u0027status\u0027: snapshot[\u0027status\u0027]}"},{"line_number":2383,"context_line":"                    self.db.snapshot_update(context, snapshot[\u0027id\u0027],"},{"line_number":2384,"context_line":"                                            update)"},{"line_number":2385,"context_line":"                    if snapshot[\u0027status\u0027] in [\u0027error_deleting\u0027, \u0027error\u0027] and \\"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_adfd80b3","line":2382,"in_reply_to":"9a80dd14_79b5187d","updated":"2015-03-18 14:38:52.000000000","message":"Ditto","commit_id":"f9b6356d41af91126a6bc0b34e449dc2c4c75011"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"da20ca516757c43470c29f2f2948b9990d428171","unresolved":false,"context_lines":[{"line_number":2388,"context_line":"                for snapshot in snapshots:"},{"line_number":2389,"context_line":"                    # Update db if status is error"},{"line_number":2390,"context_line":"                    if snapshot[\u0027status\u0027] \u003d\u003d \u0027error\u0027:"},{"line_number":2391,"context_line":"                        update \u003d {\u0027status\u0027: snapshot[\u0027status\u0027]}"},{"line_number":2392,"context_line":"                        self.db.snapshot_update(context, snapshot[\u0027id\u0027],"},{"line_number":2393,"context_line":"                                                update)"},{"line_number":2394,"context_line":"                        # If status for one snapshot is error, make sure"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab921fb_1dc4e58e","line":2391,"updated":"2015-04-25 04:05:52.000000000","message":"Please add a TODO here to change to object after cgsnapshot is switched over to use object.","commit_id":"014bbecc3cb43dc234ba1a5adf6ad2c2c63a3e75"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"e275b695825692fa0e205bf653d04081926aa7d7","unresolved":false,"context_lines":[{"line_number":2388,"context_line":"                for snapshot in snapshots:"},{"line_number":2389,"context_line":"                    # Update db if status is error"},{"line_number":2390,"context_line":"                    if snapshot[\u0027status\u0027] \u003d\u003d \u0027error\u0027:"},{"line_number":2391,"context_line":"                        update \u003d {\u0027status\u0027: snapshot[\u0027status\u0027]}"},{"line_number":2392,"context_line":"                        self.db.snapshot_update(context, snapshot[\u0027id\u0027],"},{"line_number":2393,"context_line":"                                                update)"},{"line_number":2394,"context_line":"                        # If status for one snapshot is error, make sure"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab921fb_0be24a2f","line":2391,"in_reply_to":"bab921fb_1dc4e58e","updated":"2015-04-25 14:19:31.000000000","message":"Done","commit_id":"014bbecc3cb43dc234ba1a5adf6ad2c2c63a3e75"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"da20ca516757c43470c29f2f2948b9990d428171","unresolved":false,"context_lines":[{"line_number":2415,"context_line":"            vol_ref \u003d self.db.volume_get(context, volume_id)"},{"line_number":2416,"context_line":"            if vol_ref.bootable:"},{"line_number":2417,"context_line":"                try:"},{"line_number":2418,"context_line":"                    self.db.volume_glance_metadata_copy_to_snapshot("},{"line_number":2419,"context_line":"                        context, snapshot_id, volume_id)"},{"line_number":2420,"context_line":"                except exception.CinderException as ex:"},{"line_number":2421,"context_line":"                    LOG.error(_LE(\"Failed updating %(snapshot_id)s\""}],"source_content_type":"text/x-python","patch_set":11,"id":"bab921fb_3d4e893b","line":2418,"updated":"2015-04-25 04:05:52.000000000","message":"This is not using object.","commit_id":"014bbecc3cb43dc234ba1a5adf6ad2c2c63a3e75"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"e275b695825692fa0e205bf653d04081926aa7d7","unresolved":false,"context_lines":[{"line_number":2415,"context_line":"            vol_ref \u003d self.db.volume_get(context, volume_id)"},{"line_number":2416,"context_line":"            if vol_ref.bootable:"},{"line_number":2417,"context_line":"                try:"},{"line_number":2418,"context_line":"                    self.db.volume_glance_metadata_copy_to_snapshot("},{"line_number":2419,"context_line":"                        context, snapshot_id, volume_id)"},{"line_number":2420,"context_line":"                except exception.CinderException as ex:"},{"line_number":2421,"context_line":"                    LOG.error(_LE(\"Failed updating %(snapshot_id)s\""}],"source_content_type":"text/x-python","patch_set":11,"id":"bab921fb_abda3e49","line":2418,"in_reply_to":"bab921fb_3d4e893b","updated":"2015-04-25 14:19:31.000000000","message":"Hmm.  Is vol_glance_metadata part of a snapshot object?   I was not quite sure here.","commit_id":"014bbecc3cb43dc234ba1a5adf6ad2c2c63a3e75"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"da20ca516757c43470c29f2f2948b9990d428171","unresolved":false,"context_lines":[{"line_number":2423,"context_line":"                                  \" %(volume_id)s metadata\") %"},{"line_number":2424,"context_line":"                              {\u0027volume_id\u0027: volume_id,"},{"line_number":2425,"context_line":"                               \u0027snapshot_id\u0027: snapshot_id})"},{"line_number":2426,"context_line":"                    self.db.snapshot_update(context,"},{"line_number":2427,"context_line":"                                            snapshot_id,"},{"line_number":2428,"context_line":"                                            {\u0027status\u0027: \u0027error\u0027})"},{"line_number":2429,"context_line":"                    raise exception.MetadataCopyFailure(reason\u003dex)"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab921fb_bd6059a6","line":2426,"updated":"2015-04-25 04:05:52.000000000","message":"Need a TODO here too.","commit_id":"014bbecc3cb43dc234ba1a5adf6ad2c2c63a3e75"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"e275b695825692fa0e205bf653d04081926aa7d7","unresolved":false,"context_lines":[{"line_number":2423,"context_line":"                                  \" %(volume_id)s metadata\") %"},{"line_number":2424,"context_line":"                              {\u0027volume_id\u0027: volume_id,"},{"line_number":2425,"context_line":"                               \u0027snapshot_id\u0027: snapshot_id})"},{"line_number":2426,"context_line":"                    self.db.snapshot_update(context,"},{"line_number":2427,"context_line":"                                            snapshot_id,"},{"line_number":2428,"context_line":"                                            {\u0027status\u0027: \u0027error\u0027})"},{"line_number":2429,"context_line":"                    raise exception.MetadataCopyFailure(reason\u003dex)"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab921fb_6be9c6e5","line":2426,"in_reply_to":"bab921fb_bd6059a6","updated":"2015-04-25 14:19:31.000000000","message":"Done","commit_id":"014bbecc3cb43dc234ba1a5adf6ad2c2c63a3e75"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"739c37c8f85f7098de1789b4114f49b164551a6f","unresolved":false,"context_lines":[{"line_number":2429,"context_line":"                               \u0027snapshot_id\u0027: snapshot_id})"},{"line_number":2430,"context_line":""},{"line_number":2431,"context_line":"                    # TODO(thangp): Switch over to use snapshot.update()"},{"line_number":2432,"context_line":"                    # after cgsnapshot has been switched over to objects"},{"line_number":2433,"context_line":"                    self.db.snapshot_update(context,"},{"line_number":2434,"context_line":"                                            snapshot_id,"},{"line_number":2435,"context_line":"                                            {\u0027status\u0027: \u0027error\u0027})"}],"source_content_type":"text/x-python","patch_set":21,"id":"5afe65bd_f3b400f3","line":2432,"updated":"2015-06-02 22:52:19.000000000","message":"we have the snapshot object from line 2416, why can\u0027t we call update on that here instead of self.db.snapshot_update?","commit_id":"38fe114fcd23a834fec239726dfd7bdd969782c1"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"b6e4e0590e132ea3d0925c927a0754850ae2fafe","unresolved":false,"context_lines":[{"line_number":2429,"context_line":"                               \u0027snapshot_id\u0027: snapshot_id})"},{"line_number":2430,"context_line":""},{"line_number":2431,"context_line":"                    # TODO(thangp): Switch over to use snapshot.update()"},{"line_number":2432,"context_line":"                    # after cgsnapshot has been switched over to objects"},{"line_number":2433,"context_line":"                    self.db.snapshot_update(context,"},{"line_number":2434,"context_line":"                                            snapshot_id,"},{"line_number":2435,"context_line":"                                            {\u0027status\u0027: \u0027error\u0027})"}],"source_content_type":"text/x-python","patch_set":21,"id":"5afe65bd_27c00ee0","line":2432,"in_reply_to":"5afe65bd_f3b400f3","updated":"2015-06-03 02:00:11.000000000","message":"L2385 - self.driver.create_cgsnapshot returns a list of snapshot dictionaries which could have been altered by the driver.  Updating the snapshot objects from L2367 here would not keep any changes that would have been within self.driver.create_cgsnapshot().","commit_id":"38fe114fcd23a834fec239726dfd7bdd969782c1"}]}
