¡@

Home 

OpenStack Study: glance

OpenStack Index

Previous

Next

    def test_list_with_last_marker(self):

    def test_limited_list(self):

    def test_list_with_marker_and_limit(self):

    def test_list_private_images(self):

    def test_list_with_checksum_filter_single_image(self):

    def test_list_with_checksum_filter_multiple_images(self):

    def test_list_with_wrong_checksum(self):

    def test_list_with_tags_filter_single_tag(self):

    def test_list_with_tags_filter_multiple_tags(self):

    def test_list_with_tags_filter_multiple_tags_and_nonexistent(self):

    def test_list_with_wrong_tags(self):

    def test_list_public_images(self):

    def test_sorted_list(self):

    def test_add_image(self):

    def test_save_image(self):

    def test_save_image_not_found(self):

    def test_remove_image(self):

    def test_remove_image_not_found(self):

class TestEncryptedLocations(test_utils.BaseTestCase):

    def setUp(self):

    def test_encrypt_locations_on_add(self):

    def test_encrypt_locations_on_save(self):

    def test_decrypt_locations_on_get(self):

    def test_decrypt_locations_on_list(self):

class TestImageMemberRepo(test_utils.BaseTestCase):

    def setUp(self):

    def _create_images(self):

    def _create_image_members(self):

    def test_list(self):

    def test_list_no_members(self):

    def test_save_image_member(self):

    def test_add_image_member(self):

    def test_add_duplicate_image_member(self):

    def test_get_image_member(self):

    def test_get_nonexistent_image_member(self):

    def test_remove_image_member(self):

    def test_remove_image_member_does_not_exist(self):

class TestTaskRepo(test_utils.BaseTestCase):

    def setUp(self):

    def _create_tasks(self):

    def test_get(self):

    def test_get_not_found(self):

    def test_get_forbidden(self):

    def test_list(self):

    def test_list_with_type(self):

    def test_list_with_status(self):

    def test_list_with_marker(self):

    def test_list_with_last_marker(self):

    def test_limited_list(self):

    def test_list_with_marker_and_limit(self):

    def test_sorted_list(self):

    def test_add_task(self):

    def test_save_task(self):

    def test_remove_task(self):

\OpenStack\glance-2014.1\glance\tests\unit\test_domain.py

class TestImageFactory(test_utils.BaseTestCase):

    def setUp(self):

    def test_minimal_new_image(self):

    def test_new_image(self):

    def test_new_image_with_extra_properties_and_tags(self):

    def test_new_image_read_only_property(self):

    def test_new_image_unexpected_property(self):

    def test_new_image_reserved_property(self):

class TestImage(test_utils.BaseTestCase):

    def setUp(self):

    def test_extra_properties(self):

    def test_extra_properties_assign(self):

    def test_delete_extra_properties(self):

    def test_visibility_enumerated(self):

    def test_tags_always_a_set(self):

    def test_delete_protected_image(self):

    def test_status_saving(self):

    def test_status_saving_without_disk_format(self):

    def test_status_saving_without_container_format(self):

    def test_status_active_without_disk_format(self):

    def test_status_active_without_container_format(self):

    def test_delayed_delete(self):

class TestImageMember(test_utils.BaseTestCase):

    def setUp(self):

    def test_status_enumerated(self):

class TestImageMemberFactory(test_utils.BaseTestCase):

    def setUp(self):

    def test_minimal_new_image_member(self):

class TestExtraProperties(test_utils.BaseTestCase):

    def test_getitem(self):

    def test_getitem_with_no_items(self):

    def test_setitem(self):

    def test_delitem(self):

    def test_len_with_zero_items(self):

    def test_len_with_non_zero_items(self):

    def test_eq_with_a_dict(self):

    def test_eq_with_an_object_of_ExtraProperties(self):

    def test_eq_with_uneqal_dict(self):

    def test_eq_with_unequal_ExtraProperties_object(self):

    def test_eq_with_incompatible_object(self):

class TestTaskFactory(test_utils.BaseTestCase):

    def setUp(self):

    def test_new_task(self):

    def test_new_task_invalid_type(self):

    def test_new_task_details(self):

class TestTask(test_utils.BaseTestCase):

    def setUp(self):

    def test_task_invalid_status(self):

    def test_validate_status_transition_from_pending(self):

    def test_validate_status_transition_from_processing_to_success(self):

    def test_validate_status_transition_from_processing_to_failure(self):

    def test_invalid_status_transitions_from_pending(self):

    def test_invalid_status_transitions_from_success(self):

    def test_invalid_status_transitions_from_failure(self):

    def test_begin_processing(self):

    def test_succeed(self, mock_utcnow):

    def test_fail(self, mock_utcnow):

class TestTaskDetails(test_utils.BaseTestCase):

    def setUp(self):

    def test_task_details_init(self):

    def test_task_details_with_no_task_id(self):

\OpenStack\glance-2014.1\glance\tests\unit\test_domain_proxy.py

class FakeProxy(object):

    def __init__(self, base, *args, **kwargs):

class FakeRepo(object):

    def __init__(self, result=None):

    def fake_method(self, *args, **kwargs):

