)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"6caa01834b88dd09efe33d0952a229b024f8b089","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Enhance the validation of the quotas update"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Need check whether the new quota\u0027s value exceed the already in used and"},{"line_number":10,"context_line":"reserved quota before update it."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Fix bug 1160749"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAOH%2F%2FtIY%3D","line":9,"updated":"2013-04-02 08:55:05.000000000","message":"I would say the same here - the wording is confusing (s/exceeds/is exceeded by/)","commit_id":"5bb9d97d743d11b830493c1aab452884020c052b"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"11fb594b9d5bba7f2dcbf267ef0e277a623f7b68","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Enhance the validation of the quotas update"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Need check whether the new quota\u0027s value exceed the already in used and"},{"line_number":10,"context_line":"reserved quota before update it."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Fix bug 1160749"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAOH%2F%2FtFA%3D","line":9,"in_reply_to":"AAAAOH%2F%2FtIY%3D","updated":"2013-04-02 09:54:29.000000000","message":"Done","commit_id":"5bb9d97d743d11b830493c1aab452884020c052b"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"78259ae944cbd16e3c6c2f56524a87c3329a8632","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Need check whether the already used and reserved exceeds the new quota"},{"line_number":10,"context_line":"before update it."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"DocImpact"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Fix bug 1160749"},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"AAAAPX%2F%2Fq5g%3D","line":12,"updated":"2013-06-13 03:28:12.000000000","message":"I would like to see this change message include more information about how the quota calculation has changed. This is something important for administrators, and we should probably cover it in the release notes.\n\nPlease add a paragraph or two to the DocImpact para about what this change does.","commit_id":"9612e26b8c1a92887f042a8f71263b105e48be6e"}],"nova/api/openstack/compute/contrib/extended_quotas.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"b5368b83e09be4b70054a99c3c654f893ba4bc8e","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from nova.api.openstack import extensions"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"class Extended_quotas(extensions.ExtensionDescriptor):"},{"line_number":23,"context_line":"    \"\"\"Adds optional force to the update Quota command.\"\"\""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    name \u003d \"ExtendedQuotas\""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAOn%2F%2FgKU%3D","line":22,"updated":"2013-05-07 16:10:39.000000000","message":"\"extended-quotas\" sounds a bit too generic to me; maybe \"forced-quotas\" would make more sense?  Just a suggestion…","commit_id":"2067a347a8b6e975c71ab91e7abdfbe1b5a5c2f3"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"0da6cc9b5b9b47537f8049c2664590639e607032","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from nova.api.openstack import extensions"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"class Extended_quotas(extensions.ExtensionDescriptor):"},{"line_number":23,"context_line":"    \"\"\"Adds optional force to the update Quota command.\"\"\""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    name \u003d \"ExtendedQuotas\""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAOn%2F%2FfZ0%3D","line":22,"in_reply_to":"AAAAOn%2F%2FgKU%3D","updated":"2013-05-08 02:28:30.000000000","message":"For the naming, I am just following most existing extensions such as: Quota_classes, Os_tenant_networks.\n\nActually I want add a common extended of quota extension not only for force optional, it can be reused by others additional extended on quota.","commit_id":"2067a347a8b6e975c71ab91e7abdfbe1b5a5c2f3"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"f7cbfb39d90488c17f2d09850bec490c136ebeb3","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"class Extended_quotas(extensions.ExtensionDescriptor):"},{"line_number":20,"context_line":"    \"\"\"Adds ability for admins to delete quota"},{"line_number":21,"context_line":"    and optional force to the update Quota command."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    \"\"\""},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAPX%2F%2Fxd0%3D","line":21,"updated":"2013-06-10 22:43:14.000000000","message":"femtonit: s/optional force to the/optionally force the/\n\nAlso, there is no need for a blank line preceding the triple-quote.  This old PEP8 rule was due to Emacs, but recent versions of Emacs do not exhibit the breakage that prompted the creation of the rule.  (This also is a femtonit.)","commit_id":"1f6340803f26e3aaaa3d2a820a9c9760f5acbf18"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"6de1dcf0c6d2317f04a0b81bc71ce07e67840f51","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"class Extended_quotas(extensions.ExtensionDescriptor):"},{"line_number":20,"context_line":"    \"\"\"Adds ability for admins to delete quota"},{"line_number":21,"context_line":"    and optional force to the update Quota command."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    \"\"\""},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAPX%2F%2FxEM%3D","line":21,"in_reply_to":"AAAAPX%2F%2Fxd0%3D","updated":"2013-06-11 03:00:26.000000000","message":"Done","commit_id":"1f6340803f26e3aaaa3d2a820a9c9760f5acbf18"}],"nova/api/openstack/compute/contrib/quotas.py":[{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"6caa01834b88dd09efe33d0952a229b024f8b089","unresolved":false,"context_lines":[{"line_number":117,"context_line":"            self._validate_quota_limit(value)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"            # validate whether the new quotas\u0027 value exceed the already in"},{"line_number":120,"context_line":"            # used and reserved"},{"line_number":121,"context_line":"            for quota_key, quota_value in project_quota.iteritems():"},{"line_number":122,"context_line":"                if quota_key \u003d\u003d key:"},{"line_number":123,"context_line":"                    if quota_value[\u0027limit\u0027] \u003c 0 or quota_value[\u0027limit\u0027] \\"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOH%2F%2FtIk%3D","line":120,"updated":"2013-04-02 08:55:05.000000000","message":"Shouldn\u0027t this comment say the opposite actually? \u0027Already used and reserved exceeds the new quota\u0027?","commit_id":"5bb9d97d743d11b830493c1aab452884020c052b"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"11fb594b9d5bba7f2dcbf267ef0e277a623f7b68","unresolved":false,"context_lines":[{"line_number":117,"context_line":"            self._validate_quota_limit(value)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"            # validate whether the new quotas\u0027 value exceed the already in"},{"line_number":120,"context_line":"            # used and reserved"},{"line_number":121,"context_line":"            for quota_key, quota_value in project_quota.iteritems():"},{"line_number":122,"context_line":"                if quota_key \u003d\u003d key:"},{"line_number":123,"context_line":"                    if quota_value[\u0027limit\u0027] \u003c 0 or quota_value[\u0027limit\u0027] \\"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOH%2F%2FtGo%3D","line":120,"in_reply_to":"AAAAOH%2F%2FtIk%3D","updated":"2013-04-02 09:54:29.000000000","message":"Done","commit_id":"5bb9d97d743d11b830493c1aab452884020c052b"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"6caa01834b88dd09efe33d0952a229b024f8b089","unresolved":false,"context_lines":[{"line_number":120,"context_line":"            # used and reserved"},{"line_number":121,"context_line":"            for quota_key, quota_value in project_quota.iteritems():"},{"line_number":122,"context_line":"                if quota_key \u003d\u003d key:"},{"line_number":123,"context_line":"                    if quota_value[\u0027limit\u0027] \u003c 0 or quota_value[\u0027limit\u0027] \\"},{"line_number":124,"context_line":"                        is None:"},{"line_number":125,"context_line":"                        continue"},{"line_number":126,"context_line":"                    else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOH%2F%2FtIE%3D","line":123,"updated":"2013-04-02 08:55:05.000000000","message":"Small nit - but I really dislike this way of breaking lines - would you consider using () and putting a new line after or?","commit_id":"5bb9d97d743d11b830493c1aab452884020c052b"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"11fb594b9d5bba7f2dcbf267ef0e277a623f7b68","unresolved":false,"context_lines":[{"line_number":120,"context_line":"            # used and reserved"},{"line_number":121,"context_line":"            for quota_key, quota_value in project_quota.iteritems():"},{"line_number":122,"context_line":"                if quota_key \u003d\u003d key:"},{"line_number":123,"context_line":"                    if quota_value[\u0027limit\u0027] \u003c 0 or quota_value[\u0027limit\u0027] \\"},{"line_number":124,"context_line":"                        is None:"},{"line_number":125,"context_line":"                        continue"},{"line_number":126,"context_line":"                    else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOH%2F%2FtGk%3D","line":123,"in_reply_to":"AAAAOH%2F%2FtIE%3D","updated":"2013-04-02 09:54:29.000000000","message":"Done","commit_id":"5bb9d97d743d11b830493c1aab452884020c052b"},{"author":{"_account_id":4992,"name":"malini-k-bhandaru","email":"malini.k.bhandaru@intel.com","username":"malini-k-bhandaru"},"change_message_id":"84b77319de6d7f858cf975708fb61f39d1c2aaa6","unresolved":false,"context_lines":[{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        for key in body[\u0027quota_set\u0027].keys():"},{"line_number":96,"context_line":"            if (key not in QUOTAS and"},{"line_number":97,"context_line":"                    key !\u003d \u0027tenant_id\u0027 and"},{"line_number":98,"context_line":"                    key !\u003d \u0027id\u0027 and"},{"line_number":99,"context_line":"                    key !\u003d \u0027force\u0027):"},{"line_number":100,"context_line":"                bad_keys.append(key)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2F47M%3D","line":97,"updated":"2013-04-12 21:19:53.000000000","message":"Why not define a set [\u0027tenant_id, \u0027id\u0027, \u0027force\u0027] and check \"in\" just like for QUOTAS","commit_id":"55792abf8ecfe4f37bb176231b3108b9c093a352"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"cf895419110a9faadc35041cbde097f85e36f8e3","unresolved":false,"context_lines":[{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        for key in body[\u0027quota_set\u0027].keys():"},{"line_number":96,"context_line":"            if (key not in QUOTAS and"},{"line_number":97,"context_line":"                    key !\u003d \u0027tenant_id\u0027 and"},{"line_number":98,"context_line":"                    key !\u003d \u0027id\u0027 and"},{"line_number":99,"context_line":"                    key !\u003d \u0027force\u0027):"},{"line_number":100,"context_line":"                bad_keys.append(key)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2F4p0%3D","line":97,"in_reply_to":"AAAAOn%2F%2F47M%3D","updated":"2013-04-13 17:50:01.000000000","message":"Good catch. \nDone","commit_id":"55792abf8ecfe4f37bb176231b3108b9c093a352"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"487bb4a39971dded2746dd125632905e3a2e8421","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            raise webob.exc.HTTPForbidden()"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        for key in body[\u0027quota_set\u0027].keys():"},{"line_number":114,"context_line":"            if key !\u003d \u0027force\u0027:"},{"line_number":115,"context_line":"                try:"},{"line_number":116,"context_line":"                    value \u003d int(body[\u0027quota_set\u0027][key])"},{"line_number":117,"context_line":"                except (ValueError, TypeError):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOX%2F%2F%2Fp0%3D","line":114,"updated":"2013-04-03 08:16:38.000000000","message":"I think we should not fail silently here, but at least come back with a failure (i\u0027m not 100% sure printing out all the users that match is a good idea though, as it can be huuuge).","commit_id":"55792abf8ecfe4f37bb176231b3108b9c093a352"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"5ff30aad0321264230099c524470df3cf3ca25de","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            raise webob.exc.HTTPForbidden()"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        for key in body[\u0027quota_set\u0027].keys():"},{"line_number":114,"context_line":"            if key !\u003d \u0027force\u0027:"},{"line_number":115,"context_line":"                try:"},{"line_number":116,"context_line":"                    value \u003d int(body[\u0027quota_set\u0027][key])"},{"line_number":117,"context_line":"                except (ValueError, TypeError):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOX%2F%2F5%2FI%3D","line":114,"in_reply_to":"AAAAOX%2F%2F%2Fp0%3D","updated":"2013-04-08 08:04:31.000000000","message":"Please disregard the above comment - I read the code wrong.","commit_id":"55792abf8ecfe4f37bb176231b3108b9c093a352"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"ed47a477b2a17250c1ed2d350b1b296a7a57909e","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                    # NOTE(hzzhoushaoyu): Do not prevent valid value to be"},{"line_number":120,"context_line":"                    # updated. If raise BadRequest, some may be updated and"},{"line_number":121,"context_line":"                    # others may be not."},{"line_number":122,"context_line":"                    continue"},{"line_number":123,"context_line":"                self._validate_quota_limit(value)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"                # validate whether already used and reserved exceeds the new"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2F%2Bwc%3D","line":122,"updated":"2013-04-09 10:02:54.000000000","message":"I feel this check should be done before any quotas are applied, especially as this error isn\u0027t returned to the user and they therefore be confused.","commit_id":"55792abf8ecfe4f37bb176231b3108b9c093a352"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"fc41134d8f3c5c34df01bc3bac482f911fb9b141","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                    # NOTE(hzzhoushaoyu): Do not prevent valid value to be"},{"line_number":120,"context_line":"                    # updated. If raise BadRequest, some may be updated and"},{"line_number":121,"context_line":"                    # others may be not."},{"line_number":122,"context_line":"                    continue"},{"line_number":123,"context_line":"                self._validate_quota_limit(value)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"                # validate whether already used and reserved exceeds the new"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2F%2Bt8%3D","line":122,"in_reply_to":"AAAAOn%2F%2F%2Bwc%3D","updated":"2013-04-09 10:49:14.000000000","message":"Hi Michael,\nI can not follow your point a little. The \u0027int\u0027 check should be done before all others in my changes, could you give me more detail info about your concern?","commit_id":"55792abf8ecfe4f37bb176231b3108b9c093a352"},{"author":{"_account_id":4992,"name":"malini-k-bhandaru","email":"malini.k.bhandaru@intel.com","username":"malini-k-bhandaru"},"change_message_id":"84b77319de6d7f858cf975708fb61f39d1c2aaa6","unresolved":false,"context_lines":[{"line_number":120,"context_line":"                    # updated. If raise BadRequest, some may be updated and"},{"line_number":121,"context_line":"                    # others may be not."},{"line_number":122,"context_line":"                    continue"},{"line_number":123,"context_line":"                self._validate_quota_limit(value)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"                # validate whether already used and reserved exceeds the new"},{"line_number":126,"context_line":"                # quota, this check will be ignored if admin want to force"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2F454%3D","line":123,"updated":"2013-04-12 21:19:53.000000000","message":"Taking the liberty to try and explain Michael\u0027s comment ..\nThe outer for-loop has an inner valid check ..\nSay you have 3 quota limits in the body, and the first two are valid, you end up applying them before seeing the third invalid one.  What would be better is say in the for-loop retrieve and check values and save in some temporary variable. If no errors, in a second for-loop apply all the quota changes. Makes it an all or nothing.","commit_id":"55792abf8ecfe4f37bb176231b3108b9c093a352"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"cf895419110a9faadc35041cbde097f85e36f8e3","unresolved":false,"context_lines":[{"line_number":120,"context_line":"                    # updated. If raise BadRequest, some may be updated and"},{"line_number":121,"context_line":"                    # others may be not."},{"line_number":122,"context_line":"                    continue"},{"line_number":123,"context_line":"                self._validate_quota_limit(value)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"                # validate whether already used and reserved exceeds the new"},{"line_number":126,"context_line":"                # quota, this check will be ignored if admin want to force"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2F4pg%3D","line":123,"in_reply_to":"AAAAOn%2F%2F454%3D","updated":"2013-04-13 17:50:01.000000000","message":"Got it. This valid was done by previously author,  if we split the check into additional for-loop, I think we need raise BadRequest if the valid check failed otherwise it will mean nothing to do this.","commit_id":"55792abf8ecfe4f37bb176231b3108b9c093a352"},{"author":{"_account_id":4992,"name":"malini-k-bhandaru","email":"malini.k.bhandaru@intel.com","username":"malini-k-bhandaru"},"change_message_id":"84b77319de6d7f858cf975708fb61f39d1c2aaa6","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                # update"},{"line_number":128,"context_line":"                if force_update is not True and value \u003e\u003d 0:"},{"line_number":129,"context_line":"                    quota_value \u003d project_quota.get(key)"},{"line_number":130,"context_line":"                    if (quota_value is not None) and quota_value[\u0027limit\u0027] \u003e\u003d 0:"},{"line_number":131,"context_line":"                        quota_used \u003d (quota_value[\u0027in_use\u0027] +"},{"line_number":132,"context_line":"                                      quota_value[\u0027reserved\u0027])"},{"line_number":133,"context_line":"                        LOG.debug(\"Quota %s used: %s, limit: %s.\", key,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2F468%3D","line":130,"updated":"2013-04-12 21:19:53.000000000","message":"if (quota_value and quota_value[\u0027limit\u0027] \u003e\u003d 0):\r\n\r\nis simpler than the \"is not None\"","commit_id":"55792abf8ecfe4f37bb176231b3108b9c093a352"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"cf895419110a9faadc35041cbde097f85e36f8e3","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                # update"},{"line_number":128,"context_line":"                if force_update is not True and value \u003e\u003d 0:"},{"line_number":129,"context_line":"                    quota_value \u003d project_quota.get(key)"},{"line_number":130,"context_line":"                    if (quota_value is not None) and quota_value[\u0027limit\u0027] \u003e\u003d 0:"},{"line_number":131,"context_line":"                        quota_used \u003d (quota_value[\u0027in_use\u0027] +"},{"line_number":132,"context_line":"                                      quota_value[\u0027reserved\u0027])"},{"line_number":133,"context_line":"                        LOG.debug(\"Quota %s used: %s, limit: %s.\", key,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2F4ps%3D","line":130,"in_reply_to":"AAAAOn%2F%2F468%3D","updated":"2013-04-13 17:50:01.000000000","message":"Done","commit_id":"55792abf8ecfe4f37bb176231b3108b9c093a352"},{"author":{"_account_id":4992,"name":"malini-k-bhandaru","email":"malini.k.bhandaru@intel.com","username":"malini-k-bhandaru"},"change_message_id":"84b77319de6d7f858cf975708fb61f39d1c2aaa6","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                    if (quota_value is not None) and quota_value[\u0027limit\u0027] \u003e\u003d 0:"},{"line_number":131,"context_line":"                        quota_used \u003d (quota_value[\u0027in_use\u0027] +"},{"line_number":132,"context_line":"                                      quota_value[\u0027reserved\u0027])"},{"line_number":133,"context_line":"                        LOG.debug(\"Quota %s used: %s, limit: %s.\", key,"},{"line_number":134,"context_line":"                                  quota_used, value)"},{"line_number":135,"context_line":"                        if quota_used \u003e value:"},{"line_number":136,"context_line":"                            msg \u003d _(\"Quota limit %(value)s for %(key)s are \""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2F46o%3D","line":133,"updated":"2013-04-12 21:19:53.000000000","message":"1) \"limit\" in message does not match the printed item, \"value\", the quantity you pulled out from the request body.\n2) Do we not bother with internationalizing debug messages?","commit_id":"55792abf8ecfe4f37bb176231b3108b9c093a352"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"cf895419110a9faadc35041cbde097f85e36f8e3","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                    if (quota_value is not None) and quota_value[\u0027limit\u0027] \u003e\u003d 0:"},{"line_number":131,"context_line":"                        quota_used \u003d (quota_value[\u0027in_use\u0027] +"},{"line_number":132,"context_line":"                                      quota_value[\u0027reserved\u0027])"},{"line_number":133,"context_line":"                        LOG.debug(\"Quota %s used: %s, limit: %s.\", key,"},{"line_number":134,"context_line":"                                  quota_used, value)"},{"line_number":135,"context_line":"                        if quota_used \u003e value:"},{"line_number":136,"context_line":"                            msg \u003d _(\"Quota limit %(value)s for %(key)s are \""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2F4po%3D","line":133,"in_reply_to":"AAAAOn%2F%2F46o%3D","updated":"2013-04-13 17:50:01.000000000","message":"Done","commit_id":"55792abf8ecfe4f37bb176231b3108b9c093a352"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"b5368b83e09be4b70054a99c3c654f893ba4bc8e","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        # is not loaded"},{"line_number":100,"context_line":"        force_update \u003d True"},{"line_number":101,"context_line":"        extended_loaded \u003d False"},{"line_number":102,"context_line":"        NON_QUOTA_KEYS \u003d [\u0027tenant_id\u0027, \u0027id\u0027, \u0027force\u0027]"},{"line_number":103,"context_line":"        if self.ext_mgr and self.ext_mgr.is_loaded(\u0027os-extended-quota-sets\u0027):"},{"line_number":104,"context_line":"            # force optional has been enabled, the default value of"},{"line_number":105,"context_line":"            # force_update need to be changed to False"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAOn%2F%2FgL8%3D","line":102,"updated":"2013-05-07 16:10:39.000000000","message":"Let me suggest pulling this constant out into the global scope.  You might also consider making it a set, but that will likely not result in all that much performance impact, so I don\u0027t really care…","commit_id":"2067a347a8b6e975c71ab91e7abdfbe1b5a5c2f3"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"0da6cc9b5b9b47537f8049c2664590639e607032","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        # is not loaded"},{"line_number":100,"context_line":"        force_update \u003d True"},{"line_number":101,"context_line":"        extended_loaded \u003d False"},{"line_number":102,"context_line":"        NON_QUOTA_KEYS \u003d [\u0027tenant_id\u0027, \u0027id\u0027, \u0027force\u0027]"},{"line_number":103,"context_line":"        if self.ext_mgr and self.ext_mgr.is_loaded(\u0027os-extended-quota-sets\u0027):"},{"line_number":104,"context_line":"            # force optional has been enabled, the default value of"},{"line_number":105,"context_line":"            # force_update need to be changed to False"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAOn%2F%2FfVw%3D","line":102,"in_reply_to":"AAAAOn%2F%2FgL8%3D","updated":"2013-05-08 02:28:30.000000000","message":"Done","commit_id":"2067a347a8b6e975c71ab91e7abdfbe1b5a5c2f3"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"b5368b83e09be4b70054a99c3c654f893ba4bc8e","unresolved":false,"context_lines":[{"line_number":147,"context_line":"                value \u003d int(value)"},{"line_number":148,"context_line":"                if force_update is not True and value \u003e\u003d 0:"},{"line_number":149,"context_line":"                    quota_value \u003d project_quota.get(key)"},{"line_number":150,"context_line":"                    if (quota_value and quota_value[\u0027limit\u0027] \u003e\u003d 0):"},{"line_number":151,"context_line":"                        quota_used \u003d (quota_value[\u0027in_use\u0027] +"},{"line_number":152,"context_line":"                                      quota_value[\u0027reserved\u0027])"},{"line_number":153,"context_line":"                        LOG.debug(_(\"Quota %(key)s used: %(quota_used)s, \""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAOn%2F%2FgLQ%3D","line":150,"updated":"2013-05-07 16:10:39.000000000","message":"The parentheses here are superfluous…","commit_id":"2067a347a8b6e975c71ab91e7abdfbe1b5a5c2f3"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"a29ebbd7874e4b7a7a1032b063392a8d11cea86a","unresolved":false,"context_lines":[{"line_number":147,"context_line":"                value \u003d int(value)"},{"line_number":148,"context_line":"                if force_update is not True and value \u003e\u003d 0:"},{"line_number":149,"context_line":"                    quota_value \u003d project_quota.get(key)"},{"line_number":150,"context_line":"                    if (quota_value and quota_value[\u0027limit\u0027] \u003e\u003d 0):"},{"line_number":151,"context_line":"                        quota_used \u003d (quota_value[\u0027in_use\u0027] +"},{"line_number":152,"context_line":"                                      quota_value[\u0027reserved\u0027])"},{"line_number":153,"context_line":"                        LOG.debug(_(\"Quota %(key)s used: %(quota_used)s, \""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAOn%2F%2FdJg%3D","line":150,"in_reply_to":"AAAAOn%2F%2FeRY%3D","updated":"2013-05-09 01:54:14.000000000","message":"Sorry for make it confusing.","commit_id":"2067a347a8b6e975c71ab91e7abdfbe1b5a5c2f3"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"d265a38bd477a4f78fbfdc45fdd77723e2e292a7","unresolved":false,"context_lines":[{"line_number":147,"context_line":"                value \u003d int(value)"},{"line_number":148,"context_line":"                if force_update is not True and value \u003e\u003d 0:"},{"line_number":149,"context_line":"                    quota_value \u003d project_quota.get(key)"},{"line_number":150,"context_line":"                    if (quota_value and quota_value[\u0027limit\u0027] \u003e\u003d 0):"},{"line_number":151,"context_line":"                        quota_used \u003d (quota_value[\u0027in_use\u0027] +"},{"line_number":152,"context_line":"                                      quota_value[\u0027reserved\u0027])"},{"line_number":153,"context_line":"                        LOG.debug(_(\"Quota %(key)s used: %(quota_used)s, \""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAOn%2F%2FeRY%3D","line":150,"in_reply_to":"AAAAOn%2F%2FfVs%3D","updated":"2013-05-08 16:39:10.000000000","message":"Just a little English lesson for you: in English, the sentence \"Fix it\" is read as an imperative, with an implied subject of \"you\"; i.e., you\u0027re ordering me to fix it.  (No worries, I understood that wasn\u0027t your intent.)  A better rendering would be \"Fixed it\": by making the verb past tense, the imperative nature of the sentence is removed, and now the implied subject is \"I\"; i.e., you\u0027re saying that you have fixed it.\n\nHope this helps :)","commit_id":"2067a347a8b6e975c71ab91e7abdfbe1b5a5c2f3"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"0da6cc9b5b9b47537f8049c2664590639e607032","unresolved":false,"context_lines":[{"line_number":147,"context_line":"                value \u003d int(value)"},{"line_number":148,"context_line":"                if force_update is not True and value \u003e\u003d 0:"},{"line_number":149,"context_line":"                    quota_value \u003d project_quota.get(key)"},{"line_number":150,"context_line":"                    if (quota_value and quota_value[\u0027limit\u0027] \u003e\u003d 0):"},{"line_number":151,"context_line":"                        quota_used \u003d (quota_value[\u0027in_use\u0027] +"},{"line_number":152,"context_line":"                                      quota_value[\u0027reserved\u0027])"},{"line_number":153,"context_line":"                        LOG.debug(_(\"Quota %(key)s used: %(quota_used)s, \""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAOn%2F%2FfVs%3D","line":150,"in_reply_to":"AAAAOn%2F%2FgLQ%3D","updated":"2013-05-08 02:28:30.000000000","message":":-) my java style. Fix it.","commit_id":"2067a347a8b6e975c71ab91e7abdfbe1b5a5c2f3"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"b5368b83e09be4b70054a99c3c654f893ba4bc8e","unresolved":false,"context_lines":[{"line_number":151,"context_line":"                        quota_used \u003d (quota_value[\u0027in_use\u0027] +"},{"line_number":152,"context_line":"                                      quota_value[\u0027reserved\u0027])"},{"line_number":153,"context_line":"                        LOG.debug(_(\"Quota %(key)s used: %(quota_used)s, \""},{"line_number":154,"context_line":"                                    \"value: %(value)s.\"), locals())"},{"line_number":155,"context_line":"                        if quota_used \u003e value:"},{"line_number":156,"context_line":"                            msg \u003d _(\"Quota value %(value)s for %(key)s are \""},{"line_number":157,"context_line":"                                    \"greater than already used and reserved \""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAOn%2F%2FgLE%3D","line":154,"updated":"2013-05-07 16:10:39.000000000","message":"We\u0027re deprecating the use of locals() for this purpose across all of nova; I would suggest building a dictionary and using that here.  The same goes for the exception message below.","commit_id":"2067a347a8b6e975c71ab91e7abdfbe1b5a5c2f3"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"0d85a8a5ca3379b2b86d726194809a05958b7577","unresolved":false,"context_lines":[{"line_number":151,"context_line":"                        quota_used \u003d (quota_value[\u0027in_use\u0027] +"},{"line_number":152,"context_line":"                                      quota_value[\u0027reserved\u0027])"},{"line_number":153,"context_line":"                        LOG.debug(_(\"Quota %(key)s used: %(quota_used)s, \""},{"line_number":154,"context_line":"                                    \"value: %(value)s.\"), locals())"},{"line_number":155,"context_line":"                        if quota_used \u003e value:"},{"line_number":156,"context_line":"                            msg \u003d _(\"Quota value %(value)s for %(key)s are \""},{"line_number":157,"context_line":"                                    \"greater than already used and reserved \""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAOn%2F%2FfFQ%3D","line":154,"in_reply_to":"AAAAOn%2F%2FfVo%3D","updated":"2013-05-08 07:30:56.000000000","message":"With locals(), pyflakes can\u0027t see that the variables are used so it whines.  I think it\u0027s better to be more explicit anyway.","commit_id":"2067a347a8b6e975c71ab91e7abdfbe1b5a5c2f3"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"0da6cc9b5b9b47537f8049c2664590639e607032","unresolved":false,"context_lines":[{"line_number":151,"context_line":"                        quota_used \u003d (quota_value[\u0027in_use\u0027] +"},{"line_number":152,"context_line":"                                      quota_value[\u0027reserved\u0027])"},{"line_number":153,"context_line":"                        LOG.debug(_(\"Quota %(key)s used: %(quota_used)s, \""},{"line_number":154,"context_line":"                                    \"value: %(value)s.\"), locals())"},{"line_number":155,"context_line":"                        if quota_used \u003e value:"},{"line_number":156,"context_line":"                            msg \u003d _(\"Quota value %(value)s for %(key)s are \""},{"line_number":157,"context_line":"                                    \"greater than already used and reserved \""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAOn%2F%2FfVo%3D","line":154,"in_reply_to":"AAAAOn%2F%2FgLE%3D","updated":"2013-05-08 02:28:30.000000000","message":"Done\nHave any reason to deprecate the locals()? Is it not a human readable or something else?","commit_id":"2067a347a8b6e975c71ab91e7abdfbe1b5a5c2f3"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"f7cbfb39d90488c17f2d09850bec490c136ebeb3","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            raise webob.exc.HTTPForbidden()"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        for key in body[\u0027quota_set\u0027].keys():"},{"line_number":131,"context_line":"            if key not in NON_QUOTA_KEYS:"},{"line_number":132,"context_line":"                try:"},{"line_number":133,"context_line":"                    value \u003d body[\u0027quota_set\u0027][key]"},{"line_number":134,"context_line":"                    if value:"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAPX%2F%2FxdM%3D","line":131,"updated":"2013-06-10 22:43:14.000000000","message":"To avoid having to indent so deeply, you can use:\n\n    if key in NON_QUOTA_KEYS:\n        continue\n\n    try:\n        …\n    except (ValueError, TypeError):\n        …\n    self._validate_quota_limit(value)\n\n(femtonit)","commit_id":"1f6340803f26e3aaaa3d2a820a9c9760f5acbf18"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"6de1dcf0c6d2317f04a0b81bc71ce07e67840f51","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            raise webob.exc.HTTPForbidden()"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        for key in body[\u0027quota_set\u0027].keys():"},{"line_number":131,"context_line":"            if key not in NON_QUOTA_KEYS:"},{"line_number":132,"context_line":"                try:"},{"line_number":133,"context_line":"                    value \u003d body[\u0027quota_set\u0027][key]"},{"line_number":134,"context_line":"                    if value:"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAPX%2F%2FxEI%3D","line":131,"in_reply_to":"AAAAPX%2F%2FxdM%3D","updated":"2013-06-11 03:00:26.000000000","message":"Done","commit_id":"1f6340803f26e3aaaa3d2a820a9c9760f5acbf18"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"f7cbfb39d90488c17f2d09850bec490c136ebeb3","unresolved":false,"context_lines":[{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        for key in body[\u0027quota_set\u0027].keys():"},{"line_number":144,"context_line":"            value \u003d body[\u0027quota_set\u0027][key]"},{"line_number":145,"context_line":"            if key not in NON_QUOTA_KEYS and value:"},{"line_number":146,"context_line":"                # validate whether already used and reserved exceeds the new"},{"line_number":147,"context_line":"                # quota, this check will be ignored if admin want to force"},{"line_number":148,"context_line":"                # update"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAPX%2F%2FxdI%3D","line":145,"updated":"2013-06-10 22:43:14.000000000","message":"Again, you can invert this test and use continue:\n\n    if key in NON_QUOTA_KEYS or not value:\n        continue","commit_id":"1f6340803f26e3aaaa3d2a820a9c9760f5acbf18"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"6de1dcf0c6d2317f04a0b81bc71ce07e67840f51","unresolved":false,"context_lines":[{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        for key in body[\u0027quota_set\u0027].keys():"},{"line_number":144,"context_line":"            value \u003d body[\u0027quota_set\u0027][key]"},{"line_number":145,"context_line":"            if key not in NON_QUOTA_KEYS and value:"},{"line_number":146,"context_line":"                # validate whether already used and reserved exceeds the new"},{"line_number":147,"context_line":"                # quota, this check will be ignored if admin want to force"},{"line_number":148,"context_line":"                # update"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAPX%2F%2FxEA%3D","line":145,"in_reply_to":"AAAAPX%2F%2FxdI%3D","updated":"2013-06-11 03:00:26.000000000","message":"Done","commit_id":"1f6340803f26e3aaaa3d2a820a9c9760f5acbf18"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"c77388c73971c8af578e60abad2e588ef23b6623","unresolved":false,"context_lines":[{"line_number":107,"context_line":"            extended_loaded \u003d True"},{"line_number":108,"context_line":"            force_update \u003d False"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        for key in body[\u0027quota_set\u0027].keys():"},{"line_number":111,"context_line":"            if (key not in QUOTAS and"},{"line_number":112,"context_line":"                    key not in NON_QUOTA_KEYS):"},{"line_number":113,"context_line":"                bad_keys.append(key)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPX%2F%2FvSg%3D","line":110,"updated":"2013-06-11 16:48:52.000000000","message":"Are all these keys() calls necessary or can you just do for key in body[\u0027quota_set\u0027] to avoid making another list?","commit_id":"8c664d8b1af7a7183640fd438132eb67ab6c373d"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"916bc8825404298a77a271476647af26c08a8415","unresolved":false,"context_lines":[{"line_number":107,"context_line":"            extended_loaded \u003d True"},{"line_number":108,"context_line":"            force_update \u003d False"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        for key in body[\u0027quota_set\u0027].keys():"},{"line_number":111,"context_line":"            if (key not in QUOTAS and"},{"line_number":112,"context_line":"                    key not in NON_QUOTA_KEYS):"},{"line_number":113,"context_line":"                bad_keys.append(key)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPX%2F%2FtCE%3D","line":110,"in_reply_to":"AAAAPX%2F%2FvSg%3D","updated":"2013-06-12 13:47:43.000000000","message":"I will try to merge this one and second one to check the bad key and bad value, keep the last one to update the quota.","commit_id":"8c664d8b1af7a7183640fd438132eb67ab6c373d"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"c77388c73971c8af578e60abad2e588ef23b6623","unresolved":false,"context_lines":[{"line_number":142,"context_line":"            self._validate_quota_limit(value)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        for key in body[\u0027quota_set\u0027].keys():"},{"line_number":145,"context_line":"            value \u003d body[\u0027quota_set\u0027][key]"},{"line_number":146,"context_line":"            if key in NON_QUOTA_KEYS or not value:"},{"line_number":147,"context_line":"                continue"},{"line_number":148,"context_line":"            # validate whether already used and reserved exceeds the new"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPX%2F%2FvSc%3D","line":145,"updated":"2013-06-11 16:48:52.000000000","message":"You should use iteritems here to get the key and value at once without another lookup.","commit_id":"8c664d8b1af7a7183640fd438132eb67ab6c373d"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"916bc8825404298a77a271476647af26c08a8415","unresolved":false,"context_lines":[{"line_number":142,"context_line":"            self._validate_quota_limit(value)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        for key in body[\u0027quota_set\u0027].keys():"},{"line_number":145,"context_line":"            value \u003d body[\u0027quota_set\u0027][key]"},{"line_number":146,"context_line":"            if key in NON_QUOTA_KEYS or not value:"},{"line_number":147,"context_line":"                continue"},{"line_number":148,"context_line":"            # validate whether already used and reserved exceeds the new"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPX%2F%2FtJk%3D","line":145,"in_reply_to":"AAAAPX%2F%2FvSc%3D","updated":"2013-06-12 13:47:43.000000000","message":"iteritems is removed from python 3, so I want to use items to keep the compatibility.","commit_id":"8c664d8b1af7a7183640fd438132eb67ab6c373d"}],"nova/tests/api/openstack/compute/contrib/test_quotas.py":[{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"6caa01834b88dd09efe33d0952a229b024f8b089","unresolved":false,"context_lines":[{"line_number":33,"context_line":"            \u0027key_pairs\u0027: 100, \u0027injected_file_path_bytes\u0027: 255}}"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"def fake_get_quotas(self, context, id, usages\u003dFalse):"},{"line_number":37,"context_line":"    values \u003d {\u0027ram\u0027: {\u0027limit\u0027: 51200, \u0027in_use\u0027: 12800, \u0027reserved\u0027: 0},"},{"line_number":38,"context_line":"            \u0027cores\u0027: {\u0027limit\u0027: 20, \u0027in_use\u0027: 10, \u0027reserved\u0027: 5}}"},{"line_number":39,"context_line":"    if usages:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOH%2F%2FtIQ%3D","line":36,"updated":"2013-04-02 08:55:05.000000000","message":"If it\u0027s only used in the new test - I\u0027d put this function there. If you think it can be reused - then I\u0027d say try to make it more general (allow for setting different values). Not worthy of a -1, but it\u0027d be nice. I\u0027ve ran into this a few times and it sucks for the next developer trying to reuse it.","commit_id":"5bb9d97d743d11b830493c1aab452884020c052b"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"11fb594b9d5bba7f2dcbf267ef0e277a623f7b68","unresolved":false,"context_lines":[{"line_number":33,"context_line":"            \u0027key_pairs\u0027: 100, \u0027injected_file_path_bytes\u0027: 255}}"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"def fake_get_quotas(self, context, id, usages\u003dFalse):"},{"line_number":37,"context_line":"    values \u003d {\u0027ram\u0027: {\u0027limit\u0027: 51200, \u0027in_use\u0027: 12800, \u0027reserved\u0027: 0},"},{"line_number":38,"context_line":"            \u0027cores\u0027: {\u0027limit\u0027: 20, \u0027in_use\u0027: 10, \u0027reserved\u0027: 5}}"},{"line_number":39,"context_line":"    if usages:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOH%2F%2FtGU%3D","line":36,"in_reply_to":"AAAAOH%2F%2FtIQ%3D","updated":"2013-04-02 09:54:29.000000000","message":"Move in the new test since I can not see it can be reused currently.","commit_id":"5bb9d97d743d11b830493c1aab452884020c052b"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"6caa01834b88dd09efe33d0952a229b024f8b089","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        self.assertEqual(res_dict, body)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    def test_quotas_update_exceed_in_used(self):"},{"line_number":136,"context_line":"        body \u003d {\u0027quota_set\u0027: {\u0027cores\u0027: 10}}"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"        self.stubs.Set(quotas.QuotaSetsController, \u0027_get_quotas\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOH%2F%2FtII%3D","line":135,"updated":"2013-04-02 08:55:05.000000000","message":"This is good - however, I\u0027d like to see edge cases tested a bit more thoroughly here - usually that\u0027s where the bugs happen in my (albeit anecdotal) experience. Just a suggestion.","commit_id":"5bb9d97d743d11b830493c1aab452884020c052b"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"11fb594b9d5bba7f2dcbf267ef0e277a623f7b68","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        self.assertEqual(res_dict, body)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    def test_quotas_update_exceed_in_used(self):"},{"line_number":136,"context_line":"        body \u003d {\u0027quota_set\u0027: {\u0027cores\u0027: 10}}"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"        self.stubs.Set(quotas.QuotaSetsController, \u0027_get_quotas\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOH%2F%2FtFw%3D","line":135,"in_reply_to":"AAAAOH%2F%2FtII%3D","updated":"2013-04-02 09:54:29.000000000","message":"Actually, the \u0027ram\u0027: 12800 is a kind of edge cases. I can add more.","commit_id":"5bb9d97d743d11b830493c1aab452884020c052b"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"1981483cd3c2c30a5193a24964adb9cc12ad68d7","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        try:"},{"line_number":154,"context_line":"            self.controller.update(req, \u0027update_me\u0027, body)"},{"line_number":155,"context_line":"        except Exception as err:"},{"line_number":156,"context_line":"            self.fail(err)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        body \u003d {\u0027quota_set\u0027: {\u0027ram\u0027: 25600, \u0027instances\u0027: 200}}"},{"line_number":159,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2Fsxo%3D","line":156,"updated":"2013-04-02 14:48:09.000000000","message":"I don\u0027t see a need for this try/except block.  If self.controller.update() raises an exception, that will bubble out of the test method, and will be reported as an ERROR instead of a FAIL.  Further, in that case, we\u0027ll have a full traceback, which makes it easier to find the cause of the error; this is as opposed to the code here, which just tells us we had a failure and the text of the exception message, which isn\u0027t nearly as useful.  Same comments apply to the try/except block below.","commit_id":"cfc0d9992e6703ddca3ad132213f84c589864e3f"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"fcc6901c929ab1627f9ce4e51c43f7f5fc7adf3c","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        try:"},{"line_number":154,"context_line":"            self.controller.update(req, \u0027update_me\u0027, body)"},{"line_number":155,"context_line":"        except Exception as err:"},{"line_number":156,"context_line":"            self.fail(err)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        body \u003d {\u0027quota_set\u0027: {\u0027ram\u0027: 25600, \u0027instances\u0027: 200}}"},{"line_number":159,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2Fsns%3D","line":156,"in_reply_to":"AAAAOH%2F%2Fsxo%3D","updated":"2013-04-02 16:09:40.000000000","message":"Done","commit_id":"cfc0d9992e6703ddca3ad132213f84c589864e3f"},{"author":{"_account_id":4992,"name":"malini-k-bhandaru","email":"malini.k.bhandaru@intel.com","username":"malini-k-bhandaru"},"change_message_id":"84b77319de6d7f858cf975708fb61f39d1c2aaa6","unresolved":false,"context_lines":[{"line_number":149,"context_line":"                          req, \u0027update_me\u0027, body)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        body \u003d {\u0027quota_set\u0027: {\u0027ram\u0027: 64000}}"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        self.controller.update(req, \u0027update_me\u0027, body)"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        body \u003d {\u0027quota_set\u0027: {\u0027ram\u0027: 25600, \u0027instances\u0027: 200}}"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2F45c%3D","line":152,"updated":"2013-04-12 21:19:53.000000000","message":"Did you not want a few more asserts, one for each different body after the update?\n\nDoes it pass pep8, no blank line after the internal def?","commit_id":"55792abf8ecfe4f37bb176231b3108b9c093a352"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"cf895419110a9faadc35041cbde097f85e36f8e3","unresolved":false,"context_lines":[{"line_number":149,"context_line":"                          req, \u0027update_me\u0027, body)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        body \u003d {\u0027quota_set\u0027: {\u0027ram\u0027: 64000}}"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        self.controller.update(req, \u0027update_me\u0027, body)"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        body \u003d {\u0027quota_set\u0027: {\u0027ram\u0027: 25600, \u0027instances\u0027: 200}}"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2F4p8%3D","line":152,"in_reply_to":"AAAAOn%2F%2F45c%3D","updated":"2013-04-13 17:50:01.000000000","message":"Will refine the test case.\n\nYou can see the jenkins already +1, it should pass pep8 check.","commit_id":"55792abf8ecfe4f37bb176231b3108b9c093a352"}]}
