)]}'
{"nova/cmd/manage.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"54ffd03d1b11c26913b95c5b22290b529e27375f","unresolved":false,"context_lines":[{"line_number":333,"context_line":"            QUOTAS.usage_refresh(ctxt, project_id, user_id, keys)"},{"line_number":334,"context_line":"        except exception.QuotaUsageRefreshNotAllowed as e:"},{"line_number":335,"context_line":"            print(e.format_message())"},{"line_number":336,"context_line":"            return(2)"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"    @args(\u0027--project\u0027, dest\u003d\u0027project_id\u0027, metavar\u003d\u0027\u003cProject name\u003e\u0027,"},{"line_number":339,"context_line":"            help\u003d\u0027Project name\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba0121b8_22b06fdd","line":336,"range":{"start_line":336,"start_character":12,"end_line":336,"end_character":21},"updated":"2016-03-28 18:20:08.000000000","message":"This should be:\n\n return 2\n\n...in python at least :)","commit_id":"41b89c788973a3ae46709f5ea0c5324f59288c3b"}],"nova/db/sqlalchemy/api.py":[{"author":{"_account_id":18247,"name":"Mark Doffman","email":"mdoffman@linux.vnet.ibm.com","username":"doffm"},"change_message_id":"c465cd66f22695c044ec12a36746a4a7d1970068","unresolved":false,"context_lines":[{"line_number":3746,"context_line":""},{"line_number":3747,"context_line":"    # Handle usage refresh"},{"line_number":3748,"context_line":"    work \u003d set(keys)"},{"line_number":3749,"context_line":"    while work:"},{"line_number":3750,"context_line":"        resource \u003d work.pop()"},{"line_number":3751,"context_line":""},{"line_number":3752,"context_line":"        # Do we need to refresh the usage?"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba0121b8_a1d48447","line":3749,"updated":"2016-03-28 17:23:58.000000000","message":"This is weird. Why not \u0027for resource in set(keys)\u0027?","commit_id":"41b89c788973a3ae46709f5ea0c5324f59288c3b"},{"author":{"_account_id":17139,"name":"Chuck Carmack","email":"carmack@us.ibm.com","username":"ccarmack"},"change_message_id":"c6fbc53fd57294b9d91b0bcebe94b6e1056a8f5d","unresolved":false,"context_lines":[{"line_number":3746,"context_line":""},{"line_number":3747,"context_line":"    # Handle usage refresh"},{"line_number":3748,"context_line":"    work \u003d set(keys)"},{"line_number":3749,"context_line":"    while work:"},{"line_number":3750,"context_line":"        resource \u003d work.pop()"},{"line_number":3751,"context_line":""},{"line_number":3752,"context_line":"        # Do we need to refresh the usage?"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba0121b8_8d0371b8","line":3749,"in_reply_to":"ba0121b8_a1d48447","updated":"2016-03-28 17:32:40.000000000","message":"I only refactored existing code.  This is called by quota_reserve(), and I wanted to change existing code as little as possible.","commit_id":"41b89c788973a3ae46709f5ea0c5324f59288c3b"},{"author":{"_account_id":18247,"name":"Mark Doffman","email":"mdoffman@linux.vnet.ibm.com","username":"doffm"},"change_message_id":"c465cd66f22695c044ec12a36746a4a7d1970068","unresolved":false,"context_lines":[{"line_number":3769,"context_line":"                # Make sure we have a destination for the usage!"},{"line_number":3770,"context_line":"                _create_quota_usage_if_missing(user_usages, res,"},{"line_number":3771,"context_line":"                                               until_refresh, project_id,"},{"line_number":3772,"context_line":"                                               user_id, context.session)"},{"line_number":3773,"context_line":"                _refresh_quota_usages(user_usages[res], until_refresh,"},{"line_number":3774,"context_line":"                                      in_use)"},{"line_number":3775,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ba0121b8_41cac850","line":3772,"updated":"2016-03-28 17:23:58.000000000","message":"Why is this done twice? The _create_usage_if_missing should always have been called at this point.","commit_id":"41b89c788973a3ae46709f5ea0c5324f59288c3b"},{"author":{"_account_id":17139,"name":"Chuck Carmack","email":"carmack@us.ibm.com","username":"ccarmack"},"change_message_id":"c6fbc53fd57294b9d91b0bcebe94b6e1056a8f5d","unresolved":false,"context_lines":[{"line_number":3769,"context_line":"                # Make sure we have a destination for the usage!"},{"line_number":3770,"context_line":"                _create_quota_usage_if_missing(user_usages, res,"},{"line_number":3771,"context_line":"                                               until_refresh, project_id,"},{"line_number":3772,"context_line":"                                               user_id, context.session)"},{"line_number":3773,"context_line":"                _refresh_quota_usages(user_usages[res], until_refresh,"},{"line_number":3774,"context_line":"                                      in_use)"},{"line_number":3775,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ba0121b8_ed45cd17","line":3772,"in_reply_to":"ba0121b8_41cac850","updated":"2016-03-28 17:32:40.000000000","message":"Its done twice because some sync functions return more than 1 quota usage to update.  Specifically, _sync_instances returns instances, ram, and cores.  So for example if the caller passes in cores, the sync function is _sync_instances, and this returns updates for cores, and ram, and instances.","commit_id":"41b89c788973a3ae46709f5ea0c5324f59288c3b"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"ee4dfb77766a04c45bf57d0d2ef0be23bd22c431","unresolved":false,"context_lines":[{"line_number":3856,"context_line":"    if project_id is None:"},{"line_number":3857,"context_line":"        project_id \u003d context.project_id"},{"line_number":3858,"context_line":"    if user_id is None:"},{"line_number":3859,"context_line":"        user_id \u003d context.user_id"},{"line_number":3860,"context_line":""},{"line_number":3861,"context_line":"    # Get the current usages"},{"line_number":3862,"context_line":"    project_usages, user_usages \u003d _get_project_user_quota_usages("}],"source_content_type":"text/x-python","patch_set":4,"id":"ba0121b8_227cef71","line":3859,"updated":"2016-03-28 18:10:37.000000000","message":"btw, the only caller for this function does that project_id logic in it\u0027s method. So it might just be nice to make this required and move on.","commit_id":"41b89c788973a3ae46709f5ea0c5324f59288c3b"}],"nova/quota.py":[{"author":{"_account_id":18247,"name":"Mark Doffman","email":"mdoffman@linux.vnet.ibm.com","username":"doffm"},"change_message_id":"c465cd66f22695c044ec12a36746a4a7d1970068","unresolved":false,"context_lines":[{"line_number":359,"context_line":"        return settable_quotas"},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"    def get_syncable_quotas(self, context, resources, project_id,"},{"line_number":362,"context_line":"                            user_id \u003d None):"},{"line_number":363,"context_line":"        \"\"\"Given a list of resources, retrieve the range of syncable quotas for"},{"line_number":364,"context_line":"        the given user or project."},{"line_number":365,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ba0121b8_e1d5dcb9","line":362,"updated":"2016-03-28 17:23:58.000000000","message":"Would it be possible to refactor this in to the function below? \u0027_get_quotas\u0027  They seem to have a very similar api.","commit_id":"41b89c788973a3ae46709f5ea0c5324f59288c3b"},{"author":{"_account_id":17139,"name":"Chuck Carmack","email":"carmack@us.ibm.com","username":"ccarmack"},"change_message_id":"ae97d081a1589fa83788d686d396091011dde18c","unresolved":false,"context_lines":[{"line_number":359,"context_line":"        return settable_quotas"},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"    def get_syncable_quotas(self, context, resources, project_id,"},{"line_number":362,"context_line":"                            user_id \u003d None):"},{"line_number":363,"context_line":"        \"\"\"Given a list of resources, retrieve the range of syncable quotas for"},{"line_number":364,"context_line":"        the given user or project."},{"line_number":365,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ba0121b8_cd2a89e7","line":362,"in_reply_to":"ba0121b8_e1d5dcb9","updated":"2016-03-28 17:37:20.000000000","message":"Yes probably.  When I wrote this I was concerned about hitting the exception on line 432, but that may not be an issue now.","commit_id":"41b89c788973a3ae46709f5ea0c5324f59288c3b"}]}