class TestProxyRepoPlain(test_utils.BaseTestCase):

    def setUp(self):

    def _test_method(self, name, base_result, *args, **kwargs):

    def test_get(self):

    def test_list(self):

    def test_add(self):

    def test_save(self):

    def test_remove(self):

class TestProxyRepoWrapping(test_utils.BaseTestCase):

    def setUp(self):

    def _test_method(self, name, base_result, *args, **kwargs):

    def test_get(self):

    def test_list(self):

    def _test_method_with_proxied_argument(self, name, result):

    def test_add(self):

    def test_add_with_no_result(self):

    def test_save(self):

    def test_save_with_no_result(self):

    def test_remove(self):

    def test_remove_with_no_result(self):

class FakeImageFactory(object):

    def __init__(self, result=None):

    def new_image(self, **kwargs):

class TestImageFactory(test_utils.BaseTestCase):

    def setUp(self):

    def test_proxy_plain(self):

    def test_proxy_wrapping(self):

class FakeImageMembershipFactory(object):

    def __init__(self, result=None):

    def new_image_member(self, image, member_id):

class TestImageMembershipFactory(test_utils.BaseTestCase):

    def setUp(self):

    def test_proxy_plain(self):

    def test_proxy_wrapped_membership(self):

    def test_proxy_wrapped_image(self):

    def test_proxy_both_wrapped(self):

class FakeImage(object):

    def __init__(self, result=None):

    def get_member_repo(self):

class TestImage(test_utils.BaseTestCase):

    def setUp(self):

    def test_normal_member_repo(self):

    def test_proxied_member_repo(self):

class TestTaskFactory(test_utils.BaseTestCase):

    def setUp(self):

    def test_proxy_plain(self):

    def test_proxy_wrapping(self):

\OpenStack\glance-2014.1\glance\tests\unit\test_filesystem_store.py

class TestStore(base.IsolatedUnitTest):

    def setUp(self):

    def tearDown(self):

    def test_configure_add_single_datadir(self):

    def test_configure_add_with_single_and_multi_datadirs(self):

    def test_configure_add_without_single_and_multi_datadirs(self):

    def test_configure_add_with_multi_datadirs(self):

    def test_configure_add_invalid_priority(self):

    def test_configure_add_same_dir_multiple_times(self):

    def test_configure_add_with_empty_datadir_path(self):

    def test_configure_add_with_readonly_datadir_path(self):

    def test_get(self):

    def test_get_non_existing(self):

    def test_add(self):

    def test_add_with_multiple_dirs(self):

    def test_add_with_multiple_dirs_storage_full(self):

        def fake_get_capacity_info(mount_point):

    def test_add_check_metadata_success(self):

    def test_add_check_metadata_bad_data(self):

    def test_add_check_metadata_bad_nosuch_file(self):

    def test_add_already_existing(self):

    def _do_test_add_write_failure(self, errno, exception):

    def test_add_storage_full(self):

    def test_add_file_too_big(self):

    def test_add_storage_write_denied(self):

    def test_add_other_failure(self):

    def test_add_cleanup_on_read_failure(self):

        def fake_Error(size):

    def test_delete(self):

    def test_delete_non_existing(self):

\OpenStack\glance-2014.1\glance\tests\unit\test_glance_replicator.py

class FakeHTTPConnection(object):

    def __init__(self):

    def prime_request(self, method, url, in_body, in_headers, out_code, out_body, out_headers):

    def request(self, method, url, body, headers):

    def getresponse(self):

class ImageServiceTestCase(test_utils.BaseTestCase):

    def test_rest_errors(self):

    def test_rest_get_images(self):

    def test_rest_get_image(self):

    def test_rest_header_list_to_dict(self):

    def test_rest_get_image_meta(self):

    def test_rest_dict_to_headers(self):

    def test_rest_add_image(self):

    def test_rest_add_image_meta(self):

class FakeHttpResponse(object):

    def __init__(self, headers, data):

    def getheaders(self):

    def read(self, amt=None):

class FakeImageService(object):

    def __init__(self, http_conn, authtoken):

    def get_images(self):

    def get_image(self, id):

    def get_image_meta(self, id):

    def add_image_meta(self, meta):

    def add_image(self, meta, data):

def get_image_service():

def check_no_args(command, args):

def check_bad_args(command, args):

class ReplicationCommandsTestCase(test_utils.BaseTestCase):

    def test_replication_size(self):

    def test_replication_size_with_no_args(self):

    def test_replication_size_with_bad_args(self):

    def test_replication_dump(self):

    def test_replication_dump_with_no_args(self):

    def test_replication_dump_with_bad_args(self):

    def test_replication_load(self):

        def write_image(img, data):

    def test_replication_load_with_no_args(self):

    def test_replication_load_with_bad_args(self):

    def test_replication_livecopy(self):

    def test_replication_livecopy_with_no_args(self):

    def test_replication_livecopy_with_bad_args(self):

    def test_replication_compare(self):

    def test_replication_compare_with_no_args(self):

    def test_replication_compare_with_bad_args(self):

class ReplicationUtilitiesTestCase(test_utils.BaseTestCase):

    def test_check_upload_response_headers(self):

    def test_image_present(self):

    def test_dict_diff(self):

