¡@

Home 

OpenStack Study: glance

OpenStack Index

Previous

Next

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

    def delete_image_from_backend(self, context, store_api, image_id, uri):

    def get_size_from_backend(self, context, location):

    def add_to_backend(self, context, scheme, image_id, data, size):

    def check_location_metadata(self, val, key=''):

class FakePolicyEnforcer(object):

    def __init__(self, *_args, **kwargs):

    def enforce(self, _ctxt, action, target=None, **kwargs):

    def set_rules(self, rules):

class FakeNotifier(object):

    def __init__(self, *_args, **kwargs):

    def _notify(self, event_type, payload, level):

    def warn(self, event_type, payload):

    def info(self, event_type, payload):

    def error(self, event_type, payload):

    def debug(self, event_type, payload):

    def critical(self, event_type, payload):

    def get_logs(self):

class FakeGateway(object):

    def __init__(self, image_factory=None, image_member_factory=None, image_repo=None, task_factory=None, task_repo=None):

    def get_image_factory(self, context):

    def get_image_member_factory(self, context):

    def get_repo(self, context):

    def get_task_factory(self, context):

    def get_task_repo(self, context):

class FakeTask(object):

    def __init__(self, task_id, type=None, status=None):

    def success(self, result):

    def fail(self, message):

\OpenStack\glance-2014.1\glance\tests\unit\v1\test_api.py

class TestGlanceAPI(base.IsolatedUnitTest):

    def setUp(self):

    def tearDown(self):

    def create_fixtures(self):

    def destroy_fixtures(self):

    def _do_test_defaulted_format(self, format_key, format_value):

    def test_defaulted_amazon_format(self):

    def test_bad_min_disk_size_create(self):

    def test_bad_min_disk_size_update(self):

    def test_bad_min_ram_size_create(self):

    def test_bad_min_ram_size_update(self):

    def test_bad_disk_format(self):

    def test_configured_disk_format_good(self):

    def test_configured_disk_format_bad(self):

    def test_configured_container_format_good(self):

    def test_configured_container_format_bad(self):

    def test_container_and_disk_amazon_format_differs(self):

    def test_create_with_location_no_container_format(self):

    def test_create_with_bad_store_name(self):

    def test_create_with_location_unknown_scheme(self):

    def test_create_with_location_bad_store_uri(self):

    def test_create_image_with_too_many_properties(self):

    def test_bad_container_format(self):

    def test_bad_image_size(self):

        def exec_bad_size_test(bad_size, expected_substr):

    def test_bad_image_name(self):

    def test_add_image_no_location_no_image_as_body(self):

    def test_add_image_no_location_no_content_type(self):

    def test_add_image_size_header_too_big(self):

    def test_add_image_size_chunked_data_too_big(self):

    def test_add_image_size_data_too_big(self):

    def test_add_image_size_header_exceed_quota(self):

    def test_add_image_size_data_exceed_quota(self):

    def test_add_image_size_data_exceed_quota_readd(self):

    def _add_check_no_url_info(self):

    def test_add_check_no_url_info_ml(self):

    def test_add_check_no_url_info_direct_url(self):

    def test_add_check_no_url_info_both_on(self):

    def test_add_check_no_url_info_both_off(self):

    def test_add_image_zero_size(self):

    def _do_test_add_image_attribute_mismatch(self, attributes):

    def test_add_image_checksum_mismatch(self):

    def test_add_image_size_mismatch(self):

    def test_add_image_checksum_and_size_mismatch(self):

    def test_add_image_bad_store(self):

    def test_add_image_basic_file_store(self):

    def test_add_image_unauthorized(self):

    def test_add_publicize_image_unauthorized(self):

    def test_add_publicize_image_authorized(self):

    def test_add_copy_from_image_unauthorized(self):

    def test_add_copy_from_upload_image_unauthorized(self):

    def test_add_copy_from_image_authorized_upload_image_authorized(self):

    def test_add_copy_from_with_nonempty_body(self):

    def test_add_location_with_nonempty_body(self):

    def test_add_location_with_conflict_image_size(self):

    def test_add_copy_from_with_location(self):

    def test_add_copy_from_upload_image_unauthorized_with_body(self):

    def test_update_data_upload_bad_store_uri(self):

    def test_update_data_upload_image_unauthorized(self):

    def test_update_copy_from_upload_image_unauthorized(self):

    def test_update_copy_from_unauthorized(self):

    def _do_test_post_image_content_missing_format(self, missing):

    def test_post_image_content_missing_disk_format(self):

    def test_post_image_content_missing_container_type(self):

    def _do_test_put_image_content_missing_format(self, missing):

    def test_put_image_content_missing_disk_format(self):

    def test_put_image_content_missing_container_type(self):

    def test_update_deleted_image(self):

    def test_delete_deleted_image(self):

    def test_image_status_when_delete_fails(self, mock_fsstore_delete):

    def test_delete_pending_delete_image(self):

    def test_upload_to_image_status_saving(self):

        def mock_image_update(context, values, image_id, purge_props=False, from_state=None):

        def mock_image_get(*args, **kwargs):

        def mock_get_image_metadata(*args, **kwargs):

    def test_register_and_upload(self):

    def test_delete_during_image_upload(self):

        def mock_initiate_deletion(*args, **kwargs):

        def mock_update_image_metadata(*args, **kwargs):

    def test_disable_purge_props(self):

    def test_publicize_image_unauthorized(self):

    def test_update_image_size_header_too_big(self):

    def test_update_image_size_data_too_big(self):

    def test_update_image_size_chunked_data_too_big(self):

    def test_update_non_existing_image(self):

    def test_update_public_image(self):

    def test_add_image_wrong_content_type(self):

    def test_get_index_sort_name_asc(self):

    def test_get_details_filter_changes_since(self):

    def test_get_images_bad_urls(self):

    def test_get_index_filter_on_user_defined_properties(self):

    def test_get_images_detailed_unauthorized(self):

    def test_get_images_unauthorized(self):

    def test_store_location_not_revealed(self):

    def test_image_is_checksummed(self):

    def test_etag_equals_checksum_header(self):

    def test_bad_checksum_prevents_image_creation(self):

    def test_image_meta(self):

    def test_image_meta_unauthorized(self):

    def test_show_image_basic(self):

    def test_show_non_exists_image(self):

    def test_show_image_unauthorized(self):

    def test_show_image_unauthorized_download(self):

    def test_delete_image(self):

    def test_delete_non_exists_image(self):

    def test_delete_not_allowed(self):

    def test_delete_queued_image(self):

    def test_delete_queued_image_delayed_delete(self):

    def test_delete_protected_image(self):

    def test_delete_image_unauthorized(self):

    def test_get_details_invalid_marker(self):

    def test_get_image_members(self):

    def test_get_image_members_allowed_by_policy(self):

    def test_get_image_members_forbidden_by_policy(self):

    def test_get_image_members_not_existing(self):

    def test_add_member_positive(self):

    def test_get_member_images(self):

    def test_replace_members(self):

    def test_active_image_immutable_props_for_user(self):

    def test_props_of_active_image_mutable_for_admin(self):

    def test_replace_members_non_existing_image(self):

    def test_replace_members_bad_request(self):

    def test_replace_members_positive(self):

    def test_replace_members_forbidden_by_policy(self):

    def test_replace_members_allowed_by_policy(self):

    def test_add_member_unauthorized(self):

    def test_add_member_non_existing_image(self):

    def test_add_member_with_body(self):

    def test_add_member_overlimit(self):

    def test_add_member_unlimited(self):

    def test_add_member_forbidden_by_policy(self):

    def test_add_member_allowed_by_policy(self):

    def test_get_members_of_deleted_image_raises_404(self):

    def test_delete_member_of_deleted_image_raises_404(self):

    def test_update_members_of_deleted_image_raises_404(self):

    def test_replace_members_of_image(self):

    def test_replace_members_of_image_overlimit(self):

    def test_replace_members_of_image_unlimited(self):

    def test_create_member_to_deleted_image_raises_404(self):

    def test_delete_member(self):

    def test_delete_member_on_non_existing_image(self):

    def test_delete_non_exist_member(self):

    def test_delete_image_member(self):

    def test_delete_member_allowed_by_policy(self):

    def test_delete_member_forbidden_by_policy(self):

