image.v2 package

Subpackages

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

test_register_upload_get_image_file()[source]

Test idempotent id: 139b765e-7f3d-4b3d-8b37-3ca3876ee318

Here we test these functionalities

Register image, upload the image file, get image and get image file api’s

test_update_image()[source]

Test idempotent id: f66891a7-a35c-41a8-b590-a065c2a1caa6

Test updating an image by image_id

class ImageLocationsTest(*args, **kwargs)[source]

Bases: BaseV2ImageTest

test_location_after_upload()[source]

Test idempotent id: 58b0fadc-219d-40e1-b159-1c902cec323a

test_replace_location()[source]

Test idempotent id: bf6e0009-c039-4884-b498-db074caadb10

test_set_location()[source]

Test idempotent id: 37599b8a-d5c0-4590-aee5-73878502be15

test_set_location_bad_scheme()[source]

Test idempotent id: a9a20396-8399-4b36-909d-564949be098f

test_set_location_with_hash()[source]

Test idempotent id: 42d6f7db-c9f5-4bae-9e15-a90262fe445a

test_set_location_with_hash_not_matching()[source]

Test idempotent id: f3ce99c2-9ffb-4b9f-b2cb-876929382553

test_set_location_with_hash_second_matching()[source]

Test idempotent id: 304c8a19-aa86-47dd-a022-ec4c7f433f1b

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).

class ListSharedImagesTest(*args, **kwargs)[source]

Bases: BaseV2ImageTest

Here we test the listing of a shared image information

test_list_images_param_member_status()[source]

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_list_hidden_image()[source]

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_list_update_hidden_image()[source]

Test idempotent id: fdb96b81-257b-42ac-978b-ddeefa3760e4

class MultiStoresImportImagesTest(*args, **kwargs)[source]

Bases: BaseV2ImageTest

Test importing image in multiple stores

test_glance_direct_import_image_to_all_stores()[source]

Test idempotent id: bf04ff00-3182-47cb-833a-f1c6767b47fd

Test image is imported in all available stores

Create image, import image to all available stores using glance-direct import method and verify that import succeeded.

test_glance_direct_import_image_to_specific_stores()[source]

Test idempotent id: 82fb131a-dd2b-11ea-aec7-340286b6c574

Test image is imported in all available stores

Create image, import image to specified store(s) using glance-direct import method and verify that import succeeded.

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.

test_nova_image_snapshot_dependency()[source]

Test idempotent id: d19b0731-e98e-4103-8b0e-02f651b8f586

Test with image > instance > snapshot dependency.

Create instance snapshot and check if we able to delete base image

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_image_share_accept()[source]

Test idempotent id: 5934c6ea-27dc-4d6e-9421-eeb5e045494a

Test sharing and accepting an image

test_image_share_reject()[source]

Test idempotent id: d9e83e5f-3524-4b38-a900-22abcb26e90e

Test sharing and rejecting an image

test_remove_image_member()[source]

Test idempotent id: 72989bc7-2268-48ed-af22-8821e835c914

Test removing image members after the image is accepted

image.v2.test_images_member_negative module

class ImagesMemberNegativeTest(*args, **kwargs)[source]

Bases: BaseV2MemberImageTest

Negative tests of image members

test_image_share_invalid_status()[source]

Test idempotent id: b79efb37-820d-4cf0-b54c-308b00cf842c

Test updating image member status to invalid status should fail

test_image_share_owner_cannot_accept()[source]

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

test_get_metadata_tag_schema()[source]

Test idempotent id: dde4a891-b38b-3bf0-a3b2-e03ee67b3a3e

Test to get image tag schema

test_get_metadata_tags_schema()[source]

Test idempotent id: cde4a891-b38b-3bf0-a3b2-e03ee67b3a3a

Test to get image tags 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.

class ImportImagesNegativeTest(*args, **kwargs)[source]

Bases: BaseV2ImageTest

Here we test the import operations for image

test_image_web_download_import_with_bad_url()[source]

Test idempotent id: c52f6a77-f522-4411-8dbe-9d14f2b1ba6b

Test ‘web-download’ import functionalities

Make sure that web-download with invalid URL fails properly.

image.v2.test_images_tags module

class ImagesTagsTest(*args, **kwargs)[source]

Bases: BaseV2ImageTest

Test image tags

test_update_delete_tags_for_image()[source]

Test idempotent id: 10407036-6059-4f95-a2cd-cbbbee7ed329

Test adding and deleting image tags

image.v2.test_images_tags_negative module

class ImagesTagsNegativeTest(*args, **kwargs)[source]

Bases: BaseV2ImageTest

Negative tests of image tags

test_delete_non_existing_tag()[source]

Test idempotent id: 39c023a2-325a-433a-9eea-649bf1414b19

Delete non existing image tag

test_update_tags_for_non_existing_image()[source]

Test idempotent id: 8cd30f82-6f9a-4c6e-8034-c1b51fba43d9

Update image tag with non existing image

image.v2.test_versions module

class VersionsTest(*args, **kwargs)[source]

Bases: BaseV2ImageTest

Test image versions

test_list_versions()[source]

Test idempotent id: 659ea30a-a17c-4317-832c-0f68ed23c31d

Test listing image versions

Module contents