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.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', 'status', 'volume_id')
data = ('zone2b312aae4d7e4319bedd0cdc50358486', 'container-27a2a836a15a4673b94cc5efd976c541', 'description-968fa452e7f947beb4dabbb56c81974b', 'backup-id-c297fd95a5304dd3a1a6882a4c0a4ce6', 'backup-name-6de434213b294c10bd3d4052c3c7e620', None, 5, 'error', 'volume-id5ca119cbbd26479e80ebad4736cb4973')
new_backup = <FakeResource availability_zone=zone2b312aae4d7e4319bedd0cdc50358486, container=container-27a2a836a15a4673b94cc5efd976c541, description=description-968fa452e7f947beb4dabbb56c81974b, id=backup-id-c297fd95a5304dd3a1a6882a4c0a4ce6, name=backup-name-6de434213b294c10bd3d4052c3c7e620, object_count=None, size=5, status=error, volume_id=volume-id5ca119cbbd26479e80ebad4736cb4973>
setUp()
test_backup_create()
test_backup_create_without_name()
volume = <FakeResource attachments=[{'device': '/dev/4c226a534f924b779c4920b692afe099', 'server_id': '2c546e2fccb44a728b7010be8d3bace5'}], availability_zone=zone3905b417caa04f5184b035352406ff71, bootable=0, description=descriptionc0f7535af97e49fc85387bb156b6e29e, id=volume-id5ca119cbbd26479e80ebad4736cb4973, metadata={'keye725eef10f2f4473b97c0ebbd67ae3b2': 'val19581476a7484a029f33ad99702dd8e9', 'key8007040cf17d4ddc9c85c2e1877fa1fc': 'val710c4497689d4d178b10daf6aa4aa7e3', 'key1bf7151c42044eff9a3cc05353e7c907': 'val9882e9669e274865bd30445e45e7458d'}, name=volume-namef75f5306052843b5967f579b21c09475, size=18, snapshot_id=5, status=available, volume_type=fake_lvmdriver-2>
class openstackclient.tests.volume.v2.test_backup.TestBackupDelete(*args, **kwargs)

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

