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 = ('zone81edd417f91b44f09dbc31277a7107d4', 'container-c409058ac36e4cf5865708a7f19f0437', 'description-11f809b2007f463f9dd8f8c41dccef39', 'backup-id-684c846e0c214768a9f3b0868f46edef', 'backup-name-cae33d3c8a4240d2b8e9694af8ab6974', None, 19, 'error', 'volume-idae0ce6d42c8b440ea86bcf96d4edcc64')
new_backup = <FakeResource availability_zone=zone81edd417f91b44f09dbc31277a7107d4, container=container-c409058ac36e4cf5865708a7f19f0437, description=description-11f809b2007f463f9dd8f8c41dccef39, id=backup-id-684c846e0c214768a9f3b0868f46edef, name=backup-name-cae33d3c8a4240d2b8e9694af8ab6974, object_count=None, size=19, status=error, volume_id=volume-idae0ce6d42c8b440ea86bcf96d4edcc64>
setUp()
test_backup_create()
test_backup_create_without_name()
volume = <FakeResource attachments=[{'device': '/dev/11ea8eb3a8ee43ab901b48faec04883d', 'server_id': '709ba5b71564475d80508ff9f4a672be'}], availability_zone=zone2b4ce0a886f14f3fa6dc37c2b0936474, bootable=1, description=descriptionb199f46fdfe54a37b39f7e0909d5be17, id=volume-idae0ce6d42c8b440ea86bcf96d4edcc64, metadata={'keyad166e7249b24c42880e0191469e22a7': 'val4d12c237fa5a4fbe826a4c33587ee967', 'key06ec5e0d6c4e4699acc15defd0aa4f07': 'val5ade5079ff784aa78ed7a44fc4480056', 'key45dc41b3ff0247b9bbdade1de97eb3cd': 'valdcd2a84e028e44429fd4b7d526f73bde'}, name=volume-nameeab3423ca11c404bb107e199d65d20d1, size=15, snapshot_id=1, 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=zone539aba63e6a5486b8da7e122b8109f2a, container=container-ad8a621aa40541a38939cfe1a44c5e13, description=description-49e5d69fc79a40f4829338416137b937, id=backup-id-67fc847bd8f0425fa588cc06d46d4b93, name=backup-name-839f18ac2cf04d40a0e2cfa36de19a98, object_count=None, size=2, status=error, volume_id=volume-id-cedf38dfa8f14dcebba7b272a26a1863>
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=zonebd3e59a26ec44ac29beca63dfc6aff0b, container=container-61b7198dd1cc43ae99b058233e30101a, description=description-1716c4019a3249dabf28520d7a85015c, id=backup-id-9cbb6500755c45a7ba3e5a2cf6609a3b, name=backup-name-16f75657971a434eba0f121e15f141fb, object_count=None, size=11, status=error, volume_id=volume-name520c8dbe72fa481599d756201f8c536d>
backups = [<FakeResource availability_zone=zone45c0dabb42884094b9cd1084b59efb64, container=container-bccbfb3ad4764ff28fb0f735999f9504, description=description-fb51f339af37412e952dbfa7ca5e655a, id=backup-id-4b8667e7e5c3479c9e15ef33ac033857, name=backup-name-95ac4d4386b64597b96601cdaef7788b, object_count=None, size=17, status=error, volume_id=volume-name520c8dbe72fa481599d756201f8c536d>, <FakeResource availability_zone=zone4dfb26ec143b4b029acceb16cb97b22f, container=container-51d65a7a3fd4495ba93a29433019af8d, description=description-79065c8bfa7f489d9ddf0de786b347c6, id=backup-id-ffac439f585f41d3a3012859af33e15f, name=backup-name-7f3ff1ddc30243eebab2dc547199aca9, object_count=None, size=18, status=error, volume_id=volume-name520c8dbe72fa481599d756201f8c536d>, <FakeResource availability_zone=zonebd3e59a26ec44ac29beca63dfc6aff0b, container=container-61b7198dd1cc43ae99b058233e30101a, description=description-1716c4019a3249dabf28520d7a85015c, id=backup-id-9cbb6500755c45a7ba3e5a2cf6609a3b, name=backup-name-16f75657971a434eba0f121e15f141fb, object_count=None, size=11, status=error, volume_id=volume-name520c8dbe72fa481599d756201f8c536d>]
columns = ['ID', 'Name', 'Description', 'Status', 'Size']
columns_long = ['ID', 'Name', 'Description', 'Status', 'Size', 'Availability Zone', 'Volume', 'Container']
data = [('backup-id-4b8667e7e5c3479c9e15ef33ac033857', 'backup-name-95ac4d4386b64597b96601cdaef7788b', 'description-fb51f339af37412e952dbfa7ca5e655a', 'error', 17), ('backup-id-ffac439f585f41d3a3012859af33e15f', 'backup-name-7f3ff1ddc30243eebab2dc547199aca9', 'description-79065c8bfa7f489d9ddf0de786b347c6', 'error', 18), ('backup-id-9cbb6500755c45a7ba3e5a2cf6609a3b', 'backup-name-16f75657971a434eba0f121e15f141fb', 'description-1716c4019a3249dabf28520d7a85015c', 'error', 11)]
data_long = [('backup-id-4b8667e7e5c3479c9e15ef33ac033857', 'backup-name-95ac4d4386b64597b96601cdaef7788b', 'description-fb51f339af37412e952dbfa7ca5e655a', 'error', 17, 'zone45c0dabb42884094b9cd1084b59efb64', 'volume-name520c8dbe72fa481599d756201f8c536d', 'container-bccbfb3ad4764ff28fb0f735999f9504'), ('backup-id-ffac439f585f41d3a3012859af33e15f', 'backup-name-7f3ff1ddc30243eebab2dc547199aca9', 'description-79065c8bfa7f489d9ddf0de786b347c6', 'error', 18, 'zone4dfb26ec143b4b029acceb16cb97b22f', 'volume-name520c8dbe72fa481599d756201f8c536d', 'container-51d65a7a3fd4495ba93a29433019af8d'), ('backup-id-9cbb6500755c45a7ba3e5a2cf6609a3b', 'backup-name-16f75657971a434eba0f121e15f141fb', 'description-1716c4019a3249dabf28520d7a85015c', 'error', 11, 'zonebd3e59a26ec44ac29beca63dfc6aff0b', 'volume-name520c8dbe72fa481599d756201f8c536d', 'container-61b7198dd1cc43ae99b058233e30101a')]
setUp()
test_backup_list_with_options()
test_backup_list_without_options()
volume = <FakeResource attachments=[{'device': '/dev/a85553ad2db14950930b80c107a8032d', 'server_id': '2f55f7862b7240878b87e2c5edd28438'}], availability_zone=zoned6be79e0bfad4f8f9ef919e280f878bd, bootable=0, description=description142790c9fdef49c0921714782792f320, id=volume-id52ff818df4e448578cabca24e564b0e9, metadata={'key95e98dfe2e6d486e904f705223beee97': 'val43f8a05ee4da4b8cb8b66a9dff5280f4', 'keyc8294f7d0084456e9e2951cf141402ef': 'val5d68427a21d749d6bc2fd611fd7809ba', 'key6a6a59b0e5f048e1b84d7b6dbb7dfe6e': 'vala17ba9603dd54ad9976809f03d55fce3'}, name=volume-name520c8dbe72fa481599d756201f8c536d, size=12, snapshot_id=5, status=in_use, volume_type=fake_lvmdriver-2>
class openstackclient.tests.volume.v2.test_backup.TestBackupRestore(*args, **kwargs)

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

