compute.volumes package¶
Submodules¶
compute.volumes.test_attach_volume module¶
- class AttachVolumeMultiAttachTest(*args, **kwargs)[source]¶
Bases:
BaseAttachVolumeTest
Test attaching one volume to multiple servers
Test attaching one volume to multiple servers with compute microversion greater than 2.59.
- test_boot_from_multiattach_volume()[source]¶
Test idempotent id: 65e33aa2-185b-44c8-b22e-e524973ed625
Simple test to boot an instance from a multiattach volume.
- test_boot_from_multiattach_volume_direct_lun(boot=False)[source]¶
Test idempotent id: bfe61d6e-767a-4f93-9de8-054355536475
- test_boot_with_multiattach_volume_direct_lun(boot=False)[source]¶
Test idempotent id: 07eb6686-571c-45f0-9d96-446b120f1121
- test_list_get_volume_attachments_multiattach()[source]¶
Test idempotent id: 8d5853f7-56e7-4988-9b0c-48cea3c7049a
Test listing and getting multiattached volume attachments
Attach a single volume to two servers, list attachments from the volume and make sure the server uuids are in the list, then detach the volume from servers one by one.
- class AttachVolumeShelveTestJSON(*args, **kwargs)[source]¶
Bases:
BaseAttachVolumeTest
Testing volume with shelved instance.
This test checks the attaching and detaching volumes from a shelved or shelved offload instance.
Note that these are uncommon scenarios until blueprint detach-boot-volume is implemented in the compute service.
- test_attach_volume_shelved_or_offload_server()[source]¶
Test idempotent id: 13a940b6-3474-4c3c-b03f-29b89112bfee
Test attaching volume to shelved server
Create server, count number of volumes on it, shelve server and attach pre-created volume to shelved server, then unshelve the server and check that attached volume exists.
- test_detach_volume_shelved_or_offload_server()[source]¶
Test idempotent id: b54e86dd-a070-49c4-9c07-59ae6dae15aa
Test detaching volume from shelved server
Count number of volumes on server, shelve server and attach pre-created volume to shelved server, then detach the volume, unshelve the instance and check that we have the expected number of volume(s).
- class AttachVolumeTestJSON(*args, **kwargs)[source]¶
Bases:
BaseAttachVolumeTest
Test attaching volume to server
- test_attach_detach_volume()[source]¶
Test idempotent id: 52e9045a-e90d-4c0d-9087-79d657faffff
Test attaching and detaching volume from server
Stop and Start a server with an attached volume, ensuring that the volume remains attached.
- test_list_get_volume_attachments()[source]¶
Test idempotent id: 7fa563fe-f0f7-43eb-9e22-a1ece036b513
Test listing and getting volume attachments
First we attach one volume to the server, check listing and getting the volume attachment of the server. Then we attach another volume to the server, check listing and getting the volume attachments of the server. Finally we detach the volumes from the server one by one.
compute.volumes.test_attach_volume_negative module¶
- class AttachVolumeNegativeTest(*args, **kwargs)[source]¶
Bases:
BaseAttachVolumeTest
Negative tests of volume attaching
- test_attach_attached_volume_to_different_server()[source]¶
Test idempotent id: ee37a796-2afb-11e7-bc0f-fa163e65f5ce
Test attaching attached volume to different server should fail
- test_attach_attached_volume_to_same_server()[source]¶
Test idempotent id: aab919e2-d992-4cbb-a4ed-745c2475398c
Test attaching attached volume to same server should fail
Test attaching the same volume to the same instance once it’s already attached. The nova/cinder validation for this differs depending on whether or not cinder v3.27 is being used to attach the volume to the instance.
compute.volumes.test_volume_snapshots module¶
compute.volumes.test_volumes_get module¶
compute.volumes.test_volumes_list module¶
- class VolumesTestJSON(*args, **kwargs)[source]¶
Bases:
BaseV2ComputeTest
Test listing volumes with compute microversion less than 2.36
- test_volume_list()[source]¶
Test idempotent id: bc2dd1a0-15af-48e5-9990-f2e75a48325d
Test listing volumes should return all volumes
- test_volume_list_param_limit()[source]¶
Test idempotent id: 1048ed81-2baf-487a-b284-c0622b86e7b8
Test listing volumes based on limit set
If we list volumes with limit=2, then only 2 volumes should be returned.
- test_volume_list_param_offset_and_limit()[source]¶
Test idempotent id: 51c22651-a074-4ea7-af0b-094f9331303e
Test listing volumes based on offset and limit set
If we list volumes with offset=1 and limit=1, then 1 volume located in the position 1 in the all volumes list should be returned. (The items in the all volumes list start from position 0.)
- test_volume_list_with_detail_param_limit()[source]¶
Test idempotent id: 33985568-4965-49d5-9bcc-0aa007ca5b7a
Test listing volumes with detail based on limit set
If we list volumes with detail with limit=2, then only 2 volumes with detail should be returned.
- test_volume_list_with_detail_param_offset_and_limit()[source]¶
Test idempotent id: 06b6abc4-3f10-48e9-a7a1-3facc98f03e5
Test listing volumes with detail based on offset and limit set
If we list volumes with detail with offset=1 and limit=1, then 1 volume with detail located in the position 1 in the all volumes list should be returned. (The items in the all volumes list start from position 0.)
compute.volumes.test_volumes_negative module¶
- class VolumesNegativeTest(*args, **kwargs)[source]¶
Bases:
BaseV2ComputeTest
Negative tests of volumes with compute microversion less than 2.36
- test_create_volume_with_invalid_size()[source]¶
Test idempotent id: 5125ae14-152b-40a7-b3c5-eae15e9022ef
Test creating volume with invalid size should fail
- test_create_volume_with_size_zero()[source]¶
Test idempotent id: 8cce995e-0a83-479a-b94d-e1e40b8a09d1
Test creating volume with size=0 should fail
- test_create_volume_without_passing_size()[source]¶
Test idempotent id: 131cb3a1-75cc-4d40-b4c3-1317f64719b0
Test creating volume without specifying size should fail
- test_delete_invalid_volume_id()[source]¶
Test idempotent id: 62972737-124b-4513-b6cf-2f019f178494
Test deleting volume with an invalid volume id should fail
- test_delete_volume_without_passing_volume_id()[source]¶
Test idempotent id: 0d1417c5-4ae8-4c2c-adc5-5f0b864253e5
Test deleting volume without volume id should fail
- test_get_volume_without_passing_volume_id()[source]¶
Test idempotent id: 62bab09a-4c03-4617-8cca-8572bc94af9b
Test getting volume details without volume id should fail