)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"e3aa065b526133ff1af6a67da654d79579bffc47","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Snapshot object"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Abstract volume snapshots into objects."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I387018e80c8539565e99454db65d976030002c0f"},{"line_number":12,"context_line":"Implements: blueprint cinder-objects"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":27,"id":"da86d52c_f0adb1eb","line":9,"updated":"2015-02-16 13:33:32.000000000","message":"And volumes?","commit_id":"025689e43a0eda70e24ec594118d06b64006426c"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"6d54c6986661f4819eef3bca0b4fd0f8224a4916","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Snapshot object"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Abstract volume snapshots into objects."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I387018e80c8539565e99454db65d976030002c0f"},{"line_number":12,"context_line":"Implements: blueprint cinder-objects"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":27,"id":"da86d52c_040be32b","line":9,"in_reply_to":"da86d52c_89944ce9","updated":"2015-02-16 15:27:16.000000000","message":"Adding that info to the commit message would be great - for people not following the intimate details, it explains why there\u0027s a partial conversion of the volume object there.","commit_id":"025689e43a0eda70e24ec594118d06b64006426c"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"1cb0572e42950a1edc36f1c776a4eb2118023ad9","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Snapshot object"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Abstract volume snapshots into objects."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I387018e80c8539565e99454db65d976030002c0f"},{"line_number":12,"context_line":"Implements: blueprint cinder-objects"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":27,"id":"da86d52c_89944ce9","line":9,"in_reply_to":"da86d52c_f0adb1eb","updated":"2015-02-16 15:08:05.000000000","message":"I can add volumes into the message.  The reason I was hesitating was because I did not change all the internals to use the volume object yet, although volume is referenced and used by the snapshot object.","commit_id":"025689e43a0eda70e24ec594118d06b64006426c"},{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"e7151c594e7a5c3a7c4440ca6add5ce37bb10bab","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-02-16 13:20:18 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Snapshot object"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Abstract volumes and volume snapshots into objects."},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"da86d52c_e2b86813","line":7,"updated":"2015-02-17 07:44:03.000000000","message":"You mean\n\n Volume and snapshot object\n\n?\n\nAlso, we should be more explicit here regarding what exactly we are changing. It seems we are changing snapshot_get (get one snapshot) here, but not get_all_snapshots (getting a list of snapshots) AFAICS from cinder/api/v1/snapshots.py","commit_id":"287260761a14d79171a7d987ec56ec847255ced4"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"5d74763fa7cbfc889247a1a6f61b977d540a8e33","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-02-16 13:20:18 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Snapshot object"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Abstract volumes and volume snapshots into objects."},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"da86d52c_6f3373f6","line":7,"in_reply_to":"da86d52c_e2b86813","updated":"2015-02-17 14:58:45.000000000","message":"I forgot to update the title, but will in the next patch.  As for get_all_snapshots, I missed updating cinder/volume/api.py - get_all_snapshots() to use objects.  I will do it in the next patch.","commit_id":"287260761a14d79171a7d987ec56ec847255ced4"}],"cinder/api/contrib/admin_actions.py":[{"author":{"_account_id":6825,"name":"Gary W. Smith","email":"garysmith123@gmail.com","username":"gary-w-smith"},"change_message_id":"7b02f242d7d0f8eb1159f01ef86a0ba1d13c4b29","unresolved":false,"context_lines":[{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def _delete(self, *args, **kwargs):"},{"line_number":265,"context_line":"        context \u003d args[0]"},{"line_number":266,"context_line":"        resource \u003d args[1]"},{"line_number":267,"context_line":"        snapshot_id \u003d resource.get(\u0027id\u0027)"},{"line_number":268,"context_line":"        force \u003d kwargs.get(\u0027force\u0027)"},{"line_number":269,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"fa81d914_ec919153","line":266,"updated":"2015-01-28 04:58:48.000000000","message":"It would be more appropriate to define delete as:\n\n def _delete(self, context, resource, **kwargs)","commit_id":"100c5ccce84881a75a3ebebd8e04a751369fb79a"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"c6e7785708c7051607e4110979259d95c42c3b93","unresolved":false,"context_lines":[{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def _delete(self, *args, **kwargs):"},{"line_number":265,"context_line":"        context \u003d args[0]"},{"line_number":266,"context_line":"        resource \u003d args[1]"},{"line_number":267,"context_line":"        snapshot_id \u003d resource.get(\u0027id\u0027)"},{"line_number":268,"context_line":"        force \u003d kwargs.get(\u0027force\u0027)"},{"line_number":269,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"fa81d914_57884c1f","line":266,"in_reply_to":"fa81d914_ec919153","updated":"2015-01-28 17:06:53.000000000","message":"I agree it would look cleaner, but I did it this way because I did not want to change the function signature.  I am not sure here.","commit_id":"100c5ccce84881a75a3ebebd8e04a751369fb79a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"057d0e57aa395e8593809e937399b6c316c084d0","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        \"\"\"Return snapshot object.\"\"\""},{"line_number":252,"context_line":"        try:"},{"line_number":253,"context_line":"            return snapshot_obj.Snapshot.get_by_id(context, snapshot_id)"},{"line_number":254,"context_line":"        except exception.NotFound:"},{"line_number":255,"context_line":"            msg \u003d _(\"Snapshot could not be found\")"},{"line_number":256,"context_line":"            raise exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":257,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"da86d52c_273fc888","line":254,"updated":"2015-02-11 06:33:31.000000000","message":"There is a SnapshotNotFound exception which is more appropiate here.","commit_id":"b721b1c0c64583095ce491062c9400462bd11e0f"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"e6b9d4af64468933b976f034be95d86c92eee207","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        \"\"\"Return snapshot object.\"\"\""},{"line_number":252,"context_line":"        try:"},{"line_number":253,"context_line":"            return snapshot_obj.Snapshot.get_by_id(context, snapshot_id)"},{"line_number":254,"context_line":"        except exception.NotFound:"},{"line_number":255,"context_line":"            msg \u003d _(\"Snapshot could not be found\")"},{"line_number":256,"context_line":"            raise exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":257,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"da86d52c_fee36931","line":254,"in_reply_to":"da86d52c_273fc888","updated":"2015-02-11 15:20:22.000000000","message":"Done","commit_id":"b721b1c0c64583095ce491062c9400462bd11e0f"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"52b695c6e731ece42ef0b99c36bb999c2c45df71","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from cinder import db"},{"line_number":23,"context_line":"from cinder import exception"},{"line_number":24,"context_line":"from cinder.i18n import _"},{"line_number":25,"context_line":"from cinder.objects import snapshot as snapshot_obj"},{"line_number":26,"context_line":"from cinder.openstack.common import log as logging"},{"line_number":27,"context_line":"from cinder import rpc"},{"line_number":28,"context_line":"from cinder import volume"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_b861d73a","line":25,"updated":"2015-02-19 13:57:08.000000000","message":"Why not use \"from cinder import objects\"?","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"c29f0e56dd9be43dd8d41ad07d46fe65de2ef348","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from cinder import db"},{"line_number":23,"context_line":"from cinder import exception"},{"line_number":24,"context_line":"from cinder.i18n import _"},{"line_number":25,"context_line":"from cinder.objects import snapshot as snapshot_obj"},{"line_number":26,"context_line":"from cinder.openstack.common import log as logging"},{"line_number":27,"context_line":"from cinder import rpc"},{"line_number":28,"context_line":"from cinder import volume"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_a718cbcd","line":25,"in_reply_to":"da86d52c_b861d73a","updated":"2015-02-19 19:24:21.000000000","message":"I should.","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"52b695c6e731ece42ef0b99c36bb999c2c45df71","unresolved":false,"context_lines":[{"line_number":256,"context_line":"            raise exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    def _update(self, *args, **kwargs):"},{"line_number":259,"context_line":"        db.snapshot_update(*args, **kwargs)"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"    def _get(self, *args, **kwargs):"},{"line_number":262,"context_line":"        return self.volume_api.get_snapshot(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_d8f20b6e","line":259,"updated":"2015-02-19 13:57:08.000000000","message":"Not using objects here?","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"}],"cinder/api/v1/snapshots.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"057d0e57aa395e8593809e937399b6c316c084d0","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from cinder.api import xmlutil"},{"line_number":25,"context_line":"from cinder import exception"},{"line_number":26,"context_line":"from cinder.i18n import _, _LI"},{"line_number":27,"context_line":"from cinder.objects import snapshot as snapshot_obj"},{"line_number":28,"context_line":"from cinder.openstack.common import log as logging"},{"line_number":29,"context_line":"from cinder import utils"},{"line_number":30,"context_line":"from cinder import volume"}],"source_content_type":"text/x-python","patch_set":25,"id":"da86d52c_87ccf48a","line":27,"updated":"2015-02-11 06:33:31.000000000","message":"We should not be changing V1 API to add new features any more.  Are there any problems if you don\u0027t change V1?","commit_id":"b721b1c0c64583095ce491062c9400462bd11e0f"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"0aed30d2ed7713079211902812086dd21da7d4f9","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from cinder.api import xmlutil"},{"line_number":25,"context_line":"from cinder import exception"},{"line_number":26,"context_line":"from cinder.i18n import _, _LI"},{"line_number":27,"context_line":"from cinder.objects import snapshot as snapshot_obj"},{"line_number":28,"context_line":"from cinder.openstack.common import log as logging"},{"line_number":29,"context_line":"from cinder import utils"},{"line_number":30,"context_line":"from cinder import volume"}],"source_content_type":"text/x-python","patch_set":25,"id":"da86d52c_89b15503","line":27,"in_reply_to":"da86d52c_7e7f7917","updated":"2015-02-11 15:26:16.000000000","message":"I\u0027ll let Mike to decide on this. He is taking care of API deprecation. Thanks.","commit_id":"b721b1c0c64583095ce491062c9400462bd11e0f"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"e6b9d4af64468933b976f034be95d86c92eee207","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from cinder.api import xmlutil"},{"line_number":25,"context_line":"from cinder import exception"},{"line_number":26,"context_line":"from cinder.i18n import _, _LI"},{"line_number":27,"context_line":"from cinder.objects import snapshot as snapshot_obj"},{"line_number":28,"context_line":"from cinder.openstack.common import log as logging"},{"line_number":29,"context_line":"from cinder import utils"},{"line_number":30,"context_line":"from cinder import volume"}],"source_content_type":"text/x-python","patch_set":25,"id":"da86d52c_7e7f7917","line":27,"in_reply_to":"da86d52c_87ccf48a","updated":"2015-02-11 15:20:22.000000000","message":"It would just make the code in cinder/volume/api.py a little more messy, since we have to detect if the snapshot being passed to it is a UUID or a snapshot object.\n\nIt could be done, but the change below is pretty minimal.  Could we make an exception?  Otherwise, I can attempt to put in the detection code.","commit_id":"b721b1c0c64583095ce491062c9400462bd11e0f"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"057d0e57aa395e8593809e937399b6c316c084d0","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        \"\"\"Return snapshot object.\"\"\""},{"line_number":106,"context_line":"        try:"},{"line_number":107,"context_line":"            return snapshot_obj.Snapshot.get_by_id(context, snapshot_id)"},{"line_number":108,"context_line":"        except exception.NotFound:"},{"line_number":109,"context_line":"            msg \u003d _(\"Snapshot could not be found\")"},{"line_number":110,"context_line":"            raise exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"da86d52c_a79c986b","line":108,"updated":"2015-02-11 06:33:31.000000000","message":"SnapshotNotFound","commit_id":"b721b1c0c64583095ce491062c9400462bd11e0f"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"e6b9d4af64468933b976f034be95d86c92eee207","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        \"\"\"Return snapshot object.\"\"\""},{"line_number":106,"context_line":"        try:"},{"line_number":107,"context_line":"            return snapshot_obj.Snapshot.get_by_id(context, snapshot_id)"},{"line_number":108,"context_line":"        except exception.NotFound:"},{"line_number":109,"context_line":"            msg \u003d _(\"Snapshot could not be found\")"},{"line_number":110,"context_line":"            raise exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"da86d52c_9e842d0c","line":108,"in_reply_to":"da86d52c_a79c986b","updated":"2015-02-11 15:20:22.000000000","message":"Done","commit_id":"b721b1c0c64583095ce491062c9400462bd11e0f"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"52b695c6e731ece42ef0b99c36bb999c2c45df71","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from cinder.api import xmlutil"},{"line_number":25,"context_line":"from cinder import exception"},{"line_number":26,"context_line":"from cinder.i18n import _, _LI"},{"line_number":27,"context_line":"from cinder.objects import snapshot as snapshot_obj"},{"line_number":28,"context_line":"from cinder.openstack.common import log as logging"},{"line_number":29,"context_line":"from cinder import utils"},{"line_number":30,"context_line":"from cinder import volume"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_d8c04be2","line":27,"updated":"2015-02-19 13:57:08.000000000","message":"Why not \"from cinder import objects\"?","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"c29f0e56dd9be43dd8d41ad07d46fe65de2ef348","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from cinder.api import xmlutil"},{"line_number":25,"context_line":"from cinder import exception"},{"line_number":26,"context_line":"from cinder.i18n import _, _LI"},{"line_number":27,"context_line":"from cinder.objects import snapshot as snapshot_obj"},{"line_number":28,"context_line":"from cinder.openstack.common import log as logging"},{"line_number":29,"context_line":"from cinder import utils"},{"line_number":30,"context_line":"from cinder import volume"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_a6f2886c","line":27,"in_reply_to":"da86d52c_d8c04be2","updated":"2015-02-19 19:24:21.000000000","message":"Done","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"52b695c6e731ece42ef0b99c36bb999c2c45df71","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        context \u003d req.environ[\u0027cinder.context\u0027]"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        try:"},{"line_number":114,"context_line":"            snapshot \u003d self._get_snapshot(context, id)"},{"line_number":115,"context_line":"            req.cache_db_snapshot(snapshot)"},{"line_number":116,"context_line":"        except exception.NotFound:"},{"line_number":117,"context_line":"            raise exc.HTTPNotFound()"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_c32a1c7d","line":114,"updated":"2015-02-19 13:57:08.000000000","message":"Why we\u0027re changing this there instead of inside volume_api?","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"e04bc28d68cac438dc74176948ae559df322ddc8","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        context \u003d req.environ[\u0027cinder.context\u0027]"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        try:"},{"line_number":114,"context_line":"            snapshot \u003d self._get_snapshot(context, id)"},{"line_number":115,"context_line":"            req.cache_db_snapshot(snapshot)"},{"line_number":116,"context_line":"        except exception.NotFound:"},{"line_number":117,"context_line":"            raise exc.HTTPNotFound()"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_92321e0e","line":114,"in_reply_to":"da86d52c_a63528f8","updated":"2015-02-19 20:00:42.000000000","message":"I take that back, we did not go over rpc yet, so it should go in volume_api.","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"c29f0e56dd9be43dd8d41ad07d46fe65de2ef348","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        context \u003d req.environ[\u0027cinder.context\u0027]"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        try:"},{"line_number":114,"context_line":"            snapshot \u003d self._get_snapshot(context, id)"},{"line_number":115,"context_line":"            req.cache_db_snapshot(snapshot)"},{"line_number":116,"context_line":"        except exception.NotFound:"},{"line_number":117,"context_line":"            raise exc.HTTPNotFound()"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_a63528f8","line":114,"in_reply_to":"da86d52c_c32a1c7d","updated":"2015-02-19 19:24:21.000000000","message":"We want to be sending objects over rpc, not just a dict.  The cinder-api service is the entry point and it should send the object to the cinder-volume service, not the other way around.","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"}],"cinder/api/v2/snapshots.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"057d0e57aa395e8593809e937399b6c316c084d0","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        \"\"\"Return snapshot object.\"\"\""},{"line_number":106,"context_line":"        try:"},{"line_number":107,"context_line":"            return snapshot_obj.Snapshot.get_by_id(context, snapshot_id)"},{"line_number":108,"context_line":"        except exception.NotFound:"},{"line_number":109,"context_line":"            msg \u003d _(\"Snapshot could not be found\")"},{"line_number":110,"context_line":"            raise exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"da86d52c_c7eb4cda","line":108,"updated":"2015-02-11 06:33:31.000000000","message":"SnapshotNotFound exception","commit_id":"b721b1c0c64583095ce491062c9400462bd11e0f"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"e6b9d4af64468933b976f034be95d86c92eee207","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        \"\"\"Return snapshot object.\"\"\""},{"line_number":106,"context_line":"        try:"},{"line_number":107,"context_line":"            return snapshot_obj.Snapshot.get_by_id(context, snapshot_id)"},{"line_number":108,"context_line":"        except exception.NotFound:"},{"line_number":109,"context_line":"            msg \u003d _(\"Snapshot could not be found\")"},{"line_number":110,"context_line":"            raise exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"da86d52c_de794530","line":108,"in_reply_to":"da86d52c_c7eb4cda","updated":"2015-02-11 15:20:22.000000000","message":"Done","commit_id":"b721b1c0c64583095ce491062c9400462bd11e0f"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"52b695c6e731ece42ef0b99c36bb999c2c45df71","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from cinder.api import xmlutil"},{"line_number":25,"context_line":"from cinder import exception"},{"line_number":26,"context_line":"from cinder.i18n import _, _LI"},{"line_number":27,"context_line":"from cinder.objects import snapshot as snapshot_obj"},{"line_number":28,"context_line":"from cinder.openstack.common import log as logging"},{"line_number":29,"context_line":"from cinder import utils"},{"line_number":30,"context_line":"from cinder import volume"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_c3785c91","line":27,"updated":"2015-02-19 13:57:08.000000000","message":"\"from cinder import objects\"?","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"52b695c6e731ece42ef0b99c36bb999c2c45df71","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        context \u003d req.environ[\u0027cinder.context\u0027]"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        try:"},{"line_number":114,"context_line":"            snapshot \u003d self._get_snapshot(context, id)"},{"line_number":115,"context_line":"            req.cache_db_snapshot(snapshot)"},{"line_number":116,"context_line":"        except exception.NotFound:"},{"line_number":117,"context_line":"            msg \u003d _(\"Snapshot could not be found\")"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_635fb00f","line":114,"updated":"2015-02-19 13:57:08.000000000","message":"Same concern like for v1 version.","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"c29f0e56dd9be43dd8d41ad07d46fe65de2ef348","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        context \u003d req.environ[\u0027cinder.context\u0027]"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        try:"},{"line_number":114,"context_line":"            snapshot \u003d self._get_snapshot(context, id)"},{"line_number":115,"context_line":"            req.cache_db_snapshot(snapshot)"},{"line_number":116,"context_line":"        except exception.NotFound:"},{"line_number":117,"context_line":"            msg \u003d _(\"Snapshot could not be found\")"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_e63ba0e7","line":114,"in_reply_to":"da86d52c_635fb00f","updated":"2015-02-19 19:24:21.000000000","message":"Ditto","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"}],"cinder/hacking/checks.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"057d0e57aa395e8593809e937399b6c316c084d0","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"\"\"\""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"UNDERSCORE_IMPORT_FILES \u003d [\u0027./cinder/objects/__init__.py\u0027]"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"translated_log \u003d re.compile("},{"line_number":35,"context_line":"    r\"(.)*LOG\\.(audit|error|info|warn|warning|critical|exception)\""}],"source_content_type":"text/x-python","patch_set":25,"id":"da86d52c_47a83cdb","line":32,"updated":"2015-02-11 06:33:31.000000000","message":"Why do we need to add this?","commit_id":"b721b1c0c64583095ce491062c9400462bd11e0f"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"e6b9d4af64468933b976f034be95d86c92eee207","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"\"\"\""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"UNDERSCORE_IMPORT_FILES \u003d [\u0027./cinder/objects/__init__.py\u0027]"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"translated_log \u003d re.compile("},{"line_number":35,"context_line":"    r\"(.)*LOG\\.(audit|error|info|warn|warning|critical|exception)\""}],"source_content_type":"text/x-python","patch_set":25,"id":"da86d52c_7ee4d9df","line":32,"in_reply_to":"da86d52c_47a83cdb","updated":"2015-02-11 15:20:22.000000000","message":"I had a pep8 error:\n\nN323  Found use of _() without explicit import of _ !\n\nApparently, it does not like me using the __import__.  I can add a note here to mention it.","commit_id":"b721b1c0c64583095ce491062c9400462bd11e0f"},{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"e7151c594e7a5c3a7c4440ca6add5ce37bb10bab","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"\"\"\""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"# NOTE(thangp): Ignore N323 pep8 error caused by importing cinder objects"},{"line_number":33,"context_line":"UNDERSCORE_IMPORT_FILES \u003d [\u0027./cinder/objects/__init__.py\u0027]"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"translated_log \u003d re.compile("}],"source_content_type":"text/x-python","patch_set":28,"id":"da86d52c_62e0f8fa","line":32,"updated":"2015-02-17 07:44:03.000000000","message":"will this go away once we start using oslo.versionedobjects?","commit_id":"287260761a14d79171a7d987ec56ec847255ced4"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"5d74763fa7cbfc889247a1a6f61b977d540a8e33","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"\"\"\""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"# NOTE(thangp): Ignore N323 pep8 error caused by importing cinder objects"},{"line_number":33,"context_line":"UNDERSCORE_IMPORT_FILES \u003d [\u0027./cinder/objects/__init__.py\u0027]"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"translated_log \u003d re.compile("}],"source_content_type":"text/x-python","patch_set":28,"id":"da86d52c_af81eb4e","line":32,"in_reply_to":"da86d52c_62e0f8fa","updated":"2015-02-17 14:58:45.000000000","message":"No.  __init__ is used to import each object via register_all().  Whether we are using oslo_versionedobjects or not, register_all will continue to exist, and this pep8 error will continue to complain about the __import__() :P","commit_id":"287260761a14d79171a7d987ec56ec847255ced4"}],"cinder/objects/__init__.py":[{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"c3913deafd3ac4465401c20593bab4ba764fff35","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    # function in order for it to be registered by services that may"},{"line_number":26,"context_line":"    # need to receive it via RPC."},{"line_number":27,"context_line":"    __import__(\u0027cinder.objects.volume\u0027)"},{"line_number":28,"context_line":"    __import__(\u0027cinder.objects.snapshot\u0027)"}],"source_content_type":"text/x-python","patch_set":27,"id":"da86d52c_861440a0","line":28,"updated":"2015-02-16 13:31:49.000000000","message":"I can see a hacking check for ensuring these get added (Search the source tree for cidner/object/*.py, trim out known exclusions and report the rest?) being useful in future... not needed now, but a list like this that needs manually updating is always fragile.","commit_id":"025689e43a0eda70e24ec594118d06b64006426c"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"6d54c6986661f4819eef3bca0b4fd0f8224a4916","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    # function in order for it to be registered by services that may"},{"line_number":26,"context_line":"    # need to receive it via RPC."},{"line_number":27,"context_line":"    __import__(\u0027cinder.objects.volume\u0027)"},{"line_number":28,"context_line":"    __import__(\u0027cinder.objects.snapshot\u0027)"}],"source_content_type":"text/x-python","patch_set":27,"id":"da86d52c_ff11fa53","line":28,"in_reply_to":"da86d52c_09af7c2c","updated":"2015-02-16 15:27:16.000000000","message":"Thanks. No rush, just thought I\u0027d note it while I thought of it.","commit_id":"025689e43a0eda70e24ec594118d06b64006426c"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"1cb0572e42950a1edc36f1c776a4eb2118023ad9","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    # function in order for it to be registered by services that may"},{"line_number":26,"context_line":"    # need to receive it via RPC."},{"line_number":27,"context_line":"    __import__(\u0027cinder.objects.volume\u0027)"},{"line_number":28,"context_line":"    __import__(\u0027cinder.objects.snapshot\u0027)"}],"source_content_type":"text/x-python","patch_set":27,"id":"da86d52c_09af7c2c","line":28,"in_reply_to":"da86d52c_861440a0","updated":"2015-02-16 15:08:05.000000000","message":"Ok, sounds fair.  I can add it in a subsequent patch.","commit_id":"025689e43a0eda70e24ec594118d06b64006426c"}],"cinder/objects/base.py":[{"author":{"_account_id":6825,"name":"Gary W. Smith","email":"garysmith123@gmail.com","username":"gary-w-smith"},"change_message_id":"7b02f242d7d0f8eb1159f01ef86a0ba1d13c4b29","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#    Copyright 2014 IBM Corp."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"},{"line_number":5,"context_line":"#    a copy of the License at"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa81d914_cc53ed6a","line":2,"updated":"2015-01-28 04:58:48.000000000","message":"Adding a copyright to files that are not even changed in this change seems odd","commit_id":"100c5ccce84881a75a3ebebd8e04a751369fb79a"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"c6e7785708c7051607e4110979259d95c42c3b93","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#    Copyright 2014 IBM Corp."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"},{"line_number":5,"context_line":"#    a copy of the License at"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa81d914_97ce4459","line":2,"in_reply_to":"fa81d914_cc53ed6a","updated":"2015-01-28 17:06:53.000000000","message":"I can put this in the cinder-objects patch instead of the snapshot-object patch.","commit_id":"100c5ccce84881a75a3ebebd8e04a751369fb79a"}],"cinder/objects/fields.py":[{"author":{"_account_id":6825,"name":"Gary W. Smith","email":"garysmith123@gmail.com","username":"gary-w-smith"},"change_message_id":"7b02f242d7d0f8eb1159f01ef86a0ba1d13c4b29","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#    Copyright 2014 Red Hat, Inc."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"},{"line_number":5,"context_line":"#    a copy of the License at"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa81d914_ccda0de9","line":2,"updated":"2015-01-28 04:58:48.000000000","message":"Ditto.  Even more odd is that the companies are different","commit_id":"100c5ccce84881a75a3ebebd8e04a751369fb79a"}],"cinder/objects/snapshot.py":[{"author":{"_account_id":6825,"name":"Gary W. Smith","email":"garysmith123@gmail.com","username":"gary-w-smith"},"change_message_id":"7b02f242d7d0f8eb1159f01ef86a0ba1d13c4b29","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        target_version \u003d utils.convert_version_to_tuple(target_version)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    @staticmethod"},{"line_number":103,"context_line":"    def _from_db_object(context, snapshot, db_snapshot, expected_attrs\u003dNone):"},{"line_number":104,"context_line":"        if expected_attrs is None:"},{"line_number":105,"context_line":"            expected_attrs \u003d []"},{"line_number":106,"context_line":"        for name, field in snapshot.fields.items():"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa81d914_ec08b12f","line":103,"updated":"2015-01-28 04:58:48.000000000","message":"it would be better to default expected_attrs to [], since None is immediately going to be replaced with [].","commit_id":"100c5ccce84881a75a3ebebd8e04a751369fb79a"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"08b02d5f8cfc71bc02fbfcee81ef667f1a450843","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        target_version \u003d utils.convert_version_to_tuple(target_version)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    @staticmethod"},{"line_number":103,"context_line":"    def _from_db_object(context, snapshot, db_snapshot, expected_attrs\u003dNone):"},{"line_number":104,"context_line":"        if expected_attrs is None:"},{"line_number":105,"context_line":"            expected_attrs \u003d []"},{"line_number":106,"context_line":"        for name, field in snapshot.fields.items():"}],"source_content_type":"text/x-python","patch_set":21,"id":"da86d52c_750f33e2","line":103,"in_reply_to":"fa81d914_9723a404","updated":"2015-01-31 01:12:34.000000000","message":"Actually, it would be a pep8 error if this was removed - \n./cinder/objects/snapshot.py:103:5: N322  Method\u0027s default argument shouldn\u0027t be mutable!","commit_id":"100c5ccce84881a75a3ebebd8e04a751369fb79a"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"c6e7785708c7051607e4110979259d95c42c3b93","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        target_version \u003d utils.convert_version_to_tuple(target_version)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    @staticmethod"},{"line_number":103,"context_line":"    def _from_db_object(context, snapshot, db_snapshot, expected_attrs\u003dNone):"},{"line_number":104,"context_line":"        if expected_attrs is None:"},{"line_number":105,"context_line":"            expected_attrs \u003d []"},{"line_number":106,"context_line":"        for name, field in snapshot.fields.items():"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa81d914_9723a404","line":103,"in_reply_to":"fa81d914_ec08b12f","updated":"2015-01-28 17:06:53.000000000","message":"I took this example from nova\u0027s instance object.  I am not sure why it was done as such, but I can switch it to default to [].","commit_id":"100c5ccce84881a75a3ebebd8e04a751369fb79a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"057d0e57aa395e8593809e937399b6c316c084d0","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#    Copyright 2014 SimpliVity Corp."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":25,"id":"da86d52c_47711ca7","line":1,"updated":"2015-02-11 06:33:31.000000000","message":"2015","commit_id":"b721b1c0c64583095ce491062c9400462bd11e0f"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"e6b9d4af64468933b976f034be95d86c92eee207","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#    Copyright 2014 SimpliVity Corp."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":25,"id":"da86d52c_fe02890a","line":1,"in_reply_to":"da86d52c_47711ca7","updated":"2015-02-11 15:20:22.000000000","message":"Done","commit_id":"b721b1c0c64583095ce491062c9400462bd11e0f"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"057d0e57aa395e8593809e937399b6c316c084d0","unresolved":false,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"            db.snapshot_update(context, self.id, updates)"},{"line_number":155,"context_line":"            if \u0027metadata\u0027 in updates:"},{"line_number":156,"context_line":"                # metadata items that are not specified in the"},{"line_number":157,"context_line":"                # self.metadata will be deleted"},{"line_number":158,"context_line":"                self.db.snapshot_metadata_update(context, self.id,"},{"line_number":159,"context_line":"                                                 self.metadata, True)"}],"source_content_type":"text/x-python","patch_set":25,"id":"da86d52c_8766b4eb","line":156,"updated":"2015-02-11 06:33:31.000000000","message":"Metadata","commit_id":"b721b1c0c64583095ce491062c9400462bd11e0f"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"e6b9d4af64468933b976f034be95d86c92eee207","unresolved":false,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"            db.snapshot_update(context, self.id, updates)"},{"line_number":155,"context_line":"            if \u0027metadata\u0027 in updates:"},{"line_number":156,"context_line":"                # metadata items that are not specified in the"},{"line_number":157,"context_line":"                # self.metadata will be deleted"},{"line_number":158,"context_line":"                self.db.snapshot_metadata_update(context, self.id,"},{"line_number":159,"context_line":"                                                 self.metadata, True)"}],"source_content_type":"text/x-python","patch_set":25,"id":"da86d52c_1e003d01","line":156,"in_reply_to":"da86d52c_8766b4eb","updated":"2015-02-11 15:20:22.000000000","message":"Done","commit_id":"b721b1c0c64583095ce491062c9400462bd11e0f"},{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"e7151c594e7a5c3a7c4440ca6add5ce37bb10bab","unresolved":false,"context_lines":[{"line_number":169,"context_line":"        if attrname not in OPTIONAL_FIELDS:"},{"line_number":170,"context_line":"            raise exception.ObjectActionError("},{"line_number":171,"context_line":"                action\u003d\u0027obj_load_attr\u0027,"},{"line_number":172,"context_line":"                reason\u003d\u0027attribute %s not lazy-loadable\u0027 % attrname)"},{"line_number":173,"context_line":"        if not self._context:"},{"line_number":174,"context_line":"            raise exception.OrphanedObjectError(method\u003d\u0027obj_load_attr\u0027,"},{"line_number":175,"context_line":"                                                objtype\u003dself.obj_name())"}],"source_content_type":"text/x-python","patch_set":28,"id":"da86d52c_e2e1482b","line":172,"updated":"2015-02-17 07:44:03.000000000","message":"need localization here?","commit_id":"287260761a14d79171a7d987ec56ec847255ced4"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"a90bc3f769c404b76749f5adb61ea6f8794278c0","unresolved":false,"context_lines":[{"line_number":169,"context_line":"        if attrname not in OPTIONAL_FIELDS:"},{"line_number":170,"context_line":"            raise exception.ObjectActionError("},{"line_number":171,"context_line":"                action\u003d\u0027obj_load_attr\u0027,"},{"line_number":172,"context_line":"                reason\u003d\u0027attribute %s not lazy-loadable\u0027 % attrname)"},{"line_number":173,"context_line":"        if not self._context:"},{"line_number":174,"context_line":"            raise exception.OrphanedObjectError(method\u003d\u0027obj_load_attr\u0027,"},{"line_number":175,"context_line":"                                                objtype\u003dself.obj_name())"}],"source_content_type":"text/x-python","patch_set":28,"id":"da86d52c_95a7daa6","line":172,"in_reply_to":"da86d52c_155a0a2a","updated":"2015-02-17 15:18:07.000000000","message":"Gotcha.  Forgot about that.","commit_id":"287260761a14d79171a7d987ec56ec847255ced4"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"36f4c4cf51ea0233a80d8d0163b6e6eb9bec163f","unresolved":false,"context_lines":[{"line_number":169,"context_line":"        if attrname not in OPTIONAL_FIELDS:"},{"line_number":170,"context_line":"            raise exception.ObjectActionError("},{"line_number":171,"context_line":"                action\u003d\u0027obj_load_attr\u0027,"},{"line_number":172,"context_line":"                reason\u003d\u0027attribute %s not lazy-loadable\u0027 % attrname)"},{"line_number":173,"context_line":"        if not self._context:"},{"line_number":174,"context_line":"            raise exception.OrphanedObjectError(method\u003d\u0027obj_load_attr\u0027,"},{"line_number":175,"context_line":"                                                objtype\u003dself.obj_name())"}],"source_content_type":"text/x-python","patch_set":28,"id":"da86d52c_155a0a2a","line":172,"in_reply_to":"da86d52c_8fb8a712","updated":"2015-02-17 15:07:29.000000000","message":"It also needs localising here, otherwise you\u0027ll end up with a mixed language message after localisation, for example:\n\"Action de l\u0027objet obj_load_attr a échoué car: attribute FOO not lazy-loadable\"\n\n(pardon my French ;-) )","commit_id":"287260761a14d79171a7d987ec56ec847255ced4"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"5d74763fa7cbfc889247a1a6f61b977d540a8e33","unresolved":false,"context_lines":[{"line_number":169,"context_line":"        if attrname not in OPTIONAL_FIELDS:"},{"line_number":170,"context_line":"            raise exception.ObjectActionError("},{"line_number":171,"context_line":"                action\u003d\u0027obj_load_attr\u0027,"},{"line_number":172,"context_line":"                reason\u003d\u0027attribute %s not lazy-loadable\u0027 % attrname)"},{"line_number":173,"context_line":"        if not self._context:"},{"line_number":174,"context_line":"            raise exception.OrphanedObjectError(method\u003d\u0027obj_load_attr\u0027,"},{"line_number":175,"context_line":"                                                objtype\u003dself.obj_name())"}],"source_content_type":"text/x-python","patch_set":28,"id":"da86d52c_8fb8a712","line":172,"in_reply_to":"da86d52c_e2e1482b","updated":"2015-02-17 14:58:45.000000000","message":"It is localized in cinder/exception.py -\n\nclass ObjectActionError(CinderException):\n    msg_fmt \u003d _(\u0027Object action %(action)s failed because: %(reason)s\u0027)","commit_id":"287260761a14d79171a7d987ec56ec847255ced4"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"52b695c6e731ece42ef0b99c36bb999c2c45df71","unresolved":false,"context_lines":[{"line_number":26,"context_line":"CONF \u003d cfg.CONF"},{"line_number":27,"context_line":"# NOTE(thangp): OPTIONAL_FIELDS are fields that would be lazy-loaded. They are"},{"line_number":28,"context_line":"# typically the relationship in the sqlalchemy object."},{"line_number":29,"context_line":"OPTIONAL_FIELDS \u003d [\u0027volume\u0027, \u0027metadata\u0027]"},{"line_number":30,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_4369cc23","line":29,"updated":"2015-02-19 13:57:08.000000000","message":"I would prefer to move this into the Snapshot class.","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"c29f0e56dd9be43dd8d41ad07d46fe65de2ef348","unresolved":false,"context_lines":[{"line_number":26,"context_line":"CONF \u003d cfg.CONF"},{"line_number":27,"context_line":"# NOTE(thangp): OPTIONAL_FIELDS are fields that would be lazy-loaded. They are"},{"line_number":28,"context_line":"# typically the relationship in the sqlalchemy object."},{"line_number":29,"context_line":"OPTIONAL_FIELDS \u003d [\u0027volume\u0027, \u0027metadata\u0027]"},{"line_number":30,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_b103a40b","line":29,"in_reply_to":"da86d52c_4369cc23","updated":"2015-02-19 19:24:21.000000000","message":"I see no reason to.  nova does it in the same manner.","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"52b695c6e731ece42ef0b99c36bb999c2c45df71","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def obj_what_changed(self):"},{"line_number":84,"context_line":"        changes \u003d super(Snapshot, self).obj_what_changed()"},{"line_number":85,"context_line":"        if (\u0027metadata\u0027 in self and self.metadata !\u003d self._orig_metadata):"},{"line_number":86,"context_line":"            changes.add(\u0027metadata\u0027)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        return changes"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_3e0f8f2f","line":85,"updated":"2015-02-19 13:57:08.000000000","message":"Parentheses are unnecessary here.","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"c29f0e56dd9be43dd8d41ad07d46fe65de2ef348","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def obj_what_changed(self):"},{"line_number":84,"context_line":"        changes \u003d super(Snapshot, self).obj_what_changed()"},{"line_number":85,"context_line":"        if (\u0027metadata\u0027 in self and self.metadata !\u003d self._orig_metadata):"},{"line_number":86,"context_line":"            changes.add(\u0027metadata\u0027)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        return changes"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_d106581b","line":85,"in_reply_to":"da86d52c_3e0f8f2f","updated":"2015-02-19 19:24:21.000000000","message":"Done","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"52b695c6e731ece42ef0b99c36bb999c2c45df71","unresolved":false,"context_lines":[{"line_number":199,"context_line":"    @base.remotable_classmethod"},{"line_number":200,"context_line":"    def get_all_by_project(cls, context, project_id):"},{"line_number":201,"context_line":"        snapshots \u003d db.snapshot_get_all_by_project(context, project_id)"},{"line_number":202,"context_line":"        return base.obj_make_list(context, cls(), objects.Snapshot,"},{"line_number":203,"context_line":"                                  snapshots,"},{"line_number":204,"context_line":"                                  expected_attrs\u003d[\u0027metadata\u0027])"},{"line_number":205,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_e39c8010","line":202,"updated":"2015-02-19 13:57:08.000000000","message":"Just a question - there was cls(context) in previous patchsets. Can you explain why? Should I do cls() in my Backup object patch?","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"c29f0e56dd9be43dd8d41ad07d46fe65de2ef348","unresolved":false,"context_lines":[{"line_number":199,"context_line":"    @base.remotable_classmethod"},{"line_number":200,"context_line":"    def get_all_by_project(cls, context, project_id):"},{"line_number":201,"context_line":"        snapshots \u003d db.snapshot_get_all_by_project(context, project_id)"},{"line_number":202,"context_line":"        return base.obj_make_list(context, cls(), objects.Snapshot,"},{"line_number":203,"context_line":"                                  snapshots,"},{"line_number":204,"context_line":"                                  expected_attrs\u003d[\u0027metadata\u0027])"},{"line_number":205,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_d1dad849","line":202,"in_reply_to":"da86d52c_e39c8010","updated":"2015-02-19 19:24:21.000000000","message":"Actually, the context should be there.  I was refactoring and accidentally left it out.  context is used to initialize the ObjectList.context.","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"d234c46d3a1cc7538cf7a4ba0a4af2b848be9695","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def obj_what_changed(self):"},{"line_number":84,"context_line":"        changes \u003d super(Snapshot, self).obj_what_changed()"},{"line_number":85,"context_line":"        if (\u0027metadata\u0027 in self and self.metadata !\u003d self._orig_metadata):"},{"line_number":86,"context_line":"            changes.add(\u0027metadata\u0027)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        return changes"}],"source_content_type":"text/x-python","patch_set":34,"id":"ba7be1f8_6363f21a","line":85,"updated":"2015-02-20 11:16:58.000000000","message":"You probably forgot to remove these unnecessary parentheses. :)","commit_id":"d908296eda3f016ae5de437e390a76891084dcdc"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"2128cc4c3f0c27e3c6b84e176e54e8f8db9183b9","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def obj_what_changed(self):"},{"line_number":84,"context_line":"        changes \u003d super(Snapshot, self).obj_what_changed()"},{"line_number":85,"context_line":"        if (\u0027metadata\u0027 in self and self.metadata !\u003d self._orig_metadata):"},{"line_number":86,"context_line":"            changes.add(\u0027metadata\u0027)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        return changes"}],"source_content_type":"text/x-python","patch_set":34,"id":"ba7be1f8_587409cf","line":85,"in_reply_to":"ba7be1f8_6363f21a","updated":"2015-02-20 17:46:37.000000000","message":"Yeah.  Will take care of that in the next patch.","commit_id":"d908296eda3f016ae5de437e390a76891084dcdc"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"d234c46d3a1cc7538cf7a4ba0a4af2b848be9695","unresolved":false,"context_lines":[{"line_number":199,"context_line":"    @base.remotable_classmethod"},{"line_number":200,"context_line":"    def get_all_by_project(cls, context, project_id):"},{"line_number":201,"context_line":"        snapshots \u003d db.snapshot_get_all_by_project(context, project_id)"},{"line_number":202,"context_line":"        return base.obj_make_list(context, cls(), objects.Snapshot,"},{"line_number":203,"context_line":"                                  snapshots,"},{"line_number":204,"context_line":"                                  expected_attrs\u003d[\u0027metadata\u0027])"},{"line_number":205,"context_line":""}],"source_content_type":"text/x-python","patch_set":34,"id":"ba7be1f8_03ff9635","line":202,"updated":"2015-02-20 11:16:58.000000000","message":"So, there should be cls(context) as you stated in patchset #32 comments.","commit_id":"d908296eda3f016ae5de437e390a76891084dcdc"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"2128cc4c3f0c27e3c6b84e176e54e8f8db9183b9","unresolved":false,"context_lines":[{"line_number":199,"context_line":"    @base.remotable_classmethod"},{"line_number":200,"context_line":"    def get_all_by_project(cls, context, project_id):"},{"line_number":201,"context_line":"        snapshots \u003d db.snapshot_get_all_by_project(context, project_id)"},{"line_number":202,"context_line":"        return base.obj_make_list(context, cls(), objects.Snapshot,"},{"line_number":203,"context_line":"                                  snapshots,"},{"line_number":204,"context_line":"                                  expected_attrs\u003d[\u0027metadata\u0027])"},{"line_number":205,"context_line":""}],"source_content_type":"text/x-python","patch_set":34,"id":"ba7be1f8_7881cd8e","line":202,"in_reply_to":"ba7be1f8_03ff9635","updated":"2015-02-20 17:46:37.000000000","message":"Done","commit_id":"d908296eda3f016ae5de437e390a76891084dcdc"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"d234c46d3a1cc7538cf7a4ba0a4af2b848be9695","unresolved":false,"context_lines":[{"line_number":206,"context_line":"    @base.remotable_classmethod"},{"line_number":207,"context_line":"    def get_all_for_volume(cls, context, volume_id):"},{"line_number":208,"context_line":"        snapshots \u003d db.snapshot_get_all_for_volume(context, volume_id)"},{"line_number":209,"context_line":"        return base.obj_make_list(context, cls(), objects.Snapshot,"},{"line_number":210,"context_line":"                                  snapshots,"},{"line_number":211,"context_line":"                                  expected_attrs\u003d[\u0027metadata\u0027])"}],"source_content_type":"text/x-python","patch_set":34,"id":"ba7be1f8_43f98e4c","line":209,"updated":"2015-02-20 11:16:58.000000000","message":"ditto","commit_id":"d908296eda3f016ae5de437e390a76891084dcdc"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"2128cc4c3f0c27e3c6b84e176e54e8f8db9183b9","unresolved":false,"context_lines":[{"line_number":206,"context_line":"    @base.remotable_classmethod"},{"line_number":207,"context_line":"    def get_all_for_volume(cls, context, volume_id):"},{"line_number":208,"context_line":"        snapshots \u003d db.snapshot_get_all_for_volume(context, volume_id)"},{"line_number":209,"context_line":"        return base.obj_make_list(context, cls(), objects.Snapshot,"},{"line_number":210,"context_line":"                                  snapshots,"},{"line_number":211,"context_line":"                                  expected_attrs\u003d[\u0027metadata\u0027])"}],"source_content_type":"text/x-python","patch_set":34,"id":"ba7be1f8_b84a6581","line":209,"in_reply_to":"ba7be1f8_43f98e4c","updated":"2015-02-20 17:46:37.000000000","message":"Done","commit_id":"d908296eda3f016ae5de437e390a76891084dcdc"}],"cinder/objects/volume.py":[{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"06d2ee18c1ff2674e7e77c345f2059c72b1d2d13","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    @staticmethod"},{"line_number":100,"context_line":"    def _from_db_object(context, volume, db_volume, expected_attrs\u003dNone):"},{"line_number":101,"context_line":"        if expected_attrs is None:"},{"line_number":102,"context_line":"            expected_attrs \u003d []"},{"line_number":103,"context_line":"        for name, field in volume.fields.items():"},{"line_number":104,"context_line":"            if name in OPTIONAL_FIELDS:"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_3e852a07","line":101,"updated":"2015-01-05 03:23:49.000000000","message":"what is this for?","commit_id":"3103f70fafdac690e01755b65fbb399ebdb637b6"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"47a029a0246bd6d8d07e8f3a3b4095e2bc984044","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    @staticmethod"},{"line_number":100,"context_line":"    def _from_db_object(context, volume, db_volume, expected_attrs\u003dNone):"},{"line_number":101,"context_line":"        if expected_attrs is None:"},{"line_number":102,"context_line":"            expected_attrs \u003d []"},{"line_number":103,"context_line":"        for name, field in volume.fields.items():"},{"line_number":104,"context_line":"            if name in OPTIONAL_FIELDS:"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_e5085c82","line":101,"in_reply_to":"3a961159_3e852a07","updated":"2015-01-05 20:33:48.000000000","message":"This translates the SQLAlchemy object model into a cinder object.  Here, it is used to set the default value of any Integer fields to 0.\n\nThere is more logic to put here, but I needed to add a volume object because it is referenced in the snapshot object.","commit_id":"3103f70fafdac690e01755b65fbb399ebdb637b6"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"61228b9c1bc32e502366ce175fcd6df7a7550278","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    @staticmethod"},{"line_number":100,"context_line":"    def _from_db_object(context, volume, db_volume, expected_attrs\u003dNone):"},{"line_number":101,"context_line":"        if expected_attrs is None:"},{"line_number":102,"context_line":"            expected_attrs \u003d []"},{"line_number":103,"context_line":"        for name, field in volume.fields.items():"},{"line_number":104,"context_line":"            if name in OPTIONAL_FIELDS:"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_56ac84ed","line":101,"in_reply_to":"3a961159_abdd4516","updated":"2015-01-05 21:36:36.000000000","message":"expected_attrs is used to load extra attributes that may come from another table.  Here, it is not used for anything (I took this code from nova\u0027s instance object - https://github.com/openstack/nova/blob/master/nova/objects/instance.py#L279), so I can remove it.  I was planning on add more to it later on.\n\nIn nova\u0027s instance object, expected_attrs is an array containing attributes to load into the instance object, i.e.\n\nif \u0027metadata\u0027 in expected_attrs:\n...\nif \u0027system_metadata\u0027 in expected_attrs:\n...\n\nI was planning to do something similar for cinder, e.g. metadata.","commit_id":"3103f70fafdac690e01755b65fbb399ebdb637b6"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"27814610eae12514417393b7d0d1662e33707fe2","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    @staticmethod"},{"line_number":100,"context_line":"    def _from_db_object(context, volume, db_volume, expected_attrs\u003dNone):"},{"line_number":101,"context_line":"        if expected_attrs is None:"},{"line_number":102,"context_line":"            expected_attrs \u003d []"},{"line_number":103,"context_line":"        for name, field in volume.fields.items():"},{"line_number":104,"context_line":"            if name in OPTIONAL_FIELDS:"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_abdd4516","line":101,"in_reply_to":"3a961159_e5085c82","updated":"2015-01-05 21:21:11.000000000","message":"specifically, lines 101-102 don\u0027t seem to do anything.","commit_id":"3103f70fafdac690e01755b65fbb399ebdb637b6"},{"author":{"_account_id":6825,"name":"Gary W. Smith","email":"garysmith123@gmail.com","username":"gary-w-smith"},"change_message_id":"7b02f242d7d0f8eb1159f01ef86a0ba1d13c4b29","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#    Copyright 2014 SimpliVity Corp."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa81d914_67313aa2","line":1,"updated":"2015-01-28 04:58:48.000000000","message":"Yet another company in the copyright?","commit_id":"100c5ccce84881a75a3ebebd8e04a751369fb79a"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"c6e7785708c7051607e4110979259d95c42c3b93","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#    Copyright 2014 SimpliVity Corp."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa81d914_977484d0","line":1,"in_reply_to":"fa81d914_67313aa2","updated":"2015-01-28 17:06:53.000000000","message":"It is the company I work for.  What is wrong with putting your company\u0027s name in the copyright?","commit_id":"100c5ccce84881a75a3ebebd8e04a751369fb79a"},{"author":{"_account_id":6825,"name":"Gary W. Smith","email":"garysmith123@gmail.com","username":"gary-w-smith"},"change_message_id":"7b02f242d7d0f8eb1159f01ef86a0ba1d13c4b29","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        target_version \u003d utils.convert_version_to_tuple(target_version)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    @staticmethod"},{"line_number":100,"context_line":"    def _from_db_object(context, volume, db_volume, expected_attrs\u003dNone):"},{"line_number":101,"context_line":"        for name, field in volume.fields.items():"},{"line_number":102,"context_line":"            if name in OPTIONAL_FIELDS:"},{"line_number":103,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa81d914_47d35638","line":100,"updated":"2015-01-28 04:58:48.000000000","message":"expected_attrs is unused.  Copy/pase artifact?","commit_id":"100c5ccce84881a75a3ebebd8e04a751369fb79a"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"c6e7785708c7051607e4110979259d95c42c3b93","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        target_version \u003d utils.convert_version_to_tuple(target_version)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    @staticmethod"},{"line_number":100,"context_line":"    def _from_db_object(context, volume, db_volume, expected_attrs\u003dNone):"},{"line_number":101,"context_line":"        for name, field in volume.fields.items():"},{"line_number":102,"context_line":"            if name in OPTIONAL_FIELDS:"},{"line_number":103,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa81d914_77b0f08b","line":100,"in_reply_to":"fa81d914_47d35638","updated":"2015-01-28 17:06:53.000000000","message":"Yes :P  I took the example from nova\u0027s flavor object.  expected_attrs can be removed.","commit_id":"100c5ccce84881a75a3ebebd8e04a751369fb79a"},{"author":{"_account_id":6825,"name":"Gary W. Smith","email":"garysmith123@gmail.com","username":"gary-w-smith"},"change_message_id":"7b02f242d7d0f8eb1159f01ef86a0ba1d13c4b29","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    @staticmethod"},{"line_number":100,"context_line":"    def _from_db_object(context, volume, db_volume, expected_attrs\u003dNone):"},{"line_number":101,"context_line":"        for name, field in volume.fields.items():"},{"line_number":102,"context_line":"            if name in OPTIONAL_FIELDS:"},{"line_number":103,"context_line":"                continue"},{"line_number":104,"context_line":"            value \u003d db_volume[name]"},{"line_number":105,"context_line":"            if isinstance(field, fields.IntegerField):"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa81d914_e7ca8a6d","line":102,"updated":"2015-01-28 04:58:48.000000000","message":"What is the point of this check since OPTIONAL_FIELDS is always empty?","commit_id":"100c5ccce84881a75a3ebebd8e04a751369fb79a"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"c6e7785708c7051607e4110979259d95c42c3b93","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    @staticmethod"},{"line_number":100,"context_line":"    def _from_db_object(context, volume, db_volume, expected_attrs\u003dNone):"},{"line_number":101,"context_line":"        for name, field in volume.fields.items():"},{"line_number":102,"context_line":"            if name in OPTIONAL_FIELDS:"},{"line_number":103,"context_line":"                continue"},{"line_number":104,"context_line":"            value \u003d db_volume[name]"},{"line_number":105,"context_line":"            if isinstance(field, fields.IntegerField):"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa81d914_3a83bf05","line":102,"in_reply_to":"fa81d914_e7ca8a6d","updated":"2015-01-28 17:06:53.000000000","message":"OPTIONAL_FIELDS may not be empty (later on).  Once the volume object gets fully implemented (this is just a skeleton because the snapshot object references it), this statement would be used.\n\nFor now, I can remove it.","commit_id":"100c5ccce84881a75a3ebebd8e04a751369fb79a"},{"author":{"_account_id":6825,"name":"Gary W. Smith","email":"garysmith123@gmail.com","username":"gary-w-smith"},"change_message_id":"7b02f242d7d0f8eb1159f01ef86a0ba1d13c4b29","unresolved":false,"context_lines":[{"line_number":103,"context_line":"                continue"},{"line_number":104,"context_line":"            value \u003d db_volume[name]"},{"line_number":105,"context_line":"            if isinstance(field, fields.IntegerField):"},{"line_number":106,"context_line":"                value \u003d value if value is not None else 0"},{"line_number":107,"context_line":"            volume[name] \u003d value"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        volume._context \u003d context"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa81d914_47dd1614","line":106,"updated":"2015-01-28 04:58:48.000000000","message":"This seems to be a convoluted way of saying:\n\n value \u003d value or 0\n\nor even the old fashioned:\n\n if value is None:\n    value \u003d 0","commit_id":"100c5ccce84881a75a3ebebd8e04a751369fb79a"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"c6e7785708c7051607e4110979259d95c42c3b93","unresolved":false,"context_lines":[{"line_number":103,"context_line":"                continue"},{"line_number":104,"context_line":"            value \u003d db_volume[name]"},{"line_number":105,"context_line":"            if isinstance(field, fields.IntegerField):"},{"line_number":106,"context_line":"                value \u003d value if value is not None else 0"},{"line_number":107,"context_line":"            volume[name] \u003d value"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        volume._context \u003d context"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa81d914_badb2f1a","line":106,"in_reply_to":"fa81d914_47dd1614","updated":"2015-01-28 17:06:53.000000000","message":"True.  I can change it to \"value \u003d value or 0\".  It got copied from nova\u0027s flavor object.","commit_id":"100c5ccce84881a75a3ebebd8e04a751369fb79a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"057d0e57aa395e8593809e937399b6c316c084d0","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#    Copyright 2014 SimpliVity Corp."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":25,"id":"da86d52c_673b80d1","line":1,"updated":"2015-02-11 06:33:31.000000000","message":"2015","commit_id":"b721b1c0c64583095ce491062c9400462bd11e0f"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"e6b9d4af64468933b976f034be95d86c92eee207","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#    Copyright 2014 SimpliVity Corp."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":25,"id":"da86d52c_7e0f7939","line":1,"in_reply_to":"da86d52c_673b80d1","updated":"2015-02-11 15:20:22.000000000","message":"Done","commit_id":"b721b1c0c64583095ce491062c9400462bd11e0f"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"52b695c6e731ece42ef0b99c36bb999c2c45df71","unresolved":false,"context_lines":[{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    @base.remotable_classmethod"},{"line_number":150,"context_line":"    def get_all(cls, context, marker, limit, sort_key, sort_dir,"},{"line_number":151,"context_line":"                filters\u003dNone):"},{"line_number":152,"context_line":"        volumes \u003d db.volume_get_all(context, marker, limit, sort_key,"},{"line_number":153,"context_line":"                                    sort_dir, filters\u003dfilters)"},{"line_number":154,"context_line":"        return base.obj_make_list(context, cls(context), objects.Volume,"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_e30f2037","line":151,"updated":"2015-02-19 13:57:08.000000000","message":"This line doesn\u0027t need wrapping.","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"c29f0e56dd9be43dd8d41ad07d46fe65de2ef348","unresolved":false,"context_lines":[{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    @base.remotable_classmethod"},{"line_number":150,"context_line":"    def get_all(cls, context, marker, limit, sort_key, sort_dir,"},{"line_number":151,"context_line":"                filters\u003dNone):"},{"line_number":152,"context_line":"        volumes \u003d db.volume_get_all(context, marker, limit, sort_key,"},{"line_number":153,"context_line":"                                    sort_dir, filters\u003dfilters)"},{"line_number":154,"context_line":"        return base.obj_make_list(context, cls(context), objects.Volume,"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_11e8f0e0","line":151,"in_reply_to":"da86d52c_e30f2037","updated":"2015-02-19 19:24:21.000000000","message":"Done","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"}],"cinder/tests/api/v1/test_snapshots.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"52b695c6e731ece42ef0b99c36bb999c2c45df71","unresolved":false,"context_lines":[{"line_number":162,"context_line":"            \u0027volume_size\u0027: 100,"},{"line_number":163,"context_line":"            \u0027display_name\u0027: \u0027Default name\u0027,"},{"line_number":164,"context_line":"            \u0027display_description\u0027: \u0027Default description\u0027,"},{"line_number":165,"context_line":"            \u0027expected_attrs\u0027: [\u0027metadata\u0027]"},{"line_number":166,"context_line":"        }"},{"line_number":167,"context_line":"        ctx \u003d context.RequestContext(\u0027admin\u0027, \u0027fake\u0027, True)"},{"line_number":168,"context_line":"        snapshot_obj \u003d fake_snapshot.fake_snapshot_obj(ctx, **snapshot)"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_5e55231c","line":165,"updated":"2015-02-19 13:57:08.000000000","message":"There should be comma at the end of line.","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"c29f0e56dd9be43dd8d41ad07d46fe65de2ef348","unresolved":false,"context_lines":[{"line_number":162,"context_line":"            \u0027volume_size\u0027: 100,"},{"line_number":163,"context_line":"            \u0027display_name\u0027: \u0027Default name\u0027,"},{"line_number":164,"context_line":"            \u0027display_description\u0027: \u0027Default description\u0027,"},{"line_number":165,"context_line":"            \u0027expected_attrs\u0027: [\u0027metadata\u0027]"},{"line_number":166,"context_line":"        }"},{"line_number":167,"context_line":"        ctx \u003d context.RequestContext(\u0027admin\u0027, \u0027fake\u0027, True)"},{"line_number":168,"context_line":"        snapshot_obj \u003d fake_snapshot.fake_snapshot_obj(ctx, **snapshot)"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_f1b43cf2","line":165,"in_reply_to":"da86d52c_5e55231c","updated":"2015-02-19 19:24:21.000000000","message":"Done","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"}],"cinder/tests/api/v2/test_snapshots.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"52b695c6e731ece42ef0b99c36bb999c2c45df71","unresolved":false,"context_lines":[{"line_number":270,"context_line":"            \u0027volume_size\u0027: 100,"},{"line_number":271,"context_line":"            \u0027display_name\u0027: \u0027Default name\u0027,"},{"line_number":272,"context_line":"            \u0027display_description\u0027: \u0027Default description\u0027,"},{"line_number":273,"context_line":"            \u0027expected_attrs\u0027: [\u0027metadata\u0027]"},{"line_number":274,"context_line":"        }"},{"line_number":275,"context_line":"        ctx \u003d context.RequestContext(\u0027admin\u0027, \u0027fake\u0027, True)"},{"line_number":276,"context_line":"        snapshot_obj \u003d fake_snapshot.fake_snapshot_obj(ctx, **snapshot)"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_de3833f0","line":273,"updated":"2015-02-19 13:57:08.000000000","message":"There should be comma at the end of line.","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"}],"cinder/tests/objects/test_snapshot.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"c94e8adac2c2e45f11e9c69e34beb24a3a3c90b7","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                                                         \u00271955\u0027)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"class TestSnapshot(test_objects._LocalTest, _TestSnapshot):"},{"line_number":100,"context_line":"    pass"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_69006fab","line":99,"updated":"2015-02-19 14:08:07.000000000","message":"This was probably asked before but why we\u0027re creating additional private class here? I was able to write tests for backups object without such tricks.","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"c29f0e56dd9be43dd8d41ad07d46fe65de2ef348","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                                                         \u00271955\u0027)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"class TestSnapshot(test_objects._LocalTest, _TestSnapshot):"},{"line_number":100,"context_line":"    pass"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_0c6e132f","line":99,"in_reply_to":"da86d52c_69006fab","updated":"2015-02-19 19:24:21.000000000","message":"This is done to inherit the _LocalTest class, i.e. assertRemotes() used for an indirection_api, e.g. conductor.  It is not needed by cinder, so I can just switch TestSnapshot to inherit from _LocalTest.","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"c94e8adac2c2e45f11e9c69e34beb24a3a3c90b7","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        _TestSnapshot._compare(self, fake_snapshot, snapshots[0])"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"class TestSnapshotList(test_objects._LocalTest, _TestSnapshotList):"},{"line_number":146,"context_line":"    pass"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_89fbe3bc","line":145,"updated":"2015-02-19 14:08:07.000000000","message":"ditto.","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"}],"cinder/tests/test_volume_rpcapi.py":[{"author":{"_account_id":6825,"name":"Gary W. Smith","email":"garysmith123@gmail.com","username":"gary-w-smith"},"change_message_id":"7b02f242d7d0f8eb1159f01ef86a0ba1d13c4b29","unresolved":false,"context_lines":[{"line_number":144,"context_line":"                snapshot \u003d value.obj_to_primitive()"},{"line_number":145,"context_line":"                self.assertEqual(expected_snapshot, snapshot)"},{"line_number":146,"context_line":"            else:"},{"line_number":147,"context_line":"                self.assertEqual(value, expected_msg[kwarg])"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def test_create_volume(self):"},{"line_number":150,"context_line":"        self._test_volume_api(\u0027create_volume\u0027,"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa81d914_47bc366d","line":147,"updated":"2015-01-28 04:58:48.000000000","message":"nit: args to assertEqual should have expected first, actual second","commit_id":"100c5ccce84881a75a3ebebd8e04a751369fb79a"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"c6e7785708c7051607e4110979259d95c42c3b93","unresolved":false,"context_lines":[{"line_number":144,"context_line":"                snapshot \u003d value.obj_to_primitive()"},{"line_number":145,"context_line":"                self.assertEqual(expected_snapshot, snapshot)"},{"line_number":146,"context_line":"            else:"},{"line_number":147,"context_line":"                self.assertEqual(value, expected_msg[kwarg])"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def test_create_volume(self):"},{"line_number":150,"context_line":"        self._test_volume_api(\u0027create_volume\u0027,"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa81d914_5a04f37a","line":147,"in_reply_to":"fa81d914_47bc366d","updated":"2015-01-28 17:06:53.000000000","message":"Done","commit_id":"100c5ccce84881a75a3ebebd8e04a751369fb79a"}],"cinder/volume/api.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"057d0e57aa395e8593809e937399b6c316c084d0","unresolved":false,"context_lines":[{"line_number":646,"context_line":""},{"line_number":647,"context_line":"            # NOTE(thangp): Why do you need this when you have"},{"line_number":648,"context_line":"            # snapshot.metadata?"},{"line_number":649,"context_line":"            snapshot.snapshot_metadata \u003d metadata or {}"},{"line_number":650,"context_line":""},{"line_number":651,"context_line":"            snapshot.create()"},{"line_number":652,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"da86d52c_2797c83b","line":649,"updated":"2015-02-11 06:33:31.000000000","message":"Where did this come from? I don\u0027t see it in the original code.  I don\u0027t know what this is for.","commit_id":"b721b1c0c64583095ce491062c9400462bd11e0f"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"e6b9d4af64468933b976f034be95d86c92eee207","unresolved":false,"context_lines":[{"line_number":646,"context_line":""},{"line_number":647,"context_line":"            # NOTE(thangp): Why do you need this when you have"},{"line_number":648,"context_line":"            # snapshot.metadata?"},{"line_number":649,"context_line":"            snapshot.snapshot_metadata \u003d metadata or {}"},{"line_number":650,"context_line":""},{"line_number":651,"context_line":"            snapshot.create()"},{"line_number":652,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"da86d52c_9ef50def","line":649,"in_reply_to":"da86d52c_2797c83b","updated":"2015-02-11 15:20:22.000000000","message":"https://github.com/openstack/cinder/blob/master/cinder/api/v1/snapshots.py#L56 and https://github.com/openstack/cinder/blob/master/cinder/api/v2/snapshots.py","commit_id":"b721b1c0c64583095ce491062c9400462bd11e0f"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"3ccc19bdec4517111582f76353f919cc77fe8e29","unresolved":false,"context_lines":[{"line_number":643,"context_line":"                \u0027volume_type_id\u0027: volume[\u0027volume_type_id\u0027],"},{"line_number":644,"context_line":"                \u0027encryption_key_id\u0027: volume[\u0027encryption_key_id\u0027],"},{"line_number":645,"context_line":"                \u0027metadata\u0027: metadata or {},"},{"line_number":646,"context_line":"                \u0027snapshot_metadata\u0027: metadata or {}"},{"line_number":647,"context_line":"            }"},{"line_number":648,"context_line":"            snapshot \u003d objects.Snapshot(context\u003dcontext, **kwargs)"},{"line_number":649,"context_line":"            snapshot.create()"}],"source_content_type":"text/x-python","patch_set":29,"id":"da86d52c_8d097333","line":646,"updated":"2015-02-18 04:28:15.000000000","message":"Do we need both \u0027metadata\u0027 and \u0027snapshot_metadata\u0027?  They contain the same data.","commit_id":"7f75831b77575f51bc6ee74fd4b68b79763e988a"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"ec3edd73b74256564701ac9c0e342a368a70a6e7","unresolved":false,"context_lines":[{"line_number":643,"context_line":"                \u0027volume_type_id\u0027: volume[\u0027volume_type_id\u0027],"},{"line_number":644,"context_line":"                \u0027encryption_key_id\u0027: volume[\u0027encryption_key_id\u0027],"},{"line_number":645,"context_line":"                \u0027metadata\u0027: metadata or {},"},{"line_number":646,"context_line":"                \u0027snapshot_metadata\u0027: metadata or {}"},{"line_number":647,"context_line":"            }"},{"line_number":648,"context_line":"            snapshot \u003d objects.Snapshot(context\u003dcontext, **kwargs)"},{"line_number":649,"context_line":"            snapshot.create()"}],"source_content_type":"text/x-python","patch_set":29,"id":"da86d52c_3e525c13","line":646,"in_reply_to":"da86d52c_8d097333","updated":"2015-02-18 15:04:48.000000000","message":"Most likely not.  I have to see if I can edit https://github.com/openstack/cinder/blob/master/cinder/api/v1/snapshots.py#L56 to only require metadata.  It seems like a relic from cinder or nova-volume?","commit_id":"7f75831b77575f51bc6ee74fd4b68b79763e988a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"3ccc19bdec4517111582f76353f919cc77fe8e29","unresolved":false,"context_lines":[{"line_number":653,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":654,"context_line":"                try:"},{"line_number":655,"context_line":"                    if hasattr(snapshot, \u0027id\u0027):"},{"line_number":656,"context_line":"                        self.db.snapshot_destroy(context, snapshot.id)"},{"line_number":657,"context_line":"                finally:"},{"line_number":658,"context_line":"                    QUOTAS.rollback(context, reservations)"},{"line_number":659,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"da86d52c_b019307c","line":656,"updated":"2015-02-18 04:28:15.000000000","message":"Why do we still need to use a db call?  Why don\u0027t call snapshot.destroy()?","commit_id":"7f75831b77575f51bc6ee74fd4b68b79763e988a"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"ec3edd73b74256564701ac9c0e342a368a70a6e7","unresolved":false,"context_lines":[{"line_number":653,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":654,"context_line":"                try:"},{"line_number":655,"context_line":"                    if hasattr(snapshot, \u0027id\u0027):"},{"line_number":656,"context_line":"                        self.db.snapshot_destroy(context, snapshot.id)"},{"line_number":657,"context_line":"                finally:"},{"line_number":658,"context_line":"                    QUOTAS.rollback(context, reservations)"},{"line_number":659,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"da86d52c_9e40a836","line":656,"in_reply_to":"da86d52c_b019307c","updated":"2015-02-18 15:04:48.000000000","message":"I missed it, but I will use snapshot.destroy().","commit_id":"7f75831b77575f51bc6ee74fd4b68b79763e988a"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"52b695c6e731ece42ef0b99c36bb999c2c45df71","unresolved":false,"context_lines":[{"line_number":319,"context_line":"                         \u0027volume is currently part of a \u0027"},{"line_number":320,"context_line":"                         \u0027consistency group.\u0027), volume[\u0027id\u0027])"},{"line_number":321,"context_line":"            raise exception.InvalidVolume(reason\u003dmsg)"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"        snapshots \u003d self.db.snapshot_get_all_for_volume(context, volume_id)"},{"line_number":324,"context_line":"        if len(snapshots):"},{"line_number":325,"context_line":"            LOG.info(_LI(\u0027Unable to delete volume: %s, \u0027"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_de5593c2","line":322,"updated":"2015-02-19 13:57:08.000000000","message":"Shouldn\u0027t we use objects here?","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"c29f0e56dd9be43dd8d41ad07d46fe65de2ef348","unresolved":false,"context_lines":[{"line_number":319,"context_line":"                         \u0027volume is currently part of a \u0027"},{"line_number":320,"context_line":"                         \u0027consistency group.\u0027), volume[\u0027id\u0027])"},{"line_number":321,"context_line":"            raise exception.InvalidVolume(reason\u003dmsg)"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"        snapshots \u003d self.db.snapshot_get_all_for_volume(context, volume_id)"},{"line_number":324,"context_line":"        if len(snapshots):"},{"line_number":325,"context_line":"            LOG.info(_LI(\u0027Unable to delete volume: %s, \u0027"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_4c4babb0","line":322,"in_reply_to":"da86d52c_de5593c2","updated":"2015-02-19 19:24:21.000000000","message":"Tried and failed.  The error I saw (which I do not fully understand) in http://logs.openstack.org/66/133566/31/check/check-tempest-dsvm-full/c5103b2/logs/screen-c-api.txt.gz -\n\nCaught error: Parent instance \u003cSnapshot at 0x7f531160c3d0\u003e is not bound to a Session; lazy load operation of attribute \u0027volume\u0027 cannot proceed\n\nI did not want to block the review of this patch because the get_all was not working for tempest.","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"52b695c6e731ece42ef0b99c36bb999c2c45df71","unresolved":false,"context_lines":[{"line_number":427,"context_line":"        return volumes"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"    def get_snapshot(self, context, snapshot_id):"},{"line_number":430,"context_line":"        check_policy(context, \u0027get_snapshot\u0027)"},{"line_number":431,"context_line":"        rv \u003d self.db.snapshot_get(context, snapshot_id)"},{"line_number":432,"context_line":"        return dict(rv.iteritems())"},{"line_number":433,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_3e6eaf96","line":430,"updated":"2015-02-19 13:57:08.000000000","message":"ditto","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"52b695c6e731ece42ef0b99c36bb999c2c45df71","unresolved":false,"context_lines":[{"line_number":443,"context_line":""},{"line_number":444,"context_line":"        if (context.is_admin and \u0027all_tenants\u0027 in search_opts):"},{"line_number":445,"context_line":"            # Need to remove all_tenants to pass the filtering below."},{"line_number":446,"context_line":"            del search_opts[\u0027all_tenants\u0027]"},{"line_number":447,"context_line":"            snapshots \u003d self.db.snapshot_get_all(context)"},{"line_number":448,"context_line":"        else:"},{"line_number":449,"context_line":"            snapshots \u003d self.db.snapshot_get_all_by_project("}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_5e00c3aa","line":446,"updated":"2015-02-19 13:57:08.000000000","message":"ditto","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"52b695c6e731ece42ef0b99c36bb999c2c45df71","unresolved":false,"context_lines":[{"line_number":445,"context_line":"            # Need to remove all_tenants to pass the filtering below."},{"line_number":446,"context_line":"            del search_opts[\u0027all_tenants\u0027]"},{"line_number":447,"context_line":"            snapshots \u003d self.db.snapshot_get_all(context)"},{"line_number":448,"context_line":"        else:"},{"line_number":449,"context_line":"            snapshots \u003d self.db.snapshot_get_all_by_project("},{"line_number":450,"context_line":"                context, context.project_id)"},{"line_number":451,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_be30df9e","line":448,"updated":"2015-02-19 13:57:08.000000000","message":"ditto","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"52b695c6e731ece42ef0b99c36bb999c2c45df71","unresolved":false,"context_lines":[{"line_number":676,"context_line":"            options_list.append(options)"},{"line_number":677,"context_line":""},{"line_number":678,"context_line":"        try:"},{"line_number":679,"context_line":"            for options in options_list:"},{"line_number":680,"context_line":"                snapshot \u003d self.db.snapshot_create(context, options)"},{"line_number":681,"context_line":"                snapshot_list.append(snapshot)"},{"line_number":682,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_7e12e7fd","line":679,"updated":"2015-02-19 13:57:08.000000000","message":"ditto","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"52b695c6e731ece42ef0b99c36bb999c2c45df71","unresolved":false,"context_lines":[{"line_number":684,"context_line":"        except Exception:"},{"line_number":685,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":686,"context_line":"                try:"},{"line_number":687,"context_line":"                    for snap in snapshot_list:"},{"line_number":688,"context_line":"                        self.db.snapshot_destroy(context, snap[\u0027id\u0027])"},{"line_number":689,"context_line":"                finally:"},{"line_number":690,"context_line":"                    QUOTAS.rollback(context, reservations)"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_feddf741","line":687,"updated":"2015-02-19 13:57:08.000000000","message":"ditto","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"52b695c6e731ece42ef0b99c36bb999c2c45df71","unresolved":false,"context_lines":[{"line_number":920,"context_line":"        return _metadata"},{"line_number":921,"context_line":""},{"line_number":922,"context_line":"    def get_snapshot_metadata(self, context, snapshot):"},{"line_number":923,"context_line":"        \"\"\"Get all metadata associated with a snapshot.\"\"\""},{"line_number":924,"context_line":"        rv \u003d self.db.snapshot_metadata_get(context, snapshot[\u0027id\u0027])"},{"line_number":925,"context_line":"        return dict(rv.iteritems())"},{"line_number":926,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_7ee907e2","line":923,"updated":"2015-02-19 13:57:08.000000000","message":"ditto","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"52b695c6e731ece42ef0b99c36bb999c2c45df71","unresolved":false,"context_lines":[{"line_number":925,"context_line":"        return dict(rv.iteritems())"},{"line_number":926,"context_line":""},{"line_number":927,"context_line":"    def delete_snapshot_metadata(self, context, snapshot, key):"},{"line_number":928,"context_line":"        \"\"\"Delete the given metadata item from a snapshot.\"\"\""},{"line_number":929,"context_line":"        self.db.snapshot_metadata_delete(context, snapshot[\u0027id\u0027], key)"},{"line_number":930,"context_line":""},{"line_number":931,"context_line":"    def update_snapshot_metadata(self, context,"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_bebe1fd2","line":928,"updated":"2015-02-19 13:57:08.000000000","message":"ditto","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"52b695c6e731ece42ef0b99c36bb999c2c45df71","unresolved":false,"context_lines":[{"line_number":945,"context_line":"            _metadata.update(metadata)"},{"line_number":946,"context_line":""},{"line_number":947,"context_line":"        self._check_metadata_properties(_metadata)"},{"line_number":948,"context_line":""},{"line_number":949,"context_line":"        db_meta \u003d self.db.snapshot_metadata_update(context,"},{"line_number":950,"context_line":"                                                   snapshot[\u0027id\u0027],"},{"line_number":951,"context_line":"                                                   _metadata,"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_5ec5235a","line":948,"updated":"2015-02-19 13:57:08.000000000","message":"ditto","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"52b695c6e731ece42ef0b99c36bb999c2c45df71","unresolved":false,"context_lines":[{"line_number":1082,"context_line":"            msg \u003d _(\"Volume is already part of an active migration\")"},{"line_number":1083,"context_line":"            raise exception.InvalidVolume(reason\u003dmsg)"},{"line_number":1084,"context_line":""},{"line_number":1085,"context_line":"        # We only handle volumes without snapshots for now"},{"line_number":1086,"context_line":"        snaps \u003d self.db.snapshot_get_all_for_volume(context, volume[\u0027id\u0027])"},{"line_number":1087,"context_line":"        if snaps:"},{"line_number":1088,"context_line":"            msg \u003d _(\"volume must not have snapshots\")"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_dea8338e","line":1085,"updated":"2015-02-19 13:57:08.000000000","message":"ditto","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"}],"cinder/volume/drivers/lvm.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"52b695c6e731ece42ef0b99c36bb999c2c45df71","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            LOG.error(msg)"},{"line_number":137,"context_line":"            raise exception.VolumeBackendAPIException(data\u003dmsg)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"        size_in_g \u003d volume.get(\u0027volume_size\u0027) or volume.get(\u0027size\u0027)"},{"line_number":140,"context_line":"        if size_in_g is None:"},{"line_number":141,"context_line":"            msg \u003d (_LE(\"Size for volume: %s not found, \""},{"line_number":142,"context_line":"                   \"cannot secure delete.\") % volume[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_1e7d6b1c","line":139,"updated":"2015-02-19 13:57:08.000000000","message":"IMO this change isn\u0027t in scope of the patch.","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"c29f0e56dd9be43dd8d41ad07d46fe65de2ef348","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            LOG.error(msg)"},{"line_number":137,"context_line":"            raise exception.VolumeBackendAPIException(data\u003dmsg)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"        size_in_g \u003d volume.get(\u0027volume_size\u0027) or volume.get(\u0027size\u0027)"},{"line_number":140,"context_line":"        if size_in_g is None:"},{"line_number":141,"context_line":"            msg \u003d (_LE(\"Size for volume: %s not found, \""},{"line_number":142,"context_line":"                   \"cannot secure delete.\") % volume[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_b709d4de","line":139,"in_reply_to":"da86d52c_1e7d6b1c","updated":"2015-02-19 19:24:21.000000000","message":"A while ago, this affected snapshot objects because the volume that gets passed here somehow came from the one queried from snapshot objects, and it did not have the \u0027size\u0027 attribute.  I have to look at it again, but I am probably going to encounter it again.","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"0d2abe39f5d3cb587be226a3bdfffc9d3a3c687e","unresolved":false,"context_lines":[{"line_number":352,"context_line":"            return True"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"        # TODO(yamahata): zeroing out the whole snapshot triggers COW."},{"line_number":355,"context_line":"        # it\u0027s quite slow."},{"line_number":356,"context_line":"        self._delete_volume(snapshot, is_snapshot\u003dTrue)"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"    def local_path(self, volume, vg\u003dNone):"}],"source_content_type":"text/x-python","patch_set":38,"id":"ba7be1f8_330f6132","line":355,"updated":"2015-02-21 15:47:09.000000000","message":"The LVM driver passes the snapshot object (here) to _delete_volume, which call _clear_volume.  _clear_volume attempts to access the \u0027size\u0027 attribute of the snapshot object, but there is none, it is not a snapshot attribute.  There is only the \u0027volume_size\u0027 attribute.  Hence, we have to modify L139 above to use the correct attribute, i.e. volume_size.","commit_id":"8c5435bc71d261ae73f58e5e94351c92407299e2"}],"cinder/volume/manager.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"057d0e57aa395e8593809e937399b6c316c084d0","unresolved":false,"context_lines":[{"line_number":533,"context_line":"        \"\"\"Creates and exports the snapshot.\"\"\""},{"line_number":534,"context_line":"        caller_context \u003d context"},{"line_number":535,"context_line":"        context \u003d context.elevated()"},{"line_number":536,"context_line":"        LOG.info(_(\"snapshot %s: creating\"), snapshot.id)"},{"line_number":537,"context_line":""},{"line_number":538,"context_line":"        self._notify_about_snapshot_usage("},{"line_number":539,"context_line":"            context, snapshot, \"create.start\")"}],"source_content_type":"text/x-python","patch_set":25,"id":"da86d52c_876b141d","line":536,"updated":"2015-02-11 06:33:31.000000000","message":"Needs _LI marker.","commit_id":"b721b1c0c64583095ce491062c9400462bd11e0f"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"e6b9d4af64468933b976f034be95d86c92eee207","unresolved":false,"context_lines":[{"line_number":533,"context_line":"        \"\"\"Creates and exports the snapshot.\"\"\""},{"line_number":534,"context_line":"        caller_context \u003d context"},{"line_number":535,"context_line":"        context \u003d context.elevated()"},{"line_number":536,"context_line":"        LOG.info(_(\"snapshot %s: creating\"), snapshot.id)"},{"line_number":537,"context_line":""},{"line_number":538,"context_line":"        self._notify_about_snapshot_usage("},{"line_number":539,"context_line":"            context, snapshot, \"create.start\")"}],"source_content_type":"text/x-python","patch_set":25,"id":"da86d52c_8954f5fe","line":536,"in_reply_to":"da86d52c_876b141d","updated":"2015-02-11 15:20:22.000000000","message":"Done","commit_id":"b721b1c0c64583095ce491062c9400462bd11e0f"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"057d0e57aa395e8593809e937399b6c316c084d0","unresolved":false,"context_lines":[{"line_number":609,"context_line":""},{"line_number":610,"context_line":"            self.driver.delete_snapshot(snapshot)"},{"line_number":611,"context_line":"        except exception.SnapshotIsBusy:"},{"line_number":612,"context_line":"            LOG.error(_(\"Cannot delete snapshot %s: snapshot is busy\"),"},{"line_number":613,"context_line":"                      snapshot.id)"},{"line_number":614,"context_line":"            snapshot.status \u003d \u0027available\u0027"},{"line_number":615,"context_line":"            snapshot.save(context)"}],"source_content_type":"text/x-python","patch_set":25,"id":"da86d52c_a77498fe","line":612,"updated":"2015-02-11 06:33:31.000000000","message":"Needs _LE","commit_id":"b721b1c0c64583095ce491062c9400462bd11e0f"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"e6b9d4af64468933b976f034be95d86c92eee207","unresolved":false,"context_lines":[{"line_number":609,"context_line":""},{"line_number":610,"context_line":"            self.driver.delete_snapshot(snapshot)"},{"line_number":611,"context_line":"        except exception.SnapshotIsBusy:"},{"line_number":612,"context_line":"            LOG.error(_(\"Cannot delete snapshot %s: snapshot is busy\"),"},{"line_number":613,"context_line":"                      snapshot.id)"},{"line_number":614,"context_line":"            snapshot.status \u003d \u0027available\u0027"},{"line_number":615,"context_line":"            snapshot.save(context)"}],"source_content_type":"text/x-python","patch_set":25,"id":"da86d52c_c9418d3a","line":612,"in_reply_to":"da86d52c_a77498fe","updated":"2015-02-11 15:20:22.000000000","message":"Done","commit_id":"b721b1c0c64583095ce491062c9400462bd11e0f"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"057d0e57aa395e8593809e937399b6c316c084d0","unresolved":false,"context_lines":[{"line_number":640,"context_line":"            LOG.exception(_LE(\"Failed to update usages deleting snapshot\"))"},{"line_number":641,"context_line":"        self.db.volume_glance_metadata_delete_by_snapshot(context, snapshot_id)"},{"line_number":642,"context_line":"        self.db.snapshot_destroy(context, snapshot_id)"},{"line_number":643,"context_line":"        LOG.info(_(\"snapshot %s: deleted successfully\"), snapshot.id)"},{"line_number":644,"context_line":"        self._notify_about_snapshot_usage(context, snapshot, \"delete.end\")"},{"line_number":645,"context_line":""},{"line_number":646,"context_line":"        # Commit the reservations"}],"source_content_type":"text/x-python","patch_set":25,"id":"da86d52c_e77a10f0","line":643,"updated":"2015-02-11 06:33:31.000000000","message":"This should use the _LI marker. Looks like it got lost because of a rebase.","commit_id":"b721b1c0c64583095ce491062c9400462bd11e0f"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"e6b9d4af64468933b976f034be95d86c92eee207","unresolved":false,"context_lines":[{"line_number":640,"context_line":"            LOG.exception(_LE(\"Failed to update usages deleting snapshot\"))"},{"line_number":641,"context_line":"        self.db.volume_glance_metadata_delete_by_snapshot(context, snapshot_id)"},{"line_number":642,"context_line":"        self.db.snapshot_destroy(context, snapshot_id)"},{"line_number":643,"context_line":"        LOG.info(_(\"snapshot %s: deleted successfully\"), snapshot.id)"},{"line_number":644,"context_line":"        self._notify_about_snapshot_usage(context, snapshot, \"delete.end\")"},{"line_number":645,"context_line":""},{"line_number":646,"context_line":"        # Commit the reservations"}],"source_content_type":"text/x-python","patch_set":25,"id":"da86d52c_e93e51b7","line":643,"in_reply_to":"da86d52c_e77a10f0","updated":"2015-02-11 15:20:22.000000000","message":"Done","commit_id":"b721b1c0c64583095ce491062c9400462bd11e0f"},{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"e7151c594e7a5c3a7c4440ca6add5ce37bb10bab","unresolved":false,"context_lines":[{"line_number":533,"context_line":"        \"\"\"Creates and exports the snapshot.\"\"\""},{"line_number":534,"context_line":"        caller_context \u003d context"},{"line_number":535,"context_line":"        context \u003d context.elevated()"},{"line_number":536,"context_line":"        LOG.info(_LI(\"snapshot %s: creating\"), snapshot.id)"},{"line_number":537,"context_line":""},{"line_number":538,"context_line":"        self._notify_about_snapshot_usage("},{"line_number":539,"context_line":"            context, snapshot, \"create.start\")"}],"source_content_type":"text/x-python","patch_set":28,"id":"da86d52c_62855806","line":536,"updated":"2015-02-17 07:44:03.000000000","message":"Is there a possibility that \u0027snapshot\u0027 variable can be None? In that case, this line won\u0027t work. If it can\u0027t be none, we can remove the default argument..\n\nsnapshot_id can be removed too, but I\u0027m not sure if it will require changes at what all different places..","commit_id":"287260761a14d79171a7d987ec56ec847255ced4"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"5d74763fa7cbfc889247a1a6f61b977d540a8e33","unresolved":false,"context_lines":[{"line_number":533,"context_line":"        \"\"\"Creates and exports the snapshot.\"\"\""},{"line_number":534,"context_line":"        caller_context \u003d context"},{"line_number":535,"context_line":"        context \u003d context.elevated()"},{"line_number":536,"context_line":"        LOG.info(_LI(\"snapshot %s: creating\"), snapshot.id)"},{"line_number":537,"context_line":""},{"line_number":538,"context_line":"        self._notify_about_snapshot_usage("},{"line_number":539,"context_line":"            context, snapshot, \"create.start\")"}],"source_content_type":"text/x-python","patch_set":28,"id":"da86d52c_8f71870e","line":536,"in_reply_to":"da86d52c_62855806","updated":"2015-02-17 14:58:45.000000000","message":"I removed snapshot_id so that the function is now -\ndef create_snapshot(self, context, volume_id, snapshot)\n\nThis applies to delete_snapshot as well.","commit_id":"287260761a14d79171a7d987ec56ec847255ced4"},{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"e7151c594e7a5c3a7c4440ca6add5ce37bb10bab","unresolved":false,"context_lines":[{"line_number":567,"context_line":"                self.db.volume_glance_metadata_copy_to_snapshot("},{"line_number":568,"context_line":"                    context, snapshot.id, volume_id)"},{"line_number":569,"context_line":"            except exception.CinderException as ex:"},{"line_number":570,"context_line":"                LOG.exception(_LE(\"Failed updating %(snapshot_id)s\""},{"line_number":571,"context_line":"                                  \" metadata using the provided volumes\""},{"line_number":572,"context_line":"                                  \" %(volume_id)s metadata\") %"},{"line_number":573,"context_line":"                              {\u0027volume_id\u0027: volume_id,"}],"source_content_type":"text/x-python","patch_set":28,"id":"da86d52c_e299487a","line":570,"updated":"2015-02-17 07:44:03.000000000","message":"Need to replace instances of snapshot_id with snapshot.id here too, and also at line 574 and 585. I think same goes for the following method too..","commit_id":"287260761a14d79171a7d987ec56ec847255ced4"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"5d74763fa7cbfc889247a1a6f61b977d540a8e33","unresolved":false,"context_lines":[{"line_number":567,"context_line":"                self.db.volume_glance_metadata_copy_to_snapshot("},{"line_number":568,"context_line":"                    context, snapshot.id, volume_id)"},{"line_number":569,"context_line":"            except exception.CinderException as ex:"},{"line_number":570,"context_line":"                LOG.exception(_LE(\"Failed updating %(snapshot_id)s\""},{"line_number":571,"context_line":"                                  \" metadata using the provided volumes\""},{"line_number":572,"context_line":"                                  \" %(volume_id)s metadata\") %"},{"line_number":573,"context_line":"                              {\u0027volume_id\u0027: volume_id,"}],"source_content_type":"text/x-python","patch_set":28,"id":"da86d52c_0f44b719","line":570,"in_reply_to":"da86d52c_e299487a","updated":"2015-02-17 14:58:45.000000000","message":"Done","commit_id":"287260761a14d79171a7d987ec56ec847255ced4"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"3ccc19bdec4517111582f76353f919cc77fe8e29","unresolved":false,"context_lines":[{"line_number":639,"context_line":"            reservations \u003d None"},{"line_number":640,"context_line":"            LOG.exception(_LE(\"Failed to update usages deleting snapshot\"))"},{"line_number":641,"context_line":"        self.db.volume_glance_metadata_delete_by_snapshot(context, snapshot.id)"},{"line_number":642,"context_line":"        self.db.snapshot_destroy(context, snapshot.id)"},{"line_number":643,"context_line":"        LOG.info(_LI(\"snapshot %s: deleted successfully\"), snapshot.id)"},{"line_number":644,"context_line":"        self._notify_about_snapshot_usage(context, snapshot, \"delete.end\")"},{"line_number":645,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"da86d52c_50a7140b","line":642,"updated":"2015-02-18 04:28:15.000000000","message":"I have a question on this in another file. Why not snapshot.destroy()?","commit_id":"7f75831b77575f51bc6ee74fd4b68b79763e988a"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"ec3edd73b74256564701ac9c0e342a368a70a6e7","unresolved":false,"context_lines":[{"line_number":639,"context_line":"            reservations \u003d None"},{"line_number":640,"context_line":"            LOG.exception(_LE(\"Failed to update usages deleting snapshot\"))"},{"line_number":641,"context_line":"        self.db.volume_glance_metadata_delete_by_snapshot(context, snapshot.id)"},{"line_number":642,"context_line":"        self.db.snapshot_destroy(context, snapshot.id)"},{"line_number":643,"context_line":"        LOG.info(_LI(\"snapshot %s: deleted successfully\"), snapshot.id)"},{"line_number":644,"context_line":"        self._notify_about_snapshot_usage(context, snapshot, \"delete.end\")"},{"line_number":645,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"da86d52c_fe43643c","line":642,"in_reply_to":"da86d52c_50a7140b","updated":"2015-02-18 15:04:48.000000000","message":"I just missed it, but I will use snapshot.destroy().","commit_id":"7f75831b77575f51bc6ee74fd4b68b79763e988a"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"52b695c6e731ece42ef0b99c36bb999c2c45df71","unresolved":false,"context_lines":[{"line_number":1314,"context_line":"        vol_utils.notify_about_cgsnapshot_usage("},{"line_number":1315,"context_line":"            context, cgsnapshot, event_suffix,"},{"line_number":1316,"context_line":"            extra_usage_info\u003dextra_usage_info, host\u003dself.host)"},{"line_number":1317,"context_line":""},{"line_number":1318,"context_line":"        snapshots \u003d self.db.snapshot_get_all_for_cgsnapshot(context,"},{"line_number":1319,"context_line":"                                                            cgsnapshot[\u0027id\u0027])"},{"line_number":1320,"context_line":"        if snapshots:"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_1e272b13","line":1317,"updated":"2015-02-19 13:57:08.000000000","message":"Shouldn\u0027t we use objects here?","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"c29f0e56dd9be43dd8d41ad07d46fe65de2ef348","unresolved":false,"context_lines":[{"line_number":1314,"context_line":"        vol_utils.notify_about_cgsnapshot_usage("},{"line_number":1315,"context_line":"            context, cgsnapshot, event_suffix,"},{"line_number":1316,"context_line":"            extra_usage_info\u003dextra_usage_info, host\u003dself.host)"},{"line_number":1317,"context_line":""},{"line_number":1318,"context_line":"        snapshots \u003d self.db.snapshot_get_all_for_cgsnapshot(context,"},{"line_number":1319,"context_line":"                                                            cgsnapshot[\u0027id\u0027])"},{"line_number":1320,"context_line":"        if snapshots:"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_b730f49e","line":1317,"in_reply_to":"da86d52c_1e272b13","updated":"2015-02-19 19:24:21.000000000","message":"It\u0027s part of consistency groups, and I did not want to add complexity to this base snapshot patch.","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"52b695c6e731ece42ef0b99c36bb999c2c45df71","unresolved":false,"context_lines":[{"line_number":1469,"context_line":"                              new_reservations, status_update)"},{"line_number":1470,"context_line":"                msg \u003d _(\"Retype requires migration but is not allowed.\")"},{"line_number":1471,"context_line":"                raise exception.VolumeMigrationFailed(reason\u003dmsg)"},{"line_number":1472,"context_line":""},{"line_number":1473,"context_line":"            snaps \u003d self.db.snapshot_get_all_for_volume(context,"},{"line_number":1474,"context_line":"                                                        volume_ref[\u0027id\u0027])"},{"line_number":1475,"context_line":"            if snaps:"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_fe8337c8","line":1472,"updated":"2015-02-19 13:57:08.000000000","message":"ditto","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"52b695c6e731ece42ef0b99c36bb999c2c45df71","unresolved":false,"context_lines":[{"line_number":1813,"context_line":"        context \u003d context.elevated()"},{"line_number":1814,"context_line":"        cgsnapshot_ref \u003d self.db.cgsnapshot_get(context, cgsnapshot_id)"},{"line_number":1815,"context_line":"        LOG.info(_LI(\"Cgsnapshot %s: creating.\"), cgsnapshot_ref[\u0027id\u0027])"},{"line_number":1816,"context_line":""},{"line_number":1817,"context_line":"        snapshots \u003d self.db.snapshot_get_all_for_cgsnapshot(context,"},{"line_number":1818,"context_line":"                                                            cgsnapshot_id)"},{"line_number":1819,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_1e6e4b2f","line":1816,"updated":"2015-02-19 13:57:08.000000000","message":"ditto","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"c29f0e56dd9be43dd8d41ad07d46fe65de2ef348","unresolved":false,"context_lines":[{"line_number":1813,"context_line":"        context \u003d context.elevated()"},{"line_number":1814,"context_line":"        cgsnapshot_ref \u003d self.db.cgsnapshot_get(context, cgsnapshot_id)"},{"line_number":1815,"context_line":"        LOG.info(_LI(\"Cgsnapshot %s: creating.\"), cgsnapshot_ref[\u0027id\u0027])"},{"line_number":1816,"context_line":""},{"line_number":1817,"context_line":"        snapshots \u003d self.db.snapshot_get_all_for_cgsnapshot(context,"},{"line_number":1818,"context_line":"                                                            cgsnapshot_id)"},{"line_number":1819,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_7712fcfd","line":1816,"in_reply_to":"da86d52c_1e6e4b2f","updated":"2015-02-19 19:24:21.000000000","message":"See above.","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"52b695c6e731ece42ef0b99c36bb999c2c45df71","unresolved":false,"context_lines":[{"line_number":1839,"context_line":"                for snapshot in snapshots:"},{"line_number":1840,"context_line":"                    # Update db if status is error"},{"line_number":1841,"context_line":"                    if snapshot[\u0027status\u0027] \u003d\u003d \u0027error\u0027:"},{"line_number":1842,"context_line":"                        update \u003d {\u0027status\u0027: snapshot[\u0027status\u0027]}"},{"line_number":1843,"context_line":"                        self.db.snapshot_update(context, snapshot[\u0027id\u0027],"},{"line_number":1844,"context_line":"                                                update)"},{"line_number":1845,"context_line":"                        # If status for one snapshot is error, make sure"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_be645f49","line":1842,"updated":"2015-02-19 13:57:08.000000000","message":"ditto","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"52b695c6e731ece42ef0b99c36bb999c2c45df71","unresolved":false,"context_lines":[{"line_number":1873,"context_line":"                                  \" metadata using the provided volumes\""},{"line_number":1874,"context_line":"                                  \" %(volume_id)s metadata\") %"},{"line_number":1875,"context_line":"                              {\u0027volume_id\u0027: volume_id,"},{"line_number":1876,"context_line":"                               \u0027snapshot_id\u0027: snapshot_id})"},{"line_number":1877,"context_line":"                    self.db.snapshot_update(context,"},{"line_number":1878,"context_line":"                                            snapshot[\u0027id\u0027],"},{"line_number":1879,"context_line":"                                            {\u0027status\u0027: \u0027error\u0027})"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_1e556b4f","line":1876,"updated":"2015-02-19 13:57:08.000000000","message":"ditto","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"52b695c6e731ece42ef0b99c36bb999c2c45df71","unresolved":false,"context_lines":[{"line_number":1878,"context_line":"                                            snapshot[\u0027id\u0027],"},{"line_number":1879,"context_line":"                                            {\u0027status\u0027: \u0027error\u0027})"},{"line_number":1880,"context_line":"                    raise exception.MetadataCopyFailure(reason\u003dex)"},{"line_number":1881,"context_line":""},{"line_number":1882,"context_line":"            self.db.snapshot_update(context,"},{"line_number":1883,"context_line":"                                    snapshot[\u0027id\u0027], {\u0027status\u0027: \u0027available\u0027,"},{"line_number":1884,"context_line":"                                                     \u0027progress\u0027: \u0027100%\u0027})"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_7e4667a8","line":1881,"updated":"2015-02-19 13:57:08.000000000","message":"ditto","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"52b695c6e731ece42ef0b99c36bb999c2c45df71","unresolved":false,"context_lines":[{"line_number":1901,"context_line":"        project_id \u003d cgsnapshot_ref[\u0027project_id\u0027]"},{"line_number":1902,"context_line":""},{"line_number":1903,"context_line":"        LOG.info(_LI(\"cgsnapshot %s: deleting\"), cgsnapshot_ref[\u0027id\u0027])"},{"line_number":1904,"context_line":""},{"line_number":1905,"context_line":"        snapshots \u003d self.db.snapshot_get_all_for_cgsnapshot(context,"},{"line_number":1906,"context_line":"                                                            cgsnapshot_id)"},{"line_number":1907,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_dece732c","line":1904,"updated":"2015-02-19 13:57:08.000000000","message":"ditto","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"c29f0e56dd9be43dd8d41ad07d46fe65de2ef348","unresolved":false,"context_lines":[{"line_number":1901,"context_line":"        project_id \u003d cgsnapshot_ref[\u0027project_id\u0027]"},{"line_number":1902,"context_line":""},{"line_number":1903,"context_line":"        LOG.info(_LI(\"cgsnapshot %s: deleting\"), cgsnapshot_ref[\u0027id\u0027])"},{"line_number":1904,"context_line":""},{"line_number":1905,"context_line":"        snapshots \u003d self.db.snapshot_get_all_for_cgsnapshot(context,"},{"line_number":1906,"context_line":"                                                            cgsnapshot_id)"},{"line_number":1907,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_57eed8ed","line":1904,"in_reply_to":"da86d52c_dece732c","updated":"2015-02-19 19:24:21.000000000","message":"See above.","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"52b695c6e731ece42ef0b99c36bb999c2c45df71","unresolved":false,"context_lines":[{"line_number":1925,"context_line":""},{"line_number":1926,"context_line":"            if snapshots:"},{"line_number":1927,"context_line":"                for snapshot in snapshots:"},{"line_number":1928,"context_line":"                    update \u003d {\u0027status\u0027: snapshot[\u0027status\u0027]}"},{"line_number":1929,"context_line":"                    self.db.snapshot_update(context, snapshot[\u0027id\u0027],"},{"line_number":1930,"context_line":"                                            update)"},{"line_number":1931,"context_line":"                    if snapshot[\u0027status\u0027] in [\u0027error_deleting\u0027, \u0027error\u0027] and \\"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_7edd87dc","line":1928,"updated":"2015-02-19 13:57:08.000000000","message":"ditto","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"52b695c6e731ece42ef0b99c36bb999c2c45df71","unresolved":false,"context_lines":[{"line_number":1972,"context_line":"                LOG.exception(_LE(\"Failed to update usages deleting snapshot\"))"},{"line_number":1973,"context_line":""},{"line_number":1974,"context_line":"            self.db.volume_glance_metadata_delete_by_snapshot(context,"},{"line_number":1975,"context_line":"                                                              snapshot[\u0027id\u0027])"},{"line_number":1976,"context_line":"            self.db.snapshot_destroy(context, snapshot[\u0027id\u0027])"},{"line_number":1977,"context_line":""},{"line_number":1978,"context_line":"            # Commit the reservations"}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_bef29f6c","line":1975,"updated":"2015-02-19 13:57:08.000000000","message":"ditto","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"8e7693bed7a8141cc4174cf4020ae93edd54670a","unresolved":false,"context_lines":[{"line_number":550,"context_line":"            # but it is not a requirement for all drivers."},{"line_number":551,"context_line":"            snapshot.context \u003d context"},{"line_number":552,"context_line":""},{"line_number":553,"context_line":"            model_update \u003d self.driver.create_snapshot(snapshot)"},{"line_number":554,"context_line":"            if model_update:"},{"line_number":555,"context_line":"                snapshot.update(model_update)"},{"line_number":556,"context_line":"                snapshot.save(context)"}],"source_content_type":"text/x-python","patch_set":38,"id":"ba7be1f8_d1bc7609","line":553,"updated":"2015-02-26 22:19:23.000000000","message":"Is there any concern that drivers can now fiddle with the db through these objects? Personally I think its pretty nifty, but I know the sentiment seems to generally be that it is not something they should be allowed to do (apologies if its already been brought up, i\u0027ve just started reading through these changes)","commit_id":"8c5435bc71d261ae73f58e5e94351c92407299e2"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"316b4b7686c7515becc6be2487334d3bbcc0a64e","unresolved":false,"context_lines":[{"line_number":550,"context_line":"            # but it is not a requirement for all drivers."},{"line_number":551,"context_line":"            snapshot.context \u003d context"},{"line_number":552,"context_line":""},{"line_number":553,"context_line":"            model_update \u003d self.driver.create_snapshot(snapshot)"},{"line_number":554,"context_line":"            if model_update:"},{"line_number":555,"context_line":"                snapshot.update(model_update)"},{"line_number":556,"context_line":"                snapshot.save(context)"}],"source_content_type":"text/x-python","patch_set":38,"id":"ba7be1f8_ffe11cff","line":553,"in_reply_to":"ba7be1f8_d1bc7609","updated":"2015-02-27 15:26:11.000000000","message":"AFAICT, people were opposed to drivers making direct DB calls (i.e. self.db.*).  Objects do offer the ability for drivers to indirectly make DB calls, but in a more structured way, i.e. there are methods to make update properties (e.g. metadata).  Plus, since objects are make the direct DB calls, there can be code added to verify the data before it is actually saved, which is good.","commit_id":"8c5435bc71d261ae73f58e5e94351c92407299e2"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"d391af622e096dae3f718e1178e844221146027f","unresolved":false,"context_lines":[{"line_number":550,"context_line":"            # but it is not a requirement for all drivers."},{"line_number":551,"context_line":"            snapshot.context \u003d context"},{"line_number":552,"context_line":""},{"line_number":553,"context_line":"            model_update \u003d self.driver.create_snapshot(snapshot)"},{"line_number":554,"context_line":"            if model_update:"},{"line_number":555,"context_line":"                snapshot.update(model_update)"},{"line_number":556,"context_line":"                snapshot.save(context)"}],"source_content_type":"text/x-python","patch_set":38,"id":"ba7be1f8_b35191da","line":553,"in_reply_to":"ba7be1f8_ffe11cff","updated":"2015-02-27 20:06:43.000000000","message":"Sounds good to me.","commit_id":"8c5435bc71d261ae73f58e5e94351c92407299e2"}],"cinder/volume/rpcapi.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"2be8f773986d2aa1cde704e57303298ac0441b15","unresolved":false,"context_lines":[{"line_number":57,"context_line":"               sync_replica."},{"line_number":58,"context_line":"        1.18 - Adds create_consistencygroup, delete_consistencygroup,"},{"line_number":59,"context_line":"               create_cgsnapshot, and delete_cgsnapshot. Also adds"},{"line_number":60,"context_line":"               the consistencygroup_id parameter in create_volume."},{"line_number":61,"context_line":"        1.19 - Adds update_migrated_volume"},{"line_number":62,"context_line":"    \u0027\u0027\u0027"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":38,"id":"ba7be1f8_f5386dd6","line":60,"updated":"2015-02-27 09:26:42.000000000","message":"You should add a new version here.","commit_id":"8c5435bc71d261ae73f58e5e94351c92407299e2"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"316b4b7686c7515becc6be2487334d3bbcc0a64e","unresolved":false,"context_lines":[{"line_number":57,"context_line":"               sync_replica."},{"line_number":58,"context_line":"        1.18 - Adds create_consistencygroup, delete_consistencygroup,"},{"line_number":59,"context_line":"               create_cgsnapshot, and delete_cgsnapshot. Also adds"},{"line_number":60,"context_line":"               the consistencygroup_id parameter in create_volume."},{"line_number":61,"context_line":"        1.19 - Adds update_migrated_volume"},{"line_number":62,"context_line":"    \u0027\u0027\u0027"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":38,"id":"ba7be1f8_dfb37808","line":60,"in_reply_to":"ba7be1f8_f5386dd6","updated":"2015-02-27 15:26:11.000000000","message":"Done","commit_id":"8c5435bc71d261ae73f58e5e94351c92407299e2"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"2be8f773986d2aa1cde704e57303298ac0441b15","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        super(VolumeAPI, self).__init__()"},{"line_number":68,"context_line":"        target \u003d messaging.Target(topic\u003dCONF.volume_topic,"},{"line_number":69,"context_line":"                                  version\u003dself.BASE_RPC_API_VERSION)"},{"line_number":70,"context_line":"        serializer \u003d objects_base.CinderObjectSerializer()"},{"line_number":71,"context_line":"        self.client \u003d rpc.get_client(target, \u00271.19\u0027, serializer\u003dserializer)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def create_consistencygroup(self, ctxt, group, host):"}],"source_content_type":"text/x-python","patch_set":38,"id":"ba7be1f8_9551f110","line":70,"updated":"2015-02-27 09:26:42.000000000","message":"Version should be increased.","commit_id":"8c5435bc71d261ae73f58e5e94351c92407299e2"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"316b4b7686c7515becc6be2487334d3bbcc0a64e","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        super(VolumeAPI, self).__init__()"},{"line_number":68,"context_line":"        target \u003d messaging.Target(topic\u003dCONF.volume_topic,"},{"line_number":69,"context_line":"                                  version\u003dself.BASE_RPC_API_VERSION)"},{"line_number":70,"context_line":"        serializer \u003d objects_base.CinderObjectSerializer()"},{"line_number":71,"context_line":"        self.client \u003d rpc.get_client(target, \u00271.19\u0027, serializer\u003dserializer)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def create_consistencygroup(self, ctxt, group, host):"}],"source_content_type":"text/x-python","patch_set":38,"id":"ba7be1f8_ffb83ce7","line":70,"in_reply_to":"ba7be1f8_9551f110","updated":"2015-02-27 15:26:11.000000000","message":"Done","commit_id":"8c5435bc71d261ae73f58e5e94351c92407299e2"}],"tools/lintstack.py":[{"author":{"_account_id":6825,"name":"Gary W. Smith","email":"garysmith123@gmail.com","username":"gary-w-smith"},"change_message_id":"7b02f242d7d0f8eb1159f01ef86a0ba1d13c4b29","unresolved":false,"context_lines":[{"line_number":27,"context_line":"from six.moves import cStringIO as StringIO"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"# Note(maoy): E1103 is error code related to partial type inference"},{"line_number":30,"context_line":"ignore_codes \u003d [\"E1101\", \"E1103\", \"E1120\"]"},{"line_number":31,"context_line":"# Note(maoy): the error message is the pattern of E0202. It should be ignored"},{"line_number":32,"context_line":"# for cinder.tests modules"},{"line_number":33,"context_line":"# Note(fengqian): the second error message is the pattern of [E0611]."}],"source_content_type":"text/x-python","patch_set":21,"id":"fa81d914_b27372b0","line":30,"updated":"2015-01-28 04:58:48.000000000","message":"Why are these two being added?  This needs some documentation above about why this is needed.","commit_id":"100c5ccce84881a75a3ebebd8e04a751369fb79a"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"c6e7785708c7051607e4110979259d95c42c3b93","unresolved":false,"context_lines":[{"line_number":27,"context_line":"from six.moves import cStringIO as StringIO"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"# Note(maoy): E1103 is error code related to partial type inference"},{"line_number":30,"context_line":"ignore_codes \u003d [\"E1101\", \"E1103\", \"E1120\"]"},{"line_number":31,"context_line":"# Note(maoy): the error message is the pattern of E0202. It should be ignored"},{"line_number":32,"context_line":"# for cinder.tests modules"},{"line_number":33,"context_line":"# Note(fengqian): the second error message is the pattern of [E0611]."}],"source_content_type":"text/x-python","patch_set":21,"id":"fa81d914_7daff1e3","line":30,"in_reply_to":"fa81d914_b27372b0","updated":"2015-01-28 17:06:53.000000000","message":"Sure.  I can add a note for why these codes are ignored.\n\nI was getting these pylint errors:\n\ncinder/volume/api.py:610: [E1101, API.create_snapshot_in_db] Module \u0027cinder.objects\u0027 has no \u0027Snapshot\u0027 member\n\n\u003d\u003e This did not recognized that Snapshot was imported in cinder/objects/__init__.py via register_all().\n\ncinder/api/v1/snapshots.py:107: [E1120, SnapshotsController._get_snapshot] No value passed for parameter \u0027id\u0027 in function call\ncinder/api/contrib/admin_actions.py:253: [E1120, SnapshotAdminController._get_snapshot] No value passed for parameter \u0027id\u0027 in function call\ncinder/api/v2/snapshots.py:107: [E1120, SnapshotsController._get_snapshot] No value passed for parameter \u0027id\u0027 in function call\n\n\u003d\u003e This was just throwing an erroneous error because \u0027id\u0027 is properly passed as a parm to _get_snapshot().","commit_id":"100c5ccce84881a75a3ebebd8e04a751369fb79a"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"c3913deafd3ac4465401c20593bab4ba764fff35","unresolved":false,"context_lines":[{"line_number":35,"context_line":"# for a parameter in function call, but should be ignored because it is"},{"line_number":36,"context_line":"# reporting false positives."},{"line_number":37,"context_line":"# Note(maoy): E1103 is error code related to partial type inference"},{"line_number":38,"context_line":"ignore_codes \u003d [\"E0213\", \"E1101\", \"E1102\", \"E1103\", \"E1120\"]"},{"line_number":39,"context_line":"# Note(maoy): the error message is the pattern of E0202. It should be ignored"},{"line_number":40,"context_line":"# for cinder.tests modules"},{"line_number":41,"context_line":"# Note(fengqian): the second error message is the pattern of [E0611]."}],"source_content_type":"text/x-python","patch_set":27,"id":"da86d52c_fd758acc","line":38,"updated":"2015-02-16 13:31:49.000000000","message":"Is turning these off for all code a good idea? We\u0027re loosing their benefit on none-cinderobject code...","commit_id":"025689e43a0eda70e24ec594118d06b64006426c"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"6d54c6986661f4819eef3bca0b4fd0f8224a4916","unresolved":false,"context_lines":[{"line_number":35,"context_line":"# for a parameter in function call, but should be ignored because it is"},{"line_number":36,"context_line":"# reporting false positives."},{"line_number":37,"context_line":"# Note(maoy): E1103 is error code related to partial type inference"},{"line_number":38,"context_line":"ignore_codes \u003d [\"E0213\", \"E1101\", \"E1102\", \"E1103\", \"E1120\"]"},{"line_number":39,"context_line":"# Note(maoy): the error message is the pattern of E0202. It should be ignored"},{"line_number":40,"context_line":"# for cinder.tests modules"},{"line_number":41,"context_line":"# Note(fengqian): the second error message is the pattern of [E0611]."}],"source_content_type":"text/x-python","patch_set":27,"id":"da86d52c_9f4f1e6a","line":38,"in_reply_to":"da86d52c_04404334","updated":"2015-02-16 15:27:16.000000000","message":"Sounds great, thanks","commit_id":"025689e43a0eda70e24ec594118d06b64006426c"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"1cb0572e42950a1edc36f1c776a4eb2118023ad9","unresolved":false,"context_lines":[{"line_number":35,"context_line":"# for a parameter in function call, but should be ignored because it is"},{"line_number":36,"context_line":"# reporting false positives."},{"line_number":37,"context_line":"# Note(maoy): E1103 is error code related to partial type inference"},{"line_number":38,"context_line":"ignore_codes \u003d [\"E0213\", \"E1101\", \"E1102\", \"E1103\", \"E1120\"]"},{"line_number":39,"context_line":"# Note(maoy): the error message is the pattern of E0202. It should be ignored"},{"line_number":40,"context_line":"# for cinder.tests modules"},{"line_number":41,"context_line":"# Note(fengqian): the second error message is the pattern of [E0611]."}],"source_content_type":"text/x-python","patch_set":27,"id":"da86d52c_04404334","line":38,"in_reply_to":"da86d52c_fd758acc","updated":"2015-02-16 15:08:05.000000000","message":"I can modify the is_ignored() method below to only ignore these code in cinder object directory, so that these codes will be checked in the rest of the cinder code base.  Does that sound good?","commit_id":"025689e43a0eda70e24ec594118d06b64006426c"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"52b695c6e731ece42ef0b99c36bb999c2c45df71","unresolved":false,"context_lines":[{"line_number":62,"context_line":"# member is created dynamically."},{"line_number":63,"context_line":"objects_ignore_messages \u003d ["},{"line_number":64,"context_line":"    \"No value passed for parameter \u0027id\u0027 in function call\","},{"line_number":65,"context_line":"    \"Module \u0027cinder.objects\u0027 has no \u0027Snapshot\u0027 member\""},{"line_number":66,"context_line":"]"},{"line_number":67,"context_line":"objects_ignore_modules \u003d [\"cinder/objects/\"]"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_b53802a1","line":65,"updated":"2015-02-19 13:57:08.000000000","message":"There should be comma at the end of line according to hacking guidelines (http://docs.openstack.org/developer/hacking/#dictionaries-lists).","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"c29f0e56dd9be43dd8d41ad07d46fe65de2ef348","unresolved":false,"context_lines":[{"line_number":62,"context_line":"# member is created dynamically."},{"line_number":63,"context_line":"objects_ignore_messages \u003d ["},{"line_number":64,"context_line":"    \"No value passed for parameter \u0027id\u0027 in function call\","},{"line_number":65,"context_line":"    \"Module \u0027cinder.objects\u0027 has no \u0027Snapshot\u0027 member\""},{"line_number":66,"context_line":"]"},{"line_number":67,"context_line":"objects_ignore_modules \u003d [\"cinder/objects/\"]"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"da86d52c_77e91ce2","line":65,"in_reply_to":"da86d52c_b53802a1","updated":"2015-02-19 19:24:21.000000000","message":"Done","commit_id":"88d5ed1b400594cc36ed3a8d4a011d10a96ccd8f"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"d234c46d3a1cc7538cf7a4ba0a4af2b848be9695","unresolved":false,"context_lines":[{"line_number":62,"context_line":"# member is created dynamically."},{"line_number":63,"context_line":"objects_ignore_messages \u003d ["},{"line_number":64,"context_line":"    \"No value passed for parameter \u0027id\u0027 in function call\","},{"line_number":65,"context_line":"    \"Module \u0027cinder.objects\u0027 has no \u0027Snapshot\u0027 member\""},{"line_number":66,"context_line":"]"},{"line_number":67,"context_line":"objects_ignore_modules \u003d [\"cinder/objects/\"]"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":34,"id":"ba7be1f8_ee36e9e6","line":65,"updated":"2015-02-20 11:16:58.000000000","message":"Comma at the end.","commit_id":"d908296eda3f016ae5de437e390a76891084dcdc"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"2128cc4c3f0c27e3c6b84e176e54e8f8db9183b9","unresolved":false,"context_lines":[{"line_number":62,"context_line":"# member is created dynamically."},{"line_number":63,"context_line":"objects_ignore_messages \u003d ["},{"line_number":64,"context_line":"    \"No value passed for parameter \u0027id\u0027 in function call\","},{"line_number":65,"context_line":"    \"Module \u0027cinder.objects\u0027 has no \u0027Snapshot\u0027 member\""},{"line_number":66,"context_line":"]"},{"line_number":67,"context_line":"objects_ignore_modules \u003d [\"cinder/objects/\"]"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":34,"id":"ba7be1f8_184a9180","line":65,"in_reply_to":"ba7be1f8_ee36e9e6","updated":"2015-02-20 17:46:37.000000000","message":"Done","commit_id":"d908296eda3f016ae5de437e390a76891084dcdc"}]}