\OpenStack\glance-2014.1\glance\tests\unit\test_gridfs_store.py

def stub_out_gridfs(stubs):

class TestStore(base.StoreClearingUnitTest):

    def setUp(self):

    def test_cleanup_when_add_image_exception(self):

\OpenStack\glance-2014.1\glance\tests\unit\test_http_store.py

def stub_out_http_backend(stubs):

 def fake_get_conn_class(self, *args, **kwargs):

def stub_out_registry_image_update(stubs):

 def fake_image_update(ctx, image_id, values, purge_props=False):

class TestHttpStore(base.StoreClearingUnitTest):

    def setUp(self):

    def test_http_get(self):

    def test_http_get_redirect(self):

    def test_http_get_max_redirects(self):

    def test_http_get_redirect_invalid(self):

    def test_http_get_not_found(self):

    def test_https_get(self):

    def test_http_delete_raise_error(self):

    def test_http_schedule_delete_swallows_error(self):

\OpenStack\glance-2014.1\glance\tests\unit\test_image_cache.py

class ImageCacheTestCase(object):

    def _setup_fixture_file(self):

    def test_is_cached(self):

    def test_read(self):

    def test_open_for_read(self):

    def test_get_image_size(self):

    def test_delete(self):

    def test_delete_all(self):

    def test_clean_stalled(self):

    def test_clean_stalled_nonzero_stall_time(self):

    def test_prune(self):

    def test_prune_to_zero(self):

    def test_queue(self):

    def test_open_for_write_good(self):

    def test_open_for_write_with_exception(self):

    def test_caching_iterator(self):

        def consume(image_id):

    def test_caching_iterator_handles_backend_failure(self):

        def faulty_backend():

        def consume(image_id):

    def test_caching_iterator_falloffend(self):

        def falloffend(image_id):

    def test_gate_caching_iter_good_checksum(self):

    def test_gate_caching_iter_fs_chunked_file(self):

    def test_gate_caching_iter_s3_chunked_file(self):

    def test_gate_caching_iter_bad_checksum(self):

        def reader():

class TestImageCacheXattr(test_utils.BaseTestCase, ImageCacheTestCase):

    def setUp(self):

class TestImageCacheSqlite(test_utils.BaseTestCase, ImageCacheTestCase):

    def setUp(self):

class TestImageCacheNoDep(test_utils.BaseTestCase):

    def setUp(self):

        def init_driver(self2):

    def test_get_caching_iter_when_write_fails(self):

    def test_get_caching_iter_when_open_fails(self):

\OpenStack\glance-2014.1\glance\tests\unit\test_image_cache_client.py

class CacheClientTestCase(utils.BaseTestCase):

    def setUp(self):

    def test_delete_cached_image(self):

    def test_get_cached_images(self):

    def test_get_queued_images(self):

    def test_delete_all_cached_images(self):

    def test_queue_image_for_caching(self):

    def test_delete_queued_image(self):

    def test_delete_all_queued_images(self):

class GetClientTestCase(utils.BaseTestCase):

    def setUp(self):

    def test_get_client_host_only(self):

    def test_get_client_all_creds(self):

    def test_get_client_client_configuration_error(self):

\OpenStack\glance-2014.1\glance\tests\unit\test_manage.py

class TestManageBase(testtools.TestCase):

    def setUp(self):

        def clear_conf():

    def _main_test_helper(self, argv, func_name=None, *exp_args, **exp_kwargs):

class TestLegacyManage(TestManageBase):

    def test_legacy_db_version(self):

    def test_legacy_db_sync(self):

    def test_legacy_db_upgrade(self):

    def test_legacy_db_version_control(self):

    def test_legacy_db_sync_version(self):

    def test_legacy_db_upgrade_version(self):

    def test_legacy_db_downgrade_version(self):

    def test_legacy_db_sync_version_without_sanity_check(self):

    def test_legacy_db_upgrade_version_without_sanity_check(self):

    def test_legacy_db_downgrade_version_without_sanity_check(self):

class TestManage(TestManageBase):

    def test_db_version(self):

    def test_db_sync(self):

    def test_db_upgrade(self):

    def test_db_version_control(self):

    def test_db_sync_version(self):

    def test_db_upgrade_version(self):

    def test_db_downgrade_version(self):

    def test_db_sync_version_without_sanity_check(self):

    def test_db_upgrade_version_without_sanity_check(self):

    def test_db_downgrade_version_without_sanity_check(self):

\OpenStack\glance-2014.1\glance\tests\unit\test_migrations.py

def _get_connect_string(backend, user="openstack_citest", passwd="openstack_citest", database="openstack_citest"):

def _is_backend_avail(backend, user="openstack_citest", passwd="openstack_citest", database="openstack_citest"):

def _have_mysql():

def get_table(engine, name):

