)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"5c6d157413168664c46aa1b1a034bfe2518c057f","unresolved":false,"context_lines":[{"line_number":15,"context_line":"- delete"},{"line_number":16,"context_line":"- update"},{"line_number":17,"context_line":"- delete_cgsnapshot"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I67aec4cd8bcf2f7e09473a8d296aa383fe85ad23"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"7af24918_e1f04e69","line":18,"updated":"2016-03-04 14:11:39.000000000","message":"Don\u0027t we need a bug reference or at least the blueprint?","commit_id":"984e80eaa72a2f9d4ba7e0c0be98d349ea814b28"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"cbf53c933e453cc6165a53ec59d2c0283a34bf40","unresolved":false,"context_lines":[{"line_number":15,"context_line":"- delete"},{"line_number":16,"context_line":"- update"},{"line_number":17,"context_line":"- delete_cgsnapshot"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I67aec4cd8bcf2f7e09473a8d296aa383fe85ad23"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"7af24918_89a088f5","line":18,"in_reply_to":"7af24918_df6ecafe","updated":"2016-03-07 20:15:09.000000000","message":"We certainly do!!","commit_id":"984e80eaa72a2f9d4ba7e0c0be98d349ea814b28"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"0579d9809571575742803c55896e62d582d9d36c","unresolved":false,"context_lines":[{"line_number":15,"context_line":"- delete"},{"line_number":16,"context_line":"- update"},{"line_number":17,"context_line":"- delete_cgsnapshot"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I67aec4cd8bcf2f7e09473a8d296aa383fe85ad23"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"7af24918_df6ecafe","line":18,"in_reply_to":"7af24918_e1f04e69","updated":"2016-03-04 15:22:40.000000000","message":"+1\n\nI am also wondering why this one doesn\u0027t reference the blueprint and bugs like the other patches on this subject.","commit_id":"984e80eaa72a2f9d4ba7e0c0be98d349ea814b28"}],"cinder/consistencygroup/api.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"b906a79d9a994cd59826e41f9547fbf6151b4f61","unresolved":false,"context_lines":[{"line_number":451,"context_line":"        if not res:  # not group.conditional_update(values, expected, filters):"},{"line_number":452,"context_line":"            if force:"},{"line_number":453,"context_line":"                msg \u003d _(\u0027Consistency group must not have dependent cgsnapshots\u0027"},{"line_number":454,"context_line":"                        \u0027 or volumes with snapshots or attached.\u0027)"},{"line_number":455,"context_line":"            else:"},{"line_number":456,"context_line":"                msg \u003d _(\u0027Consistency group status must be available or error \u0027"},{"line_number":457,"context_line":"                        \u0027and must not have dependent cgsnapshots or volumes.\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a7b0d38_49bf8dfb","line":454,"updated":"2015-12-23 23:51:14.000000000","message":"Suggest rewording to the following:\n\nCannot delete consistency group \u003cgroup id\u003e.  Consistency group must not have attached volumes or volumes with snapshots or dependent cgsnapshots.","commit_id":"489357403c72b8fcdfec300aefab0b2fa7819870"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"8908f6c94917dcae0837e6bcc35161a67c842fb3","unresolved":false,"context_lines":[{"line_number":451,"context_line":"        if not res:  # not group.conditional_update(values, expected, filters):"},{"line_number":452,"context_line":"            if force:"},{"line_number":453,"context_line":"                msg \u003d _(\u0027Consistency group must not have dependent cgsnapshots\u0027"},{"line_number":454,"context_line":"                        \u0027 or volumes with snapshots or attached.\u0027)"},{"line_number":455,"context_line":"            else:"},{"line_number":456,"context_line":"                msg \u003d _(\u0027Consistency group status must be available or error \u0027"},{"line_number":457,"context_line":"                        \u0027and must not have dependent cgsnapshots or volumes.\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa69d971_d6314ca3","line":454,"in_reply_to":"1a7b0d38_49bf8dfb","updated":"2016-01-11 22:17:49.000000000","message":"Done","commit_id":"489357403c72b8fcdfec300aefab0b2fa7819870"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"b906a79d9a994cd59826e41f9547fbf6151b4f61","unresolved":false,"context_lines":[{"line_number":454,"context_line":"                        \u0027 or volumes with snapshots or attached.\u0027)"},{"line_number":455,"context_line":"            else:"},{"line_number":456,"context_line":"                msg \u003d _(\u0027Consistency group status must be available or error \u0027"},{"line_number":457,"context_line":"                        \u0027and must not have dependent cgsnapshots or volumes.\u0027)"},{"line_number":458,"context_line":"            raise exception.InvalidConsistencyGroup(reason\u003dmsg)"},{"line_number":459,"context_line":""},{"line_number":460,"context_line":"        self.volume_rpcapi.delete_consistencygroup(context, group)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a7b0d38_09d18557","line":457,"updated":"2015-12-23 23:51:14.000000000","message":"It\u0027s better to say \"must not have volumes or dependent cgsnapshots\" so that \"dependent\" is only used to describe \"cgsnapshots\".  Please also add \"Cannot delete consistency group \u003cgroup id\u003e\".","commit_id":"489357403c72b8fcdfec300aefab0b2fa7819870"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"8908f6c94917dcae0837e6bcc35161a67c842fb3","unresolved":false,"context_lines":[{"line_number":454,"context_line":"                        \u0027 or volumes with snapshots or attached.\u0027)"},{"line_number":455,"context_line":"            else:"},{"line_number":456,"context_line":"                msg \u003d _(\u0027Consistency group status must be available or error \u0027"},{"line_number":457,"context_line":"                        \u0027and must not have dependent cgsnapshots or volumes.\u0027)"},{"line_number":458,"context_line":"            raise exception.InvalidConsistencyGroup(reason\u003dmsg)"},{"line_number":459,"context_line":""},{"line_number":460,"context_line":"        self.volume_rpcapi.delete_consistencygroup(context, group)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa69d971_36230858","line":457,"in_reply_to":"1a7b0d38_09d18557","updated":"2016-01-11 22:17:49.000000000","message":"Done","commit_id":"489357403c72b8fcdfec300aefab0b2fa7819870"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"b906a79d9a994cd59826e41f9547fbf6151b4f61","unresolved":false,"context_lines":[{"line_number":522,"context_line":""},{"line_number":523,"context_line":"        if not group.conditional_update(fields, {\u0027status\u0027: \u0027available\u0027}):"},{"line_number":524,"context_line":"            msg \u003d _(\"Consistency group status must be available, \""},{"line_number":525,"context_line":"                    \"but current status is: %s.\") % group.status"},{"line_number":526,"context_line":"            raise exception.InvalidConsistencyGroup(reason\u003dmsg)"},{"line_number":527,"context_line":""},{"line_number":528,"context_line":"        # Do an RPC call only if the update request includes"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a7b0d38_092d0546","line":525,"updated":"2015-12-23 23:51:14.000000000","message":"Please add group id in the message.","commit_id":"489357403c72b8fcdfec300aefab0b2fa7819870"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"8908f6c94917dcae0837e6bcc35161a67c842fb3","unresolved":false,"context_lines":[{"line_number":522,"context_line":""},{"line_number":523,"context_line":"        if not group.conditional_update(fields, {\u0027status\u0027: \u0027available\u0027}):"},{"line_number":524,"context_line":"            msg \u003d _(\"Consistency group status must be available, \""},{"line_number":525,"context_line":"                    \"but current status is: %s.\") % group.status"},{"line_number":526,"context_line":"            raise exception.InvalidConsistencyGroup(reason\u003dmsg)"},{"line_number":527,"context_line":""},{"line_number":528,"context_line":"        # Do an RPC call only if the update request includes"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6ed579_493a61cf","line":525,"in_reply_to":"1a7b0d38_092d0546","updated":"2016-01-11 22:17:49.000000000","message":"Done","commit_id":"489357403c72b8fcdfec300aefab0b2fa7819870"},{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"f329c7de86f0eb2678d823a6e9bb0c4b1cd403bb","unresolved":false,"context_lines":[{"line_number":26,"context_line":"from oslo_utils import timeutils"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"from cinder import db"},{"line_number":29,"context_line":"from cinder.db import base"},{"line_number":30,"context_line":"from cinder import exception"},{"line_number":31,"context_line":"from cinder.i18n import _, _LE, _LW"},{"line_number":32,"context_line":"from cinder import objects"}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_a67fcea9","line":29,"range":{"start_line":29,"start_character":0,"end_line":29,"end_character":26},"updated":"2016-02-23 14:33:55.000000000","message":"As a result of the additional import, this line is not needed anymore","commit_id":"c773bbcb0cabfb0bc239e44e1d83cd83c6c255e9"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"5c6d157413168664c46aa1b1a034bfe2518c057f","unresolved":false,"context_lines":[{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    def create_from_src(self, context, name, description\u003dNone,"},{"line_number":168,"context_line":"                        cgsnapshot_id\u003dNone, source_cgid\u003dNone):"},{"line_number":169,"context_line":"        check_policy(context, \u0027create\u0027)"},{"line_number":170,"context_line":"        cgsnapshot \u003d None"},{"line_number":171,"context_line":"        orig_cg \u003d None"},{"line_number":172,"context_line":"        if cgsnapshot_id:"},{"line_number":173,"context_line":"            try:"},{"line_number":174,"context_line":"                cgsnapshot \u003d objects.CGSnapshot.get_by_id(context,"},{"line_number":175,"context_line":"                                                          cgsnapshot_id)"},{"line_number":176,"context_line":"            except exception.CgSnapshotNotFound:"},{"line_number":177,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":178,"context_line":"                    LOG.error(_LE(\"CG snapshot %(cgsnap)s not found when \""},{"line_number":179,"context_line":"                                  \"creating consistency group %(cg)s from \""},{"line_number":180,"context_line":"                                  \"source.\"),"},{"line_number":181,"context_line":"                              {\u0027cg\u0027: name, \u0027cgsnap\u0027: cgsnapshot_id})"},{"line_number":182,"context_line":"            else:"},{"line_number":183,"context_line":"                orig_cg \u003d cgsnapshot.consistencygroup"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        source_cg \u003d None"},{"line_number":186,"context_line":"        if source_cgid:"},{"line_number":187,"context_line":"            try:"},{"line_number":188,"context_line":"                source_cg \u003d objects.ConsistencyGroup.get_by_id(context,"},{"line_number":189,"context_line":"                                                               source_cgid)"},{"line_number":190,"context_line":"            except exception.ConsistencyGroupNotFound:"},{"line_number":191,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":192,"context_line":"                    LOG.error(_LE(\"Source CG %(source_cg)s not found when \""},{"line_number":193,"context_line":"                                  \"creating consistency group %(cg)s from \""},{"line_number":194,"context_line":"                                  \"source.\"),"},{"line_number":195,"context_line":"                              {\u0027cg\u0027: name, \u0027source_cg\u0027: source_cgid})"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        kwargs \u003d {"},{"line_number":198,"context_line":"            \u0027user_id\u0027: context.user_id,"},{"line_number":199,"context_line":"            \u0027project_id\u0027: context.project_id,"},{"line_number":200,"context_line":"            \u0027status\u0027: c_fields.ConsistencyGroupStatus.CREATING,"},{"line_number":201,"context_line":"            \u0027name\u0027: name,"},{"line_number":202,"context_line":"            \u0027description\u0027: description,"},{"line_number":203,"context_line":"            \u0027cgsnapshot_id\u0027: cgsnapshot_id,"},{"line_number":204,"context_line":"            \u0027source_cgid\u0027: source_cgid,"},{"line_number":205,"context_line":"        }"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"        if orig_cg:"},{"line_number":208,"context_line":"            kwargs[\u0027volume_type_id\u0027] \u003d orig_cg.volume_type_id"},{"line_number":209,"context_line":"            kwargs[\u0027availability_zone\u0027] \u003d orig_cg.availability_zone"},{"line_number":210,"context_line":"            kwargs[\u0027host\u0027] \u003d orig_cg.host"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"        if source_cg:"},{"line_number":213,"context_line":"            kwargs[\u0027volume_type_id\u0027] \u003d source_cg.volume_type_id"},{"line_number":214,"context_line":"            kwargs[\u0027availability_zone\u0027] \u003d source_cg.availability_zone"},{"line_number":215,"context_line":"            kwargs[\u0027host\u0027] \u003d source_cg.host"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"        group \u003d None"},{"line_number":218,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":8,"id":"7af24918_1eb5db7c","line":215,"range":{"start_line":169,"start_character":0,"end_line":215,"end_character":43},"updated":"2016-03-04 14:11:39.000000000","message":"Don\u0027t we have a series of race conditions here if cg or cgsnap gets removed? I believe we don\u0027t support changing the volume_type_id or migrating into another host, so looks like that\u0027s the only part.","commit_id":"984e80eaa72a2f9d4ba7e0c0be98d349ea814b28"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"cbf53c933e453cc6165a53ec59d2c0283a34bf40","unresolved":false,"context_lines":[{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    def create_from_src(self, context, name, description\u003dNone,"},{"line_number":168,"context_line":"                        cgsnapshot_id\u003dNone, source_cgid\u003dNone):"},{"line_number":169,"context_line":"        check_policy(context, \u0027create\u0027)"},{"line_number":170,"context_line":"        cgsnapshot \u003d None"},{"line_number":171,"context_line":"        orig_cg \u003d None"},{"line_number":172,"context_line":"        if cgsnapshot_id:"},{"line_number":173,"context_line":"            try:"},{"line_number":174,"context_line":"                cgsnapshot \u003d objects.CGSnapshot.get_by_id(context,"},{"line_number":175,"context_line":"                                                          cgsnapshot_id)"},{"line_number":176,"context_line":"            except exception.CgSnapshotNotFound:"},{"line_number":177,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":178,"context_line":"                    LOG.error(_LE(\"CG snapshot %(cgsnap)s not found when \""},{"line_number":179,"context_line":"                                  \"creating consistency group %(cg)s from \""},{"line_number":180,"context_line":"                                  \"source.\"),"},{"line_number":181,"context_line":"                              {\u0027cg\u0027: name, \u0027cgsnap\u0027: cgsnapshot_id})"},{"line_number":182,"context_line":"            else:"},{"line_number":183,"context_line":"                orig_cg \u003d cgsnapshot.consistencygroup"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        source_cg \u003d None"},{"line_number":186,"context_line":"        if source_cgid:"},{"line_number":187,"context_line":"            try:"},{"line_number":188,"context_line":"                source_cg \u003d objects.ConsistencyGroup.get_by_id(context,"},{"line_number":189,"context_line":"                                                               source_cgid)"},{"line_number":190,"context_line":"            except exception.ConsistencyGroupNotFound:"},{"line_number":191,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":192,"context_line":"                    LOG.error(_LE(\"Source CG %(source_cg)s not found when \""},{"line_number":193,"context_line":"                                  \"creating consistency group %(cg)s from \""},{"line_number":194,"context_line":"                                  \"source.\"),"},{"line_number":195,"context_line":"                              {\u0027cg\u0027: name, \u0027source_cg\u0027: source_cgid})"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        kwargs \u003d {"},{"line_number":198,"context_line":"            \u0027user_id\u0027: context.user_id,"},{"line_number":199,"context_line":"            \u0027project_id\u0027: context.project_id,"},{"line_number":200,"context_line":"            \u0027status\u0027: c_fields.ConsistencyGroupStatus.CREATING,"},{"line_number":201,"context_line":"            \u0027name\u0027: name,"},{"line_number":202,"context_line":"            \u0027description\u0027: description,"},{"line_number":203,"context_line":"            \u0027cgsnapshot_id\u0027: cgsnapshot_id,"},{"line_number":204,"context_line":"            \u0027source_cgid\u0027: source_cgid,"},{"line_number":205,"context_line":"        }"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"        if orig_cg:"},{"line_number":208,"context_line":"            kwargs[\u0027volume_type_id\u0027] \u003d orig_cg.volume_type_id"},{"line_number":209,"context_line":"            kwargs[\u0027availability_zone\u0027] \u003d orig_cg.availability_zone"},{"line_number":210,"context_line":"            kwargs[\u0027host\u0027] \u003d orig_cg.host"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"        if source_cg:"},{"line_number":213,"context_line":"            kwargs[\u0027volume_type_id\u0027] \u003d source_cg.volume_type_id"},{"line_number":214,"context_line":"            kwargs[\u0027availability_zone\u0027] \u003d source_cg.availability_zone"},{"line_number":215,"context_line":"            kwargs[\u0027host\u0027] \u003d source_cg.host"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"        group \u003d None"},{"line_number":218,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":8,"id":"5aef4532_6b0c0043","line":215,"range":{"start_line":169,"start_character":0,"end_line":215,"end_character":43},"in_reply_to":"7af24918_1eb5db7c","updated":"2016-03-07 20:15:09.000000000","message":"Ok, I have changed a lot of things to prevent races.","commit_id":"984e80eaa72a2f9d4ba7e0c0be98d349ea814b28"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"5c6d157413168664c46aa1b1a034bfe2518c057f","unresolved":false,"context_lines":[{"line_number":524,"context_line":"            fields[\u0027description\u0027] \u003d description"},{"line_number":525,"context_line":"        # Only change status when adding or removing"},{"line_number":526,"context_line":"        if add_volumes_new or remove_volumes_new:"},{"line_number":527,"context_line":"            fields[\u0027status\u0027] \u003d \u0027updating\u0027"},{"line_number":528,"context_line":""},{"line_number":529,"context_line":"        expected \u003d {\u0027status\u0027: c_fields.ConsistencyGroupStatus.AVAILABLE}"},{"line_number":530,"context_line":"        if not group.conditional_update(fields, expected):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7af24918_81706a41","line":527,"range":{"start_line":527,"start_character":31,"end_line":527,"end_character":41},"updated":"2016-03-04 14:11:39.000000000","message":"Shouldn\u0027t this be c_fields.ConsistencyGroupStats.UPDATING?","commit_id":"984e80eaa72a2f9d4ba7e0c0be98d349ea814b28"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"cbf53c933e453cc6165a53ec59d2c0283a34bf40","unresolved":false,"context_lines":[{"line_number":524,"context_line":"            fields[\u0027description\u0027] \u003d description"},{"line_number":525,"context_line":"        # Only change status when adding or removing"},{"line_number":526,"context_line":"        if add_volumes_new or remove_volumes_new:"},{"line_number":527,"context_line":"            fields[\u0027status\u0027] \u003d \u0027updating\u0027"},{"line_number":528,"context_line":""},{"line_number":529,"context_line":"        expected \u003d {\u0027status\u0027: c_fields.ConsistencyGroupStatus.AVAILABLE}"},{"line_number":530,"context_line":"        if not group.conditional_update(fields, expected):"}],"source_content_type":"text/x-python","patch_set":8,"id":"5aef4532_6b107f4f","line":527,"range":{"start_line":527,"start_character":31,"end_line":527,"end_character":41},"in_reply_to":"7af24918_81706a41","updated":"2016-03-07 20:15:09.000000000","message":"Yep, but I didn\u0027t see it since I didn\u0027t touch that line.  Will change.","commit_id":"984e80eaa72a2f9d4ba7e0c0be98d349ea814b28"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"5c6d157413168664c46aa1b1a034bfe2518c057f","unresolved":false,"context_lines":[{"line_number":547,"context_line":"        remove_volumes_new \u003d \"\""},{"line_number":548,"context_line":"        for volume in volumes:"},{"line_number":549,"context_line":"            if volume[\u0027id\u0027] in remove_volumes_list:"},{"line_number":550,"context_line":"                if volume[\u0027status\u0027] not in VALID_REMOVE_VOL_FROM_CG_STATUS:"},{"line_number":551,"context_line":"                    msg \u003d (_(\"Cannot remove volume %(volume_id)s from \""},{"line_number":552,"context_line":"                             \"consistency group %(group_id)s because volume \""},{"line_number":553,"context_line":"                             \"is in an invalid state: %(status)s. Valid \""}],"source_content_type":"text/x-python","patch_set":8,"id":"7af24918_0100da64","line":550,"range":{"start_line":550,"start_character":19,"end_line":550,"end_character":74},"updated":"2016-03-04 14:11:39.000000000","message":"That can also change in flight?","commit_id":"984e80eaa72a2f9d4ba7e0c0be98d349ea814b28"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"cbf53c933e453cc6165a53ec59d2c0283a34bf40","unresolved":false,"context_lines":[{"line_number":547,"context_line":"        remove_volumes_new \u003d \"\""},{"line_number":548,"context_line":"        for volume in volumes:"},{"line_number":549,"context_line":"            if volume[\u0027id\u0027] in remove_volumes_list:"},{"line_number":550,"context_line":"                if volume[\u0027status\u0027] not in VALID_REMOVE_VOL_FROM_CG_STATUS:"},{"line_number":551,"context_line":"                    msg \u003d (_(\"Cannot remove volume %(volume_id)s from \""},{"line_number":552,"context_line":"                             \"consistency group %(group_id)s because volume \""},{"line_number":553,"context_line":"                             \"is in an invalid state: %(status)s. Valid \""}],"source_content_type":"text/x-python","patch_set":8,"id":"5aef4532_cbc43342","line":550,"range":{"start_line":550,"start_character":19,"end_line":550,"end_character":74},"in_reply_to":"7af24918_0100da64","updated":"2016-03-07 20:15:09.000000000","message":"Yes it can (as well as in _validate_add_volumes), so I have changed the way we do the updates to prevent adding/removing volumes while we are doing this.","commit_id":"984e80eaa72a2f9d4ba7e0c0be98d349ea814b28"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"5c6d157413168664c46aa1b1a034bfe2518c057f","unresolved":false,"context_lines":[{"line_number":687,"context_line":""},{"line_number":688,"context_line":"    def _create_cgsnapshot(self, context,"},{"line_number":689,"context_line":"                           group, name, description):"},{"line_number":690,"context_line":"        volumes \u003d self.db.volume_get_all_by_group("},{"line_number":691,"context_line":"            context.elevated(),"},{"line_number":692,"context_line":"            group.id)"},{"line_number":693,"context_line":""},{"line_number":694,"context_line":"        if not volumes:"},{"line_number":695,"context_line":"            msg \u003d _(\"Consistency group is empty. No cgsnapshot \""},{"line_number":696,"context_line":"                    \"will be created.\")"},{"line_number":697,"context_line":"            raise exception.InvalidConsistencyGroup(reason\u003dmsg)"},{"line_number":698,"context_line":""},{"line_number":699,"context_line":"        options \u003d {\u0027consistencygroup_id\u0027: group.id,"},{"line_number":700,"context_line":"                   \u0027user_id\u0027: context.user_id,"}],"source_content_type":"text/x-python","patch_set":8,"id":"7af24918_61d43eeb","line":697,"range":{"start_line":690,"start_character":0,"end_line":697,"end_character":63},"updated":"2016-03-04 14:11:39.000000000","message":"Couldn\u0027t volumes get deleted in flight?","commit_id":"984e80eaa72a2f9d4ba7e0c0be98d349ea814b28"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"cbf53c933e453cc6165a53ec59d2c0283a34bf40","unresolved":false,"context_lines":[{"line_number":687,"context_line":""},{"line_number":688,"context_line":"    def _create_cgsnapshot(self, context,"},{"line_number":689,"context_line":"                           group, name, description):"},{"line_number":690,"context_line":"        volumes \u003d self.db.volume_get_all_by_group("},{"line_number":691,"context_line":"            context.elevated(),"},{"line_number":692,"context_line":"            group.id)"},{"line_number":693,"context_line":""},{"line_number":694,"context_line":"        if not volumes:"},{"line_number":695,"context_line":"            msg \u003d _(\"Consistency group is empty. No cgsnapshot \""},{"line_number":696,"context_line":"                    \"will be created.\")"},{"line_number":697,"context_line":"            raise exception.InvalidConsistencyGroup(reason\u003dmsg)"},{"line_number":698,"context_line":""},{"line_number":699,"context_line":"        options \u003d {\u0027consistencygroup_id\u0027: group.id,"},{"line_number":700,"context_line":"                   \u0027user_id\u0027: context.user_id,"}],"source_content_type":"text/x-python","patch_set":8,"id":"5aef4532_a33e15b6","line":697,"range":{"start_line":690,"start_character":0,"end_line":697,"end_character":63},"in_reply_to":"7af24918_61d43eeb","updated":"2016-03-07 20:15:09.000000000","message":"Yes, in new code I prevent it, since you cannot delete a volume that belongs to a CG without removing it first from the CG, and I am preventing that.","commit_id":"984e80eaa72a2f9d4ba7e0c0be98d349ea814b28"},{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"52779f5cd8ae17ffc07cc563e5c51ad743194bba","unresolved":false,"context_lines":[{"line_number":744,"context_line":"        res \u003d cgsnapshot.conditional_update(values, expected, filters)"},{"line_number":745,"context_line":""},{"line_number":746,"context_line":"        if not res:"},{"line_number":747,"context_line":"            msg \u003d _(\"CgsSapshot status must be available or error and there \""},{"line_number":748,"context_line":"                    \"cannot be a Consistency Group being creating with it.\")"},{"line_number":749,"context_line":"            raise exception.InvalidCgSnapshot(reason\u003dmsg)"},{"line_number":750,"context_line":"        self.volume_rpcapi.delete_cgsnapshot(context.elevated(), cgsnapshot)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5aef4532_53a235af","line":747,"range":{"start_line":747,"start_character":21,"end_line":747,"end_character":31},"updated":"2016-03-09 07:06:14.000000000","message":"typo","commit_id":"8456641bbe2e083991eb348babe824f1c7928e8d"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"4221df0c1ba70d4baedc659e3fe4f9484fe92c0a","unresolved":false,"context_lines":[{"line_number":744,"context_line":"        res \u003d cgsnapshot.conditional_update(values, expected, filters)"},{"line_number":745,"context_line":""},{"line_number":746,"context_line":"        if not res:"},{"line_number":747,"context_line":"            msg \u003d _(\"CgsSapshot status must be available or error and there \""},{"line_number":748,"context_line":"                    \"cannot be a Consistency Group being creating with it.\")"},{"line_number":749,"context_line":"            raise exception.InvalidCgSnapshot(reason\u003dmsg)"},{"line_number":750,"context_line":"        self.volume_rpcapi.delete_cgsnapshot(context.elevated(), cgsnapshot)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5aef4532_e471de77","line":747,"range":{"start_line":747,"start_character":21,"end_line":747,"end_character":31},"in_reply_to":"5aef4532_53a235af","updated":"2016-03-09 14:05:27.000000000","message":"Done","commit_id":"8456641bbe2e083991eb348babe824f1c7928e8d"},{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"52779f5cd8ae17ffc07cc563e5c51ad743194bba","unresolved":false,"context_lines":[{"line_number":745,"context_line":""},{"line_number":746,"context_line":"        if not res:"},{"line_number":747,"context_line":"            msg \u003d _(\"CgsSapshot status must be available or error and there \""},{"line_number":748,"context_line":"                    \"cannot be a Consistency Group being creating with it.\")"},{"line_number":749,"context_line":"            raise exception.InvalidCgSnapshot(reason\u003dmsg)"},{"line_number":750,"context_line":"        self.volume_rpcapi.delete_cgsnapshot(context.elevated(), cgsnapshot)"},{"line_number":751,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5aef4532_73b491d0","line":748,"range":{"start_line":748,"start_character":20,"end_line":748,"end_character":75},"updated":"2016-03-09 07:06:14.000000000","message":"this msg is too complicated and unclear. I would just skip the second line.","commit_id":"8456641bbe2e083991eb348babe824f1c7928e8d"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"4221df0c1ba70d4baedc659e3fe4f9484fe92c0a","unresolved":false,"context_lines":[{"line_number":745,"context_line":""},{"line_number":746,"context_line":"        if not res:"},{"line_number":747,"context_line":"            msg \u003d _(\"CgsSapshot status must be available or error and there \""},{"line_number":748,"context_line":"                    \"cannot be a Consistency Group being creating with it.\")"},{"line_number":749,"context_line":"            raise exception.InvalidCgSnapshot(reason\u003dmsg)"},{"line_number":750,"context_line":"        self.volume_rpcapi.delete_cgsnapshot(context.elevated(), cgsnapshot)"},{"line_number":751,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5aef4532_440252b5","line":748,"range":{"start_line":748,"start_character":20,"end_line":748,"end_character":75},"in_reply_to":"5aef4532_73b491d0","updated":"2016-03-09 14:05:27.000000000","message":"I\u0027ll try to rephrase it, because I think it\u0027s important that the error returned to the client has this information.","commit_id":"8456641bbe2e083991eb348babe824f1c7928e8d"},{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"bd4ec800ff437b652f6b3d32b3935d078a903254","unresolved":false,"context_lines":[{"line_number":744,"context_line":"        res \u003d cgsnapshot.conditional_update(values, expected, filters)"},{"line_number":745,"context_line":""},{"line_number":746,"context_line":"        if not res:"},{"line_number":747,"context_line":"            msg \u003d _(\"CGSapshot status must be available or error, and no CG \""},{"line_number":748,"context_line":"                    \"can be currently using it as source for its creation.\")"},{"line_number":749,"context_line":"            raise exception.InvalidCgSnapshot(reason\u003dmsg)"},{"line_number":750,"context_line":"        self.volume_rpcapi.delete_cgsnapshot(context.elevated(), cgsnapshot)"}],"source_content_type":"text/x-python","patch_set":12,"id":"5aef4532_6f912747","line":747,"range":{"start_line":747,"start_character":21,"end_line":747,"end_character":30},"updated":"2016-03-09 20:54:45.000000000","message":"typo...\nyou really don\u0027t like this word :)","commit_id":"a1e29a45556f5f57076bf60553e7497725f39cde"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"c83307b362ca0fd3e453a440b975f39f8358c629","unresolved":false,"context_lines":[{"line_number":744,"context_line":"        res \u003d cgsnapshot.conditional_update(values, expected, filters)"},{"line_number":745,"context_line":""},{"line_number":746,"context_line":"        if not res:"},{"line_number":747,"context_line":"            msg \u003d _(\"CGSapshot status must be available or error, and no CG \""},{"line_number":748,"context_line":"                    \"can be currently using it as source for its creation.\")"},{"line_number":749,"context_line":"            raise exception.InvalidCgSnapshot(reason\u003dmsg)"},{"line_number":750,"context_line":"        self.volume_rpcapi.delete_cgsnapshot(context.elevated(), cgsnapshot)"}],"source_content_type":"text/x-python","patch_set":12,"id":"5aef4532_4838853d","line":747,"range":{"start_line":747,"start_character":21,"end_line":747,"end_character":30},"in_reply_to":"5aef4532_6f912747","updated":"2016-03-09 21:36:04.000000000","message":"lol, apparently I don\u0027t  ;-)","commit_id":"a1e29a45556f5f57076bf60553e7497725f39cde"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"066daadfee037f7c8c1899946aa0056f0de3cf08","unresolved":false,"context_lines":[{"line_number":199,"context_line":"                LOG.error(_LE(\"CG snapshot %(cgsnap)s not found when creating \""},{"line_number":200,"context_line":"                              \"consistency group %(cg)s from source.\"),"},{"line_number":201,"context_line":"                          {\u0027cg\u0027: name, \u0027cgsnap\u0027: cgsnapshot_id})"},{"line_number":202,"context_line":"            raise exception.CgSnapshotNotFound(cgsnapshot_id\u003dcgsnapshot_id)"},{"line_number":203,"context_line":"        except Exception:"},{"line_number":204,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":205,"context_line":"                LOG.error(_LE(\"Error occurred when creating consistency group\""}],"source_content_type":"text/x-python","patch_set":27,"id":"9abb7d3a_bafdf56f","line":202,"range":{"start_line":202,"start_character":0,"end_line":202,"end_character":75},"updated":"2016-06-01 12:59:46.000000000","message":"If I get everything correctly - with above context manager this will never get called.","commit_id":"20916be8d7143a0218afd875f41d7626ea703a81"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"8ba896f9770c1e657daa93e18e7f14fcb3cf5e18","unresolved":false,"context_lines":[{"line_number":199,"context_line":"                LOG.error(_LE(\"CG snapshot %(cgsnap)s not found when creating \""},{"line_number":200,"context_line":"                              \"consistency group %(cg)s from source.\"),"},{"line_number":201,"context_line":"                          {\u0027cg\u0027: name, \u0027cgsnap\u0027: cgsnapshot_id})"},{"line_number":202,"context_line":"            raise exception.CgSnapshotNotFound(cgsnapshot_id\u003dcgsnapshot_id)"},{"line_number":203,"context_line":"        except Exception:"},{"line_number":204,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":205,"context_line":"                LOG.error(_LE(\"Error occurred when creating consistency group\""}],"source_content_type":"text/x-python","patch_set":27,"id":"9abb7d3a_1da7c9bd","line":202,"range":{"start_line":202,"start_character":0,"end_line":202,"end_character":75},"in_reply_to":"9abb7d3a_bafdf56f","updated":"2016-06-01 14:52:08.000000000","message":"lol, I don\u0027t know what\u0027s this doing here  ;-)","commit_id":"20916be8d7143a0218afd875f41d7626ea703a81"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"066daadfee037f7c8c1899946aa0056f0de3cf08","unresolved":false,"context_lines":[{"line_number":447,"context_line":"                           \u0027error and must not have volumes or dependent \u0027"},{"line_number":448,"context_line":"                           \u0027cgsnapshots\u0027)"},{"line_number":449,"context_line":"            msg \u003d (_(\u0027Cannot delete consistency group %(id)s. %(reason)s, and \u0027"},{"line_number":450,"context_line":"                     \u0027it cannot be sourcing a new CG creation, and we cannot \u0027"},{"line_number":451,"context_line":"                     \u0027be creating a CG Snapshot from it.\u0027)"},{"line_number":452,"context_line":"                   % {\u0027id\u0027: group.id, \u0027reason\u0027: reason})"},{"line_number":453,"context_line":"            raise exception.InvalidConsistencyGroup(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":27,"id":"9abb7d3a_bd7b2f7a","line":450,"range":{"start_line":450,"start_character":25,"end_line":450,"end_character":61},"updated":"2016-06-01 12:59:46.000000000","message":"I think something like \"cannot be a source for ongoing new CG creation\" would be a little better wording.","commit_id":"20916be8d7143a0218afd875f41d7626ea703a81"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"8ba896f9770c1e657daa93e18e7f14fcb3cf5e18","unresolved":false,"context_lines":[{"line_number":447,"context_line":"                           \u0027error and must not have volumes or dependent \u0027"},{"line_number":448,"context_line":"                           \u0027cgsnapshots\u0027)"},{"line_number":449,"context_line":"            msg \u003d (_(\u0027Cannot delete consistency group %(id)s. %(reason)s, and \u0027"},{"line_number":450,"context_line":"                     \u0027it cannot be sourcing a new CG creation, and we cannot \u0027"},{"line_number":451,"context_line":"                     \u0027be creating a CG Snapshot from it.\u0027)"},{"line_number":452,"context_line":"                   % {\u0027id\u0027: group.id, \u0027reason\u0027: reason})"},{"line_number":453,"context_line":"            raise exception.InvalidConsistencyGroup(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":27,"id":"9abb7d3a_f89e5361","line":450,"range":{"start_line":450,"start_character":25,"end_line":450,"end_character":61},"in_reply_to":"9abb7d3a_bd7b2f7a","updated":"2016-06-01 14:52:08.000000000","message":"I\u0027ll rephrase it using your suggestion as the base, because I see that more parts of the message can be simplified.","commit_id":"20916be8d7143a0218afd875f41d7626ea703a81"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"066daadfee037f7c8c1899946aa0056f0de3cf08","unresolved":false,"context_lines":[{"line_number":519,"context_line":"        expected \u003d {\u0027status\u0027: c_fields.ConsistencyGroupStatus.AVAILABLE}"},{"line_number":520,"context_line":"        if not group.conditional_update(fields, expected, filters):"},{"line_number":521,"context_line":"            msg \u003d _(\"Cannot update consistency group %s, status must be \""},{"line_number":522,"context_line":"                    \"available, it cannot be sourcing a new CG creation, and \""},{"line_number":523,"context_line":"                    \"we cannot be creating a CG Snapshot from it.\") % group.id"},{"line_number":524,"context_line":"            raise exception.InvalidConsistencyGroup(reason\u003dmsg)"},{"line_number":525,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"9abb7d3a_d4cc05bd","line":522,"range":{"start_line":522,"start_character":35,"end_line":522,"end_character":71},"updated":"2016-06-01 12:59:46.000000000","message":"Same as line 450.","commit_id":"20916be8d7143a0218afd875f41d7626ea703a81"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"8ba896f9770c1e657daa93e18e7f14fcb3cf5e18","unresolved":false,"context_lines":[{"line_number":519,"context_line":"        expected \u003d {\u0027status\u0027: c_fields.ConsistencyGroupStatus.AVAILABLE}"},{"line_number":520,"context_line":"        if not group.conditional_update(fields, expected, filters):"},{"line_number":521,"context_line":"            msg \u003d _(\"Cannot update consistency group %s, status must be \""},{"line_number":522,"context_line":"                    \"available, it cannot be sourcing a new CG creation, and \""},{"line_number":523,"context_line":"                    \"we cannot be creating a CG Snapshot from it.\") % group.id"},{"line_number":524,"context_line":"            raise exception.InvalidConsistencyGroup(reason\u003dmsg)"},{"line_number":525,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"9abb7d3a_38157b9b","line":522,"range":{"start_line":522,"start_character":35,"end_line":522,"end_character":71},"in_reply_to":"9abb7d3a_d4cc05bd","updated":"2016-06-01 14:52:08.000000000","message":"Will do.","commit_id":"20916be8d7143a0218afd875f41d7626ea703a81"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"066daadfee037f7c8c1899946aa0056f0de3cf08","unresolved":false,"context_lines":[{"line_number":525,"context_line":""},{"line_number":526,"context_line":"        # Now the CG is \"locked\" for updating"},{"line_number":527,"context_line":"        try:"},{"line_number":528,"context_line":"            volumes \u003d self.db.volume_get_all_by_group(context, group.id)"},{"line_number":529,"context_line":""},{"line_number":530,"context_line":"            # Validate volumes in add_volumes and remove_volumes."},{"line_number":531,"context_line":"            add_volumes_new \u003d self._validate_add_volumes("}],"source_content_type":"text/x-python","patch_set":27,"id":"9abb7d3a_34ebd1e0","line":528,"range":{"start_line":528,"start_character":12,"end_line":528,"end_character":72},"updated":"2016-06-01 12:59:46.000000000","message":"group.volumes should also work just fine here.","commit_id":"20916be8d7143a0218afd875f41d7626ea703a81"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"8ba896f9770c1e657daa93e18e7f14fcb3cf5e18","unresolved":false,"context_lines":[{"line_number":525,"context_line":""},{"line_number":526,"context_line":"        # Now the CG is \"locked\" for updating"},{"line_number":527,"context_line":"        try:"},{"line_number":528,"context_line":"            volumes \u003d self.db.volume_get_all_by_group(context, group.id)"},{"line_number":529,"context_line":""},{"line_number":530,"context_line":"            # Validate volumes in add_volumes and remove_volumes."},{"line_number":531,"context_line":"            add_volumes_new \u003d self._validate_add_volumes("}],"source_content_type":"text/x-python","patch_set":27,"id":"9abb7d3a_f81f73b4","line":528,"range":{"start_line":528,"start_character":12,"end_line":528,"end_character":72},"in_reply_to":"9abb7d3a_34ebd1e0","updated":"2016-06-01 14:52:08.000000000","message":"Good idea to use the OVO abstraction here to simplify it.","commit_id":"20916be8d7143a0218afd875f41d7626ea703a81"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"066daadfee037f7c8c1899946aa0056f0de3cf08","unresolved":false,"context_lines":[{"line_number":718,"context_line":""},{"line_number":719,"context_line":"            snap_name \u003d cgsnapshot.name"},{"line_number":720,"context_line":"            snap_desc \u003d cgsnapshot.description"},{"line_number":721,"context_line":"            volumes \u003d objects.VolumeList.get_all_by_group("},{"line_number":722,"context_line":"                context.elevated(), group.id)"},{"line_number":723,"context_line":"            self.volume_api.create_snapshots_in_db("},{"line_number":724,"context_line":"                context, volumes, snap_name, snap_desc, True, cgsnapshot_id)"},{"line_number":725,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"9abb7d3a_cfb2b0e4","line":722,"range":{"start_line":721,"start_character":0,"end_line":722,"end_character":45},"updated":"2016-06-01 12:59:46.000000000","message":"group.volumes should also work here.","commit_id":"20916be8d7143a0218afd875f41d7626ea703a81"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"8ba896f9770c1e657daa93e18e7f14fcb3cf5e18","unresolved":false,"context_lines":[{"line_number":718,"context_line":""},{"line_number":719,"context_line":"            snap_name \u003d cgsnapshot.name"},{"line_number":720,"context_line":"            snap_desc \u003d cgsnapshot.description"},{"line_number":721,"context_line":"            volumes \u003d objects.VolumeList.get_all_by_group("},{"line_number":722,"context_line":"                context.elevated(), group.id)"},{"line_number":723,"context_line":"            self.volume_api.create_snapshots_in_db("},{"line_number":724,"context_line":"                context, volumes, snap_name, snap_desc, True, cgsnapshot_id)"},{"line_number":725,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"9abb7d3a_786c2308","line":722,"range":{"start_line":721,"start_character":0,"end_line":722,"end_character":45},"in_reply_to":"9abb7d3a_cfb2b0e4","updated":"2016-06-01 14:52:08.000000000","message":"I\u0027m not so sure here, as original code was using elevated context and I\u0027m not sure I can just use normal context.","commit_id":"20916be8d7143a0218afd875f41d7626ea703a81"}],"cinder/db/sqlalchemy/api.py":[{"author":{"_account_id":7173,"name":"Scott DAngelo","email":"scott.dangelo@gmail.com","username":"scottda"},"change_message_id":"1a7d14417c0866d2eb6b0b21c47dedc5ea09adc0","unresolved":false,"context_lines":[{"line_number":4196,"context_line":"                                ).filter(*conditions)"},{"line_number":4197,"context_line":"            names \u003d [\u0027volume_type_id\u0027, \u0027availability_zone\u0027, \u0027host\u0027]"},{"line_number":4198,"context_line":"            names.extend(values.keys())"},{"line_number":4199,"context_line":"            insert_stmt \u003d cg_model.__table__.insert().from_select(names, sel)"},{"line_number":4200,"context_line":"            result \u003d session.execute(insert_stmt)"},{"line_number":4201,"context_line":"            # If we couldn\u0027t insert the row because of the conditions raise"},{"line_number":4202,"context_line":"            # the right exception"}],"source_content_type":"text/x-python","patch_set":19,"id":"5a18252c_65408d57","line":4199,"updated":"2016-04-12 15:40:26.000000000","message":"Pylint errors. Can be fixed with /tools/lintstack.py generate:\n cinder/db/sqlalchemy/api.py:4199: [E1101, consistencygroup_create] Class \u0027ConsistencyGroup\u0027 has no \u0027__table__\u0027 member\n2016-04-12 09:22:16.775 | \n2016-04-12 09:22:16.775 | cinder/db/sqlalchemy/api.py:4342: [E1101, cgsnapshot_create] Class \u0027Cgsnapshot\u0027 has no \u0027__table__\u0027 member\n2016-04-12 09:22:16.775 | \n2016-04-12 09:22:16.775 | Please fix the errors above. If you believe they are false positives, run \u0027tools/lintstack.py generate\u0027 to overwrite.","commit_id":"15f6942178d960748d648d87ba421a78205c8a48"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6201e838214e4e57feca4ca87ad4801de93d8723","unresolved":false,"context_lines":[{"line_number":4196,"context_line":"                                ).filter(*conditions)"},{"line_number":4197,"context_line":"            names \u003d [\u0027volume_type_id\u0027, \u0027availability_zone\u0027, \u0027host\u0027]"},{"line_number":4198,"context_line":"            names.extend(values.keys())"},{"line_number":4199,"context_line":"            insert_stmt \u003d cg_model.__table__.insert().from_select(names, sel)"},{"line_number":4200,"context_line":"            result \u003d session.execute(insert_stmt)"},{"line_number":4201,"context_line":"            # If we couldn\u0027t insert the row because of the conditions raise"},{"line_number":4202,"context_line":"            # the right exception"}],"source_content_type":"text/x-python","patch_set":19,"id":"5a18252c_bcefdc85","line":4199,"in_reply_to":"5a18252c_65408d57","updated":"2016-04-14 16:22:22.000000000","message":"Done","commit_id":"15f6942178d960748d648d87ba421a78205c8a48"},{"author":{"_account_id":7173,"name":"Scott DAngelo","email":"scott.dangelo@gmail.com","username":"scottda"},"change_message_id":"1a7d14417c0866d2eb6b0b21c47dedc5ea09adc0","unresolved":false,"context_lines":[{"line_number":4339,"context_line":"            # penalty."},{"line_number":4340,"context_line":"            binds \u003d (bindparam(k, v) for k, v in values.items())"},{"line_number":4341,"context_line":"            sel \u003d session.query(*binds).filter(*conditions)"},{"line_number":4342,"context_line":"            insert_stmt \u003d model.__table__.insert().from_select(values.keys(),"},{"line_number":4343,"context_line":"                                                               sel)"},{"line_number":4344,"context_line":"            result \u003d session.execute(insert_stmt)"},{"line_number":4345,"context_line":"            # If we couldn\u0027t insert the row because of the conditions raise"}],"source_content_type":"text/x-python","patch_set":19,"id":"5a18252c_251df573","line":4342,"updated":"2016-04-12 15:40:26.000000000","message":"Pylint errors. Can be fixed with /tools/lintstack.py generate:\n cinder/db/sqlalchemy/api.py:4199: [E1101, consistencygroup_create] Class \u0027ConsistencyGroup\u0027 has no \u0027__table__\u0027 member\n2016-04-12 09:22:16.775 | \n2016-04-12 09:22:16.775 | cinder/db/sqlalchemy/api.py:4342: [E1101, cgsnapshot_create] Class \u0027Cgsnapshot\u0027 has no \u0027__table__\u0027 member\n2016-04-12 09:22:16.775 | \n2016-04-12 09:22:16.775 | Please fix the errors above. If you believe they are false positives, run \u0027tools/lintstack.py generate\u0027 to overwrite.","commit_id":"15f6942178d960748d648d87ba421a78205c8a48"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6201e838214e4e57feca4ca87ad4801de93d8723","unresolved":false,"context_lines":[{"line_number":4339,"context_line":"            # penalty."},{"line_number":4340,"context_line":"            binds \u003d (bindparam(k, v) for k, v in values.items())"},{"line_number":4341,"context_line":"            sel \u003d session.query(*binds).filter(*conditions)"},{"line_number":4342,"context_line":"            insert_stmt \u003d model.__table__.insert().from_select(values.keys(),"},{"line_number":4343,"context_line":"                                                               sel)"},{"line_number":4344,"context_line":"            result \u003d session.execute(insert_stmt)"},{"line_number":4345,"context_line":"            # If we couldn\u0027t insert the row because of the conditions raise"}],"source_content_type":"text/x-python","patch_set":19,"id":"5a18252c_fce5d4a3","line":4342,"in_reply_to":"5a18252c_251df573","updated":"2016-04-14 16:22:22.000000000","message":"Done","commit_id":"15f6942178d960748d648d87ba421a78205c8a48"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"066daadfee037f7c8c1899946aa0056f0de3cf08","unresolved":false,"context_lines":[{"line_number":4007,"context_line":"                    \u0027updated_at\u0027: literal_column(\u0027updated_at\u0027)})"},{"line_number":4008,"context_line":""},{"line_number":4009,"context_line":""},{"line_number":4010,"context_line":"def cg_has_cgsnapshot_filter():"},{"line_number":4011,"context_line":"    return sql.exists().where(and_("},{"line_number":4012,"context_line":"        models.Cgsnapshot.consistencygroup_id \u003d\u003d models.ConsistencyGroup.id,"},{"line_number":4013,"context_line":"        ~models.Cgsnapshot.deleted))"},{"line_number":4014,"context_line":""},{"line_number":4015,"context_line":""},{"line_number":4016,"context_line":"def cg_has_volumes_filter(attached_or_with_snapshots\u003dFalse):"},{"line_number":4017,"context_line":"    query \u003d sql.exists().where("},{"line_number":4018,"context_line":"        and_(models.Volume.consistencygroup_id \u003d\u003d models.ConsistencyGroup.id,"},{"line_number":4019,"context_line":"             ~models.Volume.deleted))"},{"line_number":4020,"context_line":""},{"line_number":4021,"context_line":"    if attached_or_with_snapshots:"},{"line_number":4022,"context_line":"        query \u003d query.where(or_("},{"line_number":4023,"context_line":"            models.Volume.attach_status \u003d\u003d \u0027attached\u0027,"},{"line_number":4024,"context_line":"            sql.exists().where("},{"line_number":4025,"context_line":"                and_(models.Volume.id \u003d\u003d models.Snapshot.volume_id,"},{"line_number":4026,"context_line":"                     ~models.Snapshot.deleted))))"},{"line_number":4027,"context_line":"    return query"},{"line_number":4028,"context_line":""},{"line_number":4029,"context_line":""},{"line_number":4030,"context_line":"def cg_creating_from_src(cg_id\u003dNone, cgsnapshot_id\u003dNone):"},{"line_number":4031,"context_line":"    model \u003d aliased(models.ConsistencyGroup)"},{"line_number":4032,"context_line":"    conditions \u003d [~model.deleted, model.status \u003d\u003d \u0027creating\u0027]"},{"line_number":4033,"context_line":"    if cg_id:"},{"line_number":4034,"context_line":"        conditions.append(model.source_cgid \u003d\u003d cg_id)"},{"line_number":4035,"context_line":"    if cgsnapshot_id:"},{"line_number":4036,"context_line":"        conditions.append(model.cgsnapshot_id \u003d\u003d cgsnapshot_id)"},{"line_number":4037,"context_line":"    return sql.exists().where(and_(*conditions))"},{"line_number":4038,"context_line":""},{"line_number":4039,"context_line":""},{"line_number":4040,"context_line":"def cgsnapshot_creating_from_src():"}],"source_content_type":"text/x-python","patch_set":27,"id":"9abb7d3a_bbb7bc38","line":4037,"range":{"start_line":4010,"start_character":0,"end_line":4037,"end_character":48},"updated":"2016-06-01 12:59:46.000000000","message":"Just to maintain order - wouldn\u0027t it be more readable to have these after \"###########\" line?","commit_id":"20916be8d7143a0218afd875f41d7626ea703a81"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"8ba896f9770c1e657daa93e18e7f14fcb3cf5e18","unresolved":false,"context_lines":[{"line_number":4007,"context_line":"                    \u0027updated_at\u0027: literal_column(\u0027updated_at\u0027)})"},{"line_number":4008,"context_line":""},{"line_number":4009,"context_line":""},{"line_number":4010,"context_line":"def cg_has_cgsnapshot_filter():"},{"line_number":4011,"context_line":"    return sql.exists().where(and_("},{"line_number":4012,"context_line":"        models.Cgsnapshot.consistencygroup_id \u003d\u003d models.ConsistencyGroup.id,"},{"line_number":4013,"context_line":"        ~models.Cgsnapshot.deleted))"},{"line_number":4014,"context_line":""},{"line_number":4015,"context_line":""},{"line_number":4016,"context_line":"def cg_has_volumes_filter(attached_or_with_snapshots\u003dFalse):"},{"line_number":4017,"context_line":"    query \u003d sql.exists().where("},{"line_number":4018,"context_line":"        and_(models.Volume.consistencygroup_id \u003d\u003d models.ConsistencyGroup.id,"},{"line_number":4019,"context_line":"             ~models.Volume.deleted))"},{"line_number":4020,"context_line":""},{"line_number":4021,"context_line":"    if attached_or_with_snapshots:"},{"line_number":4022,"context_line":"        query \u003d query.where(or_("},{"line_number":4023,"context_line":"            models.Volume.attach_status \u003d\u003d \u0027attached\u0027,"},{"line_number":4024,"context_line":"            sql.exists().where("},{"line_number":4025,"context_line":"                and_(models.Volume.id \u003d\u003d models.Snapshot.volume_id,"},{"line_number":4026,"context_line":"                     ~models.Snapshot.deleted))))"},{"line_number":4027,"context_line":"    return query"},{"line_number":4028,"context_line":""},{"line_number":4029,"context_line":""},{"line_number":4030,"context_line":"def cg_creating_from_src(cg_id\u003dNone, cgsnapshot_id\u003dNone):"},{"line_number":4031,"context_line":"    model \u003d aliased(models.ConsistencyGroup)"},{"line_number":4032,"context_line":"    conditions \u003d [~model.deleted, model.status \u003d\u003d \u0027creating\u0027]"},{"line_number":4033,"context_line":"    if cg_id:"},{"line_number":4034,"context_line":"        conditions.append(model.source_cgid \u003d\u003d cg_id)"},{"line_number":4035,"context_line":"    if cgsnapshot_id:"},{"line_number":4036,"context_line":"        conditions.append(model.cgsnapshot_id \u003d\u003d cgsnapshot_id)"},{"line_number":4037,"context_line":"    return sql.exists().where(and_(*conditions))"},{"line_number":4038,"context_line":""},{"line_number":4039,"context_line":""},{"line_number":4040,"context_line":"def cgsnapshot_creating_from_src():"}],"source_content_type":"text/x-python","patch_set":27,"id":"9abb7d3a_4350540b","line":4037,"range":{"start_line":4010,"start_character":0,"end_line":4037,"end_character":48},"in_reply_to":"9abb7d3a_bbb7bc38","updated":"2016-06-01 14:52:08.000000000","message":"My bad, I put it in the right section in cinder/db/api.py but made a mistake in this file.","commit_id":"20916be8d7143a0218afd875f41d7626ea703a81"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"066daadfee037f7c8c1899946aa0056f0de3cf08","unresolved":false,"context_lines":[{"line_number":4037,"context_line":"    return sql.exists().where(and_(*conditions))"},{"line_number":4038,"context_line":""},{"line_number":4039,"context_line":""},{"line_number":4040,"context_line":"def cgsnapshot_creating_from_src():"},{"line_number":4041,"context_line":"    return sql.exists().where(and_("},{"line_number":4042,"context_line":"        models.Cgsnapshot.consistencygroup_id \u003d\u003d models.ConsistencyGroup.id,"},{"line_number":4043,"context_line":"        ~models.Cgsnapshot.deleted,"},{"line_number":4044,"context_line":"        models.Cgsnapshot.status \u003d\u003d \u0027creating\u0027))"},{"line_number":4045,"context_line":""},{"line_number":4046,"context_line":""},{"line_number":4047,"context_line":"###############################"}],"source_content_type":"text/x-python","patch_set":27,"id":"9abb7d3a_7b15543e","line":4044,"range":{"start_line":4040,"start_character":0,"end_line":4044,"end_character":48},"updated":"2016-06-01 12:59:46.000000000","message":"Can we move it to cgsnapshots section?","commit_id":"20916be8d7143a0218afd875f41d7626ea703a81"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"8ba896f9770c1e657daa93e18e7f14fcb3cf5e18","unresolved":false,"context_lines":[{"line_number":4037,"context_line":"    return sql.exists().where(and_(*conditions))"},{"line_number":4038,"context_line":""},{"line_number":4039,"context_line":""},{"line_number":4040,"context_line":"def cgsnapshot_creating_from_src():"},{"line_number":4041,"context_line":"    return sql.exists().where(and_("},{"line_number":4042,"context_line":"        models.Cgsnapshot.consistencygroup_id \u003d\u003d models.ConsistencyGroup.id,"},{"line_number":4043,"context_line":"        ~models.Cgsnapshot.deleted,"},{"line_number":4044,"context_line":"        models.Cgsnapshot.status \u003d\u003d \u0027creating\u0027))"},{"line_number":4045,"context_line":""},{"line_number":4046,"context_line":""},{"line_number":4047,"context_line":"###############################"}],"source_content_type":"text/x-python","patch_set":27,"id":"9abb7d3a_23539018","line":4044,"range":{"start_line":4040,"start_character":0,"end_line":4044,"end_character":48},"in_reply_to":"9abb7d3a_7b15543e","updated":"2016-06-01 14:52:08.000000000","message":"Yes we can!","commit_id":"20916be8d7143a0218afd875f41d7626ea703a81"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"066daadfee037f7c8c1899946aa0056f0de3cf08","unresolved":false,"context_lines":[{"line_number":4348,"context_line":"            # If we couldn\u0027t insert the row because of the conditions raise"},{"line_number":4349,"context_line":"            # the right exception"},{"line_number":4350,"context_line":"            if not result.rowcount:"},{"line_number":4351,"context_line":"                msg \u003d _(\"Consistency group cannot be empty and source CG \""},{"line_number":4352,"context_line":"                        \"cannot be \u0027creating\u0027 or \u0027updating. No cgsnapshot \""},{"line_number":4353,"context_line":"                        \"will be created.\")"},{"line_number":4354,"context_line":"                raise exception.InvalidConsistencyGroup(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":27,"id":"9abb7d3a_3a1d8566","line":4351,"range":{"start_line":4351,"start_character":25,"end_line":4351,"end_character":72},"updated":"2016-06-01 12:59:46.000000000","message":"\"Consistency group\" and \"source CG\" seems to be referring to the same resource. It would be less confusing as:\n\n Source CG cannot be empty or in \u0027creating\u0027 or \u0027updating\u0027 state.","commit_id":"20916be8d7143a0218afd875f41d7626ea703a81"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"8ba896f9770c1e657daa93e18e7f14fcb3cf5e18","unresolved":false,"context_lines":[{"line_number":4348,"context_line":"            # If we couldn\u0027t insert the row because of the conditions raise"},{"line_number":4349,"context_line":"            # the right exception"},{"line_number":4350,"context_line":"            if not result.rowcount:"},{"line_number":4351,"context_line":"                msg \u003d _(\"Consistency group cannot be empty and source CG \""},{"line_number":4352,"context_line":"                        \"cannot be \u0027creating\u0027 or \u0027updating. No cgsnapshot \""},{"line_number":4353,"context_line":"                        \"will be created.\")"},{"line_number":4354,"context_line":"                raise exception.InvalidConsistencyGroup(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":27,"id":"9abb7d3a_c323a454","line":4351,"range":{"start_line":4351,"start_character":25,"end_line":4351,"end_character":72},"in_reply_to":"9abb7d3a_3a1d8566","updated":"2016-06-01 14:52:08.000000000","message":"Thank you, that\u0027s a lot better.","commit_id":"20916be8d7143a0218afd875f41d7626ea703a81"}],"cinder/tests/unit/api/contrib/test_consistencygroups.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"066daadfee037f7c8c1899946aa0056f0de3cf08","unresolved":false,"context_lines":[{"line_number":640,"context_line":"        self.assertEqual(400, res_dict[\u0027badRequest\u0027][\u0027code\u0027])"},{"line_number":641,"context_line":"        self.assertEqual(msg, res_dict[\u0027badRequest\u0027][\u0027message\u0027])"},{"line_number":642,"context_line":""},{"line_number":643,"context_line":"    def test_delete_consystencygroup_with_volumes(self):"},{"line_number":644,"context_line":"        consistencygroup \u003d self._create_consistencygroup(status\u003d\u0027available\u0027)"},{"line_number":645,"context_line":"        utils.create_volume(self.ctxt, consistencygroup_id\u003dconsistencygroup.id,"},{"line_number":646,"context_line":"                            testcase_instance\u003dself)"}],"source_content_type":"text/x-python","patch_set":27,"id":"9abb7d3a_6a6292d9","line":643,"range":{"start_line":643,"start_character":24,"end_line":643,"end_character":25},"updated":"2016-06-01 12:59:46.000000000","message":"Looks like this should be \u0027i\u0027. Worth fixing to make grepping easier. Same goes below.","commit_id":"20916be8d7143a0218afd875f41d7626ea703a81"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"8ba896f9770c1e657daa93e18e7f14fcb3cf5e18","unresolved":false,"context_lines":[{"line_number":640,"context_line":"        self.assertEqual(400, res_dict[\u0027badRequest\u0027][\u0027code\u0027])"},{"line_number":641,"context_line":"        self.assertEqual(msg, res_dict[\u0027badRequest\u0027][\u0027message\u0027])"},{"line_number":642,"context_line":""},{"line_number":643,"context_line":"    def test_delete_consystencygroup_with_volumes(self):"},{"line_number":644,"context_line":"        consistencygroup \u003d self._create_consistencygroup(status\u003d\u0027available\u0027)"},{"line_number":645,"context_line":"        utils.create_volume(self.ctxt, consistencygroup_id\u003dconsistencygroup.id,"},{"line_number":646,"context_line":"                            testcase_instance\u003dself)"}],"source_content_type":"text/x-python","patch_set":27,"id":"9abb7d3a_6300f866","line":643,"range":{"start_line":643,"start_character":24,"end_line":643,"end_character":25},"in_reply_to":"9abb7d3a_6a6292d9","updated":"2016-06-01 14:52:08.000000000","message":"Or just to prevent native speakers from going blind upon seeing it.  ;-)","commit_id":"20916be8d7143a0218afd875f41d7626ea703a81"}],"cinder/tests/unit/utils.py":[{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"52779f5cd8ae17ffc07cc563e5c51ad743194bba","unresolved":false,"context_lines":[{"line_number":203,"context_line":"    if not return_vo:"},{"line_number":204,"context_line":"        return cgs"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    return objects.CGSnapshot.get_by_id(ctxt, cgs.id)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    cgsnap \u003d objects.CGSnapshot(ctxt)"},{"line_number":209,"context_line":"    cgsnap.user_id \u003d ctxt.user_id or fake.user_id"}],"source_content_type":"text/x-python","patch_set":10,"id":"5aef4532_b3fe1936","line":206,"range":{"start_line":206,"start_character":0,"end_line":206,"end_character":53},"updated":"2016-03-09 07:06:14.000000000","message":"the following code is not called","commit_id":"8456641bbe2e083991eb348babe824f1c7928e8d"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"4221df0c1ba70d4baedc659e3fe4f9484fe92c0a","unresolved":false,"context_lines":[{"line_number":203,"context_line":"    if not return_vo:"},{"line_number":204,"context_line":"        return cgs"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    return objects.CGSnapshot.get_by_id(ctxt, cgs.id)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    cgsnap \u003d objects.CGSnapshot(ctxt)"},{"line_number":209,"context_line":"    cgsnap.user_id \u003d ctxt.user_id or fake.user_id"}],"source_content_type":"text/x-python","patch_set":10,"id":"5aef4532_611f806c","line":206,"range":{"start_line":206,"start_character":0,"end_line":206,"end_character":53},"in_reply_to":"5aef4532_b3fe1936","updated":"2016-03-09 14:05:27.000000000","message":"rofl, I forgot to delete all that, good catch","commit_id":"8456641bbe2e083991eb348babe824f1c7928e8d"}]}