class TestImageSerializer(base.IsolatedUnitTest):

    def setUp(self):

        def image_iter():

    def test_meta(self):

    def test_meta_utf8(self):

    def test_show(self):

    def test_show_notify(self):

    def test_image_send_notification(self):

        def fake_info(_event_type, _payload):

    def test_image_send_notification_error(self):

        def fake_error(_event_type, _payload):

    def test_redact_location(self):

    def test_noop_redact_location(self):

class TestFilterValidator(base.IsolatedUnitTest):

    def test_filter_validator(self):

class TestAPIProtectedProps(base.IsolatedUnitTest):

    def setUp(self):

    def tearDown(self):

    def destroy_fixtures(self):

    def _create_admin_image(self, props={}):

    def test_prop_protection_with_create_and_permitted_role(self):

    def test_prop_protection_with_permitted_policy_config(self):

    def test_prop_protection_with_create_and_unpermitted_role(self):

    def test_prop_protection_with_show_and_permitted_role(self):

    def test_prop_protection_with_show_and_unpermitted_role(self):

    def test_prop_protection_with_get_and_permitted_role(self):

    def test_prop_protection_with_get_and_unpermitted_role(self):

    def test_prop_protection_with_detail_and_permitted_role(self):

    def test_prop_protection_with_detail_and_permitted_policy(self):

    def test_prop_protection_with_detail_and_unpermitted_role(self):

    def test_prop_protection_with_detail_and_unpermitted_policy(self):

    def test_prop_protection_with_update_and_permitted_role(self):

    def test_prop_protection_with_update_and_permitted_policy(self):

    def test_prop_protection_with_update_and_unpermitted_role(self):

    def test_prop_protection_with_update_and_unpermitted_policy(self):

    def test_prop_protection_update_without_read(self):

    def test_prop_protection_update_noop(self):

    def test_prop_protection_with_delete_and_permitted_role(self):

    def test_prop_protection_with_delete_and_permitted_policy(self):

    def test_prop_protection_with_delete_and_unpermitted_read(self):

    def test_prop_protection_with_delete_and_unpermitted_delete(self):

    def test_read_protected_props_leak_with_update(self):

    def test_update_protected_props_mix_no_read(self):

    def test_update_protected_props_mix_read(self):

    def test_delete_protected_props_mix_no_read(self):

    def test_delete_protected_props_mix_read(self):

    def test_create_non_protected_prop(self):

    def test_read_non_protected_prop(self):

    def test_update_non_protected_prop(self):

    def test_delete_non_protected_prop(self):

    def test_create_locked_down_protected_prop(self):

    def test_read_locked_down_protected_prop(self):

    def test_update_locked_down_protected_prop(self):

    def test_delete_locked_down_protected_prop(self):

