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 = ('zonebc758956ab014695921f2888fbc38746', 'container-9b4230f02d784f7ea10ab9a4e1fd2d73', 'description-62030eb1d9b7494dae158b1e90ba9de8', 'backup-id-8ae3dec6ea50495ab43f9096338b7038', 'backup-name-a6d2fdb4363c4d59be8adf14200955cb', None, 14, 'error', 'volume-iddadff46374bf4c75815622be97c53588')
new_backup = <FakeResource availability_zone=zonebc758956ab014695921f2888fbc38746, container=container-9b4230f02d784f7ea10ab9a4e1fd2d73, description=description-62030eb1d9b7494dae158b1e90ba9de8, id=backup-id-8ae3dec6ea50495ab43f9096338b7038, name=backup-name-a6d2fdb4363c4d59be8adf14200955cb, object_count=None, size=14, status=error, volume_id=volume-iddadff46374bf4c75815622be97c53588>
setUp()
test_backup_create()
test_backup_create_without_name()
volume = <FakeResource attachments=[{'device': '/dev/f37dede8387f43b685e2fb1e74995369', 'server_id': '0ca3b6bc902b45d6a8e1b62bd27920b9'}], availability_zone=zone843f0f4df73248cf8ea76d4847c3894a, bootable=1, description=description7c68952c93c34597ae9824c553e7994d, id=volume-iddadff46374bf4c75815622be97c53588, metadata={'key3e93d0d51a2a4cdc95f25965b0097834': 'val277cf5174454446b93bc5bf2f12869a2', 'keycbd79f426998462982a70766065f93f1': 'valf5ec43e6568344edb70fa5a5253f0c98', 'key156a6875bb67478595be59d35b0c84e0': 'valdef5686cc3c341c5b9122d7211a5e0ed'}, name=volume-name70a5236bcc22447abd859c4193eff295, size=19, snapshot_id=2, 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=zone0570e158e2b54adbab14698d5bada318, container=container-6ad5961738904b40950c23e4073c671f, description=description-f2564f19e14348d69ca8729b4978a4e2, id=backup-id-45244f32b2be4d759c3e53ebc698b6a0, name=backup-name-264c9c85229343eba8b7f1310531ab9e, object_count=None, size=18, status=error, volume_id=volume-id-ecb169f4e24d46169c6a76f72b24acc6>
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=zone05d32c61c5624d72b5f4a1512a7b95ec, container=container-2f56ad89e35a460794d7f92d4e2f4698, description=description-d502a2f43b4c41edb4762a0a2cf52aee, id=backup-id-c43f2cda75f240c3a8ff831854658585, name=backup-name-a390dd3b0ee847768334281eff25df00, object_count=None, size=17, status=error, volume_id=volume-name9dc99eedb10443baa55bcd99e347133a>
backups = [<FakeResource availability_zone=zonec5f879e6ff9d4b379e8b61a3fe1eaab7, container=container-981e796c14334c269a9efa29f23e842b, description=description-1ce978901b34482e952d3b681717f18f, id=backup-id-6b6e9c4c6fdc4065b9b5fda8bdcb9f99, name=backup-name-53e1d239f0d540ed849d98f1b9e5424b, object_count=None, size=4, status=error, volume_id=volume-name9dc99eedb10443baa55bcd99e347133a>, <FakeResource availability_zone=zonedb6b024e96a245da998aa64cf5ccfa15, container=container-5eb067e21266404d8bf474fac236296d, description=description-9e78046358854acab189c1d99d63659f, id=backup-id-1db659a30f734c5389bcac11f5599570, name=backup-name-c53ba6d5e264445fb71e9b895c78e84d, object_count=None, size=7, status=error, volume_id=volume-name9dc99eedb10443baa55bcd99e347133a>, <FakeResource availability_zone=zone05d32c61c5624d72b5f4a1512a7b95ec, container=container-2f56ad89e35a460794d7f92d4e2f4698, description=description-d502a2f43b4c41edb4762a0a2cf52aee, id=backup-id-c43f2cda75f240c3a8ff831854658585, name=backup-name-a390dd3b0ee847768334281eff25df00, object_count=None, size=17, status=error, volume_id=volume-name9dc99eedb10443baa55bcd99e347133a>]
columns = ['ID', 'Name', 'Description', 'Status', 'Size']
columns_long = ['ID', 'Name', 'Description', 'Status', 'Size', 'Availability Zone', 'Volume', 'Container']
data = [('backup-id-6b6e9c4c6fdc4065b9b5fda8bdcb9f99', 'backup-name-53e1d239f0d540ed849d98f1b9e5424b', 'description-1ce978901b34482e952d3b681717f18f', 'error', 4), ('backup-id-1db659a30f734c5389bcac11f5599570', 'backup-name-c53ba6d5e264445fb71e9b895c78e84d', 'description-9e78046358854acab189c1d99d63659f', 'error', 7), ('backup-id-c43f2cda75f240c3a8ff831854658585', 'backup-name-a390dd3b0ee847768334281eff25df00', 'description-d502a2f43b4c41edb4762a0a2cf52aee', 'error', 17)]
data_long = [('backup-id-6b6e9c4c6fdc4065b9b5fda8bdcb9f99', 'backup-name-53e1d239f0d540ed849d98f1b9e5424b', 'description-1ce978901b34482e952d3b681717f18f', 'error', 4, 'zonec5f879e6ff9d4b379e8b61a3fe1eaab7', 'volume-name9dc99eedb10443baa55bcd99e347133a', 'container-981e796c14334c269a9efa29f23e842b'), ('backup-id-1db659a30f734c5389bcac11f5599570', 'backup-name-c53ba6d5e264445fb71e9b895c78e84d', 'description-9e78046358854acab189c1d99d63659f', 'error', 7, 'zonedb6b024e96a245da998aa64cf5ccfa15', 'volume-name9dc99eedb10443baa55bcd99e347133a', 'container-5eb067e21266404d8bf474fac236296d'), ('backup-id-c43f2cda75f240c3a8ff831854658585', 'backup-name-a390dd3b0ee847768334281eff25df00', 'description-d502a2f43b4c41edb4762a0a2cf52aee', 'error', 17, 'zone05d32c61c5624d72b5f4a1512a7b95ec', 'volume-name9dc99eedb10443baa55bcd99e347133a', 'container-2f56ad89e35a460794d7f92d4e2f4698')]
setUp()
test_backup_list_with_options()
test_backup_list_without_options()
volume = <FakeResource attachments=[{'device': '/dev/64584282887a4265b1d34c7d5ef433c3', 'server_id': '39f3a7a1c06a46d8ba1ce2b538b851e2'}], availability_zone=zone3a3be27dd1544d1ebe49a934301c03fd, bootable=0, description=description045ff46c57a442d68e0804e61882253c, id=volume-id2147616c7d0d4c908631c35fd0961c0e, metadata={'key864a4dad50814242bfa0e8a99a496463': 'vala8110d99cb0a44009c3a98dd59bd8cde', 'keyd43900d836c3451c8e7b9008a277692b': 'val48bc750bca164e2abcff31f8580e4216', 'key639a9a2d48ac4cbf8a5fc8164e35ec84': 'valed02466e76ab46eabfa06647898117f9'}, name=volume-name9dc99eedb10443baa55bcd99e347133a, size=4, snapshot_id=5, 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=zone4474839faa254505b4fd63766306ac62, container=container-3b9232d7df234648bfcc212684d1fa14, description=description-058f409dfa9942369a2545e9358c9d85, id=backup-id-31cb7b1b43fd466784ca5a5811116c01, name=backup-name-2ab7d98a4658486c803cd6b9001c1fcf, object_count=None, size=7, status=error, volume_id=volume-idfb6d073ef3e643d9b25bdc3da18e956e>
setUp()
test_backup_restore()
volume = <FakeResource attachments=[{'device': '/dev/b4e5181db7c04fbd9a9d8782203f120b', 'server_id': '3bbbdbe2fa3e4a4a8060ebf888a364ac'}], availability_zone=zone9e1e52cebe114d19aa1ffd7c08e397f4, bootable=1, description=description15d431ae281e4191bb17aab57498c419, id=volume-idfb6d073ef3e643d9b25bdc3da18e956e, metadata={'key1eb5c960289845639b4e783373bcd44f': 'valdfc0c7387d4e4eb8a19ceb1b2a54b5b7', 'keyabd64f66ee314a02bcb3cf3ac4d370aa': 'val14cd175663394501986d83d3858c0bcc', 'keya4c532189e0b4288828ba7b61c61f153': 'val80eaacc1ed644cf7a91cc33a2969509f'}, name=volume-nameb02546e07a1843488a1d65ef24cac154, size=8, snapshot_id=5, 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=zonecdee23bef01341698c919969a32303ad, container=container-39c61b6b815443768053e80fbf748863, description=description-e1a582b010a340a08256d26e367ff4f7, id=backup-id-43f1024583a947349b504d95a820bfb3, name=backup-name-322cc327aca94824a5a99e84a117846f, object_count=None, size=10, status=error, volume_id=volume-id-c6e4c7919fcc4507824381e6737c68dc>
columns = ('availability_zone', 'container', 'description', 'id', 'name', 'object_count', 'size', 'status', 'volume_id')
data = ('zonecdee23bef01341698c919969a32303ad', 'container-39c61b6b815443768053e80fbf748863', 'description-e1a582b010a340a08256d26e367ff4f7', 'backup-id-43f1024583a947349b504d95a820bfb3', 'backup-name-322cc327aca94824a5a99e84a117846f', None, 10, 'error', 'volume-id-c6e4c7919fcc4507824381e6737c68dc')
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-616e7619d5404c928ccc0d3785dc2c99, name=qos-name-6511d980f2ca40f2be2a33352a4b9c73, specs={'iops': '9001', 'foo': 'bar'}>
setUp()
test_qos_associate()
volume_type = <FakeResource description=type-description-e0c8d44a7a1641468f89fdffa778ee84, extra_specs={'foo': 'bar'}, id=type-id-2a53188ed317473bb6536b50b7ee0ce9, name=type-name-0e7755a212364e6f93d9f7ba245ec30d>
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-cbff20fc7a9f4f37acc3365d136e1feb', 'qos-name-fbefc77c1fb64acfb76b9a41d428020a', {'iops': '9001', 'foo': 'bar'})
new_qos_spec = <FakeResource consumer=front-end, id=qos-id-cbff20fc7a9f4f37acc3365d136e1feb, name=qos-name-fbefc77c1fb64acfb76b9a41d428020a, 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-e038264b4d924d52882b8eb5111c01f1, name=qos-name-dc2539a6705e44f4b0da9b0ccfe87b1c, 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-4e59926095924d9a8274594ffa6b6875, name=qos-name-5eb52f8528dc4594ab7e7d5a2787b816, 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-8d3ed33ca2c84576a88c7f140db519dc, extra_specs={'foo': 'bar'}, id=type-id-8cc3ba46ffef44fe81510f9445f2ca0d, name=type-name-c6de9689d7884675899856779e5e17e2>
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-bdab10242fc84aa6b82d5c5f8eed48b2', 'qos-name-97cdcb30983a4e3fbb58485897f57bc0', 'front-end', 'type-name-bef7604ad21a42be8a70865f2eba8a86', u"foo='bar', iops='9001'"), ('qos-id-6d3b996e23e04b298c657f2b13ffb758', 'qos-name-083d3875575f4fe8bb5fc7e834cecffb', 'front-end', 'type-name-bef7604ad21a42be8a70865f2eba8a86', u"foo='bar', iops='9001'")]
q = <FakeResource consumer=front-end, id=qos-id-6d3b996e23e04b298c657f2b13ffb758, name=qos-name-083d3875575f4fe8bb5fc7e834cecffb, specs={'iops': '9001', 'foo': 'bar'}>
qos_association = <FakeResource association_type=volume_type, id=type-id-424dc3710d614783a0ee448159cb0b8d, name=type-name-bef7604ad21a42be8a70865f2eba8a86>
qos_specs = [<FakeResource consumer=front-end, id=qos-id-bdab10242fc84aa6b82d5c5f8eed48b2, name=qos-name-97cdcb30983a4e3fbb58485897f57bc0, specs={'iops': '9001', 'foo': 'bar'}>, <FakeResource consumer=front-end, id=qos-id-6d3b996e23e04b298c657f2b13ffb758, name=qos-name-083d3875575f4fe8bb5fc7e834cecffb, 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-3d9f3ae657a2450daab9b518b71d652e, name=qos-name-bd65172a73b94734a05c860d4e025b0c, 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-133d0953e634480da05b7df8b14db0af', 'front-end', 'qos-id-0594cbb8dd764db598b5e87fa15e7740', 'qos-name-613d7e3a210a446bb69526c279cbf3f5', u"foo='bar', iops='9001'")
qos_association = <FakeResource association_type=volume_type, id=type-id-1e5cfed977034ce3b08c21790ec4d4dc, name=type-name-133d0953e634480da05b7df8b14db0af>
qos_spec = <FakeResource consumer=front-end, id=qos-id-0594cbb8dd764db598b5e87fa15e7740, name=qos-name-613d7e3a210a446bb69526c279cbf3f5, 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-c899d7ce60134f2998d69055aecd7a26, name=qos-name-c47a7f5318cc4cac8676f4b08d0078f1, 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-d1f7865342e74ff9a668a70f6c03fefa, id=snapshot-id-425b39cbf49f493d95827a7f6cdf588a, metadata={'foo': 'bar'}, name=snapshot-name-4e0d2bf445f0457d8db6046645983641, size=10, status=available, volume_id=vloume-id-1ba645ab538847f581d882d48f0a5fd0>
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-50b10c39500d46a39fd78bdc940f1357', 'snapshot-name-3f06bd1cb88146b99913d4febb29711f', 'snapshot-description-f6a9589e11f84099ad33d1706dd95727', 'available', 10), ('snapshot-id-b35a34aea2c94b568e3679f03b581a85', 'snapshot-name-b9f9ebd0972747d58da9ede2d0b86b67', 'snapshot-description-b0bb40bb2dfb4db4ade5aa5fb089bdfc', 'available', 10), ('snapshot-id-5a1cfa5034044155b13c7b38de1eabae', 'snapshot-name-392b0a2ec6174a2ea252910757eaeef7', 'snapshot-description-bb5d37ec1186474cb41c224529eacfd9', 'available', 10)]
data_long = [('snapshot-id-50b10c39500d46a39fd78bdc940f1357', 'snapshot-name-3f06bd1cb88146b99913d4febb29711f', 'snapshot-description-f6a9589e11f84099ad33d1706dd95727', 'available', 10, '2015-06-03T18:49:19.000000', 'volume-namefb0b831189ce46d39ce4f9da5fa23a73', u"foo='bar'"), ('snapshot-id-b35a34aea2c94b568e3679f03b581a85', 'snapshot-name-b9f9ebd0972747d58da9ede2d0b86b67', 'snapshot-description-b0bb40bb2dfb4db4ade5aa5fb089bdfc', 'available', 10, '2015-06-03T18:49:19.000000', 'volume-namefb0b831189ce46d39ce4f9da5fa23a73', u"foo='bar'"), ('snapshot-id-5a1cfa5034044155b13c7b38de1eabae', 'snapshot-name-392b0a2ec6174a2ea252910757eaeef7', 'snapshot-description-bb5d37ec1186474cb41c224529eacfd9', 'available', 10, '2015-06-03T18:49:19.000000', 'volume-namefb0b831189ce46d39ce4f9da5fa23a73', u"foo='bar'")]
s = <FakeResource created_at=2015-06-03T18:49:19.000000, description=snapshot-description-bb5d37ec1186474cb41c224529eacfd9, id=snapshot-id-5a1cfa5034044155b13c7b38de1eabae, metadata={'foo': 'bar'}, name=snapshot-name-392b0a2ec6174a2ea252910757eaeef7, size=10, status=available, volume_id=volume-namefb0b831189ce46d39ce4f9da5fa23a73>
setUp()
snapshots = [<FakeResource created_at=2015-06-03T18:49:19.000000, description=snapshot-description-f6a9589e11f84099ad33d1706dd95727, id=snapshot-id-50b10c39500d46a39fd78bdc940f1357, metadata={'foo': 'bar'}, name=snapshot-name-3f06bd1cb88146b99913d4febb29711f, size=10, status=available, volume_id=volume-namefb0b831189ce46d39ce4f9da5fa23a73>, <FakeResource created_at=2015-06-03T18:49:19.000000, description=snapshot-description-b0bb40bb2dfb4db4ade5aa5fb089bdfc, id=snapshot-id-b35a34aea2c94b568e3679f03b581a85, metadata={'foo': 'bar'}, name=snapshot-name-b9f9ebd0972747d58da9ede2d0b86b67, size=10, status=available, volume_id=volume-namefb0b831189ce46d39ce4f9da5fa23a73>, <FakeResource created_at=2015-06-03T18:49:19.000000, description=snapshot-description-bb5d37ec1186474cb41c224529eacfd9, id=snapshot-id-5a1cfa5034044155b13c7b38de1eabae, metadata={'foo': 'bar'}, name=snapshot-name-392b0a2ec6174a2ea252910757eaeef7, size=10, status=available, volume_id=volume-namefb0b831189ce46d39ce4f9da5fa23a73>]
test_snapshot_list_all_projects()
test_snapshot_list_with_options()
test_snapshot_list_without_options()
volume = <FakeResource attachments=[{'device': '/dev/e904bb26adee46d497d0834ac2fe2bd0', 'server_id': '5492f290af284e36ac04ead0d359a3b3'}], availability_zone=zonefbdfd665af9b48dd8b514edcf054b443, bootable=1, description=description13e8028eee214a848740e4555ee1bb54, id=volume-idf7e7f1cda3654e709417de306a47af4e, metadata={'keya92e9cdd80044a2091a5e74bf1c5bad6': 'val845e2b2333744a04b1800596684567de', 'key1691628fd3bc460586f1546e2d6aea90': 'val4e47ad980ee0401e83364a8a13ec09b1', 'key802d4745ae614d5eb897f67fc16881b9': 'val75146cd790cb4053b27b22ed22be2c1c'}, name=volume-namefb0b831189ce46d39ce4f9da5fa23a73, size=4, 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-dd724f09dd9a4d19aa2ef3443f7c1458, id=snapshot-id-8934504dfcc9461aa6622a57661cf3b9, metadata={'foo': 'bar'}, name=snapshot-name-9aa132b20e89419d92295a8733ed5a54, size=10, status=available, volume_id=vloume-id-e849ec1a8209403fa4a28fd77c988d35>
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-388e6fe8865d43b69cf513ec63d1bff4, id=snapshot-id-6495f4f2218c47bd953e509bc1c0a923, metadata={'foo': 'bar'}, name=snapshot-name-e6613595ff7a4af38b5aa92dc61b4ec2, size=10, status=available, volume_id=vloume-id-ddafd31cf48d4e1184eba36c6037ac08>
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-e3232262fabc4e4fa78339ec24a74fa1, extra_specs={'foo': 'bar'}, id=type-id-9ad2c9a8588146a3aa1774f4a9528963, name=type-name-6c3ed0a5c5104569a4d63c52973695f4>
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-78ee9fa52359471da303868535b00adb', 'type-name-e66791aa489e4442abdb4d91abca8412'), ('type-id-65d6f2eda56047258f0c327bab036952', 'type-name-4dfcabbb8f0e48c7be72a4e00373fc15')]
data_long = [('type-id-78ee9fa52359471da303868535b00adb', 'type-name-e66791aa489e4442abdb4d91abca8412', 'type-description-3053063447d742c29e01ec06137f011d', u"foo='bar'"), ('type-id-65d6f2eda56047258f0c327bab036952', 'type-name-4dfcabbb8f0e48c7be72a4e00373fc15', 'type-description-ef0456f9267e4abc92b4a64c75146b28', u"foo='bar'")]
setUp()
t = <FakeResource description=type-description-ef0456f9267e4abc92b4a64c75146b28, extra_specs={'foo': 'bar'}, id=type-id-65d6f2eda56047258f0c327bab036952, name=type-name-4dfcabbb8f0e48c7be72a4e00373fc15>
test_type_list_with_options()
test_type_list_without_options()
volume_types = [<FakeResource description=type-description-3053063447d742c29e01ec06137f011d, extra_specs={'foo': 'bar'}, id=type-id-78ee9fa52359471da303868535b00adb, name=type-name-e66791aa489e4442abdb4d91abca8412>, <FakeResource description=type-description-ef0456f9267e4abc92b4a64c75146b28, extra_specs={'foo': 'bar'}, id=type-id-65d6f2eda56047258f0c327bab036952, name=type-name-4dfcabbb8f0e48c7be72a4e00373fc15>]
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-36955011798c48d4a2955b3c39b42786, extra_specs={'foo': 'bar'}, id=type-id-ef0854048b34446bb5e47f0c172cd6ca, name=type-name-eb17064493184dd3aab629d84f0f335b, set_keys=<MagicMock id='139899303040656'>>
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-e09cab5b7009437994e66192f69ec450, extra_specs={'foo': 'bar'}, id=type-id-8a3a36a0b45347329c1c4d046601271b, name=type-name-f855c046e3cf46e7b06d00c1c8995a44, unset_keys=<MagicMock id='139899303269584'>>

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