)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"923fbc62a448996d9a7000a221f667e8fcfe319a","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add some missing fields to Volume object"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Volume object was missing fields that were defined on"},{"line_number":10,"context_line":"the SQLAlchemy model as ralations or backrefs such as"},{"line_number":11,"context_line":"consistencygroup, glance_metadata and snapshots."},{"line_number":12,"context_line":"This commit adds fields representing these relationships."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1a26ad4f_8a40bf35","line":10,"updated":"2015-11-02 14:22:47.000000000","message":"s/ralations/relationships","commit_id":"829fd087fb80306df51812fd9ddcfd03d0d95afc"}],"cinder/objects/volume.py":[{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"90c63df0c8cbc2afd64e8a8736b1d79d7edd5e29","unresolved":false,"context_lines":[{"line_number":216,"context_line":"    @base.remotable_classmethod"},{"line_number":217,"context_line":"    def get_by_id(cls, context, id):"},{"line_number":218,"context_line":"        db_volume \u003d db.volume_get(context, id)"},{"line_number":219,"context_line":"        expected_attrs \u003d [\u0027admin_metadata\u0027, \u0027metadata\u0027, \u0027glance_metadata\u0027]"},{"line_number":220,"context_line":"        return cls._from_db_object(context, cls(context), db_volume,"},{"line_number":221,"context_line":"                                   expected_attrs\u003dexpected_attrs)"},{"line_number":222,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a26ad4f_c37b078b","line":219,"updated":"2015-11-02 13:42:37.000000000","message":"glance_metadata should not be lazy loaded because it is not done in the model - https://github.com/openstack/cinder/blob/master/cinder/db/sqlalchemy/api.py#L1367.","commit_id":"829fd087fb80306df51812fd9ddcfd03d0d95afc"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"90c63df0c8cbc2afd64e8a8736b1d79d7edd5e29","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        volumes \u003d db.volume_get_all(context, marker, limit,"},{"line_number":341,"context_line":"                                    sort_keys\u003dsort_keys, sort_dirs\u003dsort_dirs,"},{"line_number":342,"context_line":"                                    filters\u003dfilters, offset\u003doffset)"},{"line_number":343,"context_line":"        expected_attrs \u003d [\u0027admin_metadata\u0027, \u0027glance_metadata\u0027, \u0027metadata\u0027]"},{"line_number":344,"context_line":"        return base.obj_make_list(context, cls(context), objects.Volume,"},{"line_number":345,"context_line":"                                  volumes, expected_attrs\u003dexpected_attrs)"},{"line_number":346,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a26ad4f_43c4d78f","line":343,"updated":"2015-11-02 13:42:37.000000000","message":"Ditto","commit_id":"829fd087fb80306df51812fd9ddcfd03d0d95afc"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"aac7a94b81da11c3fa92065721d6107b63550db1","unresolved":false,"context_lines":[{"line_number":198,"context_line":"            volume.volume_attachment \u003d attachments"},{"line_number":199,"context_line":"        if \u0027consistencygroup\u0027 in expected_attrs:"},{"line_number":200,"context_line":"            consistencygroup \u003d base.obj_make_list("},{"line_number":201,"context_line":"                context, objects.ConsistencyGroup(context),"},{"line_number":202,"context_line":"                objects.ConsistencyGroup,"},{"line_number":203,"context_line":"                db_volume.get(\u0027consistencygroup\u0027))"},{"line_number":204,"context_line":"            volume.consistencygroup \u003d consistencygroup"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a26ad4f_c961dc3a","line":201,"updated":"2015-11-02 18:27:15.000000000","message":"This isn\u0027t a 1:n relationship, but n:1 - you should do something like:\n\n            consistencygroup \u003d objects.ConsistencyGroup(context)\n            consistencygroup._from_db_object(context,\n                                       consistencygroup,\n                                       db_volume[\u0027consistencygroup\u0027])\n            volume.consistencygroup \u003d consistencygroup","commit_id":"b92d2725be358046f1f4ca927195b13082c69916"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"aac7a94b81da11c3fa92065721d6107b63550db1","unresolved":false,"context_lines":[{"line_number":204,"context_line":"            volume.consistencygroup \u003d consistencygroup"},{"line_number":205,"context_line":"        if \u0027snapshots\u0027 in expected_attrs:"},{"line_number":206,"context_line":"            snapshots \u003d base.obj_make_list("},{"line_number":207,"context_line":"                context, objects.SnapshotsList(context),"},{"line_number":208,"context_line":"                objects.Snapshots,"},{"line_number":209,"context_line":"                db_volume[\u0027snapshots\u0027])"},{"line_number":210,"context_line":"            volume.snapshots \u003d snapshots"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a26ad4f_c9c8fc24","line":207,"updated":"2015-11-02 18:27:15.000000000","message":"s/SnapshotsList/SnapshotList","commit_id":"b92d2725be358046f1f4ca927195b13082c69916"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"205aff7c3fce76d94fe26e4a6f3a710f5c8a9bf1","unresolved":false,"context_lines":[{"line_number":204,"context_line":"            volume.consistencygroup \u003d consistencygroup"},{"line_number":205,"context_line":"        if \u0027snapshots\u0027 in expected_attrs:"},{"line_number":206,"context_line":"            snapshots \u003d base.obj_make_list("},{"line_number":207,"context_line":"                context, objects.SnapshotsList(context),"},{"line_number":208,"context_line":"                objects.Snapshots,"},{"line_number":209,"context_line":"                db_volume[\u0027snapshots\u0027])"},{"line_number":210,"context_line":"            volume.snapshots \u003d snapshots"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_549f19b4","line":207,"in_reply_to":"1a26ad4f_782f2288","updated":"2015-11-04 19:17:36.000000000","message":"Good catch. We need to cover this code with unit tests","commit_id":"b92d2725be358046f1f4ca927195b13082c69916"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c2a3b38265bac5805b41cda93a6eb1bb5d4c1025","unresolved":false,"context_lines":[{"line_number":204,"context_line":"            volume.consistencygroup \u003d consistencygroup"},{"line_number":205,"context_line":"        if \u0027snapshots\u0027 in expected_attrs:"},{"line_number":206,"context_line":"            snapshots \u003d base.obj_make_list("},{"line_number":207,"context_line":"                context, objects.SnapshotsList(context),"},{"line_number":208,"context_line":"                objects.Snapshots,"},{"line_number":209,"context_line":"                db_volume[\u0027snapshots\u0027])"},{"line_number":210,"context_line":"            volume.snapshots \u003d snapshots"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a26ad4f_782f2288","line":207,"in_reply_to":"1a26ad4f_c9c8fc24","updated":"2015-11-03 05:10:14.000000000","message":"+1","commit_id":"b92d2725be358046f1f4ca927195b13082c69916"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"aac7a94b81da11c3fa92065721d6107b63550db1","unresolved":false,"context_lines":[{"line_number":205,"context_line":"        if \u0027snapshots\u0027 in expected_attrs:"},{"line_number":206,"context_line":"            snapshots \u003d base.obj_make_list("},{"line_number":207,"context_line":"                context, objects.SnapshotsList(context),"},{"line_number":208,"context_line":"                objects.Snapshots,"},{"line_number":209,"context_line":"                db_volume[\u0027snapshots\u0027])"},{"line_number":210,"context_line":"            volume.snapshots \u003d snapshots"},{"line_number":211,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a26ad4f_6953e86b","line":208,"updated":"2015-11-02 18:27:15.000000000","message":"s/Snapshots/Snapshot","commit_id":"b92d2725be358046f1f4ca927195b13082c69916"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c2a3b38265bac5805b41cda93a6eb1bb5d4c1025","unresolved":false,"context_lines":[{"line_number":205,"context_line":"        if \u0027snapshots\u0027 in expected_attrs:"},{"line_number":206,"context_line":"            snapshots \u003d base.obj_make_list("},{"line_number":207,"context_line":"                context, objects.SnapshotsList(context),"},{"line_number":208,"context_line":"                objects.Snapshots,"},{"line_number":209,"context_line":"                db_volume[\u0027snapshots\u0027])"},{"line_number":210,"context_line":"            volume.snapshots \u003d snapshots"},{"line_number":211,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a26ad4f_f80b3222","line":208,"in_reply_to":"1a26ad4f_6953e86b","updated":"2015-11-03 05:10:14.000000000","message":"+1","commit_id":"b92d2725be358046f1f4ca927195b13082c69916"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"205aff7c3fce76d94fe26e4a6f3a710f5c8a9bf1","unresolved":false,"context_lines":[{"line_number":205,"context_line":"        if \u0027snapshots\u0027 in expected_attrs:"},{"line_number":206,"context_line":"            snapshots \u003d base.obj_make_list("},{"line_number":207,"context_line":"                context, objects.SnapshotsList(context),"},{"line_number":208,"context_line":"                objects.Snapshots,"},{"line_number":209,"context_line":"                db_volume[\u0027snapshots\u0027])"},{"line_number":210,"context_line":"            volume.snapshots \u003d snapshots"},{"line_number":211,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_b4b0c544","line":208,"in_reply_to":"1a26ad4f_f80b3222","updated":"2015-11-04 19:17:36.000000000","message":"The same as above","commit_id":"b92d2725be358046f1f4ca927195b13082c69916"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"aac7a94b81da11c3fa92065721d6107b63550db1","unresolved":false,"context_lines":[{"line_number":259,"context_line":"                self.admin_metadata \u003d db.volume_admin_metadata_update("},{"line_number":260,"context_line":"                    self._context, self.id, metadata, True)"},{"line_number":261,"context_line":"            if \u0027glance_metadata\u0027 in updates:"},{"line_number":262,"context_line":"                updates.pop(\u0027glance_metadata\u0027, None)"},{"line_number":263,"context_line":"                raise exception.ObjectActionError("},{"line_number":264,"context_line":"                    action\u003d\u0027save\u0027, reason\u003d_(\u0027glance_metadata changed\u0027))"},{"line_number":265,"context_line":"            if \u0027snapshots\u0027 in updates:"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a26ad4f_8980c4c0","line":262,"updated":"2015-11-02 18:27:15.000000000","message":"You don\u0027t need to pop that key - you\u0027re raising an exception anyway.","commit_id":"b92d2725be358046f1f4ca927195b13082c69916"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"732ab01999d524c28e9295f8409fe33e561985ac","unresolved":false,"context_lines":[{"line_number":259,"context_line":"                metadata \u003d updates.pop(\u0027admin_metadata\u0027, None)"},{"line_number":260,"context_line":"                self.admin_metadata \u003d db.volume_admin_metadata_update("},{"line_number":261,"context_line":"                    self._context, self.id, metadata, True)"},{"line_number":262,"context_line":"            if \u0027glance_metadata\u0027 in updates:"},{"line_number":263,"context_line":"                raise exception.ObjectActionError("},{"line_number":264,"context_line":"                    action\u003d\u0027save\u0027, reason\u003d_(\u0027glance_metadata changed\u0027))"},{"line_number":265,"context_line":"            if \u0027snapshots\u0027 in updates:"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_bbdf090c","line":262,"updated":"2015-11-18 15:37:43.000000000","message":"These if statements should go before \"if \u0027metadata\u0027 in updates:\", so that the save will fail before making any changes to the db.","commit_id":"a125a28b685cb670208953387566ce8d40761a0d"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"142f753cef2302bb65abf211510f8f372d6a2b82","unresolved":false,"context_lines":[{"line_number":232,"context_line":"            raise exception.ObjectActionError("},{"line_number":233,"context_line":"                action\u003d\u0027create\u0027, reason\u003d_(\u0027consistencygroup assigned\u0027))"},{"line_number":234,"context_line":"        if \u0027glance_metadata\u0027 in updates:"},{"line_number":235,"context_line":"                raise exception.ObjectActionError("},{"line_number":236,"context_line":"                    action\u003d\u0027save\u0027, reason\u003d_(\u0027glance_metadata assigned\u0027))"},{"line_number":237,"context_line":"        if \u0027snapshots\u0027 in updates:"},{"line_number":238,"context_line":"            raise exception.ObjectActionError("}],"source_content_type":"text/x-python","patch_set":5,"id":"ba8a016a_f63e86d9","line":235,"updated":"2015-11-20 16:28:49.000000000","message":"Should we raise in that case? So how do we actually set glance_metadata when creating a volume? I wonder what how it works with volume_metadata and volume_admin_metadata.","commit_id":"03de20190ac3ff6abea7d90d0428b5c9c22a3f1b"},{"author":{"_account_id":12825,"name":"Szymon Wróblewski","email":"szymon.wroblewski@ovhcloud.com","username":"bluex"},"change_message_id":"0ae4880bf4daaac7ad6a8461ed47458e246efc67","unresolved":false,"context_lines":[{"line_number":232,"context_line":"            raise exception.ObjectActionError("},{"line_number":233,"context_line":"                action\u003d\u0027create\u0027, reason\u003d_(\u0027consistencygroup assigned\u0027))"},{"line_number":234,"context_line":"        if \u0027glance_metadata\u0027 in updates:"},{"line_number":235,"context_line":"                raise exception.ObjectActionError("},{"line_number":236,"context_line":"                    action\u003d\u0027save\u0027, reason\u003d_(\u0027glance_metadata assigned\u0027))"},{"line_number":237,"context_line":"        if \u0027snapshots\u0027 in updates:"},{"line_number":238,"context_line":"            raise exception.ObjectActionError("}],"source_content_type":"text/x-python","patch_set":5,"id":"ba8a016a_291b13cc","line":235,"in_reply_to":"ba8a016a_f63e86d9","updated":"2015-11-23 14:16:27.000000000","message":"We should - glance_metadata is currently read only value, because db api don\u0027t support conversion from VO dict metadata format to [{key: ..., value: ...}, ...] format for this field.","commit_id":"03de20190ac3ff6abea7d90d0428b5c9c22a3f1b"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"7a9b3143c945eada5b36d46c50e69c98a14383c7","unresolved":false,"context_lines":[{"line_number":181,"context_line":"            if metadata:"},{"line_number":182,"context_line":"                volume.admin_metadata \u003d {item[\u0027key\u0027]: item[\u0027value\u0027]"},{"line_number":183,"context_line":"                                         for item in metadata}"},{"line_number":184,"context_line":"        if \u0027glance_metadata\u0027 in expected_attrs:"},{"line_number":185,"context_line":"            volume.glance_metadata \u003d {}"},{"line_number":186,"context_line":"            metadata \u003d db_volume.get(\u0027volume_glance_metadata\u0027, [])"},{"line_number":187,"context_line":"            if metadata:"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_8e0c53ee","line":184,"updated":"2015-11-26 11:22:00.000000000","message":"We don\u0027t get this information on any joined load we currently have, but I\u0027m ok with future proofing this.","commit_id":"fc965c4f08872128194f6e16dc859171feaa1302"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"8ed7793aaa6b7b4db2b48fb09aa6c5e9b6f71356","unresolved":false,"context_lines":[{"line_number":181,"context_line":"            if metadata:"},{"line_number":182,"context_line":"                volume.admin_metadata \u003d {item[\u0027key\u0027]: item[\u0027value\u0027]"},{"line_number":183,"context_line":"                                         for item in metadata}"},{"line_number":184,"context_line":"        if \u0027glance_metadata\u0027 in expected_attrs:"},{"line_number":185,"context_line":"            volume.glance_metadata \u003d {}"},{"line_number":186,"context_line":"            metadata \u003d db_volume.get(\u0027volume_glance_metadata\u0027, [])"},{"line_number":187,"context_line":"            if metadata:"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_f73286f1","line":184,"in_reply_to":"9a8ffd7b_8e0c53ee","updated":"2015-11-26 14:32:35.000000000","message":"Calling db_volume.get will cause it to be lazy loaded from the DB. I think this is totally fine.","commit_id":"fc965c4f08872128194f6e16dc859171feaa1302"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"7a9b3143c945eada5b36d46c50e69c98a14383c7","unresolved":false,"context_lines":[{"line_number":205,"context_line":"                                             consistencygroup,"},{"line_number":206,"context_line":"                                             db_volume[\u0027consistencygroup\u0027])"},{"line_number":207,"context_line":"            volume.consistencygroup \u003d consistencygroup"},{"line_number":208,"context_line":"        if \u0027snapshots\u0027 in expected_attrs:"},{"line_number":209,"context_line":"            snapshots \u003d base.obj_make_list("},{"line_number":210,"context_line":"                context, objects.SnapshotList(context),"},{"line_number":211,"context_line":"                objects.Snapshot,"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_2e0d27e8","line":208,"updated":"2015-11-26 11:22:00.000000000","message":"We don\u0027t get this information on any joined load we currently have, but I\u0027m ok with future proofing this.","commit_id":"fc965c4f08872128194f6e16dc859171feaa1302"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"8ed7793aaa6b7b4db2b48fb09aa6c5e9b6f71356","unresolved":false,"context_lines":[{"line_number":205,"context_line":"                                             consistencygroup,"},{"line_number":206,"context_line":"                                             db_volume[\u0027consistencygroup\u0027])"},{"line_number":207,"context_line":"            volume.consistencygroup \u003d consistencygroup"},{"line_number":208,"context_line":"        if \u0027snapshots\u0027 in expected_attrs:"},{"line_number":209,"context_line":"            snapshots \u003d base.obj_make_list("},{"line_number":210,"context_line":"                context, objects.SnapshotList(context),"},{"line_number":211,"context_line":"                objects.Snapshot,"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_b74f1e6a","line":208,"in_reply_to":"9a8ffd7b_2e0d27e8","updated":"2015-11-26 14:32:35.000000000","message":"ditto","commit_id":"fc965c4f08872128194f6e16dc859171feaa1302"}],"cinder/tests/unit/fake_volume.py":[{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"732ab01999d524c28e9295f8409fe33e561985ac","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        \u0027previous_status\u0027: None,"},{"line_number":29,"context_line":"        \u0027volume_attachment\u0027: [],"},{"line_number":30,"context_line":"        \u0027volume_metadata\u0027: {},"},{"line_number":31,"context_line":"        \u0027volume_admin_metadata\u0027: {},"},{"line_number":32,"context_line":"        \u0027volume_glance_metadata\u0027: {},"},{"line_number":33,"context_line":"        \u0027snapshots\u0027: [],"},{"line_number":34,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_1bedf5ee","line":31,"updated":"2015-11-18 15:37:43.000000000","message":"volume_admin_metadata, volume_metadata, and volume_glance_metadata are lists of key/values dicts, i.e. [{key: key1, value: value1}, {key: key2, value: value2}].  It is not a dict.","commit_id":"a125a28b685cb670208953387566ce8d40761a0d"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"142f753cef2302bb65abf211510f8f372d6a2b82","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        \u0027volume_admin_metadata\u0027: [],"},{"line_number":32,"context_line":"        \u0027volume_glance_metadata\u0027: [],"},{"line_number":33,"context_line":"        \u0027snapshots\u0027: [],"},{"line_number":34,"context_line":"    }"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    for name, field in objects.Volume.fields.items():"},{"line_number":37,"context_line":"        if name in db_volume:"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba8a016a_117314b6","line":34,"updated":"2015-11-20 16:28:49.000000000","message":"Yup, I agree with these changes. metadata and admin_metadata are not a part of volume.","commit_id":"03de20190ac3ff6abea7d90d0428b5c9c22a3f1b"}],"cinder/tests/unit/objects/test_objects.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"0dd634c3fff86ac0a2aa81ffee02d7af7722e95c","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    \u0027ServiceList\u0027: \u00271.0-d242d3384b68e5a5a534e090ff1d5161\u0027,"},{"line_number":33,"context_line":"    \u0027Snapshot\u0027: \u00271.0-a6c33eefeadefb324d79f72f66c54e9a\u0027,"},{"line_number":34,"context_line":"    \u0027SnapshotList\u0027: \u00271.0-71661e7180ef6cc51501704a9bea4bf1\u0027,"},{"line_number":35,"context_line":"    \u0027Volume\u0027: \u00271.2-bd05517115ea1f637045af01d69c6aa4\u0027,"},{"line_number":36,"context_line":"    \u0027VolumeAttachment\u0027: \u00271.0-f14a7c03ffc5b93701d496251a5263aa\u0027,"},{"line_number":37,"context_line":"    \u0027VolumeAttachmentList\u0027: \u00271.0-307d2b6c8dd55ef854f6386898e9e98e\u0027,"},{"line_number":38,"context_line":"    \u0027VolumeList\u0027: \u00271.1-03ba6cb8c546683e64e15c50042cb1a3\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba8a016a_ae929449","line":35,"updated":"2015-11-23 19:08:15.000000000","message":"All the versions changed when Gorka\u0027s patch got in. You\u0027re restoring your previous version, which causes UT failure.","commit_id":"6737cab2ece14952daf3a3b417c95f7c5d68d792"}],"cinder/tests/unit/objects/test_volume.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"aac7a94b81da11c3fa92065721d6107b63550db1","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        admin_metadata_update.assert_called_once_with("},{"line_number":104,"context_line":"            admin_context, volume.id, {\u0027key1\u0027: \u0027value1\u0027}, True)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    @mock.patch(\u0027cinder.db.volume_glance_metadata_get\u0027)"},{"line_number":107,"context_line":"    @mock.patch(\u0027cinder.db.volume_update\u0027)"},{"line_number":108,"context_line":"    def test_save_with_glance_metadata(self, volume_update,"},{"line_number":109,"context_line":"                                       glance_metadata_update):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a26ad4f_0974b433","line":106,"updated":"2015-11-02 18:27:15.000000000","message":"Why do you need to mock glance_metadata_get?","commit_id":"b92d2725be358046f1f4ca927195b13082c69916"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"aac7a94b81da11c3fa92065721d6107b63550db1","unresolved":false,"context_lines":[{"line_number":104,"context_line":"            admin_context, volume.id, {\u0027key1\u0027: \u0027value1\u0027}, True)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    @mock.patch(\u0027cinder.db.volume_glance_metadata_get\u0027)"},{"line_number":107,"context_line":"    @mock.patch(\u0027cinder.db.volume_update\u0027)"},{"line_number":108,"context_line":"    def test_save_with_glance_metadata(self, volume_update,"},{"line_number":109,"context_line":"                                       glance_metadata_update):"},{"line_number":110,"context_line":"        db_volume \u003d fake_volume.fake_db_volume()"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a26ad4f_29edf0b6","line":107,"updated":"2015-11-02 18:27:15.000000000","message":"You don\u0027t need to mock that either.","commit_id":"b92d2725be358046f1f4ca927195b13082c69916"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"aac7a94b81da11c3fa92065721d6107b63550db1","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    @mock.patch(\u0027cinder.db.volume_glance_metadata_get\u0027)"},{"line_number":107,"context_line":"    @mock.patch(\u0027cinder.db.volume_update\u0027)"},{"line_number":108,"context_line":"    def test_save_with_glance_metadata(self, volume_update,"},{"line_number":109,"context_line":"                                       glance_metadata_update):"},{"line_number":110,"context_line":"        db_volume \u003d fake_volume.fake_db_volume()"},{"line_number":111,"context_line":"        volume \u003d objects.Volume._from_db_object(self.context,"},{"line_number":112,"context_line":"                                                objects.Volume(), db_volume)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a26ad4f_49414ca8","line":109,"updated":"2015-11-02 18:27:15.000000000","message":"This is glance_metadata_get actually. Anyway this should be removed IMO.","commit_id":"b92d2725be358046f1f4ca927195b13082c69916"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"732ab01999d524c28e9295f8409fe33e561985ac","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        # oslo_context. We change it to our RequestContext implementation"},{"line_number":30,"context_line":"        # to have \u0027elevated\u0027 method"},{"line_number":31,"context_line":"        self.context \u003d context.RequestContext(self.user_id, self.project_id,"},{"line_number":32,"context_line":"                                              is_admin\u003dFalse)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    @staticmethod"},{"line_number":35,"context_line":"    def _compare(test, db, obj):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_1bee55b4","line":32,"updated":"2015-11-18 15:37:43.000000000","message":"This setUp is redundant because it is already handled by default - https://github.com/openstack/cinder/blob/master/cinder/tests/unit/objects/__init__.py#L27.","commit_id":"a125a28b685cb670208953387566ce8d40761a0d"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"7a9b3143c945eada5b36d46c50e69c98a14383c7","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from cinder.tests.unit import fake_snapshot"},{"line_number":20,"context_line":"from cinder.tests.unit import fake_volume"},{"line_number":21,"context_line":"from cinder.tests.unit import objects as test_objects"},{"line_number":22,"context_line":"import mock"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class TestVolume(test_objects.BaseObjectsTestCase):"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_aec6f765","line":22,"updated":"2015-11-26 11:22:00.000000000","message":"-1: This should go before all the cinder imports as it was before.","commit_id":"fc965c4f08872128194f6e16dc859171feaa1302"},{"author":{"_account_id":12825,"name":"Szymon Wróblewski","email":"szymon.wroblewski@ovhcloud.com","username":"bluex"},"change_message_id":"131a72319852aadff8d7f4a3eb9cb3b5fb08ef62","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from cinder.tests.unit import fake_snapshot"},{"line_number":20,"context_line":"from cinder.tests.unit import fake_volume"},{"line_number":21,"context_line":"from cinder.tests.unit import objects as test_objects"},{"line_number":22,"context_line":"import mock"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class TestVolume(test_objects.BaseObjectsTestCase):"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_467722d3","line":22,"in_reply_to":"9a8ffd7b_aec6f765","updated":"2015-11-26 15:44:45.000000000","message":"Done","commit_id":"fc965c4f08872128194f6e16dc859171feaa1302"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"7a9b3143c945eada5b36d46c50e69c98a14383c7","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    def _compare(test, db, obj):"},{"line_number":28,"context_line":"        for key in db.keys():"},{"line_number":29,"context_line":"            if key.endswith(\u0027metadata\u0027):"},{"line_number":30,"context_line":"                del db[key]"},{"line_number":31,"context_line":"        test_objects.BaseObjectsTestCase._compare(test, db, obj)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    @mock.patch(\u0027cinder.db.sqlalchemy.api.volume_get\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_eea5dfa1","line":30,"updated":"2015-11-26 11:22:00.000000000","message":"-1: If the method is called _compare it should not alter any of the arguments.","commit_id":"fc965c4f08872128194f6e16dc859171feaa1302"},{"author":{"_account_id":12825,"name":"Szymon Wróblewski","email":"szymon.wroblewski@ovhcloud.com","username":"bluex"},"change_message_id":"131a72319852aadff8d7f4a3eb9cb3b5fb08ef62","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    def _compare(test, db, obj):"},{"line_number":28,"context_line":"        for key in db.keys():"},{"line_number":29,"context_line":"            if key.endswith(\u0027metadata\u0027):"},{"line_number":30,"context_line":"                del db[key]"},{"line_number":31,"context_line":"        test_objects.BaseObjectsTestCase._compare(test, db, obj)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    @mock.patch(\u0027cinder.db.sqlalchemy.api.volume_get\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_da28c288","line":30,"in_reply_to":"9a8ffd7b_eea5dfa1","updated":"2015-11-26 15:44:45.000000000","message":"Done","commit_id":"fc965c4f08872128194f6e16dc859171feaa1302"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"8ed7793aaa6b7b4db2b48fb09aa6c5e9b6f71356","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    def _compare(test, db, obj):"},{"line_number":28,"context_line":"        for key in db.keys():"},{"line_number":29,"context_line":"            if key.endswith(\u0027metadata\u0027):"},{"line_number":30,"context_line":"                del db[key]"},{"line_number":31,"context_line":"        test_objects.BaseObjectsTestCase._compare(test, db, obj)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    @mock.patch(\u0027cinder.db.sqlalchemy.api.volume_get\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_7724565f","line":30,"in_reply_to":"9a8ffd7b_eea5dfa1","updated":"2015-11-26 14:32:35.000000000","message":"Hm, yeah, we should be able to compare at least volume_metadata, volume_glance_metadata and volume_admin_metadata. I\u0027m not sure though how it works out in our complicated test_volume stuff…","commit_id":"fc965c4f08872128194f6e16dc859171feaa1302"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"7a9b3143c945eada5b36d46c50e69c98a14383c7","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        admin_metadata_update.assert_called_once_with("},{"line_number":105,"context_line":"            admin_context, volume.id, {\u0027key1\u0027: \u0027value1\u0027}, True)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def test_save_with_glance_metadata(self):"},{"line_number":108,"context_line":"        db_volume \u003d fake_volume.fake_db_volume()"},{"line_number":109,"context_line":"        volume \u003d objects.Volume._from_db_object(self.context,"},{"line_number":110,"context_line":"                                                objects.Volume(), db_volume)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_ae47d7ba","line":107,"updated":"2015-11-26 11:22:00.000000000","message":"-1: Why are there no tests like this one for the other 2 new fields?","commit_id":"fc965c4f08872128194f6e16dc859171feaa1302"},{"author":{"_account_id":12825,"name":"Szymon Wróblewski","email":"szymon.wroblewski@ovhcloud.com","username":"bluex"},"change_message_id":"131a72319852aadff8d7f4a3eb9cb3b5fb08ef62","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        admin_metadata_update.assert_called_once_with("},{"line_number":105,"context_line":"            admin_context, volume.id, {\u0027key1\u0027: \u0027value1\u0027}, True)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def test_save_with_glance_metadata(self):"},{"line_number":108,"context_line":"        db_volume \u003d fake_volume.fake_db_volume()"},{"line_number":109,"context_line":"        volume \u003d objects.Volume._from_db_object(self.context,"},{"line_number":110,"context_line":"                                                objects.Volume(), db_volume)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_c66a32ee","line":107,"in_reply_to":"9a8ffd7b_ae47d7ba","updated":"2015-11-26 15:44:45.000000000","message":"Done","commit_id":"fc965c4f08872128194f6e16dc859171feaa1302"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"7a9b3143c945eada5b36d46c50e69c98a14383c7","unresolved":false,"context_lines":[{"line_number":239,"context_line":"        }"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"        db_volume \u003d fake_volume.fake_db_volume()"},{"line_number":242,"context_line":"        db_volume.update(update_for_fake_volume)"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        volume \u003d objects.Volume._from_db_object(self.context, objects.Volume(),"},{"line_number":245,"context_line":"                                                db_volume, expected_attrs)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_8e1f736b","line":242,"updated":"2015-11-26 11:22:00.000000000","message":"nit: You could pass update_for_fake_volume directly to fake_db_volume and skip this line.","commit_id":"fc965c4f08872128194f6e16dc859171feaa1302"},{"author":{"_account_id":12825,"name":"Szymon Wróblewski","email":"szymon.wroblewski@ovhcloud.com","username":"bluex"},"change_message_id":"131a72319852aadff8d7f4a3eb9cb3b5fb08ef62","unresolved":false,"context_lines":[{"line_number":239,"context_line":"        }"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"        db_volume \u003d fake_volume.fake_db_volume()"},{"line_number":242,"context_line":"        db_volume.update(update_for_fake_volume)"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        volume \u003d objects.Volume._from_db_object(self.context, objects.Volume(),"},{"line_number":245,"context_line":"                                                db_volume, expected_attrs)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_e6a89622","line":242,"in_reply_to":"9a8ffd7b_8e1f736b","updated":"2015-11-26 15:44:45.000000000","message":"Done","commit_id":"fc965c4f08872128194f6e16dc859171feaa1302"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"7a9b3143c945eada5b36d46c50e69c98a14383c7","unresolved":false,"context_lines":[{"line_number":247,"context_line":"        self.assertEqual({\u0027foo\u0027: \u0027bar\u0027}, volume.metadata)"},{"line_number":248,"context_line":"        self.assertEqual({\u0027admin_foo\u0027: \u0027admin_bar\u0027}, volume.admin_metadata)"},{"line_number":249,"context_line":"        self.assertEqual({\u0027glance_foo\u0027: \u0027glance_bar\u0027}, volume.glance_metadata)"},{"line_number":250,"context_line":"        super(TestVolume, self)._compare(self, db_volume_type,"},{"line_number":251,"context_line":"                                         volume.volume_type)"},{"line_number":252,"context_line":"        super(TestVolume, self)._compare(self, db_volume_attachments,"},{"line_number":253,"context_line":"                                         volume.volume_attachment)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_f9b12748","line":250,"updated":"2015-11-26 11:22:00.000000000","message":"?: Why can\u0027t we call self._compare?","commit_id":"fc965c4f08872128194f6e16dc859171feaa1302"},{"author":{"_account_id":12825,"name":"Szymon Wróblewski","email":"szymon.wroblewski@ovhcloud.com","username":"bluex"},"change_message_id":"131a72319852aadff8d7f4a3eb9cb3b5fb08ef62","unresolved":false,"context_lines":[{"line_number":247,"context_line":"        self.assertEqual({\u0027foo\u0027: \u0027bar\u0027}, volume.metadata)"},{"line_number":248,"context_line":"        self.assertEqual({\u0027admin_foo\u0027: \u0027admin_bar\u0027}, volume.admin_metadata)"},{"line_number":249,"context_line":"        self.assertEqual({\u0027glance_foo\u0027: \u0027glance_bar\u0027}, volume.glance_metadata)"},{"line_number":250,"context_line":"        super(TestVolume, self)._compare(self, db_volume_type,"},{"line_number":251,"context_line":"                                         volume.volume_type)"},{"line_number":252,"context_line":"        super(TestVolume, self)._compare(self, db_volume_attachments,"},{"line_number":253,"context_line":"                                         volume.volume_attachment)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_a665ae1e","line":250,"in_reply_to":"9a8ffd7b_f9b12748","updated":"2015-11-26 15:44:45.000000000","message":"Fixed","commit_id":"fc965c4f08872128194f6e16dc859171feaa1302"}],"cinder/volume/manager.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"00546ce12b720a5e41af1dc3f53905b4baeea60a","unresolved":false,"context_lines":[{"line_number":1604,"context_line":"        del new_vol_values[\u0027id\u0027]"},{"line_number":1605,"context_line":"        del new_vol_values[\u0027_name_id\u0027]"},{"line_number":1606,"context_line":"        if \u0027consistencygroup\u0027 in new_vol_values:"},{"line_number":1607,"context_line":"            del new_vol_values[\u0027consistencygroup\u0027]"},{"line_number":1608,"context_line":"        new_vol_values.pop(\u0027name\u0027, None)"},{"line_number":1609,"context_line":"        # We don\u0027t copy volume_type because the db sets that according to"},{"line_number":1610,"context_line":"        # volume_type_id, which we do copy"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_f9f3879c","line":1607,"updated":"2015-11-17 21:40:16.000000000","message":"Why do we need to remove the key here?  If a volume has consistencygroup_id, migrate_volume will be blocked in the volume API.","commit_id":"a125a28b685cb670208953387566ce8d40761a0d"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"6070605981ca41d949aaabc29f7f18b97dd24e39","unresolved":false,"context_lines":[{"line_number":1604,"context_line":"        del new_vol_values[\u0027id\u0027]"},{"line_number":1605,"context_line":"        del new_vol_values[\u0027_name_id\u0027]"},{"line_number":1606,"context_line":"        if \u0027consistencygroup\u0027 in new_vol_values:"},{"line_number":1607,"context_line":"            del new_vol_values[\u0027consistencygroup\u0027]"},{"line_number":1608,"context_line":"        new_vol_values.pop(\u0027name\u0027, None)"},{"line_number":1609,"context_line":"        # We don\u0027t copy volume_type because the db sets that according to"},{"line_number":1610,"context_line":"        # volume_type_id, which we do copy"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_e2cad96d","line":1607,"in_reply_to":"ba8a016a_f9f3879c","updated":"2015-11-18 09:48:28.000000000","message":"Same reason as few lines below for volume_type. This is just a relationship that\u0027s present in DB object and we shouldn\u0027t set it when creating a new DB entry using ovo (even if it will be set to None - ovo will recognize it as changed).\n\nThis commit was failing tempest before we\u0027ve removed it here.\nPlease also note that consistencygroup_id is passed correctly (and if there\u0027s a relationship consistencygroup field in object will be lazy-loaded).","commit_id":"a125a28b685cb670208953387566ce8d40761a0d"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"142f753cef2302bb65abf211510f8f372d6a2b82","unresolved":false,"context_lines":[{"line_number":1604,"context_line":"        skip \u003d {\u0027id\u0027, \u0027_name_id\u0027, \u0027name\u0027, \u0027host\u0027, \u0027status\u0027,"},{"line_number":1605,"context_line":"                \u0027attach_status\u0027, \u0027migration_status\u0027, \u0027volume_type\u0027,"},{"line_number":1606,"context_line":"                \u0027consistencygroup\u0027, \u0027volume_attachment\u0027}"},{"line_number":1607,"context_line":"        # We don\u0027t copy volume_type because the db sets that according to"},{"line_number":1608,"context_line":"        # volume_type_id, which we do copy"},{"line_number":1609,"context_line":"        new_vol_values \u003d {k: volume[k] for k in set(volume.keys()) - skip}"},{"line_number":1610,"context_line":"        if new_type_id:"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba8a016a_914aa426","line":1607,"updated":"2015-11-20 16:28:49.000000000","message":"We should change that comment to reflect what\u0027s we\u0027re doing now - removing all the relationships and the columns we don\u0027t want to copy.","commit_id":"03de20190ac3ff6abea7d90d0428b5c9c22a3f1b"},{"author":{"_account_id":12825,"name":"Szymon Wróblewski","email":"szymon.wroblewski@ovhcloud.com","username":"bluex"},"change_message_id":"0ae4880bf4daaac7ad6a8461ed47458e246efc67","unresolved":false,"context_lines":[{"line_number":1604,"context_line":"        skip \u003d {\u0027id\u0027, \u0027_name_id\u0027, \u0027name\u0027, \u0027host\u0027, \u0027status\u0027,"},{"line_number":1605,"context_line":"                \u0027attach_status\u0027, \u0027migration_status\u0027, \u0027volume_type\u0027,"},{"line_number":1606,"context_line":"                \u0027consistencygroup\u0027, \u0027volume_attachment\u0027}"},{"line_number":1607,"context_line":"        # We don\u0027t copy volume_type because the db sets that according to"},{"line_number":1608,"context_line":"        # volume_type_id, which we do copy"},{"line_number":1609,"context_line":"        new_vol_values \u003d {k: volume[k] for k in set(volume.keys()) - skip}"},{"line_number":1610,"context_line":"        if new_type_id:"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba8a016a_e97bcbf2","line":1607,"in_reply_to":"ba8a016a_914aa426","updated":"2015-11-23 14:16:27.000000000","message":"Done","commit_id":"03de20190ac3ff6abea7d90d0428b5c9c22a3f1b"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"7a9b3143c945eada5b36d46c50e69c98a14383c7","unresolved":false,"context_lines":[{"line_number":1601,"context_line":""},{"line_number":1602,"context_line":"        # Create new volume on remote host"},{"line_number":1603,"context_line":""},{"line_number":1604,"context_line":"        skip \u003d {\u0027id\u0027, \u0027_name_id\u0027, \u0027name\u0027, \u0027host\u0027, \u0027status\u0027,"},{"line_number":1605,"context_line":"                \u0027attach_status\u0027, \u0027migration_status\u0027, \u0027volume_type\u0027,"},{"line_number":1606,"context_line":"                \u0027consistencygroup\u0027, \u0027volume_attachment\u0027}"},{"line_number":1607,"context_line":"        # We don\u0027t copy volume_type, consistencygroup and volume_attachment,"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_f94da73e","line":1604,"updated":"2015-11-26 11:22:00.000000000","message":"-1: This should not be part of this patch","commit_id":"fc965c4f08872128194f6e16dc859171feaa1302"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"f3f5796c11e86961f86eb3d832107c71b4c90c09","unresolved":false,"context_lines":[{"line_number":1601,"context_line":""},{"line_number":1602,"context_line":"        # Create new volume on remote host"},{"line_number":1603,"context_line":""},{"line_number":1604,"context_line":"        skip \u003d {\u0027id\u0027, \u0027_name_id\u0027, \u0027name\u0027, \u0027host\u0027, \u0027status\u0027,"},{"line_number":1605,"context_line":"                \u0027attach_status\u0027, \u0027migration_status\u0027, \u0027volume_type\u0027,"},{"line_number":1606,"context_line":"                \u0027consistencygroup\u0027, \u0027volume_attachment\u0027}"},{"line_number":1607,"context_line":"        # We don\u0027t copy volume_type, consistencygroup and volume_attachment,"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_ec0c823d","line":1604,"in_reply_to":"9a8ffd7b_13757130","updated":"2015-11-30 15:51:06.000000000","message":"Actually I believe that without removing consistencygroup from new_vol_values migration will fail on functional Cinder. We\u0027re using new_vol_values ORM object to populate a Volume object. Now populating in __init__ works by iterating over keyword arguments and setting them on the object. As we\u0027ve added a new constraint that consistencygroup attribute shouldn\u0027t be set on a newly created object - without removing consistencygroup creation fails.\n\nPlease notice that I\u0027m talking about rpcapi.create_volume call which accepts ovo and not ORM objects.\n\nNow to remove relationships we can simply add new lines that pop or delete keys from new_vol_values, but if we need to change it anyway - why not refactor this?","commit_id":"fc965c4f08872128194f6e16dc859171feaa1302"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"d1a3eaa98c1cf358b85afc47eb3b903dfe85f77f","unresolved":false,"context_lines":[{"line_number":1601,"context_line":""},{"line_number":1602,"context_line":"        # Create new volume on remote host"},{"line_number":1603,"context_line":""},{"line_number":1604,"context_line":"        skip \u003d {\u0027id\u0027, \u0027_name_id\u0027, \u0027name\u0027, \u0027host\u0027, \u0027status\u0027,"},{"line_number":1605,"context_line":"                \u0027attach_status\u0027, \u0027migration_status\u0027, \u0027volume_type\u0027,"},{"line_number":1606,"context_line":"                \u0027consistencygroup\u0027, \u0027volume_attachment\u0027}"},{"line_number":1607,"context_line":"        # We don\u0027t copy volume_type, consistencygroup and volume_attachment,"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_13757130","line":1604,"in_reply_to":"9a8ffd7b_9738da3e","updated":"2015-11-30 13:01:27.000000000","message":"The tests may fail because they are incorrect, but migration will not fail when cinder is really running.\n\nvolume argument is an ORM object and not a versioned object (at least for now), so those new fields in the VO will not change anything.\n\nThey may be present in the tests (and that\u0027s why they fail) because the tests are passing a versioned object instead of an ORM object as they should be doing.  So what needs fixing are the tests, not the code here.","commit_id":"fc965c4f08872128194f6e16dc859171feaa1302"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f91854d2345159c2ece71b90248bcb7f34f7609f","unresolved":false,"context_lines":[{"line_number":1601,"context_line":""},{"line_number":1602,"context_line":"        # Create new volume on remote host"},{"line_number":1603,"context_line":""},{"line_number":1604,"context_line":"        skip \u003d {\u0027id\u0027, \u0027_name_id\u0027, \u0027name\u0027, \u0027host\u0027, \u0027status\u0027,"},{"line_number":1605,"context_line":"                \u0027attach_status\u0027, \u0027migration_status\u0027, \u0027volume_type\u0027,"},{"line_number":1606,"context_line":"                \u0027consistencygroup\u0027, \u0027volume_attachment\u0027}"},{"line_number":1607,"context_line":"        # We don\u0027t copy volume_type, consistencygroup and volume_attachment,"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_66aac587","line":1604,"in_reply_to":"9a8ffd7b_ec0c823d","updated":"2015-12-01 10:43:23.000000000","message":"It looks like you are right, I just assumed (my bad) that Versioned Objects had a more sensible implementation and that you could only initialize existing fields and extra fields, and fail otherwise.  But it looks like you can create new attributes on the object by passing any key argument on the init call.\n\nBy the way, I had nothing against the refactoring, as it looked really neat.","commit_id":"fc965c4f08872128194f6e16dc859171feaa1302"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"8ed7793aaa6b7b4db2b48fb09aa6c5e9b6f71356","unresolved":false,"context_lines":[{"line_number":1601,"context_line":""},{"line_number":1602,"context_line":"        # Create new volume on remote host"},{"line_number":1603,"context_line":""},{"line_number":1604,"context_line":"        skip \u003d {\u0027id\u0027, \u0027_name_id\u0027, \u0027name\u0027, \u0027host\u0027, \u0027status\u0027,"},{"line_number":1605,"context_line":"                \u0027attach_status\u0027, \u0027migration_status\u0027, \u0027volume_type\u0027,"},{"line_number":1606,"context_line":"                \u0027consistencygroup\u0027, \u0027volume_attachment\u0027}"},{"line_number":1607,"context_line":"        # We don\u0027t copy volume_type, consistencygroup and volume_attachment,"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_9738da3e","line":1604,"in_reply_to":"9a8ffd7b_f94da73e","updated":"2015-11-26 14:32:35.000000000","message":"Why not? Migration will fail after adding consistencygroup to the object without these changes, because we\u0027re iterating over Volume object fields in it\u0027s __init__ and reading values. Now we have consistencygroup there which cannot be set on object (because it\u0027s just a relationship). We should pop it from the dict then.\n\nInstead of adding a new line like L1609, the patch is refactoring that for clarity. I don\u0027t see it as a problem.","commit_id":"fc965c4f08872128194f6e16dc859171feaa1302"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"88fbb8352af3558bca28c501a9c53153f9375ef7","unresolved":false,"context_lines":[{"line_number":1601,"context_line":""},{"line_number":1602,"context_line":"        # Create new volume on remote host"},{"line_number":1603,"context_line":""},{"line_number":1604,"context_line":"        skip \u003d {\u0027id\u0027, \u0027_name_id\u0027, \u0027name\u0027, \u0027host\u0027, \u0027status\u0027,"},{"line_number":1605,"context_line":"                \u0027attach_status\u0027, \u0027migration_status\u0027, \u0027volume_type\u0027,"},{"line_number":1606,"context_line":"                \u0027consistencygroup\u0027, \u0027volume_attachment\u0027}"},{"line_number":1607,"context_line":"        # We don\u0027t copy volume_type, consistencygroup and volume_attachment,"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a8ffd7b_13f1f194","line":1604,"updated":"2015-11-30 13:02:06.000000000","message":"-1: I insist, these changes in the code are not needed for this patch.  As I mention on patch 8 this is a problem in the tests, not in the code here.  Although these changes will be needed once `migrate_volume` moves to use VOs and I think this new code is more elegant, it doesn\u0027t belong in this patch.","commit_id":"f61670096cfd96bdea5c7a1c2bfa31cce468eb70"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"65087e8c27b5d45f43679f63ac272980e14ffc94","unresolved":false,"context_lines":[{"line_number":1600,"context_line":"        rpcapi \u003d volume_rpcapi.VolumeAPI()"},{"line_number":1601,"context_line":""},{"line_number":1602,"context_line":"        # Create new volume on remote host"},{"line_number":1603,"context_line":""},{"line_number":1604,"context_line":"        skip \u003d {\u0027id\u0027, \u0027_name_id\u0027, \u0027name\u0027, \u0027host\u0027, \u0027status\u0027,"},{"line_number":1605,"context_line":"                \u0027attach_status\u0027, \u0027migration_status\u0027, \u0027volume_type\u0027,"},{"line_number":1606,"context_line":"                \u0027consistencygroup\u0027, \u0027volume_attachment\u0027}"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a8ffd7b_bfdbbaec","line":1603,"updated":"2015-12-01 15:54:11.000000000","message":"Got a newline here that probably does not need to be here.","commit_id":"287c64ef4dc6e3ca5ff871dd9cb9d38906c21a6e"}]}