class TestAPIPropertyQuotas(base.IsolatedUnitTest):

    def setUp(self):

    def _create_admin_image(self, props={}):

    def test_update_image_with_too_many_properties(self):

    def test_update_image_with_too_many_properties_without_purge_props(self):

    def test_update_properties_without_purge_props_overwrite_value(self):

\OpenStack\glance-2014.1\glance\tests\unit\v1\test_registry_api.py

class TestRegistryAPI(base.IsolatedUnitTest, test_utils.RegistryAPIMixIn):

    def setUp(self):

        def _get_extra_fixture(id, name, **kwargs):

    def tearDown(self):

    def test_show(self):

    def test_show_unknown(self):

    def test_show_invalid(self):

    def test_show_deleted_image_as_admin(self):

    def test_show_deleted_image_as_nonadmin(self):

    def test_show_private_image_with_no_admin_user(self):

    def test_get_root(self):

    def test_get_index(self):

    def test_get_index_marker(self):

    def test_get_index_unknown_marker(self):

    def test_get_index_malformed_marker(self):

    def test_get_index_forbidden_marker(self):

    def test_get_index_limit(self):

    def test_get_index_limit_negative(self):

    def test_get_index_limit_non_int(self):

    def test_get_index_limit_marker(self):

    def test_get_index_filter_on_user_defined_properties(self):

    def test_get_index_filter_name(self):

    def test_get_index_sort_default_created_at_desc(self):

    def test_get_index_bad_sort_key(self):

    def test_get_index_bad_sort_dir(self):

    def test_get_index_null_name(self):

    def test_get_index_null_disk_format(self):

    def test_get_index_null_container_format(self):

    def test_get_index_sort_name_asc(self):

    def test_get_index_sort_status_desc(self):

    def test_get_index_sort_disk_format_asc(self):

    def test_get_index_sort_container_format_desc(self):

    def test_get_index_sort_size_asc(self):

    def test_get_index_sort_created_at_asc(self):

    def test_get_index_sort_updated_at_desc(self):

    def test_get_details(self):

    def test_get_details_limit_marker(self):

    def test_get_details_invalid_marker(self):

    def test_get_details_malformed_marker(self):

    def test_get_details_forbidden_marker(self):

    def test_get_details_filter_name(self):

    def test_get_details_filter_status(self):

    def test_get_details_filter_container_format(self):

    def test_get_details_filter_min_disk(self):

    def test_get_details_filter_min_ram(self):

    def test_get_details_filter_disk_format(self):

    def test_get_details_filter_size_min(self):

    def test_get_details_filter_size_max(self):

    def test_get_details_filter_size_min_max(self):

    def test_get_details_filter_changes_since(self):

    def test_get_details_filter_property(self):

    def test_get_details_filter_public_none(self):

    def test_get_details_filter_public_false(self):

    def test_get_details_filter_public_true(self):

    def test_get_details_filter_public_string_format(self):

    def test_get_details_filter_deleted_false(self):

    def test_get_filter_no_public_with_no_admin(self):

    def test_get_filter_protected_with_None_value(self):

    def test_get_filter_protected_with_True_value(self):

    def test_get_details_sort_name_asc(self):

    def test_create_image(self):

    def test_create_image_with_min_disk(self):

    def test_create_image_with_min_ram(self):

    def test_create_image_with_min_ram_default(self):

    def test_create_image_with_min_disk_default(self):

    def test_create_image_with_bad_status(self):

    def test_create_image_with_bad_id(self):

    def test_create_image_with_image_id_in_log(self):

        def fake_log_info(msg):

    def test_update_image(self):

    def test_update_image_not_existing(self):

    def test_update_image_with_bad_status(self):

    def test_update_private_image_no_admin(self):

    def test_delete_image(self):

    def test_delete_image_response(self):

    def test_delete_image_not_existing(self):

    def test_delete_public_image_no_admin(self):

    def test_delete_private_image_no_admin(self):

    def test_get_image_members(self):

    def test_get_image_members_not_existing(self):

    def test_get_image_members_forbidden(self):

    def test_get_member_images(self):

    def test_replace_members(self):

    def test_update_all_image_members_non_existing_image_id(self):

    def test_update_all_image_members_invalid_membership_association(self):

    def test_update_all_image_members_non_shared_image_forbidden(self):

    def test_update_all_image_members(self):

    def test_update_all_image_members_bad_request(self):

    def test_update_all_image_existing_members(self):

    def test_add_member(self):

    def test_add_member_to_image_positive(self):

    def test_add_member_to_non_exist_image(self):

    def test_add_image_member_non_shared_image_forbidden(self):

    def test_add_member_to_image_bad_request(self):

    def test_delete_member(self):

    def test_delete_member_invalid(self):

    def test_delete_member_from_non_exist_image(self):

    def test_delete_image_member_non_shared_image_forbidden(self):

    def test_get_images_bad_urls(self):

class TestRegistryAPILocations(base.IsolatedUnitTest, test_utils.RegistryAPIMixIn):

    def setUp(self):

        def _get_extra_fixture(id, name, **kwargs):

    def tearDown(self):

    def test_show_from_locations(self):

    def test_show_from_location_data(self):

    def test_create_from_location_data_with_encryption(self):

