openstackclient.tests.volume.v1 package

Submodules

openstackclient.tests.volume.v1.fakes module

class openstackclient.tests.volume.v1.fakes.FakeImagev1Client(**kwargs)

Bases: object

class openstackclient.tests.volume.v1.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.v1.fakes.FakeServiceClient(**kwargs)

Bases: object

class openstackclient.tests.volume.v1.fakes.FakeVolumev1Client(**kwargs)

Bases: object

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

Bases: openstackclient.tests.utils.TestCommand

setUp()
class openstackclient.tests.volume.v1.fakes.TestVolumev1(*args, **kwargs)

Bases: openstackclient.tests.utils.TestCommand

setUp()

openstackclient.tests.volume.v1.test_qos_specs module

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

Bases: openstackclient.tests.volume.v1.fakes.TestVolumev1

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

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

setUp()
test_qos_associate()
class openstackclient.tests.volume.v1.test_qos_specs.TestQosCreate(*args, **kwargs)

Bases: openstackclient.tests.volume.v1.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.v1.test_qos_specs.TestQosDelete(*args, **kwargs)

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

setUp()
test_qos_delete_with_id()
test_qos_delete_with_name()
class openstackclient.tests.volume.v1.test_qos_specs.TestQosDisassociate(*args, **kwargs)

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

setUp()
test_qos_disassociate_with_all_volume_types()
test_qos_disassociate_with_volume_type()
class openstackclient.tests.volume.v1.test_qos_specs.TestQosList(*args, **kwargs)

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

setUp()
test_qos_list()
class openstackclient.tests.volume.v1.test_qos_specs.TestQosSet(*args, **kwargs)

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

setUp()
test_qos_set_with_properties_with_id()
class openstackclient.tests.volume.v1.test_qos_specs.TestQosShow(*args, **kwargs)

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

setUp()
test_qos_show()
class openstackclient.tests.volume.v1.test_qos_specs.TestQosUnset(*args, **kwargs)

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

setUp()
test_qos_unset_with_properties()

openstackclient.tests.volume.v1.test_service module

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

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

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

Bases: openstackclient.tests.volume.v1.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.v1.test_volume module

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

Bases: openstackclient.tests.volume.v1.fakes.TestVolumev1

setUp()
class openstackclient.tests.volume.v1.test_volume.TestVolumeCreate(*args, **kwargs)

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

columns = ('attach_status', 'availability_zone', 'display_description', 'display_name', 'id', 'properties', 'size', 'status', 'type')
datalist = ('detached', 'stonehenge', 'Nigel Tufnel', 'nigel', 'vvvvvvvv-vvvv-vvvv-vvvvvvvv', "Alpha='a', Beta='b', Gamma='g'", 120, 'available', 'to-eleven')
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()
class openstackclient.tests.volume.v1.test_volume.TestVolumeList(*args, **kwargs)

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

columns = ('ID', 'Display Name', 'Status', 'Size', 'Attached to')
datalist = (('vvvvvvvv-vvvv-vvvv-vvvvvvvv', 'nigel', 'available', 120, ''),)
setUp()
test_volume_list_all_projects()
test_volume_list_long()
test_volume_list_name()
test_volume_list_no_options()
test_volume_list_status()
class openstackclient.tests.volume.v1.test_volume.TestVolumeSet(*args, **kwargs)

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

setUp()
test_volume_set_description()
test_volume_set_name()
test_volume_set_no_options()
test_volume_set_property()
test_volume_set_size()
test_volume_set_size_not_available()
test_volume_set_size_smaller()

Module contents