class TestMigrations(test_utils.BaseTestCase):

    def setUp(self):

    def tearDown(self):

    def _reset_databases(self):

        def execute_cmd(cmd=None):

    def test_walk_versions(self):

    def test_mysql_connect_fail(self):

    def test_mysql_opportunistically(self):

    def test_postgresql_connect_fail(self):

    def test_postgresql_opportunistically(self):

    def _walk_versions(self, engine=None, snake_walk=False, downgrade=True, initial_version=None):

        def db_version():

    def _migrate_down(self, engine, version, with_data=False):

    def _migrate_up(self, engine, version, with_data=False):

    def _create_unversioned_001_db(self, engine):

    def test_version_control_existing_db(self):

    def _pre_upgrade_003(self, engine):

    def _check_003(self, engine, data):

    def _pre_upgrade_004(self, engine):

    def _check_004(self, engine, data):

    def _pre_upgrade_005(self, engine):

    def _check_005(self, engine, data):

    def _pre_upgrade_006(self, engine):

    def _check_006(self, engine, data):

    def _pre_upgrade_010(self, engine):

    def _check_010(self, engine, data):

    def _pre_upgrade_012(self, engine):

    def _check_012(self, engine, test_data):

    def _post_downgrade_012(self, engine):

    def _assert_invalid_swift_uri_raises_bad_store_uri(self, legacy_parse_uri_fn):

    def test_legacy_parse_swift_uri_015(self):

    def _pre_upgrade_015(self, engine):

    def _check_015(self, engine, data):

    def _pre_upgrade_016(self, engine):

    def _check_016(self, engine, data):

    def test_legacy_parse_swift_uri_017(self):

    def _pre_upgrade_017(self, engine):

    def _check_017(self, engine, data):

    def _pre_upgrade_019(self, engine):

    def _check_019(self, engine, data):

    def _check_020(self, engine, data):

    def _pre_upgrade_026(self, engine):

    def _check_026(self, engine, data):

    def _check_027(self, engine, data):

    def _check_028(self, engine, data):

    def _post_downgrade_028(self, engine):

    def _pre_upgrade_029(self, engine):

    def _check_029(self, engine, data):

    def _post_downgrade_029(self, engine):

    def _check_030(self, engine, data):

    def _post_downgrade_030(self, engine):

    def _pre_upgrade_031(self, engine):

    def _check_031(self, engine, image_id):

    def _pre_upgrade_032(self, engine):

    def _check_032(self, engine, data):

    def _post_downgrade_032(self, engine):

    def _pre_upgrade_033(self, engine):

    def _check_033(self, engine, data):

    def _post_downgrade_033(self, engine):

    def _pre_upgrade_034(self, engine):

    def _check_034(self, engine, data):

    def _post_downgrade_034(self, engine):

\OpenStack\glance-2014.1\glance\tests\unit\test_misc.py

class UtilsTestCase(test_utils.BaseTestCase):

    def test_encryption(self):

    def test_empty_metadata_headers(self):

\OpenStack\glance-2014.1\glance\tests\unit\test_notifier.py

class ImageStub(glance.domain.Image):

    def get_data(self):

    def set_data(self, data, size=None):

class ImageRepoStub(object):

    def remove(self, *args, **kwargs):

    def save(self, *args, **kwargs):

    def add(self, *args, **kwargs):

    def get(self, *args, **kwargs):

    def list(self, *args, **kwargs):

class TaskStub(glance.domain.Task):

    def run(self, executor):

    def succeed(self, result):

    def fail(self, message):

class TaskRepoStub(object):

    def remove(self, *args, **kwargs):

    def save(self, *args, **kwargs):

    def add(self, *args, **kwargs):

    def get(self, *args, **kwargs):

    def list(self, *args, **kwargs):

class TestNotifier(utils.BaseTestCase):

    def test_load_rabbit(self):

    def test_load_qpid(self):

    def test_notifier_strategy(self):

    def test_transport_url(self):

    def test_notification_driver_option(self):

class TestImageNotifications(utils.BaseTestCase):

    def setUp(self):

    def test_image_save_notification(self):

    def test_image_add_notification(self):

    def test_image_delete_notification(self):

    def test_image_get(self):

    def test_image_list(self):

    def test_image_get_data_notification(self):

    def test_image_get_data_size_mismatch(self):

    def test_image_set_data_prepare_notification(self):

        def data_iterator():

    def test_image_set_data_upload_and_activate_notification(self):

        def data_iterator():

    def test_image_set_data_storage_full(self):

        def data_iterator():

    def test_image_set_data_value_error(self):

        def data_iterator():

    def test_image_set_data_duplicate(self):

        def data_iterator():

    def test_image_set_data_storage_write_denied(self):

        def data_iterator():

    def test_image_set_data_forbidden(self):

        def data_iterator():

    def test_image_set_data_not_found(self):

        def data_iterator():

    def test_image_set_data_HTTP_error(self):

        def data_iterator():

    def test_image_set_data_error(self):

        def data_iterator():

class TestTaskNotifications(utils.BaseTestCase):

    def setUp(self):

    def tearDown(self):

    def test_task_create_notification(self):

    def test_task_delete_notification(self):

    def test_task_run_notification(self):

    def test_task_processing_notification(self):

    def test_task_success_notification(self):

    def test_task_failure_notification(self):

\OpenStack\glance-2014.1\glance\tests\unit\test_policy.py

class ImageRepoStub(object):

    def get(self, *args, **kwargs):

    def save(self, *args, **kwargs):

    def add(self, *args, **kwargs):

    def list(self, *args, **kwargs):