class TestSharability(test_utils.BaseTestCase):

    def setUp(self):

    def setup_db(self):

    def test_is_image_sharable_as_admin(self):

    def test_is_image_sharable_owner_can_share(self):

    def test_is_image_sharable_non_owner_cannot_share(self):

    def test_is_image_sharable_non_owner_can_share_as_image_member(self):

    def test_is_image_sharable_non_owner_as_image_member_without_sharing(self):

    def test_is_image_sharable_owner_is_none(self):

\OpenStack\glance-2014.1\glance\tests\unit\v1\test_registry_client.py

class TestRegistryV1Client(base.IsolatedUnitTest, test_utils.RegistryAPIMixIn):

    def setUp(self):

    def tearDown(self):

    def test_get_image_index(self):

    def test_create_image_with_null_min_disk_min_ram(self):

    def test_get_index_sort_name_asc(self):

    def test_get_index_sort_status_desc(self):

    def test_get_index_sort_disk_format_asc(self):

    def test_get_index_sort_container_format_desc(self):

    def test_get_index_sort_size_asc(self):

    def test_get_index_sort_created_at_asc(self):

    def test_get_index_sort_updated_at_desc(self):

    def test_get_image_index_marker(self):

    def test_get_image_index_invalid_marker(self):

    def test_get_image_index_forbidden_marker(self):

        def non_admin_get_images(self, context, *args, **kwargs):

    def test_get_image_index_private_marker(self):

    def test_get_image_index_limit(self):

    def test_get_image_index_marker_limit(self):

    def test_get_image_index_limit_None(self):

    def test_get_image_index_by_name(self):

    def test_get_image_details(self):

    def test_get_image_details_marker_limit(self):

    def test_get_image_details_invalid_marker(self):

    def test_get_image_details_forbidden_marker(self):

        def non_admin_get_images(self, context, *args, **kwargs):

    def test_get_image_details_private_marker(self):

    def test_get_image_details_by_name(self):

    def test_get_image_details_by_status(self):

    def test_get_image_details_by_container_format(self):

    def test_get_image_details_by_disk_format(self):

    def test_get_image_details_with_maximum_size(self):

    def test_get_image_details_with_minimum_size(self):

    def test_get_image_details_with_changes_since(self):

    def test_get_image_details_with_size_min(self):

    def test_get_image_details_by_property(self):

    def test_get_image_is_public_v1(self):

    def test_get_image_details_sort_disk_format_asc(self):

    def test_get_image(self):

    def test_get_image_non_existing(self):

    def test_add_image_basic(self):

    def test_add_image_with_properties(self):

    def test_add_image_with_location_data(self):

    def test_add_image_with_location_data_with_encryption(self):

    def test_add_image_already_exists(self):

    def test_add_image_with_bad_status(self):

    def test_update_image(self):

    def test_update_image_not_existing(self):

    def test_delete_image(self):

    def test_delete_image_not_existing(self):

    def test_get_image_members(self):

    def test_get_image_members_not_existing(self):

    def test_get_member_images(self):

    def test_add_replace_members(self):

    def test_add_delete_member(self):

class TestBaseClient(testtools.TestCase):

    def test_connect_kwargs_default_values(self):

    def test_connect_kwargs(self):

class TestRegistryV1ClientApi(base.IsolatedUnitTest):

    def setUp(self):

    def tearDown(self):

    def test_get_registry_client(self):

    def test_get_registry_client_with_identity_headers(self):

    def test_configure_registry_client_not_using_use_user_token(self):

    def _get_fake_config_creds(self, auth_url='auth_url', strategy='keystone'):

    def test_configure_registry_admin_creds(self):

    def test_configure_registry_admin_creds_with_auth_url(self):

class FakeResponse():

    def getheader(*args, **kwargs):

class TestRegistryV1ClientRequests(base.IsolatedUnitTest):

    def setUp(self):

    def tearDown(self):

    def test_do_request_with_identity_headers(self):

    def test_do_request(self):

\OpenStack\glance-2014.1\glance\tests\unit\v1\test_upload_utils.py

class TestUploadUtils(base.StoreClearingUnitTest):

    def setUp(self):

    def tearDown(self):

    def test_initiate_delete(self):

    def test_initiate_delete_with_delayed_delete(self):

    def test_safe_kill(self):

    def test_safe_kill_with_error(self):

    def test_upload_data_to_store(self):

    def test_upload_data_to_store_mismatch_size(self):

    def test_upload_data_to_store_mismatch_checksum(self):

    def _test_upload_data_to_store_exception(self, exc_class, expected_class):

    def _test_upload_data_to_store_exception_with_notify(self, exc_class, expected_class, image_killed=True):

    def test_upload_data_to_store_duplicate(self):

    def test_upload_data_to_store_forbidden(self):

    def test_upload_data_to_store_storage_full(self):

    def test_upload_data_to_store_storage_write_denied(self):

    def test_upload_data_to_store_size_limit_exceeded(self):

    def test_upload_data_to_store_http_error(self):

    def test_upload_data_to_store_client_disconnect(self):

    def test_upload_data_to_store_client_disconnect_ioerror(self):

    def test_upload_data_to_store_exception(self):

    def test_upload_data_to_store_not_found_after_upload(self):

\OpenStack\glance-2014.1\glance\tests\unit\v1\__init__.py

\OpenStack\glance-2014.1\glance\tests\unit\v2\test_images_resource.py

def _db_fixture(id, **kwargs):

def _domain_fixture(id, **kwargs):

def _db_image_member_fixture(image_id, member_id, **kwargs):

