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.
-
static
-
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.
-
static
-
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
-
static
-
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
-
static
-
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
-
static
-
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
-
static
-
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.
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
= ('zone5be5a8cdb2bf4beeba0fd58d0302c029', 'container-b1dc4f4daba542028a026a6a0a418700', 'description-0e1a195ccec346b58615315612a43a13', 'backup-id-bb672c1a6c1f4bcf994d4f6456841705', 'backup-name-80f65655255b45e994d1cd69b7089bd8', None, 12, 'error', 'volume-id0fc652be7dc0420484b692bb6d236ffc')¶
-
new_backup
= <FakeResource availability_zone=zone5be5a8cdb2bf4beeba0fd58d0302c029, container=container-b1dc4f4daba542028a026a6a0a418700, description=description-0e1a195ccec346b58615315612a43a13, id=backup-id-bb672c1a6c1f4bcf994d4f6456841705, name=backup-name-80f65655255b45e994d1cd69b7089bd8, object_count=None, size=12, status=error, volume_id=volume-id0fc652be7dc0420484b692bb6d236ffc>¶
-
setUp
()¶
-
test_backup_create
()¶
-
test_backup_create_without_name
()¶
-
volume
= <FakeResource attachments=[{'device': '/dev/5a5e191f96e74889ae3223b58f491ad1', 'server_id': 'cf347b68341e4f5eba0211e8cfc34fde'}], availability_zone=zone4e465e828e7f48f591841472c363ac51, bootable=1, description=description164e0aab0b584faa949c9f8bbf355453, id=volume-id0fc652be7dc0420484b692bb6d236ffc, metadata={'keyded2ae54a8c34c57978808856ab63125': 'val5ec433644979424e898a19ff7a890586', 'key684467b3b2a04b0a989d600c5d6e27df': 'val3099fffdedf543e68cd69c091de51e32', 'keyf2e05cb0317f41f99ac9bc539540ca92': 'val74928ef83d17482dbdcd684adae5b1a9'}, name=volume-name1aa963febea2421aa752359e7a3491d6, size=18, snapshot_id=5, status=in_use, 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=zone36ef8872a4094cb0a082fe7efb2681bd, container=container-1244590dfa3f4bf38a0c66807f583211, description=description-4ed4f85e17bb44fe907e9bcef79d9412, id=backup-id-4ebb3e2200d74706a47fe6f58df82e03, name=backup-name-e20f4068331548429c6178a4d0247b23, object_count=None, size=4, status=error, volume_id=volume-id-3e08351e11fa4f96a69bc1c473e9a0e4>¶
-
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=zone58ab0a018d5041d4a6d59482b6b6e20c, container=container-98604396c71b457c88e64b854b2a28ba, description=description-9834764f3c2e44c79f63cfa1f52932ad, id=backup-id-ae1e983c3c6e4a7ca014e8cf89fd5c22, name=backup-name-bb8f812dcd034fe6b9f31c39227d90a1, object_count=None, size=10, status=error, volume_id=volume-name1f41ac99b50040cfa08f189ff9d50d92>¶
-
backups
= [<FakeResource availability_zone=zone76e03673d736444288a453c76a60bba5, container=container-81145cba636549e7bb0f96fd49aad0da, description=description-d08fbfc906304962bdf93edb56d33c15, id=backup-id-33f7ecc7604d4e1cab5b7ab86657564c, name=backup-name-fd981c8bc8bd4f1081d613c3fcf1b662, object_count=None, size=4, status=error, volume_id=volume-name1f41ac99b50040cfa08f189ff9d50d92>, <FakeResource availability_zone=zone614aaa0f67044025aac64272cf98ef60, container=container-c90749fc7b7746ec89706c193c565a27, description=description-7a9c79632f914220bbd7240fd1054c1f, id=backup-id-2277260b700e47daa4a0f56394269010, name=backup-name-dd18f0789e9f41dc999a9160104582c3, object_count=None, size=20, status=error, volume_id=volume-name1f41ac99b50040cfa08f189ff9d50d92>, <FakeResource availability_zone=zone58ab0a018d5041d4a6d59482b6b6e20c, container=container-98604396c71b457c88e64b854b2a28ba, description=description-9834764f3c2e44c79f63cfa1f52932ad, id=backup-id-ae1e983c3c6e4a7ca014e8cf89fd5c22, name=backup-name-bb8f812dcd034fe6b9f31c39227d90a1, object_count=None, size=10, status=error, volume_id=volume-name1f41ac99b50040cfa08f189ff9d50d92>]¶
-
columns
= ['ID', 'Name', 'Description', 'Status', 'Size']¶
-
columns_long
= ['ID', 'Name', 'Description', 'Status', 'Size', 'Availability Zone', 'Volume', 'Container']¶
-
data
= [('backup-id-33f7ecc7604d4e1cab5b7ab86657564c', 'backup-name-fd981c8bc8bd4f1081d613c3fcf1b662', 'description-d08fbfc906304962bdf93edb56d33c15', 'error', 4), ('backup-id-2277260b700e47daa4a0f56394269010', 'backup-name-dd18f0789e9f41dc999a9160104582c3', 'description-7a9c79632f914220bbd7240fd1054c1f', 'error', 20), ('backup-id-ae1e983c3c6e4a7ca014e8cf89fd5c22', 'backup-name-bb8f812dcd034fe6b9f31c39227d90a1', 'description-9834764f3c2e44c79f63cfa1f52932ad', 'error', 10)]¶
-
data_long
= [('backup-id-33f7ecc7604d4e1cab5b7ab86657564c', 'backup-name-fd981c8bc8bd4f1081d613c3fcf1b662', 'description-d08fbfc906304962bdf93edb56d33c15', 'error', 4, 'zone76e03673d736444288a453c76a60bba5', 'volume-name1f41ac99b50040cfa08f189ff9d50d92', 'container-81145cba636549e7bb0f96fd49aad0da'), ('backup-id-2277260b700e47daa4a0f56394269010', 'backup-name-dd18f0789e9f41dc999a9160104582c3', 'description-7a9c79632f914220bbd7240fd1054c1f', 'error', 20, 'zone614aaa0f67044025aac64272cf98ef60', 'volume-name1f41ac99b50040cfa08f189ff9d50d92', 'container-c90749fc7b7746ec89706c193c565a27'), ('backup-id-ae1e983c3c6e4a7ca014e8cf89fd5c22', 'backup-name-bb8f812dcd034fe6b9f31c39227d90a1', 'description-9834764f3c2e44c79f63cfa1f52932ad', 'error', 10, 'zone58ab0a018d5041d4a6d59482b6b6e20c', 'volume-name1f41ac99b50040cfa08f189ff9d50d92', 'container-98604396c71b457c88e64b854b2a28ba')]¶
-
setUp
()¶
-
test_backup_list_with_options
()¶
-
test_backup_list_without_options
()¶
-
volume
= <FakeResource attachments=[{'device': '/dev/f9dcae4524a446bcb3e94d058c5bc260', 'server_id': '09e5b9c165f8452e975cf0bda87ec8ee'}], availability_zone=zonebbee6bfc2a574d28877409ad9c658884, bootable=1, description=description22c5fdfaa2d3405396c1702a8cba2974, id=volume-id062d67cf70ea4c7e958cf13574eaa324, metadata={'key282eb5f4ec454131b4429078ca42dec0': 'val7ef83d1db2ce4769b4cbd0c3b5919588', 'keyf53ea694e88644169dd6ddf0c8cd6fb2': 'valca1e5204d2314ccf8e34e137e36f4ebf', 'keydb1184e2ba7b4330b7b8ad9e4cca34cf': 'val194b41e85e63442189b50e309555ea0b'}, name=volume-name1f41ac99b50040cfa08f189ff9d50d92, size=5, snapshot_id=2, status=available, volume_type=fake_lvmdriver-1>¶
-
-
class
openstackclient.tests.volume.v2.test_backup.
TestBackupRestore
(*args, **kwargs)¶ Bases:
openstackclient.tests.volume.v2.test_backup.TestBackup
-
backup
= <FakeResource availability_zone=zone696a8fe6c30d4c099d65225515f0d490, container=container-0e68b850939a4de58ca7bb1e7290e4a9, description=description-5c22bf622ac34eeb883c90cc52c8f1b3, id=backup-id-130ce4f6860b48fb9be1a996351c11a9, name=backup-name-d0ceb9ac49d44e2b8d0a0218d446e31a, object_count=None, size=7, status=error, volume_id=volume-idd5ee17d8f02441ad89c5597af6c1541c>¶
-
setUp
()¶
-
test_backup_restore
()¶
-
volume
= <FakeResource attachments=[{'device': '/dev/453393eda26643f090d9f956d777aa16', 'server_id': '293ffa0688e8461f894bf50a2bfe3923'}], availability_zone=zoned06ce972bca04e8dbae340a03c1758ce, bootable=0, description=description8b66adf3195b40cdb69ff228eb598e41, id=volume-idd5ee17d8f02441ad89c5597af6c1541c, metadata={'key69fa0b374ab24222bc0919cee11ecaa2': 'val5b05ad14774f48f6bc37e2644440bf84', 'key47c1ddc7e27a4ec8bff1fc480622b885': 'vala0f41a900b5c409e8d64a8b920ae0d85', 'key69ba35787f74448ea605af1c40e0cb57': 'val85eb3d5d583842faa2d5384344973116'}, name=volume-name9d2db14f9e8a40b6b85ae50d43956fd8, size=3, snapshot_id=2, status=in_use, 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=zone456f2d0250c34ed8ae8b1005b7e08f57, container=container-6dda486b36554416a58ecd88dea291c1, description=description-69791a7bfe9d44e991596cef21896f0b, id=backup-id-97d501983541428988a4bc0969e2bd6e, name=backup-name-bd81fcde12bb4da8855e268fc4a0546f, object_count=None, size=15, status=error, volume_id=volume-id-d49014f386e84e7eb7b15b39c1658cca>¶
-
columns
= ('availability_zone', 'container', 'description', 'id', 'name', 'object_count', 'size', 'status', 'volume_id')¶
-
data
= ('zone456f2d0250c34ed8ae8b1005b7e08f57', 'container-6dda486b36554416a58ecd88dea291c1', 'description-69791a7bfe9d44e991596cef21896f0b', 'backup-id-97d501983541428988a4bc0969e2bd6e', 'backup-name-bd81fcde12bb4da8855e268fc4a0546f', None, 15, 'error', 'volume-id-d49014f386e84e7eb7b15b39c1658cca')¶
-
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
-
setUp
()¶
-
test_qos_associate
()¶
-
-
class
openstackclient.tests.volume.v2.test_qos_specs.
TestQosCreate
(*args, **kwargs)¶ Bases:
openstackclient.tests.volume.v2.test_qos_specs.TestQos
-
columns
= ('consumer', 'id', 'name')¶
-
datalist
= ('front-end', '6f2be1de-997b-4230-b76c-a3633b59e8fb', 'fake-qos-specs')¶
-
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
-
setUp
()¶
-
test_qos_delete_with_id
()¶
-
test_qos_delete_with_name
()¶
-
-
class
openstackclient.tests.volume.v2.test_qos_specs.
TestQosDisassociate
(*args, **kwargs)¶ Bases:
openstackclient.tests.volume.v2.test_qos_specs.TestQos
-
setUp
()¶
-
test_qos_disassociate_with_all_volume_types
()¶
-
test_qos_disassociate_with_volume_type
()¶
-
-
class
openstackclient.tests.volume.v2.test_qos_specs.
TestQosList
(*args, **kwargs)¶ Bases:
openstackclient.tests.volume.v2.test_qos_specs.TestQos
-
setUp
()¶
-
test_qos_list
()¶
-
-
class
openstackclient.tests.volume.v2.test_qos_specs.
TestQosSet
(*args, **kwargs)¶ Bases:
openstackclient.tests.volume.v2.test_qos_specs.TestQos
-
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
-
setUp
()¶
-
test_qos_show
()¶
-
-
class
openstackclient.tests.volume.v2.test_qos_specs.
TestQosUnset
(*args, **kwargs)¶ Bases:
openstackclient.tests.volume.v2.test_qos_specs.TestQos
-
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-b8aa976ea1c344bcb680b334e6edca25, id=snapshot-id-9078c926edcf4e5f835f763147448903, metadata={'foo': 'bar'}, name=snapshot-name-036a01987e414d7da808b22ea51774a1, size=10, status=available, volume_id=vloume-id-26bbed51a5d84b389e335946fc6ff6c5>¶
-
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-ccf7afc3f0d5427facefcd3f39c5bec2', 'snapshot-name-8d3bb1d4ba5a4935a34e37e87118d874', 'snapshot-description-864ea649407040c693c4bd2b205d2c4e', 'available', 10), ('snapshot-id-0ba0e1f278e742169f14106bac28976f', 'snapshot-name-c97e660267e24615a3c7f93d1c29ea58', 'snapshot-description-5e777e6717ae460b939c5f4e8140fec7', 'available', 10), ('snapshot-id-084b1fdde13b4f7ba88d02c2df0364ae', 'snapshot-name-08eeaefe41db46faa6dbb428443073d4', 'snapshot-description-243d8784a88e4847b85a2d2f809666f0', 'available', 10)]¶
-
data_long
= [('snapshot-id-ccf7afc3f0d5427facefcd3f39c5bec2', 'snapshot-name-8d3bb1d4ba5a4935a34e37e87118d874', 'snapshot-description-864ea649407040c693c4bd2b205d2c4e', 'available', 10, '2015-06-03T18:49:19.000000', 'volume-name2d9146f1613f4c899a8e9e3259dcc42d', u"foo='bar'"), ('snapshot-id-0ba0e1f278e742169f14106bac28976f', 'snapshot-name-c97e660267e24615a3c7f93d1c29ea58', 'snapshot-description-5e777e6717ae460b939c5f4e8140fec7', 'available', 10, '2015-06-03T18:49:19.000000', 'volume-name2d9146f1613f4c899a8e9e3259dcc42d', u"foo='bar'"), ('snapshot-id-084b1fdde13b4f7ba88d02c2df0364ae', 'snapshot-name-08eeaefe41db46faa6dbb428443073d4', 'snapshot-description-243d8784a88e4847b85a2d2f809666f0', 'available', 10, '2015-06-03T18:49:19.000000', 'volume-name2d9146f1613f4c899a8e9e3259dcc42d', u"foo='bar'")]¶
-
s
= <FakeResource created_at=2015-06-03T18:49:19.000000, description=snapshot-description-243d8784a88e4847b85a2d2f809666f0, id=snapshot-id-084b1fdde13b4f7ba88d02c2df0364ae, metadata={'foo': 'bar'}, name=snapshot-name-08eeaefe41db46faa6dbb428443073d4, size=10, status=available, volume_id=volume-name2d9146f1613f4c899a8e9e3259dcc42d>¶
-
setUp
()¶
-
snapshots
= [<FakeResource created_at=2015-06-03T18:49:19.000000, description=snapshot-description-864ea649407040c693c4bd2b205d2c4e, id=snapshot-id-ccf7afc3f0d5427facefcd3f39c5bec2, metadata={'foo': 'bar'}, name=snapshot-name-8d3bb1d4ba5a4935a34e37e87118d874, size=10, status=available, volume_id=volume-name2d9146f1613f4c899a8e9e3259dcc42d>, <FakeResource created_at=2015-06-03T18:49:19.000000, description=snapshot-description-5e777e6717ae460b939c5f4e8140fec7, id=snapshot-id-0ba0e1f278e742169f14106bac28976f, metadata={'foo': 'bar'}, name=snapshot-name-c97e660267e24615a3c7f93d1c29ea58, size=10, status=available, volume_id=volume-name2d9146f1613f4c899a8e9e3259dcc42d>, <FakeResource created_at=2015-06-03T18:49:19.000000, description=snapshot-description-243d8784a88e4847b85a2d2f809666f0, id=snapshot-id-084b1fdde13b4f7ba88d02c2df0364ae, metadata={'foo': 'bar'}, name=snapshot-name-08eeaefe41db46faa6dbb428443073d4, size=10, status=available, volume_id=volume-name2d9146f1613f4c899a8e9e3259dcc42d>]¶
-
test_snapshot_list_all_projects
()¶
-
test_snapshot_list_with_options
()¶
-
test_snapshot_list_without_options
()¶
-
volume
= <FakeResource attachments=[{'device': '/dev/00bc82f60bfa47799cac70567b246f9f', 'server_id': '836ef185657a4d068373dd8041d48963'}], availability_zone=zone487aff0611524f1abac1ed3e609b3d57, bootable=1, description=descriptiona7f9dccd882b459a8a049f179f0892e8, id=volume-idecacdd48d9824bb6aabeeac84abf5361, metadata={'keyc22bf47582d5474a85324a33d9ffb82b': 'val8b4a294833654ebdbc6be1c24fa9c89e', 'key210601db77ce42a5b0692f01f20f159b': 'val95fd206a8f29406aacc64ee1586e66bb', 'key5d9d94b1cb3b446982c626b8617f2076': 'val69fadda89cbc445983cbd042e79dbf7b'}, name=volume-name2d9146f1613f4c899a8e9e3259dcc42d, size=4, snapshot_id=2, status=in_use, 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-deecbf7d08454913948be0052288827a, id=snapshot-id-e8a3125766b342199fa694c2b5cbf8d8, metadata={'foo': 'bar'}, name=snapshot-name-c6d1005ec4e54cc7bdb51635bdf45dbc, size=10, status=available, volume_id=vloume-id-d0783950fe6548ddaf29c578ffc29d10>¶
-
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-4a9a5571258c45d9b8f139356382adb2, id=snapshot-id-58c4b8f17b8841fc97b98c413976b79c, metadata={'foo': 'bar'}, name=snapshot-name-2b3d6939f485460d9c913dc0e1873808, size=10, status=available, volume_id=vloume-id-7782b7a9ffce4b36a5094ac5c1e3a634>¶
-
test_snapshot_unset
()¶
-
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-ad50f29a28c84d658369886ca36f820b, extra_specs={'foo': 'bar'}, id=type-id-3f95649bec8e4c5a968cde6d0bfd0201, name=type-name-4f333f081c19427faf514371f243c990>¶
-
-
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-757cdb2fd9084567a50ab1a7f0a21745', 'type-name-70f74d7869824f609aac2dbaba70583b'), ('type-id-e003c5765c0240409927e02d2fbddaab', 'type-name-9bc40ccdd9734247a34b9e5a5785f4ab')]¶
-
data_long
= [('type-id-757cdb2fd9084567a50ab1a7f0a21745', 'type-name-70f74d7869824f609aac2dbaba70583b', 'type-description-2858df4c119c48dd851ed8f413072449', u"foo='bar'"), ('type-id-e003c5765c0240409927e02d2fbddaab', 'type-name-9bc40ccdd9734247a34b9e5a5785f4ab', 'type-description-f2febec4de184e809358d10d91b4c38b', u"foo='bar'")]¶
-
setUp
()¶
-
t
= <FakeResource description=type-description-f2febec4de184e809358d10d91b4c38b, extra_specs={'foo': 'bar'}, id=type-id-e003c5765c0240409927e02d2fbddaab, name=type-name-9bc40ccdd9734247a34b9e5a5785f4ab>¶
-
test_type_list_with_options
()¶
-
test_type_list_without_options
()¶
-
volume_types
= [<FakeResource description=type-description-2858df4c119c48dd851ed8f413072449, extra_specs={'foo': 'bar'}, id=type-id-757cdb2fd9084567a50ab1a7f0a21745, name=type-name-70f74d7869824f609aac2dbaba70583b>, <FakeResource description=type-description-f2febec4de184e809358d10d91b4c38b, extra_specs={'foo': 'bar'}, id=type-id-e003c5765c0240409927e02d2fbddaab, name=type-name-9bc40ccdd9734247a34b9e5a5785f4ab>]¶
-
-
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-080f5637d40b46469c181b3711991ecb, extra_specs={'foo': 'bar'}, id=type-id-d374d55798134d41a8895a1d2660cca8, name=type-name-e3fd33e45650432aa43d87120eb979ee, set_keys=<MagicMock id='140272570080272'>>¶
-
-
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-23c761f1a8864ea98b57bd1ec9bf6da8, extra_specs={'foo': 'bar'}, id=type-id-0e5bfb8f197944fd996bad669243d734, name=type-name-621126f5021d4a479adb448ed989e624, unset_keys=<MagicMock id='140272570469776'>>¶
-
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
()¶
-