volume package¶
Subpackages¶
- volume.admin package
- Submodules
- volume.admin.test_backends_capabilities module
- volume.admin.test_encrypted_volumes_extend module
- volume.admin.test_group_snapshots module
- volume.admin.test_group_type_specs module
- volume.admin.test_group_types module
- volume.admin.test_groups module
- volume.admin.test_multi_backend module
- volume.admin.test_qos module
QosSpecsTestJSON
QosSpecsTestJSON.test_associate_disassociate_qos()
QosSpecsTestJSON.test_create_delete_qos_with_back_end_consumer()
QosSpecsTestJSON.test_create_delete_qos_with_both_consumer()
QosSpecsTestJSON.test_create_delete_qos_with_front_end_consumer()
QosSpecsTestJSON.test_get_qos()
QosSpecsTestJSON.test_list_qos()
QosSpecsTestJSON.test_set_unset_qos_key()
- volume.admin.test_snapshot_manage module
- volume.admin.test_snapshots_actions module
SnapshotsActionsTest
SnapshotsActionsTest.test_reset_snapshot_status()
SnapshotsActionsTest.test_snapshot_force_delete_when_snapshot_is_creating()
SnapshotsActionsTest.test_snapshot_force_delete_when_snapshot_is_deleting()
SnapshotsActionsTest.test_snapshot_force_delete_when_snapshot_is_error()
SnapshotsActionsTest.test_snapshot_force_delete_when_snapshot_is_error_deleting()
SnapshotsActionsTest.test_update_snapshot_status()
- volume.admin.test_user_messages module
- volume.admin.test_volume_hosts module
- volume.admin.test_volume_manage module
- volume.admin.test_volume_pools module
- volume.admin.test_volume_quota_classes module
- volume.admin.test_volume_quotas module
VolumeQuotasAdminTestJSON
VolumeQuotasAdminTestJSON.test_delete_quota()
VolumeQuotasAdminTestJSON.test_list_default_quotas()
VolumeQuotasAdminTestJSON.test_list_quotas()
VolumeQuotasAdminTestJSON.test_quota_usage()
VolumeQuotasAdminTestJSON.test_quota_usage_after_volume_transfer()
VolumeQuotasAdminTestJSON.test_show_quota_usage()
VolumeQuotasAdminTestJSON.test_update_all_quota_resources_for_tenant()
- volume.admin.test_volume_quotas_negative module
- volume.admin.test_volume_retype module
- volume.admin.test_volume_services module
- volume.admin.test_volume_services_negative module
VolumeServicesNegativeTest
VolumeServicesNegativeTest.test_disable_log_reason_with_no_reason()
VolumeServicesNegativeTest.test_disable_service_with_invalid_binary()
VolumeServicesNegativeTest.test_enable_service_with_invalid_host()
VolumeServicesNegativeTest.test_freeze_host_with_invalid_host()
VolumeServicesNegativeTest.test_thaw_host_with_invalid_host()
- volume.admin.test_volume_snapshot_quotas_negative module
- volume.admin.test_volume_type_access module
- volume.admin.test_volume_types module
- volume.admin.test_volume_types_extra_specs module
- volume.admin.test_volume_types_extra_specs_negative module
ExtraSpecsNegativeTest
ExtraSpecsNegativeTest.test_create_invalid_body()
ExtraSpecsNegativeTest.test_create_none_body()
ExtraSpecsNegativeTest.test_create_nonexistent_type_id()
ExtraSpecsNegativeTest.test_delete_nonexistent_volume_type_id()
ExtraSpecsNegativeTest.test_get_nonexistent_extra_spec_name()
ExtraSpecsNegativeTest.test_get_nonexistent_volume_type_id()
ExtraSpecsNegativeTest.test_list_nonexistent_volume_type_id()
ExtraSpecsNegativeTest.test_update_multiple_extra_spec()
ExtraSpecsNegativeTest.test_update_no_body()
ExtraSpecsNegativeTest.test_update_none_extra_spec_id()
ExtraSpecsNegativeTest.test_update_nonexistent_extra_spec_id()
ExtraSpecsNegativeTest.test_update_nonexistent_type_id()
- volume.admin.test_volume_types_negative module
VolumeTypesNegativeTest
VolumeTypesNegativeTest.test_create_volume_type_encryption_nonexistent_type_id()
VolumeTypesNegativeTest.test_create_volume_with_private_volume_type()
VolumeTypesNegativeTest.test_create_with_empty_name()
VolumeTypesNegativeTest.test_create_with_repeated_name()
VolumeTypesNegativeTest.test_delete_nonexistent_type_id()
VolumeTypesNegativeTest.test_get_nonexistent_type_id()
- volume.admin.test_volumes_actions module
VolumesActionsTest
VolumesActionsTest.test_force_detach_volume()
VolumesActionsTest.test_volume_force_delete_when_volume_is_attaching()
VolumesActionsTest.test_volume_force_delete_when_volume_is_creating()
VolumesActionsTest.test_volume_force_delete_when_volume_is_error()
VolumesActionsTest.test_volume_force_delete_when_volume_is_maintenance()
VolumesActionsTest.test_volume_reset_status()
- volume.admin.test_volumes_backup module
- volume.admin.test_volumes_list module
- Module contents
Submodules¶
volume.api_microversion_fixture module¶
volume.base module¶
- class BaseVolumeAdminTest(*args, **kwargs)[source]¶
Bases:
BaseVolumeTest
Base test case class for all Volume Admin API tests.
- class BaseVolumeTest(*args, **kwargs)[source]¶
Bases:
BaseMicroversionTest
,BaseTestCase
Base test case class for all Cinder API tests.
volume.test_availability_zone module¶
volume.test_extensions module¶
volume.test_image_metadata module¶
volume.test_snapshot_metadata module¶
volume.test_versions module¶
volume.test_volume_absolute_limits module¶
volume.test_volume_delete_cascade module¶
- class VolumesDeleteCascade(*args, **kwargs)[source]¶
Bases:
BaseVolumeTest
Delete a volume with associated snapshots.
Cinder provides the ability to delete a volume with its associated snapshots. It is allow a volume and its snapshots to be removed in one operation both for usability and performance reasons.
- test_volume_delete_cascade()[source]¶
Test idempotent id: 994e2d40-de37-46e8-b328-a58fba7e4a95
Test deleting a volume with associated snapshots
The case validates the ability to delete a volume with associated snapshots.
- test_volume_from_snapshot_cascade_delete()[source]¶
Test idempotent id: 59a77ede-609b-4ee8-9f68-fc3c6ffe97b5
Test deleting a volume with associated volume-associated snapshot
The case validates the ability to delete a volume with associated snapshot while there is another volume created from that snapshot.
volume.test_volume_metadata module¶
volume.test_volume_transfers module¶
- class VolumesTransfersTest(*args, **kwargs)[source]¶
Bases:
BaseVolumeTest
Test volume transfer
- class VolumesTransfersV355Test(*args, **kwargs)[source]¶
Bases:
VolumesTransfersTest
Test volume transfer for the “new” Transfers API mv 3.55
- class VolumesTransfersV357Test(*args, **kwargs)[source]¶
Bases:
VolumesTransfersV355Test
Test volume transfer for the “new” Transfers API mv 3.57
volume.test_volumes_actions module¶
- class VolumesActionsTest(*args, **kwargs)[source]¶
Bases:
BaseVolumeTest
Test volume actions
- test_attach_detach_volume_to_instance()[source]¶
Test idempotent id: fff42874-7db5-4487-a8e1-ddda5fb5288d
Test attaching and detaching volume to instance
- test_get_volume_attachment()[source]¶
Test idempotent id: 9516a2c8-9135-488c-8dd6-5677a7e5f371
Test getting volume attachments
Attach a volume to a server, and then retrieve volume’s attachments info.
- test_reserve_unreserve_volume()[source]¶
Test idempotent id: 92c4ef64-51b2-40c0-9f7e-4749fbaaba33
Test reserving and unreserving volume
- test_volume_bootable()[source]¶
Test idempotent id: 63e21b4c-0a0c-41f6-bfc3-7c2816815599
Test setting and retrieving bootable flag of a volume
volume.test_volumes_backup module¶
- class VolumesBackupsTest(*args, **kwargs)[source]¶
Bases:
BaseVolumeTest
Test volumes backup
- test_backup_create_attached_volume()[source]¶
Test idempotent id: 07af8f6d-80af-44c9-a5dc-c8427b1b62e6
Test backup create using force flag.
Cinder allows to create a volume backup, whether the volume status is “available” or “in-use”.
- test_bootable_volume_backup_and_restore()[source]¶
Test idempotent id: 2a8ba340-dff2-4511-9db7-646f07156b15
Test backuping and restoring a bootable volume
Create volume1 from image
Create backup1 from volume1
Restore backup1
Verify the restored backup volume is bootable
- test_volume_backup_create_get_detailed_list_restore_delete()[source]¶
Test idempotent id: a66eb488-8ee1-47d4-8e9f-575a095728c6
Test create/get/list/restore/delete volume backup
Create volume1 with metadata
Create backup1 from volume1
Show backup1
List backups with detail
Restore backup1
Verify backup1 has been restored successfully with the metadata of volume1
volume.test_volumes_clone module¶
volume.test_volumes_clone_negative module¶
volume.test_volumes_extend module¶
- class BaseVolumesExtendAttachedTest(*args, **kwargs)[source]¶
Bases:
BaseVolumeTest
Tests extending the size of an attached volume.
volume.test_volumes_get module¶
- class VolumesGetTest(*args, **kwargs)[source]¶
Bases:
BaseVolumeTest
Test getting volume info
- test_volume_create_get_update_delete()[source]¶
Test idempotent id: 27fb0e9f-fb64-41dd-8bdb-1ffa762f0d51
Test Create/Get/Update/Delete of a blank volume
volume.test_volumes_list module¶
- class VolumesListTestJSON(*args, **kwargs)[source]¶
Bases:
BaseVolumeTest
Test listing volumes
NOTE: This test creates a number of 1G volumes. To run it successfully, ensure that the backing file for the volume group that Cinder uses has space for at least 3 1G volumes! If you are running a Devstack environment, ensure that the VOLUME_BACKING_FILE_SIZE is at least 4G in your localrc
- test_volume_list()[source]¶
Test idempotent id: 0b6ddd39-b948-471f-8038-4787978747c4
Test getting a list of volumes
- test_volume_list_by_name()[source]¶
Test idempotent id: a28e8da4-0b56-472f-87a8-0f4d3f819c02
Test getting a list of volumes filtered by volume name
- test_volume_list_details_by_name()[source]¶
Test idempotent id: 2de3a6d4-12aa-403b-a8f2-fdeb42a89623
Test getting a list of detailed volumes filtered by volume name
- test_volume_list_details_pagination()[source]¶
Test idempotent id: e9138a2c-f67b-4796-8efa-635c196d01de
Test listing volumes with details by pagination
All volumes will be returned by multiple requests, and the number of ‘limit’ volumes will be returned at a time.
- test_volume_list_details_with_multiple_params()[source]¶
Test idempotent id: 2a7064eb-b9c3-429b-b888-33928fc5edd3
Test listing volumes detail using combined filtering condition
- test_volume_list_pagination()[source]¶
Test idempotent id: af55e775-8e4b-4feb-8719-215c43b0238c
Test listing volumes by pagination
All volumes will be returned by multiple requests, and the number of ‘limit’ volumes will be returned at a time.
- test_volume_list_param_display_name_and_status()[source]¶
Test idempotent id: 777c87c1-2fc4-4883-8b8e-5c0b951d1ec8
Test listing volume when display name and status param is given
- test_volume_list_with_detail_param_display_name_and_status()[source]¶
Test idempotent id: 856ab8ca-6009-4c37-b691-be1065528ad4
Test listing volume when name and status param is given
- test_volume_list_with_detail_param_marker()[source]¶
Test idempotent id: 46eff077-100b-427f-914e-3db2abcdb7e2
Test listing volumes with details from the specified marker
Choose a volume id from all volumes as a marker, list volumes with that marker, only volumes with id greater than marker will be returned.
- test_volume_list_with_detail_param_metadata()[source]¶
Test idempotent id: 1ca92d3c-4a8e-4b43-93f5-e4c7fb3b291d
Test listing volumes details when metadata param is given
- test_volume_list_with_details()[source]¶
Test idempotent id: adcbb5a7-5ad8-4b61-bd10-5380e111a877
Test getting a list of detailed volumes
- test_volume_list_with_param_metadata()[source]¶
Test idempotent id: b5ebea1b-0603-40a0-bb41-15fcd0a53214
Test listing volumes when metadata param is given
- test_volumes_list_by_availability_zone()[source]¶
Test idempotent id: c0cfa863-3020-40d7-b587-e35f597d5d87
Test getting a list of volumes filtered by availability zone
- test_volumes_list_by_bootable()[source]¶
Test idempotent id: 2016a942-3020-40d7-95ce-7613bf8407ce
Check out volumes.
This test function is aim at check out whether all of the volumes in volume_list are not a bootable volume.
- test_volumes_list_by_status()[source]¶
Test idempotent id: 39654e13-734c-4dab-95ce-7613bf8407ce
Test getting a list of volumes filtered by volume status
- test_volumes_list_details_by_availability_zone()[source]¶
Test idempotent id: e1b80d13-94f0-4ba2-a40e-386af29f8db1
Test getting a list of detailed volumes by availability zone
volume.test_volumes_negative module¶
- class VolumesNegativeTest(*args, **kwargs)[source]¶
Bases:
BaseVolumeTest
Negative tests of volumes
- test_attach_volumes_with_nonexistent_volume_id()[source]¶
Test idempotent id: f5e56b0a-5d02-43c1-a2a7-c9b792c2e3f6
Test attaching non existent volume to server should fail
- test_create_volume_from_deactivated_image()[source]¶
Test idempotent id: d15e7f35-2cfc-48c8-9418-c8223a89bcbb
Test creating volume from deactivated image should fail
- test_create_volume_from_image_with_decreasing_size()[source]¶
Test idempotent id: 5b810c91-0ad1-47ce-aee8-615f789be78f
Test creating volume from image with decreasing size should fail
- test_create_volume_with_invalid_size()[source]¶
Test idempotent id: 1ed83a8a-682d-4dfb-a30e-ee63ffd6c049
Test creating volume with invalid size should fail
- test_create_volume_with_nonexistent_snapshot_id()[source]¶
Test idempotent id: 0c36f6ae-4604-4017-b0a9-34fdc63096f9
Test creating volume with non existent snapshot should fail
- test_create_volume_with_nonexistent_source_volid()[source]¶
Test idempotent id: 47c73e08-4be8-45bb-bfdf-0c4e79b88344
Test creating volume with non existent source volume should fail
- test_create_volume_with_nonexistent_volume_type()[source]¶
Test idempotent id: 10254ed8-3849-454e-862e-3ab8e6aa01d2
Test creating volume with non existent volume type should fail
- test_create_volume_with_size_negative()[source]¶
Test idempotent id: 8b472729-9eba-446e-a83b-916bdb34bef7
Test creating volume with negative size should fail
- test_create_volume_with_size_zero()[source]¶
Test idempotent id: 41331caa-eaf4-4001-869d-bc18c1869360
Test creating volume with zero size should fail
- test_create_volume_without_passing_size()[source]¶
Test idempotent id: 9387686f-334f-4d31-a439-33494b9e2683
Test creating volume with empty size should fail
- test_delete_invalid_volume_id()[source]¶
Test idempotent id: 1f035827-7c32-4019-9240-b4ec2dbd9dfd
Test deleting volume with invalid volume id should fail
- test_delete_volume_without_passing_volume_id()[source]¶
Test idempotent id: 441a1550-5d44-4b30-af0f-a6d402f52026
Test deleting volume with empty volume id should fail
- test_detach_volumes_with_invalid_volume_id()[source]¶
Test idempotent id: 9f9c24e4-011d-46b5-b992-952140ce237a
Test detaching volume with invalid volume id should fail
- test_get_invalid_volume_id()[source]¶
Test idempotent id: 30799cfd-7ee4-446c-b66c-45b383ed211b
Test getting volume with invalid volume id should fail
- test_get_volume_without_passing_volume_id()[source]¶
Test idempotent id: c6c3db06-29ad-4e91-beb0-2ab195fe49e3
Test getting volume with empty volume id should fail
- test_list_volumes_detail_with_invalid_status()[source]¶
Test idempotent id: ba94b27b-be3f-496c-a00e-0283b373fa75
Test listing volume details with invalid status
Listing volume details with invalid status should get nothing
- test_list_volumes_detail_with_nonexistent_name()[source]¶
Test idempotent id: 9ca17820-a0e7-4cbd-a7fa-f4468735e359
Test listing volume details with non existent name
Listing volume details with non existent name should get nothing.
- test_list_volumes_with_invalid_status()[source]¶
Test idempotent id: 143b279b-7522-466b-81be-34a87d564a7c
Test listing volumes with invalid status should get nothing
- test_list_volumes_with_nonexistent_name()[source]¶
Test idempotent id: 0f4aa809-8c7b-418f-8fb3-84c7a5dfc52f
Test listing volumes with non existent name should get nothing
- test_reserve_volume_with_negative_volume_status()[source]¶
Test idempotent id: 449c4ed2-ecdd-47bb-98dc-072aeccf158c
Test reserving already reserved volume should fail
- test_reserve_volume_with_nonexistent_volume_id()[source]¶
Test idempotent id: ac6084c0-0546-45f9-b284-38a367e0e0e2
Test reserving non existent volume should fail
- test_unreserve_volume_with_nonexistent_volume_id()[source]¶
Test idempotent id: eb467654-3dc1-4a72-9b46-47c29d22654c
Test unreserving non existent volume should fail
- test_update_volume_with_empty_volume_id()[source]¶
Test idempotent id: 72aeca85-57a5-4c1f-9057-f320f9ea575b
Test updating volume with empty volume id should fail
- test_update_volume_with_invalid_volume_id()[source]¶
Test idempotent id: e66e40d6-65e6-4e75-bdc7-636792fa152d
Test updating volume with invalid volume id should fail
- test_update_volume_with_nonexistent_volume_id()[source]¶
Test idempotent id: 0186422c-999a-480e-a026-6a665744c30c
Test updating non existent volume should fail
- test_volume_delete_nonexistent_volume_id()[source]¶
Test idempotent id: 555efa6e-efcd-44ef-8a3b-4a7ca4837a29
Test deleting non existent volume should fail
- test_volume_extend_with_None_size()[source]¶
Test idempotent id: 355218f1-8991-400a-a6bb-971239287d92
Test extending volume with none size should fail
- test_volume_extend_with_non_number_size()[source]¶
Test idempotent id: 5d0b480d-e833-439f-8a5a-96ad2ed6f22f
Test extending volume with non-integer size should fail
- test_volume_extend_with_nonexistent_volume_id()[source]¶
Test idempotent id: 8f05a943-013c-4063-ac71-7baf561e82eb
Test extending non existent volume should fail
- test_volume_extend_with_size_smaller_than_original_size()[source]¶
Test idempotent id: e0c75c74-ee34-41a9-9288-2a2051452854
Test extending volume with decreasing size should fail
volume.test_volumes_snapshots module¶
- class VolumesSnapshotTestJSON(*args, **kwargs)[source]¶
Bases:
BaseVolumeTest
Test volume snapshots
- test_snapshot_backup()[source]¶
Test idempotent id: bbcfa285-af7f-479e-8c1a-8c34fc16543c
Test creating backup from snapshot and volume
Create snapshot1 from volume1
Create backup from volume1 and snapshot1
Check the created backup’s volume is volume1 and snapshot is snapshot1
- test_snapshot_create_delete_with_volume_in_use()[source]¶
Test idempotent id: 8567b54c-4455-446d-a1cf-651ddeaa3ff2
Test create/delete snapshot from volume attached to server
- test_snapshot_create_get_list_update_delete()[source]¶
Test idempotent id: 2a8abbe4-d871-46db-b049-c41f5af8216e
Test create/get/list/update/delete snapshot
- test_snapshot_create_offline_delete_online()[source]¶
Test idempotent id: 5210a1de-85a0-11e6-bb21-641c676a5d61
Test creating snapshots when volume is detached and attached
Create snapshot1 from volume1(not attached to any server)
Attach volume1 to server1
Create snapshot2 and snapshot3 from volume1
Delete snapshot3, snapshot1, snapshot2
volume.test_volumes_snapshots_list module¶
- class VolumesSnapshotListTestJSON(*args, **kwargs)[source]¶
Bases:
BaseVolumeTest
Test listing volume snapshots
- test_snapshot_list_param_limit()[source]¶
Test idempotent id: db4d8e0a-7a2e-41cc-a712-961f6844e896
Test listing snapshot with limit returns the limited elements
If listing snapshots with limit=1, then 1 snapshot is returned.
- test_snapshot_list_param_limit_equals_infinite()[source]¶
Test idempotent id: a1427f61-420e-48a5-b6e3-0b394fa95400
Test listing snapshot with infinite limit
If listing snapshots with limit greater than the count of all snapshots, then all snapshots are returned.
- test_snapshot_list_param_limit_equals_zero()[source]¶
Test idempotent id: e3b44b7f-ae87-45b5-8a8c-66110eb24d0a
Test listing snapshot with zero limit should return empty list
- test_snapshot_list_param_marker()[source]¶
Test idempotent id: 05489dde-44bc-4961-a1f5-3ce7ee7824f7
Test listing snapshots with marker
The list of snapshots should end before the provided marker
- test_snapshot_list_param_offset()[source]¶
Test idempotent id: ca96d551-17c6-4e11-b0e8-52d3bb8a63c7
Test listing snapshots with offset and limit
If listing snapshots with offset=2 and limit=3, then at most 3(limit) snapshots located in the position 2(offset) in the all snapshots list should be returned. (The items in the all snapshots list start from position 0.)
- test_snapshot_list_param_sort_created_at_asc()[source]¶
Test idempotent id: 4052c3a0-2415-440a-a8cc-305a875331b0
Test listing snapshots sort by created_at ascendingly
- test_snapshot_list_param_sort_created_at_desc()[source]¶
Test idempotent id: dcbbe24a-f3c0-4ec8-9274-55d48db8d1cf
Test listing snapshots sort by created_at descendingly
- test_snapshot_list_param_sort_id_asc()[source]¶
Test idempotent id: c5513ada-64c1-4d28-83b9-af3307ec1388
Test listing snapshots sort by id ascendingly
- test_snapshot_list_param_sort_id_desc()[source]¶
Test idempotent id: 8a7fe058-0b41-402a-8afd-2dbc5a4a718b
Test listing snapshots sort by id descendingly
- test_snapshot_list_param_sort_name_asc()[source]¶
Test idempotent id: d58b5fed-0c37-42d3-8c5d-39014ac13c00
Test listing snapshots sort by display_name ascendingly
- test_snapshot_list_param_sort_name_desc()[source]¶
Test idempotent id: 96ba6f4d-1f18-47e1-b4bc-76edc6c21250
Test listing snapshots sort by display_name descendingly
volume.test_volumes_snapshots_negative module¶
- class VolumesSnapshotNegativeTestJSON(*args, **kwargs)[source]¶
Bases:
BaseVolumeTest
Negative tests of volume snapshot
- test_create_snapshot_with_nonexistent_volume_id()[source]¶
Test idempotent id: e3e466af-70ab-4f4b-a967-ab04e3532ea7
Test creating snapshot from non existent volume should fail
- test_create_snapshot_without_passing_volume_id()[source]¶
Test idempotent id: bb9da53e-d335-4309-9c15-7e76fd5e4d6d
Test creating snapshot without passing volume_id should fail
- test_list_snapshot_invalid_param_limit()[source]¶
Test idempotent id: 8fd92339-e22f-4591-86b4-1e2215372a40
Test listing snapshots with invalid limit param should fail
- test_list_snapshots_invalid_param_marker()[source]¶
Test idempotent id: b68deeda-ca79-4a32-81af-5c51179e553a
Test listing snapshots with invalid marker should fail