class TestImagesController(base.IsolatedUnitTest):

    def setUp(self):

    def _create_images(self):

    def _create_image_members(self):

    def test_index(self):

    def test_index_member_status_accepted(self):

    def test_index_admin(self):

    def test_index_admin_deleted_images_hidden(self):

    def test_index_return_parameters(self):

    def test_index_next_marker(self):

    def test_index_no_next_marker(self):

    def test_index_with_id_filter(self):

    def test_index_with_checksum_filter_single_image(self):

    def test_index_with_checksum_filter_multiple_images(self):

    def test_index_with_non_existent_checksum(self):

    def test_index_size_max_filter(self):

    def test_index_size_min_filter(self):

    def test_index_size_range_filter(self):

    def test_index_virtual_size_max_filter(self):

    def test_index_virtual_size_min_filter(self):

    def test_index_virtual_size_range_filter(self):

    def test_index_with_invalid_max_range_filter_value(self):

    def test_index_with_filters_return_many(self):

    def test_index_with_nonexistent_name_filter(self):

    def test_index_with_non_default_is_public_filter(self):

    def test_index_with_many_filters(self):

    def test_index_with_marker(self):

    def test_index_with_limit(self):

    def test_index_greater_than_limit_max(self):

    def test_index_default_limit(self):

    def test_index_with_sort_dir(self):

    def test_index_with_sort_key(self):

    def test_index_with_marker_not_found(self):

    def test_index_invalid_sort_key(self):

    def test_index_zero_images(self):

    def test_index_with_tags(self):

    def test_index_with_multi_tags(self):

    def test_index_with_multi_tags_and_nonexistent(self):

    def test_index_with_tags_and_properties(self):

    def test_index_with_multiple_properties(self):

    def test_index_with_core_and_extra_property(self):

    def test_index_with_nonexistent_properties(self):

    def test_index_with_non_existent_tags(self):

    def test_show(self):

    def test_show_deleted_properties(self):

    def test_show_non_existent(self):

    def test_show_deleted_image_admin(self):

    def test_show_not_allowed(self):

    def test_create(self):

    def test_create_with_properties(self):

    def test_create_with_too_many_properties(self):

    def test_create_with_bad_min_disk_size(self):

    def test_create_with_bad_min_ram_size(self):

    def test_create_public_image_as_admin(self):

    def test_create_duplicate_tags(self):

    def test_create_with_too_many_tags(self):

    def test_update_no_changes(self):

    def test_update_with_bad_min_disk(self):

    def test_update_with_bad_min_ram(self):

    def test_update_image_doesnt_exist(self):

    def test_update_deleted_image_admin(self):

    def test_update_replace_base_attribute(self):

    def test_update_replace_tags(self):

    def test_update_replace_property(self):

    def test_update_add_too_many_properties(self):

    def test_update_add_and_remove_too_many_properties(self):

    def test_update_add_unlimited_properties(self):

    def test_update_format_properties(self):

    def test_update_remove_property_while_over_limit(self):

    def test_update_add_and_remove_property_under_limit(self):

    def test_update_replace_missing_property(self):

    def test_prop_protection_with_create_and_permitted_role(self):

    def test_prop_protection_with_update_and_permitted_policy(self):

    def test_prop_protection_with_create_with_patch_and_policy(self):

    def test_prop_protection_with_create_and_unpermitted_role(self):

    def test_prop_protection_with_show_and_permitted_role(self):

    def test_prop_protection_with_show_and_unpermitted_role(self):

    def test_prop_protection_with_update_and_permitted_role(self):

    def test_prop_protection_with_update_and_unpermitted_role(self):

    def test_prop_protection_with_delete_and_permitted_role(self):

    def test_prop_protection_with_delete_and_unpermitted_role(self):

    def test_create_non_protected_prop(self):

    def test_read_non_protected_prop(self):

    def test_update_non_protected_prop(self):

    def test_delete_non_protected_prop(self):

    def test_create_locked_down_protected_prop(self):

    def test_read_locked_down_protected_prop(self):

    def test_update_locked_down_protected_prop(self):

    def test_delete_locked_down_protected_prop(self):

    def test_update_replace_locations(self):

    def test_update_replace_locations_non_empty(self):

    def test_update_replace_locations_invalid(self):

    def test_update_replace_locations_status_exception(self):

    def test_update_add_property(self):

    def test_update_add_base_property(self):

    def test_update_add_property_already_present(self):

    def test_update_add_locations(self):

    def test_update_add_locations_insertion(self):

    def test_update_add_locations_list(self):

    def test_update_add_locations_invalid(self):

    def test_update_add_locations_status_exception(self):

    def test_update_add_duplicate_locations(self):

    def test_update_replace_duplicate_locations(self):

    def test_update_add_too_many_locations(self):

    def test_update_add_and_remove_too_many_locations(self):

    def test_update_add_unlimited_locations(self):

    def test_update_remove_location_while_over_limit(self):

    def test_update_add_and_remove_location_under_limit(self):

    def test_update_remove_base_property(self):

    def test_update_remove_property(self):

    def test_update_remove_missing_property(self):

    def test_update_remove_location(self):

    def test_update_remove_location_invalid_pos(self):

    def test_update_remove_location_store_exception(self):

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

    def test_update_multiple_changes(self):

    def test_update_invalid_operation(self):

    def test_update_duplicate_tags(self):

    def test_delete(self):

    def test_delete_queued_updates_status(self):

    def test_delete_queued_updates_status_delayed_delete(self):

    def test_delete_not_in_store(self):

    def test_delayed_delete(self):

    def test_delete_non_existent(self):

    def test_delete_already_deleted_image_admin(self):

    def test_delete_not_allowed(self):

    def test_index_with_invalid_marker(self):

    def test_invalid_locations_op_pos(self):