backup = <FakeResource availability_zone=zone5f9db577db27487ea7c8013d84865495, container=container-a6860f9bd82848e5b0e34d7416c81b95, description=description-56c18a16e6e146b1b09054cb4e98e4ff, id=backup-id-89c2def4e8974923bc4955ffcda2794f, name=backup-name-2aecd21a073d4587a845618a3d6f0ac0, object_count=None, size=4, status=error, volume_id=volume-id-044047d1147b4292a98d977c210f2061>
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=zone05285b55e0264fc8abb1dd234ae6b8af, container=container-a65fe0fb1b3c4658991b20ed7d32f611, description=description-edf3ae1914fc4e28a10d9a59eb8d3ae0, id=backup-id-8d1a56831f6841f7a990e21b5ffc65fc, name=backup-name-95656291211f41429917ab813bbacb0b, object_count=None, size=9, status=error, volume_id=volume-name477452f09c394177bd7d154cfd6ada66>
backups = [<FakeResource availability_zone=zoned53d6bce6383486a93596596615eb06f, container=container-67c285b4d36e435dbf7cf664d72dbd64, description=description-ecf3ea3645e14c3d8dcb9402a716a416, id=backup-id-8df6846abe94441eb1c5028dd5689330, name=backup-name-13427aecb0aa42bf8250421850b806e2, object_count=None, size=20, status=error, volume_id=volume-name477452f09c394177bd7d154cfd6ada66>, <FakeResource availability_zone=zone14ae46b58b5940d59e36e5945b31104c, container=container-ee700dae67c8482b807bef7db75e1f92, description=description-e5ce27d00c574a02ab0aa59def9bcc22, id=backup-id-6bbbd3a390d240f1986268ee66951a56, name=backup-name-71dac922ac5540babedd30735ae69f1c, object_count=None, size=5, status=error, volume_id=volume-name477452f09c394177bd7d154cfd6ada66>, <FakeResource availability_zone=zone05285b55e0264fc8abb1dd234ae6b8af, container=container-a65fe0fb1b3c4658991b20ed7d32f611, description=description-edf3ae1914fc4e28a10d9a59eb8d3ae0, id=backup-id-8d1a56831f6841f7a990e21b5ffc65fc, name=backup-name-95656291211f41429917ab813bbacb0b, object_count=None, size=9, status=error, volume_id=volume-name477452f09c394177bd7d154cfd6ada66>]
columns = ['ID', 'Name', 'Description', 'Status', 'Size']
columns_long = ['ID', 'Name', 'Description', 'Status', 'Size', 'Availability Zone', 'Volume', 'Container']
data = [('backup-id-8df6846abe94441eb1c5028dd5689330', 'backup-name-13427aecb0aa42bf8250421850b806e2', 'description-ecf3ea3645e14c3d8dcb9402a716a416', 'error', 20), ('backup-id-6bbbd3a390d240f1986268ee66951a56', 'backup-name-71dac922ac5540babedd30735ae69f1c', 'description-e5ce27d00c574a02ab0aa59def9bcc22', 'error', 5), ('backup-id-8d1a56831f6841f7a990e21b5ffc65fc', 'backup-name-95656291211f41429917ab813bbacb0b', 'description-edf3ae1914fc4e28a10d9a59eb8d3ae0', 'error', 9)]
data_long = [('backup-id-8df6846abe94441eb1c5028dd5689330', 'backup-name-13427aecb0aa42bf8250421850b806e2', 'description-ecf3ea3645e14c3d8dcb9402a716a416', 'error', 20, 'zoned53d6bce6383486a93596596615eb06f', 'volume-name477452f09c394177bd7d154cfd6ada66', 'container-67c285b4d36e435dbf7cf664d72dbd64'), ('backup-id-6bbbd3a390d240f1986268ee66951a56', 'backup-name-71dac922ac5540babedd30735ae69f1c', 'description-e5ce27d00c574a02ab0aa59def9bcc22', 'error', 5, 'zone14ae46b58b5940d59e36e5945b31104c', 'volume-name477452f09c394177bd7d154cfd6ada66', 'container-ee700dae67c8482b807bef7db75e1f92'), ('backup-id-8d1a56831f6841f7a990e21b5ffc65fc', 'backup-name-95656291211f41429917ab813bbacb0b', 'description-edf3ae1914fc4e28a10d9a59eb8d3ae0', 'error', 9, 'zone05285b55e0264fc8abb1dd234ae6b8af', 'volume-name477452f09c394177bd7d154cfd6ada66', 'container-a65fe0fb1b3c4658991b20ed7d32f611')]
setUp()
test_backup_list_with_options()
test_backup_list_without_options()
volume = <FakeResource attachments=[{'device': '/dev/f4c98ee6dd574378b242665caff19d68', 'server_id': 'ee2a58f549e445a9923d704e0a70e6f1'}], availability_zone=zone4d9fbeb483a043f1b4f1eb572c39a05e, bootable=0, description=descriptionc55c9ac21111489da8bd9b33d750c4e2, id=volume-id517fcc26dbee4fdeb095ee08c9e82152, metadata={'key1a6d60db200a49c6b4934c2b335877bf': 'val0857b4b99d494e7f970065c9ce2fbc91', 'key0f176a9b137d4131b707d09690f9df1c': 'valfd5f1b190ffa44fca4af59b5a275d560', 'keyaa0f2404782949cea13090f770e2fc98': 'val63d1ae29d53949a199505c0437cca993'}, name=volume-name477452f09c394177bd7d154cfd6ada66, size=14, snapshot_id=2, 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=zone1c4f615b0cb3490c9a19bfaf44b0ea68, container=container-20ac5d36d8dd42918683706b4b96cc79, description=description-bb244eeea9ec456da0f86a4f07b9865f, id=backup-id-c34faff8dea64aa2be28f4303caa52ab, name=backup-name-3b3774d344eb4fa79be4997dd6c41e13, object_count=None, size=12, status=error, volume_id=volume-id4a34101fec4f42a193f0b9611a85cb19>
setUp()
test_backup_restore()
volume = <FakeResource attachments=[{'device': '/dev/b5d0d78f95d84acb96822b695e100dab', 'server_id': 'e22acd47f2754c93b6c5620a3393b652'}], availability_zone=zone2e56d53b164244e6aa3dfdbbe46a2138, bootable=1, description=description39962c7caa734c7f8a39d7098f6d833f, id=volume-id4a34101fec4f42a193f0b9611a85cb19, metadata={'keyd2f8ae1d8fe34189846ad1758904c156': 'val37d6154d7cf244e2a05bf60de082f60b', 'keyd75ab11d08f946d9b71ba6fe3fc14320': 'val6a6dde4ed6c64394bd23ceb63b23b598', 'key6c658a2fc7dc4808a4cd305da61cddd6': 'valfb6405d8ed9d4122ad51acf19bfcf71c'}, name=volume-name111b9819b34d48a48d021d5011705be4, size=8, snapshot_id=2, status=available, volume_type=fake_lvmdriver-2>
class openstackclient.tests.volume.v2.test_backup.TestBackupShow(*args, **kwargs)

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

