openstackclient.tests.volume.v2 package

Submodules

openstackclient.tests.volume.v2.fakes module

class openstackclient.tests.volume.v2.fakes.FakeAvailabilityZone

Bases: object

Fake one or more volume availability zones (AZs).

static create_availability_zones(attrs=None, count=2)

Create multiple fake AZs.

Parameters:
  • attrs (Dictionary) – A dictionary with all attributes
  • count (int) – The number of AZs to fake
Returns:

A list of FakeResource objects faking the AZs

static create_one_availability_zone(attrs=None)

Create a fake AZ.

Parameters:attrs (Dictionary) – A dictionary with all attributes
Returns:A FakeResource object with zoneName, zoneState, etc.
class openstackclient.tests.volume.v2.fakes.FakeBackup

Bases: object

Fake one or more backup.

static create_backups(attrs=None, count=2)

Create multiple fake backups.

Parameters:
  • attrs (Dictionary) – A dictionary with all attributes
  • count (int) – The number of backups to fake
Returns:

A list of FakeResource objects faking the backups

static create_one_backup(attrs=None)

Create a fake backup.

Parameters:attrs (Dictionary) – A dictionary with all attributes
Returns:A FakeResource object with id, name, volume_id, etc.
class openstackclient.tests.volume.v2.fakes.FakeExtension

Bases: object

Fake one or more extension.

static create_one_extension(attrs=None)

Create a fake extension.

Parameters:attrs (Dictionary) – A dictionary with all attributes
Returns:A FakeResource object with name, namespace, etc.
class openstackclient.tests.volume.v2.fakes.FakeQos

Bases: object

Fake one or more Qos specification.

static create_one_qos(attrs=None)

Create a fake Qos specification.

Parameters:attrs (Dictionary) – A dictionary with all attributes
Returns:A FakeResource object with id, name, consumer, etc.
static create_one_qos_association(attrs=None)

Create a fake Qos specification association.

Parameters:attrs (Dictionary) – A dictionary with all attributes
Returns:A FakeResource object with id, name, association_type, etc.
static create_qoses(attrs=None, count=2)

Create multiple fake Qos specifications.

Parameters:
  • attrs (Dictionary) – A dictionary with all attributes
  • count (int) – The number of Qos specifications to fake
Returns:

A list of FakeResource objects faking the Qos specifications

class openstackclient.tests.volume.v2.fakes.FakeService

Bases: object

Fake one or more Services.

static create_one_service(attrs=None)

Create a fake service.

Parameters:attrs (Dictionary) – A dictionary with all attributes of service
Retrun:A FakeResource object with host, status, etc.
static create_services(attrs=None, count=2)

Create multiple fake services.

Parameters:
  • attrs (Dictionary) – A dictionary with all attributes of service
  • count (Integer) – The number of services to be faked
Returns:

A list of FakeResource objects

static get_services(services=None, count=2)

Get an iterable MagicMock object with a list of faked services.

If services list is provided, then initialize the Mock object with the list. Otherwise create one.

Parameters:
  • services (List) – A list of FakeResource objects faking services
  • count (Integer) – The number of services to be faked
:return
An iterable Mock object with side_effect set to a list of faked services
class openstackclient.tests.volume.v2.fakes.FakeServiceClient(**kwargs)

Bases: object

class openstackclient.tests.volume.v2.fakes.FakeSnapshot

Bases: object

Fake one or more snapshot.

static create_one_snapshot(attrs=None)

Create a fake snapshot.

Parameters:attrs (Dictionary) – A dictionary with all attributes
Returns:A FakeResource object with id, name, description, etc.
static create_snapshots(attrs=None, count=2)

Create multiple fake snapshots.

Parameters:
  • attrs (Dictionary) – A dictionary with all attributes
  • count (int) – The number of snapshots to fake
Returns:

A list of FakeResource objects faking the snapshots

class openstackclient.tests.volume.v2.fakes.FakeTransfer

Bases: object

Fake one or more Transfer.

static create_one_transfer(attrs=None)

Create a fake transfer.

Parameters:attrs (Dictionary) – A dictionary with all attributes of Transfer Request
Retrun:A FakeResource object with volume_id, name, id.
class openstackclient.tests.volume.v2.fakes.FakeTransferClient(**kwargs)

Bases: object

class openstackclient.tests.volume.v2.fakes.FakeType

Bases: object

Fake one or more type.

static create_one_type(attrs=None, methods=None)

Create a fake type.

Parameters:
  • attrs (Dictionary) – A dictionary with all attributes
  • methods (Dictionary) – A dictionary with all methods
Returns:

A FakeResource object with id, name, description, etc.

static create_types(attrs=None, count=2)

Create multiple fake types.

Parameters:
  • attrs (Dictionary) – A dictionary with all attributes
  • count (int) – The number of types to fake
Returns:

A list of FakeResource objects faking the types

class openstackclient.tests.volume.v2.fakes.FakeVolume

Bases: object

Fake one or more volumes.

TODO(xiexs): Currently, only volume API v2 is supported by this class.

static create_one_volume(attrs=None)

Create a fake volume.

