def update_quotas(nova, project_id, compute_quotas):
    """
    Updates the compute quotas for a given project
    :param nova: the Nova client
    :param project_id: the project's ID that requires quota updates
    :param compute_quotas: an object of type ComputeQuotas containing the
                           values to update
    :return:
    """
    update_values = dict()
    update_values['metadata_items'] = compute_quotas.metadata_items
    update_values['cores'] = compute_quotas.cores
    update_values['instances'] = compute_quotas.instances
    update_values['injected_files'] = compute_quotas.injected_files
    update_values['injected_file_content_bytes'
        ] = compute_quotas.injected_file_content_bytes
    update_values['ram'] = compute_quotas.ram
    update_values['fixed_ips'] = compute_quotas.fixed_ips
    update_values['key_pairs'] = compute_quotas.key_pairs
    return nova.quotas.update(project_id, **update_values)