backup = <FakeResource availability_zone=zone4c3ad007445c4ae5a63f13cc132f3ff9, container=container-a38e4ab76c90474f909f9aaffcb71dbf, description=description-240336b690934203ae5ea38bc92bed95, id=backup-id-a2ecce37a33d451ca69ee6f5dd5d576b, name=backup-name-708db582f8114f28bc26798cd036d4c6, object_count=None, size=7, status=error, volume_id=volume-id6f1475aeea314a86b2b3c158fa71cbae>
setUp()
test_backup_restore()
volume = <FakeResource attachments=[{'device': '/dev/484d54a047694b2c8a694ace3dba3fe7', 'server_id': '4b63ad06a0284772b3d537535efa737e'}], availability_zone=zone4901d224314a45c2bb4810ebb71a1ec7, bootable=0, description=description7a63ba67cf1846ec9c3b00c57cd2a1ea, id=volume-id6f1475aeea314a86b2b3c158fa71cbae, metadata={'keyb21bcedcbf6445fb98f3d1d786881f6d': 'valcad0d7a4515c4585886e858c3c7442fb', 'keyac5320251b0143ab96a67302062e9737': 'vald8cca74ef34946f995f1a714babbec44', 'key6888a40198e44a6c8ee3b5af43bc0135': 'valb5a2388b88144a91beb0e7c6eb35e123'}, name=volume-namededee1c6193d4d0aa9676410d1e471d3, size=13, snapshot_id=1, 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=zoned1c6eef4c4ac4a71ac40ad0edaccf927, container=container-4ce098ba947b496e9a20cdab054116f5, description=description-b7b9d6d971da4846a635421b64e5f1ea, id=backup-id-72ddf00e5c7d4b0b9802175051ac9e2d, name=backup-name-92a6da166b694b8b8b94477e9441e096, object_count=None, size=19, status=error, volume_id=volume-id-4f4f65366703483c911e69e263a0f27e>
columns = ('availability_zone', 'container', 'description', 'id', 'name', 'object_count', 'size', 'status', 'volume_id')
data = ('zoned1c6eef4c4ac4a71ac40ad0edaccf927', 'container-4ce098ba947b496e9a20cdab054116f5', 'description-b7b9d6d971da4846a635421b64e5f1ea', 'backup-id-72ddf00e5c7d4b0b9802175051ac9e2d', 'backup-name-92a6da166b694b8b8b94477e9441e096', None, 19, 'error', 'volume-id-4f4f65366703483c911e69e263a0f27e')
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-7d2de8b72cc2499a9575b2bf9b8dab96, name=qos-name-e8d55de4ace145269c010c7ce40f3b8e, specs={'iops': '9001', 'foo': 'bar'}>
setUp()
test_qos_associate()
volume_type = <FakeResource description=type-description-cf8298dff3ab4501baab8d056410c9fe, extra_specs={'foo': 'bar'}, id=type-id-724dab8b81c94aec8640baaf82115ca5, name=type-name-0ea3b6ea57b54db387c443a597c5397b>
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-bb2a1120436841ac98feaf04431ae027', 'qos-name-442f045bae3c43aea8d48f4bcb4567b0', {'iops': '9001', 'foo': 'bar'})
new_qos_spec = <FakeResource consumer=front-end, id=qos-id-bb2a1120436841ac98feaf04431ae027, name=qos-name-442f045bae3c43aea8d48f4bcb4567b0, 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-3a56351f9d5144d581f2ffdad628e000, name=qos-name-8eb17f052b7844a2bb1ebe7f9f2b2f55, 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-fd98c4b6258a4596b78e331c35e05217, name=qos-name-351bc80d43ec4e5e9e6f78cd399df324, 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-faaf869f0c0643e98753466932e1b175, extra_specs={'foo': 'bar'}, id=type-id-0b6273c37f2b405a9f2984e2d9b7daf6, name=type-name-45a81251fcfb491bab5f49a6af3d411d>
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-f0c6eb36230247fd9bc76e5cffbd249d', 'qos-name-2468459543084bf0be1585ab015531dd', 'front-end', 'type-name-627d104f85e74b9195cfacfa7d1e248c', u"foo='bar', iops='9001'"), ('qos-id-70f7c46d188b4bdfbdab5ecb6b668014', 'qos-name-04ddd7fcceac4588941576793f5c12ea', 'front-end', 'type-name-627d104f85e74b9195cfacfa7d1e248c', u"foo='bar', iops='9001'")]
q = <FakeResource consumer=front-end, id=qos-id-70f7c46d188b4bdfbdab5ecb6b668014, name=qos-name-04ddd7fcceac4588941576793f5c12ea, specs={'iops': '9001', 'foo': 'bar'}>
qos_association = <FakeResource association_type=volume_type, id=type-id-3e2326f7e3b243d2ae69e77b3ffd75ac, name=type-name-627d104f85e74b9195cfacfa7d1e248c>
qos_specs = [<FakeResource consumer=front-end, id=qos-id-f0c6eb36230247fd9bc76e5cffbd249d, name=qos-name-2468459543084bf0be1585ab015531dd, specs={'iops': '9001', 'foo': 'bar'}>, <FakeResource consumer=front-end, id=qos-id-70f7c46d188b4bdfbdab5ecb6b668014, name=qos-name-04ddd7fcceac4588941576793f5c12ea, 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-a1b24787223b456fa1b863f691972406, name=qos-name-e78529a9be8d418683f1fd001eea7230, 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-bd095540a73e4a2191e7a3ec200d88dc', 'front-end', 'qos-id-521b5d23efbf495b9a99a533def0fd50', 'qos-name-7901a38bda0e471a86de52040bcf42bd', u"foo='bar', iops='9001'")
qos_association = <FakeResource association_type=volume_type, id=type-id-14e4ca1b85cf483bb65b9e29cf3dd8f0, name=type-name-bd095540a73e4a2191e7a3ec200d88dc>
qos_spec = <FakeResource consumer=front-end, id=qos-id-521b5d23efbf495b9a99a533def0fd50, name=qos-name-7901a38bda0e471a86de52040bcf42bd, 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-f727a14fbe314115a6e29b7ddda63b18, name=qos-name-000adefca3dd480d8ede51753573c3ec, 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-615fc24c2a1b4527bab62b1ff9cf2331, id=snapshot-id-28769ab20b4c46a9a91c35b3cbf126f9, metadata={'foo': 'bar'}, name=snapshot-name-7380beb22850421cabb017fad5718dd9, size=10, status=available, volume_id=vloume-id-348c544c9d2a4e928760728ab49006bf>
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-5dd7853a83e84c6daac593e75f01b4fa', 'snapshot-name-80c0c253c52e4ad7944d566c2048aec9', 'snapshot-description-76e6025a69974aa29e0a8127e14345fa', 'available', 10), ('snapshot-id-c96ee408411f47f9808be0793ac55c03', 'snapshot-name-8f0c1060db074918b96fb8532af4e874', 'snapshot-description-dda39767a756493fb04cfc28f1cfab83', 'available', 10), ('snapshot-id-24bbb5a20bde437c8accd74657986b23', 'snapshot-name-2b509c9709ef448cabd20c118d2bd6a3', 'snapshot-description-024ea4da1f7042668c4ac5cb892258f8', 'available', 10)]
data_long = [('snapshot-id-5dd7853a83e84c6daac593e75f01b4fa', 'snapshot-name-80c0c253c52e4ad7944d566c2048aec9', 'snapshot-description-76e6025a69974aa29e0a8127e14345fa', 'available', 10, '2015-06-03T18:49:19.000000', 'volume-name92bba586b680432aac6a13cca2d644bf', u"foo='bar'"), ('snapshot-id-c96ee408411f47f9808be0793ac55c03', 'snapshot-name-8f0c1060db074918b96fb8532af4e874', 'snapshot-description-dda39767a756493fb04cfc28f1cfab83', 'available', 10, '2015-06-03T18:49:19.000000', 'volume-name92bba586b680432aac6a13cca2d644bf', u"foo='bar'"), ('snapshot-id-24bbb5a20bde437c8accd74657986b23', 'snapshot-name-2b509c9709ef448cabd20c118d2bd6a3', 'snapshot-description-024ea4da1f7042668c4ac5cb892258f8', 'available', 10, '2015-06-03T18:49:19.000000', 'volume-name92bba586b680432aac6a13cca2d644bf', u"foo='bar'")]
s = <FakeResource created_at=2015-06-03T18:49:19.000000, description=snapshot-description-024ea4da1f7042668c4ac5cb892258f8, id=snapshot-id-24bbb5a20bde437c8accd74657986b23, metadata={'foo': 'bar'}, name=snapshot-name-2b509c9709ef448cabd20c118d2bd6a3, size=10, status=available, volume_id=volume-name92bba586b680432aac6a13cca2d644bf>
setUp()
snapshots = [<FakeResource created_at=2015-06-03T18:49:19.000000, description=snapshot-description-76e6025a69974aa29e0a8127e14345fa, id=snapshot-id-5dd7853a83e84c6daac593e75f01b4fa, metadata={'foo': 'bar'}, name=snapshot-name-80c0c253c52e4ad7944d566c2048aec9, size=10, status=available, volume_id=volume-name92bba586b680432aac6a13cca2d644bf>, <FakeResource created_at=2015-06-03T18:49:19.000000, description=snapshot-description-dda39767a756493fb04cfc28f1cfab83, id=snapshot-id-c96ee408411f47f9808be0793ac55c03, metadata={'foo': 'bar'}, name=snapshot-name-8f0c1060db074918b96fb8532af4e874, size=10, status=available, volume_id=volume-name92bba586b680432aac6a13cca2d644bf>, <FakeResource created_at=2015-06-03T18:49:19.000000, description=snapshot-description-024ea4da1f7042668c4ac5cb892258f8, id=snapshot-id-24bbb5a20bde437c8accd74657986b23, metadata={'foo': 'bar'}, name=snapshot-name-2b509c9709ef448cabd20c118d2bd6a3, size=10, status=available, volume_id=volume-name92bba586b680432aac6a13cca2d644bf>]
test_snapshot_list_all_projects()
test_snapshot_list_with_options()
test_snapshot_list_without_options()
volume = <FakeResource attachments=[{'device': '/dev/803a66067c5f43cabb2930504f7d32e2', 'server_id': '9c8dbae8f295454eb479d52a2a160903'}], availability_zone=zonedc52b4166b1c4ad6837f34e0b707a895, bootable=0, description=descriptionf1d6ef5929db4ad6beaffe50bb2ffd7c, id=volume-id4c180907a4c84f15bc794547913b4fa3, metadata={'keyf18aa33f40664047a2ee03e136d8050c': 'val1a88000a6b664a9ab72e04626c492600', 'keye46493ff04eb4dcc9185643eb25786f1': 'valf915995a02594097a46feb2fb41549bb', 'keyd891144675534c41ad9e6d8685346e66': 'val97b0247faa014fa384035783bcb769de'}, name=volume-name92bba586b680432aac6a13cca2d644bf, size=18, snapshot_id=5, 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-53891240b4514f70b469b205dd7fc88f, id=snapshot-id-cca1e46dd9b841b1a4b8baca03a29085, metadata={'foo': 'bar'}, name=snapshot-name-34746144559d459b9c86d3bbfcd72f11, size=10, status=available, volume_id=vloume-id-f012f38b841141ea9e38b54cefc421a3>
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-705367b76b79454bb70498ff9f0c012c, id=snapshot-id-6dcfcbda4fa940afa599b45c75bf7a81, metadata={'foo': 'bar'}, name=snapshot-name-782d9065ca1a4aed8a38ffcb7f2c3d54, size=10, status=available, volume_id=vloume-id-e18942a6a6ca4faa8b21f18316640d38>
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-9d6dd18ebd794849b1b44c818a090c0f, extra_specs={'foo': 'bar'}, id=type-id-686affe64c0b4158afa81d99ddba3752, name=type-name-af9b8bf927f84acb9499213ee6150500>
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-0d6ac8dd3f1d4a6985ab14f1a459deb0', 'type-name-242d5d4a0ce5432c90752e97c7692134'), ('type-id-86509ffb51034a06a6ef05c02a714998', 'type-name-a3e3bde166f34bc39c22edeb19e01f9e')]
data_long = [('type-id-0d6ac8dd3f1d4a6985ab14f1a459deb0', 'type-name-242d5d4a0ce5432c90752e97c7692134', 'type-description-8dc7bccbcbc04c93a67ce61dfb86a577', u"foo='bar'"), ('type-id-86509ffb51034a06a6ef05c02a714998', 'type-name-a3e3bde166f34bc39c22edeb19e01f9e', 'type-description-495d4c85b6e245a196792932783e55bd', u"foo='bar'")]
setUp()
t = <FakeResource description=type-description-495d4c85b6e245a196792932783e55bd, extra_specs={'foo': 'bar'}, id=type-id-86509ffb51034a06a6ef05c02a714998, name=type-name-a3e3bde166f34bc39c22edeb19e01f9e>
test_type_list_with_options()
test_type_list_without_options()
volume_types = [<FakeResource description=type-description-8dc7bccbcbc04c93a67ce61dfb86a577, extra_specs={'foo': 'bar'}, id=type-id-0d6ac8dd3f1d4a6985ab14f1a459deb0, name=type-name-242d5d4a0ce5432c90752e97c7692134>, <FakeResource description=type-description-495d4c85b6e245a196792932783e55bd, extra_specs={'foo': 'bar'}, id=type-id-86509ffb51034a06a6ef05c02a714998, name=type-name-a3e3bde166f34bc39c22edeb19e01f9e>]
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-cddee2c048b2472da572030843fc114e, extra_specs={'foo': 'bar'}, id=type-id-a940465a8621420d8cc0d274b9cbf8da, name=type-name-cc406a99f40c415697b7367b6369d6bb, set_keys=<MagicMock id='130440848'>>
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-96fcdba3ec7e4711a4c0f5c49132a976, extra_specs={'foo': 'bar'}, id=type-id-cf2ad490feaa4316b554ab66fa9648e2, name=type-name-8ce541c0c3534d39a1fdba9fccb9da77, unset_keys=<MagicMock id='149393040'>>

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