)]}'
{"nova/exception.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":1077,"context_line":"    msg_fmt \u003d _(\"Quota usage for project %(project_id)s could not be found.\")"},{"line_number":1078,"context_line":""},{"line_number":1079,"context_line":""},{"line_number":1080,"context_line":"class QuotaUsageRefreshNotAllowed(QuotaNotFound):"},{"line_number":1081,"context_line":"    msg_fmt \u003d _(\"Quota usage refresh of resource %(resource)s for project \""},{"line_number":1082,"context_line":"                \"%(project_id)s, user %(user_id)s, is not allowed. \""},{"line_number":1083,"context_line":"                \"The allowed resources are %(syncable)s.\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_84ee6189","line":1080,"range":{"start_line":1080,"start_character":34,"end_line":1080,"end_character":47},"updated":"2016-05-09 23:09:37.000000000","message":"I don\u0027t think this makes sense. It doesn\u0027t seem related to something not being found. Maybe just derive from NovaException like OverQuota is?","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":17139,"name":"Chuck Carmack","email":"carmack@us.ibm.com","username":"ccarmack"},"change_message_id":"8d52da033dca047c8d2c443e71806751a83b821b","unresolved":false,"context_lines":[{"line_number":1077,"context_line":"    msg_fmt \u003d _(\"Quota usage for project %(project_id)s could not be found.\")"},{"line_number":1078,"context_line":""},{"line_number":1079,"context_line":""},{"line_number":1080,"context_line":"class QuotaUsageRefreshNotAllowed(QuotaNotFound):"},{"line_number":1081,"context_line":"    msg_fmt \u003d _(\"Quota usage refresh of resource %(resource)s for project \""},{"line_number":1082,"context_line":"                \"%(project_id)s, user %(user_id)s, is not allowed. \""},{"line_number":1083,"context_line":"                \"The allowed resources are %(syncable)s.\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_42736515","line":1080,"range":{"start_line":1080,"start_character":34,"end_line":1080,"end_character":47},"in_reply_to":"dab17558_84ee6189","updated":"2016-05-11 17:04:11.000000000","message":"I will change it to derive from Invalid, which seems better than NovaException.","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"}],"nova/quota.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":292,"context_line":"        return settable_quotas"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    def _get_syncable_quotas(self, context, resources, project_id,"},{"line_number":295,"context_line":"                            user_id \u003d None):"},{"line_number":296,"context_line":"        \"\"\"Given a list of resources, retrieve the range of syncable quotas for"},{"line_number":297,"context_line":"        the given user or project."},{"line_number":298,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_e493eda1","line":295,"updated":"2016-05-09 23:09:37.000000000","message":"Indentation seems one off here","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":292,"context_line":"        return settable_quotas"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    def _get_syncable_quotas(self, context, resources, project_id,"},{"line_number":295,"context_line":"                            user_id \u003d None):"},{"line_number":296,"context_line":"        \"\"\"Given a list of resources, retrieve the range of syncable quotas for"},{"line_number":297,"context_line":"        the given user or project."},{"line_number":298,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_c4f34909","line":295,"range":{"start_line":295,"start_character":35,"end_line":295,"end_character":38},"updated":"2016-05-09 23:09:37.000000000","message":"There are usually no spaces around \u003d for keyword argument defaults.","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":17139,"name":"Chuck Carmack","email":"carmack@us.ibm.com","username":"ccarmack"},"change_message_id":"8d52da033dca047c8d2c443e71806751a83b821b","unresolved":false,"context_lines":[{"line_number":292,"context_line":"        return settable_quotas"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    def _get_syncable_quotas(self, context, resources, project_id,"},{"line_number":295,"context_line":"                            user_id \u003d None):"},{"line_number":296,"context_line":"        \"\"\"Given a list of resources, retrieve the range of syncable quotas for"},{"line_number":297,"context_line":"        the given user or project."},{"line_number":298,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_e2b41983","line":295,"range":{"start_line":295,"start_character":35,"end_line":295,"end_character":38},"in_reply_to":"dab17558_c4f34909","updated":"2016-05-11 17:04:11.000000000","message":"Done","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":17139,"name":"Chuck Carmack","email":"carmack@us.ibm.com","username":"ccarmack"},"change_message_id":"8d52da033dca047c8d2c443e71806751a83b821b","unresolved":false,"context_lines":[{"line_number":292,"context_line":"        return settable_quotas"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    def _get_syncable_quotas(self, context, resources, project_id,"},{"line_number":295,"context_line":"                            user_id \u003d None):"},{"line_number":296,"context_line":"        \"\"\"Given a list of resources, retrieve the range of syncable quotas for"},{"line_number":297,"context_line":"        the given user or project."},{"line_number":298,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_22b3c199","line":295,"in_reply_to":"dab17558_e493eda1","updated":"2016-05-11 17:04:11.000000000","message":"Done","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    def _get_syncable_quotas(self, context, resources, project_id,"},{"line_number":295,"context_line":"                            user_id \u003d None):"},{"line_number":296,"context_line":"        \"\"\"Given a list of resources, retrieve the range of syncable quotas for"},{"line_number":297,"context_line":"        the given user or project."},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"        :param context: The request context, for access checks."}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_24bcd504","line":296,"range":{"start_line":296,"start_character":51,"end_line":296,"end_character":56},"updated":"2016-05-09 23:09:37.000000000","message":"What\u0027s \"the range\" mean? I see this function is returning a dict. Maybe you can add a :returns: after the :param: that explains detail of the return value or otherwise explain what\u0027s returned as an extra sentence in the body of the docstring","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":17139,"name":"Chuck Carmack","email":"carmack@us.ibm.com","username":"ccarmack"},"change_message_id":"8d52da033dca047c8d2c443e71806751a83b821b","unresolved":false,"context_lines":[{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    def _get_syncable_quotas(self, context, resources, project_id,"},{"line_number":295,"context_line":"                            user_id \u003d None):"},{"line_number":296,"context_line":"        \"\"\"Given a list of resources, retrieve the range of syncable quotas for"},{"line_number":297,"context_line":"        the given user or project."},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"        :param context: The request context, for access checks."}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_a08e8876","line":296,"range":{"start_line":296,"start_character":51,"end_line":296,"end_character":56},"in_reply_to":"dab17558_24bcd504","updated":"2016-05-11 17:04:11.000000000","message":"I tried to clear this up.","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":327,"context_line":"                    quotas[ppr] \u003d proj_quotas[ppr]"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"        syncable_quotas \u003d {}"},{"line_number":330,"context_line":"        for key, value in six.iteritems(quotas):"},{"line_number":331,"context_line":"            if hasattr(resources.get(key), \u0027sync\u0027):"},{"line_number":332,"context_line":"                syncable_quotas[key] \u003d value"},{"line_number":333,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_c4e7c9e2","line":330,"range":{"start_line":330,"start_character":26,"end_line":330,"end_character":47},"updated":"2016-05-09 23:09:37.000000000","message":"I *think* you can just use:\n\n quotas.items()\n\nhere","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":17139,"name":"Chuck Carmack","email":"carmack@us.ibm.com","username":"ccarmack"},"change_message_id":"8d52da033dca047c8d2c443e71806751a83b821b","unresolved":false,"context_lines":[{"line_number":327,"context_line":"                    quotas[ppr] \u003d proj_quotas[ppr]"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"        syncable_quotas \u003d {}"},{"line_number":330,"context_line":"        for key, value in six.iteritems(quotas):"},{"line_number":331,"context_line":"            if hasattr(resources.get(key), \u0027sync\u0027):"},{"line_number":332,"context_line":"                syncable_quotas[key] \u003d value"},{"line_number":333,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_c08e2c2d","line":330,"range":{"start_line":330,"start_character":26,"end_line":330,"end_character":47},"in_reply_to":"dab17558_c4e7c9e2","updated":"2016-05-11 17:04:11.000000000","message":"Done.  I\u0027m learning python still.  items() is used in other places.","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":632,"context_line":"                # That means it\u0027ll be refreshed anyway"},{"line_number":633,"context_line":"                pass"},{"line_number":634,"context_line":""},{"line_number":635,"context_line":"    def usage_refresh(self, context, resources, project_id, user_id \u003d None,"},{"line_number":636,"context_line":"                      resource_names \u003d None):"},{"line_number":637,"context_line":"        \"\"\"Refresh the usage records for a particular project and user"},{"line_number":638,"context_line":"        on a list of resources.  This will force that usage records to be"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_241e95ba","line":635,"range":{"start_line":635,"start_character":67,"end_line":635,"end_character":70},"updated":"2016-05-09 23:09:37.000000000","message":"No spaces","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":17139,"name":"Chuck Carmack","email":"carmack@us.ibm.com","username":"ccarmack"},"change_message_id":"8d52da033dca047c8d2c443e71806751a83b821b","unresolved":false,"context_lines":[{"line_number":632,"context_line":"                # That means it\u0027ll be refreshed anyway"},{"line_number":633,"context_line":"                pass"},{"line_number":634,"context_line":""},{"line_number":635,"context_line":"    def usage_refresh(self, context, resources, project_id, user_id \u003d None,"},{"line_number":636,"context_line":"                      resource_names \u003d None):"},{"line_number":637,"context_line":"        \"\"\"Refresh the usage records for a particular project and user"},{"line_number":638,"context_line":"        on a list of resources.  This will force that usage records to be"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_235622ce","line":635,"range":{"start_line":635,"start_character":67,"end_line":635,"end_character":70},"in_reply_to":"dab17558_241e95ba","updated":"2016-05-11 17:04:11.000000000","message":"Done","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":633,"context_line":"                pass"},{"line_number":634,"context_line":""},{"line_number":635,"context_line":"    def usage_refresh(self, context, resources, project_id, user_id \u003d None,"},{"line_number":636,"context_line":"                      resource_names \u003d None):"},{"line_number":637,"context_line":"        \"\"\"Refresh the usage records for a particular project and user"},{"line_number":638,"context_line":"        on a list of resources.  This will force that usage records to be"},{"line_number":639,"context_line":"        sync\u0027d immediately to the actual usage."}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_847941ff","line":636,"range":{"start_line":636,"start_character":36,"end_line":636,"end_character":39},"updated":"2016-05-09 23:09:37.000000000","message":"No spaces","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":17139,"name":"Chuck Carmack","email":"carmack@us.ibm.com","username":"ccarmack"},"change_message_id":"8d52da033dca047c8d2c443e71806751a83b821b","unresolved":false,"context_lines":[{"line_number":633,"context_line":"                pass"},{"line_number":634,"context_line":""},{"line_number":635,"context_line":"    def usage_refresh(self, context, resources, project_id, user_id \u003d None,"},{"line_number":636,"context_line":"                      resource_names \u003d None):"},{"line_number":637,"context_line":"        \"\"\"Refresh the usage records for a particular project and user"},{"line_number":638,"context_line":"        on a list of resources.  This will force that usage records to be"},{"line_number":639,"context_line":"        sync\u0027d immediately to the actual usage."}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_6374aa67","line":636,"range":{"start_line":636,"start_character":36,"end_line":636,"end_character":39},"in_reply_to":"dab17558_847941ff","updated":"2016-05-11 17:04:11.000000000","message":"Done","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":635,"context_line":"    def usage_refresh(self, context, resources, project_id, user_id \u003d None,"},{"line_number":636,"context_line":"                      resource_names \u003d None):"},{"line_number":637,"context_line":"        \"\"\"Refresh the usage records for a particular project and user"},{"line_number":638,"context_line":"        on a list of resources.  This will force that usage records to be"},{"line_number":639,"context_line":"        sync\u0027d immediately to the actual usage."},{"line_number":640,"context_line":""},{"line_number":641,"context_line":"        This method will raise a QuotaUsageRefreshNotAllowed exception if a"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_64653d44","line":638,"range":{"start_line":638,"start_character":49,"end_line":638,"end_character":53},"updated":"2016-05-09 23:09:37.000000000","message":"Omit this? It reads oddly","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":17139,"name":"Chuck Carmack","email":"carmack@us.ibm.com","username":"ccarmack"},"change_message_id":"8d52da033dca047c8d2c443e71806751a83b821b","unresolved":false,"context_lines":[{"line_number":635,"context_line":"    def usage_refresh(self, context, resources, project_id, user_id \u003d None,"},{"line_number":636,"context_line":"                      resource_names \u003d None):"},{"line_number":637,"context_line":"        \"\"\"Refresh the usage records for a particular project and user"},{"line_number":638,"context_line":"        on a list of resources.  This will force that usage records to be"},{"line_number":639,"context_line":"        sync\u0027d immediately to the actual usage."},{"line_number":640,"context_line":""},{"line_number":641,"context_line":"        This method will raise a QuotaUsageRefreshNotAllowed exception if a"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_f2efc284","line":638,"range":{"start_line":638,"start_character":49,"end_line":638,"end_character":53},"in_reply_to":"dab17558_64653d44","updated":"2016-05-11 17:04:11.000000000","message":"Done","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":645,"context_line":"        :param resources: A dictionary of the registered resources."},{"line_number":646,"context_line":"        :param project_id: Specify the project_id if current context"},{"line_number":647,"context_line":"                           is admin and admin wants to impact on"},{"line_number":648,"context_line":"                           common user\u0027s project."},{"line_number":649,"context_line":"        :param user_id: Optional: Specify the user_id if current context"},{"line_number":650,"context_line":"                        is admin and admin wants to impact on"},{"line_number":651,"context_line":"                        common user."}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_e4748dd0","line":648,"updated":"2016-05-09 23:09:37.000000000","message":"This makes it sound like project_id is optional, \"specify if context is admin etc\" but it\u0027s not optional. Is this outdated from a previous revision?","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":17139,"name":"Chuck Carmack","email":"carmack@us.ibm.com","username":"ccarmack"},"change_message_id":"8d52da033dca047c8d2c443e71806751a83b821b","unresolved":false,"context_lines":[{"line_number":645,"context_line":"        :param resources: A dictionary of the registered resources."},{"line_number":646,"context_line":"        :param project_id: Specify the project_id if current context"},{"line_number":647,"context_line":"                           is admin and admin wants to impact on"},{"line_number":648,"context_line":"                           common user\u0027s project."},{"line_number":649,"context_line":"        :param user_id: Optional: Specify the user_id if current context"},{"line_number":650,"context_line":"                        is admin and admin wants to impact on"},{"line_number":651,"context_line":"                        common user."}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_4966ae51","line":648,"in_reply_to":"dab17558_e4748dd0","updated":"2016-05-11 17:04:11.000000000","message":"I tried to clear up how the project_id and user_id are determined for the downstream code.  Please review the next patch-set.","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":648,"context_line":"                           common user\u0027s project."},{"line_number":649,"context_line":"        :param user_id: Optional: Specify the user_id if current context"},{"line_number":650,"context_line":"                        is admin and admin wants to impact on"},{"line_number":651,"context_line":"                        common user."},{"line_number":652,"context_line":"        :param resources_names: Optional: A list of the resource names"},{"line_number":653,"context_line":"                                for which the usage must be refreshed."},{"line_number":654,"context_line":"                                If not specified, then all the usages"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_242df5a7","line":651,"updated":"2016-05-09 23:09:37.000000000","message":"Still confused by these. Is this an admin-only command?","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":17139,"name":"Chuck Carmack","email":"carmack@us.ibm.com","username":"ccarmack"},"change_message_id":"8d52da033dca047c8d2c443e71806751a83b821b","unresolved":false,"context_lines":[{"line_number":648,"context_line":"                           common user\u0027s project."},{"line_number":649,"context_line":"        :param user_id: Optional: Specify the user_id if current context"},{"line_number":650,"context_line":"                        is admin and admin wants to impact on"},{"line_number":651,"context_line":"                        common user."},{"line_number":652,"context_line":"        :param resources_names: Optional: A list of the resource names"},{"line_number":653,"context_line":"                                for which the usage must be refreshed."},{"line_number":654,"context_line":"                                If not specified, then all the usages"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_29588a55","line":651,"in_reply_to":"dab17558_242df5a7","updated":"2016-05-11 17:04:11.000000000","message":"I tried to clear it up - please look at the next patch set.\n\nThe idea is that the caller can use an admin context for authorization checks, and separately specify the project and uaer to operate on.  The context doesn\u0027t have to be admin, but then the authorization is based in the user in the context, and project_id and user_id don\u0027t need to be specified.\n\n(I copied this design from other functions in this module)","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":12237,"name":"Qijing Li","email":"qijing_li@symantec.com","username":"stack"},"change_message_id":"82a631d85a34b72b14645ba3e6e1623cd9ba770b","unresolved":false,"context_lines":[{"line_number":949,"context_line":"        \"\"\""},{"line_number":950,"context_line":"        pass"},{"line_number":951,"context_line":""},{"line_number":952,"context_line":"    def usage_refresh(self, context, resources, project_id, user_id\u003dNone,"},{"line_number":953,"context_line":"                      resource_names\u003dNone):"},{"line_number":954,"context_line":"        \"\"\"Refresh the usage records for a particular project and user"},{"line_number":955,"context_line":"        on a list of resources.  This will force that usage records to be"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a122d0e_3a1d1974","line":952,"updated":"2016-04-15 22:00:12.000000000","message":"you have three definitions for usage_refresh, and should keep one.","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":12237,"name":"Qijing Li","email":"qijing_li@symantec.com","username":"stack"},"change_message_id":"97c1c98ea594b66af27deccfc20d19d75c5784a8","unresolved":false,"context_lines":[{"line_number":949,"context_line":"        \"\"\""},{"line_number":950,"context_line":"        pass"},{"line_number":951,"context_line":""},{"line_number":952,"context_line":"    def usage_refresh(self, context, resources, project_id, user_id\u003dNone,"},{"line_number":953,"context_line":"                      resource_names\u003dNone):"},{"line_number":954,"context_line":"        \"\"\"Refresh the usage records for a particular project and user"},{"line_number":955,"context_line":"        on a list of resources.  This will force that usage records to be"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a122d0e_4078ad2b","line":952,"in_reply_to":"1a122d0e_098c3034","updated":"2016-04-18 17:34:54.000000000","message":"sorry, my mistake. please forget my comment.","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":17139,"name":"Chuck Carmack","email":"carmack@us.ibm.com","username":"ccarmack"},"change_message_id":"cb3ee43cc14de43bc955363be480aecf29bb4eec","unresolved":false,"context_lines":[{"line_number":949,"context_line":"        \"\"\""},{"line_number":950,"context_line":"        pass"},{"line_number":951,"context_line":""},{"line_number":952,"context_line":"    def usage_refresh(self, context, resources, project_id, user_id\u003dNone,"},{"line_number":953,"context_line":"                      resource_names\u003dNone):"},{"line_number":954,"context_line":"        \"\"\"Refresh the usage records for a particular project and user"},{"line_number":955,"context_line":"        on a list of resources.  This will force that usage records to be"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a122d0e_098c3034","line":952,"in_reply_to":"1a122d0e_3a1d1974","updated":"2016-04-18 13:10:31.000000000","message":"Its an API on QuotaEngine, which calls the quota drivers, like the other APIs.  The reserve API is the same way.","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":965,"context_line":"                           common user\u0027s project."},{"line_number":966,"context_line":"        :param user_id: Optional: Specify the user_id if current context"},{"line_number":967,"context_line":"                        is admin and admin wants to impact on"},{"line_number":968,"context_line":"                        common user."},{"line_number":969,"context_line":"        :param resources_names: Optional: A list of the resource names"},{"line_number":970,"context_line":"                                for which the usage must be refreshed."},{"line_number":971,"context_line":"                                If not specified, then all the usages"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_67525f15","line":968,"updated":"2016-05-09 23:09:37.000000000","message":"Same comments about project_id and user_id","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":17139,"name":"Chuck Carmack","email":"carmack@us.ibm.com","username":"ccarmack"},"change_message_id":"8d52da033dca047c8d2c443e71806751a83b821b","unresolved":false,"context_lines":[{"line_number":965,"context_line":"                           common user\u0027s project."},{"line_number":966,"context_line":"        :param user_id: Optional: Specify the user_id if current context"},{"line_number":967,"context_line":"                        is admin and admin wants to impact on"},{"line_number":968,"context_line":"                        common user."},{"line_number":969,"context_line":"        :param resources_names: Optional: A list of the resource names"},{"line_number":970,"context_line":"                                for which the usage must be refreshed."},{"line_number":971,"context_line":"                                If not specified, then all the usages"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_09014606","line":968,"in_reply_to":"dab17558_67525f15","updated":"2016-05-11 17:04:11.000000000","message":"See my answers above.","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":1451,"context_line":""},{"line_number":1452,"context_line":"        self._driver.usage_reset(context, resources)"},{"line_number":1453,"context_line":""},{"line_number":1454,"context_line":"    def usage_refresh(self, context, project_id, user_id \u003d None,"},{"line_number":1455,"context_line":"                      resource_names \u003d None):"},{"line_number":1456,"context_line":"        \"\"\"Refresh the usage records for a particular project and user"},{"line_number":1457,"context_line":"        on a list of resources.  This will force that user\u0027s usage"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_a75c4726","line":1454,"range":{"start_line":1454,"start_character":56,"end_line":1454,"end_character":59},"updated":"2016-05-09 23:09:37.000000000","message":"No spaces","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":17139,"name":"Chuck Carmack","email":"carmack@us.ibm.com","username":"ccarmack"},"change_message_id":"8d52da033dca047c8d2c443e71806751a83b821b","unresolved":false,"context_lines":[{"line_number":1451,"context_line":""},{"line_number":1452,"context_line":"        self._driver.usage_reset(context, resources)"},{"line_number":1453,"context_line":""},{"line_number":1454,"context_line":"    def usage_refresh(self, context, project_id, user_id \u003d None,"},{"line_number":1455,"context_line":"                      resource_names \u003d None):"},{"line_number":1456,"context_line":"        \"\"\"Refresh the usage records for a particular project and user"},{"line_number":1457,"context_line":"        on a list of resources.  This will force that user\u0027s usage"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_84707da5","line":1454,"range":{"start_line":1454,"start_character":56,"end_line":1454,"end_character":59},"in_reply_to":"dab17558_a75c4726","updated":"2016-05-11 17:04:11.000000000","message":"Done","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":1452,"context_line":"        self._driver.usage_reset(context, resources)"},{"line_number":1453,"context_line":""},{"line_number":1454,"context_line":"    def usage_refresh(self, context, project_id, user_id \u003d None,"},{"line_number":1455,"context_line":"                      resource_names \u003d None):"},{"line_number":1456,"context_line":"        \"\"\"Refresh the usage records for a particular project and user"},{"line_number":1457,"context_line":"        on a list of resources.  This will force that user\u0027s usage"},{"line_number":1458,"context_line":"        records to be sync\u0027d immediately with the actual usage."}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_0742733e","line":1455,"range":{"start_line":1455,"start_character":36,"end_line":1455,"end_character":39},"updated":"2016-05-09 23:09:37.000000000","message":"No spaces","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":17139,"name":"Chuck Carmack","email":"carmack@us.ibm.com","username":"ccarmack"},"change_message_id":"8d52da033dca047c8d2c443e71806751a83b821b","unresolved":false,"context_lines":[{"line_number":1452,"context_line":"        self._driver.usage_reset(context, resources)"},{"line_number":1453,"context_line":""},{"line_number":1454,"context_line":"    def usage_refresh(self, context, project_id, user_id \u003d None,"},{"line_number":1455,"context_line":"                      resource_names \u003d None):"},{"line_number":1456,"context_line":"        \"\"\"Refresh the usage records for a particular project and user"},{"line_number":1457,"context_line":"        on a list of resources.  This will force that user\u0027s usage"},{"line_number":1458,"context_line":"        records to be sync\u0027d immediately with the actual usage."}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_c46605ec","line":1455,"range":{"start_line":1455,"start_character":36,"end_line":1455,"end_character":39},"in_reply_to":"dab17558_0742733e","updated":"2016-05-11 17:04:11.000000000","message":"Done","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":1466,"context_line":"                           common user\u0027s project."},{"line_number":1467,"context_line":"        :param user_id: Optional: Specify the user_id if current context"},{"line_number":1468,"context_line":"                        is admin and admin wants to impact on"},{"line_number":1469,"context_line":"                        common user."},{"line_number":1470,"context_line":"        :param resources_names: Optional: A list of the resource names"},{"line_number":1471,"context_line":"                                for which the usage must be refreshed."},{"line_number":1472,"context_line":"                                If not specified, then all the usages"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_474c7b70","line":1469,"updated":"2016-05-09 23:09:37.000000000","message":"Same comments about project_id  and user_id","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":17139,"name":"Chuck Carmack","email":"carmack@us.ibm.com","username":"ccarmack"},"change_message_id":"8d52da033dca047c8d2c443e71806751a83b821b","unresolved":false,"context_lines":[{"line_number":1466,"context_line":"                           common user\u0027s project."},{"line_number":1467,"context_line":"        :param user_id: Optional: Specify the user_id if current context"},{"line_number":1468,"context_line":"                        is admin and admin wants to impact on"},{"line_number":1469,"context_line":"                        common user."},{"line_number":1470,"context_line":"        :param resources_names: Optional: A list of the resource names"},{"line_number":1471,"context_line":"                                for which the usage must be refreshed."},{"line_number":1472,"context_line":"                                If not specified, then all the usages"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_04464d4e","line":1469,"in_reply_to":"dab17558_474c7b70","updated":"2016-05-11 17:04:11.000000000","message":"Same answers.","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"518a95d8e6150a3492f491cac2f10d5cd20e2aa5","unresolved":false,"context_lines":[{"line_number":26,"context_line":"import nova.conf"},{"line_number":27,"context_line":"from nova import db"},{"line_number":28,"context_line":"from nova import exception"},{"line_number":29,"context_line":"from nova.i18n import _"},{"line_number":30,"context_line":"from nova.i18n import _LE"},{"line_number":31,"context_line":"from nova import objects"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"bab6814e_f29320a1","line":29,"range":{"start_line":29,"start_character":22,"end_line":29,"end_character":23},"updated":"2016-05-27 02:20:24.000000000","message":"This can just be on the next line before _LE, comma separated. No need for a new line","commit_id":"b8af6010b3e3927245fbee857d4b8ecffa2584e6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"518a95d8e6150a3492f491cac2f10d5cd20e2aa5","unresolved":false,"context_lines":[{"line_number":306,"context_line":"        :param project_id: The ID of the project to return quotas for."},{"line_number":307,"context_line":"        :param user_id: Optional. The ID of the user to return quotas for."},{"line_number":308,"context_line":"        :returns: A dictionary of quotas scoped to the project, or"},{"line_number":309,"context_line":"        user in the project, than can be sync\u0027d."},{"line_number":310,"context_line":"        \"\"\""},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"        db_proj_quotas \u003d db.quota_get_all_by_project(context, project_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bab6814e_07d14823","line":309,"range":{"start_line":309,"start_character":29,"end_line":309,"end_character":33},"updated":"2016-05-27 02:20:24.000000000","message":"s/than/that/ ?\n\nand line up \"user\" with \"A\" in the previous line","commit_id":"b8af6010b3e3927245fbee857d4b8ecffa2584e6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"518a95d8e6150a3492f491cac2f10d5cd20e2aa5","unresolved":false,"context_lines":[{"line_number":653,"context_line":"        :param resources: A dictionary of the registered resources."},{"line_number":654,"context_line":"        :param project_id: Optional: Project whose resources to"},{"line_number":655,"context_line":"                           refresh.  Defaults to the project_id in"},{"line_number":656,"context_line":"                           the context.  The project_id must be set"},{"line_number":657,"context_line":"                           in this parameter, or in the context."},{"line_number":658,"context_line":"        :param user_id: Optional: User whose resources to refresh."},{"line_number":659,"context_line":"                        Defaults to the user_id in the context."},{"line_number":660,"context_line":"                        context.  The user_id may None."}],"source_content_type":"text/x-python","patch_set":6,"id":"bab6814e_7f941836","line":657,"range":{"start_line":656,"start_character":41,"end_line":657,"end_character":64},"updated":"2016-05-27 02:20:24.000000000","message":"This can be omitted","commit_id":"b8af6010b3e3927245fbee857d4b8ecffa2584e6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"518a95d8e6150a3492f491cac2f10d5cd20e2aa5","unresolved":false,"context_lines":[{"line_number":657,"context_line":"                           in this parameter, or in the context."},{"line_number":658,"context_line":"        :param user_id: Optional: User whose resources to refresh."},{"line_number":659,"context_line":"                        Defaults to the user_id in the context."},{"line_number":660,"context_line":"                        context.  The user_id may None."},{"line_number":661,"context_line":"        :param resources_names: Optional: A list of the resource names"},{"line_number":662,"context_line":"                                for which the usage must be refreshed."},{"line_number":663,"context_line":"                                If not specified, then all the usages"}],"source_content_type":"text/x-python","patch_set":6,"id":"bab6814e_3f70d03f","line":660,"range":{"start_line":660,"start_character":32,"end_line":660,"end_character":55},"updated":"2016-05-27 02:20:24.000000000","message":"This can be omitted.","commit_id":"b8af6010b3e3927245fbee857d4b8ecffa2584e6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"518a95d8e6150a3492f491cac2f10d5cd20e2aa5","unresolved":false,"context_lines":[{"line_number":666,"context_line":""},{"line_number":667,"context_line":"        if project_id is None:"},{"line_number":668,"context_line":"            project_id \u003d context.project_id"},{"line_number":669,"context_line":"        if project_id is None:"},{"line_number":670,"context_line":"            msg \u003d _(\"project_id cannot be None\")"},{"line_number":671,"context_line":"            raise exception.InvalidInput(reason\u003dmsg)"},{"line_number":672,"context_line":"        if user_id is None:"},{"line_number":673,"context_line":"            user_id \u003d context.user_id"},{"line_number":674,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"bab6814e_ff48082f","line":671,"range":{"start_line":669,"start_character":8,"end_line":671,"end_character":52},"updated":"2016-05-27 02:20:24.000000000","message":"I don\u0027t think we need this. I think we can assume if project_id isn\u0027t passed explicitly we can take it from the context (and also assume context is valid). In nova-manage we should require the corresponding arguments since we\u0027re going to pass an empty context","commit_id":"b8af6010b3e3927245fbee857d4b8ecffa2584e6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"518a95d8e6150a3492f491cac2f10d5cd20e2aa5","unresolved":false,"context_lines":[{"line_number":980,"context_line":"        :param context: The request context, for access checks."},{"line_number":981,"context_line":"        :param resources: A dictionary of the registered resources."},{"line_number":982,"context_line":"        :param project_id: Optional: Project whose resources to"},{"line_number":983,"context_line":"                           refresh.  Defaults to the project_id in"},{"line_number":984,"context_line":"                           the context.  The project_id must be set"},{"line_number":985,"context_line":"                           in this parameter, or in the context."},{"line_number":986,"context_line":"        :param user_id: Optional: User whose resources to refresh."},{"line_number":987,"context_line":"                        Defaults to the user_id in the context."}],"source_content_type":"text/x-python","patch_set":6,"id":"bab6814e_bfb160e2","line":984,"range":{"start_line":983,"start_character":37,"end_line":984,"end_character":39},"updated":"2016-05-27 02:20:24.000000000","message":"Prefer \"If not set, then the project_id is taken from the context.\" as you have in the last usage_refresh method","commit_id":"b8af6010b3e3927245fbee857d4b8ecffa2584e6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"518a95d8e6150a3492f491cac2f10d5cd20e2aa5","unresolved":false,"context_lines":[{"line_number":981,"context_line":"        :param resources: A dictionary of the registered resources."},{"line_number":982,"context_line":"        :param project_id: Optional: Project whose resources to"},{"line_number":983,"context_line":"                           refresh.  Defaults to the project_id in"},{"line_number":984,"context_line":"                           the context.  The project_id must be set"},{"line_number":985,"context_line":"                           in this parameter, or in the context."},{"line_number":986,"context_line":"        :param user_id: Optional: User whose resources to refresh."},{"line_number":987,"context_line":"                        Defaults to the user_id in the context."},{"line_number":988,"context_line":"                        context.  The user_id may None."}],"source_content_type":"text/x-python","patch_set":6,"id":"bab6814e_3fc29053","line":985,"range":{"start_line":984,"start_character":39,"end_line":985,"end_character":64},"updated":"2016-05-27 02:20:24.000000000","message":"This can be omitted","commit_id":"b8af6010b3e3927245fbee857d4b8ecffa2584e6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"518a95d8e6150a3492f491cac2f10d5cd20e2aa5","unresolved":false,"context_lines":[{"line_number":984,"context_line":"                           the context.  The project_id must be set"},{"line_number":985,"context_line":"                           in this parameter, or in the context."},{"line_number":986,"context_line":"        :param user_id: Optional: User whose resources to refresh."},{"line_number":987,"context_line":"                        Defaults to the user_id in the context."},{"line_number":988,"context_line":"                        context.  The user_id may None."},{"line_number":989,"context_line":"        :param resources_names: Optional: A list of the resource names"},{"line_number":990,"context_line":"                                for which the usage must be refreshed."},{"line_number":991,"context_line":"                                If not specified, then all the usages"}],"source_content_type":"text/x-python","patch_set":6,"id":"bab6814e_9f061c84","line":988,"range":{"start_line":987,"start_character":24,"end_line":988,"end_character":32},"updated":"2016-05-27 02:20:24.000000000","message":"Prefer \"If not set, then the user_id is taken from the context.\" as you have in the last usage_refresh method","commit_id":"b8af6010b3e3927245fbee857d4b8ecffa2584e6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"518a95d8e6150a3492f491cac2f10d5cd20e2aa5","unresolved":false,"context_lines":[{"line_number":985,"context_line":"                           in this parameter, or in the context."},{"line_number":986,"context_line":"        :param user_id: Optional: User whose resources to refresh."},{"line_number":987,"context_line":"                        Defaults to the user_id in the context."},{"line_number":988,"context_line":"                        context.  The user_id may None."},{"line_number":989,"context_line":"        :param resources_names: Optional: A list of the resource names"},{"line_number":990,"context_line":"                                for which the usage must be refreshed."},{"line_number":991,"context_line":"                                If not specified, then all the usages"}],"source_content_type":"text/x-python","patch_set":6,"id":"bab6814e_5fc79463","line":988,"range":{"start_line":988,"start_character":32,"end_line":988,"end_character":55},"updated":"2016-05-27 02:20:24.000000000","message":"This can be omitted, it makes things less clear","commit_id":"b8af6010b3e3927245fbee857d4b8ecffa2584e6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"518a95d8e6150a3492f491cac2f10d5cd20e2aa5","unresolved":false,"context_lines":[{"line_number":1484,"context_line":"        :param context: The request context, for access checks."},{"line_number":1485,"context_line":"        :param project_id: Optional:  Project whose resources to"},{"line_number":1486,"context_line":"                           refresh.  If not set, then the project_id"},{"line_number":1487,"context_line":"                           is taken from the context.  The project_id"},{"line_number":1488,"context_line":"                           must be set in either this parameter,"},{"line_number":1489,"context_line":"                           or in the context."},{"line_number":1490,"context_line":"        :param user_id: Optional: User whose resources to refresh."},{"line_number":1491,"context_line":"                        If not set, then the user_id is taken from the"},{"line_number":1492,"context_line":"                        context.  The user_id is not required."}],"source_content_type":"text/x-python","patch_set":6,"id":"bab6814e_bfb5e0ed","line":1489,"range":{"start_line":1487,"start_character":53,"end_line":1489,"end_character":45},"updated":"2016-05-27 02:20:24.000000000","message":"This can be omitted now that I understand what\u0027s going on","commit_id":"b8af6010b3e3927245fbee857d4b8ecffa2584e6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"518a95d8e6150a3492f491cac2f10d5cd20e2aa5","unresolved":false,"context_lines":[{"line_number":1489,"context_line":"                           or in the context."},{"line_number":1490,"context_line":"        :param user_id: Optional: User whose resources to refresh."},{"line_number":1491,"context_line":"                        If not set, then the user_id is taken from the"},{"line_number":1492,"context_line":"                        context.  The user_id is not required."},{"line_number":1493,"context_line":"        :param resources_names: Optional: A list of the resource names"},{"line_number":1494,"context_line":"                                for which the usage must be refreshed."},{"line_number":1495,"context_line":"                                If not specified, then all the usages"}],"source_content_type":"text/x-python","patch_set":6,"id":"bab6814e_3febb0dd","line":1492,"range":{"start_line":1492,"start_character":32,"end_line":1492,"end_character":62},"updated":"2016-05-27 02:20:24.000000000","message":"I think this can be omitted. It makes it less clear","commit_id":"b8af6010b3e3927245fbee857d4b8ecffa2584e6"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"6e9fcadeeb64d9b9d57f275286acbf21e26ff4d4","unresolved":false,"context_lines":[{"line_number":298,"context_line":""},{"line_number":299,"context_line":"        A quota is syncable if its registered resource has a function to"},{"line_number":300,"context_line":"        sync the quota\u0027s usage record with the actual usage of the"},{"line_number":301,"context_line":"        project of user."},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"        :param context: The request context, for access checks."},{"line_number":304,"context_line":"        :param resources: A dictionary of the registered resources."}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_ac7864c5","line":301,"updated":"2016-07-05 21:29:53.000000000","message":"This sentence is true, but doesn\u0027t quite describe what takes place below.\n\nRather than gathering a list of resources that have quotas for a given user/project it would be better to just get the list of syncable quotas and use that each time. The list gathering here is racy since a quota could be added after the queries, and also means the method name isn\u0027t accurate. This is really getting a list of set and syncable quotas.","commit_id":"200ec63652abb4a147ff23ff1d8030df4195b40d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4f6b7c20cfda6eea6f67cc10e143915ac8027c78","unresolved":false,"context_lines":[{"line_number":298,"context_line":""},{"line_number":299,"context_line":"        A quota is syncable if its registered resource has a function to"},{"line_number":300,"context_line":"        sync the quota\u0027s usage record with the actual usage of the"},{"line_number":301,"context_line":"        project of user."},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"        :param context: The request context, for access checks."},{"line_number":304,"context_line":"        :param resources: A dictionary of the registered resources."}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_e62d32a9","line":301,"in_reply_to":"1aa78d24_017af576","updated":"2016-07-06 18:59:31.000000000","message":"I\u0027m also not really clear on what\u0027s going on in here, it seems like we could use the resources from QUOTA_SYNC_FUNCTIONS in the db api minus what\u0027s in PER_PROJECT_QUOTAS (if a user_id is passed in).","commit_id":"200ec63652abb4a147ff23ff1d8030df4195b40d"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"a099b47dfafc756ba49f0461ba690b1a23d558cc","unresolved":false,"context_lines":[{"line_number":298,"context_line":""},{"line_number":299,"context_line":"        A quota is syncable if its registered resource has a function to"},{"line_number":300,"context_line":"        sync the quota\u0027s usage record with the actual usage of the"},{"line_number":301,"context_line":"        project of user."},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"        :param context: The request context, for access checks."},{"line_number":304,"context_line":"        :param resources: A dictionary of the registered resources."}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_465d2678","line":301,"in_reply_to":"1aa78d24_017af576","updated":"2016-07-06 18:51:19.000000000","message":"mriedem helped me see the light a bit in irc. I understand now that we need to know if the syncable resource is project or user scoped and use the appropriate ones based on what was passed in.\n\nI\u0027m still concerned about the db queries though, rather than just checking a list of per project or per user quotas compared against what arguments are passed in. And my concern about the db isn\u0027t that we query it, it\u0027s that it looks racy to me. For instance foo, bar, and baz are resources that user x could use. But user x has only used foo and bar. So self.get_user_quotas returns foo and bar. But then the user claims resources against baz. However baz won\u0027t be synced because it wasn\u0027t in the db soon enough.","commit_id":"200ec63652abb4a147ff23ff1d8030df4195b40d"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"a2c311947016282bdf367b506b4bdf35183f3170","unresolved":false,"context_lines":[{"line_number":298,"context_line":""},{"line_number":299,"context_line":"        A quota is syncable if its registered resource has a function to"},{"line_number":300,"context_line":"        sync the quota\u0027s usage record with the actual usage of the"},{"line_number":301,"context_line":"        project of user."},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"        :param context: The request context, for access checks."},{"line_number":304,"context_line":"        :param resources: A dictionary of the registered resources."}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_017af576","line":301,"in_reply_to":"1aa78d24_3f259308","updated":"2016-07-06 17:54:15.000000000","message":"So it looks like the complexity is needed to do the scoping of the refresh by project and or user. Otherwise we\u0027d sync all syncable resources, ignoring the project_id and user_id passed in.","commit_id":"200ec63652abb4a147ff23ff1d8030df4195b40d"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"76b33af322dcf225b057ef3dca52729aec9a57ba","unresolved":false,"context_lines":[{"line_number":298,"context_line":""},{"line_number":299,"context_line":"        A quota is syncable if its registered resource has a function to"},{"line_number":300,"context_line":"        sync the quota\u0027s usage record with the actual usage of the"},{"line_number":301,"context_line":"        project of user."},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"        :param context: The request context, for access checks."},{"line_number":304,"context_line":"        :param resources: A dictionary of the registered resources."}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_1d9d28bc","line":301,"in_reply_to":"1aa78d24_5a5696ce","updated":"2016-07-06 19:16:56.000000000","message":"yeah, it may not matter in practice if a new resource is missed because it should not have gotten out of sync in that short period of time.\n\nIf we can simplify and avoid that it would be preferable, if not I can live with this.","commit_id":"200ec63652abb4a147ff23ff1d8030df4195b40d"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"338f0427ce9c939f6a3d231ff69f64e63350fb00","unresolved":false,"context_lines":[{"line_number":298,"context_line":""},{"line_number":299,"context_line":"        A quota is syncable if its registered resource has a function to"},{"line_number":300,"context_line":"        sync the quota\u0027s usage record with the actual usage of the"},{"line_number":301,"context_line":"        project of user."},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"        :param context: The request context, for access checks."},{"line_number":304,"context_line":"        :param resources: A dictionary of the registered resources."}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_3f259308","line":301,"in_reply_to":"1aa78d24_9edca974","updated":"2016-07-06 12:44:25.000000000","message":"I was thinking more along the lines of just returning a list of quota resources derived from db/sqlalchemy/api.py:QUOTA_SYNC_FUNCTIONS. Is the logic below ever going to return a list that\u0027s not equivalent?\n\nI see that this follows the same pattern as _get_settable_quotas, I\u0027m just trying to understand why the complexity vs just saying that all quota types with a sync function are syncable?","commit_id":"200ec63652abb4a147ff23ff1d8030df4195b40d"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"dae8d8853315a50d140f9254fc68635bf52f7040","unresolved":false,"context_lines":[{"line_number":298,"context_line":""},{"line_number":299,"context_line":"        A quota is syncable if its registered resource has a function to"},{"line_number":300,"context_line":"        sync the quota\u0027s usage record with the actual usage of the"},{"line_number":301,"context_line":"        project of user."},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"        :param context: The request context, for access checks."},{"line_number":304,"context_line":"        :param resources: A dictionary of the registered resources."}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_9edca974","line":301,"in_reply_to":"1aa78d24_ac7864c5","updated":"2016-07-05 22:30:19.000000000","message":"Nice point. During the gathering of syncable quotas, the values are set as the found quota values, but they aren\u0027t used anywhere afterward. Only the keys (names) of the syncable quotas are used","commit_id":"200ec63652abb4a147ff23ff1d8030df4195b40d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e76f3374475e30701062732c19341064acb6b696","unresolved":false,"context_lines":[{"line_number":298,"context_line":""},{"line_number":299,"context_line":"        A quota is syncable if its registered resource has a function to"},{"line_number":300,"context_line":"        sync the quota\u0027s usage record with the actual usage of the"},{"line_number":301,"context_line":"        project of user."},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"        :param context: The request context, for access checks."},{"line_number":304,"context_line":"        :param resources: A dictionary of the registered resources."}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_5a5696ce","line":301,"in_reply_to":"1aa78d24_e62d32a9","updated":"2016-07-06 19:00:53.000000000","message":"alaski: \"But then the user claims resources against baz. However baz won\u0027t be synced because it wasn\u0027t in the db soon enough.\" - when the user claims/reserves resources for baz, don\u0027t they get \u0027synced\u0027 for the first time? i.e. that\u0027s the initial sync?","commit_id":"200ec63652abb4a147ff23ff1d8030df4195b40d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4f6b7c20cfda6eea6f67cc10e143915ac8027c78","unresolved":false,"context_lines":[{"line_number":312,"context_line":""},{"line_number":313,"context_line":"        per_project_resources \u003d db.quota_get_per_project_resources()"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"        quotas \u003d {}"},{"line_number":316,"context_line":"        if user_id:"},{"line_number":317,"context_line":"            setted_quotas \u003d db.quota_get_all_by_project_and_user(context,"},{"line_number":318,"context_line":"                                                     project_id,"},{"line_number":319,"context_line":"                                                     user_id)"},{"line_number":320,"context_line":"            user_quotas \u003d self.get_user_quotas(context, resources,"},{"line_number":321,"context_line":"                                          project_id, user_id,"},{"line_number":322,"context_line":"                                          project_quotas\u003ddb_proj_quotas,"},{"line_number":323,"context_line":"                                          user_quotas\u003dsetted_quotas)"},{"line_number":324,"context_line":"            for key in user_quotas.keys():"},{"line_number":325,"context_line":"                if key not in per_project_resources:"},{"line_number":326,"context_line":"                    quotas[key] \u003d user_quotas[key]"},{"line_number":327,"context_line":"        else:"},{"line_number":328,"context_line":"            proj_quotas \u003d self.get_project_quotas(context, resources,"},{"line_number":329,"context_line":"                                          project_id,"},{"line_number":330,"context_line":"                                          project_quotas\u003ddb_proj_quotas)"},{"line_number":331,"context_line":"            for ppr in per_project_resources:"},{"line_number":332,"context_line":"                if ppr in proj_quotas:"},{"line_number":333,"context_line":"                    quotas[ppr] \u003d proj_quotas[ppr]"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        syncable_quotas \u003d {}"},{"line_number":336,"context_line":"        for key, value in quotas.items():"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_ba185a76","line":333,"range":{"start_line":315,"start_character":8,"end_line":333,"end_character":50},"updated":"2016-07-06 18:59:31.000000000","message":"It would be really helpful, at least to me, if there were comments inline with each part of this to explain what it\u0027s doing and why, since I get lost here easily.","commit_id":"200ec63652abb4a147ff23ff1d8030df4195b40d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4f6b7c20cfda6eea6f67cc10e143915ac8027c78","unresolved":false,"context_lines":[{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        syncable_quotas \u003d {}"},{"line_number":336,"context_line":"        for key, value in quotas.items():"},{"line_number":337,"context_line":"            if hasattr(resources.get(key), \u0027sync\u0027):"},{"line_number":338,"context_line":"                syncable_quotas[key] \u003d value"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        return syncable_quotas"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_06c31eee","line":337,"range":{"start_line":337,"start_character":15,"end_line":337,"end_character":51},"updated":"2016-07-06 18:59:31.000000000","message":"Couldn\u0027t we alternatively check:\n\n if isinstance(resources.get(key), ReservableResource)?","commit_id":"200ec63652abb4a147ff23ff1d8030df4195b40d"}],"nova/tests/unit/test_quota.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":2473,"context_line":"        self.stub_out(\u0027nova.db.sqlalchemy.api._quota_usage_create\u0027,"},{"line_number":2474,"context_line":"                       fake_quota_usage_create)"},{"line_number":2475,"context_line":"        self.stub_out(\u0027nova.db.sqlalchemy.api._reservation_create\u0027,"},{"line_number":2476,"context_line":"                       fake_reservation_create)"},{"line_number":2477,"context_line":""},{"line_number":2478,"context_line":"        self.useFixture(test.TimeOverride())"},{"line_number":2479,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_e71daf10","line":2476,"updated":"2016-05-09 23:09:37.000000000","message":"Aside: This is stubbing out the db calls, yet the class derives from test.TestCase. It could probably derive from test.NoDBTestCase unless there are other db calls it didn\u0027t stub. I think I remember long ago the quotas tests were changed not to do real db calls because they were taking a lot of time","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":2803,"context_line":"        super(QuotaEngineUsageRefreshTestCase, self).setUp()"},{"line_number":2804,"context_line":""},{"line_number":2805,"context_line":"        self.usages_list.append(dict(resource\u003d\u0027server_groups\u0027,"},{"line_number":2806,"context_line":"                     project_id\u003d\u0027test_project\u0027,"},{"line_number":2807,"context_line":"                     user_id\u003d\u0027fake_user\u0027,"},{"line_number":2808,"context_line":"                     in_use\u003d2,"},{"line_number":2809,"context_line":"                     reserved\u003d2,"},{"line_number":2810,"context_line":"                     until_refresh\u003dNone))"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_27ab3776","line":2807,"range":{"start_line":2806,"start_character":21,"end_line":2807,"end_character":41},"updated":"2016-05-09 23:09:37.000000000","message":"Aside: Non IDs again, this is not like reality but 1) the tests stub out the db calls 2) the DB columns are just strings so there\u0027s no enforcement about UUIDs anyway","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":17139,"name":"Chuck Carmack","email":"carmack@us.ibm.com","username":"ccarmack"},"change_message_id":"8d52da033dca047c8d2c443e71806751a83b821b","unresolved":false,"context_lines":[{"line_number":2803,"context_line":"        super(QuotaEngineUsageRefreshTestCase, self).setUp()"},{"line_number":2804,"context_line":""},{"line_number":2805,"context_line":"        self.usages_list.append(dict(resource\u003d\u0027server_groups\u0027,"},{"line_number":2806,"context_line":"                     project_id\u003d\u0027test_project\u0027,"},{"line_number":2807,"context_line":"                     user_id\u003d\u0027fake_user\u0027,"},{"line_number":2808,"context_line":"                     in_use\u003d2,"},{"line_number":2809,"context_line":"                     reserved\u003d2,"},{"line_number":2810,"context_line":"                     until_refresh\u003dNone))"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_84007d67","line":2807,"range":{"start_line":2806,"start_character":21,"end_line":2807,"end_character":41},"in_reply_to":"dab17558_27ab3776","updated":"2016-05-11 17:04:11.000000000","message":"Yup.  (I was following what other tests were doing)","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":2819,"context_line":"                     user_id\u003dNone,"},{"line_number":2820,"context_line":"                     in_use\u003d2,"},{"line_number":2821,"context_line":"                     reserved\u003d2,"},{"line_number":2822,"context_line":"                     until_refresh\u003dNone))"},{"line_number":2823,"context_line":""},{"line_number":2824,"context_line":"        self.usages_list[0][\u0027reserved\u0027] \u003d 0"},{"line_number":2825,"context_line":"        self.usages_list[1][\u0027reserved\u0027] \u003d 0"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_cd784fc7","line":2822,"updated":"2016-05-09 23:09:37.000000000","message":"Okay, so the base setUp adds 2 in use each of instances, ram, cores, fixed_ips. Then this adds 2 in use each of server_groups, security_groups, and floating_ips. So there are 7 usages total. And usages_list is what you expect the state to be and usages is the actual state?","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":17139,"name":"Chuck Carmack","email":"carmack@us.ibm.com","username":"ccarmack"},"change_message_id":"8d52da033dca047c8d2c443e71806751a83b821b","unresolved":false,"context_lines":[{"line_number":2819,"context_line":"                     user_id\u003dNone,"},{"line_number":2820,"context_line":"                     in_use\u003d2,"},{"line_number":2821,"context_line":"                     reserved\u003d2,"},{"line_number":2822,"context_line":"                     until_refresh\u003dNone))"},{"line_number":2823,"context_line":""},{"line_number":2824,"context_line":"        self.usages_list[0][\u0027reserved\u0027] \u003d 0"},{"line_number":2825,"context_line":"        self.usages_list[1][\u0027reserved\u0027] \u003d 0"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_5f9e60b9","line":2822,"in_reply_to":"dab17558_cd784fc7","updated":"2016-05-11 17:04:11.000000000","message":"Yes, in the calls to compare_usage(), usages_list is the expected.  There are 7 syncable resources.","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":2827,"context_line":"        self.usages_list[3][\u0027reserved\u0027] \u003d 0"},{"line_number":2828,"context_line":"        self.usages_list[4][\u0027reserved\u0027] \u003d 0"},{"line_number":2829,"context_line":"        self.usages_list[5][\u0027reserved\u0027] \u003d 0"},{"line_number":2830,"context_line":"        self.usages_list[6][\u0027reserved\u0027] \u003d 0"},{"line_number":2831,"context_line":""},{"line_number":2832,"context_line":"        def fake_quota_get_all_by_project_and_user(context, project_id,"},{"line_number":2833,"context_line":"                                                   user_id):"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_ed7d53b2","line":2830,"updated":"2016-05-09 23:09:37.000000000","message":"Here you\u0027re setting all reserved to 0.","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":17139,"name":"Chuck Carmack","email":"carmack@us.ibm.com","username":"ccarmack"},"change_message_id":"8d52da033dca047c8d2c443e71806751a83b821b","unresolved":false,"context_lines":[{"line_number":2827,"context_line":"        self.usages_list[3][\u0027reserved\u0027] \u003d 0"},{"line_number":2828,"context_line":"        self.usages_list[4][\u0027reserved\u0027] \u003d 0"},{"line_number":2829,"context_line":"        self.usages_list[5][\u0027reserved\u0027] \u003d 0"},{"line_number":2830,"context_line":"        self.usages_list[6][\u0027reserved\u0027] \u003d 0"},{"line_number":2831,"context_line":""},{"line_number":2832,"context_line":"        def fake_quota_get_all_by_project_and_user(context, project_id,"},{"line_number":2833,"context_line":"                                                   user_id):"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_6f6d69cb","line":2830,"in_reply_to":"dab17558_ed7d53b2","updated":"2016-05-11 17:04:11.000000000","message":"None of the tests should be changing the reserved, so the expected are set to 0.","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":2862,"context_line":""},{"line_number":2863,"context_line":"    def test_usage_refresh_user_all_keys(self):"},{"line_number":2864,"context_line":"        context \u003d self._init_usages(3, 3, 3, 3, 3, 3, 3,"},{"line_number":2865,"context_line":"                                    until_refresh \u003d 5)"},{"line_number":2866,"context_line":"        quota.QUOTAS.usage_refresh(context, \u0027test_project\u0027, \u0027fake_user\u0027)"},{"line_number":2867,"context_line":""},{"line_number":2868,"context_line":"        self.assertEqual(self.sync_called, set([\u0027instances\u0027, \u0027server_groups\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_680dd136","line":2865,"updated":"2016-05-09 23:09:37.000000000","message":"This is the initial actual state?","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":17139,"name":"Chuck Carmack","email":"carmack@us.ibm.com","username":"ccarmack"},"change_message_id":"8d52da033dca047c8d2c443e71806751a83b821b","unresolved":false,"context_lines":[{"line_number":2862,"context_line":""},{"line_number":2863,"context_line":"    def test_usage_refresh_user_all_keys(self):"},{"line_number":2864,"context_line":"        context \u003d self._init_usages(3, 3, 3, 3, 3, 3, 3,"},{"line_number":2865,"context_line":"                                    until_refresh \u003d 5)"},{"line_number":2866,"context_line":"        quota.QUOTAS.usage_refresh(context, \u0027test_project\u0027, \u0027fake_user\u0027)"},{"line_number":2867,"context_line":""},{"line_number":2868,"context_line":"        self.assertEqual(self.sync_called, set([\u0027instances\u0027, \u0027server_groups\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_cf70d542","line":2865,"in_reply_to":"dab17558_680dd136","updated":"2016-05-11 17:04:11.000000000","message":"Yes, this is initializing the \"database\" usages.","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":2871,"context_line":"        self.usages_list[3][\u0027in_use\u0027] \u003d 3"},{"line_number":2872,"context_line":"        self.usages_list[3][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2873,"context_line":"        self.usages_list[6][\u0027in_use\u0027] \u003d 3"},{"line_number":2874,"context_line":"        self.usages_list[6][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2875,"context_line":"        self.compare_usage(self.usages, self.usages_list)"},{"line_number":2876,"context_line":"        self.assertEqual(self.usages_created, {})"},{"line_number":2877,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_cd268fcd","line":2874,"updated":"2016-05-09 23:09:37.000000000","message":"These are fixed_ips and floating_ips","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":17139,"name":"Chuck Carmack","email":"carmack@us.ibm.com","username":"ccarmack"},"change_message_id":"8d52da033dca047c8d2c443e71806751a83b821b","unresolved":false,"context_lines":[{"line_number":2871,"context_line":"        self.usages_list[3][\u0027in_use\u0027] \u003d 3"},{"line_number":2872,"context_line":"        self.usages_list[3][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2873,"context_line":"        self.usages_list[6][\u0027in_use\u0027] \u003d 3"},{"line_number":2874,"context_line":"        self.usages_list[6][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2875,"context_line":"        self.compare_usage(self.usages, self.usages_list)"},{"line_number":2876,"context_line":"        self.assertEqual(self.usages_created, {})"},{"line_number":2877,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_ef4839ce","line":2874,"in_reply_to":"dab17558_cd268fcd","updated":"2016-05-11 17:04:11.000000000","message":"I will add comments to all these places saying what each index represents.","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":2873,"context_line":"        self.usages_list[6][\u0027in_use\u0027] \u003d 3"},{"line_number":2874,"context_line":"        self.usages_list[6][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2875,"context_line":"        self.compare_usage(self.usages, self.usages_list)"},{"line_number":2876,"context_line":"        self.assertEqual(self.usages_created, {})"},{"line_number":2877,"context_line":""},{"line_number":2878,"context_line":"    def test_usage_refresh_user_two_keys(self):"},{"line_number":2879,"context_line":"        context \u003d self._init_usages(3, 3, 3, 3, 3, 3, 3,"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_081fe55f","line":2876,"updated":"2016-05-09 23:09:37.000000000","message":"This verifies no new usages were created","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":17139,"name":"Chuck Carmack","email":"carmack@us.ibm.com","username":"ccarmack"},"change_message_id":"8d52da033dca047c8d2c443e71806751a83b821b","unresolved":false,"context_lines":[{"line_number":2873,"context_line":"        self.usages_list[6][\u0027in_use\u0027] \u003d 3"},{"line_number":2874,"context_line":"        self.usages_list[6][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2875,"context_line":"        self.compare_usage(self.usages, self.usages_list)"},{"line_number":2876,"context_line":"        self.assertEqual(self.usages_created, {})"},{"line_number":2877,"context_line":""},{"line_number":2878,"context_line":"    def test_usage_refresh_user_two_keys(self):"},{"line_number":2879,"context_line":"        context \u003d self._init_usages(3, 3, 3, 3, 3, 3, 3,"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_cfbe15ad","line":2876,"in_reply_to":"dab17558_081fe55f","updated":"2016-05-11 17:04:11.000000000","message":"Yes","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":2882,"context_line":"        quota.QUOTAS.usage_refresh(context, \u0027test_project\u0027,"},{"line_number":2883,"context_line":"                                   \u0027fake_user\u0027, keys)"},{"line_number":2884,"context_line":""},{"line_number":2885,"context_line":"        self.assertEqual(self.sync_called, set([\u0027instances\u0027, \u0027server_groups\u0027]))"},{"line_number":2886,"context_line":"        # Validation for the resources which will not be sync\u0027d."},{"line_number":2887,"context_line":"        self.usages_list[3][\u0027in_use\u0027] \u003d 3"},{"line_number":2888,"context_line":"        self.usages_list[3][\u0027until_refresh\u0027] \u003d 5"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_a8d97985","line":2885,"updated":"2016-05-09 23:09:37.000000000","message":"So this means if you limit to the \u0027ram\u0027 key, you\u0027ll still get a sync of \u0027instances\u0027 and \u0027cores\u0027 too along with \u0027ram\u0027. I assume that\u0027s intended/normal?","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":17139,"name":"Chuck Carmack","email":"carmack@us.ibm.com","username":"ccarmack"},"change_message_id":"8d52da033dca047c8d2c443e71806751a83b821b","unresolved":false,"context_lines":[{"line_number":2882,"context_line":"        quota.QUOTAS.usage_refresh(context, \u0027test_project\u0027,"},{"line_number":2883,"context_line":"                                   \u0027fake_user\u0027, keys)"},{"line_number":2884,"context_line":""},{"line_number":2885,"context_line":"        self.assertEqual(self.sync_called, set([\u0027instances\u0027, \u0027server_groups\u0027]))"},{"line_number":2886,"context_line":"        # Validation for the resources which will not be sync\u0027d."},{"line_number":2887,"context_line":"        self.usages_list[3][\u0027in_use\u0027] \u003d 3"},{"line_number":2888,"context_line":"        self.usages_list[3][\u0027until_refresh\u0027] \u003d 5"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_2f66c129","line":2885,"in_reply_to":"dab17558_a8d97985","updated":"2016-05-11 17:04:11.000000000","message":"The sync function for ram also syncs instances and cores.\n\nhttps://github.com/openstack/nova/blob/master/nova/quota.py#L1400\n\nand..\n\nhttps://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/api.py#L402","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":2885,"context_line":"        self.assertEqual(self.sync_called, set([\u0027instances\u0027, \u0027server_groups\u0027]))"},{"line_number":2886,"context_line":"        # Validation for the resources which will not be sync\u0027d."},{"line_number":2887,"context_line":"        self.usages_list[3][\u0027in_use\u0027] \u003d 3"},{"line_number":2888,"context_line":"        self.usages_list[3][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2889,"context_line":"        self.usages_list[5][\u0027in_use\u0027] \u003d 3"},{"line_number":2890,"context_line":"        self.usages_list[5][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2891,"context_line":"        self.usages_list[6][\u0027in_use\u0027] \u003d 3"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_882115a2","line":2888,"updated":"2016-05-09 23:09:37.000000000","message":"fixed_ips","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":2887,"context_line":"        self.usages_list[3][\u0027in_use\u0027] \u003d 3"},{"line_number":2888,"context_line":"        self.usages_list[3][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2889,"context_line":"        self.usages_list[5][\u0027in_use\u0027] \u003d 3"},{"line_number":2890,"context_line":"        self.usages_list[5][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2891,"context_line":"        self.usages_list[6][\u0027in_use\u0027] \u003d 3"},{"line_number":2892,"context_line":"        self.usages_list[6][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2893,"context_line":"        self.compare_usage(self.usages, self.usages_list)"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_2878e98e","line":2890,"updated":"2016-05-09 23:09:37.000000000","message":"security_groups","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":2889,"context_line":"        self.usages_list[5][\u0027in_use\u0027] \u003d 3"},{"line_number":2890,"context_line":"        self.usages_list[5][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2891,"context_line":"        self.usages_list[6][\u0027in_use\u0027] \u003d 3"},{"line_number":2892,"context_line":"        self.usages_list[6][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2893,"context_line":"        self.compare_usage(self.usages, self.usages_list)"},{"line_number":2894,"context_line":"        self.assertEqual(self.usages_created, {})"},{"line_number":2895,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_a83699e4","line":2892,"updated":"2016-05-09 23:09:37.000000000","message":"floating_ips","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":2900,"context_line":"        keys \u003d [\u0027ram\u0027]"},{"line_number":2901,"context_line":"        quota.QUOTAS.usage_refresh(context, \u0027test_project\u0027, \u0027fake_user\u0027, keys)"},{"line_number":2902,"context_line":""},{"line_number":2903,"context_line":"        self.assertEqual(self.sync_called, set([\u0027instances\u0027]))"},{"line_number":2904,"context_line":"        self.usages_list[0][\u0027in_use\u0027] \u003d 0"},{"line_number":2905,"context_line":"        self.usages_list[1][\u0027in_use\u0027] \u003d 0"},{"line_number":2906,"context_line":"        self.usages_list[2][\u0027in_use\u0027] \u003d 0"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_e8ff01a8","line":2903,"updated":"2016-05-09 23:09:37.000000000","message":"Again specifying only \u0027ram\u0027 will cascade into \u0027instance\u0027 \u0027cores\u0027 and \u0027ram\u0027","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":17139,"name":"Chuck Carmack","email":"carmack@us.ibm.com","username":"ccarmack"},"change_message_id":"8d52da033dca047c8d2c443e71806751a83b821b","unresolved":false,"context_lines":[{"line_number":2900,"context_line":"        keys \u003d [\u0027ram\u0027]"},{"line_number":2901,"context_line":"        quota.QUOTAS.usage_refresh(context, \u0027test_project\u0027, \u0027fake_user\u0027, keys)"},{"line_number":2902,"context_line":""},{"line_number":2903,"context_line":"        self.assertEqual(self.sync_called, set([\u0027instances\u0027]))"},{"line_number":2904,"context_line":"        self.usages_list[0][\u0027in_use\u0027] \u003d 0"},{"line_number":2905,"context_line":"        self.usages_list[1][\u0027in_use\u0027] \u003d 0"},{"line_number":2906,"context_line":"        self.usages_list[2][\u0027in_use\u0027] \u003d 0"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_2f3401fa","line":2903,"in_reply_to":"dab17558_e8ff01a8","updated":"2016-05-11 17:04:11.000000000","message":"Yup","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":2901,"context_line":"        quota.QUOTAS.usage_refresh(context, \u0027test_project\u0027, \u0027fake_user\u0027, keys)"},{"line_number":2902,"context_line":""},{"line_number":2903,"context_line":"        self.assertEqual(self.sync_called, set([\u0027instances\u0027]))"},{"line_number":2904,"context_line":"        self.usages_list[0][\u0027in_use\u0027] \u003d 0"},{"line_number":2905,"context_line":"        self.usages_list[1][\u0027in_use\u0027] \u003d 0"},{"line_number":2906,"context_line":"        self.usages_list[2][\u0027in_use\u0027] \u003d 0"},{"line_number":2907,"context_line":"        self.compare_usage(self.usages_created, self.usages_list[0:3])"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_a8c0597d","line":2904,"updated":"2016-05-09 23:09:37.000000000","message":"instances","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":2902,"context_line":""},{"line_number":2903,"context_line":"        self.assertEqual(self.sync_called, set([\u0027instances\u0027]))"},{"line_number":2904,"context_line":"        self.usages_list[0][\u0027in_use\u0027] \u003d 0"},{"line_number":2905,"context_line":"        self.usages_list[1][\u0027in_use\u0027] \u003d 0"},{"line_number":2906,"context_line":"        self.usages_list[2][\u0027in_use\u0027] \u003d 0"},{"line_number":2907,"context_line":"        self.compare_usage(self.usages_created, self.usages_list[0:3])"},{"line_number":2908,"context_line":"        self.assertEqual(len(self.usages_created), 3)"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_283bc99d","line":2905,"updated":"2016-05-09 23:09:37.000000000","message":"cores","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":2903,"context_line":"        self.assertEqual(self.sync_called, set([\u0027instances\u0027]))"},{"line_number":2904,"context_line":"        self.usages_list[0][\u0027in_use\u0027] \u003d 0"},{"line_number":2905,"context_line":"        self.usages_list[1][\u0027in_use\u0027] \u003d 0"},{"line_number":2906,"context_line":"        self.usages_list[2][\u0027in_use\u0027] \u003d 0"},{"line_number":2907,"context_line":"        self.compare_usage(self.usages_created, self.usages_list[0:3])"},{"line_number":2908,"context_line":"        self.assertEqual(len(self.usages_created), 3)"},{"line_number":2909,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_6845d115","line":2906,"updated":"2016-05-09 23:09:37.000000000","message":"ram","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":2915,"context_line":"        self.assertEqual(self.sync_called, set([\u0027fixed_ips\u0027, \u0027floating_ips\u0027]))"},{"line_number":2916,"context_line":"        # Validation for the resources which will not be sync\u0027d."},{"line_number":2917,"context_line":"        self.usages_list[0][\u0027in_use\u0027] \u003d 3"},{"line_number":2918,"context_line":"        self.usages_list[0][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2919,"context_line":"        self.usages_list[1][\u0027in_use\u0027] \u003d 3"},{"line_number":2920,"context_line":"        self.usages_list[1][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2921,"context_line":"        self.usages_list[2][\u0027in_use\u0027] \u003d 3"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_482d6d45","line":2918,"updated":"2016-05-09 23:09:37.000000000","message":"instances","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":2917,"context_line":"        self.usages_list[0][\u0027in_use\u0027] \u003d 3"},{"line_number":2918,"context_line":"        self.usages_list[0][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2919,"context_line":"        self.usages_list[1][\u0027in_use\u0027] \u003d 3"},{"line_number":2920,"context_line":"        self.usages_list[1][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2921,"context_line":"        self.usages_list[2][\u0027in_use\u0027] \u003d 3"},{"line_number":2922,"context_line":"        self.usages_list[2][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2923,"context_line":"        self.usages_list[4][\u0027in_use\u0027] \u003d 3"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_2830e99d","line":2920,"updated":"2016-05-09 23:09:37.000000000","message":"cores","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":2919,"context_line":"        self.usages_list[1][\u0027in_use\u0027] \u003d 3"},{"line_number":2920,"context_line":"        self.usages_list[1][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2921,"context_line":"        self.usages_list[2][\u0027in_use\u0027] \u003d 3"},{"line_number":2922,"context_line":"        self.usages_list[2][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2923,"context_line":"        self.usages_list[4][\u0027in_use\u0027] \u003d 3"},{"line_number":2924,"context_line":"        self.usages_list[4][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2925,"context_line":"        self.usages_list[5][\u0027in_use\u0027] \u003d 3"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_682af12d","line":2922,"updated":"2016-05-09 23:09:37.000000000","message":"ram","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":2921,"context_line":"        self.usages_list[2][\u0027in_use\u0027] \u003d 3"},{"line_number":2922,"context_line":"        self.usages_list[2][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2923,"context_line":"        self.usages_list[4][\u0027in_use\u0027] \u003d 3"},{"line_number":2924,"context_line":"        self.usages_list[4][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2925,"context_line":"        self.usages_list[5][\u0027in_use\u0027] \u003d 3"},{"line_number":2926,"context_line":"        self.usages_list[5][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2927,"context_line":"        self.compare_usage(self.usages, self.usages_list)"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_e816e1ef","line":2924,"updated":"2016-05-09 23:09:37.000000000","message":"server_groups","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":2923,"context_line":"        self.usages_list[4][\u0027in_use\u0027] \u003d 3"},{"line_number":2924,"context_line":"        self.usages_list[4][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2925,"context_line":"        self.usages_list[5][\u0027in_use\u0027] \u003d 3"},{"line_number":2926,"context_line":"        self.usages_list[5][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2927,"context_line":"        self.compare_usage(self.usages, self.usages_list)"},{"line_number":2928,"context_line":"        self.assertEqual(self.usages_created, {})"},{"line_number":2929,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_48d44d1f","line":2926,"updated":"2016-05-09 23:09:37.000000000","message":"security_groups","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":2937,"context_line":"        self.assertEqual(self.sync_called, set([\u0027floating_ips\u0027]))"},{"line_number":2938,"context_line":"        # Validation for the resources which will not be sync\u0027d."},{"line_number":2939,"context_line":"        self.usages_list[0][\u0027in_use\u0027] \u003d 3"},{"line_number":2940,"context_line":"        self.usages_list[0][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2941,"context_line":"        self.usages_list[1][\u0027in_use\u0027] \u003d 3"},{"line_number":2942,"context_line":"        self.usages_list[1][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2943,"context_line":"        self.usages_list[2][\u0027in_use\u0027] \u003d 3"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_68e151fe","line":2940,"updated":"2016-05-09 23:09:37.000000000","message":"instances","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":2939,"context_line":"        self.usages_list[0][\u0027in_use\u0027] \u003d 3"},{"line_number":2940,"context_line":"        self.usages_list[0][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2941,"context_line":"        self.usages_list[1][\u0027in_use\u0027] \u003d 3"},{"line_number":2942,"context_line":"        self.usages_list[1][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2943,"context_line":"        self.usages_list[2][\u0027in_use\u0027] \u003d 3"},{"line_number":2944,"context_line":"        self.usages_list[2][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2945,"context_line":"        self.usages_list[3][\u0027in_use\u0027] \u003d 3"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_c8e83de5","line":2942,"updated":"2016-05-09 23:09:37.000000000","message":"cores","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":2941,"context_line":"        self.usages_list[1][\u0027in_use\u0027] \u003d 3"},{"line_number":2942,"context_line":"        self.usages_list[1][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2943,"context_line":"        self.usages_list[2][\u0027in_use\u0027] \u003d 3"},{"line_number":2944,"context_line":"        self.usages_list[2][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2945,"context_line":"        self.usages_list[3][\u0027in_use\u0027] \u003d 3"},{"line_number":2946,"context_line":"        self.usages_list[3][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2947,"context_line":"        self.usages_list[4][\u0027in_use\u0027] \u003d 3"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_a8e33904","line":2944,"updated":"2016-05-09 23:09:37.000000000","message":"ram","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":2943,"context_line":"        self.usages_list[2][\u0027in_use\u0027] \u003d 3"},{"line_number":2944,"context_line":"        self.usages_list[2][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2945,"context_line":"        self.usages_list[3][\u0027in_use\u0027] \u003d 3"},{"line_number":2946,"context_line":"        self.usages_list[3][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2947,"context_line":"        self.usages_list[4][\u0027in_use\u0027] \u003d 3"},{"line_number":2948,"context_line":"        self.usages_list[4][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2949,"context_line":"        self.usages_list[5][\u0027in_use\u0027] \u003d 3"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_e8ed41f0","line":2946,"updated":"2016-05-09 23:09:37.000000000","message":"fixed_ips","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":2945,"context_line":"        self.usages_list[3][\u0027in_use\u0027] \u003d 3"},{"line_number":2946,"context_line":"        self.usages_list[3][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2947,"context_line":"        self.usages_list[4][\u0027in_use\u0027] \u003d 3"},{"line_number":2948,"context_line":"        self.usages_list[4][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2949,"context_line":"        self.usages_list[5][\u0027in_use\u0027] \u003d 3"},{"line_number":2950,"context_line":"        self.usages_list[5][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2951,"context_line":"        self.compare_usage(self.usages, self.usages_list)"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_48bbade5","line":2948,"updated":"2016-05-09 23:09:37.000000000","message":"server_groups","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f30d73399c127e1586fa15eefb30c2cc7bd29f56","unresolved":false,"context_lines":[{"line_number":2947,"context_line":"        self.usages_list[4][\u0027in_use\u0027] \u003d 3"},{"line_number":2948,"context_line":"        self.usages_list[4][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2949,"context_line":"        self.usages_list[5][\u0027in_use\u0027] \u003d 3"},{"line_number":2950,"context_line":"        self.usages_list[5][\u0027until_refresh\u0027] \u003d 5"},{"line_number":2951,"context_line":"        self.compare_usage(self.usages, self.usages_list)"},{"line_number":2952,"context_line":"        self.assertEqual(self.usages_created, {})"},{"line_number":2953,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_68b831e6","line":2950,"updated":"2016-05-09 23:09:37.000000000","message":"security_groups","commit_id":"3d137b558769bc598dd76983778e9c03800d70ec"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"518a95d8e6150a3492f491cac2f10d5cd20e2aa5","unresolved":false,"context_lines":[{"line_number":3056,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":3057,"context_line":"        self._test_exception(ctxt, \u0027test_project\u0027, None, [\u0027injected_files\u0027])"},{"line_number":3058,"context_line":""},{"line_number":3059,"context_line":"    def test_usage_refresh_invalid_context(self):"},{"line_number":3060,"context_line":"        # The project_id must be set in the context,"},{"line_number":3061,"context_line":"        # or passed as a parameter."},{"line_number":3062,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":3063,"context_line":"        try:"},{"line_number":3064,"context_line":"            quota.QUOTAS.usage_refresh(ctxt, None, None, None)"},{"line_number":3065,"context_line":"        except exception.InvalidInput as e:"},{"line_number":3066,"context_line":"            self.assertIn(\u0027project_id\u0027, e.format_message())"},{"line_number":3067,"context_line":"        else:"},{"line_number":3068,"context_line":"            self.fail(\u0027Expected InvalidInput failure\u0027)"},{"line_number":3069,"context_line":""},{"line_number":3070,"context_line":""},{"line_number":3071,"context_line":"class NoopQuotaDriverTestCase(test.TestCase):"}],"source_content_type":"text/x-python","patch_set":6,"id":"bab6814e_e224ef60","line":3068,"range":{"start_line":3059,"start_character":4,"end_line":3068,"end_character":54},"updated":"2016-05-27 02:20:24.000000000","message":"As mentioned earlier, this isn\u0027t needed IMHO. We should be able to assume the context is valid if a caller is calling with a context only.","commit_id":"b8af6010b3e3927245fbee857d4b8ecffa2584e6"}]}