class ImageStub(object):

    def __init__(self, image_id, visibility='private'):

    def delete(self):

class ImageFactoryStub(object):

    def new_image(self, image_id=None, name=None, visibility='private', min_disk=0, min_ram=0, protected=False, owner=None, disk_format=None, container_format=None, extra_properties=None, tags=None, **other_args):

class MemberRepoStub(object):

    def add(self, image_member):

    def get(self, *args, **kwargs):

    def save(self, image_member):

    def list(self, *args, **kwargs):

    def remove(self, image_member):

class ImageMembershipStub(object):

    def __init__(self, output=None):

class TaskRepoStub(object):

    def get_task_and_details(self, *args, **kwargs):

    def add(self, *args, **kwargs):

    def list_tasks(self, *args, **kwargs):

class TaskStub(object):

    def __init__(self, task_id):

    def run(self, executor):

class TaskFactoryStub(object):

    def new_task(self, *args):

class TestPolicyEnforcer(base.IsolatedUnitTest):

    def test_policy_file_default_rules_default_location(self):

    def test_policy_file_custom_rules_default_location(self):

    def test_policy_file_custom_location(self):

    def test_policy_file_check(self):

class TestPolicyEnforcerNoFile(base.IsolatedUnitTest):

    def test_policy_file_specified_but_not_found(self):

    def test_policy_file_default_not_found(self):

        def fake_find_file(self, name):

class TestImagePolicy(test_utils.BaseTestCase):

    def setUp(self):

    def test_publicize_image_not_allowed(self):

    def test_publicize_image_allowed(self):

    def test_delete_image_not_allowed(self):

    def test_delete_image_allowed(self):

    def test_get_image_not_allowed(self):

    def test_get_image_allowed(self):

    def test_get_images_not_allowed(self):

    def test_get_images_allowed(self):

    def test_modify_image_not_allowed(self):

    def test_modify_image_allowed(self):

    def test_add_image_not_allowed(self):

    def test_add_image_allowed(self):

    def test_new_image_visibility(self):

    def test_new_image_visibility_public_allowed(self):

    def test_image_get_data(self):

    def test_image_set_data(self):

class TestMemberPolicy(test_utils.BaseTestCase):

    def setUp(self):

    def test_add_member_not_allowed(self):

    def test_add_member_allowed(self):

    def test_get_member_not_allowed(self):

    def test_get_member_allowed(self):

    def test_modify_member_not_allowed(self):

    def test_modify_member_allowed(self):

    def test_get_members_not_allowed(self):

    def test_get_members_allowed(self):

    def test_delete_member_not_allowed(self):

    def test_delete_member_allowed(self):

class TestTaskPolicy(test_utils.BaseTestCase):

    def setUp(self):

    def test_get_task_not_allowed(self):

    def test_get_task_allowed(self):

    def test_get_tasks_not_allowed(self):

    def test_get_tasks_allowed(self):

    def test_add_task_not_allowed(self):

    def test_add_task_allowed(self):

class TestContextPolicyEnforcer(base.IsolatedUnitTest):

    def _do_test_policy_influence_context_admin(self, policy_admin_role, context_role, context_is_admin, admin_expected):

    def test_context_admin_policy_admin(self):

    def test_context_nonadmin_policy_admin(self):

    def test_context_admin_policy_nonadmin(self):

    def test_context_nonadmin_policy_nonadmin(self):

\OpenStack\glance-2014.1\glance\tests\unit\test_quota.py

class FakeContext(object):

class FakeImage(object):

    def set_data(self, data, size=None):

class TestImageQuota(test_utils.BaseTestCase):

    def setUp(self):

    def tearDown(self):

    def _get_image(self, location_count=1, image_size=10):

    def test_quota_allowed(self):

    def _quota_exceeded_size(self, quota, data, deleted=True, size=None):

    def test_quota_exceeded_no_size(self):

    def test_quota_exceeded_with_right_size(self):

    def test_quota_exceeded_with_lie_size(self):

    def test_append_location(self):

    def test_insert_location(self):

    def test_extend_location(self):

    def test_iadd_location(self):

    def test_set_location(self):

    def _make_image_with_quota(self, image_size=10, location_count=2):

    def test_exceed_append_location(self):

    def test_exceed_insert_location(self):

    def test_exceed_extend_location(self):

    def test_set_location_under(self):

    def test_set_location_exceed(self):

    def test_iadd_location_exceed(self):

    def test_append_location_for_queued_image(self):

    def test_insert_location_for_queued_image(self):

    def test_set_location_for_queued_image(self):

    def test_iadd_location_for_queued_image(self):

class TestImagePropertyQuotas(test_utils.BaseTestCase):

    def setUp(self):

    def test_save_image_with_image_property(self):

    def test_save_image_too_many_image_properties(self):

    def test_save_image_unlimited_image_properties(self):

    def test_add_image_with_image_property(self):

    def test_add_image_too_many_image_properties(self):

    def test_add_image_unlimited_image_properties(self):

