)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":177,"name":"Alex Meade","email":"mr.alex.meade@gmail.com","username":"alex-meade"},"change_message_id":"8c4d1b9d14fe2cf3d12c554575826f68a56a823c","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch modifies the existing \"create CG from source\" API"},{"line_number":10,"context_line":"to take an existing CG as a source, in addition to a CG snapshot."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"implements blueprint clone-cg"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: Ieabc190a5d9a08e2c84e42140192e6ee3dac9433"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3a50d1a3_efcc0d8b","line":12,"updated":"2015-07-27 19:28:20.000000000","message":"Hey Xing, please include the APIImpact flag :)","commit_id":"682629377471c9f02c9d99c67c510de74c1a4aad"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c286827313fe22acc66b881a40213cf3da18e870","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch modifies the existing \"create CG from source\" API"},{"line_number":10,"context_line":"to take an existing CG as a source, in addition to a CG snapshot."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"implements blueprint clone-cg"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: Ieabc190a5d9a08e2c84e42140192e6ee3dac9433"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3a50d1a3_139605f0","line":12,"in_reply_to":"3a50d1a3_efcc0d8b","updated":"2015-07-28 21:47:56.000000000","message":"Done","commit_id":"682629377471c9f02c9d99c67c510de74c1a4aad"}],"cinder/api/contrib/consistencygroups.py":[{"author":{"_account_id":177,"name":"Alex Meade","email":"mr.alex.meade@gmail.com","username":"alex-meade"},"change_message_id":"8c4d1b9d14fe2cf3d12c554575826f68a56a823c","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        consistencygroup_node \u003d self.find_first_child_named("},{"line_number":118,"context_line":"            node, \u0027consistencygroup-from-src\u0027)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        attributes \u003d [\u0027cgsnapshot\u0027, \u0027source_cgid\u0027, \u0027name\u0027, \u0027description\u0027]"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        for attr in attributes:"},{"line_number":123,"context_line":"            if consistencygroup_node.getAttribute(attr):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_b26668b9","line":120,"updated":"2015-07-27 19:28:20.000000000","message":"I would prefer to spell out source_consistencygroup_id but that\u0027s just a nit.","commit_id":"682629377471c9f02c9d99c67c510de74c1a4aad"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c286827313fe22acc66b881a40213cf3da18e870","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        consistencygroup_node \u003d self.find_first_child_named("},{"line_number":118,"context_line":"            node, \u0027consistencygroup-from-src\u0027)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        attributes \u003d [\u0027cgsnapshot\u0027, \u0027source_cgid\u0027, \u0027name\u0027, \u0027description\u0027]"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        for attr in attributes:"},{"line_number":123,"context_line":"            if consistencygroup_node.getAttribute(attr):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_f8cfe67c","line":120,"in_reply_to":"3a50d1a3_b26668b9","updated":"2015-07-28 21:47:56.000000000","message":"I\u0027m trying to be consistent with source_volid used for volume api.  We also have a \u003c 80 char limit to worry about. Some people may complain this is too long if I spell it out. So I\u0027d prefer to keep it this way.","commit_id":"682629377471c9f02c9d99c67c510de74c1a4aad"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"09c11dc95d59db4b1eece6261019ad73b1d8d535","unresolved":false,"context_lines":[{"line_number":264,"context_line":"        description \u003d consistencygroup.get(\u0027description\u0027, None)"},{"line_number":265,"context_line":"        cgsnapshot_id \u003d consistencygroup.get(\u0027cgsnapshot_id\u0027, None)"},{"line_number":266,"context_line":"        source_cgid \u003d consistencygroup.get(\u0027source_cgid\u0027, None)"},{"line_number":267,"context_line":"        if not cgsnapshot_id and not source_cgid:"},{"line_number":268,"context_line":"            msg \u003d _(\"Either cgsnapshot id or source cg id must be \""},{"line_number":269,"context_line":"                    \"provided to create consistency group %(name)s \""},{"line_number":270,"context_line":"                    \"from source.\") % {\u0027name\u0027: name}"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_36b7aff6","line":267,"updated":"2015-07-27 18:59:18.000000000","message":"Should we also check to make sure we didn\u0027t get a cg snapshot and source cg? Whats the intended behavior for that case? Definitely possible I\u0027m missing something and this can\u0027t happen, but I didn\u0027t see where.","commit_id":"682629377471c9f02c9d99c67c510de74c1a4aad"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c286827313fe22acc66b881a40213cf3da18e870","unresolved":false,"context_lines":[{"line_number":264,"context_line":"        description \u003d consistencygroup.get(\u0027description\u0027, None)"},{"line_number":265,"context_line":"        cgsnapshot_id \u003d consistencygroup.get(\u0027cgsnapshot_id\u0027, None)"},{"line_number":266,"context_line":"        source_cgid \u003d consistencygroup.get(\u0027source_cgid\u0027, None)"},{"line_number":267,"context_line":"        if not cgsnapshot_id and not source_cgid:"},{"line_number":268,"context_line":"            msg \u003d _(\"Either cgsnapshot id or source cg id must be \""},{"line_number":269,"context_line":"                    \"provided to create consistency group %(name)s \""},{"line_number":270,"context_line":"                    \"from source.\") % {\u0027name\u0027: name}"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_3dc2f2e9","line":267,"in_reply_to":"3a50d1a3_36b7aff6","updated":"2015-07-28 21:47:56.000000000","message":"Done.  That\u0027s a good point.","commit_id":"682629377471c9f02c9d99c67c510de74c1a4aad"},{"author":{"_account_id":177,"name":"Alex Meade","email":"mr.alex.meade@gmail.com","username":"alex-meade"},"change_message_id":"8c4d1b9d14fe2cf3d12c554575826f68a56a823c","unresolved":false,"context_lines":[{"line_number":265,"context_line":"        cgsnapshot_id \u003d consistencygroup.get(\u0027cgsnapshot_id\u0027, None)"},{"line_number":266,"context_line":"        source_cgid \u003d consistencygroup.get(\u0027source_cgid\u0027, None)"},{"line_number":267,"context_line":"        if not cgsnapshot_id and not source_cgid:"},{"line_number":268,"context_line":"            msg \u003d _(\"Either cgsnapshot id or source cg id must be \""},{"line_number":269,"context_line":"                    \"provided to create consistency group %(name)s \""},{"line_number":270,"context_line":"                    \"from source.\") % {\u0027name\u0027: name}"},{"line_number":271,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_52d4c41e","line":268,"updated":"2015-07-27 19:28:20.000000000","message":"I would put \u0027cgsnapshot_id\u0027 and \u0027source_cgid\u0027 verbatim in quotes so they know the exact attribute to set as they may not be familiar with the API.","commit_id":"682629377471c9f02c9d99c67c510de74c1a4aad"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c286827313fe22acc66b881a40213cf3da18e870","unresolved":false,"context_lines":[{"line_number":265,"context_line":"        cgsnapshot_id \u003d consistencygroup.get(\u0027cgsnapshot_id\u0027, None)"},{"line_number":266,"context_line":"        source_cgid \u003d consistencygroup.get(\u0027source_cgid\u0027, None)"},{"line_number":267,"context_line":"        if not cgsnapshot_id and not source_cgid:"},{"line_number":268,"context_line":"            msg \u003d _(\"Either cgsnapshot id or source cg id must be \""},{"line_number":269,"context_line":"                    \"provided to create consistency group %(name)s \""},{"line_number":270,"context_line":"                    \"from source.\") % {\u0027name\u0027: name}"},{"line_number":271,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_1dbdb667","line":268,"in_reply_to":"3a50d1a3_52d4c41e","updated":"2015-07-28 21:47:56.000000000","message":"Done","commit_id":"682629377471c9f02c9d99c67c510de74c1a4aad"}],"cinder/consistencygroup/api.py":[{"author":{"_account_id":177,"name":"Alex Meade","email":"mr.alex.meade@gmail.com","username":"alex-meade"},"change_message_id":"8c4d1b9d14fe2cf3d12c554575826f68a56a823c","unresolved":false,"context_lines":[{"line_number":169,"context_line":"        cgsnapshot \u003d None"},{"line_number":170,"context_line":"        orig_cg \u003d None"},{"line_number":171,"context_line":"        if cgsnapshot_id:"},{"line_number":172,"context_line":"            cgsnapshot \u003d self.db.cgsnapshot_get(context, cgsnapshot_id)"},{"line_number":173,"context_line":"            if cgsnapshot:"},{"line_number":174,"context_line":"                orig_cg \u003d self.db.consistencygroup_get("},{"line_number":175,"context_line":"                    context,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_cf8a71bf","line":172,"updated":"2015-07-27 19:28:20.000000000","message":"Same as below although not introduced here","commit_id":"682629377471c9f02c9d99c67c510de74c1a4aad"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c286827313fe22acc66b881a40213cf3da18e870","unresolved":false,"context_lines":[{"line_number":169,"context_line":"        cgsnapshot \u003d None"},{"line_number":170,"context_line":"        orig_cg \u003d None"},{"line_number":171,"context_line":"        if cgsnapshot_id:"},{"line_number":172,"context_line":"            cgsnapshot \u003d self.db.cgsnapshot_get(context, cgsnapshot_id)"},{"line_number":173,"context_line":"            if cgsnapshot:"},{"line_number":174,"context_line":"                orig_cg \u003d self.db.consistencygroup_get("},{"line_number":175,"context_line":"                    context,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_984c7443","line":172,"in_reply_to":"3a50d1a3_cf8a71bf","updated":"2015-07-28 21:47:56.000000000","message":"Added a try except here to raise the CgSnapshotNotFound exception. This will be caught in api/contrib/consistencygroups.py and raise HTTPNotFound. I see HTTPNotFound is raised for VolumeNotFound.","commit_id":"682629377471c9f02c9d99c67c510de74c1a4aad"},{"author":{"_account_id":177,"name":"Alex Meade","email":"mr.alex.meade@gmail.com","username":"alex-meade"},"change_message_id":"8c4d1b9d14fe2cf3d12c554575826f68a56a823c","unresolved":false,"context_lines":[{"line_number":177,"context_line":""},{"line_number":178,"context_line":"        source_cg \u003d None"},{"line_number":179,"context_line":"        if source_cgid:"},{"line_number":180,"context_line":"            source_cg \u003d self.db.consistencygroup_get("},{"line_number":181,"context_line":"                context, source_cgid)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"        options \u003d {\u0027user_id\u0027: context.user_id,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_cfdcb1e6","line":180,"updated":"2015-07-27 19:28:20.000000000","message":"If this isn\u0027t found then a BadRequest should end up being raised instead of a NotFound. HTTP 404 is reserved for a URL resource not being found I think","commit_id":"682629377471c9f02c9d99c67c510de74c1a4aad"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c286827313fe22acc66b881a40213cf3da18e870","unresolved":false,"context_lines":[{"line_number":177,"context_line":""},{"line_number":178,"context_line":"        source_cg \u003d None"},{"line_number":179,"context_line":"        if source_cgid:"},{"line_number":180,"context_line":"            source_cg \u003d self.db.consistencygroup_get("},{"line_number":181,"context_line":"                context, source_cgid)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"        options \u003d {\u0027user_id\u0027: context.user_id,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_383d208f","line":180,"in_reply_to":"3a50d1a3_cfdcb1e6","updated":"2015-07-28 21:47:56.000000000","message":"Good point.  Added a try except here to raise the ConsistencyGroupNotFound exception. This will be caught in api/contrib/consistencygroups.py and raise HTTPNotFound.","commit_id":"682629377471c9f02c9d99c67c510de74c1a4aad"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"6d59bb49814726dcbc6accd82f60ed310d83dead","unresolved":false,"context_lines":[{"line_number":320,"context_line":"                    with excutils.save_and_reraise_exception():"},{"line_number":321,"context_line":"                        LOG.error(_LE(\"Error occurred when creating cloned \""},{"line_number":322,"context_line":"                                      \"volume in the process of creating \""},{"line_number":323,"context_line":"                                      \"consistency group %(group)s from\""},{"line_number":324,"context_line":"                                      \"source CG %(source_cg)s.\"),"},{"line_number":325,"context_line":"                                  {\u0027group\u0027: group[\u0027id\u0027],"},{"line_number":326,"context_line":"                                   \u0027source_cg\u0027: source_cg[\u0027id\u0027]})"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_0695c9e2","line":323,"updated":"2015-07-27 06:46:37.000000000","message":"Need a space at the end. \"...from\" -\u003e \"...from \"","commit_id":"682629377471c9f02c9d99c67c510de74c1a4aad"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c286827313fe22acc66b881a40213cf3da18e870","unresolved":false,"context_lines":[{"line_number":320,"context_line":"                    with excutils.save_and_reraise_exception():"},{"line_number":321,"context_line":"                        LOG.error(_LE(\"Error occurred when creating cloned \""},{"line_number":322,"context_line":"                                      \"volume in the process of creating \""},{"line_number":323,"context_line":"                                      \"consistency group %(group)s from\""},{"line_number":324,"context_line":"                                      \"source CG %(source_cg)s.\"),"},{"line_number":325,"context_line":"                                  {\u0027group\u0027: group[\u0027id\u0027],"},{"line_number":326,"context_line":"                                   \u0027source_cg\u0027: source_cg[\u0027id\u0027]})"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_132cc500","line":323,"in_reply_to":"3a50d1a3_0695c9e2","updated":"2015-07-28 21:47:56.000000000","message":"Done","commit_id":"682629377471c9f02c9d99c67c510de74c1a4aad"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"a3b7ce8b8bb77323ae76f3b27715a3bf15df667d","unresolved":false,"context_lines":[{"line_number":177,"context_line":"                                  \"creating consistency group %(cg)s from \""},{"line_number":178,"context_line":"                                  \"source.\"),"},{"line_number":179,"context_line":"                              {\u0027cg\u0027: name, \u0027cgsnap\u0027: cgsnapshot_id})"},{"line_number":180,"context_line":"            orig_cg \u003d self.db.consistencygroup_get("},{"line_number":181,"context_line":"                context,"},{"line_number":182,"context_line":"                cgsnapshot[\u0027consistencygroup_id\u0027])"},{"line_number":183,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_0bff8d66","line":180,"updated":"2015-07-29 13:08:06.000000000","message":"I won\u0027t -1, but it would be good to get CG from the DB by CG Snapshot ID to decrease DB calls","commit_id":"360518ca0134a6f1fd7c8b39e51370ea76b1fe90"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"1db5d3def8a2e40de7bfcd1f2a36fa72827d4bb1","unresolved":false,"context_lines":[{"line_number":177,"context_line":"                                  \"creating consistency group %(cg)s from \""},{"line_number":178,"context_line":"                                  \"source.\"),"},{"line_number":179,"context_line":"                              {\u0027cg\u0027: name, \u0027cgsnap\u0027: cgsnapshot_id})"},{"line_number":180,"context_line":"            orig_cg \u003d self.db.consistencygroup_get("},{"line_number":181,"context_line":"                context,"},{"line_number":182,"context_line":"                cgsnapshot[\u0027consistencygroup_id\u0027])"},{"line_number":183,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_c59bb065","line":180,"in_reply_to":"3a50d1a3_0bff8d66","updated":"2015-07-30 00:18:46.000000000","message":"Hi Ivan,\n\nYou mean add another db method to get CG from CG snapshot ID?  cgsnapshot is needed after it is used here, so I don\u0027t think I can save a db call.  Let me know if you want me to change it.","commit_id":"360518ca0134a6f1fd7c8b39e51370ea76b1fe90"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"6829aff313fd19c8e057c65abd3b97198ad6e10d","unresolved":false,"context_lines":[{"line_number":177,"context_line":"                                  \"creating consistency group %(cg)s from \""},{"line_number":178,"context_line":"                                  \"source.\"),"},{"line_number":179,"context_line":"                              {\u0027cg\u0027: name, \u0027cgsnap\u0027: cgsnapshot_id})"},{"line_number":180,"context_line":"            orig_cg \u003d self.db.consistencygroup_get("},{"line_number":181,"context_line":"                context,"},{"line_number":182,"context_line":"                cgsnapshot[\u0027consistencygroup_id\u0027])"},{"line_number":183,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_b5d30e5f","line":180,"in_reply_to":"3a50d1a3_c59bb065","updated":"2015-07-30 15:54:53.000000000","message":"Thanks for clarification.\n\"cgsnapshot is needed after it is used here, so I don\u0027t think I can save a DB call\" - you\u0027re right. In such case we don\u0027t need to add one more db_api method. Let\u0027s leave this as is.\n\nAs a previous comment, I won\u0027t block this patch for it. I just want to be sure that we don\u0027t have more DB calls that needed.","commit_id":"360518ca0134a6f1fd7c8b39e51370ea76b1fe90"}],"cinder/tests/unit/api/contrib/test_consistencygroups.py":[{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"58ba6119e21cf0f5f5d07c8815ed10fdc7234d76","unresolved":false,"context_lines":[{"line_number":754,"context_line":"        db.consistencygroup_destroy(ctxt.elevated(), consistencygroup_id)"},{"line_number":755,"context_line":""},{"line_number":756,"context_line":"    def test_create_consistencygroup_from_src_cg(self):"},{"line_number":757,"context_line":"        self.stubs.Set(volume_api.API, \"create\", stubs.stub_volume_create)"},{"line_number":758,"context_line":""},{"line_number":759,"context_line":"        ctxt \u003d context.RequestContext(\u0027fake\u0027, \u0027fake\u0027, auth_token\u003dTrue)"},{"line_number":760,"context_line":"        source_cgid \u003d utils.create_consistencygroup(ctxt)[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_461af118","line":757,"updated":"2015-07-27 06:28:21.000000000","message":"I suggest you change it to mock.object.patch.","commit_id":"682629377471c9f02c9d99c67c510de74c1a4aad"},{"author":{"_account_id":177,"name":"Alex Meade","email":"mr.alex.meade@gmail.com","username":"alex-meade"},"change_message_id":"8c4d1b9d14fe2cf3d12c554575826f68a56a823c","unresolved":false,"context_lines":[{"line_number":754,"context_line":"        db.consistencygroup_destroy(ctxt.elevated(), consistencygroup_id)"},{"line_number":755,"context_line":""},{"line_number":756,"context_line":"    def test_create_consistencygroup_from_src_cg(self):"},{"line_number":757,"context_line":"        self.stubs.Set(volume_api.API, \"create\", stubs.stub_volume_create)"},{"line_number":758,"context_line":""},{"line_number":759,"context_line":"        ctxt \u003d context.RequestContext(\u0027fake\u0027, \u0027fake\u0027, auth_token\u003dTrue)"},{"line_number":760,"context_line":"        source_cgid \u003d utils.create_consistencygroup(ctxt)[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_728ea02f","line":757,"in_reply_to":"3a50d1a3_461af118","updated":"2015-07-27 19:28:20.000000000","message":"there is also self.mock_object(volume_api.API, \"create\", stubs.stub_volume_create)","commit_id":"682629377471c9f02c9d99c67c510de74c1a4aad"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c286827313fe22acc66b881a40213cf3da18e870","unresolved":false,"context_lines":[{"line_number":754,"context_line":"        db.consistencygroup_destroy(ctxt.elevated(), consistencygroup_id)"},{"line_number":755,"context_line":""},{"line_number":756,"context_line":"    def test_create_consistencygroup_from_src_cg(self):"},{"line_number":757,"context_line":"        self.stubs.Set(volume_api.API, \"create\", stubs.stub_volume_create)"},{"line_number":758,"context_line":""},{"line_number":759,"context_line":"        ctxt \u003d context.RequestContext(\u0027fake\u0027, \u0027fake\u0027, auth_token\u003dTrue)"},{"line_number":760,"context_line":"        source_cgid \u003d utils.create_consistencygroup(ctxt)[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_7348a9b3","line":757,"in_reply_to":"3a50d1a3_728ea02f","updated":"2015-07-28 21:47:56.000000000","message":"Done","commit_id":"682629377471c9f02c9d99c67c510de74c1a4aad"}]}