class TestImagesControllerPolicies(base.IsolatedUnitTest):

    def setUp(self):

    def test_index_unauthorized(self):

    def test_show_unauthorized(self):

    def test_create_image_unauthorized(self):

    def test_create_public_image_unauthorized(self):

    def test_update_unauthorized(self):

    def test_update_publicize_image_unauthorized(self):

    def test_update_depublicize_image_unauthorized(self):

    def test_update_get_image_location_unauthorized(self):

    def test_update_set_image_location_unauthorized(self):

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

    def test_update_delete_image_location_unauthorized(self):

    def test_delete_unauthorized(self):

class TestImagesDeserializer(test_utils.BaseTestCase):

    def setUp(self):

    def test_create_minimal(self):

    def test_create_invalid_id(self):

    def test_create_no_body(self):

    def test_create_full(self):

    def test_create_readonly_attributes_forbidden(self):

    def _get_fake_patch_request(self, content_type_minor_version=1):

    def test_update_empty_body(self):

    def test_update_unsupported_content_type(self):

    def test_update_body_not_a_list(self):

    def test_update_invalid_changes(self):

    def test_update(self):

    def test_update_v2_0_compatibility(self):

    def test_update_base_attributes(self):

    def test_update_disallowed_attributes(self):

    def test_update_readonly_attributes(self):

    def test_update_reserved_attributes(self):

    def test_update_invalid_attributes(self):

    def test_update_pointer_encoding(self):

    def test_update_deep_limited_attributes(self):

    def test_update_v2_1_missing_operations(self):

    def test_update_v2_1_missing_value(self):

    def test_update_v2_1_missing_path(self):

    def test_update_v2_0_multiple_operations(self):

    def test_update_v2_0_missing_operations(self):

    def test_update_v2_0_missing_value(self):

    def test_index(self):

    def test_index_with_filter(self):

    def test_index_strip_params_from_filters(self):

    def test_index_with_many_filter(self):

    def test_index_with_filter_and_limit(self):

    def test_index_non_integer_limit(self):

    def test_index_zero_limit(self):

    def test_index_negative_limit(self):

    def test_index_fraction(self):

    def test_index_invalid_status(self):

    def test_index_marker(self):

    def test_index_marker_not_specified(self):

    def test_index_limit_not_specified(self):

    def test_index_sort_key_id(self):

    def test_index_sort_dir_asc(self):

    def test_index_sort_dir_bad_value(self):

    def test_index_with_tag(self):

class TestImagesDeserializerWithExtendedSchema(test_utils.BaseTestCase):

    def setUp(self):

    def test_create(self):

    def test_create_bad_data(self):

    def test_update(self):

    def test_update_bad_data(self):

class TestImagesDeserializerWithAdditionalProperties(test_utils.BaseTestCase):

    def setUp(self):

    def test_create(self):

    def test_create_with_numeric_property(self):

    def test_update_with_numeric_property(self):

    def test_create_with_list_property(self):

    def test_update_with_list_property(self):

    def test_update(self):

class TestImagesDeserializerNoAdditionalProperties(test_utils.BaseTestCase):

    def setUp(self):

    def test_create_with_additional_properties_disallowed(self):

    def test_update(self):

class TestImagesSerializer(test_utils.BaseTestCase):

    def setUp(self):

    def test_index(self):

    def test_index_next_marker(self):

    def test_index_carries_query_parameters(self):

    def test_index_forbidden_get_image_location(self):

    def test_show_full_fixture(self):

    def test_show_minimal_fixture(self):

    def test_create(self):

    def test_update(self):

class TestImagesSerializerWithUnicode(test_utils.BaseTestCase):

    def setUp(self):

    def test_index(self):

    def test_show_full_fixture(self):

    def test_create(self):

    def test_update(self):

class TestImagesSerializerWithExtendedSchema(test_utils.BaseTestCase):

    def setUp(self):

    def test_show(self):

    def test_show_reports_invalid_data(self):

class TestImagesSerializerWithAdditionalProperties(test_utils.BaseTestCase):

    def setUp(self):

    def test_show(self):

    def test_show_invalid_additional_property(self):

    def test_show_with_additional_properties_disabled(self):

class TestImagesSerializerDirectUrl(test_utils.BaseTestCase):

    def setUp(self):

    def _do_index(self):

    def _do_show(self, image):

    def test_index_store_location_enabled(self):

    def test_index_store_multiple_location_enabled(self):

    def test_index_store_location_explicitly_disabled(self):

    def test_show_location_enabled(self):

    def test_show_location_enabled_but_not_set(self):

    def test_show_location_explicitly_disabled(self):

class TestImageSchemaFormatConfiguration(test_utils.BaseTestCase):

    def test_default_disk_formats(self):

    def test_custom_disk_formats(self):

    def test_default_container_formats(self):

    def test_custom_container_formats(self):

\OpenStack\glance-2014.1\glance\tests\unit\v2\test_image_data_resource.py

class Raise(object):

    def __init__(self, exc):

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

class FakeImage(object):

    def __init__(self, image_id=None, data=None, checksum=None, size=0, virtual_size=0, locations=None, container_format='bear', disk_format='rawr', status=None):

    def status(self):

    def status(self, value):

    def get_data(self):

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