class TestImageTagQuotas(test_utils.BaseTestCase):

    def setUp(self):

    def test_replace_image_tag(self):

    def test_replace_too_many_image_tags(self):

    def test_replace_unlimited_image_tags(self):

    def test_add_image_tag(self):

    def test_add_too_many_image_tags(self):

    def test_add_unlimited_image_tags(self):

    def test_remove_image_tag_while_over_quota(self):

class TestQuotaImageTagsProxy(test_utils.BaseTestCase):

    def setUp(self):

    def test_add(self):

    def test_add_too_many_tags(self):

    def test_equals(self):

    def test_contains(self):

    def test_len(self):

    def test_iter(self):

class TestImageMemberQuotas(test_utils.BaseTestCase):

    def setUp(self):

    def test_new_image_member(self):

    def test_new_image_member_unlimited_members(self):

    def test_new_image_member_too_many_members(self):

class TestImageLocationQuotas(test_utils.BaseTestCase):

    def setUp(self):

    def test_replace_image_location(self):

    def test_replace_too_many_image_locations(self):

    def test_replace_unlimited_image_locations(self):

    def test_add_image_location(self):

    def test_add_too_many_image_locations(self):

    def test_add_unlimited_image_locations(self):

    def test_remove_image_location_while_over_quota(self):

\OpenStack\glance-2014.1\glance\tests\unit\test_rbd_store.py

class TestStore(base.StoreClearingUnitTest):

    def setUp(self):

    def test_add_w_image_size_zero(self):

    def test_add_w_rbd_image_exception(self):

        def _fake_create_image(*args, **kwargs):

        def _fake_delete_image(*args, **kwargs):

        def _fake_enter(*args, **kwargs):

    def test_add_duplicate_image(self):

        def _fake_create_image(*args, **kwargs):

    def test_delete(self):

        def _fake_remove(*args, **kwargs):

    def test__delete_image(self):

        def _fake_remove(*args, **kwargs):

    def test__delete_image_w_snap(self):

        def _fake_unprotect_snap(*args, **kwargs):

        def _fake_remove_snap(*args, **kwargs):

        def _fake_remove(*args, **kwargs):

    def test__delete_image_w_snap_exc_image_not_found(self):

        def _fake_unprotect_snap(*args, **kwargs):

    def test__delete_image_exc_image_not_found(self):

        def _fake_remove(*args, **kwargs):

    def test_image_size_exceeded_exception(self):

        def _fake_write(*args, **kwargs):

        def _fake_delete_image(*args, **kwargs):

    def tearDown(self):

\OpenStack\glance-2014.1\glance\tests\unit\test_s3_store.py

def stub_out_s3(stubs):

 def fake_connection_constructor(self, *args, **kwargs):

 def fake_get_bucket(conn, bucket_id):

def format_s3_location(user, key, authurl, bucket, obj):

class TestStore(base.StoreClearingUnitTest):

    def setUp(self):

    def test_get(self):

    def test_get_calling_format_path(self):

        def fake_S3Connection_init(*args, **kwargs):

    def test_get_calling_format_default(self):

        def fake_S3Connection_init(*args, **kwargs):

    def test_get_non_existing(self):

    def test_add(self):

    def test_add_host_variations(self):

    def test_add_already_existing(self):

    def _option_required(self, key):

    def test_no_access_key(self):

    def test_no_secret_key(self):

    def test_no_host(self):

    def test_delete(self):

    def test_delete_non_existing(self):

    def _do_test_get_s3_location(self, host, loc):

    def test_get_s3_good_location(self):

    def test_get_s3_bad_location(self):

    def test_calling_format_path(self):

    def test_calling_format_subdomain(self):

    def test_calling_format_default(self):

\OpenStack\glance-2014.1\glance\tests\unit\test_schema.py

class TestBasicSchema(test_utils.BaseTestCase):

    def setUp(self):

    def test_validate_passes(self):

    def test_validate_fails_on_extra_properties(self):

    def test_validate_fails_on_bad_type(self):

    def test_filter_strips_extra_properties(self):

    def test_merge_properties(self):

    def test_merge_conflicting_properties(self):

    def test_merge_conflicting_but_identical_properties(self):

    def test_raw_json_schema(self):

class TestBasicSchemaLinks(test_utils.BaseTestCase):

    def setUp(self):

    def test_raw_json_schema(self):

class TestPermissiveSchema(test_utils.BaseTestCase):

    def setUp(self):

    def test_validate_with_additional_properties_allowed(self):

    def test_validate_rejects_non_string_extra_properties(self):

    def test_filter_passes_extra_properties(self):

    def test_raw_json_schema(self):

class TestCollectionSchema(test_utils.BaseTestCase):

    def test_raw_json_schema(self):

\OpenStack\glance-2014.1\glance\tests\unit\test_scrubber.py

class TestScrubber(test_utils.BaseTestCase):

    def setUp(self):

    def tearDown(self):

    def _scrubber_cleanup_with_store_delete_exception(self, ex):

    def test_store_delete_unsupported_backend_exception(self):

    def test_store_delete_notfound_exception(self):

\OpenStack\glance-2014.1\glance\tests\unit\test_sheepdog_store.py

class TestStore(base.StoreClearingUnitTest):

    def setUp(self):

        def _fake_execute(*cmd, **kwargs):

    def test_cleanup_when_add_image_exception(self):

        def _fake_run_command(self, command, data, *params):

