image.v2 package¶
Subpackages¶
- image.v2.admin package
- Submodules
- image.v2.admin.test_image_caching module
- image.v2.admin.test_image_task module
- image.v2.admin.test_images module
- image.v2.admin.test_images_metadefs_namespace_objects module
- image.v2.admin.test_images_metadefs_namespace_properties module
- image.v2.admin.test_images_metadefs_namespace_tags module
- image.v2.admin.test_images_metadefs_namespaces module
- image.v2.admin.test_images_metadefs_resource_types module
- Module contents
Submodules¶
image.v2.test_images module¶
- class BasicOperationsImagesTest(*args, **kwargs)[source]¶
Bases:
BaseV2ImageTest
Here we test the basic operations of images
- test_deactivate_reactivate_image()[source]¶
Test idempotent id: 951ebe01-969f-4ea9-9898-8a3f1f442ab0
Test deactivating and reactivating an image
- test_delete_image()[source]¶
Test idempotent id: f848bb94-1c6e-45a4-8726-39e3a5b23535
Test deleting an image by image_id
- class ImageLocationsTest(*args, **kwargs)[source]¶
Bases:
BaseV2ImageTest
- class ImportImagesTest(*args, **kwargs)[source]¶
Bases:
BaseV2ImageTest
Here we test the import operations for image
- test_image_glance_direct_import()[source]¶
Test idempotent id: 32ca0c20-e16f-44ac-8590-07869c9b4cc2
Test ‘glance-direct’ import functionalities
Create image, stage image data, import image and verify that import succeeded.
- test_image_glance_download_import_bad_endpoint()[source]¶
Test idempotent id: 77644240-dbbe-4744-ae28-09b2ac12e218
- test_image_glance_download_import_bad_missing_image()[source]¶
Test idempotent id: c7edec8e-24b5-416a-9d42-b3e773bab62c
- test_image_glance_download_import_bad_uuid()[source]¶
Test idempotent id: 36d4b546-64a2-4bb9-bdd0-ba676aa48f2c
- test_image_glance_download_import_success()[source]¶
Test idempotent id: 8876c818-c40e-4b90-9742-31d231616305
- test_image_web_download_import()[source]¶
Test idempotent id: f6feb7a4-b04f-4706-a011-206129f83e62
Test ‘web-download’ import functionalities
Create image, import image and verify that import succeeded.
- test_remote_delete()[source]¶
Test idempotent id: 44d60544-1524-42f7-8899-315301105dd8
Test image delete against a different worker than stage.
This creates and stages an image against the primary API worker, but then calls delete on a secondary worker (if available) to test that distributed image import works (i.e. proxies the delete request to the proper worker).
- test_remote_import()[source]¶
Test idempotent id: e04761a1-22af-42c2-b8bc-a34a3f12b585
Test image import against a different worker than stage.
This creates and stages an image against the primary API worker, but then calls import on a secondary worker (if available) to test that distributed image import works (i.e. proxies the import request to the proper worker).
Bases:
BaseV2ImageTest
Here we test the listing of a shared image information
Test idempotent id: 3fa50be4-8e38-4c02-a8db-7811bb780122
Test listing images by member_status and visibility
- class ListUserImagesTest(*args, **kwargs)[source]¶
Bases:
BaseV2ImageTest
Here we test the listing of image information
- test_get_image_schema()[source]¶
Test idempotent id: 622b925c-479f-4736-860d-adeaf13bc371
Test to get image schema
- test_get_images_schema()[source]¶
Test idempotent id: 25c8d7b2-df21-460f-87ac-93130bcdc684
Test to get images schema
Test idempotent id: d43f3efc-da4c-4af9-b636-868f0c6acedb
- test_list_image_param_owner()[source]¶
Test idempotent id: e9a44b91-31c8-4b40-a332-e0a39ffb4dbb
Test to get images by owner
- test_list_images_param_container_format()[source]¶
Test idempotent id: 9959ca1d-1aa7-4b7a-a1ea-0fff0499b37e
Test to get all images with a specific container_format
- test_list_images_param_disk_format()[source]¶
Test idempotent id: 4a4735a7-f22f-49b6-b0d9-66e1ef7453eb
Test to get all images with disk_format = raw
- test_list_images_param_limit()[source]¶
Test idempotent id: e914a891-3cc8-4b40-ad32-e0a39ffbddbb
Test to get images by limit
- test_list_images_param_min_max_size()[source]¶
Test idempotent id: 4ad8c157-971a-4ba8-aa84-ed61154b1e7f
Test to get all images with min size and max size
- test_list_images_param_name()[source]¶
Test idempotent id: 55c8f5f5-bfed-409d-a6d5-4caeda985d7b
Test to get images by name
- test_list_images_param_size()[source]¶
Test idempotent id: cf1b9a48-8340-480e-af7b-fe7e17690876
Test to get all images by size
- test_list_images_param_sort()[source]¶
Test idempotent id: eeadce49-04e0-43b7-aec7-52535d903e7a
Test listing images sorting in descending order
- test_list_images_param_sort_key_dir()[source]¶
Test idempotent id: 9faaa0c2-c3a5-43e1-8f61-61c54b409a49
Test listing images sorting by size in descending order
- test_list_images_param_status()[source]¶
Test idempotent id: 7fc9e369-0f58-4d05-9aa5-0969e2d59d15
Test to get all active images
- test_list_images_param_tag()[source]¶
Test idempotent id: aa8ac4df-cff9-418b-8d0f-dd9c67b072c9
Test to get images matching a tag
- test_list_images_param_visibility()[source]¶
Test idempotent id: 7a95bb92-d99e-4b12-9718-7bc6ab73e6d2
Test to get all images with visibility = private
- test_list_no_params()[source]¶
Test idempotent id: 1e341d7a-90a9-494c-b143-2cdf2aeb6aee
Simple test to see all fixture images returned
Test idempotent id: fdb96b81-257b-42ac-978b-ddeefa3760e4
- class MultiStoresImportImagesTest(*args, **kwargs)[source]¶
Bases:
BaseV2ImageTest
Test importing image in multiple stores
image.v2.test_images_dependency module¶
- class ImageDependencyTests(*args, **kwargs)[source]¶
Bases:
BaseV2ImageTest
,BaseV2ComputeTest
,ScenarioTest
Test image, instance, and snapshot dependency.
The tests create image and remove the base image that other snapshots were depend on.In OpenStack, images and snapshots should be separate, but in some configurations like Glance with Ceph storage, there were cases where images couldn’t be removed. This was fixed in glance store for RBD backend.
- Dependency scenarios:
image > instance -> snapshot dependency
NOTE: volume -> image dependencies tests are in cinder-tempest-plugin
- test_image_volume_server_snapshot_dependency()[source]¶
Test idempotent id: f0c8a35d-8f8f-443c-8bcb-85a9c0f87d19
Test with image > volume > instance > snapshot dependency.
We are going to perform the following steps in the test: * Create image * Create a bootable volume from Image * Launch an instance from the bootable volume * Take snapshot of the instance – which creates the volume snapshot * Delete the image.
This will test the dependency chain of image -> volume -> snapshot.
image.v2.test_images_formats module¶
- class ImagesFormatTest(*args, **kwargs)[source]¶
Bases:
BaseV2ImageTest
,BaseV2ComputeTest
- test_accept_reject_formats_import()[source]¶
Test idempotent id: 7c7c2f16-2e97-4dce-8cb4-bc10be031c85
Make sure glance rejects invalid images during conversion.
image.v2.test_images_member module¶
- class ImagesMemberTest(*args, **kwargs)[source]¶
Bases:
BaseV2MemberImageTest
Test image members
- test_get_image_member()[source]¶
Test idempotent id: a6ee18b9-4378-465e-9ad9-9a6de58a3287
Test getting image members after the image is accepted
- test_get_image_member_schema()[source]¶
Test idempotent id: 634dcc3f-f6e2-4409-b8fd-354a0bb25d83
Test getting image member schema
- test_get_image_members_schema()[source]¶
Test idempotent id: 6ae916ef-1052-4e11-8d36-b3ae14853cbb
Test getting image members schema
Test idempotent id: 5934c6ea-27dc-4d6e-9421-eeb5e045494a
Test sharing and accepting an image
Test idempotent id: d9e83e5f-3524-4b38-a900-22abcb26e90e
Test sharing and rejecting an image
image.v2.test_images_member_negative module¶
- class ImagesMemberNegativeTest(*args, **kwargs)[source]¶
Bases:
BaseV2MemberImageTest
Negative tests of image members
Test idempotent id: b79efb37-820d-4cf0-b54c-308b00cf842c
Test updating image member status to invalid status should fail
Test idempotent id: 27002f74-109e-4a37-acd0-f91cd4597967
Test that image owner can’t accept image shared to other member
image.v2.test_images_metadefs_schema module¶
- class MetadataSchemaTest(*args, **kwargs)[source]¶
Bases:
BaseV2ImageTest
Test to get image metadata schema
- test_get_metadata_namespace_schema()[source]¶
Test idempotent id: e9e44891-3cb8-3b40-a532-e0a39fea3dab
Test to get image namespace schema
- test_get_metadata_namespaces_schema()[source]¶
Test idempotent id: ffe44891-678b-3ba0-a3e2-e0a3967b3aeb
Test to get image namespaces schema
- test_get_metadata_object_schema()[source]¶
Test idempotent id: dff4a891-b38b-3bf0-a3b2-e03ee67b3a3b
Test to get image object schema
- test_get_metadata_objects_schema()[source]¶
Test idempotent id: dee4a891-b38b-3bf0-a3b2-e03ee67b3a3c
Test to get image objects schema
- test_get_metadata_properties_schema()[source]¶
Test idempotent id: dce4a891-b38b-3bf0-a3b2-e03ee67b3a3e
Test to get image properties schema
- test_get_metadata_property_schema()[source]¶
Test idempotent id: dae4a891-b38b-3bf0-a3b2-e03ee67b3a3d
Test to get image property schema
- test_get_metadata_resource_type_schema()[source]¶
Test idempotent id: fde34891-678b-3b40-ae32-e0a3e67b6beb
Test to get image resource_type schema
- test_get_metadata_resources_types_schema()[source]¶
Test idempotent id: dfe4a891-b38b-3bf0-a3b2-e03ee67b3a3a
Test to get image resource_types schema
image.v2.test_images_negative module¶
- class ImagesNegativeTest(*args, **kwargs)[source]¶
Bases:
BaseV2ImageTest
here we have -ve tests for show_image and delete_image api
- Tests
** get non-existent image ** get image with image_id=NULL ** get the deleted image ** delete non-existent image ** delete image with image_id=NULL ** delete the deleted image
- test_create_image_reserved_property()[source]¶
Test idempotent id: e3fb7df8-2742-4143-8976-f1b26870f0a0
Attempt to create an image with a reserved property.
Glance bans some internal-use-only properties such that they will cause an image create to fail. Since os_glance_* is banned, we can use a key in that namespace here.
- test_delete_image_null_id()[source]¶
Test idempotent id: 32248db1-ab88-4821-9604-c7c369f1f88c
Delete image with image_id=NULL
- test_delete_non_existing_image()[source]¶
Test idempotent id: 6fe40f1c-57bd-4918-89cc-8500f850f3de
Delete non-existent image
- test_delete_protected_image()[source]¶
Test idempotent id: ab980a34-8410-40eb-872b-f264752f46e5
Create a protected image
- test_get_delete_deleted_image()[source]¶
Test idempotent id: e57fc127-7ba0-4693-92d7-1d8a05ebcba9
Get and delete the deleted image
- test_get_image_null_id()[source]¶
Test idempotent id: ef45000d-0a72-4781-866d-4cb7bf2562ad
Get image with image_id = NULL
- test_get_non_existent_image()[source]¶
Test idempotent id: 668743d5-08ad-4480-b2b8-15da34f81d9f
Get the non-existent image
- test_register_with_invalid_container_format()[source]¶
Test idempotent id: 292bd310-369b-41c7-a7a3-10276ef76753
Create image with invalid container format
Negative tests for invalid data supplied to POST /images
- test_register_with_invalid_disk_format()[source]¶
Test idempotent id: 70c6040c-5a97-4111-9e13-e73665264ce1
Create image with invalid disk format
- test_update_image_reserved_property()[source]¶
Test idempotent id: a0ae75d4-ce9c-4576-b823-aba04c8acabd
Attempt to add a reserved property to an image.
Glance bans some internal-use-only properties such that they will cause a PATCH to fail. Since os_glance_* is banned, we can use a key in that namespace here.