class FakeImageRepo(object):

    def __init__(self, result=None):

    def get(self, image_id):

    def save(self, image):

class FakeGateway(object):

    def __init__(self, repo):

    def get_repo(self, context):

class TestImagesController(base.StoreClearingUnitTest):

    def setUp(self):

    def test_download(self):

    def test_download_no_location(self):

    def test_download_non_existent_image(self):

    def test_download_forbidden(self):

    def test_download_get_image_location_forbidden(self):

    def test_upload(self):

    def test_upload_status(self):

        def read_data():

    def test_upload_no_size(self):

    def test_upload_invalid(self):

    def test_upload_non_existent_image_during_save_initiates_deletion(self):

        def fake_save(self):

    def test_upload_non_existent_image_before_save(self):

    def test_upload_data_exists(self):

    def test_upload_storage_full(self):

    def test_image_size_limit_exceeded(self):

    def test_upload_storage_forbidden(self):

    def test_upload_storage_write_denied(self):

    def _test_upload_download_prepare_notification(self):

    def _test_upload_download_upload_notification(self):

    def _test_upload_download_activate_notification(self):

    def test_restore_image_when_upload_failed(self):

class TestImageDataDeserializer(test_utils.BaseTestCase):

    def setUp(self):

    def test_upload(self):

    def test_upload_chunked(self):

    def test_upload_chunked_with_content_length(self):

    def test_upload_with_incorrect_content_length(self):

    def test_upload_wrong_content_type(self):

class TestImageDataSerializer(test_utils.BaseTestCase):

    def setUp(self):

    def test_download(self):

    def test_download_with_checksum(self):

    def test_download_forbidden(self):

        def get_data():

    def test_upload(self):

\OpenStack\glance-2014.1\glance\tests\unit\v2\test_image_members_resource.py

def _db_fixture(id, **kwargs):

def _db_image_member_fixture(image_id, member_id, **kwargs):

def _domain_fixture(id, **kwargs):

class TestImageMembersController(test_utils.BaseTestCase):

    def setUp(self):

    def _create_images(self):

    def _create_image_members(self):

    def test_index(self):

    def test_index_no_members(self):

    def test_index_member_view(self):

    def test_index_private_image(self):

    def test_index_public_image(self):

    def test_index_private_image_visible_members_admin(self):

    def test_index_allowed_by_get_members_policy(self):

    def test_index_forbidden_by_get_members_policy(self):

    def test_show(self):

    def test_show_by_member(self):

    def test_show_forbidden(self):

    def test_show_not_found(self):

    def test_create(self):

    def test_create_allowed_by_add_policy(self):

    def test_create_forbidden_by_add_policy(self):

    def test_create_duplicate_member(self):

    def test_create_overlimit(self):

    def test_create_unlimited(self):

    def test_update_done_by_member(self):

    def test_update_done_by_member_forbidden_by_policy(self):

    def test_update_done_by_member_allowed_by_policy(self):

    def test_update_done_by_owner(self):

    def test_update_invalid_status(self):

    def test_create_private_image(self):

    def test_create_public_image(self):

    def test_create_image_does_not_exist(self):

    def test_delete(self):

    def test_delete_by_member(self):

    def test_delete_allowed_by_policies(self):

    def test_delete_forbidden_by_get_member_policy(self):

    def test_delete_forbidden_by_delete_member_policy(self):

    def test_delete_private_image(self):

    def test_delete_public_image(self):

    def test_delete_image_does_not_exist(self):

    def test_delete_member_does_not_exist(self):

class TestImageMembersSerializer(test_utils.BaseTestCase):

    def setUp(self):

    def test_index(self):

    def test_show(self):

    def test_create(self):

    def test_update(self):

class TestImagesDeserializer(test_utils.BaseTestCase):

    def setUp(self):

    def test_create(self):

    def test_create_invalid(self):

    def test_create_no_body(self):

    def test_create_member_empty(self):

    def test_update(self):

    def test_update_invalid(self):

    def test_update_no_body(self):

\OpenStack\glance-2014.1\glance\tests\unit\v2\test_image_tags_resource.py

class TestImageTagsController(base.IsolatedUnitTest):

    def setUp(self):

    def test_create_tag(self):

    def test_create_too_many_tags(self):

    def test_create_duplicate_tag_ignored(self):

    def test_delete_tag(self):

    def test_delete_tag_not_found(self):

class TestImagesSerializer(test_utils.BaseTestCase):

    def setUp(self):

    def test_create_tag(self):

    def test_delete_tag(self):

\OpenStack\glance-2014.1\glance\tests\unit\v2\test_registry_api.py

class TestRegistryRPC(base.IsolatedUnitTest):

    def setUp(self):

    def tearDown(self):

    def create_fixtures(self):

    def destroy_fixtures(self):

    def test_show(self):

    def test_show_unknown(self):

    def test_get_index(self):

    def test_get_index_marker(self):

    def test_get_index_marker_and_name_asc(self):

    def test_get_index_marker_and_name_desc(self):

    def test_get_index_marker_and_disk_format_asc(self):

    def test_get_index_marker_and_disk_format_desc(self):

    def test_get_index_marker_and_container_format_asc(self):

    def test_get_index_marker_and_container_format_desc(self):

    def test_get_index_unknown_marker(self):

    def test_get_index_limit(self):

    def test_get_index_limit_marker(self):

    def test_get_index_filter_name(self):

    def test_get_index_filter_on_user_defined_properties(self):

    def test_get_index_sort_default_created_at_desc(self):

    def test_get_index_sort_name_asc(self):

    def test_get_index_sort_status_desc(self):

    def test_get_index_sort_disk_format_asc(self):

    def test_get_index_sort_container_format_desc(self):

    def test_get_index_sort_size_asc(self):

    def test_get_index_sort_created_at_asc(self):

    def test_get_index_sort_updated_at_desc(self):

    def test_create_image(self):

    def test_create_image_with_min_disk(self):

    def test_create_image_with_min_ram(self):

    def test_create_image_with_min_ram_default(self):

    def test_create_image_with_min_disk_default(self):

    def test_update_image(self):

    def test_delete_image(self):

    def test_delete_image_response(self):

    def test_get_image_members(self):