\OpenStack\glance-2014.1\glance\tests\unit\test_store_base.py

class FakeUnconfigurableStoreDriver(store_base.Store):

    def configure(self):

class TestStoreBase(test_base.StoreClearingUnitTest):

    def setUp(self):

    def test_exception_to_unicode(self):

    def test_create_store_exclude_unconfigurable_drivers(self):

\OpenStack\glance-2014.1\glance\tests\unit\test_store_image.py

class ImageRepoStub(object):

    def add(self, image):

    def save(self, image):

class ImageStub(object):

    def __init__(self, image_id, status=None, locations=None, visibility=None):

    def delete(self):

    def get_member_repo(self):

class ImageFactoryStub(object):

    def new_image(self, image_id=None, name=None, visibility='private', min_disk=0, min_ram=0, protected=False, owner=None, disk_format=None, container_format=None, extra_properties=None, tags=None, **other_args):

class FakeMemberRepo(object):

    def __init__(self, image, tenants=None):

    def list(self, *args, **kwargs):

    def add(self, member):

    def remove(self, member):

class TestStoreImage(utils.BaseTestCase):

    def setUp(self):

    def test_image_delete(self):

    def test_image_get_data(self):

    def test_image_get_data_from_second_location(self):

        def fake_get_from_backend(self, context, location):

    def test_image_set_data(self):

    def test_image_set_data_location_metadata(self):

    def test_image_set_data_unknown_size(self):

    def _add_image(self, context, image_id, data, len):

    def test_image_change_append_invalid_location_uri(self):

    def test_image_change_append_invalid_location_metatdata(self):

    def test_image_change_append_locations(self):

    def test_image_change_pop_location(self):

    def test_image_change_extend_invalid_locations_uri(self):

    def test_image_change_extend_invalid_locations_metadata(self):

    def test_image_change_extend_locations(self):

    def test_image_change_remove_location(self):

    def test_image_change_delete_location(self):

    def test_image_change_insert_invalid_location_uri(self):

    def test_image_change_insert_invalid_location_metadata(self):

    def test_image_change_insert_location(self):

    def test_image_change_delete_locations(self):

    def test_image_change_adding_invalid_location_uri(self):

    def test_image_change_adding_invalid_location_metadata(self):

    def test_image_change_adding_locations(self):

    def test_image_get_location_index(self):

    def test_image_get_location_by_index(self):

    def test_image_checking_location_exists(self):

    def test_image_reverse_locations_order(self):

class TestStoreImageRepo(utils.BaseTestCase):

    def setUp(self):

    def test_add_updates_acls(self):

    def test_add_ignores_acls_if_no_locations(self):

    def test_save_updates_acls(self):

    def test_add_fetches_members_if_private(self):

    def test_save_fetches_members_if_private(self):

    def test_member_addition_updates_acls(self):

    def test_member_removal_updates_acls(self):

class TestImageFactory(utils.BaseTestCase):

    def setUp(self):

    def test_new_image(self):

    def test_new_image_with_location(self):

class TestStoreMetaDataChecker(utils.BaseTestCase):

    def test_empty(self):

    def test_unicode(self):

    def test_unicode_list(self):

    def test_unicode_dict(self):

    def test_unicode_dict_list(self):

    def test_nested_dict(self):

    def test_simple_bad(self):

    def test_list_bad(self):

    def test_nested_dict_bad(self):

class TestStoreAddToBackend(utils.BaseTestCase):

    def setUp(self):

    def tearDown(self):

    def _bad_metadata(self, in_metadata):

    def _good_metadata(self, in_metadata):

    def test_empty(self):

    def test_string(self):

    def test_list(self):

    def test_unicode_dict(self):

    def test_unicode_dict_list(self):

    def test_nested_dict(self):

    def test_bad_top_level_nonunicode(self):

    def test_bad_nonunicode_dict_list(self):

    def test_bad_metadata_not_dict(self):

\OpenStack\glance-2014.1\glance\tests\unit\test_store_location.py

class TestStoreLocation(base.StoreClearingUnitTest):

    def setUp(self):

    def test_get_location_from_uri_back_to_uri(self):

    def test_bad_store_scheme(self):

    def test_filesystem_store_location(self):

    def test_http_store_location(self):

    def test_swift_store_location(self):

    def test_s3_store_location(self):

    def test_rbd_store_location(self):

    def test_sheepdog_store_location(self):

    def test_vmware_store_location(self):

    def test_cinder_store_good_location(self):

    def test_cinder_store_bad_location(self):

    def test_get_store_from_scheme(self):

    def test_add_location_for_image_without_size(self):

        def fake_get_size_from_backend(context, uri):

\OpenStack\glance-2014.1\glance\tests\unit\test_swift_store.py

def stub_out_swiftclient(stubs, swift_store_auth_version):

 def fake_head_container(url, token, container, **kwargs):

 def fake_put_container(url, token, container, **kwargs):

 def fake_post_container(url, token, container, headers, http_conn=None):

 def fake_put_object(url, token, container, name, contents, **kwargs):

 def fake_get_object(url, token, container, name, **kwargs):

 def fake_head_object(url, token, container, name, **kwargs):

 def fake_delete_object(url, token, container, name, **kwargs):

 def fake_http_connection(*args, **kwargs):

 def fake_get_auth(url, user, key, snet, auth_version, **kwargs):