Parameters:attrs (Dictionary) – A dictionary with all attributes of volume
Retrun:A FakeResource object with id, name, status, etc.
static create_volumes(attrs=None, count=2)

Create multiple fake volumes.

Parameters:
  • attrs (Dictionary) – A dictionary with all attributes of volume
  • count (Integer) – The number of volumes to be faked
Returns:

A list of FakeResource objects

static get_volume_columns(volume=None)

Get the volume columns from a faked volume object.

Parameters:volume – A FakeResource objects faking volume
:return

A tuple which may include the following keys: (‘id’, ‘name’, ‘description’, ‘status’, ‘size’, ‘volume_type’,

‘metadata’, ‘snapshot’, ‘availability_zone’, ‘attachments’)
static get_volume_data(volume=None)

Get the volume data from a faked volume object.

Parameters:volume – A FakeResource objects faking volume
:return

A tuple which may include the following values: (‘ce26708d’, ‘fake_volume’, ‘fake description’, ‘available’,

20, ‘fake_lvmdriver-1’, “Alpha=’a’, Beta=’b’, Gamma=’g’”, 1, ‘nova’, [{‘device’: ‘/dev/ice’, ‘server_id’: ‘1233’}])
static get_volumes(volumes=None, count=2)

Get an iterable MagicMock object with a list of faked volumes.

If volumes list is provided, then initialize the Mock object with the list. Otherwise create one.

Parameters:
  • volumes (List) – A list of FakeResource objects faking volumes
  • count (Integer) – The number of volumes to be faked
:return
An iterable Mock object with side_effect set to a list of faked volumes
class openstackclient.tests.volume.v2.fakes.FakeVolumeClient(**kwargs)

Bases: object

class openstackclient.tests.volume.v2.fakes.TestService(*args, **kwargs)

Bases: openstackclient.tests.utils.TestCommand

setUp()
class openstackclient.tests.volume.v2.fakes.TestTransfer(*args, **kwargs)

Bases: openstackclient.tests.utils.TestCommand

setUp()
class openstackclient.tests.volume.v2.fakes.TestVolume(*args, **kwargs)

Bases: openstackclient.tests.utils.TestCommand

setUp()

openstackclient.tests.volume.v2.test_backup module