\OpenStack\glance-2014.1\glance\tests\unit\v2\test_registry_client.py

class TestRegistryV2Client(base.IsolatedUnitTest, test_utils.RegistryAPIMixIn):

    def setUp(self):

    def tearDown(self):

    def test_image_get_index(self):

    def test_create_image_with_null_min_disk_min_ram(self):

    def test_get_index_sort_name_asc(self):

    def test_get_index_sort_status_desc(self):

    def test_get_index_sort_disk_format_asc(self):

    def test_get_index_sort_container_format_desc(self):

    def test_get_index_sort_size_asc(self):

    def test_get_index_sort_created_at_asc(self):

    def test_get_index_sort_updated_at_desc(self):

    def test_image_get_index_marker(self):

    def test_image_get_index_limit(self):

    def test_image_get_index_marker_limit(self):

    def test_image_get_index_limit_None(self):

    def test_image_get_index_by_name(self):

    def test_image_get_is_public_v2(self):

    def test_image_get(self):

    def test_image_get_non_existing(self):

    def test_image_create_basic(self):

    def test_image_create_with_properties(self):

    def test_image_create_already_exists(self):

    def test_image_create_with_bad_status(self):

    def test_image_update(self):

    def test_image_update_conflict(self):

    def _test_image_update_not_existing(self):

    def test_image_destroy(self):

    def test_image_destroy_not_existing(self):

    def test_image_get_members(self):

    def test_image_get_members_not_existing(self):

    def test_image_member_find(self):

    def test_add_update_members(self):

    def test_add_delete_member(self):

class TestRegistryV2ClientApi(base.IsolatedUnitTest):

    def setUp(self):

    def tearDown(self):

    def test_configure_registry_client_not_using_use_user_token(self):

    def _get_fake_config_creds(self, auth_url='auth_url', strategy='keystone'):

    def test_configure_registry_admin_creds(self):

    def test_configure_registry_admin_creds_with_auth_url(self):

\OpenStack\glance-2014.1\glance\tests\unit\v2\test_schemas_resource.py

class TestSchemasController(test_utils.BaseTestCase):

    def setUp(self):

    def test_image(self):

    def test_images(self):

\OpenStack\glance-2014.1\glance\tests\unit\v2\test_tasks_resource.py

def _db_fixture(task_id, **kwargs):

def _domain_fixture(task_id, **kwargs):

class TestTasksController(test_utils.BaseTestCase):

    def setUp(self):

    def _create_tasks(self):

    def test_index(self):

    def test_index_admin(self):

    def test_index_return_parameters(self):

    def test_index_next_marker(self):

    def test_index_no_next_marker(self):

    def test_index_with_id_filter(self):

    def test_index_with_filters_return_many(self):

    def test_index_with_many_filters(self):

    def test_index_with_marker(self):

    def test_index_with_limit(self):

    def test_index_greater_than_limit_max(self):

    def test_index_default_limit(self):

    def test_index_with_sort_dir(self):

    def test_index_with_sort_key(self):

    def test_index_with_marker_not_found(self):

    def test_index_with_marker_is_not_like_uuid(self):

    def test_index_invalid_sort_key(self):

    def test_index_zero_tasks(self):

    def test_get(self):

    def test_get_non_existent(self):

    def test_get_not_allowed(self):

    def test_create(self):

class TestTasksControllerPolicies(base.IsolatedUnitTest):

    def setUp(self):

    def test_index_unauthorized(self):

    def test_get_unauthorized(self):

    def test_create_task_unauthorized(self):

    def test_delete(self):

class TestTasksDeserializer(test_utils.BaseTestCase):

    def setUp(self):

    def test_create_no_body(self):

    def test_create(self):

    def test_index(self):

    def test_index_strip_params_from_filters(self):

    def test_index_with_many_filter(self):

    def test_index_with_filter_and_limit(self):

    def test_index_non_integer_limit(self):

    def test_index_zero_limit(self):

    def test_index_negative_limit(self):

    def test_index_fraction(self):

    def test_index_invalid_status(self):

    def test_index_marker(self):

    def test_index_marker_not_specified(self):

    def test_index_limit_not_specified(self):

    def test_index_sort_key_id(self):

    def test_index_sort_dir_asc(self):

    def test_index_sort_dir_bad_value(self):

class TestTasksSerializer(test_utils.BaseTestCase):

    def setUp(self):

    def test_index(self):

    def test_index_next_marker(self):

    def test_index_carries_query_parameters(self):

    def test_get(self):

    def test_get_ensure_expires_at_not_returned(self):

    def test_create(self):

    def test_create_ensure_expires_at_is_not_returned(self):

\OpenStack\glance-2014.1\glance\tests\unit\v2\__init__.py

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

OpenStack Index

Previous

Next