class SwiftTests(object):

    def swift_store_user(self):

    def test_get_size(self):

    def test_get_size_with_multi_tenant_on(self):

    def test_get(self):

    def test_get_with_retry(self):

    def test_get_with_http_auth(self):

    def test_get_non_existing(self):

    def test_add(self):

    def test_add_auth_url_variations(self):

    def test_add_no_container_no_create(self):

    def test_add_no_container_and_create(self):

    def test_add_large_object(self):

    def test_add_large_object_zero_size(self):

    def test_add_already_existing(self):

    def test_add_saves_and_reraises_and_not_uses_wildcard_raise(self):

        def fake_delete_chunk(connection, container, chunks):

    def _option_required(self, key):

    def test_no_user(self):

    def test_no_key(self):

    def test_no_auth_address(self):

    def test_delete(self):

    def test_delete_non_existing(self):

    def test_read_acl_public(self):

    def test_read_acl_tenants(self):

    def test_write_acls(self):

class TestStoreAuthV1(base.StoreClearingUnitTest, SwiftTests):

    def getConfig(self):

    def setUp(self):

class TestStoreAuthV2(TestStoreAuthV1):

    def getConfig(self):

    def test_v2_with_no_tenant(self):

    def test_v2_multi_tenant_location(self):

class FakeConnection(object):

    def __init__(self, authurl, user, key, retries=5, preauthurl=None, preauthtoken=None, snet=False, starting_backoff=1, tenant_name=None, os_options={}, auth_version="1", insecure=False, ssl_compression=True):

class TestSingleTenantStoreConnections(base.IsolatedUnitTest):

    def setUp(self):

    def test_basic_connection(self):

    def test_connection_with_no_trailing_slash(self):

    def test_connection_insecure(self):

    def test_connection_with_auth_v1(self):

    def test_connection_invalid_user(self):

    def test_connection_missing_user(self):

    def test_connection_with_region(self):

    def test_connection_with_service_type(self):

    def test_connection_with_endpoint_type(self):

    def test_connection_with_snet(self):

class TestMultiTenantStoreConnections(base.IsolatedUnitTest):

    def setUp(self):

    def test_basic_connection(self):

    def test_connection_with_snet(self):

class FakeGetEndpoint(object):

    def __init__(self, response):

    def __call__(self, service_catalog, service_type=None, endpoint_region=None, endpoint_type=None):

class TestCreatingLocations(base.IsolatedUnitTest):

    def test_single_tenant_location(self):

    def test_single_tenant_location_http(self):

    def test_multi_tenant_location(self):

    def test_multi_tenant_location_http(self):

    def test_multi_tenant_location_with_region(self):

    def test_multi_tenant_location_custom_service_type(self):

    def test_multi_tenant_location_custom_endpoint_type(self):

class TestChunkReader(base.StoreClearingUnitTest):

    def test_read_all_data(self):

\OpenStack\glance-2014.1\glance\tests\unit\test_versions.py

class VersionsTest(base.IsolatedUnitTest):

    def test_get_version_list(self):

class VersionNegotiationTest(base.IsolatedUnitTest):

    def setUp(self):

    def test_request_url_v1(self):

    def test_request_url_v1_0(self):

    def test_request_url_v1_1(self):

    def test_request_accept_v1(self):

    def test_request_url_v2(self):

    def test_request_url_v2_0(self):

    def test_request_url_v2_1(self):

    def test_request_url_v2_2(self):

    def test_request_url_v2_3_unsupported(self):

    def test_request_url_v3_unsupported(self):

\OpenStack\glance-2014.1\glance\tests\unit\test_vmware_store.py

def format_location(host_ip, folder_name, image_id, datacenter_path, datastore_name):

class FakeHTTPConnection(object):

    def __init__(self, status=200, *args, **kwargs):

    def getresponse(self):

    def request(self, *_args, **_kwargs):

    def close(self):

class TestStore(base.StoreClearingUnitTest):

    def setUp(self, mock_session):

    def test_get(self):

    def test_get_non_existing(self):

    def test_add(self, fake_size):

    def test_add_size_zero(self, fake_size):

    def test_delete(self):

    def test_get_size(self):

    def test_get_size_non_existing(self):

\OpenStack\glance-2014.1\glance\tests\unit\utils.py

def get_fake_request(path='', method='POST', is_admin=False, user=USER1, roles=['member'], tenant=TENANT1):

def fake_get_size_from_backend(context, uri):

class FakeDB(object):

    def __init__(self):

    def init_db():

    def reset():

    def __getattr__(self, key):

class FakeStoreAPI(object):

    def __init__(self, store_metadata=None):

    def create_stores(self):

    def set_acls(self, context, uri, public=False, read_tenants=[], write_tenants=[]):

    def get_from_backend(self, context, location):

    def safe_delete_from_backend(self, context, uri, id, **kwargs):

OpenStack Index

Previous

Next