)]}'
{"quantum/extensions/quotasv2.py":[{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"551bc8543faf3b40d72a8cb42d37847d583943fe","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            request.context, body, False, self._resource_name,"},{"line_number":100,"context_line":"            EXTENDED_ATTRIBUTES_2_0[RESOURCE_COLLECTION])"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        # Ensure no value is less than zero"},{"line_number":103,"context_line":"        unders \u003d [key for key, value in"},{"line_number":104,"context_line":"                  body[self._resource_name].iteritems() if value \u003c 0]"},{"line_number":105,"context_line":"        if unders:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FZAU%3D","line":102,"updated":"2013-05-11 06:35:52.000000000","message":"You\u0027re duplicating what is already present in DbQuoateDriver.\nCould you just call \nself._driver.limit_check ?","commit_id":"e8a234c7246bcf29379fa1a8164600a9bd321705"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"87f861e055711892d964149b36767f229cb0903a","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            request.context, body, False, self._resource_name,"},{"line_number":100,"context_line":"            EXTENDED_ATTRIBUTES_2_0[RESOURCE_COLLECTION])"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        # Ensure no value is less than zero"},{"line_number":103,"context_line":"        unders \u003d [key for key, value in"},{"line_number":104,"context_line":"                  body[self._resource_name].iteritems() if value \u003c 0]"},{"line_number":105,"context_line":"        if unders:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2F7aE%3D","line":102,"in_reply_to":"AAAAOn%2F%2FZAU%3D","updated":"2013-05-20 14:10:44.000000000","message":"I changed the update() to self._driver().limit_check(...), and tried it out.  If I tried to change the a quota\u0027s value higher than the value in quantum.conf, the command failed (quota exceeded).\n\nSo the documentation I read said that the quota values in quantum.conf is the\ndefault value. This is not the case.  The value in quantum.conf is one that no tenant is permitted to exceed.  And values higher than that defined quantum.conf value cannot be set by the admin?","commit_id":"e8a234c7246bcf29379fa1a8164600a9bd321705"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"551bc8543faf3b40d72a8cb42d37847d583943fe","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        # Ensure no value is less than zero"},{"line_number":103,"context_line":"        unders \u003d [key for key, value in"},{"line_number":104,"context_line":"                  body[self._resource_name].iteritems() if value \u003c 0]"},{"line_number":105,"context_line":"        if unders:"},{"line_number":106,"context_line":"            raise q_exc.InvalidQuotaValue(unders\u003dsorted(unders))"},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FZAo%3D","line":104,"updated":"2013-05-11 06:35:52.000000000","message":"For the sake of moving to python 3, It\u0027s better to use items()","commit_id":"e8a234c7246bcf29379fa1a8164600a9bd321705"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":50,"context_line":"        for quota_resource in QUOTAS.resources.iterkeys():"},{"line_number":51,"context_line":"            attr_dict \u003d EXTENDED_ATTRIBUTES_2_0[RESOURCE_COLLECTION]"},{"line_number":52,"context_line":"            attr_dict[quota_resource] \u003d {\u0027allow_post\u0027: False,"},{"line_number":53,"context_line":"                                         \u0027allow_put\u0027: True,"},{"line_number":54,"context_line":"                                         \u0027convert_to\u0027: convert_to_int,"},{"line_number":55,"context_line":"                                         \u0027is_visible\u0027: True}"},{"line_number":56,"context_line":"        self._update_extended_attributes \u003d False"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2FshM%3D","line":53,"updated":"2013-05-26 05:16:47.000000000","message":"The check for the negative number should be done here.\nThe validation should be done for a non_negative type.","commit_id":"fe14370a9d2a8b83ad03f898bf191e891dc3f528"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"87f861e055711892d964149b36767f229cb0903a","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        for quota_resource in QUOTAS.resources.iterkeys():"},{"line_number":51,"context_line":"            attr_dict \u003d EXTENDED_ATTRIBUTES_2_0[RESOURCE_COLLECTION]"},{"line_number":52,"context_line":"            attr_dict[quota_resource] \u003d {\u0027allow_post\u0027: False,"},{"line_number":53,"context_line":"                                         \u0027allow_put\u0027: True,"},{"line_number":54,"context_line":"                                         \u0027convert_to\u0027: convert_to_int,"},{"line_number":55,"context_line":"                                         \u0027is_visible\u0027: True}"},{"line_number":56,"context_line":"        self._update_extended_attributes \u003d False"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2Fmro%3D","line":53,"in_reply_to":"AAAAPH%2F%2Fn3U%3D","updated":"2013-05-29 14:26:50.000000000","message":"Disregard my comment.","commit_id":"fe14370a9d2a8b83ad03f898bf191e891dc3f528"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"87f861e055711892d964149b36767f229cb0903a","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        for quota_resource in QUOTAS.resources.iterkeys():"},{"line_number":51,"context_line":"            attr_dict \u003d EXTENDED_ATTRIBUTES_2_0[RESOURCE_COLLECTION]"},{"line_number":52,"context_line":"            attr_dict[quota_resource] \u003d {\u0027allow_post\u0027: False,"},{"line_number":53,"context_line":"                                         \u0027allow_put\u0027: True,"},{"line_number":54,"context_line":"                                         \u0027convert_to\u0027: convert_to_int,"},{"line_number":55,"context_line":"                                         \u0027is_visible\u0027: True}"},{"line_number":56,"context_line":"        self._update_extended_attributes \u003d False"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2Fn3U%3D","line":53,"in_reply_to":"AAAAPH%2F%2FshM%3D","updated":"2013-05-29 02:22:10.000000000","message":"-1 means unlimited.  So the non_negative check cannot be used here.","commit_id":"fe14370a9d2a8b83ad03f898bf191e891dc3f528"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":100,"context_line":"            EXTENDED_ATTRIBUTES_2_0[RESOURCE_COLLECTION])"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        args \u003d dict([key, value] for key, value in"},{"line_number":103,"context_line":"                    body[self._resource_name].items())"},{"line_number":104,"context_line":"        self._driver().limit_check(request.context, id, QUOTAS.resources, args)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        for key, value in body[self._resource_name].items():"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2Fsno%3D","line":103,"updated":"2013-05-25 21:59:17.000000000","message":"My python interpreter tells me that args ends up being equal to body[self._resource_name].\n\nI am probably missing why we need the dict comprehension. Can you explain?","commit_id":"fe14370a9d2a8b83ad03f898bf191e891dc3f528"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"87f861e055711892d964149b36767f229cb0903a","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            EXTENDED_ATTRIBUTES_2_0[RESOURCE_COLLECTION])"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        args \u003d dict([key, value] for key, value in"},{"line_number":103,"context_line":"                    body[self._resource_name].items())"},{"line_number":104,"context_line":"        self._driver().limit_check(request.context, id, QUOTAS.resources, args)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        for key, value in body[self._resource_name].items():"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2Fn3Y%3D","line":103,"in_reply_to":"AAAAPH%2F%2Fsno%3D","updated":"2013-05-29 02:22:10.000000000","message":"I missed this one.","commit_id":"fe14370a9d2a8b83ad03f898bf191e891dc3f528"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        args \u003d dict([key, value] for key, value in"},{"line_number":103,"context_line":"                    body[self._resource_name].items())"},{"line_number":104,"context_line":"        self._driver().limit_check(request.context, id, QUOTAS.resources, args)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        for key, value in body[self._resource_name].items():"},{"line_number":107,"context_line":"            self._driver.update_quota_limit(request.context, id, key, value)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2Fsnk%3D","line":104,"updated":"2013-05-25 21:59:17.000000000","message":"Are you trying to ensure quota cannot be updated beyond current quota? I\u0027ve seen you\u0027ve been asking this on the bug report.\nI don\u0027t think it\u0027s a good idea; it\u0027s a reasonable use case to have a tenant with larget-than-default quotas.\n\nI am ok with staying with the original goal of the bug report: ensuring quotas are not set to negative values on update (unless you want to update infinite - and in that case, if I\u0027m not wrong, the quota engine uses -1)","commit_id":"fe14370a9d2a8b83ad03f898bf191e891dc3f528"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        args \u003d dict([key, value] for key, value in"},{"line_number":103,"context_line":"                    body[self._resource_name].items())"},{"line_number":104,"context_line":"        self._driver().limit_check(request.context, id, QUOTAS.resources, args)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        for key, value in body[self._resource_name].items():"},{"line_number":107,"context_line":"            self._driver.update_quota_limit(request.context, id, key, value)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2FsgA%3D","line":104,"in_reply_to":"AAAAPH%2F%2Fsnk%3D","updated":"2013-05-26 06:25:13.000000000","message":"Agree, it\u0027s a reasonable use case to have a tenant with larget-than-default quotas.\no \n\nAnd quota can be set to negative values is reasonable too. negative values means unlimited.","commit_id":"fe14370a9d2a8b83ad03f898bf191e891dc3f528"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"87f861e055711892d964149b36767f229cb0903a","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        args \u003d dict([key, value] for key, value in"},{"line_number":103,"context_line":"                    body[self._resource_name].items())"},{"line_number":104,"context_line":"        self._driver().limit_check(request.context, id, QUOTAS.resources, args)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        for key, value in body[self._resource_name].items():"},{"line_number":107,"context_line":"            self._driver.update_quota_limit(request.context, id, key, value)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2Fsgk%3D","line":104,"in_reply_to":"AAAAPH%2F%2Fsnk%3D","updated":"2013-05-29 02:22:10.000000000","message":"Thanks for answering my question.  I agree with you that the values in quantum.conf should be treated as default values for tenant, and not some kind of absolute maximum.","commit_id":"fe14370a9d2a8b83ad03f898bf191e891dc3f528"}]}
