)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"040f3e5f5d5bcce70f0692aaa3662fe155cc25d7","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Conversion to volume object"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Switch cinder internals to use volume"},{"line_number":10,"context_line":"oslo_versionedobject.  This patch switches cinder"},{"line_number":11,"context_line":"internals to use volume oslo_versionedobjects for"},{"line_number":12,"context_line":"get, create, update, and delete volume APIs."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":84,"id":"da20952f_e4d5951b","line":9,"updated":"2015-09-01 12:47:36.000000000","message":"You\u0027re saying same thing in two subsequent sentences.","commit_id":"d5e7340e8616973c0c9ec55ee0a6471aa2401666"}],"cinder/api/contrib/volume_manage.py":[{"author":{"_account_id":17718,"name":"Lallana","email":"gaozhiqiang2@huawei.com","username":"Lallana"},"change_message_id":"fbcfa5f7ce0f2e64ebf6602b77ce42a1a4df8f65","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        required_keys \u003d set([\u0027ref\u0027, \u0027host\u0027])"},{"line_number":107,"context_line":"        missing_keys \u003d list(required_keys - set(volume.keys()))"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        if missing_keys:"},{"line_number":110,"context_line":"            msg \u003d _(\"The following elements are required: %s\") % \\"},{"line_number":111,"context_line":"                \u0027, \u0027.join(missing_keys)"},{"line_number":112,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":81,"id":"da20952f_1cd3d005","line":109,"updated":"2015-08-28 09:55:17.000000000","message":"Please wrap in () and remove use of \\ for line continuation.","commit_id":"87bb353db07677c6fc23b6c980dcbe5821cd608b"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"91d3a22db3c2b0f2802668e7b6bee6e28d65f81c","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        required_keys \u003d set([\u0027ref\u0027, \u0027host\u0027])"},{"line_number":107,"context_line":"        missing_keys \u003d list(required_keys - set(volume.keys()))"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        if missing_keys:"},{"line_number":110,"context_line":"            msg \u003d _(\"The following elements are required: %s\") % \\"},{"line_number":111,"context_line":"                \u0027, \u0027.join(missing_keys)"},{"line_number":112,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":81,"id":"da20952f_df046ac1","line":109,"in_reply_to":"da20952f_1cd3d005","updated":"2015-08-28 10:09:41.000000000","message":"This isn\u0027t related to the reviewed change. Please don\u0027t insist on growing the patch further, it\u0027s huge enough already.","commit_id":"87bb353db07677c6fc23b6c980dcbe5821cd608b"}],"cinder/api/v1/volumes.py":[{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"f88d914230c646babe323cc66ac8e4126a5150ea","unresolved":false,"context_lines":[{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    # Need to form the string true/false explicitly here to"},{"line_number":88,"context_line":"    # maintain our API contract"},{"line_number":89,"context_line":"    if vol[\u0027bootable\u0027]:"},{"line_number":90,"context_line":"        d[\u0027bootable\u0027] \u003d \u0027true\u0027"},{"line_number":91,"context_line":"    else:"},{"line_number":92,"context_line":"        d[\u0027bootable\u0027] \u003d \u0027false\u0027"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba3cc151_b47a86b8","line":89,"updated":"2015-07-09 11:50:18.000000000","message":"vol.bootable","commit_id":"6e50dd84cd2bffd080b4d05815c7c7193f4f780b"},{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"f88d914230c646babe323cc66ac8e4126a5150ea","unresolved":false,"context_lines":[{"line_number":91,"context_line":"    else:"},{"line_number":92,"context_line":"        d[\u0027bootable\u0027] \u003d \u0027false\u0027"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    if vol[\u0027multiattach\u0027]:"},{"line_number":95,"context_line":"        d[\u0027multiattach\u0027] \u003d \u0027true\u0027"},{"line_number":96,"context_line":"    else:"},{"line_number":97,"context_line":"        d[\u0027multiattach\u0027] \u003d \u0027false\u0027"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba3cc151_942d02aa","line":94,"updated":"2015-07-09 11:50:18.000000000","message":"vol.multiattach","commit_id":"6e50dd84cd2bffd080b4d05815c7c7193f4f780b"},{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"f88d914230c646babe323cc66ac8e4126a5150ea","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        d[\u0027multiattach\u0027] \u003d \u0027false\u0027"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    d[\u0027attachments\u0027] \u003d []"},{"line_number":100,"context_line":"    if vol[\u0027attach_status\u0027] \u003d\u003d \u0027attached\u0027:"},{"line_number":101,"context_line":"        d[\u0027attachments\u0027] \u003d _translate_attachment_detail_view(context, vol)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    d[\u0027display_name\u0027] \u003d vol.display_name"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba3cc151_4f284786","line":100,"updated":"2015-07-09 11:50:18.000000000","message":"vol.attach_status","commit_id":"6e50dd84cd2bffd080b4d05815c7c7193f4f780b"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"67fe28a0c7c30ba1c74fcd07285ba93033f0a3dc","unresolved":false,"context_lines":[{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    LOG.info(_LI(\"vol\u003d%s\"), vol, context\u003dcontext)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    if vol.get(\u0027volume_metadata\u0027):"},{"line_number":122,"context_line":"        metadata \u003d vol.get(\u0027volume_metadata\u0027)"},{"line_number":123,"context_line":"        d[\u0027metadata\u0027] \u003d {item[\u0027key\u0027]: item[\u0027value\u0027] for item in metadata}"},{"line_number":124,"context_line":"    # avoid circular ref when vol is a Volume instance"}],"source_content_type":"text/x-python","patch_set":69,"id":"1a4dcd0f_f2dfb766","side":"PARENT","line":121,"updated":"2015-08-13 03:15:33.000000000","message":"Here we can get either \u0027volume_metadata\u0027 or \u0027metadata\u0027, but you removed \u0027volume_metadata\u0027.","commit_id":"6d878b3f5d4663f90ec2d28e7ad70422f7ad232c"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"dc9b785e2382271d462b50fdc505dcf2325e254b","unresolved":false,"context_lines":[{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    LOG.info(_LI(\"vol\u003d%s\"), vol, context\u003dcontext)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    if vol.get(\u0027volume_metadata\u0027):"},{"line_number":122,"context_line":"        metadata \u003d vol.get(\u0027volume_metadata\u0027)"},{"line_number":123,"context_line":"        d[\u0027metadata\u0027] \u003d {item[\u0027key\u0027]: item[\u0027value\u0027] for item in metadata}"},{"line_number":124,"context_line":"    # avoid circular ref when vol is a Volume instance"}],"source_content_type":"text/x-python","patch_set":69,"id":"1a4dcd0f_bb5a4c80","side":"PARENT","line":121,"in_reply_to":"1a4dcd0f_f2dfb766","updated":"2015-08-13 15:08:15.000000000","message":"volume_metadata is the field we get from a join.  The field is converted to volume.metadata in objects/volume.py.  In this method, a volume object is passed into  _translate_volume_summary_view, so the only valid field to use is volume.metadata.","commit_id":"6d878b3f5d4663f90ec2d28e7ad70422f7ad232c"},{"author":{"_account_id":17718,"name":"Lallana","email":"gaozhiqiang2@huawei.com","username":"Lallana"},"change_message_id":"4396692479d27f52206fb81ec741ad66efa4f73a","unresolved":false,"context_lines":[{"line_number":39,"context_line":"def _translate_attachment_detail_view(_context, vol):"},{"line_number":40,"context_line":"    \"\"\"Maps keys for attachment details view.\"\"\""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    d \u003d _translate_attachment_summary_view(_context, vol)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    # No additional data / lookups at the moment"},{"line_number":45,"context_line":""}],"source_content_type":"text/x-python","patch_set":89,"id":"da20952f_b084e95d","line":42,"updated":"2015-09-06 08:06:34.000000000","message":"You should use a meaningful name instead of \"d\".","commit_id":"338d334ef622ba38d1a825d187f30c936835bbf8"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"316c7dca96f1db8775c00ae5720155ef71864a0e","unresolved":false,"context_lines":[{"line_number":39,"context_line":"def _translate_attachment_detail_view(_context, vol):"},{"line_number":40,"context_line":"    \"\"\"Maps keys for attachment details view.\"\"\""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    d \u003d _translate_attachment_summary_view(_context, vol)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    # No additional data / lookups at the moment"},{"line_number":45,"context_line":""}],"source_content_type":"text/x-python","patch_set":89,"id":"da20952f_ae6ec6fd","line":42,"in_reply_to":"da20952f_b084e95d","updated":"2015-09-06 11:59:07.000000000","message":"No.  This is not even part of the patch and is not in scope.","commit_id":"338d334ef622ba38d1a825d187f30c936835bbf8"}],"cinder/api/v2/views/volumes.py":[{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"f88d914230c646babe323cc66ac8e4126a5150ea","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        \"\"\"Retrieve the attachments of the volume object.\"\"\""},{"line_number":87,"context_line":"        attachments \u003d []"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        if volume[\u0027attach_status\u0027] \u003d\u003d \u0027attached\u0027:"},{"line_number":90,"context_line":"            attaches \u003d volume.volume_attachment"},{"line_number":91,"context_line":"            for attachment in attaches:"},{"line_number":92,"context_line":"                if attachment.attach_status \u003d\u003d \u0027attached\u0027:"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba3cc151_0fdb1f50","line":89,"updated":"2015-07-09 11:50:18.000000000","message":"volume.attach_status","commit_id":"6e50dd84cd2bffd080b4d05815c7c7193f4f780b"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"67fe28a0c7c30ba1c74fcd07285ba93033f0a3dc","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                \u0027metadata\u0027: self._get_volume_metadata(volume),"},{"line_number":71,"context_line":"                \u0027links\u0027: self._get_links(request, volume.id),"},{"line_number":72,"context_line":"                \u0027user_id\u0027: volume.user_id,"},{"line_number":73,"context_line":"                \u0027bootable\u0027: str(volume.bootable).lower(),"},{"line_number":74,"context_line":"                \u0027encrypted\u0027: self._is_volume_encrypted(volume),"},{"line_number":75,"context_line":"                \u0027replication_status\u0027: volume.replication_status,"},{"line_number":76,"context_line":"                \u0027consistencygroup_id\u0027: volume.consistencygroup_id,"}],"source_content_type":"text/x-python","patch_set":69,"id":"1a4dcd0f_b2bccf06","line":73,"updated":"2015-08-13 03:15:33.000000000","message":"str-\u003esix.text_type","commit_id":"d023ab2b45249709eaf60d6eb3ba32b663c9d55a"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"dc9b785e2382271d462b50fdc505dcf2325e254b","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                \u0027metadata\u0027: self._get_volume_metadata(volume),"},{"line_number":71,"context_line":"                \u0027links\u0027: self._get_links(request, volume.id),"},{"line_number":72,"context_line":"                \u0027user_id\u0027: volume.user_id,"},{"line_number":73,"context_line":"                \u0027bootable\u0027: str(volume.bootable).lower(),"},{"line_number":74,"context_line":"                \u0027encrypted\u0027: self._is_volume_encrypted(volume),"},{"line_number":75,"context_line":"                \u0027replication_status\u0027: volume.replication_status,"},{"line_number":76,"context_line":"                \u0027consistencygroup_id\u0027: volume.consistencygroup_id,"}],"source_content_type":"text/x-python","patch_set":69,"id":"1a4dcd0f_7b512461","line":73,"in_reply_to":"1a4dcd0f_b2bccf06","updated":"2015-08-13 15:08:15.000000000","message":"Done","commit_id":"d023ab2b45249709eaf60d6eb3ba32b663c9d55a"}],"cinder/api/v2/volumes.py":[{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"f88d914230c646babe323cc66ac8e4126a5150ea","unresolved":false,"context_lines":[{"line_number":377,"context_line":"        if source_replica is not None:"},{"line_number":378,"context_line":"            try:"},{"line_number":379,"context_line":"                src_vol \u003d self.volume_api.get_volume(context,"},{"line_number":380,"context_line":"                                                     source_replica)"},{"line_number":381,"context_line":"                if src_vol[\u0027replication_status\u0027] \u003d\u003d \u0027disabled\u0027:"},{"line_number":382,"context_line":"                    explanation \u003d _(\u0027source volume id:%s is not\u0027"},{"line_number":383,"context_line":"                                    \u0027 replicated\u0027) % source_volid"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba3cc151_4107bb17","line":380,"updated":"2015-07-09 11:50:18.000000000","message":"src_vol.replication_status","commit_id":"6e50dd84cd2bffd080b4d05815c7c7193f4f780b"}],"cinder/cmd/manage.py":[{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"d758407f41d89cd46f39afe56d50eecc4cf5d498","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        return func"},{"line_number":95,"context_line":"    return _decorator"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"def param2id(object_id):"},{"line_number":99,"context_line":"    \"\"\"Helper function to convert various id types to internal id."},{"line_number":100,"context_line":"    args: [object_id], e.g. \u0027vol-0000000a\u0027 or \u0027volume-0000000a\u0027 or \u002710\u0027"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_7d965e3f","line":97,"updated":"2015-07-08 16:09:48.000000000","message":"If we don\u0027t use it anymore we can remove it.","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"13287c5c2ed0d04aa418e3cb9615d2bfbabda7a6","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        return func"},{"line_number":95,"context_line":"    return _decorator"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"def param2id(object_id):"},{"line_number":99,"context_line":"    \"\"\"Helper function to convert various id types to internal id."},{"line_number":100,"context_line":"    args: [object_id], e.g. \u0027vol-0000000a\u0027 or \u0027volume-0000000a\u0027 or \u002710\u0027"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_93b22795","line":97,"in_reply_to":"ba3cc151_7d965e3f","updated":"2015-07-08 16:37:17.000000000","message":"Sure","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"},{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"f88d914230c646babe323cc66ac8e4126a5150ea","unresolved":false,"context_lines":[{"line_number":293,"context_line":"        Particularly to recover from cases where one has moved"},{"line_number":294,"context_line":"        their Cinder Volume node, or modified their backend_name in a"},{"line_number":295,"context_line":"        multi-backend config."},{"line_number":296,"context_line":"        \"\"\""},{"line_number":297,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":298,"context_line":"        volumes \u003d db.volume_get_all_by_host(ctxt,"},{"line_number":299,"context_line":"                                            currenthost)"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba3cc151_e16fef5d","line":296,"updated":"2015-07-09 11:50:18.000000000","message":"I think that we can use there VerObj too :)","commit_id":"6e50dd84cd2bffd080b4d05815c7c7193f4f780b"}],"cinder/objects/base.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"67fe28a0c7c30ba1c74fcd07285ba93033f0a3dc","unresolved":false,"context_lines":[{"line_number":143,"context_line":"class CinderComparableObject(base.ComparableVersionedObject):"},{"line_number":144,"context_line":"    def __eq__(self, obj):"},{"line_number":145,"context_line":"        if isinstance(obj, CinderObject):"},{"line_number":146,"context_line":"            return self.obj_to_primitive() \u003d\u003d obj.obj_to_primitive()"},{"line_number":147,"context_line":"        return False"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":""}],"source_content_type":"text/x-python","patch_set":69,"id":"1a4dcd0f_52deab3e","line":146,"updated":"2015-08-13 03:15:33.000000000","message":"Will this help the CGSnapshot patch?","commit_id":"d023ab2b45249709eaf60d6eb3ba32b663c9d55a"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"dc9b785e2382271d462b50fdc505dcf2325e254b","unresolved":false,"context_lines":[{"line_number":143,"context_line":"class CinderComparableObject(base.ComparableVersionedObject):"},{"line_number":144,"context_line":"    def __eq__(self, obj):"},{"line_number":145,"context_line":"        if isinstance(obj, CinderObject):"},{"line_number":146,"context_line":"            return self.obj_to_primitive() \u003d\u003d obj.obj_to_primitive()"},{"line_number":147,"context_line":"        return False"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":""}],"source_content_type":"text/x-python","patch_set":69,"id":"1a4dcd0f_bb3b2ce9","line":146,"in_reply_to":"1a4dcd0f_52deab3e","updated":"2015-08-13 15:08:15.000000000","message":"No.  It is related to a python 3.4 error within oslo_versionedobject itself, which I am trying to get fixed - https://review.openstack.org/206679.","commit_id":"d023ab2b45249709eaf60d6eb3ba32b663c9d55a"}],"cinder/objects/snapshot.py":[{"author":{"_account_id":2023,"name":"Saggi Mizrahi","email":"ficoos+osreview@gmail.com","username":"ficoos"},"change_message_id":"50ed2afcabc52373a428759f335562121892d9de","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        for field in self.fields:"},{"line_number":151,"context_line":"            if self.obj_attr_is_set(field):"},{"line_number":152,"context_line":"                if self[field] !\u003d current[field]:"},{"line_number":153,"context_line":"                    self[field] \u003d current[field]"},{"line_number":154,"context_line":"        self.obj_reset_changes()"},{"line_number":155,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"7a016987_48db987c","line":152,"updated":"2015-05-31 15:22:17.000000000","message":"Why not just do:\n\n self[field] \u003d current[field]\n\nif they both have the same value the result would remain the same, otherwise the new value will be used. This way tries to avoid assignment even though assignment and lookup in hash tables have the same complexity.","commit_id":"9d8e80b1b95fb16eb8dc4cf5a4dde4cf990e3dcd"}],"cinder/objects/volume.py":[{"author":{"_account_id":2023,"name":"Saggi Mizrahi","email":"ficoos+osreview@gmail.com","username":"ficoos"},"change_message_id":"50ed2afcabc52373a428759f335562121892d9de","unresolved":false,"context_lines":[{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def _reset_metadata_tracking(self, fields\u003dNone):"},{"line_number":120,"context_line":"        if fields is None or \u0027metadata\u0027 in fields:"},{"line_number":121,"context_line":"            self._orig_metadata \u003d (dict(self.metadata)"},{"line_number":122,"context_line":"                                   if \u0027metadata\u0027 in self else {})"},{"line_number":123,"context_line":"        if fields is None or \u0027volume_admin_metadata\u0027 in fields:"},{"line_number":124,"context_line":"            self._orig_admin_metadata \u003d (dict(self.volume_admin_metadata)"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a016987_68053444","line":121,"updated":"2015-05-31 15:22:17.000000000","message":"self._orig_metadata \u003d dict(getattr(self, \"metadata\", ()))","commit_id":"9d8e80b1b95fb16eb8dc4cf5a4dde4cf990e3dcd"},{"author":{"_account_id":2023,"name":"Saggi Mizrahi","email":"ficoos+osreview@gmail.com","username":"ficoos"},"change_message_id":"50ed2afcabc52373a428759f335562121892d9de","unresolved":false,"context_lines":[{"line_number":195,"context_line":""},{"line_number":196,"context_line":"        for field in self.fields:"},{"line_number":197,"context_line":"            if self.obj_attr_is_set(field):"},{"line_number":198,"context_line":"                if self[field] !\u003d current[field]:"},{"line_number":199,"context_line":"                    self[field] \u003d current[field]"},{"line_number":200,"context_line":"        self.obj_reset_changes()"},{"line_number":201,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"7a016987_488718b5","line":198,"updated":"2015-05-31 15:22:17.000000000","message":"Again, needless checking before assigning","commit_id":"9d8e80b1b95fb16eb8dc4cf5a4dde4cf990e3dcd"},{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"d758407f41d89cd46f39afe56d50eecc4cf5d498","unresolved":false,"context_lines":[{"line_number":155,"context_line":"                context.elevated(), db_volume[\u0027id\u0027])"},{"line_number":156,"context_line":"        if \u0027volume_type\u0027 in expected_attrs:"},{"line_number":157,"context_line":"            volume.volume_type \u003d objects.VolumeType.get_by_id("},{"line_number":158,"context_line":"                context, db_volume[\u0027volume_type_id\u0027])"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        volume._context \u003d context"},{"line_number":161,"context_line":"        volume.obj_reset_changes()"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_d83218a7","line":158,"updated":"2015-07-08 16:09:48.000000000","message":"Why we don\u0027t need to check if \u0027volume_attachment\u0027 is in expected_attrs?","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"13287c5c2ed0d04aa418e3cb9615d2bfbabda7a6","unresolved":false,"context_lines":[{"line_number":155,"context_line":"                context.elevated(), db_volume[\u0027id\u0027])"},{"line_number":156,"context_line":"        if \u0027volume_type\u0027 in expected_attrs:"},{"line_number":157,"context_line":"            volume.volume_type \u003d objects.VolumeType.get_by_id("},{"line_number":158,"context_line":"                context, db_volume[\u0027volume_type_id\u0027])"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        volume._context \u003d context"},{"line_number":161,"context_line":"        volume.obj_reset_changes()"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_960bf5d4","line":158,"in_reply_to":"ba3cc151_d83218a7","updated":"2015-07-08 16:37:17.000000000","message":"We should.  After several rebase, I forgot why I had to remove it or not include it, but I will add it in for my next patch.","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"},{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"d758407f41d89cd46f39afe56d50eecc4cf5d498","unresolved":false,"context_lines":[{"line_number":248,"context_line":"        if not md_was_changed:"},{"line_number":249,"context_line":"            self.obj_reset_changes([\u0027metadata\u0027])"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"@base.CinderObjectRegistry.register"},{"line_number":253,"context_line":"class VolumeList(base.ObjectListBase, base.CinderObject):"},{"line_number":254,"context_line":"    VERSION \u003d \u00271.1\u0027"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_4fecfdba","line":251,"updated":"2015-07-08 16:09:48.000000000","message":"I think that you should implement one additional method volume_update_status_based_on_attachment. \nIt\u0027s can be used in volume/manager.py line 965.","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"13287c5c2ed0d04aa418e3cb9615d2bfbabda7a6","unresolved":false,"context_lines":[{"line_number":248,"context_line":"        if not md_was_changed:"},{"line_number":249,"context_line":"            self.obj_reset_changes([\u0027metadata\u0027])"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"@base.CinderObjectRegistry.register"},{"line_number":253,"context_line":"class VolumeList(base.ObjectListBase, base.CinderObject):"},{"line_number":254,"context_line":"    VERSION \u003d \u00271.1\u0027"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_d6889d24","line":251,"in_reply_to":"ba3cc151_4fecfdba","updated":"2015-07-08 16:37:17.000000000","message":"Sure, but probably in a separate patch.  I only wanted to handle the get, create, and delete volume APIs.  The patch is already very large, and adding db.volume_update_status_based_on_attachment() would make it even larger.","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"}],"cinder/objects/volume_attachment.py":[{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"d758407f41d89cd46f39afe56d50eecc4cf5d498","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    # Version 1.0: Initial version"},{"line_number":35,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    fields \u003d {"},{"line_number":38,"context_line":"        \u0027id\u0027: fields.UUIDField(),"},{"line_number":39,"context_line":"        \u0027volume_id\u0027: fields.UUIDField(),"},{"line_number":40,"context_line":"        \u0027instance_uuid\u0027: fields.UUIDField(nullable\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_8c49b333","line":37,"updated":"2015-07-08 16:09:48.000000000","message":"You missed here relationship to volume. :)","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"13287c5c2ed0d04aa418e3cb9615d2bfbabda7a6","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    # Version 1.0: Initial version"},{"line_number":35,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    fields \u003d {"},{"line_number":38,"context_line":"        \u0027id\u0027: fields.UUIDField(),"},{"line_number":39,"context_line":"        \u0027volume_id\u0027: fields.UUIDField(),"},{"line_number":40,"context_line":"        \u0027instance_uuid\u0027: fields.UUIDField(nullable\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_f694c137","line":37,"in_reply_to":"ba3cc151_8c49b333","updated":"2015-07-08 16:37:17.000000000","message":"Actually no.  The volume object has the volume_attachment field.  Adding volume relationship here would create a circular reference, i.e. volume.volume_attachment.volume.  I do not believe it should.","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"},{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"d758407f41d89cd46f39afe56d50eecc4cf5d498","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    def _from_db_object(context, attachment, db_attachment,"},{"line_number":53,"context_line":"                        expected_attrs\u003dNone):"},{"line_number":54,"context_line":"        if expected_attrs is None:"},{"line_number":55,"context_line":"            expected_attrs \u003d []"},{"line_number":56,"context_line":"        for name, field in attachment.fields.items():"},{"line_number":57,"context_line":"            if name in OPTIONAL_FIELDS:"},{"line_number":58,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_4c1acbc7","line":55,"updated":"2015-07-08 16:09:48.000000000","message":"Currently you don\u0027t have any expected_attrs I guess that it  was prepared for volume property, right?","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"13287c5c2ed0d04aa418e3cb9615d2bfbabda7a6","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    def _from_db_object(context, attachment, db_attachment,"},{"line_number":53,"context_line":"                        expected_attrs\u003dNone):"},{"line_number":54,"context_line":"        if expected_attrs is None:"},{"line_number":55,"context_line":"            expected_attrs \u003d []"},{"line_number":56,"context_line":"        for name, field in attachment.fields.items():"},{"line_number":57,"context_line":"            if name in OPTIONAL_FIELDS:"},{"line_number":58,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_96fa1576","line":55,"in_reply_to":"ba3cc151_4c1acbc7","updated":"2015-07-08 16:37:17.000000000","message":"It is because there are no other objects/relationships that should be loaded.","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"13287c5c2ed0d04aa418e3cb9615d2bfbabda7a6","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        self.obj_reset_changes()"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def obj_load_attr(self, attrname):"},{"line_number":83,"context_line":"        if attrname not in OPTIONAL_FIELDS:"},{"line_number":84,"context_line":"            raise exception.ObjectActionError("},{"line_number":85,"context_line":"                action\u003d\u0027obj_load_attr\u0027,"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_763d112a","line":82,"updated":"2015-07-08 16:37:17.000000000","message":"I should remove this method, since no objects/relationships are loaded.","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"}],"cinder/objects/volume_type.py":[{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"d758407f41d89cd46f39afe56d50eecc4cf5d498","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    # Version 1.0: Initial version"},{"line_number":34,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    fields \u003d {"},{"line_number":37,"context_line":"        \u0027id\u0027: fields.UUIDField(),"},{"line_number":38,"context_line":"        \u0027name\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":39,"context_line":"        \u0027description\u0027: fields.StringField(nullable\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_12a138f8","line":36,"updated":"2015-07-08 16:09:48.000000000","message":"You missed relationship with snapshots.","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"13287c5c2ed0d04aa418e3cb9615d2bfbabda7a6","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    # Version 1.0: Initial version"},{"line_number":34,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    fields \u003d {"},{"line_number":37,"context_line":"        \u0027id\u0027: fields.UUIDField(),"},{"line_number":38,"context_line":"        \u0027name\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":39,"context_line":"        \u0027description\u0027: fields.StringField(nullable\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_16f9254e","line":36,"in_reply_to":"ba3cc151_12a138f8","updated":"2015-07-08 16:37:17.000000000","message":"You mean volume?  Snapshots are not tied to volume_type.  volume is not in the field because I did not want to create a circular reference, i.e. volume.volume_type.volume.  It is also not part of the SQLAlchemy model.","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"}],"cinder/scheduler/driver.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"73bdd4f7479ee55bd4300b13f6c69f9ead9eb34b","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    :returns: A Volume with the updated fields set properly."},{"line_number":48,"context_line":"    \"\"\""},{"line_number":49,"context_line":"    volume \u003d objects.Volume.get_by_id(context, volume_id)"},{"line_number":50,"context_line":"    values \u003d {\u0027host\u0027: host, \u0027scheduled_at\u0027: timeutils.utcnow()}"},{"line_number":51,"context_line":"    volume.update(values)"},{"line_number":52,"context_line":"    volume.save()"}],"source_content_type":"text/x-python","patch_set":96,"id":"9a1a9d01_546f6bfb","line":49,"updated":"2015-09-30 17:16:50.000000000","message":"You\u0027re taking an extra database hit to look this up that you didn\u0027t have before. There should be no need to do that, really. Plus, you run the risk of overwriting more changes to the db when you do so. If your save() method is properly written you should be able to do this:\n\n v \u003d objects.Volume(context\u003dcontext, id\u003dvolume_id)\n v.thing \u003d new_thing\n v.save()\n\nand have only the new_thing be actually updated.","commit_id":"60ad70657d6469e6c3cd2ed7fb5b7fcef000f128"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"73bdd4f7479ee55bd4300b13f6c69f9ead9eb34b","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    \"\"\""},{"line_number":49,"context_line":"    volume \u003d objects.Volume.get_by_id(context, volume_id)"},{"line_number":50,"context_line":"    values \u003d {\u0027host\u0027: host, \u0027scheduled_at\u0027: timeutils.utcnow()}"},{"line_number":51,"context_line":"    volume.update(values)"},{"line_number":52,"context_line":"    volume.save()"},{"line_number":53,"context_line":"    return volume"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":96,"id":"9a1a9d01_744dcf98","line":51,"updated":"2015-09-30 17:16:50.000000000","message":"Why preserve the dict syntax like this? You go to so much trouble elsewhere in the patch to stop behaving like a dict, why not just set the two new attributes manually and skip the dict, update step?","commit_id":"60ad70657d6469e6c3cd2ed7fb5b7fcef000f128"}],"cinder/scheduler/flows/create_volume.py":[{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"d758407f41d89cd46f39afe56d50eecc4cf5d498","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                \u0027availability_zone\u0027: volume_ref.availability_zone,"},{"line_number":67,"context_line":"                \u0027volume_type_id\u0027: volume_type_id,"},{"line_number":68,"context_line":"            },"},{"line_number":69,"context_line":"            \u0027volume_type\u0027: list(dict(vol_type).items()),"},{"line_number":70,"context_line":"        }"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def execute(self, context, request_spec, volume_id, snapshot_id,"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_555c8a18","line":69,"updated":"2015-07-08 16:09:48.000000000","message":"Maybe we should rename to volume_types?;]","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"13287c5c2ed0d04aa418e3cb9615d2bfbabda7a6","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                \u0027availability_zone\u0027: volume_ref.availability_zone,"},{"line_number":67,"context_line":"                \u0027volume_type_id\u0027: volume_type_id,"},{"line_number":68,"context_line":"            },"},{"line_number":69,"context_line":"            \u0027volume_type\u0027: list(dict(vol_type).items()),"},{"line_number":70,"context_line":"        }"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def execute(self, context, request_spec, volume_id, snapshot_id,"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_36a46949","line":69,"in_reply_to":"ba3cc151_555c8a18","updated":"2015-07-08 16:37:17.000000000","message":"Taskflow had it as volume_type, so I do not want to change it.  Otherwise, certain operations might fail.  Also, it is outside the scope of this patch.","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"},{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"f88d914230c646babe323cc66ac8e4126a5150ea","unresolved":false,"context_lines":[{"line_number":158,"context_line":"    create_what \u003d {"},{"line_number":159,"context_line":"        \u0027context\u0027: context,"},{"line_number":160,"context_line":"        \u0027raw_request_spec\u0027: request_spec,"},{"line_number":161,"context_line":"        \u0027filter_properties\u0027: filter_properties,"},{"line_number":162,"context_line":"        \u0027volume_id\u0027: volume.id,"},{"line_number":163,"context_line":"        \u0027snapshot_id\u0027: snapshot_id,"},{"line_number":164,"context_line":"        \u0027image_id\u0027: image_id,"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba3cc151_441ee95f","line":161,"updated":"2015-07-09 11:50:18.000000000","message":"I hope that there is no possibilities to call this method without forwarding volume. Because without this will be have not handled exception.","commit_id":"6e50dd84cd2bffd080b4d05815c7c7193f4f780b"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"040f3e5f5d5bcce70f0692aaa3662fe155cc25d7","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            raise exception.InvalidInput("},{"line_number":55,"context_line":"                reason\u003d_(\"No volume_id provided to populate a \""},{"line_number":56,"context_line":"                         \"request_spec from\"))"},{"line_number":57,"context_line":"        volume_ref \u003d objects.Volume.get_by_id(context, volume_id)"},{"line_number":58,"context_line":"        volume_type_id \u003d volume_ref.volume_type_id"},{"line_number":59,"context_line":"        vol_type \u003d volume_ref.volume_type"},{"line_number":60,"context_line":"        return {"}],"source_content_type":"text/x-python","patch_set":84,"id":"da20952f_1a4a6255","line":57,"updated":"2015-09-01 12:47:36.000000000","message":"I don\u0027t get that - we\u0027re passing an object into the flow (#147), then save just the id into flow\u0027s storage (#162), and here we\u0027re getting it from the DB using same ID again.\n\nI think you should save object into flow\u0027s storage in 162 and use it here. That should be possible, as I don\u0027t think that there\u0027s any limitation to what we can save into flow\u0027s storage, but I may be mistaken.","commit_id":"d5e7340e8616973c0c9ec55ee0a6471aa2401666"}],"cinder/scheduler/manager.py":[{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"f88d914230c646babe323cc66ac8e4126a5150ea","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        except Exception as ex:"},{"line_number":172,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":173,"context_line":"                _migrate_volume_set_error(self, context, ex, request_spec)"},{"line_number":174,"context_line":"        else:"},{"line_number":175,"context_line":"            volume_ref \u003d db.volume_get(context, volume_id)"},{"line_number":176,"context_line":"            volume_rpcapi.VolumeAPI().migrate_volume(context, volume_ref,"},{"line_number":177,"context_line":"                                                     tgt_host,"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba3cc151_04754162","line":174,"updated":"2015-07-09 11:50:18.000000000","message":"switch over object?","commit_id":"6e50dd84cd2bffd080b4d05815c7c7193f4f780b"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"4b99afe09e38924895832569696ee57cb82eac1b","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        except Exception as ex:"},{"line_number":172,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":173,"context_line":"                _migrate_volume_set_error(self, context, ex, request_spec)"},{"line_number":174,"context_line":"        else:"},{"line_number":175,"context_line":"            volume_ref \u003d db.volume_get(context, volume_id)"},{"line_number":176,"context_line":"            volume_rpcapi.VolumeAPI().migrate_volume(context, volume_ref,"},{"line_number":177,"context_line":"                                                     tgt_host,"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba3cc151_e7e5b8a3","line":174,"in_reply_to":"ba3cc151_04754162","updated":"2015-07-09 13:34:31.000000000","message":"See commit message.","commit_id":"6e50dd84cd2bffd080b4d05815c7c7193f4f780b"},{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"f88d914230c646babe323cc66ac8e4126a5150ea","unresolved":false,"context_lines":[{"line_number":193,"context_line":"        def _retype_volume_set_error(self, context, ex, request_spec,"},{"line_number":194,"context_line":"                                     volume_ref, msg, reservations):"},{"line_number":195,"context_line":"            if reservations:"},{"line_number":196,"context_line":"                QUOTAS.rollback(context, reservations)"},{"line_number":197,"context_line":"            if (volume_ref[\u0027volume_attachment\u0027] is None or"},{"line_number":198,"context_line":"               len(volume_ref[\u0027volume_attachment\u0027]) \u003d\u003d 0):"},{"line_number":199,"context_line":"                orig_status \u003d \u0027available\u0027"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba3cc151_44aee981","line":196,"updated":"2015-07-09 11:50:18.000000000","message":"volume_ref.volume_attachment","commit_id":"6e50dd84cd2bffd080b4d05815c7c7193f4f780b"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"4b99afe09e38924895832569696ee57cb82eac1b","unresolved":false,"context_lines":[{"line_number":193,"context_line":"        def _retype_volume_set_error(self, context, ex, request_spec,"},{"line_number":194,"context_line":"                                     volume_ref, msg, reservations):"},{"line_number":195,"context_line":"            if reservations:"},{"line_number":196,"context_line":"                QUOTAS.rollback(context, reservations)"},{"line_number":197,"context_line":"            if (volume_ref[\u0027volume_attachment\u0027] is None or"},{"line_number":198,"context_line":"               len(volume_ref[\u0027volume_attachment\u0027]) \u003d\u003d 0):"},{"line_number":199,"context_line":"                orig_status \u003d \u0027available\u0027"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba3cc151_07d21cd1","line":196,"in_reply_to":"ba3cc151_44aee981","updated":"2015-07-09 13:34:31.000000000","message":"Please see the commit message - \"There are db.volume_get, db.volume_update, and db.volume_destroy calls still left in the cinder\ncode base that need to be switched over to oslo_versionedobjects, but these calls are in other volume APIs, e.g. retype.  Changing them in this\npatch would make this patch even larger and harder to review.\"","commit_id":"6e50dd84cd2bffd080b4d05815c7c7193f4f780b"},{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"f88d914230c646babe323cc66ac8e4126a5150ea","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                                     volume_ref, msg, reservations):"},{"line_number":195,"context_line":"            if reservations:"},{"line_number":196,"context_line":"                QUOTAS.rollback(context, reservations)"},{"line_number":197,"context_line":"            if (volume_ref[\u0027volume_attachment\u0027] is None or"},{"line_number":198,"context_line":"               len(volume_ref[\u0027volume_attachment\u0027]) \u003d\u003d 0):"},{"line_number":199,"context_line":"                orig_status \u003d \u0027available\u0027"},{"line_number":200,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba3cc151_e4bdbdb1","line":197,"updated":"2015-07-09 11:50:18.000000000","message":"volume_ref.volume_attachment","commit_id":"6e50dd84cd2bffd080b4d05815c7c7193f4f780b"},{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"f88d914230c646babe323cc66ac8e4126a5150ea","unresolved":false,"context_lines":[{"line_number":202,"context_line":"            volume_state \u003d {\u0027volume_state\u0027: {\u0027status\u0027: orig_status}}"},{"line_number":203,"context_line":"            self._set_volume_state_and_notify(\u0027retype\u0027, volume_state,"},{"line_number":204,"context_line":"                                              context, ex, request_spec, msg)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"        volume_ref \u003d db.volume_get(context, volume_id)"},{"line_number":207,"context_line":"        reservations \u003d request_spec.get(\u0027quota_reservations\u0027)"},{"line_number":208,"context_line":"        new_type \u003d request_spec.get(\u0027volume_type\u0027)"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba3cc151_04a6a1ad","line":205,"updated":"2015-07-09 11:50:18.000000000","message":"You can use object here","commit_id":"6e50dd84cd2bffd080b4d05815c7c7193f4f780b"},{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"f88d914230c646babe323cc66ac8e4126a5150ea","unresolved":false,"context_lines":[{"line_number":246,"context_line":"            volume_state \u003d {\u0027volume_state\u0027: {\u0027status\u0027: \u0027error\u0027}}"},{"line_number":247,"context_line":"            self._set_volume_state_and_notify(\u0027manage_existing\u0027, volume_state,"},{"line_number":248,"context_line":"                                              context, ex, request_spec)"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"        volume_ref \u003d db.volume_get(context, volume_id)"},{"line_number":251,"context_line":"        try:"},{"line_number":252,"context_line":"            self.driver.host_passes_filters(context,"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba3cc151_f7e9ede6","line":249,"updated":"2015-07-09 11:50:18.000000000","message":"same here","commit_id":"6e50dd84cd2bffd080b4d05815c7c7193f4f780b"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"4b99afe09e38924895832569696ee57cb82eac1b","unresolved":false,"context_lines":[{"line_number":246,"context_line":"            volume_state \u003d {\u0027volume_state\u0027: {\u0027status\u0027: \u0027error\u0027}}"},{"line_number":247,"context_line":"            self._set_volume_state_and_notify(\u0027manage_existing\u0027, volume_state,"},{"line_number":248,"context_line":"                                              context, ex, request_spec)"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"        volume_ref \u003d db.volume_get(context, volume_id)"},{"line_number":251,"context_line":"        try:"},{"line_number":252,"context_line":"            self.driver.host_passes_filters(context,"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba3cc151_87de2cd8","line":249,"in_reply_to":"ba3cc151_f7e9ede6","updated":"2015-07-09 13:34:31.000000000","message":"Ditto","commit_id":"6e50dd84cd2bffd080b4d05815c7c7193f4f780b"},{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"f88d914230c646babe323cc66ac8e4126a5150ea","unresolved":false,"context_lines":[{"line_number":249,"context_line":""},{"line_number":250,"context_line":"        volume_ref \u003d db.volume_get(context, volume_id)"},{"line_number":251,"context_line":"        try:"},{"line_number":252,"context_line":"            self.driver.host_passes_filters(context,"},{"line_number":253,"context_line":"                                            volume_ref[\u0027host\u0027],"},{"line_number":254,"context_line":"                                            request_spec,"},{"line_number":255,"context_line":"                                            filter_properties)"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba3cc151_978d0133","line":252,"updated":"2015-07-09 11:50:18.000000000","message":"volume_ref.host","commit_id":"6e50dd84cd2bffd080b4d05815c7c7193f4f780b"},{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"f88d914230c646babe323cc66ac8e4126a5150ea","unresolved":false,"context_lines":[{"line_number":284,"context_line":""},{"line_number":285,"context_line":"        volume_id \u003d request_spec.get(\u0027volume_id\u0027, None)"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"        if volume_id:"},{"line_number":288,"context_line":"            db.volume_update(context, volume_id, volume_state)"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"        payload \u003d dict(request_spec\u003drequest_spec,"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba3cc151_977e61e2","line":287,"updated":"2015-07-09 11:50:18.000000000","message":"object?","commit_id":"6e50dd84cd2bffd080b4d05815c7c7193f4f780b"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"4b99afe09e38924895832569696ee57cb82eac1b","unresolved":false,"context_lines":[{"line_number":284,"context_line":""},{"line_number":285,"context_line":"        volume_id \u003d request_spec.get(\u0027volume_id\u0027, None)"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"        if volume_id:"},{"line_number":288,"context_line":"            db.volume_update(context, volume_id, volume_state)"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"        payload \u003d dict(request_spec\u003drequest_spec,"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba3cc151_87706c09","line":287,"in_reply_to":"ba3cc151_977e61e2","updated":"2015-07-09 13:34:31.000000000","message":"No, it is part of request_spec.","commit_id":"6e50dd84cd2bffd080b4d05815c7c7193f4f780b"}],"cinder/scheduler/rpcapi.py":[{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"d758407f41d89cd46f39afe56d50eecc4cf5d498","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        return cctxt.cast(ctxt, \u0027create_volume\u0027,"},{"line_number":80,"context_line":"                          topic\u003dtopic,"},{"line_number":81,"context_line":"                          volume\u003dvolume,"},{"line_number":82,"context_line":"                          snapshot_id\u003dsnapshot_id,"},{"line_number":83,"context_line":"                          image_id\u003dimage_id,"},{"line_number":84,"context_line":"                          request_spec\u003drequest_spec_p,"},{"line_number":85,"context_line":"                          filter_properties\u003dfilter_properties)"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_40036a10","line":82,"updated":"2015-07-08 16:09:48.000000000","message":"Can we use volume.snapshot_id instead of forwarding snapshot_id as extra args?","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"13287c5c2ed0d04aa418e3cb9615d2bfbabda7a6","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        return cctxt.cast(ctxt, \u0027create_volume\u0027,"},{"line_number":80,"context_line":"                          topic\u003dtopic,"},{"line_number":81,"context_line":"                          volume\u003dvolume,"},{"line_number":82,"context_line":"                          snapshot_id\u003dsnapshot_id,"},{"line_number":83,"context_line":"                          image_id\u003dimage_id,"},{"line_number":84,"context_line":"                          request_spec\u003drequest_spec_p,"},{"line_number":85,"context_line":"                          filter_properties\u003dfilter_properties)"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_a90a5e1e","line":82,"in_reply_to":"ba3cc151_40036a10","updated":"2015-07-08 16:37:17.000000000","message":"No, because you could be creating a volume from a snapshot (of a different volume).","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"},{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"c88a249e7a4ada6fd136274175e6d3ed34b4d4f3","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                      image_id\u003dNone, request_spec\u003dNone,"},{"line_number":75,"context_line":"                      filter_properties\u003dNone):"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        cctxt \u003d self.client.prepare(version\u003d\u00271.2\u0027)"},{"line_number":78,"context_line":"        request_spec_p \u003d jsonutils.to_primitive(request_spec)"},{"line_number":79,"context_line":"        return cctxt.cast(ctxt, \u0027create_volume\u0027,"},{"line_number":80,"context_line":"                          topic\u003dtopic,"}],"source_content_type":"text/x-python","patch_set":57,"id":"3a50d1a3_50092e2b","line":77,"updated":"2015-07-27 14:21:07.000000000","message":"You should change version.","commit_id":"e364de98fc7f29b90213ef9f8479cde4562762c6"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"c705380384e825e2352868428046a4c9f47e9d9b","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                      image_id\u003dNone, request_spec\u003dNone,"},{"line_number":75,"context_line":"                      filter_properties\u003dNone):"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        cctxt \u003d self.client.prepare(version\u003d\u00271.2\u0027)"},{"line_number":78,"context_line":"        request_spec_p \u003d jsonutils.to_primitive(request_spec)"},{"line_number":79,"context_line":"        return cctxt.cast(ctxt, \u0027create_volume\u0027,"},{"line_number":80,"context_line":"                          topic\u003dtopic,"}],"source_content_type":"text/x-python","patch_set":57,"id":"3a50d1a3_d94489b8","line":77,"in_reply_to":"3a50d1a3_50092e2b","updated":"2015-07-27 15:21:10.000000000","message":"Done","commit_id":"e364de98fc7f29b90213ef9f8479cde4562762c6"}],"cinder/tests/unit/api/contrib/test_admin_actions.py":[{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"ebfcfe6e7605305c05dd153e30e89c2e40652b3e","unresolved":false,"context_lines":[{"line_number":450,"context_line":"        self.assertEqual(attachment[\u0027mountpoint\u0027], mountpoint)"},{"line_number":451,"context_line":"        self.assertEqual(\u0027attached\u0027, attachment[\u0027attach_status\u0027])"},{"line_number":452,"context_line":"        admin_metadata \u003d volume.admin_metadata"},{"line_number":453,"context_line":"        self.assertEqual(len(admin_metadata), 2)"},{"line_number":454,"context_line":"        self.assertEqual(\u0027False\u0027, admin_metadata[\u0027readonly\u0027])"},{"line_number":455,"context_line":"        self.assertEqual(\u0027rw\u0027, admin_metadata[\u0027attached_mode\u0027])"},{"line_number":456,"context_line":"        conn_info \u003d self.volume_api.initialize_connection(ctx,"}],"source_content_type":"text/x-python","patch_set":63,"id":"1a4dcd0f_75e39ed9","line":453,"updated":"2015-08-06 21:21:07.000000000","message":"Argument order should be (expected, actual). 2 should come first.","commit_id":"5646304a6f9a3aa3e9640b0755e832c77f77b767"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"ebfcfe6e7605305c05dd153e30e89c2e40652b3e","unresolved":false,"context_lines":[{"line_number":507,"context_line":"        self.assertEqual(attachment[\u0027mountpoint\u0027], mountpoint)"},{"line_number":508,"context_line":"        self.assertEqual(\u0027attached\u0027, attachment[\u0027attach_status\u0027])"},{"line_number":509,"context_line":"        admin_metadata \u003d volume.admin_metadata"},{"line_number":510,"context_line":"        self.assertEqual(len(admin_metadata), 2)"},{"line_number":511,"context_line":"        self.assertEqual(\u0027False\u0027, admin_metadata[\u0027readonly\u0027])"},{"line_number":512,"context_line":"        self.assertEqual(\u0027ro\u0027, admin_metadata[\u0027attached_mode\u0027])"},{"line_number":513,"context_line":"        conn_info \u003d self.volume_api.initialize_connection(ctx,"}],"source_content_type":"text/x-python","patch_set":63,"id":"1a4dcd0f_f5f6ce8d","line":510,"updated":"2015-08-06 21:21:07.000000000","message":"Argument order should be (expected, actual).","commit_id":"5646304a6f9a3aa3e9640b0755e832c77f77b767"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"ebfcfe6e7605305c05dd153e30e89c2e40652b3e","unresolved":false,"context_lines":[{"line_number":533,"context_line":"        # status changed to \u0027available\u0027"},{"line_number":534,"context_line":"        self.assertEqual(\u0027available\u0027, volume.status)"},{"line_number":535,"context_line":"        admin_metadata \u003d volume.admin_metadata"},{"line_number":536,"context_line":"        self.assertEqual(len(admin_metadata), 1)"},{"line_number":537,"context_line":"        self.assertEqual(\u0027False\u0027, admin_metadata[\u0027readonly\u0027])"},{"line_number":538,"context_line":"        # cleanup"},{"line_number":539,"context_line":"        svc.stop()"}],"source_content_type":"text/x-python","patch_set":63,"id":"1a4dcd0f_b5ecc6bb","line":536,"updated":"2015-08-06 21:21:07.000000000","message":"Argument order should be (expected, actual).","commit_id":"5646304a6f9a3aa3e9640b0755e832c77f77b767"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"ebfcfe6e7605305c05dd153e30e89c2e40652b3e","unresolved":false,"context_lines":[{"line_number":559,"context_line":"        # volume is attached"},{"line_number":560,"context_line":"        volume.refresh()"},{"line_number":561,"context_line":"        self.assertEqual(\u0027in-use\u0027, volume.status)"},{"line_number":562,"context_line":"        self.assertEqual(attachment[\u0027instance_uuid\u0027], stubs.FAKE_UUID)"},{"line_number":563,"context_line":"        self.assertEqual(attachment[\u0027mountpoint\u0027], mountpoint)"},{"line_number":564,"context_line":"        self.assertEqual(\u0027attached\u0027, attachment[\u0027attach_status\u0027])"},{"line_number":565,"context_line":"        admin_metadata \u003d volume.admin_metadata"}],"source_content_type":"text/x-python","patch_set":63,"id":"1a4dcd0f_350e768c","line":562,"updated":"2015-08-06 21:21:07.000000000","message":"Argument order should be (expected, actual).","commit_id":"5646304a6f9a3aa3e9640b0755e832c77f77b767"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"ebfcfe6e7605305c05dd153e30e89c2e40652b3e","unresolved":false,"context_lines":[{"line_number":563,"context_line":"        self.assertEqual(attachment[\u0027mountpoint\u0027], mountpoint)"},{"line_number":564,"context_line":"        self.assertEqual(\u0027attached\u0027, attachment[\u0027attach_status\u0027])"},{"line_number":565,"context_line":"        admin_metadata \u003d volume.admin_metadata"},{"line_number":566,"context_line":"        self.assertEqual(len(admin_metadata), 2)"},{"line_number":567,"context_line":"        self.assertEqual(\u0027False\u0027, admin_metadata[\u0027readonly\u0027])"},{"line_number":568,"context_line":"        self.assertEqual(\u0027rw\u0027, admin_metadata[\u0027attached_mode\u0027])"},{"line_number":569,"context_line":"        conn_info \u003d self.volume_api.initialize_connection(ctx,"}],"source_content_type":"text/x-python","patch_set":63,"id":"1a4dcd0f_3537564e","line":566,"updated":"2015-08-06 21:21:07.000000000","message":"Argument order should be (expected, actual).","commit_id":"5646304a6f9a3aa3e9640b0755e832c77f77b767"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"ebfcfe6e7605305c05dd153e30e89c2e40652b3e","unresolved":false,"context_lines":[{"line_number":611,"context_line":"        # volume is attached"},{"line_number":612,"context_line":"        volume.refresh()"},{"line_number":613,"context_line":"        self.assertEqual(\u0027in-use\u0027, volume.status)"},{"line_number":614,"context_line":"        self.assertEqual(attachment[\u0027instance_uuid\u0027], stubs.FAKE_UUID)"},{"line_number":615,"context_line":"        self.assertEqual(attachment[\u0027mountpoint\u0027], mountpoint)"},{"line_number":616,"context_line":"        self.assertEqual(\u0027attached\u0027, attachment[\u0027attach_status\u0027])"},{"line_number":617,"context_line":"        admin_metadata \u003d volume.admin_metadata"}],"source_content_type":"text/x-python","patch_set":63,"id":"1a4dcd0f_557c62eb","line":614,"updated":"2015-08-06 21:21:07.000000000","message":"Argument order should be (expected, actual).","commit_id":"5646304a6f9a3aa3e9640b0755e832c77f77b767"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"ebfcfe6e7605305c05dd153e30e89c2e40652b3e","unresolved":false,"context_lines":[{"line_number":615,"context_line":"        self.assertEqual(attachment[\u0027mountpoint\u0027], mountpoint)"},{"line_number":616,"context_line":"        self.assertEqual(\u0027attached\u0027, attachment[\u0027attach_status\u0027])"},{"line_number":617,"context_line":"        admin_metadata \u003d volume.admin_metadata"},{"line_number":618,"context_line":"        self.assertEqual(len(admin_metadata), 2)"},{"line_number":619,"context_line":"        self.assertEqual(\u0027False\u0027, admin_metadata[\u0027readonly\u0027])"},{"line_number":620,"context_line":"        self.assertEqual(\u0027rw\u0027, admin_metadata[\u0027attached_mode\u0027])"},{"line_number":621,"context_line":"        conn_info \u003d self.volume_api.initialize_connection(ctx,"}],"source_content_type":"text/x-python","patch_set":63,"id":"1a4dcd0f_15825ac8","line":618,"updated":"2015-08-06 21:21:07.000000000","message":"Argument order should be (expected, actual).","commit_id":"5646304a6f9a3aa3e9640b0755e832c77f77b767"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"67fe28a0c7c30ba1c74fcd07285ba93033f0a3dc","unresolved":false,"context_lines":[{"line_number":446,"context_line":"        # volume is attached"},{"line_number":447,"context_line":"        volume.refresh()"},{"line_number":448,"context_line":"        self.assertEqual(\u0027in-use\u0027, volume.status)"},{"line_number":449,"context_line":"        self.assertEqual(stubs.FAKE_UUID, attachment[\u0027instance_uuid\u0027])"},{"line_number":450,"context_line":"        self.assertEqual(mountpoint, attachment[\u0027mountpoint\u0027])"},{"line_number":451,"context_line":"        self.assertEqual(\u0027attached\u0027, attachment[\u0027attach_status\u0027])"},{"line_number":452,"context_line":"        admin_metadata \u003d volume.admin_metadata"}],"source_content_type":"text/x-python","patch_set":69,"id":"1a4dcd0f_32975f3b","line":449,"updated":"2015-08-13 03:15:33.000000000","message":"Are you planning to change attachment too?","commit_id":"d023ab2b45249709eaf60d6eb3ba32b663c9d55a"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"dc9b785e2382271d462b50fdc505dcf2325e254b","unresolved":false,"context_lines":[{"line_number":446,"context_line":"        # volume is attached"},{"line_number":447,"context_line":"        volume.refresh()"},{"line_number":448,"context_line":"        self.assertEqual(\u0027in-use\u0027, volume.status)"},{"line_number":449,"context_line":"        self.assertEqual(stubs.FAKE_UUID, attachment[\u0027instance_uuid\u0027])"},{"line_number":450,"context_line":"        self.assertEqual(mountpoint, attachment[\u0027mountpoint\u0027])"},{"line_number":451,"context_line":"        self.assertEqual(\u0027attached\u0027, attachment[\u0027attach_status\u0027])"},{"line_number":452,"context_line":"        admin_metadata \u003d volume.admin_metadata"}],"source_content_type":"text/x-python","patch_set":69,"id":"1a4dcd0f_96796784","line":449,"in_reply_to":"1a4dcd0f_32975f3b","updated":"2015-08-13 15:08:15.000000000","message":"Yes, when we have converted over volume_attachment to use oslo_versionedobjects.","commit_id":"d023ab2b45249709eaf60d6eb3ba32b663c9d55a"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"28df3a02215d3b0f06ae33e2cf25a787f357bb7e","unresolved":false,"context_lines":[{"line_number":386,"context_line":"        # request is accepted"},{"line_number":387,"context_line":"        self.assertEqual(202, resp.status_int)"},{"line_number":388,"context_line":"        # volume is deleted"},{"line_number":389,"context_line":"        self.assertRaises(exception.NotFound, db.volume_get, ctx, volume[\u0027id\u0027])"},{"line_number":390,"context_line":""},{"line_number":391,"context_line":"    @mock.patch.object(volume_api.API, \u0027delete_snapshot\u0027, return_value\u003dTrue)"},{"line_number":392,"context_line":"    @mock.patch(\u0027cinder.objects.Snapshot.get_by_id\u0027)"}],"source_content_type":"text/x-python","patch_set":107,"id":"fa80f949_d1d20900","side":"PARENT","line":389,"updated":"2015-11-05 19:48:04.000000000","message":"Shouldn\u0027t we try to mimic that with objects?","commit_id":"029db13351b0dcd325015882032866e879957552"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"158fa7675f948aea28f937b59b4907c0c0e2a6f2","unresolved":false,"context_lines":[{"line_number":386,"context_line":"        # request is accepted"},{"line_number":387,"context_line":"        self.assertEqual(202, resp.status_int)"},{"line_number":388,"context_line":"        # volume is deleted"},{"line_number":389,"context_line":"        self.assertRaises(exception.NotFound, db.volume_get, ctx, volume[\u0027id\u0027])"},{"line_number":390,"context_line":""},{"line_number":391,"context_line":"    @mock.patch.object(volume_api.API, \u0027delete_snapshot\u0027, return_value\u003dTrue)"},{"line_number":392,"context_line":"    @mock.patch(\u0027cinder.objects.Snapshot.get_by_id\u0027)"}],"source_content_type":"text/x-python","patch_set":107,"id":"fa80f949_38678d4e","side":"PARENT","line":389,"in_reply_to":"fa80f949_d1d20900","updated":"2015-11-06 17:03:14.000000000","message":"Sure.","commit_id":"029db13351b0dcd325015882032866e879957552"}],"cinder/tests/unit/api/contrib/test_volume_actions.py":[{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"f9fef16e04b17723571114804e0b9ae66b03da92","unresolved":false,"context_lines":[{"line_number":853,"context_line":"                                \u0027id\u0027: id,"},{"line_number":854,"context_line":"                                \u0027updated_at\u0027: datetime.datetime("},{"line_number":855,"context_line":"                                    1900, 1, 1, 1, 1, 1,"},{"line_number":856,"context_line":"                                    tzinfo\u003diso8601.iso8601.Utc()),"},{"line_number":857,"context_line":"                                \u0027status\u0027: \u0027uploading\u0027,"},{"line_number":858,"context_line":"                                \u0027display_description\u0027: \u0027displaydesc\u0027,"},{"line_number":859,"context_line":"                                \u0027size\u0027: 1,"}],"source_content_type":"text/x-python","patch_set":109,"id":"da85f559_9894278b","line":856,"updated":"2015-11-12 16:37:28.000000000","message":"I think oslo_utils.timeutils has a method that could probably be used here (though I could be wrong).","commit_id":"dabc7dedbb367b2eddf8db24bec6a91174d4245e"}],"cinder/tests/unit/api/v1/test_volumes.py":[{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"ebfcfe6e7605305c05dd153e30e89c2e40652b3e","unresolved":false,"context_lines":[{"line_number":662,"context_line":"            res_dict \u003d self.controller.index(req)"},{"line_number":663,"context_line":"            volumes \u003d res_dict[\u0027volumes\u0027]"},{"line_number":664,"context_line":"            self.assertEqual(len(volumes), 1)"},{"line_number":665,"context_line":"            self.assertEqual(volumes[0][\u0027id\u0027], \u00272\u0027)"},{"line_number":666,"context_line":""},{"line_number":667,"context_line":"        # admin case"},{"line_number":668,"context_line":"        volume_detail_limit_offset(is_admin\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":63,"id":"1a4dcd0f_d5b39296","line":665,"updated":"2015-08-06 21:21:07.000000000","message":"Argument order should be (expected, actual).","commit_id":"5646304a6f9a3aa3e9640b0755e832c77f77b767"}],"cinder/tests/unit/api/v2/test_volumes.py":[{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"f301afc6453448f7c46ed7ac85d257492e393996","unresolved":false,"context_lines":[{"line_number":166,"context_line":"                 \u0027bootable\u0027: \u0027false\u0027,"},{"line_number":167,"context_line":"                 \u0027consistencygroup_id\u0027: consistencygroup_id,"},{"line_number":168,"context_line":"                 \u0027created_at\u0027: datetime.datetime("},{"line_number":169,"context_line":"                    1900, 1, 1, 1, 1, 1, tzinfo\u003diso8601.iso8601.Utc()),"},{"line_number":170,"context_line":"                 \u0027description\u0027: description,"},{"line_number":171,"context_line":"                 \u0027id\u0027: stubs.DEFAULT_VOL_ID,"},{"line_number":172,"context_line":"                 \u0027links\u0027:"}],"source_content_type":"text/x-python","patch_set":62,"id":"1a4dcd0f_03479b77","line":169,"updated":"2015-08-06 13:57:07.000000000","message":"There you missed 1 whitespace ;)","commit_id":"9160a338212ccacac05110f505bb59e07164ba3d"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"acb231c7949e6fc888f0b0113b2b1ed99b69c781","unresolved":false,"context_lines":[{"line_number":166,"context_line":"                 \u0027bootable\u0027: \u0027false\u0027,"},{"line_number":167,"context_line":"                 \u0027consistencygroup_id\u0027: consistencygroup_id,"},{"line_number":168,"context_line":"                 \u0027created_at\u0027: datetime.datetime("},{"line_number":169,"context_line":"                    1900, 1, 1, 1, 1, 1, tzinfo\u003diso8601.iso8601.Utc()),"},{"line_number":170,"context_line":"                 \u0027description\u0027: description,"},{"line_number":171,"context_line":"                 \u0027id\u0027: stubs.DEFAULT_VOL_ID,"},{"line_number":172,"context_line":"                 \u0027links\u0027:"}],"source_content_type":"text/x-python","patch_set":62,"id":"1a4dcd0f_5e5336e2","line":169,"in_reply_to":"1a4dcd0f_03479b77","updated":"2015-08-06 14:03:47.000000000","message":"Thanks!","commit_id":"9160a338212ccacac05110f505bb59e07164ba3d"}],"cinder/tests/unit/test_rbd.py":[{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"ebfcfe6e7605305c05dd153e30e89c2e40652b3e","unresolved":false,"context_lines":[{"line_number":1094,"context_line":"                                  request_spec\u003d{\u0027image_id\u0027: image_id})"},{"line_number":1095,"context_line":""},{"line_number":1096,"context_line":"            volume.refresh()"},{"line_number":1097,"context_line":"            self.assertEqual(volume.status, expected_status)"},{"line_number":1098,"context_line":"        finally:"},{"line_number":1099,"context_line":"            # cleanup"},{"line_number":1100,"context_line":"            volume.destroy()"}],"source_content_type":"text/x-python","patch_set":63,"id":"1a4dcd0f_5802570b","line":1097,"updated":"2015-08-06 21:21:07.000000000","message":"Argument order should be (expected, actual).","commit_id":"5646304a6f9a3aa3e9640b0755e832c77f77b767"}],"cinder/tests/unit/test_volume_rpcapi.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"28df3a02215d3b0f06ae33e2cf25a787f357bb7e","unresolved":false,"context_lines":[{"line_number":288,"context_line":"                              rpc_method\u003d\u0027cast\u0027,"},{"line_number":289,"context_line":"                              volume\u003dself.fake_volume_obj,"},{"line_number":290,"context_line":"                              unmanage_only\u003dFalse,"},{"line_number":291,"context_line":"                              version\u003d\u00271.15\u0027)"},{"line_number":292,"context_line":"        can_send_version.assert_called_once_with(\u00271.33\u0027)"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    def test_create_snapshot(self):"}],"source_content_type":"text/x-python","patch_set":107,"id":"fa80f949_345b4330","line":291,"updated":"2015-11-05 19:48:04.000000000","message":"It would be cool to check if we\u0027re not sending volume parameter in this case, but I don\u0027t see easy way to do that. These tests need serious refactoring…","commit_id":"a378063a79859a990260e0b2c78c9e62810fe500"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"158fa7675f948aea28f937b59b4907c0c0e2a6f2","unresolved":false,"context_lines":[{"line_number":288,"context_line":"                              rpc_method\u003d\u0027cast\u0027,"},{"line_number":289,"context_line":"                              volume\u003dself.fake_volume_obj,"},{"line_number":290,"context_line":"                              unmanage_only\u003dFalse,"},{"line_number":291,"context_line":"                              version\u003d\u00271.15\u0027)"},{"line_number":292,"context_line":"        can_send_version.assert_called_once_with(\u00271.33\u0027)"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    def test_create_snapshot(self):"}],"source_content_type":"text/x-python","patch_set":107,"id":"fa80f949_476ab082","line":291,"in_reply_to":"fa80f949_345b4330","updated":"2015-11-06 17:03:14.000000000","message":"Agree.  It should be a separate patch/effort.","commit_id":"a378063a79859a990260e0b2c78c9e62810fe500"}],"cinder/tests/unit/test_volume_transfer.py":[{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"ebfcfe6e7605305c05dd153e30e89c2e40652b3e","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                                 transfer[\u0027id\u0027],"},{"line_number":106,"context_line":"                                 transfer[\u0027auth_key\u0027])"},{"line_number":107,"context_line":"        volume.refresh()"},{"line_number":108,"context_line":"        self.assertEqual(volume.project_id, \u0027new_project_id\u0027,"},{"line_number":109,"context_line":"                         \u0027Unexpected project id\u0027)"},{"line_number":110,"context_line":"        self.assertEqual(volume.user_id, \u0027new_user_id\u0027,"},{"line_number":111,"context_line":"                         \u0027Unexpected user id\u0027)"}],"source_content_type":"text/x-python","patch_set":63,"id":"1a4dcd0f_b8b35b4c","line":108,"updated":"2015-08-06 21:21:07.000000000","message":"Argument order should be (expected, actual).","commit_id":"5646304a6f9a3aa3e9640b0755e832c77f77b767"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"ebfcfe6e7605305c05dd153e30e89c2e40652b3e","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        volume.refresh()"},{"line_number":108,"context_line":"        self.assertEqual(volume.project_id, \u0027new_project_id\u0027,"},{"line_number":109,"context_line":"                         \u0027Unexpected project id\u0027)"},{"line_number":110,"context_line":"        self.assertEqual(volume.user_id, \u0027new_user_id\u0027,"},{"line_number":111,"context_line":"                         \u0027Unexpected user id\u0027)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        self.assertEqual(volume.id, response[\u0027volume_id\u0027],"}],"source_content_type":"text/x-python","patch_set":63,"id":"1a4dcd0f_58857757","line":110,"updated":"2015-08-06 21:21:07.000000000","message":"Argument order should be (expected, actual).","commit_id":"5646304a6f9a3aa3e9640b0755e832c77f77b767"}],"cinder/volume/api.py":[{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"d758407f41d89cd46f39afe56d50eecc4cf5d498","unresolved":false,"context_lines":[{"line_number":307,"context_line":"        else:"},{"line_number":308,"context_line":"            project_id \u003d context.project_id"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"        volume_id \u003d volume.id"},{"line_number":311,"context_line":"        if not volume.host:"},{"line_number":312,"context_line":"            volume_utils.notify_about_volume_usage(context,"},{"line_number":313,"context_line":"                                                   volume, \"delete.start\")"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_60ec6ebb","line":310,"updated":"2015-07-08 16:09:48.000000000","message":"I think that you don\u0027t need this line anymore","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"},{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"d758407f41d89cd46f39afe56d50eecc4cf5d498","unresolved":false,"context_lines":[{"line_number":555,"context_line":"        # If we are in the middle of a volume migration, we don\u0027t want the user"},{"line_number":556,"context_line":"        # to see that the volume is \u0027detaching\u0027. Having \u0027migration_status\u0027 set"},{"line_number":557,"context_line":"        # will have the same effect internally."},{"line_number":558,"context_line":"        if volume[\u0027migration_status\u0027]:"},{"line_number":559,"context_line":"            return"},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"        if (volume[\u0027status\u0027] !\u003d \u0027in-use\u0027 or"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_0027a2b6","line":558,"updated":"2015-07-08 16:09:48.000000000","message":"If you forward here object you should use objects notation instead of dict notation","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"13287c5c2ed0d04aa418e3cb9615d2bfbabda7a6","unresolved":false,"context_lines":[{"line_number":555,"context_line":"        # If we are in the middle of a volume migration, we don\u0027t want the user"},{"line_number":556,"context_line":"        # to see that the volume is \u0027detaching\u0027. Having \u0027migration_status\u0027 set"},{"line_number":557,"context_line":"        # will have the same effect internally."},{"line_number":558,"context_line":"        if volume[\u0027migration_status\u0027]:"},{"line_number":559,"context_line":"            return"},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"        if (volume[\u0027status\u0027] !\u003d \u0027in-use\u0027 or"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_493b92d1","line":558,"in_reply_to":"ba3cc151_0027a2b6","updated":"2015-07-08 16:37:17.000000000","message":"Correct.  It should be volume.migration_status.","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"},{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"d758407f41d89cd46f39afe56d50eecc4cf5d498","unresolved":false,"context_lines":[{"line_number":1468,"context_line":"        # accept the volume"},{"line_number":1469,"context_line":"        volume \u003d objects.Volume(context\u003dcontext, **volume_properties)"},{"line_number":1470,"context_line":"        volume.create()"},{"line_number":1471,"context_line":"        request_spec \u003d {\u0027volume_properties\u0027: volume,"},{"line_number":1472,"context_line":"                        \u0027volume_type\u0027: volume_type,"},{"line_number":1473,"context_line":"                        \u0027volume_id\u0027: volume[\u0027id\u0027],"},{"line_number":1474,"context_line":"                        \u0027ref\u0027: ref}"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_20a746be","line":1471,"updated":"2015-07-08 16:09:48.000000000","message":"use object notation instead of dict notation","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"13287c5c2ed0d04aa418e3cb9615d2bfbabda7a6","unresolved":false,"context_lines":[{"line_number":1468,"context_line":"        # accept the volume"},{"line_number":1469,"context_line":"        volume \u003d objects.Volume(context\u003dcontext, **volume_properties)"},{"line_number":1470,"context_line":"        volume.create()"},{"line_number":1471,"context_line":"        request_spec \u003d {\u0027volume_properties\u0027: volume,"},{"line_number":1472,"context_line":"                        \u0027volume_type\u0027: volume_type,"},{"line_number":1473,"context_line":"                        \u0027volume_id\u0027: volume[\u0027id\u0027],"},{"line_number":1474,"context_line":"                        \u0027ref\u0027: ref}"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_4942b23f","line":1471,"in_reply_to":"ba3cc151_20a746be","updated":"2015-07-08 16:37:17.000000000","message":"?  request_spec is suppose to be a dict","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"13287c5c2ed0d04aa418e3cb9615d2bfbabda7a6","unresolved":false,"context_lines":[{"line_number":1470,"context_line":"        volume.create()"},{"line_number":1471,"context_line":"        request_spec \u003d {\u0027volume_properties\u0027: volume,"},{"line_number":1472,"context_line":"                        \u0027volume_type\u0027: volume_type,"},{"line_number":1473,"context_line":"                        \u0027volume_id\u0027: volume[\u0027id\u0027],"},{"line_number":1474,"context_line":"                        \u0027ref\u0027: ref}"},{"line_number":1475,"context_line":"        self.scheduler_rpcapi.manage_existing(context, CONF.volume_topic,"},{"line_number":1476,"context_line":"                                              volume[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_c974829d","line":1473,"updated":"2015-07-08 16:37:17.000000000","message":"volume[\u0027id\u0027] should be changed to volume.id.","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"67fe28a0c7c30ba1c74fcd07285ba93033f0a3dc","unresolved":false,"context_lines":[{"line_number":488,"context_line":"        # so build the resource tag manually for now."},{"line_number":489,"context_line":"        LOG.info(_LI(\"Snapshot retrieved successfully.\"),"},{"line_number":490,"context_line":"                 resource\u003d{\u0027type\u0027: \u0027snapshot\u0027,"},{"line_number":491,"context_line":"                           \u0027id\u0027: snapshot[\u0027id\u0027]})"},{"line_number":492,"context_line":"        return snapshot"},{"line_number":493,"context_line":""},{"line_number":494,"context_line":"    def get_volume(self, context, volume_id):"}],"source_content_type":"text/x-python","patch_set":69,"id":"1a4dcd0f_f2dd77e0","line":491,"updated":"2015-08-13 03:15:33.000000000","message":"snapshot.id","commit_id":"d023ab2b45249709eaf60d6eb3ba32b663c9d55a"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"dc9b785e2382271d462b50fdc505dcf2325e254b","unresolved":false,"context_lines":[{"line_number":488,"context_line":"        # so build the resource tag manually for now."},{"line_number":489,"context_line":"        LOG.info(_LI(\"Snapshot retrieved successfully.\"),"},{"line_number":490,"context_line":"                 resource\u003d{\u0027type\u0027: \u0027snapshot\u0027,"},{"line_number":491,"context_line":"                           \u0027id\u0027: snapshot[\u0027id\u0027]})"},{"line_number":492,"context_line":"        return snapshot"},{"line_number":493,"context_line":""},{"line_number":494,"context_line":"    def get_volume(self, context, volume_id):"}],"source_content_type":"text/x-python","patch_set":69,"id":"1a4dcd0f_f63b0b9a","line":491,"in_reply_to":"1a4dcd0f_f2dd77e0","updated":"2015-08-13 15:08:15.000000000","message":"Done","commit_id":"d023ab2b45249709eaf60d6eb3ba32b663c9d55a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"67fe28a0c7c30ba1c74fcd07285ba93033f0a3dc","unresolved":false,"context_lines":[{"line_number":536,"context_line":""},{"line_number":537,"context_line":"    @wrap_check_policy"},{"line_number":538,"context_line":"    def unreserve_volume(self, context, volume):"},{"line_number":539,"context_line":"        if volume[\u0027status\u0027] \u003d\u003d \u0027attaching\u0027:"},{"line_number":540,"context_line":"            attaches \u003d self.db.volume_attachment_get_used_by_volume_id("},{"line_number":541,"context_line":"                context, volume[\u0027id\u0027])"},{"line_number":542,"context_line":"            if attaches:"}],"source_content_type":"text/x-python","patch_set":69,"id":"1a4dcd0f_32e67fb0","line":539,"updated":"2015-08-13 03:15:33.000000000","message":"Why isn\u0027t this changed to use object?","commit_id":"d023ab2b45249709eaf60d6eb3ba32b663c9d55a"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"dc9b785e2382271d462b50fdc505dcf2325e254b","unresolved":false,"context_lines":[{"line_number":536,"context_line":""},{"line_number":537,"context_line":"    @wrap_check_policy"},{"line_number":538,"context_line":"    def unreserve_volume(self, context, volume):"},{"line_number":539,"context_line":"        if volume[\u0027status\u0027] \u003d\u003d \u0027attaching\u0027:"},{"line_number":540,"context_line":"            attaches \u003d self.db.volume_attachment_get_used_by_volume_id("},{"line_number":541,"context_line":"                context, volume[\u0027id\u0027])"},{"line_number":542,"context_line":"            if attaches:"}],"source_content_type":"text/x-python","patch_set":69,"id":"1a4dcd0f_56e99fe4","line":539,"in_reply_to":"1a4dcd0f_32e67fb0","updated":"2015-08-13 15:08:15.000000000","message":"There is another patch that does this - https://review.openstack.org/201404.  I tried to limit this patch to the create, update, and delete volume APIs.  It was getting quite large because of the unit test changes, so I divided it up into a couple of patches.","commit_id":"d023ab2b45249709eaf60d6eb3ba32b663c9d55a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"67fe28a0c7c30ba1c74fcd07285ba93033f0a3dc","unresolved":false,"context_lines":[{"line_number":575,"context_line":""},{"line_number":576,"context_line":"    @wrap_check_policy"},{"line_number":577,"context_line":"    def roll_detaching(self, context, volume):"},{"line_number":578,"context_line":"        if volume[\u0027status\u0027] \u003d\u003d \"detaching\":"},{"line_number":579,"context_line":"            self.update(context, volume, {\"status\": \"in-use\"})"},{"line_number":580,"context_line":"        LOG.info(_LI(\"Roll detaching of volume completed successfully.\"),"},{"line_number":581,"context_line":"                 resource\u003dvolume)"}],"source_content_type":"text/x-python","patch_set":69,"id":"1a4dcd0f_b2fa8f41","line":578,"updated":"2015-08-13 03:15:33.000000000","message":"Object?","commit_id":"d023ab2b45249709eaf60d6eb3ba32b663c9d55a"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"dc9b785e2382271d462b50fdc505dcf2325e254b","unresolved":false,"context_lines":[{"line_number":575,"context_line":""},{"line_number":576,"context_line":"    @wrap_check_policy"},{"line_number":577,"context_line":"    def roll_detaching(self, context, volume):"},{"line_number":578,"context_line":"        if volume[\u0027status\u0027] \u003d\u003d \"detaching\":"},{"line_number":579,"context_line":"            self.update(context, volume, {\"status\": \"in-use\"})"},{"line_number":580,"context_line":"        LOG.info(_LI(\"Roll detaching of volume completed successfully.\"),"},{"line_number":581,"context_line":"                 resource\u003dvolume)"}],"source_content_type":"text/x-python","patch_set":69,"id":"1a4dcd0f_36c1734e","line":578,"in_reply_to":"1a4dcd0f_b2fa8f41","updated":"2015-08-13 15:08:15.000000000","message":"Separate patch.","commit_id":"d023ab2b45249709eaf60d6eb3ba32b663c9d55a"}],"cinder/volume/flows/api/create_volume.py":[{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"d758407f41d89cd46f39afe56d50eecc4cf5d498","unresolved":false,"context_lines":[{"line_number":462,"context_line":"        volume.create()"},{"line_number":463,"context_line":""},{"line_number":464,"context_line":"        return {"},{"line_number":465,"context_line":"            \u0027volume_id\u0027: volume[\u0027id\u0027],"},{"line_number":466,"context_line":"            \u0027volume_properties\u0027: volume_properties,"},{"line_number":467,"context_line":"            # NOTE(harlowja): it appears like further usage of this volume"},{"line_number":468,"context_line":"            # result actually depend on it being a sqlalchemy object and not"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_0061e238","line":465,"updated":"2015-07-08 16:09:48.000000000","message":"volume.id","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"13287c5c2ed0d04aa418e3cb9615d2bfbabda7a6","unresolved":false,"context_lines":[{"line_number":462,"context_line":"        volume.create()"},{"line_number":463,"context_line":""},{"line_number":464,"context_line":"        return {"},{"line_number":465,"context_line":"            \u0027volume_id\u0027: volume[\u0027id\u0027],"},{"line_number":466,"context_line":"            \u0027volume_properties\u0027: volume_properties,"},{"line_number":467,"context_line":"            # NOTE(harlowja): it appears like further usage of this volume"},{"line_number":468,"context_line":"            # result actually depend on it being a sqlalchemy object and not"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_696696ee","line":465,"in_reply_to":"ba3cc151_0061e238","updated":"2015-07-08 16:37:17.000000000","message":"Done","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"040f3e5f5d5bcce70f0692aaa3662fe155cc25d7","unresolved":false,"context_lines":[{"line_number":684,"context_line":"        host \u003d None"},{"line_number":685,"context_line":"        cgsnapshot_id \u003d request_spec[\u0027cgsnapshot_id\u0027]"},{"line_number":686,"context_line":""},{"line_number":687,"context_line":"        volume \u003d objects.Volume.get_by_id(context, volume_id)"},{"line_number":688,"context_line":""},{"line_number":689,"context_line":"        if cgroup_id:"},{"line_number":690,"context_line":"            cgroup \u003d objects.ConsistencyGroup.get_by_id(context, cgroup_id)"}],"source_content_type":"text/x-python","patch_set":84,"id":"da20952f_987afa75","line":687,"updated":"2015-09-01 12:47:36.000000000","message":"You probably don\u0027t need to add this additional DB call. EntryCreateTask provides volume, so volume object should be in the flow\u0027s storage. Just make task requiring it - add volume instead of volume_id in #668 and $680.","commit_id":"d5e7340e8616973c0c9ec55ee0a6471aa2401666"}],"cinder/volume/flows/manager/create_volume.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"8a7a6ee5a70317166ac78616a0390cf15b1f3da9","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        # rescheduling happened. We\u0027re returning boolean flag that will"},{"line_number":156,"context_line":"        # indicate that. It which will be available in flow engine store"},{"line_number":157,"context_line":"        # through get_revert_result method."},{"line_number":158,"context_line":"        volume \u003d objects.Volume.get_by_id(context, volume_id)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        # If do not want to be rescheduled, just set the volume\u0027s status to"},{"line_number":161,"context_line":"        # error and return."}],"source_content_type":"text/x-python","patch_set":80,"id":"da20952f_4d8d797a","line":158,"updated":"2015-08-26 16:48:19.000000000","message":"I think this DB call is not needed. This task is always after we fetch a volume from the DB. So when revert occurs (in reversed order) volume object  should always be in flows\u0027 storage. #193 indicates that is should be saved as \"volume_ref\". So basically you can change volume_id in #153 to volume_ref, and you\u0027ll have an object fetched in #207.\n\nI\u0027ve made unit tests coverage full in these methods, so if I\u0027m wrong you should easily know. ;)","commit_id":"c065e8fac830d8ff165c341046fbf0625b5ad074"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"4158d7f53fdb95d8082b8d8865f16439ebde07f1","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        # rescheduling happened. We\u0027re returning boolean flag that will"},{"line_number":156,"context_line":"        # indicate that. It which will be available in flow engine store"},{"line_number":157,"context_line":"        # through get_revert_result method."},{"line_number":158,"context_line":"        volume \u003d objects.Volume.get_by_id(context, volume_id)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        # If do not want to be rescheduled, just set the volume\u0027s status to"},{"line_number":161,"context_line":"        # error and return."}],"source_content_type":"text/x-python","patch_set":80,"id":"da20952f_9306411f","line":158,"in_reply_to":"da20952f_4d8d797a","updated":"2015-08-27 01:59:44.000000000","message":"Done","commit_id":"c065e8fac830d8ff165c341046fbf0625b5ad074"},{"author":{"_account_id":12661,"name":"Dmitry Guryanov","email":"dmitry.guryanov@gmail.com","username":"dguryanov"},"change_message_id":"ba62bef06f5c09812c53e3c895ed48a228bb0d56","unresolved":false,"context_lines":[{"line_number":644,"context_line":"        updates \u003d dict(model_update or dict(), status\u003d\u0027downloading\u0027)"},{"line_number":645,"context_line":"        try:"},{"line_number":646,"context_line":"            volume_ref \u003d self.db.volume_update(context,"},{"line_number":647,"context_line":"                                               volume_ref[\u0027id\u0027], updates)"},{"line_number":648,"context_line":"        except exception.CinderException:"},{"line_number":649,"context_line":"            LOG.exception(_LE(\"Failed updating volume %(volume_id)s with \""},{"line_number":650,"context_line":"                              \"%(updates)s\"),"}],"source_content_type":"text/x-python","patch_set":96,"id":"9a1a9d01_aad6a84c","line":647,"updated":"2015-09-30 15:18:05.000000000","message":"driver.copy_image_to_volume gets sqlalchemy object because of this ^^","commit_id":"60ad70657d6469e6c3cd2ed7fb5b7fcef000f128"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"a6ddd7ea8b4f3940b6253736391fb0882ce21bf4","unresolved":false,"context_lines":[{"line_number":644,"context_line":"        updates \u003d dict(model_update or dict(), status\u003d\u0027downloading\u0027)"},{"line_number":645,"context_line":"        try:"},{"line_number":646,"context_line":"            volume_ref \u003d self.db.volume_update(context,"},{"line_number":647,"context_line":"                                               volume_ref[\u0027id\u0027], updates)"},{"line_number":648,"context_line":"        except exception.CinderException:"},{"line_number":649,"context_line":"            LOG.exception(_LE(\"Failed updating volume %(volume_id)s with \""},{"line_number":650,"context_line":"                              \"%(updates)s\"),"}],"source_content_type":"text/x-python","patch_set":96,"id":"9a1a9d01_eac26052","line":647,"in_reply_to":"9a1a9d01_aad6a84c","updated":"2015-09-30 15:20:54.000000000","message":"The purpose of this patch is to update get, create, and delete.  It is not suppose to update copy_image_to_volume.  How is this comment relevant?","commit_id":"60ad70657d6469e6c3cd2ed7fb5b7fcef000f128"},{"author":{"_account_id":12661,"name":"Dmitry Guryanov","email":"dmitry.guryanov@gmail.com","username":"dguryanov"},"change_message_id":"59d4696e0a5b1b63593d0aef89c4b56d356b79fe","unresolved":false,"context_lines":[{"line_number":644,"context_line":"        updates \u003d dict(model_update or dict(), status\u003d\u0027downloading\u0027)"},{"line_number":645,"context_line":"        try:"},{"line_number":646,"context_line":"            volume_ref \u003d self.db.volume_update(context,"},{"line_number":647,"context_line":"                                               volume_ref[\u0027id\u0027], updates)"},{"line_number":648,"context_line":"        except exception.CinderException:"},{"line_number":649,"context_line":"            LOG.exception(_LE(\"Failed updating volume %(volume_id)s with \""},{"line_number":650,"context_line":"                              \"%(updates)s\"),"}],"source_content_type":"text/x-python","patch_set":96,"id":"9a1a9d01_4a9eec07","line":647,"in_reply_to":"9a1a9d01_eac26052","updated":"2015-09-30 15:28:51.000000000","message":"I see, thanks for the explanation, I\u0027ll remove -1.","commit_id":"60ad70657d6469e6c3cd2ed7fb5b7fcef000f128"}],"cinder/volume/manager.py":[{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"d758407f41d89cd46f39afe56d50eecc4cf5d498","unresolved":false,"context_lines":[{"line_number":326,"context_line":"                    self._count_allocated_capacity(ctxt, volume)"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"                    try:"},{"line_number":329,"context_line":"                        if volume.status in [\u0027in-use\u0027]:"},{"line_number":330,"context_line":"                            self.driver.ensure_export(ctxt, volume)"},{"line_number":331,"context_line":"                    except Exception as export_ex:"},{"line_number":332,"context_line":"                        LOG.error(_LE(\"Failed to re-export volume, \""}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_9bcfa355","line":329,"updated":"2015-07-08 16:09:48.000000000","message":"I think that it will be better to use volume.status \u003d\u003d \u0027in-use\u0027","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"13287c5c2ed0d04aa418e3cb9615d2bfbabda7a6","unresolved":false,"context_lines":[{"line_number":326,"context_line":"                    self._count_allocated_capacity(ctxt, volume)"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"                    try:"},{"line_number":329,"context_line":"                        if volume.status in [\u0027in-use\u0027]:"},{"line_number":330,"context_line":"                            self.driver.ensure_export(ctxt, volume)"},{"line_number":331,"context_line":"                    except Exception as export_ex:"},{"line_number":332,"context_line":"                        LOG.error(_LE(\"Failed to re-export volume, \""}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_69ad36e8","line":329,"in_reply_to":"ba3cc151_9bcfa355","updated":"2015-07-08 16:37:17.000000000","message":"Done","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"},{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"d758407f41d89cd46f39afe56d50eecc4cf5d498","unresolved":false,"context_lines":[{"line_number":512,"context_line":"      \"\"\""},{"line_number":513,"context_line":""},{"line_number":514,"context_line":"        context \u003d context.elevated()"},{"line_number":515,"context_line":"        volume_id \u003d volume.id"},{"line_number":516,"context_line":""},{"line_number":517,"context_line":"        try:"},{"line_number":518,"context_line":"            volume_ref \u003d objects.Volume.get_by_id(context, volume_id)"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_3b1d37be","line":515,"updated":"2015-07-08 16:09:48.000000000","message":"We don\u0027t need this line anymore.","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"13287c5c2ed0d04aa418e3cb9615d2bfbabda7a6","unresolved":false,"context_lines":[{"line_number":512,"context_line":"      \"\"\""},{"line_number":513,"context_line":""},{"line_number":514,"context_line":"        context \u003d context.elevated()"},{"line_number":515,"context_line":"        volume_id \u003d volume.id"},{"line_number":516,"context_line":""},{"line_number":517,"context_line":"        try:"},{"line_number":518,"context_line":"            volume_ref \u003d objects.Volume.get_by_id(context, volume_id)"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_a9f49ef0","line":515,"in_reply_to":"ba3cc151_3b1d37be","updated":"2015-07-08 16:37:17.000000000","message":"volume_id is used in a few places below, but sure.","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"},{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"d758407f41d89cd46f39afe56d50eecc4cf5d498","unresolved":false,"context_lines":[{"line_number":1281,"context_line":"        except Exception:"},{"line_number":1282,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1283,"context_line":"                LOG.error(_LE(\"Failed to copy volume %(vol1)s to %(vol2)s\"),"},{"line_number":1284,"context_line":"                          {\u0027vol1\u0027: volume[\u0027id\u0027], \u0027vol2\u0027: new_volume.id})"},{"line_number":1285,"context_line":"                self._clean_temporary_volume(ctxt, volume,"},{"line_number":1286,"context_line":"                                             new_volume)"},{"line_number":1287,"context_line":""}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_1b371300","line":1284,"updated":"2015-07-08 16:09:48.000000000","message":"volume.id","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"13287c5c2ed0d04aa418e3cb9615d2bfbabda7a6","unresolved":false,"context_lines":[{"line_number":1281,"context_line":"        except Exception:"},{"line_number":1282,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1283,"context_line":"                LOG.error(_LE(\"Failed to copy volume %(vol1)s to %(vol2)s\"),"},{"line_number":1284,"context_line":"                          {\u0027vol1\u0027: volume[\u0027id\u0027], \u0027vol2\u0027: new_volume.id})"},{"line_number":1285,"context_line":"                self._clean_temporary_volume(ctxt, volume,"},{"line_number":1286,"context_line":"                                             new_volume)"},{"line_number":1287,"context_line":""}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_29fdeeb0","line":1284,"in_reply_to":"ba3cc151_1b371300","updated":"2015-07-08 16:37:17.000000000","message":"Done","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"},{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"d758407f41d89cd46f39afe56d50eecc4cf5d498","unresolved":false,"context_lines":[{"line_number":1286,"context_line":"                                             new_volume)"},{"line_number":1287,"context_line":""},{"line_number":1288,"context_line":"    def _get_original_status(self, volume):"},{"line_number":1289,"context_line":"        attachments \u003d volume[\u0027volume_attachment\u0027]"},{"line_number":1290,"context_line":"        if not attachments:"},{"line_number":1291,"context_line":"            return \u0027available\u0027"},{"line_number":1292,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_9b2323bd","line":1289,"updated":"2015-07-08 16:09:48.000000000","message":"volume.volume.attachment","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"13287c5c2ed0d04aa418e3cb9615d2bfbabda7a6","unresolved":false,"context_lines":[{"line_number":1286,"context_line":"                                             new_volume)"},{"line_number":1287,"context_line":""},{"line_number":1288,"context_line":"    def _get_original_status(self, volume):"},{"line_number":1289,"context_line":"        attachments \u003d volume[\u0027volume_attachment\u0027]"},{"line_number":1290,"context_line":"        if not attachments:"},{"line_number":1291,"context_line":"            return \u0027available\u0027"},{"line_number":1292,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_c92c824c","line":1289,"in_reply_to":"ba3cc151_9b2323bd","updated":"2015-07-08 16:37:17.000000000","message":"volume.volume_attachment","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"},{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"d758407f41d89cd46f39afe56d50eecc4cf5d498","unresolved":false,"context_lines":[{"line_number":1421,"context_line":"        moved \u003d False"},{"line_number":1422,"context_line":""},{"line_number":1423,"context_line":"        status_update \u003d None"},{"line_number":1424,"context_line":"        if volume_ref[\u0027status\u0027] \u003d\u003d \u0027retyping\u0027:"},{"line_number":1425,"context_line":"            status_update \u003d {\u0027status\u0027: self._get_original_status(volume_ref)}"},{"line_number":1426,"context_line":""},{"line_number":1427,"context_line":"        self.db.volume_update(ctxt, volume_ref[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_e1364050","line":1424,"updated":"2015-07-08 16:09:48.000000000","message":"volume_ref.status","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"13287c5c2ed0d04aa418e3cb9615d2bfbabda7a6","unresolved":false,"context_lines":[{"line_number":1421,"context_line":"        moved \u003d False"},{"line_number":1422,"context_line":""},{"line_number":1423,"context_line":"        status_update \u003d None"},{"line_number":1424,"context_line":"        if volume_ref[\u0027status\u0027] \u003d\u003d \u0027retyping\u0027:"},{"line_number":1425,"context_line":"            status_update \u003d {\u0027status\u0027: self._get_original_status(volume_ref)}"},{"line_number":1426,"context_line":""},{"line_number":1427,"context_line":"        self.db.volume_update(ctxt, volume_ref[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_e93146a3","line":1424,"in_reply_to":"ba3cc151_e1364050","updated":"2015-07-08 16:37:17.000000000","message":"Done","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"},{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"d758407f41d89cd46f39afe56d50eecc4cf5d498","unresolved":false,"context_lines":[{"line_number":1425,"context_line":"            status_update \u003d {\u0027status\u0027: self._get_original_status(volume_ref)}"},{"line_number":1426,"context_line":""},{"line_number":1427,"context_line":"        self.db.volume_update(ctxt, volume_ref[\u0027id\u0027],"},{"line_number":1428,"context_line":"                              {\u0027migration_status\u0027: \u0027migrating\u0027})"},{"line_number":1429,"context_line":"        if not force_host_copy and new_type_id is None:"},{"line_number":1430,"context_line":"            try:"},{"line_number":1431,"context_line":"                LOG.debug(\"Issue driver.migrate_volume.\", resource\u003dvolume_ref)"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_41a7ec4f","line":1428,"updated":"2015-07-08 16:09:48.000000000","message":"you should use volume_ref.update(status_update) or volume_ref.status  \u003d status_update and volume_ref.save()","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"13287c5c2ed0d04aa418e3cb9615d2bfbabda7a6","unresolved":false,"context_lines":[{"line_number":1425,"context_line":"            status_update \u003d {\u0027status\u0027: self._get_original_status(volume_ref)}"},{"line_number":1426,"context_line":""},{"line_number":1427,"context_line":"        self.db.volume_update(ctxt, volume_ref[\u0027id\u0027],"},{"line_number":1428,"context_line":"                              {\u0027migration_status\u0027: \u0027migrating\u0027})"},{"line_number":1429,"context_line":"        if not force_host_copy and new_type_id is None:"},{"line_number":1430,"context_line":"            try:"},{"line_number":1431,"context_line":"                LOG.debug(\"Issue driver.migrate_volume.\", resource\u003dvolume_ref)"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba3cc151_4921524c","line":1428,"in_reply_to":"ba3cc151_41a7ec4f","updated":"2015-07-08 16:37:17.000000000","message":"Done","commit_id":"73047f6fb7c08f6b78d743cb0519a100fd5ba823"},{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"1981e4aaba1f2477c45081caa8c6ad263f07cf96","unresolved":false,"context_lines":[{"line_number":1697,"context_line":""},{"line_number":1698,"context_line":"        LOG.debug(\"migrate_volume_completion: completing migration for \""},{"line_number":1699,"context_line":"                  \"volume %(vol1)s (temporary volume %(vol2)s\","},{"line_number":1700,"context_line":"                  {\u0027vol1\u0027: volume_id, \u0027vol2\u0027: new_volume_id})"},{"line_number":1701,"context_line":"        volume \u003d self.db.volume_get(ctxt, volume_id)"},{"line_number":1702,"context_line":"        new_volume \u003d self.db.volume_get(ctxt, new_volume_id)"},{"line_number":1703,"context_line":"        rpcapi \u003d volume_rpcapi.VolumeAPI()"}],"source_content_type":"text/x-python","patch_set":90,"id":"da20952f_08c24185","line":1700,"updated":"2015-09-07 01:10:01.000000000","message":"Thang, I am concerned about why not use objects.Volume.get_by_id to get volume and new_volume here? In fact, if not, it leads to a KeyError problem. \nI happened to see the problem and have a fix https://review.openstack.org/#/c/219566/.\nAnd then I found your changes, and I think if you would like to fix it in your patch, I will abandon mine.","commit_id":"ef1707884051dcc1669946ad73612cfc3d25e73b"},{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"0c7dbdf99551e17c326141d569e6d5a7435d0e6f","unresolved":false,"context_lines":[{"line_number":1697,"context_line":""},{"line_number":1698,"context_line":"        LOG.debug(\"migrate_volume_completion: completing migration for \""},{"line_number":1699,"context_line":"                  \"volume %(vol1)s (temporary volume %(vol2)s\","},{"line_number":1700,"context_line":"                  {\u0027vol1\u0027: volume_id, \u0027vol2\u0027: new_volume_id})"},{"line_number":1701,"context_line":"        volume \u003d self.db.volume_get(ctxt, volume_id)"},{"line_number":1702,"context_line":"        new_volume \u003d self.db.volume_get(ctxt, new_volume_id)"},{"line_number":1703,"context_line":"        rpcapi \u003d volume_rpcapi.VolumeAPI()"}],"source_content_type":"text/x-python","patch_set":90,"id":"da20952f_8863b1b0","line":1700,"in_reply_to":"da20952f_08c24185","updated":"2015-09-07 01:15:52.000000000","message":"If you don\u0027t update here, I will submit my patch and remove -1.","commit_id":"ef1707884051dcc1669946ad73612cfc3d25e73b"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"2cec8b09fef76b9b4008de5d28617110d541eb9c","unresolved":false,"context_lines":[{"line_number":1697,"context_line":""},{"line_number":1698,"context_line":"        LOG.debug(\"migrate_volume_completion: completing migration for \""},{"line_number":1699,"context_line":"                  \"volume %(vol1)s (temporary volume %(vol2)s\","},{"line_number":1700,"context_line":"                  {\u0027vol1\u0027: volume_id, \u0027vol2\u0027: new_volume_id})"},{"line_number":1701,"context_line":"        volume \u003d self.db.volume_get(ctxt, volume_id)"},{"line_number":1702,"context_line":"        new_volume \u003d self.db.volume_get(ctxt, new_volume_id)"},{"line_number":1703,"context_line":"        rpcapi \u003d volume_rpcapi.VolumeAPI()"}],"source_content_type":"text/x-python","patch_set":90,"id":"da20952f_ea19e188","line":1700,"in_reply_to":"da20952f_8863b1b0","updated":"2015-09-08 01:21:37.000000000","message":"It should not be part of this patch.  Updating migrate_volume_completion to use oslo_versionedobjects should be part of a different patch.","commit_id":"ef1707884051dcc1669946ad73612cfc3d25e73b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"2b0e676eb4a0037016d2f9d7a97eeadd20166777","unresolved":false,"context_lines":[{"line_number":278,"context_line":"                new_host \u003d vol_utils.append_host(volume[\u0027host\u0027],"},{"line_number":279,"context_line":"                                                 pool)"},{"line_number":280,"context_line":"                volume.host \u003d new_host"},{"line_number":281,"context_line":"                volume.save()"},{"line_number":282,"context_line":"            else:"},{"line_number":283,"context_line":"                # Otherwise, put them into a special fixed pool with"},{"line_number":284,"context_line":"                # volume_backend_name being the pool name, if"}],"source_content_type":"text/x-python","patch_set":99,"id":"7a2fa921_a0a51ab6","line":281,"updated":"2015-10-12 18:17:15.000000000","message":"Here too, you could easily check to see if you got the volume parameter, and if so do the save, otherwise do the old db call, which would make this method actually compatible with the previous 1.x calls like the version semantic suggests.","commit_id":"c923bd7d7c684c1ceccb7c5602032b66fb54ae58"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1199a4dba2533719e1ddbb7ae8df3d017ae500f5","unresolved":false,"context_lines":[{"line_number":278,"context_line":"                new_host \u003d vol_utils.append_host(volume[\u0027host\u0027],"},{"line_number":279,"context_line":"                                                 pool)"},{"line_number":280,"context_line":"                volume.host \u003d new_host"},{"line_number":281,"context_line":"                volume.save()"},{"line_number":282,"context_line":"            else:"},{"line_number":283,"context_line":"                # Otherwise, put them into a special fixed pool with"},{"line_number":284,"context_line":"                # volume_backend_name being the pool name, if"}],"source_content_type":"text/x-python","patch_set":99,"id":"3a29b11f_5d7dc86c","line":281,"in_reply_to":"5a2ca52d_1b0343ba","updated":"2015-10-20 14:20:02.000000000","message":"Ah, yeah, I didn\u0027t expand enough below. The comment applies to any of the rpc methods that accept a volume.","commit_id":"c923bd7d7c684c1ceccb7c5602032b66fb54ae58"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"8292ac9203f65cc6a8183bbe755f700215a39731","unresolved":false,"context_lines":[{"line_number":278,"context_line":"                new_host \u003d vol_utils.append_host(volume[\u0027host\u0027],"},{"line_number":279,"context_line":"                                                 pool)"},{"line_number":280,"context_line":"                volume.host \u003d new_host"},{"line_number":281,"context_line":"                volume.save()"},{"line_number":282,"context_line":"            else:"},{"line_number":283,"context_line":"                # Otherwise, put them into a special fixed pool with"},{"line_number":284,"context_line":"                # volume_backend_name being the pool name, if"}],"source_content_type":"text/x-python","patch_set":99,"id":"5a2ca52d_1b0343ba","line":281,"in_reply_to":"7a2fa921_a0a51ab6","updated":"2015-10-13 10:18:44.000000000","message":"I don\u0027t get this one, we\u0027re using _count_allocated_capacity in init_host only and not in any RPC method.","commit_id":"c923bd7d7c684c1ceccb7c5602032b66fb54ae58"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"2cd019e3dda21b4a3706ea4edec8826b8c8b35f9","unresolved":false,"context_lines":[{"line_number":593,"context_line":"        context \u003d context.elevated()"},{"line_number":594,"context_line":""},{"line_number":595,"context_line":"        try:"},{"line_number":596,"context_line":"            volume_ref \u003d objects.Volume.get_by_id(context, volume_id)"},{"line_number":597,"context_line":"        except exception.VolumeNotFound:"},{"line_number":598,"context_line":"            # NOTE(thingee): It could be possible for a volume to"},{"line_number":599,"context_line":"            # be deleted when resuming deletes from init_host()."}],"source_content_type":"text/x-python","patch_set":106,"id":"fa80f949_b620f74a","line":596,"updated":"2015-11-03 20:25:09.000000000","message":"If you get volume as a parameter, then you should just use that instead of doing this lookup, right? Further, you\u0027re claiming that you support version 1.33, which uses the volume object, yet you\u0027re ignoring it here. That means you\u0027re not actually implementing the _behavior_ of 1.33, only tolerating the _signature_ of it, which is not correct.","commit_id":"fbcaa71b52a8b79e958d66c95f0ca4ec74c7276a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"28c29344b4ebaef2c757b59be5899a7ceb50f3f3","unresolved":false,"context_lines":[{"line_number":593,"context_line":"        context \u003d context.elevated()"},{"line_number":594,"context_line":""},{"line_number":595,"context_line":"        try:"},{"line_number":596,"context_line":"            volume_ref \u003d objects.Volume.get_by_id(context, volume_id)"},{"line_number":597,"context_line":"        except exception.VolumeNotFound:"},{"line_number":598,"context_line":"            # NOTE(thingee): It could be possible for a volume to"},{"line_number":599,"context_line":"            # be deleted when resuming deletes from init_host()."}],"source_content_type":"text/x-python","patch_set":106,"id":"fa80f949_d7bb320d","line":596,"in_reply_to":"fa80f949_8e6837f7","updated":"2015-11-03 23:32:47.000000000","message":"So why are you even passing it? At least I would expect you to do:\n\n volume_id \u003d volume and volume.id or volume_id\n volume_ref \u003d objects.Volume.get_by_id(context, volume_id)\n\notherwise you\u0027re making version 1.33 continue to rely on volume_id, even though you intend (I assume) to change that in the future.\n\nOf course, if you get volume.refresh(), then you would do *that* in the try block. Maybe it makes sense to land volume.refresh() before this set since you now need it in two places?","commit_id":"fbcaa71b52a8b79e958d66c95f0ca4ec74c7276a"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"08afc3d83532f44687dbde3f32986a9019ce1f2c","unresolved":false,"context_lines":[{"line_number":593,"context_line":"        context \u003d context.elevated()"},{"line_number":594,"context_line":""},{"line_number":595,"context_line":"        try:"},{"line_number":596,"context_line":"            volume_ref \u003d objects.Volume.get_by_id(context, volume_id)"},{"line_number":597,"context_line":"        except exception.VolumeNotFound:"},{"line_number":598,"context_line":"            # NOTE(thingee): It could be possible for a volume to"},{"line_number":599,"context_line":"            # be deleted when resuming deletes from init_host()."}],"source_content_type":"text/x-python","patch_set":106,"id":"fa80f949_8e6837f7","line":596,"in_reply_to":"fa80f949_b620f74a","updated":"2015-11-03 22:15:15.000000000","message":"I know, but see the comment below in L598.","commit_id":"fbcaa71b52a8b79e958d66c95f0ca4ec74c7276a"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"8d599ecac37ac6f65e766da9b4785dcc2550ab57","unresolved":false,"context_lines":[{"line_number":593,"context_line":"        context \u003d context.elevated()"},{"line_number":594,"context_line":""},{"line_number":595,"context_line":"        try:"},{"line_number":596,"context_line":"            volume_ref \u003d objects.Volume.get_by_id(context, volume_id)"},{"line_number":597,"context_line":"        except exception.VolumeNotFound:"},{"line_number":598,"context_line":"            # NOTE(thingee): It could be possible for a volume to"},{"line_number":599,"context_line":"            # be deleted when resuming deletes from init_host()."}],"source_content_type":"text/x-python","patch_set":106,"id":"fa80f949_bd768f3c","line":596,"in_reply_to":"fa80f949_d7bb320d","updated":"2015-11-04 01:06:49.000000000","message":"I will look into refresh().","commit_id":"fbcaa71b52a8b79e958d66c95f0ca4ec74c7276a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"2cd019e3dda21b4a3706ea4edec8826b8c8b35f9","unresolved":false,"context_lines":[{"line_number":1636,"context_line":"                raise exception.VolumeMigrationFailed(reason\u003dmsg)"},{"line_number":1637,"context_line":"            else:"},{"line_number":1638,"context_line":"                time.sleep(tries ** 2)"},{"line_number":1639,"context_line":"            new_volume \u003d objects.Volume.get_by_id(ctxt, new_volume.id)"},{"line_number":1640,"context_line":""},{"line_number":1641,"context_line":"        # Copy the source volume to the destination volume"},{"line_number":1642,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":106,"id":"fa80f949_16e22304","line":1639,"updated":"2015-11-03 20:25:09.000000000","message":"If you don\u0027t already have one, you should implement refresh() on Volume, so you can just do:\n\n new_volume.refresh()\n\nhere.","commit_id":"fbcaa71b52a8b79e958d66c95f0ca4ec74c7276a"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"08afc3d83532f44687dbde3f32986a9019ce1f2c","unresolved":false,"context_lines":[{"line_number":1636,"context_line":"                raise exception.VolumeMigrationFailed(reason\u003dmsg)"},{"line_number":1637,"context_line":"            else:"},{"line_number":1638,"context_line":"                time.sleep(tries ** 2)"},{"line_number":1639,"context_line":"            new_volume \u003d objects.Volume.get_by_id(ctxt, new_volume.id)"},{"line_number":1640,"context_line":""},{"line_number":1641,"context_line":"        # Copy the source volume to the destination volume"},{"line_number":1642,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":106,"id":"fa80f949_2e9fcb04","line":1639,"in_reply_to":"fa80f949_16e22304","updated":"2015-11-03 22:15:15.000000000","message":"It was part of an older larger patch set, but we decided to keep that separate from this one to reduce the size.  I can put a TODO to switch over to refresh once we have one,","commit_id":"fbcaa71b52a8b79e958d66c95f0ca4ec74c7276a"}],"cinder/volume/rpcapi.py":[{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"c88a249e7a4ada6fd136274175e6d3ed34b4d4f3","unresolved":false,"context_lines":[{"line_number":129,"context_line":"                      cgsnapshot_id\u003dNone):"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        new_host \u003d utils.extract_host(host)"},{"line_number":132,"context_line":"        cctxt \u003d self.client.prepare(server\u003dnew_host, version\u003d\u00271.4\u0027)"},{"line_number":133,"context_line":"        request_spec_p \u003d jsonutils.to_primitive(request_spec)"},{"line_number":134,"context_line":"        cctxt.cast(ctxt, \u0027create_volume\u0027,"},{"line_number":135,"context_line":"                   volume\u003dvolume,"}],"source_content_type":"text/x-python","patch_set":57,"id":"3a50d1a3_2d9f6f51","line":132,"updated":"2015-07-27 14:21:07.000000000","message":"you should change version.","commit_id":"e364de98fc7f29b90213ef9f8479cde4562762c6"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"c705380384e825e2352868428046a4c9f47e9d9b","unresolved":false,"context_lines":[{"line_number":129,"context_line":"                      cgsnapshot_id\u003dNone):"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        new_host \u003d utils.extract_host(host)"},{"line_number":132,"context_line":"        cctxt \u003d self.client.prepare(server\u003dnew_host, version\u003d\u00271.4\u0027)"},{"line_number":133,"context_line":"        request_spec_p \u003d jsonutils.to_primitive(request_spec)"},{"line_number":134,"context_line":"        cctxt.cast(ctxt, \u0027create_volume\u0027,"},{"line_number":135,"context_line":"                   volume\u003dvolume,"}],"source_content_type":"text/x-python","patch_set":57,"id":"3a50d1a3_992e01f9","line":132,"in_reply_to":"3a50d1a3_2d9f6f51","updated":"2015-07-27 15:21:10.000000000","message":"Done","commit_id":"e364de98fc7f29b90213ef9f8479cde4562762c6"},{"author":{"_account_id":16814,"name":"Daniel Tadrzak","email":"daniel.tadrzak@intel.com","username":"dtadrzak"},"change_message_id":"c88a249e7a4ada6fd136274175e6d3ed34b4d4f3","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def delete_volume(self, ctxt, volume, unmanage_only\u003dFalse):"},{"line_number":147,"context_line":"        new_host \u003d utils.extract_host(volume.host)"},{"line_number":148,"context_line":"        cctxt \u003d self.client.prepare(server\u003dnew_host, version\u003d\u00271.15\u0027)"},{"line_number":149,"context_line":"        cctxt.cast(ctxt, \u0027delete_volume\u0027,"},{"line_number":150,"context_line":"                   volume\u003dvolume,"},{"line_number":151,"context_line":"                   unmanage_only\u003dunmanage_only)"}],"source_content_type":"text/x-python","patch_set":57,"id":"3a50d1a3_4d999b6d","line":148,"updated":"2015-07-27 14:21:07.000000000","message":"You should change version.","commit_id":"e364de98fc7f29b90213ef9f8479cde4562762c6"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"c705380384e825e2352868428046a4c9f47e9d9b","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def delete_volume(self, ctxt, volume, unmanage_only\u003dFalse):"},{"line_number":147,"context_line":"        new_host \u003d utils.extract_host(volume.host)"},{"line_number":148,"context_line":"        cctxt \u003d self.client.prepare(server\u003dnew_host, version\u003d\u00271.15\u0027)"},{"line_number":149,"context_line":"        cctxt.cast(ctxt, \u0027delete_volume\u0027,"},{"line_number":150,"context_line":"                   volume\u003dvolume,"},{"line_number":151,"context_line":"                   unmanage_only\u003dunmanage_only)"}],"source_content_type":"text/x-python","patch_set":57,"id":"3a50d1a3_f93f0523","line":148,"in_reply_to":"3a50d1a3_4d999b6d","updated":"2015-07-27 15:21:10.000000000","message":"Done","commit_id":"e364de98fc7f29b90213ef9f8479cde4562762c6"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"2b0e676eb4a0037016d2f9d7a97eeadd20166777","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from cinder import rpc"},{"line_number":25,"context_line":"from cinder.volume import utils"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"CONF \u003d cfg.CONF"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""}],"source_content_type":"text/x-python","patch_set":99,"id":"7a2fa921_1d5b1b56","side":"PARENT","line":27,"updated":"2015-10-12 18:17:15.000000000","message":"Unrelated whitespace damage","commit_id":"71355fdbadb8155743350a182778fe87f0f64e8a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"2b0e676eb4a0037016d2f9d7a97eeadd20166777","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        target \u003d messaging.Target(topic\u003dCONF.volume_topic,"},{"line_number":87,"context_line":"                                  version\u003dself.BASE_RPC_API_VERSION)"},{"line_number":88,"context_line":"        serializer \u003d objects_base.CinderObjectSerializer()"},{"line_number":89,"context_line":"        self.client \u003d rpc.get_client(target, \u00271.31\u0027, serializer\u003dserializer)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def create_consistencygroup(self, ctxt, group, host):"},{"line_number":92,"context_line":"        new_host \u003d utils.extract_host(host)"}],"source_content_type":"text/x-python","patch_set":99,"id":"7a2fa921_20934aa5","line":89,"range":{"start_line":89,"start_character":45,"end_line":89,"end_character":51},"updated":"2015-10-12 18:17:15.000000000","message":"I know this is already wrong, but this should be None, indicating no version cap.","commit_id":"c923bd7d7c684c1ceccb7c5602032b66fb54ae58"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"8292ac9203f65cc6a8183bbe755f700215a39731","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        target \u003d messaging.Target(topic\u003dCONF.volume_topic,"},{"line_number":87,"context_line":"                                  version\u003dself.BASE_RPC_API_VERSION)"},{"line_number":88,"context_line":"        serializer \u003d objects_base.CinderObjectSerializer()"},{"line_number":89,"context_line":"        self.client \u003d rpc.get_client(target, \u00271.31\u0027, serializer\u003dserializer)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def create_consistencygroup(self, ctxt, group, host):"},{"line_number":92,"context_line":"        new_host \u003d utils.extract_host(host)"}],"source_content_type":"text/x-python","patch_set":99,"id":"5a2ca52d_1b6263d9","line":89,"in_reply_to":"7a2fa921_20934aa5","updated":"2015-10-13 10:18:44.000000000","message":"That\u0027s true, Cinder doesn\u0027t do version caps yet, I\u0027ll be working on that in Mitaka.","commit_id":"c923bd7d7c684c1ceccb7c5602032b66fb54ae58"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"2b0e676eb4a0037016d2f9d7a97eeadd20166777","unresolved":false,"context_lines":[{"line_number":135,"context_line":"    def create_volume(self, ctxt, volume, host, request_spec,"},{"line_number":136,"context_line":"                      filter_properties, allow_reschedule\u003dTrue):"},{"line_number":137,"context_line":"        new_host \u003d utils.extract_host(host)"},{"line_number":138,"context_line":"        cctxt \u003d self.client.prepare(server\u003dnew_host, version\u003d\u00271.31\u0027)"},{"line_number":139,"context_line":"        request_spec_p \u003d jsonutils.to_primitive(request_spec)"},{"line_number":140,"context_line":"        cctxt.cast(ctxt, \u0027create_volume\u0027,"},{"line_number":141,"context_line":"                   volume\u003dvolume,"}],"source_content_type":"text/x-python","patch_set":99,"id":"7a2fa921_a0ed1a27","line":138,"updated":"2015-10-12 18:17:15.000000000","message":"This would be a trivial change with which to start the trend of being compatible with your RPC changes. Since you have the volume, you can easily opt to choose the older version and pass volume.id to the call if needed.","commit_id":"c923bd7d7c684c1ceccb7c5602032b66fb54ae58"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"8292ac9203f65cc6a8183bbe755f700215a39731","unresolved":false,"context_lines":[{"line_number":135,"context_line":"    def create_volume(self, ctxt, volume, host, request_spec,"},{"line_number":136,"context_line":"                      filter_properties, allow_reschedule\u003dTrue):"},{"line_number":137,"context_line":"        new_host \u003d utils.extract_host(host)"},{"line_number":138,"context_line":"        cctxt \u003d self.client.prepare(server\u003dnew_host, version\u003d\u00271.31\u0027)"},{"line_number":139,"context_line":"        request_spec_p \u003d jsonutils.to_primitive(request_spec)"},{"line_number":140,"context_line":"        cctxt.cast(ctxt, \u0027create_volume\u0027,"},{"line_number":141,"context_line":"                   volume\u003dvolume,"}],"source_content_type":"text/x-python","patch_set":99,"id":"5a2ca52d_db9aabc5","line":138,"in_reply_to":"7a2fa921_a0ed1a27","updated":"2015-10-13 10:18:44.000000000","message":"ditto","commit_id":"c923bd7d7c684c1ceccb7c5602032b66fb54ae58"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"2cd019e3dda21b4a3706ea4edec8826b8c8b35f9","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        target \u003d messaging.Target(topic\u003dCONF.volume_topic,"},{"line_number":90,"context_line":"                                  version\u003dself.BASE_RPC_API_VERSION)"},{"line_number":91,"context_line":"        serializer \u003d objects_base.CinderObjectSerializer()"},{"line_number":92,"context_line":"        self.client \u003d rpc.get_client(target, \u00271.33\u0027, serializer\u003dserializer)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def create_consistencygroup(self, ctxt, group, host):"},{"line_number":95,"context_line":"        new_host \u003d utils.extract_host(host)"}],"source_content_type":"text/x-python","patch_set":106,"id":"fa80f949_16b0e3f3","line":92,"range":{"start_line":92,"start_character":46,"end_line":92,"end_character":50},"updated":"2015-11-03 20:25:09.000000000","message":"This should be 1.0 and never change. Each call should override it if/where needed, otherwise you\u0027ll be sending a new version for any call that doesn\u0027t set it explicitly.","commit_id":"fbcaa71b52a8b79e958d66c95f0ca4ec74c7276a"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"bbe9397bb4c2ab388bda9755479b49bf4f7401b1","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        target \u003d messaging.Target(topic\u003dCONF.volume_topic,"},{"line_number":90,"context_line":"                                  version\u003dself.BASE_RPC_API_VERSION)"},{"line_number":91,"context_line":"        serializer \u003d objects_base.CinderObjectSerializer()"},{"line_number":92,"context_line":"        self.client \u003d rpc.get_client(target, \u00271.33\u0027, serializer\u003dserializer)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def create_consistencygroup(self, ctxt, group, host):"},{"line_number":95,"context_line":"        new_host \u003d utils.extract_host(host)"}],"source_content_type":"text/x-python","patch_set":106,"id":"fa80f949_f4ce7482","line":92,"in_reply_to":"fa80f949_16b0e3f3","updated":"2015-11-03 22:55:41.000000000","message":"The version there is the version_cap - https://github.com/openstack/cinder/blob/master/cinder/rpc.py#L144.  Cinder has a wrapper to oslo_messaging.","commit_id":"fbcaa71b52a8b79e958d66c95f0ca4ec74c7276a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"28c29344b4ebaef2c757b59be5899a7ceb50f3f3","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        target \u003d messaging.Target(topic\u003dCONF.volume_topic,"},{"line_number":90,"context_line":"                                  version\u003dself.BASE_RPC_API_VERSION)"},{"line_number":91,"context_line":"        serializer \u003d objects_base.CinderObjectSerializer()"},{"line_number":92,"context_line":"        self.client \u003d rpc.get_client(target, \u00271.33\u0027, serializer\u003dserializer)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def create_consistencygroup(self, ctxt, group, host):"},{"line_number":95,"context_line":"        new_host \u003d utils.extract_host(host)"}],"source_content_type":"text/x-python","patch_set":106,"id":"fa80f949_b7554ec7","line":92,"in_reply_to":"fa80f949_f4ce7482","updated":"2015-11-03 23:32:47.000000000","message":"Sorry, I was confusing this with the base version.\n\nEven still, you shouldn\u0027t bump this with each change, just set this to None until you have a cap.","commit_id":"fbcaa71b52a8b79e958d66c95f0ca4ec74c7276a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"2cd019e3dda21b4a3706ea4edec8826b8c8b35f9","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        cctxt.cast(ctxt, \u0027create_volume\u0027, **msg_args)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def delete_volume(self, ctxt, volume, unmanage_only\u003dFalse):"},{"line_number":152,"context_line":"        msg_args \u003d {\u0027volume_id\u0027: volume[\u0027id\u0027], \u0027unmanage_only\u0027: unmanage_only}"},{"line_number":153,"context_line":"        if self.client.can_send_version(\u00271.33\u0027):"},{"line_number":154,"context_line":"            version \u003d \u00271.33\u0027"},{"line_number":155,"context_line":"            msg_args[\u0027volume\u0027] \u003d volume"}],"source_content_type":"text/x-python","patch_set":106,"id":"fa80f949_9673734d","line":152,"range":{"start_line":152,"start_character":39,"end_line":152,"end_character":45},"updated":"2015-11-03 20:25:09.000000000","message":"Since this is new code, you should use volume.id here right? That will also help make sure that you don\u0027t accidentally drop any non-objects in here in the volume property. If you did, you\u0027d be sending a non-object to a manager call expecting an object. Since this is casting, that server-side failure would go unnoticed by the caller.","commit_id":"fbcaa71b52a8b79e958d66c95f0ca4ec74c7276a"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"08afc3d83532f44687dbde3f32986a9019ce1f2c","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        cctxt.cast(ctxt, \u0027create_volume\u0027, **msg_args)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def delete_volume(self, ctxt, volume, unmanage_only\u003dFalse):"},{"line_number":152,"context_line":"        msg_args \u003d {\u0027volume_id\u0027: volume[\u0027id\u0027], \u0027unmanage_only\u0027: unmanage_only}"},{"line_number":153,"context_line":"        if self.client.can_send_version(\u00271.33\u0027):"},{"line_number":154,"context_line":"            version \u003d \u00271.33\u0027"},{"line_number":155,"context_line":"            msg_args[\u0027volume\u0027] \u003d volume"}],"source_content_type":"text/x-python","patch_set":106,"id":"fa80f949_2e44ab72","line":152,"in_reply_to":"fa80f949_9673734d","updated":"2015-11-03 22:15:15.000000000","message":"Ok.","commit_id":"fbcaa71b52a8b79e958d66c95f0ca4ec74c7276a"}]}
