)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":20105,"name":"Cao ShuFeng","email":"caosf.fnst@cn.fujitsu.com","username":"caosf.fnst"},"change_message_id":"5e858ee22ab054736cdeb79b3e5a9cb33fef0939","unresolved":false,"context_lines":[{"line_number":13,"context_line":"$ cinder quota-defaults invalid_tenantid"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I15c5d6cc932d66d97ead063b948e7d850831f7d5"},{"line_number":16,"context_line":"Closes-Bug: #1307487"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"dab17558_12041c48","line":16,"range":{"start_line":16,"start_character":12,"end_line":16,"end_character":20},"updated":"2016-05-16 09:44:18.000000000","message":"If this patch makes sense, it will also close: #1307486","commit_id":"01b317f9f51d9aa81a8c5b0c2062713bd9da8e1c"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"a223e4cb01895b37a07a7ace1bf2f0473cac55bd","unresolved":false,"context_lines":[{"line_number":13,"context_line":"$ cinder quota-defaults invalid_tenantid"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I15c5d6cc932d66d97ead063b948e7d850831f7d5"},{"line_number":16,"context_line":"Closes-Bug: #1307487"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9abb7d3a_544935b6","line":16,"updated":"2016-06-01 12:36:40.000000000","message":"Please, add APIImpact flag","commit_id":"86b8dfbedfdb8b862d2fc7c0568fdcc910fb3736"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"74d1196ad91666ab411beb1d1f625e71f94f00d3","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2016-06-01 16:33:04 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix quota-usage list information with invalid tenant-id"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The same incorrect results appeared after the execution of the"},{"line_number":10,"context_line":"following commands."},{"line_number":11,"context_line":"$ cinder quota-usage invalid-tenantid"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9abb7d3a_fd7233e2","line":8,"updated":"2016-06-03 16:15:44.000000000","message":"This needs to describe what the results are after this change rather than just saying that it changes things.","commit_id":"4ebd0f3551d77d63676108d0d3aff153a51a2d8e"}],"cinder/quota.py":[{"author":{"_account_id":177,"name":"Alex Meade","email":"mr.alex.meade@gmail.com","username":"alex-meade"},"change_message_id":"34de79e1fa5e9a64cbb7798a968a6f3b154b6be2","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        :param resources: A dictionary of the registered resources."},{"line_number":114,"context_line":"        :param project_id: The id of the current project"},{"line_number":115,"context_line":"        \"\"\""},{"line_number":116,"context_line":"        if not quota_utils.is_valid_project_id(context, project_id):"},{"line_number":117,"context_line":"            msg \u003d _(\"Project ID: %s does not exist.\") % project_id"},{"line_number":118,"context_line":"            raise exception.InvalidParameterValue(msg)"},{"line_number":119,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7aa08908_40f8c1c4","line":116,"range":{"start_line":116,"start_character":56,"end_line":116,"end_character":66},"updated":"2016-06-16 17:22:25.000000000","message":"What if project_id is none? do we need to add a test for that case? seems it should work.\n\nIs it more appropriate to have this check in cinder/api/contrib/quotas.py?","commit_id":"8b7d6336c328b32745934ddd0a37f8815f0fb4b5"},{"author":{"_account_id":14305,"name":"Yuriy Nesenenko","email":"ynesenenko@mirantis.com","username":"yuriy_n"},"change_message_id":"692f97fc777fb79b9020c909e6b6302bd597f6e9","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        :param resources: A dictionary of the registered resources."},{"line_number":114,"context_line":"        :param project_id: The id of the current project"},{"line_number":115,"context_line":"        \"\"\""},{"line_number":116,"context_line":"        if not quota_utils.is_valid_project_id(context, project_id):"},{"line_number":117,"context_line":"            msg \u003d _(\"Project ID: %s does not exist.\") % project_id"},{"line_number":118,"context_line":"            raise exception.InvalidParameterValue(msg)"},{"line_number":119,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7aa08908_67de903f","line":116,"range":{"start_line":116,"start_character":56,"end_line":116,"end_character":66},"in_reply_to":"7aa08908_40f8c1c4","updated":"2016-06-17 10:11:18.000000000","message":"If project_id is None we\u0027ll raise exception.","commit_id":"8b7d6336c328b32745934ddd0a37f8815f0fb4b5"},{"author":{"_account_id":177,"name":"Alex Meade","email":"mr.alex.meade@gmail.com","username":"alex-meade"},"change_message_id":"34de79e1fa5e9a64cbb7798a968a6f3b154b6be2","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        \"\"\""},{"line_number":116,"context_line":"        if not quota_utils.is_valid_project_id(context, project_id):"},{"line_number":117,"context_line":"            msg \u003d _(\"Project ID: %s does not exist.\") % project_id"},{"line_number":118,"context_line":"            raise exception.InvalidParameterValue(msg)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        quotas \u003d {}"},{"line_number":121,"context_line":"        default_quotas \u003d {}"}],"source_content_type":"text/x-python","patch_set":6,"id":"7aa08908_40cd6185","line":118,"updated":"2016-06-16 17:22:25.000000000","message":"I dont think there is a unittest for this case","commit_id":"8b7d6336c328b32745934ddd0a37f8815f0fb4b5"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"42da9222c491c05b2d6b43a0e59f06c3e0975212","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        \"\"\""},{"line_number":116,"context_line":"        if not quota_utils.is_valid_project_id(context, project_id):"},{"line_number":117,"context_line":"            msg \u003d _(\"Project ID: %s does not exist.\") % project_id"},{"line_number":118,"context_line":"            raise exception.InvalidParameterValue(msg)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        quotas \u003d {}"},{"line_number":121,"context_line":"        default_quotas \u003d {}"}],"source_content_type":"text/x-python","patch_set":11,"id":"bacf61ea_b4d40920","line":118,"range":{"start_line":118,"start_character":18,"end_line":118,"end_character":54},"updated":"2016-07-31 17:07:57.000000000","message":"exception.InvalidParameterValue(err\u003dmsg)","commit_id":"3e22bf50894876e495c0776abedd9a271db522a6"}],"cinder/quota_utils.py":[{"author":{"_account_id":20105,"name":"Cao ShuFeng","email":"caosf.fnst@cn.fujitsu.com","username":"caosf.fnst"},"change_message_id":"880d9e4d8f04f413339916badef48ef47525767c","unresolved":false,"context_lines":[{"line_number":160,"context_line":"    :param project_id: project id to check out"},{"line_number":161,"context_line":"    \"\"\""},{"line_number":162,"context_line":"    try:"},{"line_number":163,"context_line":"        keystone \u003d _keystone_client(context)"},{"line_number":164,"context_line":"        if keystone.version \u003d\u003d \u0027v3\u0027:"},{"line_number":165,"context_line":"            project_id \u003d keystone.projects.get(project_id)"},{"line_number":166,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"dab17558_f2552fc6","line":163,"range":{"start_line":163,"start_character":19,"end_line":163,"end_character":35},"updated":"2016-05-15 08:12:16.000000000","message":"Some people said that we only use keystone for nested quota.\nI don\u0027t know whether they are right.\nI just remind you of it.\n\nhttps://bugs.launchpad.net/cinder/+bug/1572986\nhttps://review.openstack.org/#/c/294895/","commit_id":"01b317f9f51d9aa81a8c5b0c2062713bd9da8e1c"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"a223e4cb01895b37a07a7ace1bf2f0473cac55bd","unresolved":false,"context_lines":[{"line_number":160,"context_line":"    :param project_id: project id to check out"},{"line_number":161,"context_line":"    \"\"\""},{"line_number":162,"context_line":"    try:"},{"line_number":163,"context_line":"        keystone \u003d _keystone_client(context)"},{"line_number":164,"context_line":"        if keystone.version \u003d\u003d \u0027v3\u0027:"},{"line_number":165,"context_line":"            project_id \u003d keystone.projects.get(project_id)"},{"line_number":166,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9abb7d3a_34ce3163","line":163,"updated":"2016-06-01 12:36:40.000000000","message":"Will it work for non-admin users too?","commit_id":"86b8dfbedfdb8b862d2fc7c0568fdcc910fb3736"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"c4e05088a2207a1ee2cb54e4ae7fa5e5d70fb4dd","unresolved":false,"context_lines":[{"line_number":160,"context_line":"    :param project_id: project id to check out"},{"line_number":161,"context_line":"    \"\"\""},{"line_number":162,"context_line":"    try:"},{"line_number":163,"context_line":"        keystone \u003d _keystone_client(context)"},{"line_number":164,"context_line":"        if keystone.version \u003d\u003d \u0027v3\u0027:"},{"line_number":165,"context_line":"            project_id \u003d keystone.projects.get(project_id)"},{"line_number":166,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9abb7d3a_1db1f78f","line":163,"in_reply_to":"9abb7d3a_34ce3163","updated":"2016-06-03 16:15:13.000000000","message":"Good question, I would like to understand the results here when you don\u0027t have permission to see this.\n\nCinder should probably return the same \"does not exist\" in that case, does that actually happen?","commit_id":"86b8dfbedfdb8b862d2fc7c0568fdcc910fb3736"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"a9000a14d22f9f13e95113d5c727d2c750eec672","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        else:"},{"line_number":167,"context_line":"            project_id \u003d keystone.tenants.get(project_id)"},{"line_number":168,"context_line":"    except exceptions.NotFound:"},{"line_number":169,"context_line":"        LOG.error(_LE(\"Project ID: %s does not exist.\"), project_id)"},{"line_number":170,"context_line":"        return False"},{"line_number":171,"context_line":"    except exceptions.Forbidden:"},{"line_number":172,"context_line":"        LOG.error(_LE(\"The unauthorized request.\"))"}],"source_content_type":"text/x-python","patch_set":6,"id":"7aa08908_7b149ae8","line":169,"updated":"2016-06-16 15:32:06.000000000","message":"This is not an error from the Cinder server\u0027s point of view, this should be logged at info level or similar, since it does not indicate that an admin should intervene.  It\u0027s just routine bad input from a client.","commit_id":"8b7d6336c328b32745934ddd0a37f8815f0fb4b5"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"a9000a14d22f9f13e95113d5c727d2c750eec672","unresolved":false,"context_lines":[{"line_number":169,"context_line":"        LOG.error(_LE(\"Project ID: %s does not exist.\"), project_id)"},{"line_number":170,"context_line":"        return False"},{"line_number":171,"context_line":"    except exceptions.Forbidden:"},{"line_number":172,"context_line":"        LOG.error(_LE(\"The unauthorized request.\"))"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    return True"},{"line_number":175,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7aa08908_1b0e36e5","line":172,"updated":"2016-06-16 15:32:06.000000000","message":"This should return False to indicate that the project doesn\u0027t exist if it fails due to access being denied.\n\nThe message should also be a little more descriptive.","commit_id":"8b7d6336c328b32745934ddd0a37f8815f0fb4b5"},{"author":{"_account_id":14305,"name":"Yuriy Nesenenko","email":"ynesenenko@mirantis.com","username":"yuriy_n"},"change_message_id":"9b3aa0ec9a423c55177059a7e30a5ce532aa78e6","unresolved":false,"context_lines":[{"line_number":169,"context_line":"        LOG.error(_LE(\"Project ID: %s does not exist.\"), project_id)"},{"line_number":170,"context_line":"        return False"},{"line_number":171,"context_line":"    except exceptions.Forbidden:"},{"line_number":172,"context_line":"        LOG.error(_LE(\"The unauthorized request.\"))"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    return True"},{"line_number":175,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7aa08908_b1646121","line":172,"in_reply_to":"7aa08908_1b0e36e5","updated":"2016-06-16 16:06:51.000000000","message":"The tempest.api.volume.admin.test_volume_quotas.BaseVolumeQuotasAdminV2TestJSON.test_quota_usage_after_volume_transfer uses the non-admin client but because only admin can get actions with quotas that test fails. So it only allows to pass that test.","commit_id":"8b7d6336c328b32745934ddd0a37f8815f0fb4b5"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"45c5fae3fa5e2530d6e5806f7920a4e8d933e35b","unresolved":false,"context_lines":[{"line_number":169,"context_line":"        LOG.error(_LE(\"Project ID: %s does not exist.\"), project_id)"},{"line_number":170,"context_line":"        return False"},{"line_number":171,"context_line":"    except exceptions.Forbidden:"},{"line_number":172,"context_line":"        LOG.error(_LE(\"The unauthorized request.\"))"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    return True"},{"line_number":175,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5a9d85d2_d9fe996a","line":172,"in_reply_to":"7aa08908_b1646121","updated":"2016-06-20 20:00:27.000000000","message":"Why would changing this fail that test?  Is it not possible for non-admin to tell that its own project id is valid?","commit_id":"8b7d6336c328b32745934ddd0a37f8815f0fb4b5"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"87ecf7074e152645471da1a42576541920a58c17","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        else:"},{"line_number":139,"context_line":"            project_id \u003d keystone.tenants.get(project_id)"},{"line_number":140,"context_line":"    except exceptions.NotFound:"},{"line_number":141,"context_line":"        LOG.error(_LI(\"Project ID: %s does not exist.\"), project_id)"},{"line_number":142,"context_line":"        return False"},{"line_number":143,"context_line":"    except exceptions.Forbidden:"},{"line_number":144,"context_line":"        LOG.error(_LE(\"The user isn\u0027t authorized to perform the requested \""}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_78437613","line":141,"range":{"start_line":141,"start_character":8,"end_line":141,"end_character":68},"updated":"2016-07-07 12:14:20.000000000","message":"_LI doesn\u0027t match LOG.error. I guess it should be LOG.info here.","commit_id":"0ed6693858e91b4fce1d25e47327fb2d2f61f619"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"87ecf7074e152645471da1a42576541920a58c17","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        LOG.error(_LI(\"Project ID: %s does not exist.\"), project_id)"},{"line_number":142,"context_line":"        return False"},{"line_number":143,"context_line":"    except exceptions.Forbidden:"},{"line_number":144,"context_line":"        LOG.error(_LE(\"The user isn\u0027t authorized to perform the requested \""},{"line_number":145,"context_line":"                      \"action.\"))"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    return True"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_d8a6eaac","line":145,"range":{"start_line":144,"start_character":0,"end_line":145,"end_character":33},"updated":"2016-07-07 12:14:20.000000000","message":"Interestingly enough this isn\u0027t getting logged when I try to do quota-show with non-admin user.","commit_id":"0ed6693858e91b4fce1d25e47327fb2d2f61f619"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"42da9222c491c05b2d6b43a0e59f06c3e0975212","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        return False"},{"line_number":143,"context_line":"    except exceptions.Forbidden:"},{"line_number":144,"context_line":"        LOG.error(_LE(\"The user isn\u0027t authorized to perform the requested \""},{"line_number":145,"context_line":"                      \"action.\"))"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    return True"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"bacf61ea_74ef31e9","line":145,"updated":"2016-07-31 17:07:57.000000000","message":"In this case, it will return True.  Shouldn\u0027t this return False by default?","commit_id":"3e22bf50894876e495c0776abedd9a271db522a6"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"8f482597c9327d6371f47bcc0d2e539fb3aaf4c9","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        return False"},{"line_number":143,"context_line":"    except exceptions.Forbidden:"},{"line_number":144,"context_line":"        LOG.error(_LE(\"The user isn\u0027t authorized to perform the requested \""},{"line_number":145,"context_line":"                      \"action.\"))"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    return True"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9ad45d7e_b5a68cab","line":145,"in_reply_to":"bacf61ea_2c3ef0c0","updated":"2016-08-11 20:46:46.000000000","message":"Rather than \"perform the requested action\", this message should specifically say \"...to retrieve project information from Keystone\".","commit_id":"3e22bf50894876e495c0776abedd9a271db522a6"},{"author":{"_account_id":14305,"name":"Yuriy Nesenenko","email":"ynesenenko@mirantis.com","username":"yuriy_n"},"change_message_id":"e36e46fba5e6fd4f07f1a9a9682a15166fd1e49e","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        return False"},{"line_number":143,"context_line":"    except exceptions.Forbidden:"},{"line_number":144,"context_line":"        LOG.error(_LE(\"The user isn\u0027t authorized to perform the requested \""},{"line_number":145,"context_line":"                      \"action.\"))"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    return True"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"bacf61ea_d72c0d9b","line":145,"in_reply_to":"bacf61ea_74ef31e9","updated":"2016-08-01 10:16:19.000000000","message":"The tempest.api.volume.admin.test_volume_quotas.BaseVolumeQuotasAdminV2TestJSON.test_quota_usage_after_volume_transfer uses the non-admin client but because only admin can get actions with quotas that test fails. So it only allows to pass that test.","commit_id":"3e22bf50894876e495c0776abedd9a271db522a6"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"a58b5049cde68baa8674cc3034f36a545726f104","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        return False"},{"line_number":143,"context_line":"    except exceptions.Forbidden:"},{"line_number":144,"context_line":"        LOG.error(_LE(\"The user isn\u0027t authorized to perform the requested \""},{"line_number":145,"context_line":"                      \"action.\"))"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    return True"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"bacf61ea_2c3ef0c0","line":145,"in_reply_to":"bacf61ea_d72c0d9b","updated":"2016-08-01 15:11:51.000000000","message":"Looks like that temp test should be changed to use the admin then.  Can you add some comments here to explain why this should return True?","commit_id":"3e22bf50894876e495c0776abedd9a271db522a6"}],"cinder/test.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"f7136750a9e00c3926c0475118a5317712127797","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                       side_effect\u003dself._get_joined_notifier)"},{"line_number":124,"context_line":"        p.start()"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        # Mock quota_utils.is_valid_project_id to return True"},{"line_number":127,"context_line":"        mock_project \u003d self.mock_object(quota_utils, \u0027is_valid_project_id\u0027)"},{"line_number":128,"context_line":"        mock_project.return_value \u003d True"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        # Unit tests do not need to use lazy gettext"},{"line_number":131,"context_line":"        i18n.enable_lazy(False)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_142f913f","line":128,"range":{"start_line":126,"start_character":0,"end_line":128,"end_character":40},"updated":"2016-07-07 15:11:06.000000000","message":"Maybe if would be good to save that like:\n\n         self.mock_is_valid_project \u003d self.mock_object(quota_utils, \u0027is_valid_project_id\u0027)\n         self.mock_is_valid_project.return_value \u003d True\n\nThen future tests would only need to set self.mock_is_valid_project.return_value \u003d False to test negative case.","commit_id":"079cbb14feaf7d018cadcc53aad7b86c66eed085"},{"author":{"_account_id":14305,"name":"Yuriy Nesenenko","email":"ynesenenko@mirantis.com","username":"yuriy_n"},"change_message_id":"e7831ad2127efc8f3f04b1ab986380e4d2d659b6","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                       side_effect\u003dself._get_joined_notifier)"},{"line_number":124,"context_line":"        p.start()"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        # Mock quota_utils.is_valid_project_id to return True"},{"line_number":127,"context_line":"        mock_project \u003d self.mock_object(quota_utils, \u0027is_valid_project_id\u0027)"},{"line_number":128,"context_line":"        mock_project.return_value \u003d True"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        # Unit tests do not need to use lazy gettext"},{"line_number":131,"context_line":"        i18n.enable_lazy(False)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_6fcc4089","line":128,"range":{"start_line":126,"start_character":0,"end_line":128,"end_character":40},"in_reply_to":"1aa78d24_142f913f","updated":"2016-07-07 15:24:40.000000000","message":"Sure. Why not? Thanks.","commit_id":"079cbb14feaf7d018cadcc53aad7b86c66eed085"}],"cinder/tests/unit/api/contrib/test_consistencygroups.py":[{"author":{"_account_id":177,"name":"Alex Meade","email":"mr.alex.meade@gmail.com","username":"alex-meade"},"change_message_id":"34de79e1fa5e9a64cbb7798a968a6f3b154b6be2","unresolved":false,"context_lines":[{"line_number":379,"context_line":"        consistencygroup2.destroy()"},{"line_number":380,"context_line":"        consistencygroup3.destroy()"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    @mock.patch.object(quota_utils, \u0027is_valid_project_id\u0027, return_value\u003dTrue)"},{"line_number":383,"context_line":"    @mock.patch("},{"line_number":384,"context_line":"        \u0027cinder.api.openstack.wsgi.Controller.validate_name_and_description\u0027)"},{"line_number":385,"context_line":"    def test_create_consistencygroup_json(self, mock_validate,"}],"source_content_type":"text/x-python","patch_set":6,"id":"7aa08908_c048318d","line":382,"updated":"2016-06-16 17:22:25.000000000","message":"There should be a better way than mocking this in many test files. Should these unittests even be using that codepath?","commit_id":"8b7d6336c328b32745934ddd0a37f8815f0fb4b5"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"f854c3df89fb5ae5266bd828d9ed88a4e1d36f53","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        self.user_ctxt \u003d context.RequestContext("},{"line_number":51,"context_line":"            fake.USER_ID, fake.PROJECT_ID, auth_token\u003dTrue)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        mock_project \u003d mock.patch(\u0027cinder.quota_utils.is_valid_project_id\u0027)"},{"line_number":54,"context_line":"        mock_project.start()"},{"line_number":55,"context_line":"        self.addCleanup(mock_project.stop)"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_f3002904","line":53,"updated":"2016-07-07 12:26:22.000000000","message":"return_value\u003dTrue?","commit_id":"0ed6693858e91b4fce1d25e47327fb2d2f61f619"}],"cinder/tests/unit/api/contrib/test_quotas.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"f854c3df89fb5ae5266bd828d9ed88a4e1d36f53","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        get_patcher.start()"},{"line_number":106,"context_line":"        self.addCleanup(get_patcher.stop)"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        mock_project \u003d mock.patch(\u0027cinder.quota_utils.is_valid_project_id\u0027)"},{"line_number":109,"context_line":"        mock_project.start()"},{"line_number":110,"context_line":"        self.addCleanup(mock_project.stop)"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_370bbc25","line":108,"updated":"2016-07-07 12:26:22.000000000","message":"return_value\u003dTrue?","commit_id":"0ed6693858e91b4fce1d25e47327fb2d2f61f619"}],"cinder/tests/unit/api/v1/test_snapshot_metadata.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"f854c3df89fb5ae5266bd828d9ed88a4e1d36f53","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        self.stubs.Set(self.volume_api, \u0027update_snapshot_metadata\u0027,"},{"line_number":124,"context_line":"                       fake_update_snapshot_metadata)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        mock_project \u003d mock.patch(\u0027cinder.quota_utils.is_valid_project_id\u0027)"},{"line_number":127,"context_line":"        mock_project.start()"},{"line_number":128,"context_line":"        self.addCleanup(mock_project.stop)"},{"line_number":129,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_d71cf86b","line":126,"updated":"2016-07-07 12:26:22.000000000","message":"return_value\u003dTrue?","commit_id":"0ed6693858e91b4fce1d25e47327fb2d2f61f619"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"f7136750a9e00c3926c0475118a5317712127797","unresolved":false,"context_lines":[{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        self.stubs.Set(self.volume_api, \u0027update_snapshot_metadata\u0027,"},{"line_number":124,"context_line":"                       fake_update_snapshot_metadata)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        self.ext_mgr \u003d extensions.ExtensionManager()"},{"line_number":127,"context_line":"        self.ext_mgr.extensions \u003d {}"},{"line_number":128,"context_line":"        self.snapshot_controller \u003d snapshots.SnapshotsController(self.ext_mgr)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_d9e262d4","line":125,"updated":"2016-07-07 15:11:06.000000000","message":"I guess this change is not needed?","commit_id":"079cbb14feaf7d018cadcc53aad7b86c66eed085"}],"cinder/tests/unit/api/v1/test_volume_metadata.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"f854c3df89fb5ae5266bd828d9ed88a4e1d36f53","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        self.stubs.Set(cinder.db, \u0027service_get_all_by_topic\u0027,"},{"line_number":149,"context_line":"                       stubs.stub_service_get_all_by_topic)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        mock_project \u003d mock.patch(\u0027cinder.quota_utils.is_valid_project_id\u0027)"},{"line_number":152,"context_line":"        mock_project.start()"},{"line_number":153,"context_line":"        self.addCleanup(mock_project.stop)"},{"line_number":154,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_b717ac43","line":151,"updated":"2016-07-07 12:26:22.000000000","message":"return_value\u003dTrue?","commit_id":"0ed6693858e91b4fce1d25e47327fb2d2f61f619"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"f7136750a9e00c3926c0475118a5317712127797","unresolved":false,"context_lines":[{"line_number":147,"context_line":"                       return_volume_metadata)"},{"line_number":148,"context_line":"        self.stubs.Set(cinder.db, \u0027service_get_all_by_topic\u0027,"},{"line_number":149,"context_line":"                       stubs.stub_service_get_all_by_topic)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        self.ext_mgr \u003d extensions.ExtensionManager()"},{"line_number":152,"context_line":"        self.ext_mgr.extensions \u003d {}"},{"line_number":153,"context_line":"        self.volume_controller \u003d volumes.VolumeController(self.ext_mgr)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_39e606e8","line":150,"updated":"2016-07-07 15:11:06.000000000","message":"ditto","commit_id":"079cbb14feaf7d018cadcc53aad7b86c66eed085"}],"cinder/tests/unit/api/v2/test_snapshot_metadata.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"f854c3df89fb5ae5266bd828d9ed88a4e1d36f53","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        self.stubs.Set(self.volume_api, \u0027update_snapshot_metadata\u0027,"},{"line_number":120,"context_line":"                       fake_update_snapshot_metadata)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        mock_project \u003d mock.patch(\u0027cinder.quota_utils.is_valid_project_id\u0027)"},{"line_number":123,"context_line":"        mock_project.start()"},{"line_number":124,"context_line":"        self.addCleanup(mock_project.stop)"},{"line_number":125,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_973d50c6","line":122,"updated":"2016-07-07 12:26:22.000000000","message":"return_value\u003dTrue?","commit_id":"0ed6693858e91b4fce1d25e47327fb2d2f61f619"}],"cinder/tests/unit/api/v2/test_volume_metadata.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"f854c3df89fb5ae5266bd828d9ed88a4e1d36f53","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        self.stubs.Set(self.volume_api, \u0027update_volume_metadata\u0027,"},{"line_number":139,"context_line":"                       fake_update_volume_metadata)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        mock_project \u003d mock.patch(\u0027cinder.quota_utils.is_valid_project_id\u0027)"},{"line_number":142,"context_line":"        mock_project.start()"},{"line_number":143,"context_line":"        self.addCleanup(mock_project.stop)"},{"line_number":144,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_d74a3854","line":141,"updated":"2016-07-07 12:26:22.000000000","message":"return_value\u003dTrue?","commit_id":"0ed6693858e91b4fce1d25e47327fb2d2f61f619"}],"cinder/tests/unit/test_quota.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"f854c3df89fb5ae5266bd828d9ed88a4e1d36f53","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        super(QuotaIntegrationTestCase, self).setUp()"},{"line_number":52,"context_line":"        self.volume_type_name \u003d CONF.default_volume_type"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        mock_project \u003d mock.patch(\u0027cinder.quota_utils.is_valid_project_id\u0027)"},{"line_number":55,"context_line":"        mock_project.start()"},{"line_number":56,"context_line":"        self.addCleanup(mock_project.stop)"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_9799d0c6","line":54,"updated":"2016-07-07 12:26:22.000000000","message":"return_value\u003dTrue?","commit_id":"0ed6693858e91b4fce1d25e47327fb2d2f61f619"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"f7136750a9e00c3926c0475118a5317712127797","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        objects.register_all()"},{"line_number":51,"context_line":"        super(QuotaIntegrationTestCase, self).setUp()"},{"line_number":52,"context_line":"        self.volume_type_name \u003d CONF.default_volume_type"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        self.volume_type \u003d db.volume_type_create("},{"line_number":55,"context_line":"            context.get_admin_context(),"},{"line_number":56,"context_line":"            dict(name\u003dself.volume_type_name))"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_f9063e84","line":53,"updated":"2016-07-07 15:11:06.000000000","message":"not needed","commit_id":"079cbb14feaf7d018cadcc53aad7b86c66eed085"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"f7136750a9e00c3926c0475118a5317712127797","unresolved":false,"context_lines":[{"line_number":963,"context_line":"class DbQuotaDriverTestCase(DbQuotaDriverBaseTestCase):"},{"line_number":964,"context_line":"    def setUp(self):"},{"line_number":965,"context_line":"        super(DbQuotaDriverTestCase, self).setUp()"},{"line_number":966,"context_line":"        mock_project_id \u003d self.mock_object(quota_utils, \u0027is_valid_project_id\u0027)"},{"line_number":967,"context_line":"        mock_project_id.return_value \u003d True"},{"line_number":968,"context_line":"        self.driver \u003d quota.DbQuotaDriver()"},{"line_number":969,"context_line":""},{"line_number":970,"context_line":"    def test_get_defaults(self):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_54b3d909","line":967,"range":{"start_line":966,"start_character":0,"end_line":967,"end_character":43},"updated":"2016-07-07 15:11:06.000000000","message":"Why do we need to do that if it\u0027s done in cinder.test?","commit_id":"079cbb14feaf7d018cadcc53aad7b86c66eed085"},{"author":{"_account_id":14305,"name":"Yuriy Nesenenko","email":"ynesenenko@mirantis.com","username":"yuriy_n"},"change_message_id":"e7831ad2127efc8f3f04b1ab986380e4d2d659b6","unresolved":false,"context_lines":[{"line_number":963,"context_line":"class DbQuotaDriverTestCase(DbQuotaDriverBaseTestCase):"},{"line_number":964,"context_line":"    def setUp(self):"},{"line_number":965,"context_line":"        super(DbQuotaDriverTestCase, self).setUp()"},{"line_number":966,"context_line":"        mock_project_id \u003d self.mock_object(quota_utils, \u0027is_valid_project_id\u0027)"},{"line_number":967,"context_line":"        mock_project_id.return_value \u003d True"},{"line_number":968,"context_line":"        self.driver \u003d quota.DbQuotaDriver()"},{"line_number":969,"context_line":""},{"line_number":970,"context_line":"    def test_get_defaults(self):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_0f2f7c3f","line":967,"range":{"start_line":966,"start_character":0,"end_line":967,"end_character":43},"in_reply_to":"1aa78d24_54b3d909","updated":"2016-07-07 15:24:40.000000000","message":"Sure. Thanks. I omitted it.","commit_id":"079cbb14feaf7d018cadcc53aad7b86c66eed085"}],"cinder/tests/unit/test_volume.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"f854c3df89fb5ae5266bd828d9ed88a4e1d36f53","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        self.stubs.Set(brick_lvm.LVM, \u0027_vg_exists\u0027, lambda x: True)"},{"line_number":157,"context_line":"        self.stubs.Set(os.path, \u0027exists\u0027, lambda x: True)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        mock_project \u003d mock.patch(\u0027cinder.quota_utils.is_valid_project_id\u0027)"},{"line_number":160,"context_line":"        mock_project.start()"},{"line_number":161,"context_line":"        self.addCleanup(mock_project.stop)"},{"line_number":162,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_736f19fc","line":159,"updated":"2016-07-07 12:26:22.000000000","message":"Shouldn\u0027t we explicitly say return_value\u003dTrue here? It\u0027s only by chance that Mock evaluates to True.","commit_id":"0ed6693858e91b4fce1d25e47327fb2d2f61f619"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"f7136750a9e00c3926c0475118a5317712127797","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        fake_image.stub_out_image_service(self.stubs)"},{"line_number":156,"context_line":"        self.stubs.Set(brick_lvm.LVM, \u0027_vg_exists\u0027, lambda x: True)"},{"line_number":157,"context_line":"        self.stubs.Set(os.path, \u0027exists\u0027, lambda x: True)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        self.volume.driver.set_initialized()"},{"line_number":160,"context_line":"        self.volume.stats \u003d {\u0027allocated_capacity_gb\u0027: 0,"},{"line_number":161,"context_line":"                             \u0027pools\u0027: {}}"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_1937ca4d","line":158,"updated":"2016-07-07 15:11:06.000000000","message":"not needed","commit_id":"079cbb14feaf7d018cadcc53aad7b86c66eed085"}]}