backup = <FakeResource availability_zone=zonebf4fa1c0b87d47d08d328ce49134e17c, container=container-c01b744d3d3c4c3b9039837981bf39ce, description=description-c19d5e3115a94b05b9a8ae38d6de3e20, id=backup-id-5d391b7d371d46148cf58f6cec1aeb9a, name=backup-name-e7f03fdde39146afb980c4cba39a1e34, object_count=None, size=19, status=error, volume_id=volume-id-f0ee378c1bdc482b8899e6974d4704b7>
columns = ('availability_zone', 'container', 'description', 'id', 'name', 'object_count', 'size', 'status', 'volume_id')
data = ('zonebf4fa1c0b87d47d08d328ce49134e17c', 'container-c01b744d3d3c4c3b9039837981bf39ce', 'description-c19d5e3115a94b05b9a8ae38d6de3e20', 'backup-id-5d391b7d371d46148cf58f6cec1aeb9a', 'backup-name-e7f03fdde39146afb980c4cba39a1e34', None, 19, 'error', 'volume-id-f0ee378c1bdc482b8899e6974d4704b7')
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-28ef90e733f24f7db8e50fa08c8ef03a, name=qos-name-f471ce026bd64beeb55e00cdd2b34c08, specs={'iops': '9001', 'foo': 'bar'}>
setUp()
test_qos_associate()
volume_type = <FakeResource description=type-description-218c706e46cd4d82aae3c38de6d809b6, extra_specs={'foo': 'bar'}, id=type-id-3927faaae8b544df94ebeb7f8e11b235, name=type-name-899b292d773a4e95ae48a616e32f55d1>
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-4bd9e50bba2b4df6964b59dd08d2402b', 'qos-name-c59b82110e9f46a5a9d23a2884313b57', {'iops': '9001', 'foo': 'bar'})
new_qos_spec = <FakeResource consumer=front-end, id=qos-id-4bd9e50bba2b4df6964b59dd08d2402b, name=qos-name-c59b82110e9f46a5a9d23a2884313b57, 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-018c29ff0f2a4ea799e092f1d369b7b0, name=qos-name-a74e588c6fa64f0daa18cb956ed5c0c1, specs={'iops': '9001', 'foo': 'bar'}>
setUp()
test_qos_delete()
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-ea05fcce795f434a954fb502a804d138, name=qos-name-4f1b4e1223ef4b7aa47293b8e88755a0, 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-1bc227bd1afc49a6b4293e3016fbde4a, extra_specs={'foo': 'bar'}, id=type-id-90ff4403471a49b68b9eea44c465a27f, name=type-name-01be59e1919446a19574aea2708e35da>
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-eb8206c6011a469b95f65e5ae89f0ba1', 'qos-name-c2ce4eb8c366448abb75d6bef6cd9fc1', 'front-end', 'type-name-3a0e07b7ca78480e9ada7085ac22bfba', u"foo='bar', iops='9001'"), ('qos-id-1c65b8e719424502b8c498e00a1d2ba6', 'qos-name-5b36c07c353d4c5583bb52851eb7ab77', 'front-end', 'type-name-3a0e07b7ca78480e9ada7085ac22bfba', u"foo='bar', iops='9001'")]
q = <FakeResource consumer=front-end, id=qos-id-1c65b8e719424502b8c498e00a1d2ba6, name=qos-name-5b36c07c353d4c5583bb52851eb7ab77, specs={'iops': '9001', 'foo': 'bar'}>
qos_association = <FakeResource association_type=volume_type, id=type-id-f9560d55929a4cfa9c873513f7fb50b1, name=type-name-3a0e07b7ca78480e9ada7085ac22bfba>
qos_specs = [<FakeResource consumer=front-end, id=qos-id-eb8206c6011a469b95f65e5ae89f0ba1, name=qos-name-c2ce4eb8c366448abb75d6bef6cd9fc1, specs={'iops': '9001', 'foo': 'bar'}>, <FakeResource consumer=front-end, id=qos-id-1c65b8e719424502b8c498e00a1d2ba6, name=qos-name-5b36c07c353d4c5583bb52851eb7ab77, 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-242d6f1d396e4ef396856cd1a197e21d, name=qos-name-1008290355e1451c8c8a452fbba77cf8, 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-d269e0c8964143d0855972f3c903e626', 'front-end', 'qos-id-2e1c3488529f4f5db3bfa8388d97da59', 'qos-name-0746c7e12dd5476492d7384919d27372', u"foo='bar', iops='9001'")
qos_association = <FakeResource association_type=volume_type, id=type-id-979aee7bed07430c80f1c0948cec1e98, name=type-name-d269e0c8964143d0855972f3c903e626>
qos_spec = <FakeResource consumer=front-end, id=qos-id-2e1c3488529f4f5db3bfa8388d97da59, name=qos-name-0746c7e12dd5476492d7384919d27372, 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-acded909d1fb4beab971c9013775095b, name=qos-name-a4d6da878ffd430e970e616323b18292, 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-ed287de2a03a46d7933b194f0c484eed, id=snapshot-id-f074ff035cf14b3d93c1353b0e1fbddf, metadata={'foo': 'bar'}, name=snapshot-name-1806d6ead9de4d5d91433317a5c8470b, size=10, status=available, volume_id=vloume-id-f1c1d3227ea14f41b3bffb8dadc9a162>
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-f649756616a74b6693906b2dca870931', 'snapshot-name-66c294cc698e4b4c9f014d1ce9a273df', 'snapshot-description-ff1d01ae44a040fe8494575df4198fd2', 'available', 10), ('snapshot-id-975dea2f682b456bb4fa6ce232f3435e', 'snapshot-name-0df03b7ed4c544129b4b1e0bec0f8ab8', 'snapshot-description-db3c4fe7b87c4b39b3b5b4197f5b0971', 'available', 10), ('snapshot-id-a49b7c24d20742c981b0fda3cb66ec9a', 'snapshot-name-a02d2a7d4d4c43f491a0aacd78d13be4', 'snapshot-description-67ea7a872a934368ad5b6254f90258c2', 'available', 10)]
data_long = [('snapshot-id-f649756616a74b6693906b2dca870931', 'snapshot-name-66c294cc698e4b4c9f014d1ce9a273df', 'snapshot-description-ff1d01ae44a040fe8494575df4198fd2', 'available', 10, '2015-06-03T18:49:19.000000', 'volume-nameb682276ea41643ceae200ad04f6ef772', u"foo='bar'"), ('snapshot-id-975dea2f682b456bb4fa6ce232f3435e', 'snapshot-name-0df03b7ed4c544129b4b1e0bec0f8ab8', 'snapshot-description-db3c4fe7b87c4b39b3b5b4197f5b0971', 'available', 10, '2015-06-03T18:49:19.000000', 'volume-nameb682276ea41643ceae200ad04f6ef772', u"foo='bar'"), ('snapshot-id-a49b7c24d20742c981b0fda3cb66ec9a', 'snapshot-name-a02d2a7d4d4c43f491a0aacd78d13be4', 'snapshot-description-67ea7a872a934368ad5b6254f90258c2', 'available', 10, '2015-06-03T18:49:19.000000', 'volume-nameb682276ea41643ceae200ad04f6ef772', u"foo='bar'")]
s = <FakeResource created_at=2015-06-03T18:49:19.000000, description=snapshot-description-67ea7a872a934368ad5b6254f90258c2, id=snapshot-id-a49b7c24d20742c981b0fda3cb66ec9a, metadata={'foo': 'bar'}, name=snapshot-name-a02d2a7d4d4c43f491a0aacd78d13be4, size=10, status=available, volume_id=volume-nameb682276ea41643ceae200ad04f6ef772>
setUp()
snapshots = [<FakeResource created_at=2015-06-03T18:49:19.000000, description=snapshot-description-ff1d01ae44a040fe8494575df4198fd2, id=snapshot-id-f649756616a74b6693906b2dca870931, metadata={'foo': 'bar'}, name=snapshot-name-66c294cc698e4b4c9f014d1ce9a273df, size=10, status=available, volume_id=volume-nameb682276ea41643ceae200ad04f6ef772>, <FakeResource created_at=2015-06-03T18:49:19.000000, description=snapshot-description-db3c4fe7b87c4b39b3b5b4197f5b0971, id=snapshot-id-975dea2f682b456bb4fa6ce232f3435e, metadata={'foo': 'bar'}, name=snapshot-name-0df03b7ed4c544129b4b1e0bec0f8ab8, size=10, status=available, volume_id=volume-nameb682276ea41643ceae200ad04f6ef772>, <FakeResource created_at=2015-06-03T18:49:19.000000, description=snapshot-description-67ea7a872a934368ad5b6254f90258c2, id=snapshot-id-a49b7c24d20742c981b0fda3cb66ec9a, metadata={'foo': 'bar'}, name=snapshot-name-a02d2a7d4d4c43f491a0aacd78d13be4, size=10, status=available, volume_id=volume-nameb682276ea41643ceae200ad04f6ef772>]
test_snapshot_list_all_projects()
test_snapshot_list_with_options()
test_snapshot_list_without_options()
volume = <FakeResource attachments=[{'device': '/dev/86ac8c1289994d4d82c749b501f9844b', 'server_id': 'd7fb9844f2de4f1a9bbd3114f1c0ac2d'}], availability_zone=zone84dc8d26548c41bbaf1b8806647536e5, bootable=1, description=descriptionc07e323352d848b28b0f99203af814b2, id=volume-id7c56cb28c95f4917ac884696481b8f01, metadata={'key42d24bc096754f79b5c57a0bab84c9ce': 'valdc455dbfa5804d50878a0b22316b2f44', 'keyff7af848291e4ff7bfadc997e9fe943a': 'vala11d84b148a741a18a25e4fefa37a3c1', 'key5161b1a860fd45a8b0fc16e298c8216c': 'valbac480c0b1584749abc8fb50833d216a'}, name=volume-nameb682276ea41643ceae200ad04f6ef772, size=16, snapshot_id=4, status=available, volume_type=fake_lvmdriver-1>
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-568799da69744d8a9b3d4e294162591f, id=snapshot-id-d525018f21b24ce6b605351d54216c82, metadata={'foo': 'bar'}, name=snapshot-name-c3e0d3e177cb4f66b237bc6cd218dd90, size=10, status=available, volume_id=vloume-id-aa2413fcd1924dd0a536117a16a57cfa>
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-0c922332c9f248be8f91088b041f10bb, id=snapshot-id-263cb1b8c2f84904adf4f274b9b7fe5d, metadata={'foo': 'bar'}, name=snapshot-name-866654b21817406aaf4965ea0bc31fc3, size=10, status=available, volume_id=vloume-id-e60b2f0422a74cbc87e750f143326046>
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-015c66704e3641529aad716555f299ac, extra_specs={'foo': 'bar'}, id=type-id-19e0a381bf854aedb3b535150919d713, name=type-name-1fa0bb37cdfb42388e72bb1644582bde>
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-d605db9ff5e7464387eec36c9cbded3e', 'type-name-1c10a5e974a9464f8f931931a01f371d'), ('type-id-6f42733085c04dad95bfc0b5d01e97c5', 'type-name-e01fcf68a83d42c9bf9ac75306183510')]
data_long = [('type-id-d605db9ff5e7464387eec36c9cbded3e', 'type-name-1c10a5e974a9464f8f931931a01f371d', 'type-description-5dbf7e54cd904d9c97927f796a2dc570', u"foo='bar'"), ('type-id-6f42733085c04dad95bfc0b5d01e97c5', 'type-name-e01fcf68a83d42c9bf9ac75306183510', 'type-description-b696ab06fc924888b8a849dc1cb2b94a', u"foo='bar'")]
setUp()
t = <FakeResource description=type-description-b696ab06fc924888b8a849dc1cb2b94a, extra_specs={'foo': 'bar'}, id=type-id-6f42733085c04dad95bfc0b5d01e97c5, name=type-name-e01fcf68a83d42c9bf9ac75306183510>
test_type_list_with_options()
test_type_list_without_options()
volume_types = [<FakeResource description=type-description-5dbf7e54cd904d9c97927f796a2dc570, extra_specs={'foo': 'bar'}, id=type-id-d605db9ff5e7464387eec36c9cbded3e, name=type-name-1c10a5e974a9464f8f931931a01f371d>, <FakeResource description=type-description-b696ab06fc924888b8a849dc1cb2b94a, extra_specs={'foo': 'bar'}, id=type-id-6f42733085c04dad95bfc0b5d01e97c5, name=type-name-e01fcf68a83d42c9bf9ac75306183510>]
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-1411f5d2c80341a4be2928f1c55678fd, extra_specs={'foo': 'bar'}, id=type-id-6f4c5a9ab25949c8af40e77f0564b17b, name=type-name-22a2f050f07f450ca7e5ed3dac281215, set_keys=<MagicMock id='192284304'>>
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-419b8acd3ff242eaaedd06ddb1712a41, extra_specs={'foo': 'bar'}, id=type-id-8923665795ab451c8b8f2da6f6a3da65, name=type-name-5e8675eafe5745cd9030da0c2ba923f2, unset_keys=<MagicMock id='189492688'>>

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