)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"44b9e25e549a4295db1222c3892ba6504b59236b","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Cinder Nested Quota Driver patch adds hierarchical support. Quota"},{"line_number":10,"context_line":"API\u0027s were modified. For the first pass only immediate parents"},{"line_number":11,"context_line":"will be able to update and delete the child projects. Even after"},{"line_number":12,"context_line":"these chnages are made to the existing API\u0027s, the existing"},{"line_number":13,"context_line":"functionalities of DbQuotaDriver remains unchanged. The same"},{"line_number":14,"context_line":"driver will be able to understand flat namespace as well as"},{"line_number":15,"context_line":"hierarchical namespace depending on the API call."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3a50d1a3_98571fca","line":12,"updated":"2015-07-24 16:58:31.000000000","message":"typo: changes","commit_id":"eb72fcf6451d0244c38f4fa8ff6a72a2e2a673fc"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"7b9fdf68c9a57fe90a6d96f95608b653bc3632f2","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Cinder Nested Quota Driver patch adds hierarchical support. Quota"},{"line_number":10,"context_line":"API\u0027s were modified. For the first pass only immediate parents"},{"line_number":11,"context_line":"will be able to update and delete the child projects. Even after"},{"line_number":12,"context_line":"these chnages are made to the existing API\u0027s, the existing"},{"line_number":13,"context_line":"functionalities of DbQuotaDriver remains unchanged. The same"},{"line_number":14,"context_line":"driver will be able to understand flat namespace as well as"},{"line_number":15,"context_line":"hierarchical namespace depending on the API call."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3a50d1a3_929db35b","line":12,"in_reply_to":"3a50d1a3_98571fca","updated":"2015-07-24 22:18:21.000000000","message":"Done","commit_id":"eb72fcf6451d0244c38f4fa8ff6a72a2e2a673fc"},{"author":{"_account_id":17444,"name":"Jay.Shen","email":"shenhong09@huawei.com","username":"Jay.Shen"},"change_message_id":"85579969cc73ad65db53625f2d09f89a39dcbe4c","unresolved":false,"context_lines":[{"line_number":13,"context_line":"will be able to update and delete its children quotas."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Even after these changes are made, the existing DbQuotaDriver"},{"line_number":16,"context_line":"functionalities remains unchanged. The same driver will be able to"},{"line_number":17,"context_line":"handle flat projects as well as hierarchical projects."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Co-Authored-By: Erickson Santos \u003cerickson@lsd.ufcg.edu.br\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"1a4dcd0f_968f0b75","line":16,"updated":"2015-08-08 14:54:49.000000000","message":"S/remains/remain","commit_id":"5175e7f40479311d3899eac8fde7900ce4342cdd"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"00031f17dff09072040451c2db4bddac5145245a","unresolved":false,"context_lines":[{"line_number":13,"context_line":"will be able to update and delete its children quotas."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Even after these changes are made, the existing DbQuotaDriver"},{"line_number":16,"context_line":"functionalities remains unchanged. The same driver will be able to"},{"line_number":17,"context_line":"handle flat projects as well as hierarchical projects."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Co-Authored-By: Erickson Santos \u003cerickson@lsd.ufcg.edu.br\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"1a4dcd0f_93c9157c","line":16,"in_reply_to":"1a4dcd0f_968f0b75","updated":"2015-08-11 02:00:33.000000000","message":"Done","commit_id":"5175e7f40479311d3899eac8fde7900ce4342cdd"}],"cinder/api/contrib/quotas.py":[{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"44b9e25e549a4295db1222c3892ba6504b59236b","unresolved":false,"context_lines":[{"line_number":32,"context_line":"CONF \u003d cfg.CONF"},{"line_number":33,"context_line":"QUOTAS \u003d quota.QUOTAS"},{"line_number":34,"context_line":"NON_QUOTA_KEYS \u003d [\u0027tenant_id\u0027, \u0027id\u0027]"},{"line_number":35,"context_line":"QUOTA_KEYS \u003d [\u0027gigabytes\u0027, \u0027snapshots\u0027, \u0027volumes\u0027]"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"authorize_update \u003d extensions.extension_authorizer(\u0027volume\u0027, \u0027quotas:update\u0027)"},{"line_number":38,"context_line":"authorize_show \u003d extensions.extension_authorizer(\u0027volume\u0027, \u0027quotas:show\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_95b5a87f","line":35,"updated":"2015-07-24 16:58:31.000000000","message":"where is this being used?","commit_id":"eb72fcf6451d0244c38f4fa8ff6a72a2e2a673fc"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"7b9fdf68c9a57fe90a6d96f95608b653bc3632f2","unresolved":false,"context_lines":[{"line_number":32,"context_line":"CONF \u003d cfg.CONF"},{"line_number":33,"context_line":"QUOTAS \u003d quota.QUOTAS"},{"line_number":34,"context_line":"NON_QUOTA_KEYS \u003d [\u0027tenant_id\u0027, \u0027id\u0027]"},{"line_number":35,"context_line":"QUOTA_KEYS \u003d [\u0027gigabytes\u0027, \u0027snapshots\u0027, \u0027volumes\u0027]"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"authorize_update \u003d extensions.extension_authorizer(\u0027volume\u0027, \u0027quotas:update\u0027)"},{"line_number":38,"context_line":"authorize_show \u003d extensions.extension_authorizer(\u0027volume\u0027, \u0027quotas:show\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_d2ba5bc0","line":35,"in_reply_to":"3a50d1a3_95b5a87f","updated":"2015-07-24 22:18:21.000000000","message":"please see delete()","commit_id":"eb72fcf6451d0244c38f4fa8ff6a72a2e2a673fc"},{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"44b9e25e549a4295db1222c3892ba6504b59236b","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    \"\"\"Helper function for finding the url for communicating with"},{"line_number":44,"context_line":"    keystone"},{"line_number":45,"context_line":"    \"\"\""},{"line_number":46,"context_line":"    auth_url \u003d CONF.keymgr.encryption_auth_url"},{"line_number":47,"context_line":"    return auth_url"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_1558b855","line":46,"updated":"2015-07-24 16:58:31.000000000","message":"I don\u0027t think it is a necessary method. Why don\u0027t you just use \"CONF.keymgr.encryption_auth_url\" ?","commit_id":"eb72fcf6451d0244c38f4fa8ff6a72a2e2a673fc"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"7b9fdf68c9a57fe90a6d96f95608b653bc3632f2","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    \"\"\"Helper function for finding the url for communicating with"},{"line_number":44,"context_line":"    keystone"},{"line_number":45,"context_line":"    \"\"\""},{"line_number":46,"context_line":"    auth_url \u003d CONF.keymgr.encryption_auth_url"},{"line_number":47,"context_line":"    return auth_url"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_32d13ffc","line":46,"in_reply_to":"3a50d1a3_1558b855","updated":"2015-07-24 22:18:21.000000000","message":"Sure.","commit_id":"eb72fcf6451d0244c38f4fa8ff6a72a2e2a673fc"},{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"44b9e25e549a4295db1222c3892ba6504b59236b","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    return auth_url"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"def get_parent_id(self, context, project_id):"},{"line_number":51,"context_line":"    \"\"\"Helper function for finding the parent_id of a project."},{"line_number":52,"context_line":"    For root project ,parent_id is NULL"},{"line_number":53,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_b8a9bbe1","line":50,"updated":"2015-07-24 16:58:31.000000000","message":"if it is a helper function, I think you should start its name with an underscore. See  https://www.python.org/dev/peps/pep-0008/#naming-conventions","commit_id":"eb72fcf6451d0244c38f4fa8ff6a72a2e2a673fc"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"7b9fdf68c9a57fe90a6d96f95608b653bc3632f2","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    return auth_url"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"def get_parent_id(self, context, project_id):"},{"line_number":51,"context_line":"    \"\"\"Helper function for finding the parent_id of a project."},{"line_number":52,"context_line":"    For root project ,parent_id is NULL"},{"line_number":53,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_03c5d759","line":50,"in_reply_to":"3a50d1a3_b8a9bbe1","updated":"2015-07-24 22:18:21.000000000","message":"Done","commit_id":"eb72fcf6451d0244c38f4fa8ff6a72a2e2a673fc"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"8f4f5012b4bdf2d33598b070977a7e1f6be04d32","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    keystone \u003d client.Client(token\u003dtoken, auth_url\u003dauth_url,"},{"line_number":61,"context_line":"                             project_id\u003dproject_id)"},{"line_number":62,"context_line":"    data \u003d keystone.projects.get(project_id)"},{"line_number":63,"context_line":"    parent_id \u003d data.__dict__.get(\"parent_id\", None)"},{"line_number":64,"context_line":"    return parent_id"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_f40d2ee9","line":63,"updated":"2015-07-24 05:35:26.000000000","message":"Out of curiosity why do this?\n\nUsually accessing parts of an object that start with two underscores is not desirable.\n\n\u003e\u003e\u003e class Thing(object):\n    ...   def __init__(self):\n    ...     self.b \u003d 2\n    ... \n    \u003e\u003e\u003e x \u003d Thing()\n    \u003e\u003e\u003e x.__dict__\n    {\u0027b\u0027: 2}\n    \u003e\u003e\u003e x.b\n    2\n    \u003e\u003e\u003e x.c\n    Traceback (most recent call last):\n      File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n    AttributeError: \u0027Thing\u0027 object has no attribute \u0027c\u0027\n\nIf what u are doing is to try to access an attribute that may not exist and set a default, I\u0027m pretty sure its more often seen to do this:\n\n\n    \u003e\u003e\u003e try:\n    ...   e \u003d x.c\n    ... except AttributeError:\n    ...   e \u003d 2\n    ... \n    \u003e\u003e\u003e e\n    2","commit_id":"eb72fcf6451d0244c38f4fa8ff6a72a2e2a673fc"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"7b9fdf68c9a57fe90a6d96f95608b653bc3632f2","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    keystone \u003d client.Client(token\u003dtoken, auth_url\u003dauth_url,"},{"line_number":61,"context_line":"                             project_id\u003dproject_id)"},{"line_number":62,"context_line":"    data \u003d keystone.projects.get(project_id)"},{"line_number":63,"context_line":"    parent_id \u003d data.__dict__.get(\"parent_id\", None)"},{"line_number":64,"context_line":"    return parent_id"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_e3f0ebcb","line":63,"in_reply_to":"3a50d1a3_381a8b6f","updated":"2015-07-24 22:18:21.000000000","message":"Can be done...may be in next patch","commit_id":"eb72fcf6451d0244c38f4fa8ff6a72a2e2a673fc"},{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"44b9e25e549a4295db1222c3892ba6504b59236b","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    keystone \u003d client.Client(token\u003dtoken, auth_url\u003dauth_url,"},{"line_number":61,"context_line":"                             project_id\u003dproject_id)"},{"line_number":62,"context_line":"    data \u003d keystone.projects.get(project_id)"},{"line_number":63,"context_line":"    parent_id \u003d data.__dict__.get(\"parent_id\", None)"},{"line_number":64,"context_line":"    return parent_id"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_381a8b6f","line":63,"in_reply_to":"3a50d1a3_f40d2ee9","updated":"2015-07-24 16:58:31.000000000","message":"Agree with Joshua. And why don\u0027t you encapsulate keystoneclient instantiation in a method and just call it where it is needed?","commit_id":"eb72fcf6451d0244c38f4fa8ff6a72a2e2a673fc"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"7b9fdf68c9a57fe90a6d96f95608b653bc3632f2","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    keystone \u003d client.Client(token\u003dtoken, auth_url\u003dauth_url,"},{"line_number":61,"context_line":"                             project_id\u003dproject_id)"},{"line_number":62,"context_line":"    data \u003d keystone.projects.get(project_id)"},{"line_number":63,"context_line":"    parent_id \u003d data.__dict__.get(\"parent_id\", None)"},{"line_number":64,"context_line":"    return parent_id"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_a381834f","line":63,"in_reply_to":"3a50d1a3_f40d2ee9","updated":"2015-07-24 22:18:21.000000000","message":"Done","commit_id":"eb72fcf6451d0244c38f4fa8ff6a72a2e2a673fc"},{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"44b9e25e549a4295db1222c3892ba6504b59236b","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    return parent_id"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def get_hierarchical_child_list(self, context, parent_id):"},{"line_number":68,"context_line":"    \"\"\"Helper function for finding the immediate child projects"},{"line_number":69,"context_line":"    of the parent project"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_58af57e3","line":67,"updated":"2015-07-24 16:58:31.000000000","message":"ditto.","commit_id":"eb72fcf6451d0244c38f4fa8ff6a72a2e2a673fc"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"7b9fdf68c9a57fe90a6d96f95608b653bc3632f2","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    return parent_id"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def get_hierarchical_child_list(self, context, parent_id):"},{"line_number":68,"context_line":"    \"\"\"Helper function for finding the immediate child projects"},{"line_number":69,"context_line":"    of the parent project"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_e3e6ab43","line":67,"in_reply_to":"3a50d1a3_58af57e3","updated":"2015-07-24 22:18:21.000000000","message":"Done","commit_id":"eb72fcf6451d0244c38f4fa8ff6a72a2e2a673fc"},{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"44b9e25e549a4295db1222c3892ba6504b59236b","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    child_list \u003d []"},{"line_number":76,"context_line":"    token \u003d context.auth_token"},{"line_number":77,"context_line":"    auth_url \u003d self._get_auth_url()"},{"line_number":78,"context_line":"    keystone \u003d client.Client(token\u003dtoken, auth_url\u003dauth_url,"},{"line_number":79,"context_line":"                             project_id\u003dparent_id)"},{"line_number":80,"context_line":"    data \u003d keystone.projects.get(parent_id, subtree_as_ids\u003dTrue)"},{"line_number":81,"context_line":"    subtree \u003d data.__dict__.get(\"subtree\", {})"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_f82ae37d","line":78,"updated":"2015-07-24 16:58:31.000000000","message":"same here.","commit_id":"eb72fcf6451d0244c38f4fa8ff6a72a2e2a673fc"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"7b9fdf68c9a57fe90a6d96f95608b653bc3632f2","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    child_list \u003d []"},{"line_number":76,"context_line":"    token \u003d context.auth_token"},{"line_number":77,"context_line":"    auth_url \u003d self._get_auth_url()"},{"line_number":78,"context_line":"    keystone \u003d client.Client(token\u003dtoken, auth_url\u003dauth_url,"},{"line_number":79,"context_line":"                             project_id\u003dparent_id)"},{"line_number":80,"context_line":"    data \u003d keystone.projects.get(parent_id, subtree_as_ids\u003dTrue)"},{"line_number":81,"context_line":"    subtree \u003d data.__dict__.get(\"subtree\", {})"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_03ee37ec","line":78,"in_reply_to":"3a50d1a3_f82ae37d","updated":"2015-07-24 22:18:21.000000000","message":"Can be done...may be in next patch","commit_id":"eb72fcf6451d0244c38f4fa8ff6a72a2e2a673fc"},{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"44b9e25e549a4295db1222c3892ba6504b59236b","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    return child_list"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"def get_hierarchical_parent_list(self, context, project_id):"},{"line_number":88,"context_line":"    \"\"\"Helper function for finding the immediate child projects"},{"line_number":89,"context_line":"    of the parent project"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_58c43791","line":87,"updated":"2015-07-24 16:58:31.000000000","message":"ditto.","commit_id":"eb72fcf6451d0244c38f4fa8ff6a72a2e2a673fc"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"7b9fdf68c9a57fe90a6d96f95608b653bc3632f2","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    return child_list"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"def get_hierarchical_parent_list(self, context, project_id):"},{"line_number":88,"context_line":"    \"\"\"Helper function for finding the immediate child projects"},{"line_number":89,"context_line":"    of the parent project"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_43cbdf72","line":87,"in_reply_to":"3a50d1a3_58c43791","updated":"2015-07-24 22:18:21.000000000","message":"Done","commit_id":"eb72fcf6451d0244c38f4fa8ff6a72a2e2a673fc"},{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"44b9e25e549a4295db1222c3892ba6504b59236b","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    parent_list \u003d []"},{"line_number":96,"context_line":"    token \u003d context.auth_token"},{"line_number":97,"context_line":"    auth_url \u003d self._get_auth_url()"},{"line_number":98,"context_line":"    keystone \u003d client.Client(token\u003dtoken, auth_url\u003dauth_url,"},{"line_number":99,"context_line":"                             project_id\u003dproject_id)"},{"line_number":100,"context_line":"    data \u003d keystone.projects.get(project_id, parents_as_ids\u003dTrue)"},{"line_number":101,"context_line":"    parents \u003d data.__dict__.get(\"parents\", {})"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_b8245baf","line":98,"updated":"2015-07-24 16:58:31.000000000","message":"and here.","commit_id":"eb72fcf6451d0244c38f4fa8ff6a72a2e2a673fc"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"7b9fdf68c9a57fe90a6d96f95608b653bc3632f2","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    parent_list \u003d []"},{"line_number":96,"context_line":"    token \u003d context.auth_token"},{"line_number":97,"context_line":"    auth_url \u003d self._get_auth_url()"},{"line_number":98,"context_line":"    keystone \u003d client.Client(token\u003dtoken, auth_url\u003dauth_url,"},{"line_number":99,"context_line":"                             project_id\u003dproject_id)"},{"line_number":100,"context_line":"    data \u003d keystone.projects.get(project_id, parents_as_ids\u003dTrue)"},{"line_number":101,"context_line":"    parents \u003d data.__dict__.get(\"parents\", {})"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_a3b983ee","line":98,"in_reply_to":"3a50d1a3_b8245baf","updated":"2015-07-24 22:18:21.000000000","message":"Can be done...may be in next patch","commit_id":"eb72fcf6451d0244c38f4fa8ff6a72a2e2a673fc"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"844a6a86d3cb5d7d4e734192c35fe91aa5d7e8b3","unresolved":false,"context_lines":[{"line_number":98,"context_line":"    keystone \u003d client.Client(token\u003dtoken, auth_url\u003dauth_url,"},{"line_number":99,"context_line":"                             project_id\u003dproject_id)"},{"line_number":100,"context_line":"    data \u003d keystone.projects.get(project_id, parents_as_ids\u003dTrue)"},{"line_number":101,"context_line":"    parents \u003d data.__dict__.get(\"parents\", {})"},{"line_number":102,"context_line":"    for item in parents.keys():"},{"line_number":103,"context_line":"        parent_list.append(item)"},{"line_number":104,"context_line":"    return parent_list"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_b4948644","line":101,"updated":"2015-07-24 05:36:14.000000000","message":"Same question, badness to access private attributes of objects...","commit_id":"eb72fcf6451d0244c38f4fa8ff6a72a2e2a673fc"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"7b9fdf68c9a57fe90a6d96f95608b653bc3632f2","unresolved":false,"context_lines":[{"line_number":98,"context_line":"    keystone \u003d client.Client(token\u003dtoken, auth_url\u003dauth_url,"},{"line_number":99,"context_line":"                             project_id\u003dproject_id)"},{"line_number":100,"context_line":"    data \u003d keystone.projects.get(project_id, parents_as_ids\u003dTrue)"},{"line_number":101,"context_line":"    parents \u003d data.__dict__.get(\"parents\", {})"},{"line_number":102,"context_line":"    for item in parents.keys():"},{"line_number":103,"context_line":"        parent_list.append(item)"},{"line_number":104,"context_line":"    return parent_list"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_e3c30b37","line":101,"in_reply_to":"3a50d1a3_b4948644","updated":"2015-07-24 22:18:21.000000000","message":"Done","commit_id":"eb72fcf6451d0244c38f4fa8ff6a72a2e2a673fc"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"8f4f5012b4bdf2d33598b070977a7e1f6be04d32","unresolved":false,"context_lines":[{"line_number":217,"context_line":"        parent_id \u003d None"},{"line_number":218,"context_line":"        child_list \u003d []"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"        if not hasattr(params, \u0027__call__\u0027) and \u0027usage\u0027 in params:"},{"line_number":221,"context_line":"            usage \u003d strutils.bool_from_string(params[\u0027usage\u0027])"},{"line_number":222,"context_line":"        else:"},{"line_number":223,"context_line":"            usage \u003d False"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_94162af0","line":220,"updated":"2015-07-24 05:35:26.000000000","message":"Where is params defined here?","commit_id":"eb72fcf6451d0244c38f4fa8ff6a72a2e2a673fc"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"7b9fdf68c9a57fe90a6d96f95608b653bc3632f2","unresolved":false,"context_lines":[{"line_number":217,"context_line":"        parent_id \u003d None"},{"line_number":218,"context_line":"        child_list \u003d []"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"        if not hasattr(params, \u0027__call__\u0027) and \u0027usage\u0027 in params:"},{"line_number":221,"context_line":"            usage \u003d strutils.bool_from_string(params[\u0027usage\u0027])"},{"line_number":222,"context_line":"        else:"},{"line_number":223,"context_line":"            usage \u003d False"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_a3dc2319","line":220,"in_reply_to":"3a50d1a3_94162af0","updated":"2015-07-24 22:18:21.000000000","message":"my bad","commit_id":"eb72fcf6451d0244c38f4fa8ff6a72a2e2a673fc"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"8f4f5012b4bdf2d33598b070977a7e1f6be04d32","unresolved":false,"context_lines":[{"line_number":227,"context_line":"            # namespace."},{"line_number":228,"context_line":"            parent_id \u003d get_parent_id(context, target_project_id)"},{"line_number":229,"context_line":"        except Exception:"},{"line_number":230,"context_line":"            raise webob.exc.HTTPForbidden()"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        self.assert_valid_body(body, \u0027quota_set\u0027)"},{"line_number":233,"context_line":"        bad_keys \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_d4e35204","line":230,"updated":"2015-07-24 05:35:26.000000000","message":"Isn\u0027t this the same code as in the prior method, why copy/paste it? Make a common function...","commit_id":"eb72fcf6451d0244c38f4fa8ff6a72a2e2a673fc"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"7b9fdf68c9a57fe90a6d96f95608b653bc3632f2","unresolved":false,"context_lines":[{"line_number":227,"context_line":"            # namespace."},{"line_number":228,"context_line":"            parent_id \u003d get_parent_id(context, target_project_id)"},{"line_number":229,"context_line":"        except Exception:"},{"line_number":230,"context_line":"            raise webob.exc.HTTPForbidden()"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        self.assert_valid_body(body, \u0027quota_set\u0027)"},{"line_number":233,"context_line":"        bad_keys \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_7e7230af","line":230,"in_reply_to":"3a50d1a3_d4e35204","updated":"2015-07-24 22:18:21.000000000","message":"Done","commit_id":"eb72fcf6451d0244c38f4fa8ff6a72a2e2a673fc"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"8f4f5012b4bdf2d33598b070977a7e1f6be04d32","unresolved":false,"context_lines":[{"line_number":368,"context_line":"        child_list \u003d []"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"        try:"},{"line_number":371,"context_line":"            if parent_id:"},{"line_number":372,"context_line":"                child_list \u003d get_hierarchical_child_list(context,"},{"line_number":373,"context_line":"                                                         context.project_id)"},{"line_number":374,"context_line":"                if not child_list:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_f4b20e06","line":371,"updated":"2015-07-24 05:35:26.000000000","message":"Same question, why are we copy/pasting the same block of code?","commit_id":"eb72fcf6451d0244c38f4fa8ff6a72a2e2a673fc"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"7b9fdf68c9a57fe90a6d96f95608b653bc3632f2","unresolved":false,"context_lines":[{"line_number":368,"context_line":"        child_list \u003d []"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"        try:"},{"line_number":371,"context_line":"            if parent_id:"},{"line_number":372,"context_line":"                child_list \u003d get_hierarchical_child_list(context,"},{"line_number":373,"context_line":"                                                         context.project_id)"},{"line_number":374,"context_line":"                if not child_list:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_fe5e4011","line":371,"in_reply_to":"3a50d1a3_f4b20e06","updated":"2015-07-24 22:18:21.000000000","message":"Done","commit_id":"eb72fcf6451d0244c38f4fa8ff6a72a2e2a673fc"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"43d0d4f6fc5980ec1c37f3731b423504134e3b0f","unresolved":false,"context_lines":[{"line_number":369,"context_line":"        params \u003d req.params"},{"line_number":370,"context_line":"        parent_id \u003d None"},{"line_number":371,"context_line":"        child_list \u003d []"},{"line_number":372,"context_line":""},{"line_number":373,"context_line":"        try:"},{"line_number":374,"context_line":"            _authorize_action(context, target_project_id, parent_id)"},{"line_number":375,"context_line":"        except exception.NotAuthorized:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_9e17fc53","line":372,"updated":"2015-07-24 22:41:24.000000000","message":"is \u0027child_list\u0027 used anymore in this function?","commit_id":"27c4bcc14c57070f7f9d82d3ec4d555b480a870d"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"b69b031a52403cc8ba031311d0c8364b4dbffbe3","unresolved":false,"context_lines":[{"line_number":96,"context_line":""},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"def _authorize_action(context, target_project_id, parent_id):"},{"line_number":99,"context_line":"    child_list \u003d []"},{"line_number":100,"context_line":"    try:"},{"line_number":101,"context_line":"        if parent_id:"},{"line_number":102,"context_line":"            child_list \u003d _get_hierarchical_child_list(context,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a50d1a3_745010d5","line":99,"updated":"2015-07-24 22:58:27.000000000","message":"Hmm, is it needed to define this here, its just being overwritten in `child_list \u003d _get_hierarchical_child_list` right?","commit_id":"c6e85dbeaac7fb06ab7934f2eca0ca84e9c23314"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"71c56251decffe816b939dbd89238dabcee2fbb4","unresolved":false,"context_lines":[{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":5,"context_line":"# not use this file except in compliance with the License. You may obtain"},{"line_number":6,"context_line":"#    a copy of the License at"},{"line_number":7,"context_line":"#"},{"line_number":8,"context_line":"#         http://www.apache.org/licenses/LICENSE-2.0"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_50cf9155","line":5,"updated":"2015-07-29 06:00:05.000000000","message":"don\u0027t think this should be moved, all the other header have this indention","commit_id":"156097419cdf8545b602400b237cd5a34f6f4186"},{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"3d975b765f897184f359762e19ae5225f4b0dc9c","unresolved":false,"context_lines":[{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":5,"context_line":"# not use this file except in compliance with the License. You may obtain"},{"line_number":6,"context_line":"#    a copy of the License at"},{"line_number":7,"context_line":"#"},{"line_number":8,"context_line":"#         http://www.apache.org/licenses/LICENSE-2.0"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_e2ccc56b","line":5,"in_reply_to":"3a50d1a3_50cf9155","updated":"2015-07-29 12:23:21.000000000","message":"Done","commit_id":"156097419cdf8545b602400b237cd5a34f6f4186"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"817c967b8f32693d42c6d8cd3912523f88acce3a","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                          parent_project_quotas[key][\u0027reserved\u0027] -"},{"line_number":86,"context_line":"                          parent_project_quotas[key][\u0027allocated\u0027])"},{"line_number":87,"context_line":"            if limit \u003e free_quota:"},{"line_number":88,"context_line":"                msg \u003d _(\"Free quota availabe is %s.\") % free_quota"},{"line_number":89,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":90,"context_line":"        return limit"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3a50d1a3_98107f5b","line":88,"updated":"2015-07-30 20:31:51.000000000","message":"s/ \"Free quota availabe is %s.\" / \u0027Free quota availabe is %s.\u0027","commit_id":"d2948233301e15d77f9af087abe906b070a9248b"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"6f1d189d05fa5f4ed76ff4a6c880015f1897a8c1","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                          parent_project_quotas[key][\u0027reserved\u0027] -"},{"line_number":86,"context_line":"                          parent_project_quotas[key][\u0027allocated\u0027])"},{"line_number":87,"context_line":"            if limit \u003e free_quota:"},{"line_number":88,"context_line":"                msg \u003d _(\"Free quota availabe is %s.\") % free_quota"},{"line_number":89,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":90,"context_line":"        return limit"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3a50d1a3_3e5ec545","line":88,"in_reply_to":"3a50d1a3_98107f5b","updated":"2015-07-31 17:32:44.000000000","message":"Do you mean to point out the misspelling of available? No need to change from double quotes to single quotes. They are equivalent.","commit_id":"d2948233301e15d77f9af087abe906b070a9248b"},{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"ac8b53b0b60f34022836e369418cbaa2b4351c5c","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                          parent_project_quotas[key][\u0027reserved\u0027] -"},{"line_number":86,"context_line":"                          parent_project_quotas[key][\u0027allocated\u0027])"},{"line_number":87,"context_line":"            if limit \u003e free_quota:"},{"line_number":88,"context_line":"                msg \u003d _(\"Free quota availabe is %s.\") % free_quota"},{"line_number":89,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":90,"context_line":"        return limit"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3a50d1a3_de01e105","line":88,"in_reply_to":"3a50d1a3_98107f5b","updated":"2015-07-31 17:27:19.000000000","message":"I was just following the exception message pattern of this file. The other messages are doing this way as well. Please, see Line 78 and 203.","commit_id":"d2948233301e15d77f9af087abe906b070a9248b"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"817c967b8f32693d42c6d8cd3912523f88acce3a","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                             perform an update or delete operation."},{"line_number":110,"context_line":"        \"\"\""},{"line_number":111,"context_line":"        if context_project.parent_id:"},{"line_number":112,"context_line":"            raise exception.NotAuthorized()"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        if context_project.id !\u003d target_project_id:"},{"line_number":115,"context_line":"            if target_project_id not in context_project.subtree:"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a50d1a3_bb71b5aa","line":112,"updated":"2015-07-30 20:31:51.000000000","message":"can you please add some message explain why the user are not authorized?","commit_id":"d2948233301e15d77f9af087abe906b070a9248b"},{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"ac8b53b0b60f34022836e369418cbaa2b4351c5c","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                             perform an update or delete operation."},{"line_number":110,"context_line":"        \"\"\""},{"line_number":111,"context_line":"        if context_project.parent_id:"},{"line_number":112,"context_line":"            raise exception.NotAuthorized()"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        if context_project.id !\u003d target_project_id:"},{"line_number":115,"context_line":"            if target_project_id not in context_project.subtree:"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a50d1a3_fe1cdd6b","line":112,"in_reply_to":"3a50d1a3_bb71b5aa","updated":"2015-07-31 17:27:19.000000000","message":"Thank\u0027s, I\u0027ll do it.","commit_id":"d2948233301e15d77f9af087abe906b070a9248b"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"817c967b8f32693d42c6d8cd3912523f88acce3a","unresolved":false,"context_lines":[{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        if context_project.id !\u003d target_project_id:"},{"line_number":115,"context_line":"            if target_project_id not in context_project.subtree:"},{"line_number":116,"context_line":"                raise exception.NotAuthorized()"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def _authorize_show(self, context_project, target_project_id):"},{"line_number":119,"context_line":"        \"\"\"Checks if show is allowed in the current hierarchy."}],"source_content_type":"text/x-python","patch_set":12,"id":"3a50d1a3_5b6751ea","line":116,"updated":"2015-07-30 20:31:51.000000000","message":"same here","commit_id":"d2948233301e15d77f9af087abe906b070a9248b"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"817c967b8f32693d42c6d8cd3912523f88acce3a","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        \"\"\""},{"line_number":128,"context_line":"        if context_project.id !\u003d target_project_id:"},{"line_number":129,"context_line":"            if context_project.parent_id:"},{"line_number":130,"context_line":"                raise exception.NotAuthorized()"},{"line_number":131,"context_line":"            if target_project_id not in context_project.subtree:"},{"line_number":132,"context_line":"                raise exception.NotAuthorized()"},{"line_number":133,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3a50d1a3_db9921d2","line":130,"updated":"2015-07-30 20:31:51.000000000","message":"and here","commit_id":"d2948233301e15d77f9af087abe906b070a9248b"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"dfa9ad9f1feb0dd772165609f6ff225ae1ecdb26","unresolved":false,"context_lines":[{"line_number":126,"context_line":"            for child in subtree.keys():"},{"line_number":127,"context_line":"                if child \u003d\u003d target_project_id:"},{"line_number":128,"context_line":"                    return True"},{"line_number":129,"context_line":"                self._same_hierarchy(target_project_id, subtree[child])"},{"line_number":130,"context_line":"        return False"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def _get_project(self, context, req, id, subtree_as_ids\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a4dcd0f_f31f8659","line":129,"updated":"2015-08-03 19:09:32.000000000","message":"Did u mean to do:\n\n  return self._same_hierarchy(...) ?\n\nOr did u want to do:\n\n    for child in subtree.keys():\n       if child \u003d\u003d target_project_id:\n            return True\n       if self._same_hierarchy(target_project_id, subtree[child]):\n            return True\n    return False\n\nOtherwise I\"m unsure what the recursion returns (always false?)","commit_id":"8069ef53bc53afcb5dc9e234da7b5ec2c0607adf"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"8cf891f68dc7a8eccd8abb60d94a177a2f0b674c","unresolved":false,"context_lines":[{"line_number":126,"context_line":"            for child in subtree.keys():"},{"line_number":127,"context_line":"                if child \u003d\u003d target_project_id:"},{"line_number":128,"context_line":"                    return True"},{"line_number":129,"context_line":"                self._same_hierarchy(target_project_id, subtree[child])"},{"line_number":130,"context_line":"        return False"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def _get_project(self, context, req, id, subtree_as_ids\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a4dcd0f_c102efb3","line":129,"in_reply_to":"1a4dcd0f_f31f8659","updated":"2015-08-07 01:45:59.000000000","message":"Good catch ! Will update in next patch.","commit_id":"8069ef53bc53afcb5dc9e234da7b5ec2c0607adf"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"dfa9ad9f1feb0dd772165609f6ff225ae1ecdb26","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        parent_id \u003d target_project.parent_id"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"        if parent_id:"},{"line_number":215,"context_line":"            # Get the children of the project which the token is sccoped to in"},{"line_number":216,"context_line":"            # order to know if the target_project is in its hierarchy."},{"line_number":217,"context_line":"            context_project \u003d self._get_project(context, req,"},{"line_number":218,"context_line":"                                                context.project_id,"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a4dcd0f_f3a46609","line":215,"updated":"2015-08-03 19:09:32.000000000","message":"\u0027sccoped\u0027 -\u003e \u0027scoped\u0027","commit_id":"8069ef53bc53afcb5dc9e234da7b5ec2c0607adf"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"8cf891f68dc7a8eccd8abb60d94a177a2f0b674c","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        parent_id \u003d target_project.parent_id"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"        if parent_id:"},{"line_number":215,"context_line":"            # Get the children of the project which the token is sccoped to in"},{"line_number":216,"context_line":"            # order to know if the target_project is in its hierarchy."},{"line_number":217,"context_line":"            context_project \u003d self._get_project(context, req,"},{"line_number":218,"context_line":"                                                context.project_id,"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a4dcd0f_21f873c2","line":215,"in_reply_to":"1a4dcd0f_f3a46609","updated":"2015-08-07 01:45:59.000000000","message":"Done","commit_id":"8069ef53bc53afcb5dc9e234da7b5ec2c0607adf"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"dfa9ad9f1feb0dd772165609f6ff225ae1ecdb26","unresolved":false,"context_lines":[{"line_number":282,"context_line":"        parent_id \u003d target_project.parent_id"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        if parent_id:"},{"line_number":285,"context_line":"            # Get the children of the project which the token is sccoped to in"},{"line_number":286,"context_line":"            # order to know if the target_project is in its hierarchy."},{"line_number":287,"context_line":"            context_project \u003d self._get_project(context, req,"},{"line_number":288,"context_line":"                                                context.project_id,"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a4dcd0f_70060c22","line":285,"updated":"2015-08-03 19:09:32.000000000","message":"\u0027sccoped\u0027 -\u003e \u0027scoped\u0027","commit_id":"8069ef53bc53afcb5dc9e234da7b5ec2c0607adf"},{"author":{"_account_id":11057,"name":"sajeesh cs","email":"sajeesh.cs@cern.ch","username":"sajeeshcs"},"change_message_id":"f1a512f912b04c5d87e1740225f7ee3333545bd1","unresolved":false,"context_lines":[{"line_number":295,"context_line":""},{"line_number":296,"context_line":"            # We have to fake a parent project id so that we get 0 if the quota"},{"line_number":297,"context_line":"            # of the parent project was not set yet. In this way, we don\u0027t need"},{"line_number":298,"context_line":"            # to make another request to keystone."},{"line_number":299,"context_line":"            parent_project_quotas \u003d QUOTAS.get_project_quotas("},{"line_number":300,"context_line":"                context, parent_id, parent_project_id\u003d\u0027fake\u0027)"},{"line_number":301,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1a4dcd0f_9d853b5b","line":298,"updated":"2015-08-06 17:00:03.000000000","message":"Can you please make this part clear","commit_id":"8069ef53bc53afcb5dc9e234da7b5ec2c0607adf"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"8cf891f68dc7a8eccd8abb60d94a177a2f0b674c","unresolved":false,"context_lines":[{"line_number":295,"context_line":""},{"line_number":296,"context_line":"            # We have to fake a parent project id so that we get 0 if the quota"},{"line_number":297,"context_line":"            # of the parent project was not set yet. In this way, we don\u0027t need"},{"line_number":298,"context_line":"            # to make another request to keystone."},{"line_number":299,"context_line":"            parent_project_quotas \u003d QUOTAS.get_project_quotas("},{"line_number":300,"context_line":"                context, parent_id, parent_project_id\u003d\u0027fake\u0027)"},{"line_number":301,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1a4dcd0f_8185c75a","line":298,"in_reply_to":"1a4dcd0f_9d853b5b","updated":"2015-08-07 01:45:59.000000000","message":"Don\u0027t want to end up doing recursion and just check the parent and not the parent of the parent (grandparent) or great-grandparent. HTH","commit_id":"8069ef53bc53afcb5dc9e234da7b5ec2c0607adf"},{"author":{"_account_id":11057,"name":"sajeesh cs","email":"sajeesh.cs@cern.ch","username":"sajeeshcs"},"change_message_id":"f1a512f912b04c5d87e1740225f7ee3333545bd1","unresolved":false,"context_lines":[{"line_number":309,"context_line":"                parent_allocated -\u003d project_hard_limit"},{"line_number":310,"context_line":"                # Update the allocated of the parent"},{"line_number":311,"context_line":"                db.quota_allocated_update(context, parent_id, key,"},{"line_number":312,"context_line":"                                          parent_allocated)"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"        try:"},{"line_number":315,"context_line":"            db.quota_destroy_by_project(context, target_project.id)"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a4dcd0f_bd959733","line":312,"updated":"2015-08-06 17:00:03.000000000","message":"Allocated quota should be updated only if  db.quota_destroy_by_project(context, target_project.id) is successful","commit_id":"8069ef53bc53afcb5dc9e234da7b5ec2c0607adf"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"8cf891f68dc7a8eccd8abb60d94a177a2f0b674c","unresolved":false,"context_lines":[{"line_number":309,"context_line":"                parent_allocated -\u003d project_hard_limit"},{"line_number":310,"context_line":"                # Update the allocated of the parent"},{"line_number":311,"context_line":"                db.quota_allocated_update(context, parent_id, key,"},{"line_number":312,"context_line":"                                          parent_allocated)"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"        try:"},{"line_number":315,"context_line":"            db.quota_destroy_by_project(context, target_project.id)"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a4dcd0f_61119b03","line":312,"in_reply_to":"1a4dcd0f_bd959733","updated":"2015-08-07 01:45:59.000000000","message":"Makes sense. Will change it. Thanks.","commit_id":"8069ef53bc53afcb5dc9e234da7b5ec2c0607adf"},{"author":{"_account_id":11057,"name":"sajeesh cs","email":"sajeesh.cs@cern.ch","username":"sajeeshcs"},"change_message_id":"8541780ed79120908bb60902f8b3e5b601902efc","unresolved":false,"context_lines":[{"line_number":249,"context_line":"        # NOTE(ankit): Pass #3 - At this point we know that all the keys and"},{"line_number":250,"context_line":"        # values are valid and we can iterate and update them all in one shot"},{"line_number":251,"context_line":"        # without having to worry about rolling back etc as we have done"},{"line_number":252,"context_line":"        # the validation up front in the 2 loops above."},{"line_number":253,"context_line":"        for key, value in valid_quotas.items():"},{"line_number":254,"context_line":"            if key in allocated_quotas.keys():"},{"line_number":255,"context_line":"                db.quota_allocated_update(context, parent_id, key,"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a4dcd0f_64250009","line":252,"updated":"2015-08-07 18:43:17.000000000","message":"just like in deletion , allocated quota of the parent should be updated only after updating the quota of the child.","commit_id":"5175e7f40479311d3899eac8fde7900ce4342cdd"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"00031f17dff09072040451c2db4bddac5145245a","unresolved":false,"context_lines":[{"line_number":249,"context_line":"        # NOTE(ankit): Pass #3 - At this point we know that all the keys and"},{"line_number":250,"context_line":"        # values are valid and we can iterate and update them all in one shot"},{"line_number":251,"context_line":"        # without having to worry about rolling back etc as we have done"},{"line_number":252,"context_line":"        # the validation up front in the 2 loops above."},{"line_number":253,"context_line":"        for key, value in valid_quotas.items():"},{"line_number":254,"context_line":"            if key in allocated_quotas.keys():"},{"line_number":255,"context_line":"                db.quota_allocated_update(context, parent_id, key,"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a4dcd0f_d8281a36","line":252,"in_reply_to":"1a4dcd0f_64250009","updated":"2015-08-11 02:00:33.000000000","message":"Sure. To be frank IMHO the order does not matter but what matters is both these operations should be done atomically. Same applies for delete.","commit_id":"5175e7f40479311d3899eac8fde7900ce4342cdd"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"5c768d511cb0684f8d49987410bc1bcd73fe1c7c","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        # without having to worry about rolling back etc as we have done"},{"line_number":252,"context_line":"        # the validation up front in the 2 loops above."},{"line_number":253,"context_line":"        for key, value in valid_quotas.items():"},{"line_number":254,"context_line":"            if key in allocated_quotas.keys():"},{"line_number":255,"context_line":"                db.quota_allocated_update(context, parent_id, key,"},{"line_number":256,"context_line":"                                          allocated_quotas[key])"},{"line_number":257,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"1a4dcd0f_7b3340f7","line":254,"updated":"2015-08-09 08:10:50.000000000","message":"Just \u0027if key in allocated_quotas\u0027 is OK.","commit_id":"5175e7f40479311d3899eac8fde7900ce4342cdd"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"00031f17dff09072040451c2db4bddac5145245a","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        # without having to worry about rolling back etc as we have done"},{"line_number":252,"context_line":"        # the validation up front in the 2 loops above."},{"line_number":253,"context_line":"        for key, value in valid_quotas.items():"},{"line_number":254,"context_line":"            if key in allocated_quotas.keys():"},{"line_number":255,"context_line":"                db.quota_allocated_update(context, parent_id, key,"},{"line_number":256,"context_line":"                                          allocated_quotas[key])"},{"line_number":257,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"1a4dcd0f_58b40a34","line":254,"in_reply_to":"1a4dcd0f_7b3340f7","updated":"2015-08-11 02:00:33.000000000","message":"Sure but will keep it for consistency.","commit_id":"5175e7f40479311d3899eac8fde7900ce4342cdd"},{"author":{"_account_id":11057,"name":"sajeesh cs","email":"sajeesh.cs@cern.ch","username":"sajeeshcs"},"change_message_id":"8541780ed79120908bb60902f8b3e5b601902efc","unresolved":false,"context_lines":[{"line_number":305,"context_line":"                context, target_project.id, usages\u003dTrue,"},{"line_number":306,"context_line":"                parent_project_id\u003dparent_id)"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"            # Delete child quota first and later update parent\u0027s quota"},{"line_number":309,"context_line":"            try:"},{"line_number":310,"context_line":"                db.quota_destroy_by_project(context, target_project.id)"},{"line_number":311,"context_line":"            except exception.AdminRequired:"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a4dcd0f_6488a0c7","line":308,"updated":"2015-08-07 18:43:17.000000000","message":"Before deletion of a project it needs to be checked whether it is having non-zero allocated quota or child projects.","commit_id":"5175e7f40479311d3899eac8fde7900ce4342cdd"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"00031f17dff09072040451c2db4bddac5145245a","unresolved":false,"context_lines":[{"line_number":305,"context_line":"                context, target_project.id, usages\u003dTrue,"},{"line_number":306,"context_line":"                parent_project_id\u003dparent_id)"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"            # Delete child quota first and later update parent\u0027s quota"},{"line_number":309,"context_line":"            try:"},{"line_number":310,"context_line":"                db.quota_destroy_by_project(context, target_project.id)"},{"line_number":311,"context_line":"            except exception.AdminRequired:"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a4dcd0f_933595dc","line":308,"in_reply_to":"1a4dcd0f_6488a0c7","updated":"2015-08-11 02:00:33.000000000","message":"Sure.","commit_id":"5175e7f40479311d3899eac8fde7900ce4342cdd"},{"author":{"_account_id":11057,"name":"sajeesh cs","email":"sajeesh.cs@cern.ch","username":"sajeeshcs"},"change_message_id":"8541780ed79120908bb60902f8b3e5b601902efc","unresolved":false,"context_lines":[{"line_number":319,"context_line":"                db.quota_allocated_update(context, parent_id, key,"},{"line_number":320,"context_line":"                                          parent_allocated)"},{"line_number":321,"context_line":"        else:"},{"line_number":322,"context_line":"            try:"},{"line_number":323,"context_line":"                db.quota_destroy_by_project(context, target_project.id)"},{"line_number":324,"context_line":"            except exception.AdminRequired:"},{"line_number":325,"context_line":"                raise webob.exc.HTTPForbidden()"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a4dcd0f_647660da","line":322,"updated":"2015-08-07 18:43:17.000000000","message":"Before deletion of a project, it needs to be checked whether it is having non-zero allocated quota or child projects.","commit_id":"5175e7f40479311d3899eac8fde7900ce4342cdd"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"00031f17dff09072040451c2db4bddac5145245a","unresolved":false,"context_lines":[{"line_number":319,"context_line":"                db.quota_allocated_update(context, parent_id, key,"},{"line_number":320,"context_line":"                                          parent_allocated)"},{"line_number":321,"context_line":"        else:"},{"line_number":322,"context_line":"            try:"},{"line_number":323,"context_line":"                db.quota_destroy_by_project(context, target_project.id)"},{"line_number":324,"context_line":"            except exception.AdminRequired:"},{"line_number":325,"context_line":"                raise webob.exc.HTTPForbidden()"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a4dcd0f_736809bb","line":322,"in_reply_to":"1a4dcd0f_647660da","updated":"2015-08-11 02:00:33.000000000","message":"In non-hierarchical case if an admin is deleting a project he/she is sure he wan;t to delete it...there is no risk to delete the child projects quota as it is in hierarchical case.\n\nDoing so will prohibit an admin from deleting quota for a project","commit_id":"5175e7f40479311d3899eac8fde7900ce4342cdd"},{"author":{"_account_id":10674,"name":"Yusuke Hayashi","email":"yusuke.hayashi.710@gmail.com","username":"YusukeHayashi"},"change_message_id":"c0a0fd00bb3fa49bbe21d0482fc9afebd9c74841","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        if context_project.id !\u003d target_project_id:"},{"line_number":117,"context_line":"            if not self.same_hierarchy(target_project_id,"},{"line_number":118,"context_line":"                                       context_project.subtree):"},{"line_number":119,"context_line":"                msg \u003d _(\"Update and delete quota operations can only be made \""},{"line_number":120,"context_line":"                        \"to projects in the same hierarchy of the project in \""}],"source_content_type":"text/x-python","patch_set":16,"id":"1a4dcd0f_e84bac29","line":117,"updated":"2015-08-11 12:37:44.000000000","message":"self.same_hierarchy \u003d\u003e self._same_hierarchy","commit_id":"2a1122aee776b0e613a56daaf784d1b6279d105f"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"1c41cea98394b09f36ceaae897b6c2124c91b05a","unresolved":false,"context_lines":[{"line_number":153,"context_line":"                if context_project.id !\u003d target_project.parent_id:"},{"line_number":154,"context_line":"                    if context_project.parent_id:"},{"line_number":155,"context_line":"                        msg \u003d _(\"Only users with token scoped to immediate\""},{"line_number":156,"context_line":"                                \" parents or root projects are allowed to see\""},{"line_number":157,"context_line":"                                \"its children quotas.\")"},{"line_number":158,"context_line":"                        raise webob.exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":159,"context_line":"        elif context_project.parent_id:"}],"source_content_type":"text/x-python","patch_set":27,"id":"fa1b9901_697d351b","line":156,"updated":"2015-08-26 03:05:15.000000000","message":"missing space at EOL.","commit_id":"24378a2229a3f337e0abe9110b00805f304920e6"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"0564279b16f85e2926a55050ccdd9a67baa7883f","unresolved":false,"context_lines":[{"line_number":153,"context_line":"                if context_project.id !\u003d target_project.parent_id:"},{"line_number":154,"context_line":"                    if context_project.parent_id:"},{"line_number":155,"context_line":"                        msg \u003d _(\"Only users with token scoped to immediate\""},{"line_number":156,"context_line":"                                \" parents or root projects are allowed to see\""},{"line_number":157,"context_line":"                                \"its children quotas.\")"},{"line_number":158,"context_line":"                        raise webob.exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":159,"context_line":"        elif context_project.parent_id:"}],"source_content_type":"text/x-python","patch_set":27,"id":"fa1b9901_cd4a4683","line":156,"in_reply_to":"fa1b9901_697d351b","updated":"2015-08-26 06:52:28.000000000","message":"Done","commit_id":"24378a2229a3f337e0abe9110b00805f304920e6"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"1c41cea98394b09f36ceaae897b6c2124c91b05a","unresolved":false,"context_lines":[{"line_number":157,"context_line":"                                \"its children quotas.\")"},{"line_number":158,"context_line":"                        raise webob.exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":159,"context_line":"        elif context_project.parent_id:"},{"line_number":160,"context_line":"            msg \u003d _(\"An user with a token scoped to a subproject is not\""},{"line_number":161,"context_line":"                    \" allowed to see the quota of its parents.\")"},{"line_number":162,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":163,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"fa1b9901_2973bd4f","line":160,"updated":"2015-08-26 03:05:15.000000000","message":"Same comment here.","commit_id":"24378a2229a3f337e0abe9110b00805f304920e6"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"0564279b16f85e2926a55050ccdd9a67baa7883f","unresolved":false,"context_lines":[{"line_number":157,"context_line":"                                \"its children quotas.\")"},{"line_number":158,"context_line":"                        raise webob.exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":159,"context_line":"        elif context_project.parent_id:"},{"line_number":160,"context_line":"            msg \u003d _(\"An user with a token scoped to a subproject is not\""},{"line_number":161,"context_line":"                    \" allowed to see the quota of its parents.\")"},{"line_number":162,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":163,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"fa1b9901_ed362a02","line":160,"in_reply_to":"fa1b9901_2973bd4f","updated":"2015-08-26 06:52:28.000000000","message":"Done","commit_id":"24378a2229a3f337e0abe9110b00805f304920e6"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"0ee9f10a775b8d45b4aff5065baf25eb11d60b42","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                          parent_project_quotas[key][\u0027allocated\u0027])"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"            current \u003d 0"},{"line_number":86,"context_line":"            if project_quotas.get(key):"},{"line_number":87,"context_line":"                current \u003d project_quotas[key][\u0027limit\u0027]"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"            if limit - current \u003e free_quota:"}],"source_content_type":"text/x-python","patch_set":28,"id":"fa1b9901_cf0b08d4","line":86,"updated":"2015-08-26 13:51:23.000000000","message":"if project_quotas\u003d\u003dNone here, this can raise a exception, right?","commit_id":"a68771209ac80f0124a0b2063b083a8e518fe8e5"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"0e738a0cc630b6b2137430b6752bb68503262aef","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                          parent_project_quotas[key][\u0027allocated\u0027])"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"            current \u003d 0"},{"line_number":86,"context_line":"            if project_quotas.get(key):"},{"line_number":87,"context_line":"                current \u003d project_quotas[key][\u0027limit\u0027]"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"            if limit - current \u003e free_quota:"}],"source_content_type":"text/x-python","patch_set":28,"id":"da20952f_b13eebb6","line":86,"in_reply_to":"da20952f_16c78d13","updated":"2015-08-26 20:05:44.000000000","message":"For hierarchical projects it will always be passed in and will *never* be NULL whereas for non-hierarchical projects it will be None in that case we won\u0027t hit this case anyway.\n\nHope that helps.","commit_id":"a68771209ac80f0124a0b2063b083a8e518fe8e5"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"cdcc8f87bcb6fd499236dc819ad620f7aef129c3","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                          parent_project_quotas[key][\u0027allocated\u0027])"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"            current \u003d 0"},{"line_number":86,"context_line":"            if project_quotas.get(key):"},{"line_number":87,"context_line":"                current \u003d project_quotas[key][\u0027limit\u0027]"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"            if limit - current \u003e free_quota:"}],"source_content_type":"text/x-python","patch_set":28,"id":"da20952f_16c78d13","line":86,"in_reply_to":"da20952f_85f925cb","updated":"2015-08-26 19:59:55.000000000","message":"Since is a kwargs, if this method is called without this parameter, project_quotas will be none, and I can\u0027t do \"none\".get().\n\nSo, is there some case when project_quotas will be none? is no, why are you using this argument as a kwarg?","commit_id":"a68771209ac80f0124a0b2063b083a8e518fe8e5"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"cae655cfc8135477da0f7ef1af69e8731c6295de","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                          parent_project_quotas[key][\u0027allocated\u0027])"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"            current \u003d 0"},{"line_number":86,"context_line":"            if project_quotas.get(key):"},{"line_number":87,"context_line":"                current \u003d project_quotas[key][\u0027limit\u0027]"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"            if limit - current \u003e free_quota:"}],"source_content_type":"text/x-python","patch_set":28,"id":"da20952f_31317ba3","line":86,"in_reply_to":"da20952f_b13eebb6","updated":"2015-08-26 20:12:00.000000000","message":"You\u0027re right. Sorry about that","commit_id":"a68771209ac80f0124a0b2063b083a8e518fe8e5"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"73e84dfb75182bff33e749e35bf674cedd4ea95b","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                          parent_project_quotas[key][\u0027allocated\u0027])"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"            current \u003d 0"},{"line_number":86,"context_line":"            if project_quotas.get(key):"},{"line_number":87,"context_line":"                current \u003d project_quotas[key][\u0027limit\u0027]"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"            if limit - current \u003e free_quota:"}],"source_content_type":"text/x-python","patch_set":28,"id":"da20952f_85f925cb","line":86,"in_reply_to":"fa1b9901_cf0b08d4","updated":"2015-08-26 19:02:24.000000000","message":"Can add an exception but can you point me to the use-case or scenario when this will can be None.","commit_id":"a68771209ac80f0124a0b2063b083a8e518fe8e5"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"0ee9f10a775b8d45b4aff5065baf25eb11d60b42","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        \"\"\""},{"line_number":117,"context_line":"        if context_project.parent_id and parent_id !\u003d context_project.id:"},{"line_number":118,"context_line":"            msg \u003d _(\"Update and delete nested quota operations can only be \""},{"line_number":119,"context_line":"                    \"made by users with token scoped to a root project.\")"},{"line_number":120,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        if context_project.id !\u003d target_project_id:"}],"source_content_type":"text/x-python","patch_set":28,"id":"fa1b9901_0fd4a01d","line":119,"updated":"2015-08-26 13:51:23.000000000","message":"and what about the parent project?\n\nI think that you need change this message for the same in the line 130.","commit_id":"a68771209ac80f0124a0b2063b083a8e518fe8e5"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"73e84dfb75182bff33e749e35bf674cedd4ea95b","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        \"\"\""},{"line_number":117,"context_line":"        if context_project.parent_id and parent_id !\u003d context_project.id:"},{"line_number":118,"context_line":"            msg \u003d _(\"Update and delete nested quota operations can only be \""},{"line_number":119,"context_line":"                    \"made by users with token scoped to a root project.\")"},{"line_number":120,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        if context_project.id !\u003d target_project_id:"}],"source_content_type":"text/x-python","patch_set":28,"id":"da20952f_8572857b","line":119,"in_reply_to":"fa1b9901_0fd4a01d","updated":"2015-08-26 19:02:24.000000000","message":"Done","commit_id":"a68771209ac80f0124a0b2063b083a8e518fe8e5"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"0ee9f10a775b8d45b4aff5065baf25eb11d60b42","unresolved":false,"context_lines":[{"line_number":147,"context_line":"                if not self._is_descendant(target_project.id,"},{"line_number":148,"context_line":"                                           context_project.subtree):"},{"line_number":149,"context_line":"                    msg \u003d _(\"Show operations can only be made to projects in \""},{"line_number":150,"context_line":"                            \"the same hierarchy of the project in which users\""},{"line_number":151,"context_line":"                            \" are scoped to.\")"},{"line_number":152,"context_line":"                    raise webob.exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":153,"context_line":"                if context_project.id !\u003d target_project.parent_id:"}],"source_content_type":"text/x-python","patch_set":28,"id":"fa1b9901_4f5ff80e","line":150,"updated":"2015-08-26 13:51:23.000000000","message":"typo: put the whitespace in this line \"(...)  which users \" and not in the below line \"are scoped to.\"","commit_id":"a68771209ac80f0124a0b2063b083a8e518fe8e5"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"73e84dfb75182bff33e749e35bf674cedd4ea95b","unresolved":false,"context_lines":[{"line_number":147,"context_line":"                if not self._is_descendant(target_project.id,"},{"line_number":148,"context_line":"                                           context_project.subtree):"},{"line_number":149,"context_line":"                    msg \u003d _(\"Show operations can only be made to projects in \""},{"line_number":150,"context_line":"                            \"the same hierarchy of the project in which users\""},{"line_number":151,"context_line":"                            \" are scoped to.\")"},{"line_number":152,"context_line":"                    raise webob.exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":153,"context_line":"                if context_project.id !\u003d target_project.parent_id:"}],"source_content_type":"text/x-python","patch_set":28,"id":"da20952f_650091ab","line":150,"in_reply_to":"fa1b9901_4f5ff80e","updated":"2015-08-26 19:02:24.000000000","message":"Done","commit_id":"a68771209ac80f0124a0b2063b083a8e518fe8e5"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"0ee9f10a775b8d45b4aff5065baf25eb11d60b42","unresolved":false,"context_lines":[{"line_number":234,"context_line":"        skip_flag \u003d strutils.bool_from_string(skip_flag)"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"        target_project_id \u003d id"},{"line_number":237,"context_line":"        parent_id \u003d None"},{"line_number":238,"context_line":"        bad_keys \u003d []"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"        # NOTE(ankit): Pass #1 - In this loop for body[\u0027quota_set\u0027].items(),"}],"source_content_type":"text/x-python","patch_set":28,"id":"fa1b9901_2fbc04ba","line":237,"updated":"2015-08-26 13:51:23.000000000","message":"don\u0027t need this line, since you\u0027re setting the parent_id again in the line 254, and you didn\u0027t used parent_id between this lines.","commit_id":"a68771209ac80f0124a0b2063b083a8e518fe8e5"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"73e84dfb75182bff33e749e35bf674cedd4ea95b","unresolved":false,"context_lines":[{"line_number":234,"context_line":"        skip_flag \u003d strutils.bool_from_string(skip_flag)"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"        target_project_id \u003d id"},{"line_number":237,"context_line":"        parent_id \u003d None"},{"line_number":238,"context_line":"        bad_keys \u003d []"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"        # NOTE(ankit): Pass #1 - In this loop for body[\u0027quota_set\u0027].items(),"}],"source_content_type":"text/x-python","patch_set":28,"id":"da20952f_c5dcfd48","line":237,"in_reply_to":"fa1b9901_2fbc04ba","updated":"2015-08-26 19:02:24.000000000","message":"Done","commit_id":"a68771209ac80f0124a0b2063b083a8e518fe8e5"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"0ee9f10a775b8d45b4aff5065baf25eb11d60b42","unresolved":false,"context_lines":[{"line_number":322,"context_line":"            context, parent_project_id\u003dproject.parent_id))"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"    @wsgi.serializers(xml\u003dQuotaTemplate)"},{"line_number":325,"context_line":"    def delete(self, req, id):"},{"line_number":326,"context_line":"        context \u003d req.environ[\u0027cinder.context\u0027]"},{"line_number":327,"context_line":"        authorize_delete(context)"},{"line_number":328,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"fa1b9901_2f7f24e1","line":325,"updated":"2015-08-26 13:51:23.000000000","message":"I suggest for you create a doc string in this method explaining the steps, will be easier to understand then putting this comments during all the method.","commit_id":"a68771209ac80f0124a0b2063b083a8e518fe8e5"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"73e84dfb75182bff33e749e35bf674cedd4ea95b","unresolved":false,"context_lines":[{"line_number":322,"context_line":"            context, parent_project_id\u003dproject.parent_id))"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"    @wsgi.serializers(xml\u003dQuotaTemplate)"},{"line_number":325,"context_line":"    def delete(self, req, id):"},{"line_number":326,"context_line":"        context \u003d req.environ[\u0027cinder.context\u0027]"},{"line_number":327,"context_line":"        authorize_delete(context)"},{"line_number":328,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"da20952f_18bb3cc6","line":325,"in_reply_to":"fa1b9901_2f7f24e1","updated":"2015-08-26 19:02:24.000000000","message":"Done","commit_id":"a68771209ac80f0124a0b2063b083a8e518fe8e5"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"db6035615a42754c265684920cff278616c549b2","unresolved":false,"context_lines":[{"line_number":238,"context_line":""},{"line_number":239,"context_line":"        :param req: request"},{"line_number":240,"context_line":"        :param id: target project id that needs to be updated"},{"line_number":241,"context_line":"        :param body: key, value pair that that will be"},{"line_number":242,"context_line":"                     applied to the resources if the update"},{"line_number":243,"context_line":"                     succeeds"},{"line_number":244,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":29,"id":"da20952f_9935cedb","line":241,"updated":"2015-08-27 20:09:49.000000000","message":"\u0027that\u0027 is repeated.","commit_id":"8a7ab267a6bbd48fc5e9ccb91a1472cf1e017e3f"}],"cinder/db/api.py":[{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"71c56251decffe816b939dbd89238dabcee2fbb4","unresolved":false,"context_lines":[{"line_number":719,"context_line":""},{"line_number":720,"context_line":""},{"line_number":721,"context_line":"def quota_allocated_get_all_by_project(context, project_id):"},{"line_number":722,"context_line":"    \"\"\"Retrieve all quotas associated with a given project.\"\"\""},{"line_number":723,"context_line":"    return IMPL.quota_allocated_get_all_by_project(context, project_id)"},{"line_number":724,"context_line":""},{"line_number":725,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_503d5129","line":722,"updated":"2015-07-29 06:00:05.000000000","message":"this have the same comment as the above method, a little more description have this is different would be helpful\n\nIs this supposed to be \"Retrieve all allocated quotas.. \"?","commit_id":"156097419cdf8545b602400b237cd5a34f6f4186"},{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"3d975b765f897184f359762e19ae5225f4b0dc9c","unresolved":false,"context_lines":[{"line_number":719,"context_line":""},{"line_number":720,"context_line":""},{"line_number":721,"context_line":"def quota_allocated_get_all_by_project(context, project_id):"},{"line_number":722,"context_line":"    \"\"\"Retrieve all quotas associated with a given project.\"\"\""},{"line_number":723,"context_line":"    return IMPL.quota_allocated_get_all_by_project(context, project_id)"},{"line_number":724,"context_line":""},{"line_number":725,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_ec791ec9","line":722,"in_reply_to":"3a50d1a3_503d5129","updated":"2015-07-29 12:23:21.000000000","message":"Done","commit_id":"156097419cdf8545b602400b237cd5a34f6f4186"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"71c56251decffe816b939dbd89238dabcee2fbb4","unresolved":false,"context_lines":[{"line_number":725,"context_line":""},{"line_number":726,"context_line":"def quota_allocated_update(context, project_id,"},{"line_number":727,"context_line":"                           resource, allocated):"},{"line_number":728,"context_line":"    \"\"\"Update allocated quota to subprojects or raise if it does not exist.\"\"\""},{"line_number":729,"context_line":"    return IMPL.quota_allocated_update(context, project_id,"},{"line_number":730,"context_line":"                                       resource, allocated)"},{"line_number":731,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_70e64db1","line":728,"updated":"2015-07-29 06:00:05.000000000","message":"raise what type of exception?\n\nYou can add the doc by using format like this:\n\n:raises: cinder.exception.NotFound,","commit_id":"156097419cdf8545b602400b237cd5a34f6f4186"},{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"3d975b765f897184f359762e19ae5225f4b0dc9c","unresolved":false,"context_lines":[{"line_number":725,"context_line":""},{"line_number":726,"context_line":"def quota_allocated_update(context, project_id,"},{"line_number":727,"context_line":"                           resource, allocated):"},{"line_number":728,"context_line":"    \"\"\"Update allocated quota to subprojects or raise if it does not exist.\"\"\""},{"line_number":729,"context_line":"    return IMPL.quota_allocated_update(context, project_id,"},{"line_number":730,"context_line":"                                       resource, allocated)"},{"line_number":731,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_6c650e1c","line":728,"in_reply_to":"3a50d1a3_70e64db1","updated":"2015-07-29 12:23:21.000000000","message":"Thanks for point it out.","commit_id":"156097419cdf8545b602400b237cd5a34f6f4186"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"817c967b8f32693d42c6d8cd3912523f88acce3a","unresolved":false,"context_lines":[{"line_number":726,"context_line":"def quota_allocated_update(context, project_id,"},{"line_number":727,"context_line":"                           resource, allocated):"},{"line_number":728,"context_line":"    \"\"\"Update allocated quota to subprojects or raise if it does not exist."},{"line_number":729,"context_line":""},{"line_number":730,"context_line":"    :raises: cinder.exception.ProjectQuotaNotFound"},{"line_number":731,"context_line":"    \"\"\""},{"line_number":732,"context_line":"    return IMPL.quota_allocated_update(context, project_id,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a50d1a3_387dabb1","line":729,"updated":"2015-07-30 20:31:51.000000000","message":"you\u0027re not raising anything here, I think that this comment need to be made in other method.","commit_id":"d2948233301e15d77f9af087abe906b070a9248b"}],"cinder/db/sqlalchemy/api.py":[{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"44b9e25e549a4295db1222c3892ba6504b59236b","unresolved":false,"context_lines":[{"line_number":541,"context_line":"    return result"},{"line_number":542,"context_line":""},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"def quota_allocated_get_all_by_project(context, project_id):"},{"line_number":545,"context_line":"    rows \u003d model_query(context, models.Quota, read_deleted\u003d\"no\").\\"},{"line_number":546,"context_line":"                    filter_by(project_id\u003dproject_id).\\"},{"line_number":547,"context_line":"                    all()"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_18c8ef73","line":544,"updated":"2015-07-24 16:58:31.000000000","message":"I\u0027m not sure, but isn\u0027t it necessary to wrap this function with @require_admin_context?","commit_id":"eb72fcf6451d0244c38f4fa8ff6a72a2e2a673fc"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"7b9fdf68c9a57fe90a6d96f95608b653bc3632f2","unresolved":false,"context_lines":[{"line_number":541,"context_line":"    return result"},{"line_number":542,"context_line":""},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"def quota_allocated_get_all_by_project(context, project_id):"},{"line_number":545,"context_line":"    rows \u003d model_query(context, models.Quota, read_deleted\u003d\"no\").\\"},{"line_number":546,"context_line":"                    filter_by(project_id\u003dproject_id).\\"},{"line_number":547,"context_line":"                    all()"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_f9f18296","line":544,"in_reply_to":"3a50d1a3_18c8ef73","updated":"2015-07-24 22:18:21.000000000","message":"Not admin_context but might need context i.e\nAdd @require_context\nrather than @require_admin_context","commit_id":"eb72fcf6451d0244c38f4fa8ff6a72a2e2a673fc"},{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"44b9e25e549a4295db1222c3892ba6504b59236b","unresolved":false,"context_lines":[{"line_number":573,"context_line":"        return quota_ref"},{"line_number":574,"context_line":""},{"line_number":575,"context_line":""},{"line_number":576,"context_line":"def quota_allocated_update(context, project_id, resource, limit):"},{"line_number":577,"context_line":"    session \u003d get_session()"},{"line_number":578,"context_line":"    with session.begin():"},{"line_number":579,"context_line":"        quota_ref \u003d _quota_get(context, project_id, resource, session\u003dsession)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_98aabf84","line":576,"updated":"2015-07-24 16:58:31.000000000","message":"ditto.","commit_id":"eb72fcf6451d0244c38f4fa8ff6a72a2e2a673fc"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"7b9fdf68c9a57fe90a6d96f95608b653bc3632f2","unresolved":false,"context_lines":[{"line_number":573,"context_line":"        return quota_ref"},{"line_number":574,"context_line":""},{"line_number":575,"context_line":""},{"line_number":576,"context_line":"def quota_allocated_update(context, project_id, resource, limit):"},{"line_number":577,"context_line":"    session \u003d get_session()"},{"line_number":578,"context_line":"    with session.begin():"},{"line_number":579,"context_line":"        quota_ref \u003d _quota_get(context, project_id, resource, session\u003dsession)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_194b0eb2","line":576,"in_reply_to":"3a50d1a3_98aabf84","updated":"2015-07-24 22:18:21.000000000","message":"Done","commit_id":"eb72fcf6451d0244c38f4fa8ff6a72a2e2a673fc"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"71c56251decffe816b939dbd89238dabcee2fbb4","unresolved":false,"context_lines":[{"line_number":543,"context_line":""},{"line_number":544,"context_line":"@require_context"},{"line_number":545,"context_line":"def quota_allocated_get_all_by_project(context, project_id):"},{"line_number":546,"context_line":"    rows \u003d model_query(context, models.Quota, read_deleted\u003d\"no\").\\"},{"line_number":547,"context_line":"        filter_by(project_id\u003dproject_id).\\"},{"line_number":548,"context_line":"        all()"},{"line_number":549,"context_line":"    result \u003d {\u0027project_id\u0027: project_id}"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_d0c161e5","line":546,"updated":"2015-07-29 06:00:05.000000000","message":"use single quote consistently for strings","commit_id":"156097419cdf8545b602400b237cd5a34f6f4186"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"71c56251decffe816b939dbd89238dabcee2fbb4","unresolved":false,"context_lines":[{"line_number":544,"context_line":"@require_context"},{"line_number":545,"context_line":"def quota_allocated_get_all_by_project(context, project_id):"},{"line_number":546,"context_line":"    rows \u003d model_query(context, models.Quota, read_deleted\u003d\"no\").\\"},{"line_number":547,"context_line":"        filter_by(project_id\u003dproject_id).\\"},{"line_number":548,"context_line":"        all()"},{"line_number":549,"context_line":"    result \u003d {\u0027project_id\u0027: project_id}"},{"line_number":550,"context_line":"    for row in rows:"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_50aeb12e","line":547,"updated":"2015-07-29 06:00:05.000000000","message":"from hacking guideline:  It is preferred to wrap long lines in parentheses and not a backslash for line continuation.","commit_id":"156097419cdf8545b602400b237cd5a34f6f4186"},{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"3d975b765f897184f359762e19ae5225f4b0dc9c","unresolved":false,"context_lines":[{"line_number":544,"context_line":"@require_context"},{"line_number":545,"context_line":"def quota_allocated_get_all_by_project(context, project_id):"},{"line_number":546,"context_line":"    rows \u003d model_query(context, models.Quota, read_deleted\u003d\"no\").\\"},{"line_number":547,"context_line":"        filter_by(project_id\u003dproject_id).\\"},{"line_number":548,"context_line":"        all()"},{"line_number":549,"context_line":"    result \u003d {\u0027project_id\u0027: project_id}"},{"line_number":550,"context_line":"    for row in rows:"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_ccb22249","line":547,"in_reply_to":"3a50d1a3_50aeb12e","updated":"2015-07-29 12:23:21.000000000","message":"Done","commit_id":"156097419cdf8545b602400b237cd5a34f6f4186"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"817c967b8f32693d42c6d8cd3912523f88acce3a","unresolved":false,"context_lines":[{"line_number":541,"context_line":"    return result"},{"line_number":542,"context_line":""},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"@require_context"},{"line_number":545,"context_line":"def quota_allocated_get_all_by_project(context, project_id):"},{"line_number":546,"context_line":"    rows \u003d model_query(context, models.Quota, read_deleted\u003d\u0027no\u0027).filter_by("},{"line_number":547,"context_line":"        project_id\u003dproject_id).all()"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a50d1a3_98e63faf","line":544,"updated":"2015-07-30 20:31:51.000000000","message":"I think this is  @require_admin_context","commit_id":"d2948233301e15d77f9af087abe906b070a9248b"},{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"ac8b53b0b60f34022836e369418cbaa2b4351c5c","unresolved":false,"context_lines":[{"line_number":541,"context_line":"    return result"},{"line_number":542,"context_line":""},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"@require_context"},{"line_number":545,"context_line":"def quota_allocated_get_all_by_project(context, project_id):"},{"line_number":546,"context_line":"    rows \u003d model_query(context, models.Quota, read_deleted\u003d\u0027no\u0027).filter_by("},{"line_number":547,"context_line":"        project_id\u003dproject_id).all()"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a50d1a3_de8a411a","line":544,"in_reply_to":"3a50d1a3_98e63faf","updated":"2015-07-31 17:27:19.000000000","message":"sure, thanks.","commit_id":"d2948233301e15d77f9af087abe906b070a9248b"}],"cinder/quota.py":[{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"44b9e25e549a4295db1222c3892ba6504b59236b","unresolved":false,"context_lines":[{"line_number":228,"context_line":"            # usages directly from inside a transaction."},{"line_number":229,"context_line":"            if usages:"},{"line_number":230,"context_line":"                if not parent_project_id:"},{"line_number":231,"context_line":"                    usage \u003d project_usages.get(resource.name, {})"},{"line_number":232,"context_line":"                    quotas[resource.name].update("},{"line_number":233,"context_line":"                        in_use\u003dusage.get(\u0027in_use\u0027, 0),"},{"line_number":234,"context_line":"                        reserved\u003dusage.get(\u0027reserved\u0027, 0), )"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_381dabbd","line":231,"updated":"2015-07-24 16:58:31.000000000","message":"since usage is the same in both conditions, you can put this line above the \"if\" statement, just to avoid code duplication.","commit_id":"eb72fcf6451d0244c38f4fa8ff6a72a2e2a673fc"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"7b9fdf68c9a57fe90a6d96f95608b653bc3632f2","unresolved":false,"context_lines":[{"line_number":228,"context_line":"            # usages directly from inside a transaction."},{"line_number":229,"context_line":"            if usages:"},{"line_number":230,"context_line":"                if not parent_project_id:"},{"line_number":231,"context_line":"                    usage \u003d project_usages.get(resource.name, {})"},{"line_number":232,"context_line":"                    quotas[resource.name].update("},{"line_number":233,"context_line":"                        in_use\u003dusage.get(\u0027in_use\u0027, 0),"},{"line_number":234,"context_line":"                        reserved\u003dusage.get(\u0027reserved\u0027, 0), )"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_f9ac228e","line":231,"in_reply_to":"3a50d1a3_381dabbd","updated":"2015-07-24 22:18:21.000000000","message":"Done","commit_id":"eb72fcf6451d0244c38f4fa8ff6a72a2e2a673fc"}],"cinder/tests/unit/api/contrib/test_quotas.py":[{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"71c56251decffe816b939dbd89238dabcee2fbb4","unresolved":false,"context_lines":[{"line_number":124,"context_line":"                             volumes\u003d0, backups\u003d0,"},{"line_number":125,"context_line":"                             backup_gigabytes\u003d0, tenant_id\u003d\u0027foo\u0027,"},{"line_number":126,"context_line":"                             per_volume_gigabytes\u003d0)"},{"line_number":127,"context_line":"        self.assertDictMatch(expected, result)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def test_show(self):"},{"line_number":130,"context_line":"        result \u003d self.controller.show(self.req, \u0027foo\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_f6ac96ee","line":127,"updated":"2015-07-29 06:00:05.000000000","message":"this is correct, but seems out of scope for the patch. There are other calls have the wrong order of arguments too.  Perhaps it is better to address all in a separate patch","commit_id":"156097419cdf8545b602400b237cd5a34f6f4186"},{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"3d975b765f897184f359762e19ae5225f4b0dc9c","unresolved":false,"context_lines":[{"line_number":124,"context_line":"                             volumes\u003d0, backups\u003d0,"},{"line_number":125,"context_line":"                             backup_gigabytes\u003d0, tenant_id\u003d\u0027foo\u0027,"},{"line_number":126,"context_line":"                             per_volume_gigabytes\u003d0)"},{"line_number":127,"context_line":"        self.assertDictMatch(expected, result)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def test_show(self):"},{"line_number":130,"context_line":"        result \u003d self.controller.show(self.req, \u0027foo\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_ac60f6cf","line":127,"in_reply_to":"3a50d1a3_f6ac96ee","updated":"2015-07-29 12:23:21.000000000","message":"sure.","commit_id":"156097419cdf8545b602400b237cd5a34f6f4186"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"817c967b8f32693d42c6d8cd3912523f88acce3a","unresolved":false,"context_lines":[{"line_number":62,"context_line":"class QuotaSetsControllerTest(test.TestCase):"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    class FakeProject(object):"},{"line_number":65,"context_line":"        id \u003d \u0027foo\u0027"},{"line_number":66,"context_line":"        parent_id \u003d None"},{"line_number":67,"context_line":"        parents \u003d []"},{"line_number":68,"context_line":"        subtree \u003d [\u0027subproject\u0027]"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a50d1a3_f8a423ba","line":65,"updated":"2015-07-30 20:31:51.000000000","message":"please use uuid.uuid4().hex in all \"id\" attributes.","commit_id":"d2948233301e15d77f9af087abe906b070a9248b"},{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"ac8b53b0b60f34022836e369418cbaa2b4351c5c","unresolved":false,"context_lines":[{"line_number":62,"context_line":"class QuotaSetsControllerTest(test.TestCase):"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    class FakeProject(object):"},{"line_number":65,"context_line":"        id \u003d \u0027foo\u0027"},{"line_number":66,"context_line":"        parent_id \u003d None"},{"line_number":67,"context_line":"        parents \u003d []"},{"line_number":68,"context_line":"        subtree \u003d [\u0027subproject\u0027]"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a50d1a3_9ee919ba","line":65,"in_reply_to":"3a50d1a3_f8a423ba","updated":"2015-07-31 17:27:19.000000000","message":"\u0027foo\u0027 is used in almost all the tests of this class, so I\u0027ve defined the default id of a fake project as \u0027foo\u0027 in order to maintain compatibility.","commit_id":"d2948233301e15d77f9af087abe906b070a9248b"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"817c967b8f32693d42c6d8cd3912523f88acce3a","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            context.project_id, parents_as_list\u003dFalse, subtree_as_list\u003dFalse,"},{"line_number":111,"context_line":"            parents_as_ids\u003dFalse, subtree_as_ids\u003dFalse)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def test_defaults(self):"},{"line_number":114,"context_line":"        result \u003d self.controller.defaults(self.req, \u0027foo\u0027)"},{"line_number":115,"context_line":"        self.assertDictMatch(result, make_body())"},{"line_number":116,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3a50d1a3_78f49386","line":113,"updated":"2015-07-30 20:31:51.000000000","message":"Why you\u0027re removing the changes made in the previous patch?","commit_id":"d2948233301e15d77f9af087abe906b070a9248b"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"817c967b8f32693d42c6d8cd3912523f88acce3a","unresolved":false,"context_lines":[{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def test_subproject_defaults(self):"},{"line_number":118,"context_line":"        context \u003d self.req.environ[\u0027cinder.context\u0027]"},{"line_number":119,"context_line":"        context.project_id \u003d \u0027subproject\u0027"},{"line_number":120,"context_line":"        self.controller._get_project \u003d mock.Mock()"},{"line_number":121,"context_line":"        self.controller._get_project.side_effect \u003d self._get_project"},{"line_number":122,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3a50d1a3_d82927f4","line":119,"updated":"2015-07-30 20:31:51.000000000","message":"please use uuid.uuid4().hex","commit_id":"d2948233301e15d77f9af087abe906b070a9248b"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"2b51c205c153e778aac0b56b1bc32d16c6f86470","unresolved":false,"context_lines":[{"line_number":162,"context_line":"        self.req.environ[\u0027cinder.context\u0027].project_id \u003d self.A.id"},{"line_number":163,"context_line":"        result \u003d self.controller.show(self.req, self.B.id)"},{"line_number":164,"context_line":"        expected \u003d make_subproject_body(tenant_id\u003dself.B.id)"},{"line_number":165,"context_line":"        self.assertDictMatch(result, expected)"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    def test_show_not_authorized(self):"},{"line_number":168,"context_line":"        self.controller._get_project \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a4dcd0f_a45c9619","line":165,"updated":"2015-08-06 22:55:54.000000000","message":"Should be (expected, result) to follow the same convention used with assertEqual.","commit_id":"8069ef53bc53afcb5dc9e234da7b5ec2c0607adf"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"8cf891f68dc7a8eccd8abb60d94a177a2f0b674c","unresolved":false,"context_lines":[{"line_number":162,"context_line":"        self.req.environ[\u0027cinder.context\u0027].project_id \u003d self.A.id"},{"line_number":163,"context_line":"        result \u003d self.controller.show(self.req, self.B.id)"},{"line_number":164,"context_line":"        expected \u003d make_subproject_body(tenant_id\u003dself.B.id)"},{"line_number":165,"context_line":"        self.assertDictMatch(result, expected)"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    def test_show_not_authorized(self):"},{"line_number":168,"context_line":"        self.controller._get_project \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a4dcd0f_a169e3fa","line":165,"in_reply_to":"1a4dcd0f_a45c9619","updated":"2015-08-07 01:45:59.000000000","message":"Done","commit_id":"8069ef53bc53afcb5dc9e234da7b5ec2c0607adf"}],"cinder/tests/unit/test_quota.py":[{"author":{"_account_id":8202,"name":"chenzongliang","email":"chenzongliang@huawei.com","username":"zongliang"},"change_message_id":"84b1acc24889800682281582a66aff4128729df3","unresolved":false,"context_lines":[{"line_number":1069,"context_line":"                          \u0027quota_usage_get_all_by_project\u0027, ], self.calls)"},{"line_number":1070,"context_line":"        self.assertEqual(dict(volumes\u003ddict(limit\u003d10,"},{"line_number":1071,"context_line":"                                           in_use\u003d2,"},{"line_number":1072,"context_line":"                                           reserved\u003d0,"},{"line_number":1073,"context_line":"                                           allocated\u003d0, ),"},{"line_number":1074,"context_line":"                              snapshots\u003ddict(limit\u003d0,"},{"line_number":1075,"context_line":"                                             in_use\u003d0,"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a4dcd0f_d6491334","line":1072,"updated":"2015-08-14 02:03:39.000000000","message":"the dict has the same structure,may be you can extract the common method","commit_id":"9841bb3d3cfa87d35fc05681187c29694ac94a63"}]}
