Previous topic

The cinder.tests.test_policy Module

Next topic

The cinder.tests.test_rbd Module

This Page

Psst... hey. You're reading the latest content, but it might be out of sync with code. You can read Cinder 2011.2 docs or all OpenStack docs too.

The cinder.tests.test_quota Module

class BaseResourceTestCase(methodName='runTest')

Bases: cinder.test.TestCase

test_no_flag()
test_quota_no_project_no_class()
test_quota_no_project_with_class()
test_quota_override_project_with_class()
test_quota_with_project_no_class()
test_quota_with_project_override_class()
test_quota_with_project_with_class()
test_with_flag()
test_with_flag_no_quota()
class DbQuotaDriverTestCase(methodName='runTest')

Bases: cinder.test.TestCase

setUp()
tearDown()
test_destroy_by_project()
test_get_class_quotas()
test_get_class_quotas_no_defaults()
test_get_defaults()
test_get_project_quotas()
test_get_project_quotas_alt_context_no_class()
test_get_project_quotas_alt_context_with_class()
test_get_project_quotas_no_defaults()
test_get_project_quotas_no_usages()
test_get_quotas_has_sync()
test_get_quotas_has_sync_no_sync_resource()
test_get_quotas_has_sync_unknown()
test_get_quotas_no_sync_has_sync_resource()
test_get_quotas_no_sync_unknown()
test_reserve_bad_expire()
test_reserve_datetime_expire()
test_reserve_default_expire()
test_reserve_int_expire()
test_reserve_max_age()
test_reserve_timedelta_expire()
test_reserve_until_refresh()
class FakeContext(project_id, quota_class)

Bases: object

elevated()
class FakeDriver(by_project=None, by_class=None, reservations=None)

Bases: object

commit(context, reservations)
destroy_all_by_project(context, project_id)
expire(context)
get_by_class(context, quota_class, resource)
get_by_project(context, project_id, resource)
get_class_quotas(context, resources, quota_class, defaults=True)
get_defaults(context, resources)
get_project_quotas(context, resources, project_id, quota_class=None, defaults=True, usages=True)
limit_check(context, resources, values)
reserve(context, resources, deltas, expire=None)
rollback(context, reservations)
class FakeSession

Bases: object

begin()
class FakeUsage(**kwargs)

Bases: cinder.db.sqlalchemy.models.QuotaUsage

created_at
deleted
deleted_at
id
in_use
project_id
reserved
resource
save(*args, **kwargs)
until_refresh
updated_at
class QuotaEngineTestCase(methodName='runTest')

Bases: cinder.test.TestCase

test_commit()
test_count()
test_count_no_resource()
test_count_wrong_resource()
test_destroy_all_by_project()
test_expire()
test_get_by_class()
test_get_by_project()
test_get_class_quotas()
test_get_defaults()
test_get_project_quotas()
test_init()
test_init_override_obj()
test_init_override_string()
test_limit_check()
test_register_resource()
test_register_resources()
test_reserve()
test_resources()
test_rollback()
test_sync_multi()
test_sync_predeclared()
class QuotaIntegrationTestCase(methodName='runTest')

Bases: cinder.test.TestCase

setUp()
tearDown()
test_too_many_gigabytes()
test_too_many_volumes()
class QuotaReserveSqlAlchemyTestCase(methodName='runTest')

Bases: cinder.test.TestCase

compare_reservation(reservations, expected)
compare_usage(usage_dict, expected)
init_usage(project_id, resource, in_use, reserved, until_refresh=None, created_at=None, updated_at=None)
setUp()
test_quota_reserve_create_usages()
test_quota_reserve_max_age()
test_quota_reserve_negative_in_use()
test_quota_reserve_no_refresh()
test_quota_reserve_overs()
test_quota_reserve_reduction()
test_quota_reserve_unders()
test_quota_reserve_until_refresh()