class openstackclient.tests.volume.v2.test_backup.TestBackup(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.fakes.TestVolume

setUp()
class openstackclient.tests.volume.v2.test_backup.TestBackupCreate(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.test_backup.TestBackup

columns = ('availability_zone', 'container', 'description', 'id', 'name', 'object_count', 'size', 'snapshot_id', 'status', 'volume_id')
data = ('zoneb4428f3f65ae4bd5a044daeba99b7309', 'container-e15096f0b2fa4a8fb9731530bf6a7d9f', 'description-76de65fd807f4f828fd660b4b3f9fbe6', 'backup-id-cb0dfc085fe84f77a2bb4c46aeeb3028', 'backup-name-1d7dcc9788d84f41a5ebd257457cafdc', None, 11, 'snapshot-id-314bff70c05c4d86be0880179d1d9a0e', 'error', 'volume-id66c59f07e0ce410c87a88d8f5bbf4643')
new_backup = <FakeResource availability_zone=zoneb4428f3f65ae4bd5a044daeba99b7309, container=container-e15096f0b2fa4a8fb9731530bf6a7d9f, description=description-76de65fd807f4f828fd660b4b3f9fbe6, id=backup-id-cb0dfc085fe84f77a2bb4c46aeeb3028, name=backup-name-1d7dcc9788d84f41a5ebd257457cafdc, object_count=None, size=11, snapshot_id=snapshot-id-314bff70c05c4d86be0880179d1d9a0e, status=error, volume_id=volume-id66c59f07e0ce410c87a88d8f5bbf4643>
setUp()
snapshot = <FakeResource created_at=2015-06-03T18:49:19.000000, description=snapshot-description-b5e0d886386f4240ad6bc4e830bbca66, id=snapshot-id-314bff70c05c4d86be0880179d1d9a0e, metadata={'foo': 'bar'}, name=snapshot-name-e812c60a8e154f9da118be6a1b312801, size=10, status=available, volume_id=vloume-id-8556453fd11c454792caeff935f82409>
test_backup_create()
test_backup_create_without_name()
volume = <FakeResource attachments=[{'device': '/dev/c77b3a0818074f80bcde005ab2eb0516', 'server_id': 'e090e41d60da42639efb3de6fbeb157c'}], availability_zone=zone2a1f9d0639a346d2a2541f385db1bbba, bootable=1, description=description10a717f60d4246c78d560d8dc34aa2b3, id=volume-id66c59f07e0ce410c87a88d8f5bbf4643, metadata={'keyd81c951b1d9b4e178c8b3de7c8e7ed09': 'valba040717ddd5495a821d5687fe1dc033', 'keydd0fd335a0d4408d9184c8b0285d2f37': 'vala76c0acdf4084e9aac867835fe4748b6', 'keyc604325c09d243c39b2c11f53dfd2ab0': 'val925e76b01bd5405e8ad7ee50304dfe79'}, name=volume-namef69fd929b41a4ebeb6d9c16f5f2cb904, size=5, snapshot_id=1, status=available, volume_type=fake_lvmdriver-1>
class openstackclient.tests.volume.v2.test_backup.TestBackupDelete(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.test_backup.TestBackup

backup = <FakeResource availability_zone=zone9188cf51351541bd96cc0f57b34f9336, container=container-9b0c12b41c2742fab61ebdf04906a66d, description=description-d22c23025bae4a919673e196c2cd4f0b, id=backup-id-c549785c36ff4930b06b73b124e8b9b0, name=backup-name-59f359d806e845399feb9bf580bc5e30, object_count=None, size=2, snapshot_id=snapshot-idbfc2ec3cbcbc4b2a9fc2df6bcd3d5df4, status=error, volume_id=volume-id-583ffa0a74904c8c8a51ec3f5a66061a>
setUp()
test_backup_delete()
class openstackclient.tests.volume.v2.test_backup.TestBackupList(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.test_backup.TestBackup

b = <FakeResource availability_zone=zone6d5a5d7819d848749fe9d0a75ff559a0, container=container-fa499894a2c34ba19d368e3e18adabb4, description=description-542510f2198e466d83b4eae4b6ee508a, id=backup-id-8758d4f7e3b549dbaf601cafa5e41d60, name=backup-name-9b929c3a8b034959b4a4a70696448179, object_count=None, size=20, snapshot_id=snapshot-id5e9a0fbb3acb4952af838d2a23e5361f, status=error, volume_id=volume-name7b9a79eb311e48f180419ad74838093f>
backups = [<FakeResource availability_zone=zonec5967ba5af964332b2521807c49406ef, container=container-0f87930c4a984c3b9efc66ddd0c2b74f, description=description-c8853f5ddf844cfbb21da2165644a2f0, id=backup-id-e5af26eab94e4a67a5ace9ab32bc581f, name=backup-name-51233a5d4f624d9c93c9a61505d459f3, object_count=None, size=1, snapshot_id=snapshot-ide0d66d52bf6b4975a96319515ff1503b, status=error, volume_id=volume-name7b9a79eb311e48f180419ad74838093f>, <FakeResource availability_zone=zone3d7067859f19448aa20ac9e01f352ec2, container=container-99a7556648294f23998b60f30c2f7c79, description=description-d208e66003e84b7bab0ca92de1ba2d90, id=backup-id-ae1b911b85b146b48a8dca53cdf2d47f, name=backup-name-6489d15fd3ea401a940f7e39f9b59577, object_count=None, size=9, snapshot_id=snapshot-iddd3952cf88694126a168e642a65d8522, status=error, volume_id=volume-name7b9a79eb311e48f180419ad74838093f>, <FakeResource availability_zone=zone6d5a5d7819d848749fe9d0a75ff559a0, container=container-fa499894a2c34ba19d368e3e18adabb4, description=description-542510f2198e466d83b4eae4b6ee508a, id=backup-id-8758d4f7e3b549dbaf601cafa5e41d60, name=backup-name-9b929c3a8b034959b4a4a70696448179, object_count=None, size=20, snapshot_id=snapshot-id5e9a0fbb3acb4952af838d2a23e5361f, status=error, volume_id=volume-name7b9a79eb311e48f180419ad74838093f>]
columns = ['ID', 'Name', 'Description', 'Status', 'Size']
columns_long = ['ID', 'Name', 'Description', 'Status', 'Size', 'Availability Zone', 'Volume', 'Container']
data = [('backup-id-e5af26eab94e4a67a5ace9ab32bc581f', 'backup-name-51233a5d4f624d9c93c9a61505d459f3', 'description-c8853f5ddf844cfbb21da2165644a2f0', 'error', 1), ('backup-id-ae1b911b85b146b48a8dca53cdf2d47f', 'backup-name-6489d15fd3ea401a940f7e39f9b59577', 'description-d208e66003e84b7bab0ca92de1ba2d90', 'error', 9), ('backup-id-8758d4f7e3b549dbaf601cafa5e41d60', 'backup-name-9b929c3a8b034959b4a4a70696448179', 'description-542510f2198e466d83b4eae4b6ee508a', 'error', 20)]
data_long = [('backup-id-e5af26eab94e4a67a5ace9ab32bc581f', 'backup-name-51233a5d4f624d9c93c9a61505d459f3', 'description-c8853f5ddf844cfbb21da2165644a2f0', 'error', 1, 'zonec5967ba5af964332b2521807c49406ef', 'volume-name7b9a79eb311e48f180419ad74838093f', 'container-0f87930c4a984c3b9efc66ddd0c2b74f'), ('backup-id-ae1b911b85b146b48a8dca53cdf2d47f', 'backup-name-6489d15fd3ea401a940f7e39f9b59577', 'description-d208e66003e84b7bab0ca92de1ba2d90', 'error', 9, 'zone3d7067859f19448aa20ac9e01f352ec2', 'volume-name7b9a79eb311e48f180419ad74838093f', 'container-99a7556648294f23998b60f30c2f7c79'), ('backup-id-8758d4f7e3b549dbaf601cafa5e41d60', 'backup-name-9b929c3a8b034959b4a4a70696448179', 'description-542510f2198e466d83b4eae4b6ee508a', 'error', 20, 'zone6d5a5d7819d848749fe9d0a75ff559a0', 'volume-name7b9a79eb311e48f180419ad74838093f', 'container-fa499894a2c34ba19d368e3e18adabb4')]
setUp()
test_backup_list_with_options()
test_backup_list_without_options()
volume = <FakeResource attachments=[{'device': '/dev/88ebfeb5d20e46cc8608d50fe20d9089', 'server_id': '836220d49ea34e1aa6413888b8175082'}], availability_zone=zone92ab2f2df3e44ca68e52415404dabf4e, bootable=0, description=description130bcd930da14cc49d1478d22eb3e871, id=volume-id929b1f5aa66e4a64b40516dac1480892, metadata={'keyd8260f933243487980006d4195990e93': 'val10b13094fae54976a4a75e3f5b2dc2a8', 'key8e0ffba05f724e0187dc301c3ab5b9a1': 'val999b1eb354a94ccaa0de58b45b603681', 'key9699dea8546a4b8ca4fc40d1dd396e77': 'val3b1f8e735e064ad58bba2de6748600e7'}, name=volume-name7b9a79eb311e48f180419ad74838093f, size=17, snapshot_id=5, status=in_use, volume_type=fake_lvmdriver-2>
class openstackclient.tests.volume.v2.test_backup.TestBackupRestore(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.test_backup.TestBackup

backup = <FakeResource availability_zone=zoneaaae0c644cdd46c7a2463e8b7669db57, container=container-ad627169695044b1a21716d94bac9c7f, description=description-9807771342de4d21b0a951dbf0d3a233, id=backup-id-85e03f3ee8f14c539ba83d5d67978477, name=backup-name-6a134d2c267947828bd2971e7ba5b443, object_count=None, size=18, snapshot_id=snapshot-idd4718ea56fcf44bcbf69e439b96e361e, status=error, volume_id=volume-id1b562c4c27b5423ebb3c35ba9ad237d1>
setUp()
test_backup_restore()
volume = <FakeResource attachments=[{'device': '/dev/010f09770b4e4e97b896b21530e172d3', 'server_id': '2890c7d74cf04e0788021a379df5d8dc'}], availability_zone=zone8d0fbc3e77604a33ab31b895a9eae39b, bootable=1, description=descriptionac93e3f963bb4206ae7b762a5c559efe, id=volume-id1b562c4c27b5423ebb3c35ba9ad237d1, metadata={'key59b97ed3a8fc425e9ac0e02126e779bc': 'val530f473010dd4ed1be6f14df45fb9039', 'key204fe03961e64523a2ddf35381b86c48': 'val2496e0cd51ae42c7b50d70f4ebe77516', 'keydc2454cfef3f4ac4bfe2a70278651fa1': 'vale9c42a71843e426faca4f854ca6ea01c'}, name=volume-name6a1de3a18bdd4aa986c51aaf056a5d70, size=12, snapshot_id=3, status=in_use, volume_type=fake_lvmdriver-1>
class openstackclient.tests.volume.v2.test_backup.TestBackupShow(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.test_backup.TestBackup

backup = <FakeResource availability_zone=zone1d1ba56f9d9d4e1a94e9e2a200755d3c, container=container-3768f6e654704d89b501fb754dd52104, description=description-476be2a431224c6eb1e3dfc4064f0cc7, id=backup-id-5615a545cb564d759c63cb8a8a92ce07, name=backup-name-e5df763af331419391953fda0fc02e51, object_count=None, size=19, snapshot_id=snapshot-idd53dde9b5cea46dfb412098ab06e69e5, status=error, volume_id=volume-id-8329fa07e91e4242b6f48ff02cebac9e>
columns = ('availability_zone', 'container', 'description', 'id', 'name', 'object_count', 'size', 'snapshot_id', 'status', 'volume_id')
data = ('zone1d1ba56f9d9d4e1a94e9e2a200755d3c', 'container-3768f6e654704d89b501fb754dd52104', 'description-476be2a431224c6eb1e3dfc4064f0cc7', 'backup-id-5615a545cb564d759c63cb8a8a92ce07', 'backup-name-e5df763af331419391953fda0fc02e51', None, 19, 'snapshot-idd53dde9b5cea46dfb412098ab06e69e5', 'error', 'volume-id-8329fa07e91e4242b6f48ff02cebac9e')
setUp()
test_backup_show()

openstackclient.tests.volume.v2.test_qos_specs module

class openstackclient.tests.volume.v2.test_qos_specs.TestQos(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.fakes.TestVolume

setUp()
class openstackclient.tests.volume.v2.test_qos_specs.TestQosAssociate(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.test_qos_specs.TestQos

qos_spec = <FakeResource consumer=front-end, id=qos-id-dfabb360ccf640478e5afc3c719e4b05, name=qos-name-85c61a86cb02464c8b51ea6b7224e09b, specs={'iops': '9001', 'foo': 'bar'}>
setUp()
test_qos_associate()
volume_type = <FakeResource description=type-description-00abb08be9ba42ff884cd7aac05986a0, extra_specs={'foo': 'bar'}, id=type-id-8e029b9f410b40968ccbd5b6d83836d9, name=type-name-0fb7b41befc149d2a9f9865498fc4f92>
class openstackclient.tests.volume.v2.test_qos_specs.TestQosCreate(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.test_qos_specs.TestQos

columns = ('consumer', 'id', 'name', 'specs')
data = ('front-end', 'qos-id-e3c5906f1de244bfaf2020bbeee704d4', 'qos-name-3888d0da86bd46479e7bedf3832c3bfa', {'iops': '9001', 'foo': 'bar'})
new_qos_spec = <FakeResource consumer=front-end, id=qos-id-e3c5906f1de244bfaf2020bbeee704d4, name=qos-name-3888d0da86bd46479e7bedf3832c3bfa, specs={'iops': '9001', 'foo': 'bar'}>
setUp()
test_qos_create_with_consumer()
test_qos_create_with_properties()
test_qos_create_without_properties()
class openstackclient.tests.volume.v2.test_qos_specs.TestQosDelete(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.test_qos_specs.TestQos

qos_spec = <FakeResource consumer=front-end, id=qos-id-31b0d9302bd649ea9197302561cde1c8, name=qos-name-4a5c34fc68894e529c85597c032e9789, specs={'iops': '9001', 'foo': 'bar'}>
setUp()
test_qos_delete()
test_qos_delete_with_force()
class openstackclient.tests.volume.v2.test_qos_specs.TestQosDisassociate(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.test_qos_specs.TestQos

qos_spec = <FakeResource consumer=front-end, id=qos-id-b7bec76cc4214a6f8f80d50e7d153e7a, name=qos-name-7792370d6ce74786854098cc0a54a270, specs={'iops': '9001', 'foo': 'bar'}>
setUp()
test_qos_disassociate_with_all_volume_types()
test_qos_disassociate_with_volume_type()
volume_type = <FakeResource description=type-description-a4cb7b344d34404cbc3b8dda94952482, extra_specs={'foo': 'bar'}, id=type-id-d6ea4a336e4b44b9b85d5a63285843a0, name=type-name-c2dc15b86cb54fec993517b55a78dfaa>
class openstackclient.tests.volume.v2.test_qos_specs.TestQosList(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.test_qos_specs.TestQos

columns = ('ID', 'Name', 'Consumer', 'Associations', 'Specs')
data = [('qos-id-3eeee058466948b2a639d7ba7b043ba8', 'qos-name-686a864f9a734a468ef5ec7f88a7711f', 'front-end', 'type-name-e899572a7c234c4590dd93c78bdced15', u"foo='bar', iops='9001'"), ('qos-id-5de982f0515742458125ab3ccbfc302f', 'qos-name-f6b3d0f695804c6da3e044da4f8acad4', 'front-end', 'type-name-e899572a7c234c4590dd93c78bdced15', u"foo='bar', iops='9001'")]
q = <FakeResource consumer=front-end, id=qos-id-5de982f0515742458125ab3ccbfc302f, name=qos-name-f6b3d0f695804c6da3e044da4f8acad4, specs={'iops': '9001', 'foo': 'bar'}>
qos_association = <FakeResource association_type=volume_type, id=type-id-b5e275aeff234d09ab34d54fae1b6c69, name=type-name-e899572a7c234c4590dd93c78bdced15>
qos_specs = [<FakeResource consumer=front-end, id=qos-id-3eeee058466948b2a639d7ba7b043ba8, name=qos-name-686a864f9a734a468ef5ec7f88a7711f, specs={'iops': '9001', 'foo': 'bar'}>, <FakeResource consumer=front-end, id=qos-id-5de982f0515742458125ab3ccbfc302f, name=qos-name-f6b3d0f695804c6da3e044da4f8acad4, specs={'iops': '9001', 'foo': 'bar'}>]
setUp()
test_qos_list()
class openstackclient.tests.volume.v2.test_qos_specs.TestQosSet(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.test_qos_specs.TestQos

qos_spec = <FakeResource consumer=front-end, id=qos-id-70a7d137b3234c29854b6567d9fa1532, name=qos-name-b02543665dd942a9872e37c91991563c, specs={'iops': '9001', 'foo': 'bar'}>
setUp()
test_qos_set_with_properties_with_id()
class openstackclient.tests.volume.v2.test_qos_specs.TestQosShow(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.test_qos_specs.TestQos

columns = ('associations', 'consumer', 'id', 'name', 'specs')
data = ('type-name-08fcc5b938584935b1d8e247afecd4af', 'front-end', 'qos-id-5a1f68eff2aa44bba6e0c5585908d859', 'qos-name-3d6b04c58a354fbbb8a545ca4718cbdd', u"foo='bar', iops='9001'")
qos_association = <FakeResource association_type=volume_type, id=type-id-a4303ab5b6dd4262bb20b1f7143ebb62, name=type-name-08fcc5b938584935b1d8e247afecd4af>
qos_spec = <FakeResource consumer=front-end, id=qos-id-5a1f68eff2aa44bba6e0c5585908d859, name=qos-name-3d6b04c58a354fbbb8a545ca4718cbdd, specs={'iops': '9001', 'foo': 'bar'}>
setUp()
test_qos_show()
class openstackclient.tests.volume.v2.test_qos_specs.TestQosUnset(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.test_qos_specs.TestQos

qos_spec = <FakeResource consumer=front-end, id=qos-id-189fd4c9e2f04659ae252fa900a790ab, name=qos-name-57c3df52920541c89eacb25c02b87dbe, specs={'iops': '9001', 'foo': 'bar'}>
setUp()
test_qos_unset_with_properties()

openstackclient.tests.volume.v2.test_service module

class openstackclient.tests.volume.v2.test_service.TestService(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.fakes.TestService

setUp()
class openstackclient.tests.volume.v2.test_service.TestServiceList(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.test_service.TestService

services = <FakeResource binary=cinder_test, disabled_reason=LongHoliday-GoldenWeek, host=host_test, state=fake_state, status=enabled, updated_at=fake_date, zone=fake_zone>
setUp()
test_service_list()
test_service_list_with_long_option()

openstackclient.tests.volume.v2.test_snapshot module

class openstackclient.tests.volume.v2.test_snapshot.TestSnapshot(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.fakes.TestVolume

setUp()
class openstackclient.tests.volume.v2.test_snapshot.TestSnapshotCreate(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.test_snapshot.TestSnapshot

columns = ('created_at', 'description', 'id', 'name', 'properties', 'size', 'status', 'volume_id')
setUp()
test_snapshot_create()
test_snapshot_create_without_name()
class openstackclient.tests.volume.v2.test_snapshot.TestSnapshotDelete(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.test_snapshot.TestSnapshot

setUp()
snapshot = <FakeResource created_at=2015-06-03T18:49:19.000000, description=snapshot-description-a1e8974d294b4bbb9e631c0f13df3b3c, id=snapshot-id-7b7988649a164eaa84caad51bc329021, metadata={'foo': 'bar'}, name=snapshot-name-44ccba5b045f402c8da526103d27b8cc, size=10, status=available, volume_id=vloume-id-3aaff372a46e401e9cd774d3e4d41a23>
test_snapshot_delete()
class openstackclient.tests.volume.v2.test_snapshot.TestSnapshotList(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.test_snapshot.TestSnapshot

columns = ['ID', 'Name', 'Description', 'Status', 'Size']
columns_long = ['ID', 'Name', 'Description', 'Status', 'Size', 'Created At', 'Volume', 'Properties']
data = [('snapshot-id-5de4e8fe2d064dd592493f3e5d693e3c', 'snapshot-name-02e7509ecfbc4004beccd6bfa3a28773', 'snapshot-description-be27927f7b864e19bd8ffe9213e97b3d', 'available', 10), ('snapshot-id-55983d9351b649f695f8262b68154679', 'snapshot-name-c8b35b2ccd5b419d9eebb97b69074ec0', 'snapshot-description-71a65d25f3714f3fa80ac3adc6ef1e15', 'available', 10), ('snapshot-id-b44e187f833c447a9bc610721b744d23', 'snapshot-name-367868e9a45d45a688c38c292c9a1abe', 'snapshot-description-b61f58e56a1d4848aece4d483dacc8bd', 'available', 10)]
data_long = [('snapshot-id-5de4e8fe2d064dd592493f3e5d693e3c', 'snapshot-name-02e7509ecfbc4004beccd6bfa3a28773', 'snapshot-description-be27927f7b864e19bd8ffe9213e97b3d', 'available', 10, '2015-06-03T18:49:19.000000', 'volume-name427c2d5b5cb5463891ec9b75cb891cc7', u"foo='bar'"), ('snapshot-id-55983d9351b649f695f8262b68154679', 'snapshot-name-c8b35b2ccd5b419d9eebb97b69074ec0', 'snapshot-description-71a65d25f3714f3fa80ac3adc6ef1e15', 'available', 10, '2015-06-03T18:49:19.000000', 'volume-name427c2d5b5cb5463891ec9b75cb891cc7', u"foo='bar'"), ('snapshot-id-b44e187f833c447a9bc610721b744d23', 'snapshot-name-367868e9a45d45a688c38c292c9a1abe', 'snapshot-description-b61f58e56a1d4848aece4d483dacc8bd', 'available', 10, '2015-06-03T18:49:19.000000', 'volume-name427c2d5b5cb5463891ec9b75cb891cc7', u"foo='bar'")]
s = <FakeResource created_at=2015-06-03T18:49:19.000000, description=snapshot-description-b61f58e56a1d4848aece4d483dacc8bd, id=snapshot-id-b44e187f833c447a9bc610721b744d23, metadata={'foo': 'bar'}, name=snapshot-name-367868e9a45d45a688c38c292c9a1abe, size=10, status=available, volume_id=volume-name427c2d5b5cb5463891ec9b75cb891cc7>
setUp()
snapshots = [<FakeResource created_at=2015-06-03T18:49:19.000000, description=snapshot-description-be27927f7b864e19bd8ffe9213e97b3d, id=snapshot-id-5de4e8fe2d064dd592493f3e5d693e3c, metadata={'foo': 'bar'}, name=snapshot-name-02e7509ecfbc4004beccd6bfa3a28773, size=10, status=available, volume_id=volume-name427c2d5b5cb5463891ec9b75cb891cc7>, <FakeResource created_at=2015-06-03T18:49:19.000000, description=snapshot-description-71a65d25f3714f3fa80ac3adc6ef1e15, id=snapshot-id-55983d9351b649f695f8262b68154679, metadata={'foo': 'bar'}, name=snapshot-name-c8b35b2ccd5b419d9eebb97b69074ec0, size=10, status=available, volume_id=volume-name427c2d5b5cb5463891ec9b75cb891cc7>, <FakeResource created_at=2015-06-03T18:49:19.000000, description=snapshot-description-b61f58e56a1d4848aece4d483dacc8bd, id=snapshot-id-b44e187f833c447a9bc610721b744d23, metadata={'foo': 'bar'}, name=snapshot-name-367868e9a45d45a688c38c292c9a1abe, size=10, status=available, volume_id=volume-name427c2d5b5cb5463891ec9b75cb891cc7>]
test_snapshot_list_all_projects()
test_snapshot_list_with_options()
test_snapshot_list_without_options()
volume = <FakeResource attachments=[{'device': '/dev/3e94dac969a14eae86b7ec1a63cf2a4a', 'server_id': 'f48ace43221c4d85837ba439b90ab121'}], availability_zone=zone29c9d496a3944766a442bb879a094019, bootable=0, description=descriptiond699c892f73b4df2a26b39c3a4386892, id=volume-idc5a07021153d4e3898b83725d6ad8b55, metadata={'key5f36e95f7bf64d6dbe7cda9b5d23a1ee': 'val6594c781a5804a3c8bbea4f9320e0743', 'key5adf85d8aa79441bbc20c42c618604aa': 'val9a2b04adaa814c43abf6948917f38ab2', 'keyfde5b40a5d1f4f28aa9bd8fff929023b': 'valc13a0693bd6c4e1eb9a3622b9f95c027'}, name=volume-name427c2d5b5cb5463891ec9b75cb891cc7, size=14, snapshot_id=4, status=in_use, volume_type=fake_lvmdriver-2>
class openstackclient.tests.volume.v2.test_snapshot.TestSnapshotSet(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.test_snapshot.TestSnapshot

setUp()
snapshot = <FakeResource created_at=2015-06-03T18:49:19.000000, description=snapshot-description-791fe90d6640451185ec3eab58c9184f, id=snapshot-id-6fc40a9bea1249e2bf2b96c3d6f6a36f, metadata={'foo': 'bar'}, name=snapshot-name-d2f2bc5d6faa411e8276ae12c91cff69, size=10, status=available, volume_id=vloume-id-04991bae6ca9437b82c41272e40504b4>
test_snapshot_set()
test_snapshot_set_state_to_error()
class openstackclient.tests.volume.v2.test_snapshot.TestSnapshotShow(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.test_snapshot.TestSnapshot

columns = ('created_at', 'description', 'id', 'name', 'properties', 'size', 'status', 'volume_id')
setUp()
test_snapshot_show()
class openstackclient.tests.volume.v2.test_snapshot.TestSnapshotUnset(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.test_snapshot.TestSnapshot

setUp()
snapshot = <FakeResource created_at=2015-06-03T18:49:19.000000, description=snapshot-description-df55ffadd9384b9bbd9533d0144e9b1d, id=snapshot-id-cdfee57bbb0747c1a62634f59ca05793, metadata={'foo': 'bar'}, name=snapshot-name-9aa102225ac5457b97514a4519529b78, size=10, status=available, volume_id=vloume-id-deb667b711df4ab18fccc69253d22ad5>
test_snapshot_unset()

openstackclient.tests.volume.v2.test_transfer_request module

class openstackclient.tests.volume.v2.test_transfer_request.TestTransfer(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.fakes.TestTransfer

setUp()
class openstackclient.tests.volume.v2.test_transfer_request.TestTransferList(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.test_transfer_request.TestTransfer

setUp()
test_transfer_list_with_argument()
test_transfer_list_without_argument()
volume_transfers = <FakeResource id=731a7f53-aa92-4fbd-9de3-6f7d729c926b, name=fake_transfer_name, volume_id=ce26708d-a7f8-4b4b-9861-4a80256615a7>

openstackclient.tests.volume.v2.test_type module

class openstackclient.tests.volume.v2.test_type.TestType(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.fakes.TestVolume

setUp()
class openstackclient.tests.volume.v2.test_type.TestTypeCreate(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.test_type.TestType

columns = ('description', 'id', 'name')
setUp()
test_type_create_private()
test_type_create_public()
class openstackclient.tests.volume.v2.test_type.TestTypeDelete(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.test_type.TestType

setUp()
test_type_delete()
volume_type = <FakeResource description=type-description-ddf7e66e42dd410ea627d61db78b0a15, extra_specs={'foo': 'bar'}, id=type-id-6d26d76adf8042f9a015d7a71bc37476, name=type-name-4efefd30a4d1430f830c31b071f1e4e8>
class openstackclient.tests.volume.v2.test_type.TestTypeList(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.test_type.TestType

columns = ['ID', 'Name']
columns_long = ['ID', 'Name', 'Description', 'Properties']
data = [('type-id-967cf882a523478a81616d865bca5d09', 'type-name-5e3bfb75acfb4d969a693c2de94a351a'), ('type-id-fba1cb225bf8423b8d8d14342c3af5a7', 'type-name-4027bb45ec314dbd8b8762fb38ef9e9e')]
data_long = [('type-id-967cf882a523478a81616d865bca5d09', 'type-name-5e3bfb75acfb4d969a693c2de94a351a', 'type-description-d6fe7e4b5a3546d1b8862862726f5157', u"foo='bar'"), ('type-id-fba1cb225bf8423b8d8d14342c3af5a7', 'type-name-4027bb45ec314dbd8b8762fb38ef9e9e', 'type-description-9a019cb4c055427d9c2dadbb2bbce590', u"foo='bar'")]
setUp()
t = <FakeResource description=type-description-9a019cb4c055427d9c2dadbb2bbce590, extra_specs={'foo': 'bar'}, id=type-id-fba1cb225bf8423b8d8d14342c3af5a7, name=type-name-4027bb45ec314dbd8b8762fb38ef9e9e>
test_type_list_with_options()
test_type_list_without_options()
volume_types = [<FakeResource description=type-description-d6fe7e4b5a3546d1b8862862726f5157, extra_specs={'foo': 'bar'}, id=type-id-967cf882a523478a81616d865bca5d09, name=type-name-5e3bfb75acfb4d969a693c2de94a351a>, <FakeResource description=type-description-9a019cb4c055427d9c2dadbb2bbce590, extra_specs={'foo': 'bar'}, id=type-id-fba1cb225bf8423b8d8d14342c3af5a7, name=type-name-4027bb45ec314dbd8b8762fb38ef9e9e>]
class openstackclient.tests.volume.v2.test_type.TestTypeSet(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.test_type.TestType

setUp()
test_type_set_description()
test_type_set_failed_with_missing_volume_type_argument()
test_type_set_name()
test_type_set_not_called_without_project_argument()
test_type_set_project_access()
test_type_set_property()
volume_type = <FakeResource description=type-description-4f1936bff30e423fb4a1a26977e71c48, extra_specs={'foo': 'bar'}, id=type-id-37b9a76d7a514c52a3dfe13b01fc0252, name=type-name-25bd885220fe487886ae9ea7d6856b42, set_keys=<MagicMock id='139947569697872'>>
class openstackclient.tests.volume.v2.test_type.TestTypeShow(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.test_type.TestType

columns = ('description', 'id', 'name', 'properties')
setUp()
test_type_show()
class openstackclient.tests.volume.v2.test_type.TestTypeUnset(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.test_type.TestType

setUp()
test_type_unset()
test_type_unset_failed_with_missing_volume_type_argument()
test_type_unset_not_called_without_project_argument()
test_type_unset_project_access()
volume_type = <FakeResource description=type-description-6891c0e78cd943a1a665b347215df004, extra_specs={'foo': 'bar'}, id=type-id-84b59d1c97034e8792115321d0e38b55, name=type-name-a75f8631565c4c26bcb93a895e0a666c, unset_keys=<MagicMock id='139947551617360'>>

openstackclient.tests.volume.v2.test_volume module

class openstackclient.tests.volume.v2.test_volume.TestVolume(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.fakes.TestVolume

setUp()
setup_volumes_mock(count)
class openstackclient.tests.volume.v2.test_volume.TestVolumeCreate(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.test_volume.TestVolume

columns = ('attachments', 'availability_zone', 'bootable', 'description', 'id', 'name', 'properties', 'size', 'snapshot_id', 'status', 'type')
setUp()
test_volume_create_image_id()
test_volume_create_image_name()
test_volume_create_min_options()
test_volume_create_options()
test_volume_create_properties()
test_volume_create_user_project_id()
test_volume_create_user_project_name()
test_volume_create_with_snapshot()
class openstackclient.tests.volume.v2.test_volume.TestVolumeDelete(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.test_volume.TestVolume

setUp()
test_volume_delete_multi_volumes()
test_volume_delete_one_volume()
class openstackclient.tests.volume.v2.test_volume.TestVolumeList(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.test_volume.TestVolume

columns = ['ID', 'Display Name', 'Status', 'Size', 'Attached to']
setUp()
test_volume_list_all_projects()
test_volume_list_long()
test_volume_list_name()
test_volume_list_no_options()
test_volume_list_project()
test_volume_list_project_domain()
test_volume_list_status()
test_volume_list_user()
test_volume_list_user_domain()
class openstackclient.tests.volume.v2.test_volume.TestVolumeSet(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.test_volume.TestVolume

setUp()
test_volume_set_image_property()
class openstackclient.tests.volume.v2.test_volume.TestVolumeShow(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.test_volume.TestVolume

setUp()
test_volume_show()
class openstackclient.tests.volume.v2.test_volume.TestVolumeUnset(*args, **kwargs)

Bases: openstackclient.tests.volume.v2.test_volume.TestVolume

setUp()
test_volume_unset_image_property()

Module contents