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.

test_resize_server_with_multiattached_volume()[source]

Test idempotent id: f01c7169-a124-4fc7-ae60-5e380e247c9c

Test resizing servers with multiattached volume

Attach a single volume to multiple servers, then resize the servers

test_snapshot_volume_backed_multiattach()[source]

Test idempotent id: 885ac48a-2d7a-40c5-ae8b-1993882d724c

Boots a server from a multiattach volume and snapshots the server.

Creating the snapshot of the server will also create a snapshot of the volume.

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.

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

Bases: BaseV2ComputeTest

Base class for the attach volume tests in this module.

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.

test_delete_attached_volume()[source]

Test idempotent id: a313b5cd-fbd0-49cc-94de-870e99f763c7

Test deleting attachemd volume should fail

compute.volumes.test_volume_snapshots module

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

Bases: BaseV2ComputeTest

Test volume snapshots with compute microversion less than 2.36

test_volume_snapshot_create_get_list_delete()[source]

Test idempotent id: cd4ec87d-7825-450d-8040-6e2068f2da8f

Test create/get/list/delete volume snapshot

compute.volumes.test_volumes_get module

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

Bases: BaseV2ComputeTest

Test compute volumes API with microversion less than 2.36

test_volume_create_get_delete()[source]

Test idempotent id: f10f25eb-9775-4d9d-9cbe-1cf54dae9d5f

Test create/get/delete volume

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

test_volume_list_with_details()[source]

Test idempotent id: bad0567a-5a4f-420b-851e-780b55bb867c

Test listing volumes with detail should return all volumes

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

test_volume_delete_nonexistent_volume_id()[source]

Test idempotent id: 54a34226-d910-4b00-9ef8-8683e6c55846

Test deleting a nonexistent volume should fail

test_volume_get_nonexistent_volume_id()[source]

Test idempotent id: c03ea686-905b-41a2-8748-9635154b7c57

Test getting details of a non existent volume should fail

Module contents